/* ─── Login layout: full-screen split ───────────────────────── */
    body {
      display: flex;
      min-height: 100vh;
      overflow: hidden;
    }
    body::before { display: none; } /* override global gradient — login has its own bg */

    /* ─── Left panel — brand / hero ─────────────────────────────── */
    .login-brand {
      width: 46%;
      flex-shrink: 0;
      background: linear-gradient(150deg, var(--crimson-dark) 0%, var(--crimson) 55%, var(--crimson-light) 100%);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px 52px;
      position: relative;
      overflow: hidden;
    }

    /* Decorative circles */
    .login-brand::before,
    .login-brand::after {
      content: '';
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }
    .login-brand::before {
      width: 420px; height: 420px;
      background: rgba(255,255,255,.04);
      top: -120px; right: -140px;
    }
    .login-brand::after {
      width: 280px; height: 280px;
      background: rgba(255,255,255,.06);
      bottom: -80px; left: -60px;
    }

    .brand-top {
      position: relative; z-index: 1;
      display: flex; align-items: center; gap: 14px;
    }
    .brand-logo {
      width: 46px; height: 46px;
      background: rgba(255,255,255,.15);
      border-radius: var(--radius-md);
      display: flex; align-items: center; justify-content: center;
      font-size: 22px;
      border: 1px solid rgba(255,255,255,.2);
      backdrop-filter: blur(8px);
    }
    .brand-name {
      font-size: 20px; font-weight: 800;
      color: var(--white); letter-spacing: -.4px;
    }
    .brand-tagline {
      font-size: 11px; color: rgba(255,255,255,.5);
      font-weight: 400; margin-top: 2px;
    }

    .brand-hero {
      position: relative; z-index: 1;
      flex: 1;
      display: flex; flex-direction: column;
      justify-content: center;
      padding: 32px 0;
    }
    .brand-hero h2 {
      font-size: 36px; font-weight: 800;
      color: var(--white); line-height: 1.2;
      letter-spacing: -.8px;
      margin-bottom: 16px;
    }
    .brand-hero h2 em {
      font-style: normal;
      color: rgba(255,255,255,.55);
    }
    .brand-hero p {
      font-size: 14.5px; color: rgba(255,255,255,.6);
      line-height: 1.65;
      max-width: 360px;
    }

    /* Feature list */
    .brand-features {
      list-style: none;
      margin-top: 36px;
      display: flex; flex-direction: column; gap: 14px;
    }
    .brand-features li {
      display: flex; align-items: center; gap: 12px;
      font-size: 13.5px; color: rgba(255,255,255,.75);
      font-weight: 500;
    }
    .feat-icon {
      width: 34px; height: 34px; flex-shrink: 0;
      background: rgba(255,255,255,.12);
      border-radius: var(--radius-sm);
      display: flex; align-items: center; justify-content: center;
      font-size: 16px;
      border: 1px solid rgba(255,255,255,.15);
    }

    .brand-bottom {
      position: relative; z-index: 1;
      font-size: 11.5px; color: rgba(255,255,255,.3);
    }

    /* ─── Right panel — form ─────────────────────────────────────── */
    .login-form-panel {
      flex: 1;
      display: flex; align-items: center; justify-content: center;
      background: var(--off-white);
      padding: 40px 32px;
      position: relative;
      overflow-y: auto;
    }

    /* Subtle radial on form panel */
    .login-form-panel::before {
      content: '';
      position: absolute; inset: 0;
      background:
        radial-gradient(ellipse 70% 60% at 80% 15%, rgba(83,6,6,.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 90%, rgba(83,6,6,.04) 0%, transparent 60%);
      pointer-events: none;
    }

    .login-card {
      width: 100%;
      max-width: 420px;
      position: relative; z-index: 1;
    }

    .login-card-header {
      margin-bottom: 32px;
    }
    .login-card-header h1 {
      font-size: 26px; font-weight: 800;
      color: var(--text-dark); letter-spacing: -.5px;
      margin-bottom: 6px;
    }
    .login-card-header p {
      font-size: 13.5px; color: var(--text-soft);
      line-height: 1.5;
    }
    .login-card-header a {
      color: var(--crimson); font-weight: 600;
      text-decoration: none;
    }
    .login-card-header a:hover { text-decoration: underline; }

    /* Input with icon */
    .input-wrap {
      position: relative;
    }
    .input-icon {
      position: absolute;
      left: 14px; top: 50%; transform: translateY(-50%);
      font-size: 15px;
      color: var(--gray-400);
      pointer-events: none;
      transition: color .2s;
    }
    .input-wrap .form-control {
      padding-left: 40px;
    }
    .input-wrap .form-control:focus ~ .input-icon,
    .input-wrap:focus-within .input-icon {
      color: var(--crimson);
    }

    /* Password toggle */
    .pw-toggle {
      position: absolute;
      right: 12px; top: 50%; transform: translateY(-50%);
      background: none; border: none;
      cursor: pointer; font-size: 15px;
      color: var(--gray-400);
      padding: 4px;
      transition: color .2s;
      line-height: 1;
    }
    .pw-toggle:hover { color: var(--crimson); }

    /* Remember / forgot row */
    .form-options {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 20px;
    }
    .remember-check {
      display: flex; align-items: center; gap: 8px;
      font-size: 13px; color: var(--text-mid); cursor: pointer;
    }
    .remember-check input[type="checkbox"] {
      width: 15px; height: 15px;
      accent-color: var(--crimson);
      cursor: pointer;
    }
    .forgot-link {
      font-size: 13px; color: var(--crimson);
      font-weight: 600; text-decoration: none;
    }
    .forgot-link:hover { text-decoration: underline; }

    /* Submit button */
    .btn-login {
      width: 100%;
      padding: 13px;
      font-size: 14px; font-weight: 700;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-light) 100%);
      color: var(--white);
      border: none; cursor: pointer;
      box-shadow: 0 4px 16px rgba(83,6,6,.4);
      transition: var(--transition);
      letter-spacing: .2px;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .btn-login:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(83,6,6,.5);
    }
    .btn-login:active { transform: translateY(0); }

    /* Divider with text */
    .or-divider {
      display: flex; align-items: center; gap: 12px;
      margin: 22px 0;
      font-size: 12px; color: var(--gray-400); font-weight: 500;
    }
    .or-divider::before,
    .or-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--gray-200);
    }

    /* SSO buttons */
    .sso-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 10px; margin-bottom: 24px;
    }
    .sso-btn {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      padding: 10px 12px;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-md);
      background: var(--white);
      font-size: 13px; font-weight: 600;
      color: var(--text-mid);
      cursor: pointer;
      transition: var(--transition);
      text-decoration: none;
    }
    .sso-btn:hover {
      border-color: var(--crimson);
      color: var(--crimson);
      background: var(--crimson-pale);
    }
    .sso-btn .sso-icon { font-size: 17px; }

    /* Error message */
    .form-error {
      background: rgba(220,60,30,.08);
      border: 1.5px solid rgba(220,60,30,.25);
      border-radius: var(--radius-md);
      padding: 10px 14px;
      font-size: 13px; color: #b52a10;
      display: none;
      align-items: center; gap: 8px;
      margin-bottom: 16px;
    }
    .form-error.visible { display: flex; }

    /* Spinner */
    .spinner {
      width: 16px; height: 16px;
      border: 2px solid rgba(255,255,255,.4);
      border-top-color: var(--white);
      border-radius: 50%;
      animation: spin .6s linear infinite;
      display: none;
    }
    .btn-login.loading .btn-label { display: none; }
    .btn-login.loading .spinner   { display: block; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Footer note */
    .login-footer-note {
      text-align: center;
      font-size: 12px; color: var(--gray-400);
      margin-top: 28px;
    }
    .login-footer-note a { color: var(--crimson); text-decoration: none; font-weight: 500; }

    /* ─── Responsive ─────────────────────────────────────────────── */
    @media (max-width: 820px) {
      body { flex-direction: column; overflow: auto; }
      .login-brand {
        width: 100%; min-height: auto;
        padding: 32px 28px 36px;
      }
      .brand-hero h2 { font-size: 26px; }
      .brand-features { display: none; }
      .login-form-panel { padding: 40px 24px 56px; }
    }

    