*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 28px 28px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
  max-width: 400px;
  width: 100%;
}

h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.subtitle {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  font-size: 14px;
}

.form-group label {
  margin-bottom: 4px;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 14px;
  outline: none;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

button.primary {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  padding: 10px 14px;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

button.primary:hover {
  filter: brightness(1.05);
}

.error {
  margin-top: 10px;
  font-size: 13px;
  color: #b91c1c;
}

#login-status {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

#login-status:empty { display: none; }
button.primary:disabled { opacity: .65; cursor: wait; }


/* TC12 mobile login hotfix */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.16), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.page {
  min-height: 100dvh;
  width: 100%;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(420px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(18px, 5vw, 28px);
  overflow: hidden;
}

input[type="text"],
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.25;
  outline: none;
  background: #fff;
}

button.primary {
  min-height: 46px;
}

@media (max-width: 520px) {
  .page {
    align-items: flex-start;
    justify-content: center;
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .card,
  .login-card {
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  }

  h1 {
    font-size: 22px;
    line-height: 1.15;
  }

  .subtitle {
    font-size: 14px;
    line-height: 1.4;
  }
}
