/* ==========================================================================
   Login page (/login) — paper theme, matching the landing page and the app.

   Self-contained on purpose, like landing.css: shell.css carries sidebar and
   full-height app rules this page does not want. The palette values below are
   shell.css's :root, copied; if the app's theme changes, change them here too.
   style.css is still used by the admin dashboard and is not touched.
   ========================================================================== */

:root {
  --bg: #F5F1E8;
  --bg-subtle: #EFEAD9;
  --bg-card: #FBF8F1;
  --border: #E0D5BB;
  --border-strong: #C9B894;
  --text: #2D2418;
  --text-muted: #7A6A52;
  --text-subtle: #A89980;
  --accent: #B86E3C;
  --accent-hover: #A05E30;
  --accent-soft: #F2E4D2;
  --completed: #5C8A4E;
  --failed: #B85A3A;
  --failed-bg: #F5E1D8;
  --shadow-sm: 0 1px 2px rgba(45, 36, 24, 0.05);
  --shadow-md: 0 2px 8px rgba(45, 36, 24, 0.08);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.login-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
}
.login-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.login-nav .brand:hover { text-decoration: none; }
.login-nav .back { font-size: 15px; color: var(--text-muted); }
.login-nav .back:hover { color: var(--text); text-decoration: none; }

/* ---------- Two cards ---------- */
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 72px;
}
.login-grid {
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: stretch;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 56px;
}

/* ---------- Sign-in card ---------- */
.card-logo { width: 56px; height: 56px; margin-bottom: 22px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.auth-card__header { margin: 8px 0 24px; }
.auth-card__header h2 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin-bottom: 8px;
}
.auth-card__header p { color: var(--text-muted); font-size: 17px; }
.auth-card__footer {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--text); }
.form-input {
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 16px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.form-input::placeholder { color: var(--text-subtle); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 110, 60, 0.18);
}
.form-group.has-error .form-input { border-color: var(--failed); }
.form-error { display: none; font-size: 13px; color: var(--failed); }
.form-group.has-error .form-error { display: block; }
.form-alert {
  display: none;
  background: var(--failed-bg);
  border: 1px solid #E8C4B3;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--failed);
}
.form-alert.visible { display: block; }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner.active { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.otp-input {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
}
.card-note { margin-top: 18px; font-size: 14px; color: var(--text-muted); }

/* ---------- Side card ---------- */
.side-card { background: var(--bg-subtle); }
.side-card h2 {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.checks { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.checks li { display: flex; align-items: flex-start; gap: 14px; font-size: 19px; }
.checks .tick {
  flex: none;
  width: 24px; height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: grid;
  place-items: center;
}
.side-foot {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .login-grid { grid-template-columns: 1fr; max-width: 480px; }
  .card { padding: 28px 22px; }
  .side-card h2 { font-size: 36px; }
}
