
    /* ─── Variables ───────────────────────────────────────── */
    :root {
      --heading-font: "Josefin Sans", sans-serif;
      --body-font:    "Poppins", sans-serif;

      /* --brand-red:    #b8282f;
      --brand-dark:   #8b1520;
      --accent-soft:  #f7d1d4;



      --success:  #198754;
      --danger:   #dc3545; */
      /* New Staff Palette: Midnight & Professional Slate */
    --brand-red:    #1e293b; /* Deep Slate Blue */
    --brand-dark:   #0f172a; /* Midnight */
    --accent-soft:  #f1f5f9; /* Soft Grey/Blue */
    
    --success:  #059669; /* Emerald for approvals */
    --danger:   #e11d48;
    --text-primary:   #111111;
      --text-secondary: #444444;
      --text-muted:     #888888;

      --surface:      #ffffff;
      --border:       #e5e7eb;
      --input-bg:     #f9fafb;
    
    --focus-ring: color-mix(in srgb, #3b82f6, transparent 80%);

      --tr: .2s ease;
      /* --focus-ring: color-mix(in srgb, var(--brand-red), transparent 80%); */
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { height: 100%; }

    body {
      font-family: var(--body-font);
      min-height: 100%;
      display: flex;
      background: #0f0f0f;
      overflow: hidden;
    }

    /* ─── Left Panel — Brand ──────────────────────────────── */
    .brand-panel {
      position: relative;
      flex: 1;
      display: none;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px 52px;
      background: linear-gradient(
        160deg,
        #1a0507 0%,
        var(--brand-dark) 35%,
        var(--brand-red) 70%,
        #c94b50 100%
      );
      overflow: hidden;
    }
    @media (min-width: 1024px) { .brand-panel { display: flex; } }

    /* Geometric accent shapes */
    .brand-panel::before {
      content: '';
      position: absolute;
      top: -80px; right: -80px;
      width: 380px; height: 380px;
      border-radius: 50%;
      background: rgba(255,255,255,0.04);
      pointer-events: none;
    }
    .brand-panel::after {
      content: '';
      position: absolute;
      bottom: -60px; left: -60px;
      width: 280px; height: 280px;
      border-radius: 50%;
      background: rgba(255,255,255,0.03);
      pointer-events: none;
    }

    /* Diagonal stripe overlay */
    .brand-stripe {
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.018) 40px,
        rgba(255,255,255,0.018) 41px
      );
      pointer-events: none;
    }

    .brand-top { position: relative; z-index: 1; }
    .brand-logo {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .brand-logo img {
      height: 44px;
      width: auto;
      filter: brightness(0) invert(1);
    }
    .brand-logo-text {
      font-family: var(--heading-font);
      font-size: 1.1rem;
      font-weight: 700;
      color: #fff;
      line-height: 1.2;
      letter-spacing: 0.02em;
    }
    .brand-logo-sub {
      font-size: .68rem;
      opacity: .6;
      font-weight: 300;
      letter-spacing: .04em;
    }

    .brand-mid {
      position: relative;
      z-index: 1;
    }
    .brand-tagline {
      font-family: var(--heading-font);
      font-size: clamp(2rem, 3.5vw, 2.8rem);
      font-weight: 700;
      color: #fff;
      line-height: 1.18;
      letter-spacing: -0.01em;
    }
    .brand-tagline span {
      opacity: .45;
      display: block;
      font-weight: 300;
    }
    .brand-desc {
      margin-top: 18px;
      font-size: .85rem;
      color: rgba(255,255,255,.55);
      line-height: 1.7;
      max-width: 340px;
      font-weight: 300;
    }

    /* Portal chips */
    .portal-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 28px;
    }
    .portal-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.08);
      font-size: .72rem;
      font-weight: 500;
      color: rgba(255,255,255,.75);
      letter-spacing: .02em;
      backdrop-filter: blur(4px);
    }
    .portal-chip i { font-size: .8rem; opacity: .8; }

    .brand-bottom {
      position: relative;
      z-index: 1;
      font-size: .7rem;
      color: rgba(255,255,255,.3);
      font-weight: 300;
    }

    /* ─── Right Panel — Form ──────────────────────────────── */
    .form-panel {
      width: 100%;
      max-width: 480px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      background: var(--surface);
      padding: 48px 44px;
      overflow-y: auto;
    }
    @media (max-width: 1023px) { .form-panel { max-width: 100%; } }
    @media (max-width: 575px)  { .form-panel { padding: 40px 28px; } }

    /* Mobile logo — shown only below lg */
    .mobile-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 36px;
    }
    @media (min-width: 1024px) { .mobile-logo { display: none; } }
    .mobile-logo-mark {
      width: 40px; height: 40px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--brand-red), var(--brand-dark));
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: 1rem; font-weight: 700;
      font-family: var(--heading-font);
    }
    .mobile-logo-text {
      font-family: var(--heading-font);
      font-size: .92rem;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1.2;
    }
    .mobile-logo-sub { font-size: .68rem; color: var(--text-muted); font-weight: 400; }

    /* Views */
    .view { display: none; animation: fadeSlide .22s ease both; }
    .view.active { display: block; }
    @keyframes fadeSlide {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Form headings */
    .form-heading {
      font-family: var(--heading-font);
      font-size: 1.65rem;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.01em;
      line-height: 1.2;
    }
    .form-subheading {
      font-size: .82rem;
      color: var(--text-muted);
      margin-top: 6px;
      font-weight: 400;
      line-height: 1.5;
    }

    /* Divider */
    .form-divider {
      height: 1px;
      background: var(--border);
      margin: 24px 0;
    }

    /* Labels */
    .field-label {
      display: block;
      font-size: .75rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: .04em;
      text-transform: uppercase;
      margin-bottom: 6px;
    }

    /* Input wrapper — for icon inside */
    .input-wrap {
      position: relative;
    }
    .input-icon {
      position: absolute;
      left: 13px;
      top: 50%;
      transform: translateY(-50%);
      font-size: .9rem;
      color: var(--text-muted);
      pointer-events: none;
      transition: color var(--tr);
    }
    .input-wrap:focus-within .input-icon { color: var(--brand-red); }

    .form-input {
      width: 100%;
      padding: 11px 40px 11px 38px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      background: var(--input-bg);
      color: var(--text-primary);
      font-size: .85rem;
      font-family: var(--body-font);
      transition: all var(--tr);
      outline: none;
    }
    .form-input:focus {
      border-color: var(--brand-red);
      background: #fff;
      box-shadow: 0 0 0 4px var(--focus-ring);
    }
    .form-input::placeholder { color: #bbb; }

    /* Password toggle button */
    .pwd-toggle {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: var(--text-muted);
      font-size: .95rem;
      padding: 2px 4px;
      transition: color var(--tr);
      line-height: 1;
    }
    .pwd-toggle:hover { color: var(--brand-red); }

    /* Submit button */
    .btn-submit {
      width: 100%;
      padding: 13px;
      background: linear-gradient(135deg, var(--brand-red), var(--brand-dark));
      color: #fff;
      border: none;
      border-radius: 10px;
      font-family: var(--heading-font);
      font-size: .95rem;
      font-weight: 600;
      letter-spacing: .04em;
      cursor: pointer;
      transition: all var(--tr);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      position: relative;
      overflow: hidden;
    }
    .btn-submit::after {
      content: '';
      position: absolute;
      inset: 0;
      background: rgba(255,255,255,0);
      transition: background var(--tr);
    }
    .btn-submit:hover::after { background: rgba(255,255,255,.07); }
    .btn-submit:active { transform: scale(.99); }

    /* Secondary / ghost button */
    .btn-ghost {
      width: 100%;
      padding: 11px;
      background: transparent;
      color: var(--text-secondary);
      border: 1.5px solid var(--border);
      border-radius: 10px;
      font-family: var(--body-font);
      font-size: .82rem;
      font-weight: 500;
      cursor: pointer;
      transition: all var(--tr);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
    }
    .btn-ghost:hover { border-color: var(--brand-red); color: var(--brand-red); background: var(--accent-soft); }

    /* Link styled text */
    .form-link {
      color: var(--brand-red);
      font-weight: 600;
      cursor: pointer;
      background: none;
      border: none;
      font-family: var(--body-font);
      font-size: inherit;
      padding: 0;
      transition: opacity var(--tr);
    }
    .form-link:hover { opacity: .7; }

    /* Forgot row */
    .forgot-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 6px;
    }
    .forgot-row button {
      font-size: .76rem;
      color: var(--text-muted);
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
      font-family: var(--body-font);
      transition: color var(--tr);
    }
    .forgot-row button:hover { color: var(--brand-red); }

    /* Role selector pills */
    .role-pills {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 22px;
    }
    .role-pill {
      flex: 1;
      min-width: 80px;
      padding: 9px 10px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      background: var(--input-bg);
      cursor: pointer;
      text-align: center;
      transition: all var(--tr);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .role-pill:hover {
      border-color: color-mix(in srgb, var(--brand-red), transparent 55%);
      background: var(--accent-soft);
    }
    .role-pill.selected {
      border-color: var(--brand-red);
      background: var(--accent-soft);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }
    .role-pill i {
      font-size: 1.1rem;
      color: var(--text-muted);
      transition: color var(--tr);
    }
    .role-pill.selected i { color: var(--brand-red); }
    .role-pill span {
      font-size: .7rem;
      font-weight: 600;
      color: var(--text-muted);
      font-family: var(--body-font);
      letter-spacing: .02em;
      transition: color var(--tr);
      text-transform: uppercase;
    }
    .role-pill.selected span { color: var(--brand-red); }
    /* Hidden radio inputs backing the role pills */
    .role-pill input[type="radio"] { display: none; }

    /* Field group spacing */
    .field-group { margin-bottom: 18px; }
    .field-group:last-of-type { margin-bottom: 0; }

    /* Alert banner (for JS to fill) */
    .auth-alert {
      display: none;
      padding: 10px 14px;
      border-radius: 9px;
      font-size: .8rem;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 16px;
    }
    .auth-alert.error   { display: flex; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
    .auth-alert.success { display: flex; background: #e6f9f0; color: #166534; border: 1px solid #bbf7d0; }

    /* Bottom note */
    .form-footer-note {
      margin-top: 28px;
      text-align: center;
      font-size: .72rem;
      color: var(--text-muted);
      line-height: 1.6;
    }
    .form-footer-note a { color: var(--brand-red); text-decoration: none; font-weight: 500; }

    /* Preloader overlay */
    #preloader {
      position: fixed;
      inset: 0;
      background: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity .6s ease;
    }
    #preloader.fade-out { opacity: 0; pointer-events: none; }
    .preloader-logo {
      font-family: var(--heading-font);
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--brand-red);
      margin-bottom: 20px;
    }
    .preloader-ring {
      width: 36px; height: 36px;
      border: 3px solid var(--accent-soft);
      border-top-color: var(--brand-red);
      border-radius: 50%;
      animation: spin .8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ─── Responsive tweaks ───────────────────────────────── */
    @media (max-width: 400px) {
      .form-panel { padding: 32px 20px; }
      .form-heading { font-size: 1.4rem; }
      .role-pills { gap: 6px; }
    }


   /* 1. Hide the browser's native password reveal icon (The "Ghost Eye") */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}

/* 2. Ensure the wrap is the reference point */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* 3. Make sure the button is ABOVE the input and centered */
.pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5; /* Sit on top of the input */
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
