/* ============================================================
   HRMS PORTAL — Main Stylesheet  v4.0
   Premium Corporate · Enterprise Grade · Horizontal Navigation
   Design System: Slate × Indigo × White
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Primary — Deep Indigo (enterprise premium) */
  --primary:        #4f46e5;
  --primary-dark:   #4338ca;
  --primary-mid:    #6366f1;
  --primary-light:  #eef2ff;
  --primary-rgb:    79, 70, 229;

  /* Accent Gold — luxury brand continuity */
  --gold:           #d4a843;
  --gold-dark:      #b8862a;
  --gold-light:     #fefce8;
  --gold-mid:       #f59e0b;
  --gold-glow:      rgba(212,168,67,.20);

  /* Navigation */
  --nav-top:        #0f172a;
  --nav-bar:        #ffffff;
  --nav-bar-border: #e2e8f0;
  --nav-item-hover: #f8fafc;
  --nav-item-active:#eef2ff;
  --nav-text:       #64748b;
  --nav-text-hover: #0f172a;
  --nav-text-active:#4f46e5;

  --ticker-bg:      #0f172a;
  --ticker-text:    #94a3b8;

  /* Surfaces — cool, clean */
  --bg:             #f1f5f9;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --surface-3:      #f1f5f9;
  --border:         #e2e8f0;
  --border-dark:    #cbd5e1;

  /* Typography — slate system */
  --text-1:         #0f172a;
  --text-2:         #475569;
  --text-3:         #94a3b8;
  --text-4:         #cbd5e1;
  --text-inv:       #ffffff;

  /* Semantic */
  --success:        #059669;
  --success-light:  #ecfdf5;
  --success-border: #a7f3d0;
  --warning:        #d97706;
  --warning-light:  #fffbeb;
  --warning-border: #fde68a;
  --danger:         #dc2626;
  --danger-light:   #fef2f2;
  --danger-border:  #fecaca;
  --info:           #0284c7;
  --info-light:     #f0f9ff;
  --info-border:    #bae6fd;

  /* Layout heights */
  --topbar-h:       58px;
  --navbar-h:       80px;
  --navbar-row:     40px;
  --ticker-h:       44px;
  --header-total:   182px;

  /* Geometry */
  --radius-sm:      5px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --radius-2xl:     24px;

  /* Shadows — cool, enterprise-precise */
  --shadow-sm:      0 1px 2px rgba(15,23,42,.06);
  --shadow:         0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:      0 4px 12px rgba(15,23,42,.10), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg:      0 10px 30px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.05);
  --shadow-xl:      0 20px 50px rgba(15,23,42,.15), 0 8px 16px rgba(15,23,42,.06);
  --shadow-gold:    0 4px 20px rgba(212,168,67,.28);
  --shadow-primary: 0 4px 16px rgba(79,70,229,.28);
  --shadow-inset:   inset 0 1px 2px rgba(15,23,42,.06);

  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-mono:      'JetBrains Mono', 'Consolas', monospace;

  --transition:     150ms cubic-bezier(.4,0,.2,1);
  --transition-md:  200ms cubic-bezier(.4,0,.2,1);

  /* Legacy compat */
  --text:           #0f172a;
  --secondary:      #1e293b;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--text-1);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ── Layout ────────────────────────────────────────────────── */
.layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ═══════════════════════════════════════════════════════════
   TOPBAR — Premium dark identity bar
═══════════════════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: linear-gradient(135deg, #080e1c 0%, #0d1726 55%, #0f1e35 100%);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 20px rgba(0,0,0,.4);
}

