@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Serif+Display&display=swap');
    /* =============================================
       CSS VARIABLES — edit once, applies everywhere
       ============================================= */
    :root {
      --brand-gold:      #F5B800;
      --brand-gold-dark: #D9A200;
      --brand-navy:      #1C2333;
      --brand-navy-soft: #2A3348;
      --bg-page:         #EDF0F5;
      --bg-card:         #FFFFFF;
      --text-primary:    #1C2333;
      --text-muted:      #6B7589;
      --text-link:       #4A5FD6;
      --border:          #D8DCE8;
      --shadow-sm:       0 2px 8px rgba(28,35,51,.08);
      --shadow-md:       0 8px 32px rgba(28,35,51,.14);
      --shadow-lg:       0 20px 60px rgba(28,35,51,.18);
      --radius-sm:       6px;
      --radius-md:       12px;
      --radius-lg:       20px;
      --header-h:        60px;
      --footer-h:        48px;
      --transition:      .22s cubic-bezier(.4,0,.2,1);
      font-family: 'DM Sans', sans-serif;
    }

    /* =============================================
       RESET
       ============================================= */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      background: var(--bg-page);
      color: var(--text-primary);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
    a { text-decoration: none; color: inherit; }

    /* =============================================
       HEADER  (fully self-contained — copy/paste anywhere)
       ============================================= */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 100;
      height: var(--header-h);
      background: var(--brand-navy);
      display: flex;
      align-items: center;
      padding: 0 20px;
      gap: 16px;
      box-shadow: 0 2px 12px rgba(0,0,0,.25);
    }

    /* Logo */
    .header-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
      text-decoration: none;
    }
    .logo-icon {
      width: 34px; height: 34px;
      background: var(--brand-gold);
      border-radius: 8px;
      display: grid;
      place-items: center;
      font-size: 18px;
      font-weight: 700;
      color: var(--brand-navy);
      flex-shrink: 0;
    }
    /* SVG cross */
    .logo-cross { width: 22px; height: 22px; fill: var(--brand-navy); }
    .logo-text { display: flex; flex-direction: column; line-height: 1.15; }
    .logo-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .02em; }
    .logo-sub   { font-size: 10px; color: rgba(255,255,255,.55); font-weight: 400; }

    /* Spacer */
    .header-spacer { flex: 1; }

    /* Top-right navigation links (add as many as you like) */
    .header-links {
      display: flex;
      align-items: center;
      gap: 4px;
      list-style: none;
    }
    .header-links li a {
      color: rgba(255,255,255,.75);
      font-size: 13px;
      font-weight: 500;
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      transition: background var(--transition), color var(--transition);
    }
    .header-links li a:hover { background: rgba(255,255,255,.1); color: #fff; }
    /* Hide on small screens */
    @media (max-width: 600px) { .header-links { display: none; } }

    /* Header icon button base */
    .header-btn {
      position: relative;
      width: 36px; height: 36px;
      border: 1.5px solid rgba(255,255,255,.2);
      border-radius: var(--radius-sm);
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(255,255,255,.8);
      transition: background var(--transition), border-color var(--transition);
      flex-shrink: 0;
    }
    .header-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: #fff; }
    .header-btn svg { width: 18px; height: 18px; }

    /* ---- Dropdown shared styles ---- */
    .dropdown-wrapper { position: relative; }

    .dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      min-width: 180px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      padding: 6px;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px);
      transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
      z-index: 200;
    }
    .dropdown-wrapper:hover .dropdown-menu,
    .dropdown-wrapper:focus-within .dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown-menu a,
    .dropdown-menu button {
      display: flex;
      align-items: center;
      gap: 9px;
      width: 100%;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
      background: transparent;
      border: none;
      cursor: pointer;
      text-align: left;
      transition: background var(--transition);
      text-decoration: none;
    }
    .dropdown-menu a:hover,
    .dropdown-menu button:hover { background: var(--bg-page); }
    .dropdown-menu svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

    .dropdown-divider {
      height: 1px;
      background: var(--border);
      margin: 4px 0;
    }

    /* Danger item */
    .dropdown-menu .danger { color: #E03E3E; }
    .dropdown-menu .danger svg { color: #E03E3E; }
    .dropdown-menu .danger:hover { background: #FFF0F0; }

    /* ---- User dropdown ---- */
    .user-dropdown-header {
      padding: 10px 12px 8px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 4px;
    }
    .user-dropdown-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
    .user-dropdown-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

    /* ---- Hamburger dropdown ---- */
    .hamburger-lines {
      display: flex;
      flex-direction: column;
      gap: 4px;
      pointer-events: none;
    }
    .hamburger-lines span {
      display: block;
      width: 16px;
      height: 1.5px;
      background: currentColor;
      border-radius: 2px;
    }

    .burger-menu { min-width: 220px; }
    .burger-section-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 8px 12px 4px;
    }

    /* =============================================
       MAIN  (isolated from header & footer)
       =============================================
       Use .page-main as a neutral wrapper.
       Add layout utilities like .layout-center,
       .layout-full, .layout-sidebar, etc. to
       reuse for different page types.
       ============================================= */
    .page-main {
      flex: 1;
      /* No inherited padding/margin — child layouts control spacing */
      display: block;
      isolation: isolate; /* own stacking context */
    }

    /* Layout helper: centered content (login, forms, etc.) */
    .layout-center {
      min-height: calc(100vh - var(--header-h) - var(--footer-h));
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 32px 16px;
    }

    /* Layout helper: full-width dashboard */
    .layout-full {
      padding: 24px 20px;
    }

    /* Layout helper: sidebar + content */
    .layout-sidebar {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 0;
      min-height: calc(100vh - var(--header-h) - var(--footer-h));
    }
    @media (max-width: 768px) {
      .layout-sidebar { grid-template-columns: 1fr; }
    }

    /* =============================================
       LOGIN CARD  (page-specific component)
       ============================================= */
    .login-card {
      background: var(--bg-card);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      padding: 44px 40px 36px;
      width: 100%;
      max-width: 420px;
      animation: cardIn .45s cubic-bezier(.22,1,.36,1) both;
    }
    @keyframes cardIn {
      from { opacity: 0; transform: translateY(18px) scale(.98); }
      to   { opacity: 1; transform: none; }
    }
    @media (max-width: 480px) {
      .login-card { padding: 32px 22px 28px; border-radius: var(--radius-md); }
    }

    .card-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 36px;
    }
    .card-brand-icon {
      width: 44px; height: 44px;
      background: var(--brand-gold);
      border-radius: 10px;
      display: grid;
      place-items: center;
    }
    .card-brand-icon svg { width: 26px; height: 26px; fill: var(--brand-navy); }
    .card-brand-title { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
    .card-brand-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

    /* Form */
    .form-field {
      display: flex;
      align-items: center;
      gap: 12px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius-sm);
      padding-left: 14px;
      transition: border-color var(--transition), box-shadow var(--transition);
      background: #fff;
      margin-bottom: 14px;
    }
    .form-field:focus-within {
      border-color: var(--brand-gold);
      box-shadow: 0 0 0 3px rgba(245,184,0,.15);
    }
    .form-field svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; }
    .form-field input {
      flex: 1;
      border: none;
      outline: none;
      background: transparent;
      height: 46px;
      font-size: 14px;
      font-family: inherit;
      color: var(--text-primary);
    }
    .form-field input::placeholder { color: #B0B7C8; }

    .btn-login {
      display: block;
      width: 100%;
      height: 48px;
      background: var(--brand-gold);
      border: none;
      border-radius: var(--radius-sm);
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: var(--brand-navy);
      cursor: pointer;
      margin-top: 6px;
      transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
      box-shadow: 0 4px 16px rgba(245,184,0,.35);
    }
    .btn-login:hover {
      background: var(--brand-gold-dark);
      transform: translateY(-1px);
      box-shadow: 0 6px 22px rgba(245,184,0,.45);
    }
    .btn-login:active { transform: translateY(0); }

    .card-links {
      display: flex;
      justify-content: center;
      gap: 24px;
      margin-top: 20px;
    }
    .card-links a {
      font-size: 13px;
      color: var(--text-link);
      font-weight: 500;
      transition: color var(--transition);
    }
    .card-links a:hover { color: #2A44C0; text-decoration: underline; }

    /* =============================================
       FOOTER  (fully self-contained)
       ============================================= */
    .site-footer {
      height: var(--footer-h);
      background: var(--brand-navy);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      flex-shrink: 0;
    }
    .footer-left {
      font-size: 12px;
      color: rgba(255,255,255,.45);
    }
    .footer-left strong { color: rgba(255,255,255,.7); }
    .footer-right { display: flex; gap: 16px; }
    .footer-right a {
      font-size: 12px;
      color: rgba(255,255,255,.45);
      transition: color var(--transition);
    }
    .footer-right a:hover { color: rgba(255,255,255,.85); }
    @media (max-width: 480px) {
      .footer-right { display: none; }
    }

    /* =============================================
       BACKGROUND DECORATION
       ============================================= */
    .bg-deco {
      pointer-events: none;
      position: fixed;
      inset: 0;
      z-index: 0;
      overflow: hidden;
    }
    .bg-deco::before {
      content: '';
      position: absolute;
      width: 600px; height: 600px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(245,184,0,.07) 0%, transparent 70%);
      top: -100px; left: -150px;
    }
    .bg-deco::after {
      content: '';
      position: absolute;
      width: 500px; height: 500px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(74,95,214,.06) 0%, transparent 70%);
      bottom: -80px; right: -100px;
    }
    .page-main { position: relative; z-index: 1; }

    /* =============================================
       CAPTCHA ROW
       ============================================= */
    .captcha-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
    }

    /* The generated code display */
    .captcha-display {
      flex-shrink: 0;
      min-width: 80px;
      height: 46px;
      background: linear-gradient(135deg, #1C2333 0%, #2A3348 100%);
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      letter-spacing: .22em;
      font-size: 20px;
      font-weight: 700;
      font-family: 'DM Serif Display', serif;
      color: var(--brand-gold);
      user-select: none;
      position: relative;
      overflow: hidden;
      border: 1.5px solid rgba(245,184,0,.25);
      /* noise lines for visual noise */
      box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    }
    /* decorative scratch lines via pseudo-elements */
    .captcha-display::before {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        112deg,
        transparent,
        transparent 6px,
        rgba(255,255,255,.03) 6px,
        rgba(255,255,255,.03) 7px
      );
      pointer-events: none;
    }
    .captcha-display::after {
      content: '';
      position: absolute;
      width: 60%;
      height: 1.5px;
      background: rgba(245,184,0,.3);
      top: 50%;
      left: 20%;
      transform: rotate(-4deg);
      pointer-events: none;
    }

    /* Input field for captcha — reuses .form-field but inline */
    .captcha-row .form-field {
      flex: 1;
      margin-bottom: 0;
    }

    /* Error message */
    .captcha-error {
      display: none;   /* shown via JS */
      align-items: center;
      gap: 7px;
      background: #FFF0F0;
      border: 1.5px solid #FBCACA;
      border-radius: var(--radius-sm);
      padding: 9px 13px;
      margin-bottom: 14px;
      font-size: 13px;
      font-weight: 500;
      color: #C0392B;
      animation: shakeIn .35s cubic-bezier(.36,.07,.19,.97);
    }
    .captcha-error.visible { display: flex; }
    .captcha-error svg { width: 15px; height: 15px; flex-shrink: 0; }

    @keyframes shakeIn {
      0%,100% { transform: translateX(0); }
      20%      { transform: translateX(-6px); }
      40%      { transform: translateX(6px); }
      60%      { transform: translateX(-4px); }
      80%      { transform: translateX(4px); }
    }


/* =============================================
   GLOBAL ALERT BANNER
   ============================================= */
.global-alert {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  border-bottom: 1.5px solid transparent;
  animation: alertSlideDown .3s cubic-bezier(.22,1,.36,1) both;
}
.global-alert.alert-hidden { display: none; }

.global-alert.alert-error   { background: #FFF0F0; border-color: #FBCACA; color: #B91C1C; }
.global-alert.alert-warning { background: #FFFBEB; border-color: #FCD34D; color: #92400E; }
.global-alert.alert-success { background: #F0FDF4; border-color: #86EFAC; color: #166534; }
.global-alert.alert-info    { background: #EFF6FF; border-color: #93C5FD; color: #1D4ED8; }

.global-alert-icon  { flex-shrink: 0; width: 18px; height: 18px; }
.global-alert-text  { flex: 1; }
.global-alert-title { font-weight: 700; margin-bottom: 1px; }
.global-alert-body  { opacity: .85; }

.global-alert-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  color: inherit;
  opacity: .6;
  transition: opacity var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.global-alert-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
.global-alert-close svg { width: 16px; height: 16px; }

@keyframes alertSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

