
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'DM Sans', sans-serif; background: #1A1C16; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }

  .login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }

  .login-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .login-logo-mark {
    height: 32px;
    width: auto;
    display: block;
    flex-shrink: 0;
  }

  .login-logo-text { line-height: 1.3; }
  .login-logo-name { font-size: 0.82rem; font-weight: 700; color: #23271C; }
  .login-logo-sub  { font-size: 0.68rem; color: #9A9590; letter-spacing: 0.05em; }

  .login-heading {
    font-family: 'EB Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #23271C;
    margin-bottom: 1.5rem;
  }

  /* ── Tab switcher ─────────────────────────────────── */
  .login-tabs {
    display: flex;
    border: 1px solid #D8D4CA;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 1.75rem;
  }
  .login-tab {
    flex: 1;
    padding: 0.55rem 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background: #F4F1E8;
    color: #9A9590;
    border: none;
    transition: background 0.15s, color 0.15s;
    line-height: 1.3;
  }
  .login-tab:first-child { border-right: 1px solid #D8D4CA; }
  .login-tab.active {
    background: #23271C;
    color: #fff;
  }
  .login-tab .tab-rec {
    display: block;
    font-size: 0.62rem;
    font-weight: 400;
    color: #CE5A22;
    margin-top: 0.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .login-tab.active .tab-rec { color: #CE5A22; }

  /* ── Panels ───────────────────────────────────────── */
  .login-panel { display: none; }
  .login-panel.active { display: block; }

  .login-sub {
    font-size: 0.82rem;
    color: #9A9590;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .field-group { margin-bottom: 1rem; }

  .field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5A5550;
    margin-bottom: 0.4rem;
  }

  .field-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #D8D4CA;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #23271C;
    background: #FDFCFA;
    transition: border-color 0.15s;
    outline: none;
  }
  .field-input:focus { border-color: #CE5A22; background: #fff; }
  .field-input.invalid { border-color: #D4521A; }

  .btn-primary {
    width: 100%;
    background: #23271C;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.5rem;
  }
  .btn-primary:hover:not(:disabled) { background: #2E3325; }
  .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

  /* Forgot password link */
  .forgot-link {
    display: block;
    text-align: right;
    font-size: 0.73rem;
    color: #9A9590;
    text-decoration: underline;
    cursor: pointer;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
  }
  .forgot-link:hover { color: #23271C; }

  /* Password hint */
  .pw-hint {
    font-size: 0.72rem;
    color: #9A9590;
    margin-top: 0.3rem;
  }

  /* Email code step */
  .code-input {
    text-align: center;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    padding: 0.7rem 0.5rem;
  }
  .code-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
  }
  .link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #5A5550;
    text-decoration: underline;
    cursor: pointer;
  }
  .link-btn:hover:not(:disabled) { color: #23271C; }
  .link-btn:disabled { color: #B5B0A8; text-decoration: none; cursor: default; }

  .login-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.5;
    display: none;
  }
  .login-status.success { background: #F0FFF4; border: 1px solid #1E8449; color: #1E8449; display: block; }
  .login-status.error   { background: #FFF5F5; border: 1px solid #D4521A; color: #D4521A; display: block; }
  .login-status.info    { background: #F4F1E8; border: 1px solid #D8D4CA; color: #5A5550; display: block; }

  .login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.72rem;
    color: #9A9590;
  }
  .login-footer a { color: #9A9590; text-decoration: underline; }

  .back-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.15s;
  }
  .back-link:hover { color: rgba(255,255,255,0.7); }

  @media (max-width: 480px) {
    body { justify-content: flex-start; padding-top: 1.5rem; }
    .login-card { padding: 2rem 1.5rem; }
  }
