 :root {
      --bg-deep: #0f1410;
      --bg-panel: #1a2218;
      --accent: #e8a838;
      --accent-hover: #f0bc5c;
      --accent-muted: rgba(232, 168, 56, 0.15);
      --surface: #ffffff;
      --surface-muted: #f6f4ef;
      --text: #1c1f1a;
      --text-muted: #5c6356;
      --border: #e2ddd3;
      --error: #c0392b;
      --error-bg: #fdf0ee;
      --radius: 14px;
      --shadow: 0 24px 64px rgba(15, 20, 16, 0.12);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
      min-height: 100vh;
      background: var(--surface-muted);
      color: var(--text);
      -webkit-font-smoothing: antialiased;
    }

    .auth-page {
      display: grid;
      min-height: 100vh;
      grid-template-columns: 1fr 1fr;
    }

    @media (max-width: 900px) {
      .auth-page { grid-template-columns: 1fr; }
      .auth-brand { display: none; }
    }

    .auth-brand {
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 3rem;
      background: linear-gradient(145deg, var(--bg-deep) 0%, var(--bg-panel) 45%, #243020 100%);
      overflow: hidden;
    }

    .auth-brand::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(232, 168, 56, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 90% 10%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
      pointer-events: none;
    }

    .brand-top {
      position: relative;
      z-index: 1;
    }

    .brand-logo {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
      color: #fff;
    }

    .brand-mark {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--accent) 0%, #c48420 100%);
      display: grid;
      place-items: center;
      font-size: 1.35rem;
      box-shadow: 0 8px 24px rgba(232, 168, 56, 0.35);
    }

    .brand-name {
      font-family: 'Fraunces', Georgia, serif;
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .brand-tagline {
      font-size: 0.8rem;
      color: rgba(255, 255, 255, 0.55);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      margin-top: 0.15rem;
    }

    .brand-content {
      position: relative;
      z-index: 1;
      max-width: 22rem;
    }

    .brand-content h2 {
      font-family: 'Fraunces', Georgia, serif;
      font-size: clamp(1.75rem, 3vw, 2.25rem);
      font-weight: 700;
      color: #fff;
      line-height: 1.2;
      letter-spacing: -0.03em;
      margin-bottom: 1rem;
    }

    .brand-content p {
      color: rgba(255, 255, 255, 0.65);
      line-height: 1.65;
      font-size: 1rem;
    }

    .brand-features {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    .brand-feature {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      color: rgba(255, 255, 255, 0.8);
      font-size: 0.9rem;
    }

    .brand-feature span:first-child {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: var(--accent-muted);
      display: grid;
      place-items: center;
      font-size: 0.85rem;
      flex-shrink: 0;
    }

    .auth-shell {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2rem 1.5rem;
      background: var(--surface-muted);
    }

    .auth-card {
      width: 100%;
      max-width: 420px;
      background: var(--surface);
      border-radius: calc(var(--radius) + 4px);
      box-shadow: var(--shadow);
      border: 1px solid var(--border);
      padding: 2.5rem 2.25rem;
    }

    .auth-card-header {
      margin-bottom: 2rem;
    }

    .auth-card-header h1 {
      font-family: 'Fraunces', Georgia, serif;
      font-size: 1.65rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      color: var(--text);
      margin-bottom: 0.4rem;
    }

    .auth-card-header p {
      color: var(--text-muted);
      font-size: 0.95rem;
      line-height: 1.5;
    }

    .form-group {
      margin-bottom: 1.25rem;
    }

    .form-group label {
      display: block;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 0.45rem;
      letter-spacing: 0.02em;
    }

    .input-wrap {
      position: relative;
    }

    .input-wrap input {
      width: 100%;
      padding: 0.85rem 1rem;
      padding-right: 2.75rem;
      font-family: inherit;
      font-size: 0.95rem;
      color: var(--text);
      background: var(--surface-muted);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }

    .input-wrap input::placeholder {
      color: #9a9f94;
    }

    .input-wrap input:hover {
      border-color: #cfc9bc;
    }

    .input-wrap input:focus {
      outline: none;
      border-color: var(--accent);
      background: var(--surface);
      box-shadow: 0 0 0 4px var(--accent-muted);
    }

    .input-wrap input.input-error {
      border-color: var(--error);
      background: var(--error-bg);
    }

    .toggle-password {
      position: absolute;
      right: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.35rem;
      color: var(--text-muted);
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      border-radius: 6px;
      transition: color 0.15s;
    }

    .toggle-password:hover {
      color: var(--text);
    }

    .field-error {
      display: none;
      margin-top: 0.4rem;
      font-size: 0.82rem;
      color: var(--error);
      line-height: 1.4;
    }

    .field-error.visible {
      display: block;
    }

    .form-actions {
      margin-top: 1.75rem;
    }

    .btn-primary {
      width: 100%;
      padding: 0.95rem 1.25rem;
      font-family: inherit;
      font-size: 1rem;
      font-weight: 600;
      color: var(--bg-deep);
      background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
      box-shadow: 0 4px 14px rgba(232, 168, 56, 0.4);
    }

    .btn-primary:hover {
      filter: brightness(1.05);
      box-shadow: 0 6px 20px rgba(232, 168, 56, 0.45);
    }

    .btn-primary:active {
      transform: scale(0.98);
    }

    .form-footer {
      margin-top: 1.5rem;
      text-align: center;
    }

    .form-footer a {
      color: var(--text-muted);
      font-size: 0.9rem;
      text-decoration: none;
      transition: color 0.15s;
    }

    .form-footer a:hover {
      color: var(--accent);
    }

    .form-alert {
      margin-bottom: 1.25rem;
      padding: 0.85rem 1rem;
      border-radius: var(--radius);
      background: var(--error-bg);
      border: 1px solid #f0c4be;
      color: var(--error);
      font-size: 0.9rem;
      line-height: 1.45;
    }

    .mobile-brand {
      display: none;
      text-align: center;
      margin-bottom: 2rem;
    }

    @media (max-width: 900px) {
      .mobile-brand { display: block; }
      .mobile-brand .brand-mark {
        margin: 0 auto 0.75rem;
      }
      .mobile-brand .brand-name {
        color: var(--text);
        font-family: 'Fraunces', Georgia, serif;
        font-size: 1.25rem;
        font-weight: 700;
      }
    }