/* ============================================================
   assets/css/style.css — Employee Tax Tools Portal
   Theme: Deep Navy / Slate Blue / Amber accent
   Font: DM Sans (body) + Playfair Display (brand)
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --navy:         #0f1b35;
  --navy-mid:     #162348;
  --navy-light:   #1e3a6e;
  --blue:         #2563eb;
  --blue-light:   #3b82f6;
  --blue-glow:    rgba(37,99,235,0.18);
  --amber:        #f59e0b;
  --amber-light:  #fbbf24;
  --slate:        #334155;
  --slate-light:  #64748b;
  --silver:       #94a3b8;
  --ice:          #e2e8f0;
  --white:        #ffffff;
  --bg:           #f1f5f9;
  --card:         #ffffff;
  --danger:       #ef4444;
  --success:      #10b981;
  --warning:      #f59e0b;
  --info:         #06b6d4;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
  --shadow-blue:  0 4px 20px rgba(37,99,235,0.25);

  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    18px;
  --radius-xl:    24px;

  --sidebar-w:    260px;
  --topbar-h:     64px;

  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--slate);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ice); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--silver); }

/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left panel — brand */
.login-brand {
  background: var(--navy);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(245,158,11,0.12) 0%, transparent 70%);
}

.brand-grid {
  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: 40px 40px;
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.brand-logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-blue);
}

.brand-logo i { font-size: 36px; color: var(--white); }

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
}

.brand-tagline {
  color: var(--silver);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 280px;
  margin: 0 auto 40px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
}

.brand-feature i {
  color: var(--amber);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Right panel — form */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--white);
}

.login-form-wrap {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--slate-light);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--navy);
  background: #f8fafc;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--silver);
  font-size: 0.95rem;
  pointer-events: none;
  transition: color var(--transition);
}

.form-group:focus-within .input-icon { color: var(--blue); }

.form-control option { background: var(--white); color: var(--navy); }

/* Password toggle */
.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--silver);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--blue); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,0.35);
  color: var(--white);
}
.btn-primary:active { transform: translateY(0); }

.btn-block { width: 100%; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ice);
  color: var(--slate);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; color: var(--white); transform: translateY(-1px); }

.btn-success { background: var(--success); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

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

.alert-danger  { background: #fef2f2; color: #b91c1c; border-left: 3px solid var(--danger); }
.alert-success { background: #f0fdf4; color: #166534; border-left: 3px solid var(--success); }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--warning); }
.alert-info    { background: #ecfeff; color: #155e75; border-left: 3px solid var(--info); }

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════ */

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent);
}

.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo i { font-size: 1.1rem; color: var(--white); }

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-title small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--silver);
  font-weight: 400;
}

/* User card */
.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue-light), var(--amber));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.user-info-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.user-info-role {
  font-size: 0.72rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-light);
  padding: 14px 20px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 0;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.nav-item.active {
  color: var(--white);
  background: rgba(37,99,235,0.25);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--blue-light);
  border-radius: 0 2px 2px 0;
}

.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
  padding: 8px 0;
}
.logout-btn:hover { color: var(--danger); }

/* ── Main content area ────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--ice);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.page-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* Search */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding: 8px 14px 8px 38px;
  border: 1.5px solid var(--ice);
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--navy);
  background: var(--bg);
  width: 240px;
  transition: all var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--blue-glow);
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--silver);
  font-size: 0.875rem;
}

/* Last login badge */
.last-login-badge {
  font-size: 0.78rem;
  color: var(--slate-light);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--ice);
}

.last-login-badge i { color: var(--success); }

/* Hamburger (mobile) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 28px;
}

/* ── Welcome banner ───────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(37,99,235,0.4) 0%, transparent 70%);
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: 40px; bottom: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%);
}

.welcome-text { position: relative; z-index: 1; }

.welcome-greeting {
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.welcome-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 4px;
}

.welcome-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.welcome-icon {
  position: relative;
  z-index: 1;
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.welcome-icon i { font-size: 1.8rem; color: var(--amber); }

/* ── Stats row ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ice);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(37,99,235,0.1);  color: var(--blue); }
.stat-icon.amber  { background: rgba(245,158,11,0.1); color: var(--amber); }
.stat-icon.green  { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #7c3aed; }

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--slate-light);
  font-weight: 500;
}

/* ── Section header ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i { color: var(--blue); }

/* ── Category pills ───────────────────────────────────────── */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--ice);
  background: var(--white);
  color: var(--slate);
  transition: all var(--transition);
}

.pill:hover, .pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ── Quick links grid ─────────────────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.link-card {
  background: var(--white);
  border: 1.5px solid var(--ice);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.link-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}

.link-card:hover::before { opacity: 1; }

.link-card.hidden { display: none; }

.link-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(37,99,235,0.06));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--blue);
  transition: all var(--transition);
}

.link-card:hover .link-icon {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
}

.link-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.link-desc {
  font-size: 0.78rem;
  color: var(--slate-light);
  line-height: 1.4;
}

.link-arrow {
  font-size: 0.75rem;
  color: var(--silver);
  align-self: flex-end;
  margin-top: auto;
  transition: all var(--transition);
}

.link-card:hover .link-arrow { color: var(--blue); transform: translateX(3px); }

/* ── No results ───────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--slate-light);
  grid-column: 1/-1;
}
.no-results i { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }
.no-results p { font-size: 0.9rem; }

/* ════════════════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════════════════ */

.table-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ice);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ice);
  color: var(--slate);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success { background: rgba(16,185,129,0.12); color: #065f46; }
.badge-danger  { background: rgba(239,68,68,0.12);  color: #991b1b; }
.badge-blue    { background: rgba(37,99,235,0.12);  color: #1e40af; }
.badge-amber   { background: rgba(245,158,11,0.12); color: #92400e; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,27,53,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--ice);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 1rem; font-weight: 700; color: var(--navy); }

.modal-close {
  background: none;
  border: none;
  color: var(--silver);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--danger); }

.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* Card sections */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ice);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ice);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.card-body { padding: 20px; }

/* ── Loading overlay ──────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.4s ease;
}

.page-loader.fade-out { opacity: 0; pointer-events: none; }

.loader-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: var(--white);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(37,99,235,0); }
}

.loader-text {
  font-size: 0.85rem;
  color: var(--silver);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Toast notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  min-width: 260px;
  max-width: 340px;
  pointer-events: all;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

.toast-success { border-color: var(--success); }
.toast-danger  { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }

.toast-icon { font-size: 1rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-danger  .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-message { flex: 1; color: var(--slate); font-weight: 500; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (max-width: 768px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }

  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
  }
  .sidebar-overlay.open { display: block; }

  .main-wrapper { margin-left: 0; }

  .sidebar-toggle { display: block; }

  .topbar { padding: 0 16px; }

  .search-input { width: 160px; }
  .search-input:focus { width: 190px; }

  .last-login-badge { display: none; }

  .main-content { padding: 16px; }

  .welcome-banner { flex-direction: column; padding: 22px 20px; }

  .welcome-icon { display: none; }

  .links-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .links-grid { grid-template-columns: 1fr 1fr; }
  .stats-row  { grid-template-columns: 1fr; }
  .modal { margin: 10px; }
}
