/* ══════════════════════════════════════════════════════
       RESET & BASE
    ══════════════════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { height: 100%; font-size: 14px; -webkit-font-smoothing: antialiased; }
    body {
      font-family: 'Poppins', -apple-system, sans-serif;
      height: 100%;
      min-height: 100vh;
      background: #F7F8FC;
      color: #0D1B3E;
      line-height: 1.5;
      overflow: hidden;
    }
    a { text-decoration: none; color: inherit; }
    button { font-family: inherit; cursor: pointer; border: none; }
    input  { font-family: inherit; }
    svg    { display: block; flex-shrink: 0; }

    /* ══════════════════════════════════════════════════════
       PAGE SHELL
    ══════════════════════════════════════════════════════ */
    .login-shell {
      display: flex;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    /* ══════════════════════════════════════════════════════
       LEFT PANEL — BRAND IMMERSION
    ══════════════════════════════════════════════════════ */
    .login-left {
      flex: 0 0 58%;
      position: relative;
      background: #0B2E83;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      padding: 52px 60px;
    }

    /* Deep gradient layering */
    .login-left::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 110% -10%, rgba(22,72,184,0.9) 0%, transparent 60%),
        radial-gradient(ellipse 70% 80% at -20% 110%, rgba(13,159,110,0.25) 0%, transparent 55%),
        linear-gradient(145deg, #0B2E83 0%, #071C55 55%, #050F2E 100%);
      pointer-events: none;
    }

    /* Subtle grid overlay */
    .login-left::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
      background-size: 48px 48px;
      pointer-events: none;
    }

    /* Floating orbs */
    .orb {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      animation: float 8s ease-in-out infinite;
    }
    .orb-1 {
      width: 420px; height: 420px;
      background: radial-gradient(circle, rgba(22,72,184,0.5) 0%, transparent 70%);
      top: -120px; right: -100px;
      animation-duration: 9s;
    }
    .orb-2 {
      width: 280px; height: 280px;
      background: radial-gradient(circle, rgba(13,159,110,0.18) 0%, transparent 70%);
      bottom: 60px; left: -60px;
      animation-duration: 11s;
      animation-delay: -3s;
    }
    .orb-3 {
      width: 160px; height: 160px;
      background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
      top: 42%; left: 38%;
      animation-duration: 7s;
      animation-delay: -5s;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0) scale(1); }
      50%       { transform: translateY(-18px) scale(1.04); }
    }

    /* Content inside left panel (above all layers) */
    .left-content {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .left-logo {
      height: 36px;
      width: auto;
      object-fit: contain;
      object-position: left center;
      margin-bottom: auto;
    }

    .left-headline {
      margin-top: auto;
      margin-bottom: 40px;
    }

    .left-eyebrow {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: rgba(13,159,110,1);
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .left-eyebrow::before {
      content: '';
      width: 20px;
      height: 2px;
      background: #0D9F6E;
      border-radius: 2px;
      display: inline-block;
    }

    .left-title {
      font-size: 38px;
      font-weight: 800;
      color: #ffffff;
      line-height: 1.15;
      letter-spacing: -1px;
      margin-bottom: 20px;
    }
    .left-title em {
      font-style: normal;
      color: rgba(255,255,255,0.45);
    }

    .left-desc {
      font-size: 14px;
      font-weight: 400;
      color: rgba(255,255,255,0.55);
      line-height: 1.7;
      max-width: 380px;
      margin-bottom: 44px;
    }

    /* Feature pills */
    .left-features {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 52px;
    }

    .feature-item {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .feature-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.10);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #0D9F6E;
      flex-shrink: 0;
    }

    .feature-text {
      font-size: 13px;
      font-weight: 500;
      color: rgba(255,255,255,0.75);
    }

    /* Dashboard preview card */
    .left-preview {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 18px 20px;
      display: flex;
      align-items: center;
      gap: 16px;
      backdrop-filter: blur(12px);
    }

    .preview-dots {
      display: flex;
      gap: 5px;
    }
    .preview-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
    }
    .preview-dot:nth-child(1) { background: rgba(220,38,38,0.7); }
    .preview-dot:nth-child(2) { background: rgba(245,158,11,0.7); }
    .preview-dot:nth-child(3) { background: rgba(13,159,110,0.7); }

    .preview-bars {
      display: flex;
      gap: 4px;
      align-items: flex-end;
    }
    .preview-bar {
      width: 6px;
      border-radius: 3px;
      background: rgba(255,255,255,0.15);
    }
    .preview-bar:nth-child(1) { height: 14px; background: rgba(13,159,110,0.6); }
    .preview-bar:nth-child(2) { height: 22px; background: rgba(13,159,110,0.8); }
    .preview-bar:nth-child(3) { height: 10px; background: rgba(245,158,11,0.6); }
    .preview-bar:nth-child(4) { height: 18px; background: rgba(13,159,110,0.7); }
    .preview-bar:nth-child(5) { height: 26px; background: rgba(22,72,184,0.7); }

    .preview-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .preview-stat-val {
      font-size: 18px;
      font-weight: 800;
      color: white;
      letter-spacing: -0.5px;
      line-height: 1;
    }
    .preview-stat-label {
      font-size: 10px;
      font-weight: 500;
      color: rgba(255,255,255,0.45);
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }

    .preview-divider {
      width: 1px;
      height: 32px;
      background: rgba(255,255,255,0.08);
    }

    .preview-status {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .preview-status-row {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: rgba(255,255,255,0.55);
    }
    .preview-status-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
    }

    /* ══════════════════════════════════════════════════════
       RIGHT PANEL — LOGIN FORM
    ══════════════════════════════════════════════════════ */
    .login-right {
      flex: 1;
      background: #ffffff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 56px;
      position: relative;
      overflow: hidden;
    }

    /* Faint background decoration */
    .login-right::before {
      content: '';
      position: absolute;
      bottom: -120px;
      right: -120px;
      width: 400px;
      height: 400px;
      background: radial-gradient(circle, rgba(11,46,131,0.04) 0%, transparent 70%);
      pointer-events: none;
    }

    .login-right::after {
      content: '';
      position: absolute;
      top: -60px;
      left: -60px;
      width: 240px;
      height: 240px;
      background: radial-gradient(circle, rgba(13,159,110,0.05) 0%, transparent 70%);
      pointer-events: none;
    }

    .form-wrap {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 380px;
    }

    /* Logo on right panel */
    .form-logo {
      height: 32px;
      width: auto;
      object-fit: contain;
      object-position: left;
      margin-bottom: 36px;
    }

    /* Header */
    .form-header {
      margin-bottom: 36px;
    }

    .form-title {
      font-size: 26px;
      font-weight: 800;
      color: #0D1B3E;
      letter-spacing: -0.6px;
      margin-bottom: 6px;
      line-height: 1.2;
    }

    .form-subtitle {
      font-size: 13px;
      color: #6B7399;
      font-weight: 400;
    }

    .form-subtitle strong {
      color: #0B2E83;
      font-weight: 600;
    }

    /* Form fields */
    .form-group {
      position: relative;
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-size: 11.5px;
      font-weight: 600;
      color: #6B7399;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .form-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .form-input-icon {
      position: absolute;
      left: 14px;
      color: #9BA3C4;
      pointer-events: none;
      transition: color 0.2s ease;
      z-index: 1;
    }

    .form-input {
      width: 100%;
      height: 50px;
      padding: 0 48px 0 44px;
      background: #F7F8FC;
      border: 1.5px solid #E8EBF4;
      border-radius: 12px;
      font-size: 14px;
      font-weight: 500;
      color: #0D1B3E;
      outline: none;
      transition: all 0.2s ease;
      appearance: none;
    }

    .form-input::placeholder {
      color: #C4C9E0;
      font-weight: 400;
    }

    .form-input:focus {
      background: #FAFBFF;
      border-color: #0B2E83;
      box-shadow: 0 0 0 4px rgba(11,46,131,0.08);
    }

    .form-input:focus ~ .form-input-icon,
    .form-input-wrap:has(.form-input:focus) .form-input-icon {
      color: #0B2E83;
    }

    /* Fix icon color on focus via JS */
    .form-input-wrap.focused .form-input-icon { color: #0B2E83; }

    .form-input-wrap.error .form-input {
      border-color: #DC2626;
      background: #FEF2F2;
      box-shadow: 0 0 0 4px rgba(220,38,38,0.07);
    }

    .form-error-text {
      font-size: 11px;
      color: #DC2626;
      font-weight: 500;
      margin-top: 6px;
      display: none;
      align-items: center;
      gap: 4px;
    }
    .form-input-wrap.error + .form-error-text { display: flex; }

    /* Password toggle */
    .pw-toggle {
      position: absolute;
      right: 14px;
      background: none;
      border: none;
      color: #9BA3C4;
      cursor: pointer;
      padding: 4px;
      border-radius: 6px;
      transition: color 0.15s ease;
      display: flex;
      align-items: center;
    }
    .pw-toggle:hover { color: #0B2E83; }

    /* Extras row */
    .form-extras {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 28px;
    }

    .checkbox-label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 13px;
      color: #6B7399;
      font-weight: 500;
      user-select: none;
    }

    .checkbox-input {
      appearance: none;
      width: 18px;
      height: 18px;
      border: 1.5px solid #D1D7EF;
      border-radius: 5px;
      background: white;
      cursor: pointer;
      position: relative;
      transition: all 0.15s ease;
      flex-shrink: 0;
    }

    .checkbox-input:checked {
      background: #0B2E83;
      border-color: #0B2E83;
    }

    .checkbox-input:checked::after {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='10' height='10' fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
    }

    .forgot-link {
      font-size: 13px;
      font-weight: 600;
      color: #0B2E83;
      transition: opacity 0.15s ease;
    }
    .forgot-link:hover { opacity: 0.7; }

    /* Submit button */
    .btn-login {
      width: 100%;
      height: 52px;
      background: linear-gradient(135deg, #0B2E83 0%, #1648B8 100%);
      color: white;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.3px;
      border-radius: 12px;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      position: relative;
      overflow: hidden;
      transition: all 0.25s ease;
      box-shadow: 0 4px 20px rgba(11,46,131,0.35);
      margin-bottom: 24px;
    }

    .btn-login::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .btn-login:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 28px rgba(11,46,131,0.40);
    }
    .btn-login:hover::before { opacity: 1; }

    .btn-login:active {
      transform: translateY(0);
      box-shadow: 0 4px 16px rgba(11,46,131,0.30);
    }

    /* Loading state */
    .btn-login.loading {
      pointer-events: none;
    }

    .btn-login .btn-text { transition: opacity 0.2s ease; }
    .btn-login .btn-arrow { transition: transform 0.2s ease; }
    .btn-login:hover .btn-arrow { transform: translateX(4px); }

    /* Spinner */
    .btn-spinner {
      display: none;
      width: 18px; height: 18px;
      border: 2.5px solid rgba(255,255,255,0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .btn-login.loading .btn-spinner { display: block; }
    .btn-login.loading .btn-text,
    .btn-login.loading .btn-arrow { display: none; }

    /* Divider */
    .form-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
    }
    .form-divider-line {
      flex: 1;
      height: 1px;
      background: #E8EBF4;
    }
    .form-divider-text {
      font-size: 11px;
      font-weight: 500;
      color: #9BA3C4;
      white-space: nowrap;
    }

    /* Trust badges */
    .trust-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      padding-top: 4px;
    }
    .trust-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 500;
      color: #9BA3C4;
    }
    .trust-item svg { color: #9BA3C4; }

    /* Footer note */
    .form-footer {
      margin-top: 32px;
      text-align: center;
      font-size: 11px;
      color: #C4C9E0;
      line-height: 1.6;
    }
    .form-footer a {
      color: #0B2E83;
      font-weight: 600;
    }
    .form-footer a:hover { text-decoration: underline; }

    /* ── Error banner ── */
    .form-alert {
      display: none;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      background: #FEF2F2;
      border: 1px solid rgba(220,38,38,0.2);
      border-radius: 10px;
      margin-bottom: 20px;
      font-size: 13px;
      color: #DC2626;
      font-weight: 500;
      animation: slideDown 0.2s ease;
    }
    .form-alert.show { display: flex; }

    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ══════════════════════════════════════════════════════
       RESPONSIVE — collapse left panel on small screens
    ══════════════════════════════════════════════════════ */
    @media (max-width: 900px) {
      body { overflow-y: auto; }
      .login-shell { flex-direction: column; height: auto; min-height: 100vh; }
      .login-left {
        flex: none;
        padding: 32px 28px;
        min-height: 240px;
      }
      .left-title { font-size: 26px; }
      .left-features, .left-preview { display: none; }
      .left-desc { margin-bottom: 0; }
      .left-headline { margin-top: 24px; margin-bottom: 0; }
      .login-right {
        flex: none;
        padding: 40px 28px 48px;
        justify-content: flex-start;
      }
    }

    @media (max-width: 480px) {
      .login-right { padding: 32px 20px 40px; }
      .form-extras { flex-direction: column; align-items: flex-start; gap: 12px; }
    }