/* ── Brand ──────────────────────────────────────────────────── */
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  transition: opacity .15s;
}
.topbar-brand:hover { text-decoration: none; opacity: .85; }
.topbar-brand-icon { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.topbar-brand-name { font-size: .93rem; font-weight: 700; color: #fff; letter-spacing: .01em; line-height: 1.2; }
.topbar-brand-name span {
  display: block; font-size: .56rem; font-weight: 500;
  color: rgba(212,168,67,.65); letter-spacing: .14em;
  text-transform: uppercase; margin-top: 2px;
}

/* ── Divider pill ────────────────────────────────────────────── */
.topbar-divider {
  width: 1px; height: 24px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

/* ── Search bar ─────────────────────────────────────────────── */
.topbar-search {
  flex: 1; max-width: 360px; margin: 0 auto;
  display: flex; align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  height: 34px;
  transition: all .2s ease;
  position: relative;
  backdrop-filter: blur(8px);
}
.topbar-search.focused {
  background: rgba(255,255,255,.10);
  border-color: rgba(212,168,67,.45);
  box-shadow: 0 0 0 3px rgba(212,168,67,.10), 0 2px 12px rgba(0,0,0,.2);
}
.topbar-search-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  color: rgba(148,163,184,.6); flex-shrink: 0; pointer-events: none;
  transition: color .2s;
}
.topbar-search.focused .topbar-search-icon { color: rgba(212,168,67,.8); }
.topbar-search input {
  border: none; background: none;
  font-size: .82rem; color: rgba(255,255,255,.92);
  outline: none; flex: 1; height: 100%;
  font-family: var(--font); padding: 0;
  caret-color: var(--gold);
}
.topbar-search input::placeholder { color: rgba(100,130,165,.65); font-size: .81rem; }
.topbar-search-kbd {
  margin-right: 9px; padding: 2px 6px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px; font-size: .6rem; font-weight: 600;
  color: rgba(148,163,184,.5); white-space: nowrap; font-family: var(--font);
  pointer-events: none;
}
.topbar-search.focused .topbar-search-kbd { display: none; }

/* ── Right controls ─────────────────────────────────────────── */
.topbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* ── Icon buttons (bell / team) ──────────────────────────────── */
.topbar-bell {
  position: relative; width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px; border: 1px solid transparent;
  background: rgba(255,255,255,.06);
  color: rgba(148,163,184,.75);
  cursor: pointer;
  transition: all .18s ease;
}
.topbar-bell:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.10);
  color: #fff;
}
.topbar-bell-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 15px; height: 15px; padding: 0 3px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; font-size: .58rem; font-weight: 800;
  border-radius: 99px; border: 1.5px solid #080e1c;
  display: grid; place-items: center; line-height: 1;
  animation: bellPulse 2.4s ease infinite;
}
@keyframes bellPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50%      { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}
.topbar-notif-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; text-decoration: none;
  transition: background .12s; border-bottom: 1px solid var(--border);
}
.topbar-notif-item:last-of-type { border-bottom: none; }
.topbar-notif-item:hover { background: var(--surface-2); text-decoration: none; }
.topbar-notif-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Avatar ring ────────────────────────────────────────────── */
.topbar-avatar-ring {
  width: var(--ring-size, 36px); height: var(--ring-size, 36px);
  border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, #d4a843, #a67c3e, #d4a843);
  flex-shrink: 0;
}
.topbar-avatar {
  width: var(--avatar-size, 30px); height: var(--avatar-size, 30px);
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  color: var(--gold);
  display: grid; place-items: center;
  font-size: .73rem; font-weight: 800;
  overflow: hidden; letter-spacing: .03em;
  border: 2px solid #0f172a;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── User button ────────────────────────────────────────────── */
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px; padding: 4px 9px 4px 4px;
  cursor: pointer; transition: all .18s ease;
  max-width: 200px;
}
.topbar-user-btn:hover {
  background: rgba(255,255,255,.11);
  border-color: rgba(212,168,67,.3);
}
.topbar-user-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.topbar-user-name {
  font-size: .78rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .01em;
}
.topbar-user-role {
  font-size: .62rem; color: rgba(212,168,67,.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.topbar-user-chevron { color: rgba(148,163,184,.45); flex-shrink: 0; transition: transform .2s; }
.topbar-user-btn:hover .topbar-user-chevron { color: rgba(212,168,67,.8); transform: rotate(180deg); }

/* ── User menu header ────────────────────────────────────────── */
.topbar-user-menu-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

/* ── Menu items ──────────────────────────────────────────────── */
.dropdown-item-danger { color: #ef4444 !important; }
.dropdown-item-danger:hover { background: #fef2f2 !important; color: #dc2626 !important; }
.dropdown-item-danger svg { stroke: #ef4444; }
.dropdown-item { display: flex !important; align-items: center; gap: 9px; }
.dropdown-item svg { opacity: .5; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION BAR — White, clean, enterprise
═══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  height: var(--navbar-h);
  background: var(--nav-bar);
  border-bottom: 1px solid var(--nav-bar-border);
  z-index: 190;
  display: flex; align-items: stretch;
  padding: 0 20px;
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.nav-list {
  display: flex; flex-wrap: wrap; align-content: stretch;
  list-style: none; flex: 1; gap: 0;
}
.nav-row-break { flex-basis: 100%; height: 0; overflow: hidden; }
.nav-list-item {
  position: relative; display: flex; align-items: stretch;
  height: var(--navbar-row);
}
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px;
  color: var(--nav-text);
  font-size: .775rem; font-weight: 500; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  letter-spacing: .01em;
  border-radius: 0;
}
.nav-link:hover {
  background: var(--nav-item-hover);
  color: var(--nav-text-hover);
  text-decoration: none;
}
.nav-link.active {
  color: var(--nav-text-active);
  border-bottom-color: var(--primary);
  background: var(--nav-item-active);
  font-weight: 600;
}
.nav-link .nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: .55; transition: opacity var(--transition);
}
.nav-link:hover .nav-icon { opacity: .85; }
.nav-link.active .nav-icon { opacity: 1; color: var(--primary); }
.nav-link .nav-caret {
  display: inline-flex; align-items: center;
  opacity: .4; margin-left: 1px;
  transition: transform var(--transition);
}
.nav-list-item:hover .nav-caret { transform: rotate(180deg); opacity: .7; }
.nav-badge {
  background: var(--danger); color: #fff;
  font-size: .58rem; padding: 1px 5px;
  border-radius: 8px; font-weight: 700; line-height: 1.5;
}

/* Mid-row separator */
.navbar::after {
  content: '';
  position: absolute;
  top: var(--navbar-row);
  left: 0; right: 0; height: 1px;
  background: var(--nav-bar-border);
  pointer-events: none;
}

/* Nav dropdown */
.nav-dropdown {
  position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 215px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s, transform .14s, visibility .14s;
  z-index: 300;
}
.nav-list-item:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  font-size: .835rem; color: var(--text-2);
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}
.nav-dropdown-item:hover { background: var(--surface-2); color: var(--text-1); text-decoration: none; }
.nav-dropdown-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 2px solid var(--primary);
  padding-left: 12px;
}
.nav-dropdown-item .ddi-icon { display:inline-flex;align-items:center;justify-content:center;width:18px;flex-shrink:0;opacity:.5; }
.nav-dropdown-item:hover .ddi-icon { opacity: .8; }
.nav-dropdown-item.active .ddi-icon { opacity: 1; color: var(--primary); }
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENT TICKER
═══════════════════════════════════════════════════════════ */
.ticker-bar {
  position: fixed;
  top: calc(var(--topbar-h) + var(--navbar-h)); left: 0; right: 0;
  height: var(--ticker-h);
  background: var(--ticker-bg);
  border-bottom: 1px solid rgba(255,255,255,.05);
  z-index: 180;
  display: flex; align-items: center; overflow: hidden;
}
.ticker-label {
  flex-shrink: 0; padding: 0 16px;
  font-size: .67rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  height: 100%;
  display: flex; align-items: center; gap: 7px;
  border-right: 1px solid rgba(255,255,255,.12);
  min-width: 104px; justify-content: center;
}
.ticker-label svg { flex-shrink: 0; }
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-items {
  display: flex; gap: 0;
  animation: ticker-scroll 55s linear infinite;
  will-change: transform; white-space: nowrap;
}
.ticker-items:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 32px 0 0; font-size: .8rem; color: var(--ticker-text);
  flex-shrink: 0;
}
.ticker-sep { color: var(--gold); opacity: .35; padding-right: 32px; font-size: 1rem; }
.ticker-priority-important { color: #fbbf24; font-weight: 600; }
.ticker-priority-urgent    { color: #f87171; font-weight: 700; }
.ticker-actions {
  flex-shrink: 0; display: flex; align-items: center; gap: 0;
  border-left: 1px solid rgba(255,255,255,.07); height: 100%;
}
.ticker-manage {
  flex-shrink: 0; padding: 0 14px;
  font-size: .7rem; font-weight: 600; color: var(--gold);
  height: 100%; display: flex; align-items: center;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; letter-spacing: .02em;
  border-left: 1px solid rgba(255,255,255,.07);
}
.ticker-manage:hover { background: rgba(212,168,67,.10); color: #fef08a; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════ */
.main {
  margin-top: var(--header-total);
  flex: 1; display: flex; flex-direction: column;
  min-height: calc(100vh - var(--header-total));
}
.page-content {
  flex: 1; padding: 24px 28px;
  width: 100%; max-width: 1700px;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 14px; flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.2rem; font-weight: 700; color: var(--text-1);
  margin: 0; letter-spacing: -.01em;
}
.page-header .breadcrumb { font-size: .76rem; color: var(--text-3); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   DROPDOWN
═══════════════════════════════════════════════════════════ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 215px; background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 400; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: all var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 15px; font-size: .84rem; color: var(--text-1);
  cursor: pointer; transition: background var(--transition); text-decoration: none;
}
.dropdown-item:hover { background: var(--surface-2); text-decoration: none; color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-header { padding: 10px 15px 6px; font-size: .72rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ═══════════════════════════════════════════════════════════
   FLASH MESSAGES
═══════════════════════════════════════════════════════════ */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: .865rem; font-weight: 500; line-height: 1.5;
  border-width: 1px; border-style: solid;
}
.flash-success { background: var(--success-light); border-color: var(--success-border); color: #065f46; }
.flash-error   { background: var(--danger-light); border-color: var(--danger-border); color: #991b1b; }
.flash-warning { background: var(--warning-light); border-color: var(--warning-border); color: #92400e; }
.flash-info    { background: var(--info-light); border-color: var(--info-border); color: #075985; }
.flash-close   { margin-left: auto; cursor: pointer; opacity: .55; background: none; border: none; font-size: 1rem; transition: opacity .15s; }
.flash-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 12px;
}
.card-title {
  font-size: .875rem; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -.005em;
}
.card-body { padding: 18px; }
.card-footer {
  padding: 11px 18px; border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ═══════════════════════════════════════════════════════════
   STAT CARDS — Premium Enterprise Style
═══════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition-md), transform var(--transition-md), border-color var(--transition-md);
  cursor: pointer;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-dark); }
.stat-card-accent { height: 3px; width: 100%; }
.stat-card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.stat-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.stat-card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-icon-blue   { background: #eef2ff; color: var(--primary); }
.stat-icon-green  { background: #ecfdf5; color: #059669; }
.stat-icon-amber  { background: #fffbeb; color: #d97706; }
.stat-icon-red    { background: #fef2f2; color: #dc2626; }
.stat-icon-cyan   { background: #f0f9ff; color: #0284c7; }
.stat-icon-purple { background: #faf5ff; color: #7c3aed; }
.stat-icon-gold   { background: var(--gold-light); color: var(--gold-dark); }
.stat-icon-slate  { background: #f8fafc; color: #475569; }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--text-1); line-height: 1; letter-spacing: -.03em; }
.stat-label { font-size: .73rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-link { font-size: .72rem; color: var(--text-3); margin-top: 8px; }
.stat-change { font-size: .72rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
table, table.table { width: 100%; border-collapse: collapse; font-size: .855rem; }
thead th, table.table thead th {
  background: var(--surface-2);
  padding: 10px 14px;
  text-align: left; font-size: .7rem; font-weight: 700;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: .07em; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td, table.table tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-1); vertical-align: middle;
}
tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td, table.table tbody tr:hover td { background: #f8faff; }

/* ═══════════════════════════════════════════════════════════
   BADGES & STATUS PILLS
═══════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 100px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.badge-green  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-red    { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-amber  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-blue   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-gray   { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.badge-purple { background: #faf5ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-cyan   { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.badge-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-slate  { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

.status-pending   { background:#fffbeb;color:#92400e;border:1px solid #fde68a;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }
.status-approved  { background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }
.status-rejected  { background:#fef2f2;color:#991b1b;border:1px solid #fecaca;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }
.status-cancelled { background:#f8fafc;color:#64748b;border:1px solid #e2e8f0;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }
.status-active    { background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }
.status-terminated{ background:#fef2f2;color:#991b1b;border:1px solid #fecaca;padding:3px 9px;border-radius:100px;font-size:.68rem;font-weight:700; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS — Premium, layered depth
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: var(--radius);
  font-size: .855rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap; text-decoration: none;
  font-family: var(--font); line-height: 1.4;
  letter-spacing: .005em;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-sm  { padding: 5px 11px; font-size: .79rem; }
.btn-lg  { padding: 10px 22px; font-size: .975rem; }
.btn-icon { padding: 7px; gap: 0; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(79,70,229,.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 3px 8px rgba(79,70,229,.30);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-dark); }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); box-shadow: 0 1px 2px rgba(5,150,105,.2); }
.btn-success:hover { background: #047857; box-shadow: 0 3px 8px rgba(5,150,105,.25); transform: translateY(-1px); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: 0 1px 2px rgba(220,38,38,.2); }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 3px 8px rgba(220,38,38,.25); transform: translateY(-1px); }
.btn-warning   { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #b45309; transform: translateY(-1px); }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost     { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text-1); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; border-color: transparent;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { box-shadow: 0 6px 20px rgba(212,168,67,.35); transform: translateY(-1px); }
.w-full { width: 100%; display: flex; justify-content: center; }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
label .required { color: var(--danger); margin-left: 2px; }
.form-control,
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=tel], input[type=url], input[type=search],
select, textarea {
  display: block; width: 100%; padding: 7px 11px;
  font-size: .855rem; font-family: var(--font);
  color: var(--text-1); background: var(--surface);
  border: 1px solid var(--border-dark); border-radius: var(--radius);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-control:hover:not(:focus), input:hover:not(:focus), select:hover:not(:focus) {
  border-color: var(--border-dark);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
textarea { resize: vertical; min-height: 100px; }
select { cursor: pointer; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); flex: 1; }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
.form-text { font-size: .77rem; color: var(--text-3); margin-top: 4px; }
.form-error { font-size: .77rem; color: var(--danger); margin-top: 4px; font-weight: 500; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ═══════════════════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════════════════ */
.avatar { border-radius: 50%; object-fit: cover; background: var(--primary); display: inline-grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.avatar-xs  { width: 24px; height: 24px; font-size: .62rem; }
.avatar-sm  { width: 32px; height: 32px; font-size: .72rem; }
.avatar-md  { width: 40px; height: 40px; font-size: .84rem; }
.avatar-lg  { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl  { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ═══════════════════════════════════════════════════════════
   EMPLOYEE CARD (inline / table)
═══════════════════════════════════════════════════════════ */
.employee-card { display: flex; align-items: center; gap: 11px; }
.employee-card-info { min-width: 0; }
.employee-card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .875rem; }
.employee-card-sub  { font-size: .73rem; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════
   PROGRESS
═══════════════════════════════════════════════════════════ */
.progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width .5s ease; }
.progress-bar.green { background: var(--success); }
.progress-bar.amber { background: var(--warning); }
.progress-bar.red   { background: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   LEAVE BALANCE GRID
═══════════════════════════════════════════════════════════ */
.leave-balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 11px; margin-bottom: 20px; }
.leave-balance-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 15px;
  border-top: 3px solid var(--primary); box-shadow: var(--shadow-sm);
}
.leave-balance-type  { font-size: .74rem; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.leave-balance-days  { font-size: 1.55rem; font-weight: 800; color: var(--text-1); line-height: 1; letter-spacing: -.02em; }
.leave-balance-label { font-size: .69rem; color: var(--text-3); }
.leave-balance-bar   { margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-2); }
.pagination-links { display: flex; gap: 3px; }
.page-link { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .79rem; color: var(--text-2); cursor: pointer; background: var(--surface); text-decoration: none; transition: all var(--transition); }
.page-link:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal, .modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-size: .975rem; font-weight: 700; color: var(--text-1); letter-spacing: -.01em; }
.modal-close {
  background: none; border: none; font-size: 1.1rem; cursor: pointer;
  color: var(--text-3); padding: 4px 6px; border-radius: var(--radius-sm);
  transition: background .12s, color .12s;
}
.modal-close:hover { color: var(--text-1); background: var(--surface-2); }
.modal-body { padding: 18px 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

/* ═══════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════ */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 20px; }
.tab {
  padding: 9px 16px; font-size: .855rem; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  text-decoration: none; transition: all var(--transition); white-space: nowrap;
}
.tab:hover { color: var(--primary); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: grid; place-items: center; flex-shrink: 0; font-size: .8rem; color: var(--text-2); z-index: 1; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-title { font-size: .855rem; font-weight: 500; }
.timeline-time  { font-size: .73rem; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════
   SECTION TITLES
═══════════════════════════════════════════════════════════ */
.section-title {
  font-size: .9rem; font-weight: 700; color: var(--text-1);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex; align-items: center; gap: 8px;
}
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ═══════════════════════════════════════════════════════════
   AUTH LAYOUT — Navy × Gold Edition
   Gold:   #c8a96e (base)  #e2c17a (light)  #a07840 (dark)
   Navy:   #0b1628 (deep)  #0f1e35 (mid)    #16304f (accent)
   Cream:  #fdf8f0 (right bg)
═══════════════════════════════════════════════════════════ */
.auth-body { background: #0b1628; }

/* Outer wrap */
.auth-wrap { min-height: 100vh; display: flex; }

/* ── LEFT PANEL ─────────────────────────────────────────── */
.auth-left {
  width: 440px; flex-shrink: 0;
  background: linear-gradient(170deg, #0b1628 0%, #0f1e35 55%, #0c1a2c 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  border-right: 1px solid rgba(200,169,110,.08);
}

/* Animated gold blobs */
.auth-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.auth-blob-1 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(200,169,110,.18) 0%, transparent 65%);
  top: -100px; left: -80px;
  animation: authBlob1 14s ease-in-out infinite alternate;
}
.auth-blob-2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(200,169,110,.10) 0%, transparent 65%);
  bottom: 40px; right: -50px;
  animation: authBlob2 17s ease-in-out infinite alternate;
}
.auth-blob-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(22,48,79,.6) 0%, transparent 65%);
  top: 42%; left: 25%;
  animation: authBlob3 11s ease-in-out infinite alternate;
}
@keyframes authBlob1 { from { transform: translate(0,0) scale(1); } to { transform: translate(28px,36px) scale(1.08); } }
@keyframes authBlob2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-18px,-28px) scale(1.06); } }
@keyframes authBlob3 { from { transform: translate(0,0); } to { transform: translate(12px,-18px); } }

/* Diagonal line grid */
.auth-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(200,169,110,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,.04) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Brand top */
.auth-brand-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
}
.auth-brand-logo {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(145deg, #c8a96e 0%, #a07840 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(200,169,110,.4), 0 0 0 1px rgba(200,169,110,.25);
}
.auth-brand-name {
  font-size: .96rem; font-weight: 700; color: #e8d5b0; letter-spacing: .015em;
}

/* Body */
.auth-left-body { position: relative; z-index: 2; }
.auth-tagline-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .66rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: #c8a96e;
  background: rgba(200,169,110,.1);
  border: 1px solid rgba(200,169,110,.22);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 22px;
}
.auth-headline {
  font-family: var(--font-display);
  font-size: 2.15rem; font-weight: 700; color: #f0e8d6;
  line-height: 1.2; margin-bottom: 16px; letter-spacing: -.025em;
}
.auth-headline em { font-style: italic; color: #c8a96e; }
.auth-tagline { font-size: .83rem; color: #4a6280; line-height: 1.8; max-width: 310px; margin-bottom: 28px; }

/* Stats strip */
.auth-stats-row {
  display: flex; align-items: center;
  background: rgba(200,169,110,.06);
  border: 1px solid rgba(200,169,110,.14);
  border-radius: 12px; padding: 14px 0;
}
.auth-stat { flex: 1; text-align: center; }
.auth-stat-num { display: block; font-size: .98rem; font-weight: 800; color: #c8a96e; letter-spacing: -.01em; }
.auth-stat-lbl { display: block; font-size: .62rem; color: #3d5268; margin-top: 3px; text-transform: uppercase; letter-spacing: .07em; }
.auth-stat-divider { width: 1px; height: 30px; background: rgba(200,169,110,.18); }

/* Feature list */
.auth-features { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.auth-feature { display: flex; align-items: center; gap: 11px; font-size: .79rem; color: #3d5268; }
.auth-feature-icon {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: rgba(200,169,110,.1);
  border: 1px solid rgba(200,169,110,.2);
  display: flex; align-items: center; justify-content: center;
  color: #c8a96e;
}

.auth-left-foot {
  position: relative; z-index: 2;
  font-size: .69rem; color: #1e3050;
  padding-top: 18px; border-top: 1px solid rgba(200,169,110,.1);
}

/* ── RIGHT PANEL ────────────────────────────────────────── */
.auth-right {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
  overflow: hidden;
}

/* Photo layer */
.auth-right-photo {
  position: absolute; inset: 0; pointer-events: none;
  background:
    url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1400&q=85')
    center/cover no-repeat;
}

/* Gradient overlay — dark-navy tint for readability + gold warmth */
.auth-right-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(11,22,40,.82) 0%,
    rgba(15,30,53,.72) 40%,
    rgba(10,18,34,.78) 100%
  );
}

/* ── DECORATIVE FLOATING STAT CARDS ─────────────────────── */
.auth-deco-cards { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* Shared deco card style */
.auth-deco {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 12px 16px;
  min-width: 180px; max-width: 220px;
  box-shadow: 0 8px 28px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.15);
  animation: authDecoFloat 6s ease-in-out infinite alternate;
}
.auth-deco-tl { top: 9%;  left: 6%;  animation-delay: 0s; }
.auth-deco-tr { top: 11%; right: 6%; animation-delay: 1.5s; }
.auth-deco-bl { bottom: 12%; left: 6%;  animation-delay: 3s; }
.auth-deco-br { bottom: 10%; right: 6%; animation-delay: 4.5s; }

@keyframes authDecoFloat {
  from { transform: translateY(0px); }
  to   { transform: translateY(-8px); }
}

.auth-deco-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.auth-deco-num {
  font-size: .82rem; font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.2;
}
.auth-deco-lbl { font-size: .67rem; color: rgba(255,255,255,.55); margin-top: 2px; }
.auth-deco-badge {
  margin-left: auto; font-size: .6rem; font-weight: 700;
  padding: 3px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em;
}
.auth-deco-badge-green {
  background: rgba(16,185,129,.25); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3);
  animation: authPulse 2s ease-in-out infinite;
}
@keyframes authPulse {
  0%,100% { opacity: 1; } 50% { opacity: .6; }
}

/* ══════════════════════════════════════════════════════════
   LOGIN CARD — Glassmorphism on dark photo
══════════════════════════════════════════════════════════ */
.lg-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 428px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow:
    0 0 0 1px rgba(200,169,110,.18),
    0 4px 8px rgba(0,0,0,.18),
    0 20px 48px rgba(0,0,0,.30),
    0 48px 80px rgba(0,0,0,.22);
  overflow: hidden;
}

/* Gold accent bar */
.lg-card-accent {
  height: 5px;
  background: linear-gradient(90deg, #a07840 0%, #c8a96e 35%, #e2c17a 65%, #c8a96e 100%);
}

/* Side gold rule */
.lg-card::before {
  content: '';
  position: absolute; left: 0; top: 5px; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(200,169,110,.55) 0%, rgba(200,169,110,.0) 100%);
  pointer-events: none;
}

/* Inner padding */
.lg-header,
.lg-alert,
form,
.lg-security-note { padding-left: 36px; padding-right: 36px; }
.lg-alert { margin-left: 36px; margin-right: 36px; padding-left: 14px; padding-right: 14px; }

/* Card header */
.lg-header {
  display: flex; align-items: center; gap: 16px;
  padding-top: 32px; padding-bottom: 24px;
  border-bottom: 1px solid #f5ede0;
  background: linear-gradient(135deg, #fffdf9 0%, #fdf8f0 100%);
}
.lg-avatar {
  width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0;
  background: linear-gradient(145deg, #0f1e35 0%, #16304f 100%);
  display: flex; align-items: center; justify-content: center;
  color: #c8a96e;
  box-shadow: 0 0 0 1px rgba(200,169,110,.25), 0 6px 16px rgba(11,22,40,.25);
}
.lg-title {
  font-size: 1.25rem; font-weight: 800; color: #0b1628;
  letter-spacing: -.03em; margin: 0 0 4px;
}
.lg-subtitle { font-size: .79rem; color: #7a6e60; margin: 0; line-height: 1.5; }
.lg-subtitle strong { color: #4a3c28; font-weight: 700; }

/* Alerts */
.lg-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding-top: 12px; padding-bottom: 12px;
  margin-top: 20px;
  border-radius: 10px; font-size: .82rem; line-height: 1.5;
}
.lg-alert-error  { background: #fef7f7; color: #922; border: 1px solid #f8d0d0; }
.lg-alert-success { background: #f4fbf6; color: #266038; border: 1px solid #b8e8c8; }
.lg-alert-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: inherit; opacity: .55; padding: 0; flex-shrink: 0; padding-top: 1px;
}
.lg-alert-close:hover { opacity: 1; }

/* Form area */
form { padding-top: 24px; padding-bottom: 0; background: #fff; }

/* Field */
.lg-field-wrap { margin-bottom: 20px; }
.lg-label {
  display: block; font-size: .69rem; font-weight: 800;
  color: #0b1628; text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 8px;
}
.lg-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lg-label-row .lg-label { margin-bottom: 0; }
.lg-forgot {
  font-size: .74rem; font-weight: 600; color: #a07840;
  text-decoration: none; transition: color .18s;
}
.lg-forgot:hover { color: #c8a96e; text-decoration: underline; }

/* Input group */
.lg-input-group {
  position: relative; display: flex; align-items: center;
  background: #fdf8f2;
  border: 1.5px solid #e8d8c4;
  border-radius: 11px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-input-group.focused {
  border-color: #c8a96e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,169,110,.18);
}
.lg-input-icon {
  padding: 0 12px 0 15px;
  color: #b8a08a; flex-shrink: 0;
  display: flex; align-items: center;
  transition: color .2s;
}
.lg-input-group.focused .lg-input-icon { color: #a07840; }
.lg-input {
  flex: 1; height: 48px; font-size: .89rem;
  color: #0b1628; background: transparent; border: none; outline: none;
  font-family: inherit; padding-right: 14px;
}
.lg-input::placeholder { color: #c8b89a; }
.lg-input.lg-input-pw { padding-right: 0; }

/* Eye toggle */
.lg-eye-btn {
  background: none; border: none; cursor: pointer;
  color: #b8a08a; padding: 0 14px;
  display: flex; align-items: center; transition: color .2s;
}
.lg-eye-btn:hover { color: #a07840; }

/* Remember me */
.lg-options-row { display: flex; align-items: center; margin-bottom: 22px; }
.lg-remember {
  display: flex; align-items: center; gap: 9px;
  font-size: .79rem; color: #6b5e4e; cursor: pointer; user-select: none;
}
.lg-checkbox { display: none; }
.lg-checkbox-box {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid #d4b896; background: #fdf8f2;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.lg-checkbox:checked + .lg-checkbox-box { background: #0f1e35; border-color: #c8a96e; }
.lg-checkbox:checked + .lg-checkbox-box svg { display: block; }
.lg-checkbox-box svg { display: none; }

/* Submit button */
.lg-submit {
  width: 100%; height: 50px;
  background: linear-gradient(145deg, #0f1e35 0%, #16304f 100%);
  color: #e8d5b0; border: none; border-radius: 11px;
  font-size: .93rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 1px rgba(200,169,110,.25),
    0 4px 16px rgba(11,22,40,.3),
    inset 0 1px 0 rgba(200,169,110,.12);
  transition: transform .2s, box-shadow .2s, background .2s;
  margin-bottom: 6px;
  position: relative; overflow: hidden;
}
/* Gold shimmer line on button */
.lg-submit::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(200,169,110,.15) 50%, transparent 100%);
  transition: left .6s ease;
}
.lg-submit:hover::before { left: 150%; }
.lg-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #16304f 0%, #1e4068 100%);
  box-shadow:
    0 0 0 1px rgba(200,169,110,.35),
    0 8px 24px rgba(11,22,40,.35),
    inset 0 1px 0 rgba(200,169,110,.2);
}
.lg-submit:active:not(:disabled) { transform: translateY(0); }
.lg-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.lg-submit #btnText { display: flex; align-items: center; }

/* Spinner */
.lg-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(200,169,110,.3);
  border-top-color: #c8a96e;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Security note */
.lg-security-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .7rem; color: #b8a894;
  padding-top: 16px; padding-bottom: 26px;
  background: #fff;
  text-align: center; line-height: 1.55;
  border-top: 1px solid #f5ede0;
  margin-top: 4px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
.auth-submit {
  width: 100%; height: 44px; font-size: .935rem; font-weight: 600;
  border-radius: var(--radius); background: var(--primary); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  letter-spacing: .02em; box-shadow: var(--shadow-primary);
}
.auth-submit:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(79,70,229,.35); transform: translateY(-1px); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.auth-footer-note { text-align: center; font-size: .74rem; color: var(--text-3); margin-top: 20px; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════ */
.flex { display: flex; } .flex-1 { flex: 1; }
.items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grid { display: grid; } .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; }
.text-lg { font-size: 1.1rem; } .text-xl { font-size: 1.25rem; }
.text-muted { color: var(--text-3); } .text-right { text-align: right; } .text-center { text-align: center; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; } .p-6 { padding: 24px; }
.rounded { border-radius: var(--radius); } .rounded-full { border-radius: 9999px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1400px) {
  .nav-link { padding: 0 8px; font-size: .755rem; }
}
@media (max-width: 1200px) {
  .page-content { padding: 18px 20px; }
  .nav-link { padding: 0 7px; font-size: .74rem; }
}
@media (max-width: 960px) {
  .form-grid-3, .form-grid-4 { grid-template-columns: 1fr 1fr; }
  .auth-left { width: 320px; padding: 36px 38px; }
  .auth-headline { font-size: 1.7rem; }
  .auth-stats-row { display: none; }
}
@media (max-width: 768px) {
  :root { --header-total: 102px; }
  .navbar, .ticker-bar { display: none; }
  .page-content { padding: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2, .form-grid-3, .form-grid-4, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .auth-left { display: none; }
  .auth-deco-cards { display: none; }
  .lg-card { border-radius: 18px; max-width: 390px; }
}
@media (max-width: 480px) {
  .lg-header, form, .lg-security-note { padding-left: 24px; padding-right: 24px; }
  .lg-alert { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .topbar, .navbar, .ticker-bar, .no-print { display: none !important; }
  .main { margin-top: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   PREMIUM DASHBOARD COMPONENTS
═══════════════════════════════════════════════════════════ */

/* ── Greeting banner ──────────────────────────────────────── */
.dash-greeting {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1a2f4a 100%);
  border-radius: var(--radius-xl);
  padding: 26px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 8px 28px rgba(15,23,42,.18);
}
.dash-greeting::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 8% 50%, rgba(79,70,229,.18) 0%, transparent 40%),
    radial-gradient(circle at 92% 20%, rgba(6,182,212,.10) 0%, transparent 40%);
  pointer-events: none;
}
.dash-greeting-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.dash-greeting-left { position: relative; z-index: 1; }
.dash-greeting-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.dash-greeting-label::before {
  content: ''; display: inline-block;
  width: 22px; height: 1px; background: var(--gold); opacity: .5;
}
.dash-greeting-name {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700; color: #fff;
  line-height: 1.2; margin-bottom: 5px; letter-spacing: -.01em;
}
.dash-greeting-sub { font-size: .81rem; color: rgba(200,220,255,.45); }
.dash-greeting-right {
  position: relative; z-index: 1;
  text-align: right; flex-shrink: 0;
}
.dash-date-day {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700; color: rgba(255,255,255,.10);
  line-height: 1;
}
.dash-date-full { font-size: .8rem; color: rgba(200,220,255,.38); margin-top: 4px; }
.dash-gold-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(212,168,67,.10); border: 1px solid rgba(212,168,67,.22);
  color: var(--gold); font-size: .7rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; margin-top: 10px;
  letter-spacing: .04em;
}

/* ── Announcement card ────────────────────────────────────── */
.announcement-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  transition: all var(--transition);
}
.announcement-card:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(2px);
}

/* ── Section heading ──────────────────────────────────────── */
.section-heading {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.section-heading-title {
  font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 10px;
}
.section-heading-title::after {
  content: ''; flex: 1; min-width: 20px; height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* ── Attendance today box ─────────────────────────────────── */
.today-box {
  text-align: center; padding: 11px 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.today-box-lbl { font-size: .57rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.today-box-val { font-size: 1.1rem; font-weight: 800; line-height: 1; }

/* ── Clickable card ───────────────────────────────────────── */
.clickable-card { cursor: pointer; transition: all var(--transition-md); }
.clickable-card:hover { box-shadow: var(--shadow-md); }
