/* ==================================================================
   CIBN Cooperative Portal — Stylesheet
   Palette: Forest Green #14532d / Antique Gold #b6862c (CIBN brand)
   Type: Fraunces (display) + Public Sans (UI/body) + JetBrains Mono (data)
   ================================================================== */

:root {
  --navy: #14532d;
  --navy-dark: #0d3a20;
  --navy-light: #1f7a42;
  --gold: #b6862c;
  --gold-light: #d9b568;
  --gold-dark: #8f6a1f;
  --ink: #16241c;
  --paper: #f6f8f6;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15,35,20,.05);
  --shadow-md: 0 6px 20px rgba(15,35,20,.08);
  --shadow-lg: 0 20px 45px rgba(15,35,20,.16);
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-800: #92400e;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-600: #2563eb;
  --blue-800: #1e40af;
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-800: #6b21a8;
  --indigo-100: #e0e7ff;
  --indigo-800: #3730a3;
  --cyan-100: #cffafe;
  --cyan-800: #155e75;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Headings + brand moments carry the display face; data stays in the UI face */
.page-header h1, .card-title, .dash-card-title, .modal-head h2,
.hero-name, .welcome-banner h2, .profile-banner h2, .auth-card h2,
.sidebar-title, .login-brand-name, .login-hero-title, .login-form-title,
.stat-card .value, .kpi-value, .hero-stat-value {
  font-family: var(--font-display);
  letter-spacing: -.01em;
}
.mono, .lf-2fa-input, .loan-panel-ref { font-family: var(--font-mono); }

/* Visible, on-brand keyboard focus — accessibility floor */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Layout ---------------- */
.app-shell { display: flex; min-height: 100vh; position: relative; }
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.page-content { flex: 1; padding: 24px; overflow: auto; }
.page-content.narrow { max-width: 720px; }
.page-content.medium { max-width: 1000px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grid { display: grid; }
/* Mobile-first: grids default to single column */
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .sm-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lg-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1024px) {
  .lg-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lg-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .lg-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .xl-grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
}

.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

.w-full { width: 100%; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }
@media (min-width: 640px) { .sm-block { display: block; } }

/* ---------------- Sidebar ---------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  width: 256px;
  flex-shrink: 0;
  min-height: 100vh;
  position: relative;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(182,134,44,.3);
  padding: 20px 16px;
}
.sidebar-logo-img {
  width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); flex-shrink: 0;
}
.sidebar-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.2; }
.sidebar-subtitle { font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.2; }
.sidebar-nav { flex: 1; padding: 16px 8px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 2px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.68);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(182,134,44,.18); color: #f2dfa8; border-left-color: var(--gold); font-weight: 600; }
.sidebar-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { border-top: 1px solid rgba(182,134,44,.25); padding: 12px; }
.sidebar-footer a, .sidebar-footer button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 2px;
  font-size: 14px; font-weight: 500; background: none; border: none;
  color: rgba(255,255,255,.7); text-align: left;
}
.sidebar-footer a:hover, .sidebar-footer button:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-footer a.active { background: rgba(255,255,255,.2); color: #fff; }
.sidebar-avatar {
  width: 24px; height: 24px; border-radius: 999px; background: rgba(182,134,44,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.sidebar-profile-name { font-size: 13px; font-weight: 500; color: #fff; line-height: 1.2; }
.sidebar-profile-role { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* ---------------- Header ---------------- */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--slate-200);
  background: #fff;
  padding: 16px 24px;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold) 45%, var(--gold-light) 65%, var(--gold-dark));
}
.page-header h1 { font-size: 21px; font-weight: 600; color: var(--ink); margin: 0; }
.page-header p { font-size: 13px; color: var(--slate-500); margin: 2px 0 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-bell { position: relative; padding: 8px; border-radius: var(--radius-sm); color: var(--slate-500); transition: background .15s, color .15s; }
.header-bell:hover { background: var(--slate-100); color: var(--slate-700); }
.header-bell .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: #ef4444; }
.header-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--slate-200); }
.header-avatar {
  width: 32px; height: 32px; border-radius: 999px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ---------------- Cards ---------------- */
.card { border-radius: var(--radius-lg); border: 1px solid var(--slate-200); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.card-header { padding: 24px 24px 12px; }
.card-header.tight { padding-bottom: 12px; }
.card-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 8px; }
.card-content { padding: 24px; }
.card-content.no-top { padding-top: 0; }
.card-content.no-pad { padding: 0; }

.stat-card { border-radius: var(--radius-lg); border: 1px solid var(--slate-200); background: #fff; box-shadow: var(--shadow-sm); padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; transition: box-shadow .2s, transform .2s; }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .label { font-size: 13px; font-weight: 500; color: var(--slate-500); margin: 0; }
.stat-card .value { font-size: 23px; font-weight: 600; color: var(--ink); margin: 4px 0 0; }
.stat-card .change { font-size: 12px; font-weight: 500; margin-top: 4px; }
.stat-card .change.positive { color: var(--emerald-600); }
.stat-card .change.negative { color: var(--red-600); }
.stat-card .description { font-size: 12px; color: var(--slate-400); margin-top: 4px; }
.stat-card .icon-wrap { border-radius: var(--radius-md); padding: 12px; flex-shrink: 0; display:flex; align-items:center; justify-content:center; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  height: 40px; padding: 0 16px; border: none; transition: all .15s;
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-default { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-default:hover { background: var(--navy-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-outline:hover { background: rgba(20,83,45,.06); }
.btn-secondary { background: var(--slate-100); color: var(--ink); }
.btn-secondary:hover { background: var(--slate-200); }
.btn-destructive { background: var(--red-600); color: #fff; }
.btn-destructive:hover { background: var(--red-700); }
.btn-success { background: var(--emerald-600); color: #fff; }
.btn-success:hover { background: var(--emerald-700); }
.btn-warning { background: var(--amber-500); color: #fff; }
.btn-warning:hover { background: var(--amber-600); }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-link { background: none; color: var(--navy); padding: 0; height: auto; text-decoration: underline; text-underline-offset: 4px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 48px; padding: 0 32px; font-size: 16px; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-block { width: 100%; }

.spinner {
  width: 16px; height: 16px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Form fields ---------------- */
.field { margin-bottom: 0; }
.field label, .form-label { display: block; font-size: 14px; font-weight: 500; color: var(--slate-700); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200); font-size: 14px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-textarea { height: auto; padding: 10px 12px; min-height: 80px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,83,45,.12);
}
.form-input:hover, .form-select:hover { border-color: var(--slate-300); }
.form-input.has-icon { padding-left: 36px; }
.form-input-wrap { position: relative; }
.form-input-wrap .icon-left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-400); width: 16px; height: 16px; }
.form-input-wrap .icon-right-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--slate-400); padding: 0; display:flex; }
.form-error { font-size: 12px; color: var(--red-600); margin-top: 4px; }
.form-help { font-size: 12px; color: var(--slate-500); margin-top: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate-600); cursor: pointer; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-default { background: var(--navy); color: #fff; }
.badge-secondary { background: var(--slate-100); color: var(--slate-800); }
.badge-destructive { background: var(--red-100); color: var(--red-800); }
.badge-success { background: var(--emerald-100); color: var(--emerald-800); }
.badge-warning { background: var(--amber-100); color: var(--amber-800); }
.badge-info { background: var(--blue-100); color: var(--blue-800); }

/* role badge colours */
.role-SYSTEM_ADMIN { background: var(--red-100); color: var(--red-800); }
.role-PRESIDENT { background: var(--purple-100); color: var(--purple-800); }
.role-VICE_PRESIDENT { background: var(--indigo-100); color: var(--indigo-800); }
.role-NATIONAL_TREASURER { background: var(--emerald-100); color: var(--emerald-800); }
.role-GENERAL_SECRETARY { background: var(--blue-100); color: var(--blue-800); }
.role-AUDITOR { background: var(--amber-100); color: var(--amber-800); }
.role-MEMBER { background: var(--slate-100); color: var(--slate-800); }

/* module badge colours (audit trail) */
.module-auth { background: var(--blue-100); color: var(--blue-800); }
.module-members { background: var(--purple-100); color: var(--purple-800); }
.module-contributions { background: var(--emerald-100); color: var(--emerald-800); }
.module-settings { background: var(--amber-100); color: var(--amber-800); }
.module-wallet { background: var(--cyan-100); color: var(--cyan-800); }

/* ---------------- Alerts ---------------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; display: flex; align-items: flex-start; gap: 8px; }
.alert-error { background: var(--red-50); border-color: var(--red-200); color: #b91c1c; }
.alert-success { background: var(--emerald-50); border-color: var(--emerald-200); color: var(--emerald-700); }
.alert-warning { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-800); }
.alert-info { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-800); }

/* ---------------- Tables ---------------- */
.data-table-wrap { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); overflow: hidden; }
table.data-table { width: 100%; font-size: 14px; }
table.data-table thead tr { border-bottom: 1px solid var(--slate-100); background: var(--slate-50); }
table.data-table th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700; color: var(--slate-500); text-transform: uppercase; letter-spacing: .06em; }
table.data-table th.right { text-align: right; }
table.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--slate-50); color: var(--slate-700); vertical-align: middle; }
table.data-table td.right { text-align: right; }
table.data-table tbody tr:hover { background: var(--slate-50); }
table.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; padding: 48px 0; color: var(--slate-400); font-size: 14px; }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--slate-100); }
.pagination-bar p { font-size: 14px; color: var(--slate-500); margin: 0; }
.pagination-links { display: flex; align-items: center; gap: 4px; }
.page-link {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; font-size: 12px; font-weight: 500;
  color: var(--slate-600); transition: background .15s;
}
.page-link:hover { background: var(--slate-100); }
.page-link.active { background: var(--navy); color: #fff; }
.page-link.disabled { color: var(--slate-300); pointer-events: none; }

/* avatar circle for tables/lists */
.avatar-circle { width: 32px; height: 32px; border-radius: 999px; background: rgba(20,83,45,.1); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }

/* ---------------- Modal ---------------- */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,35,20,.45); backdrop-filter: blur(2px); }
.modal-box { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-box.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid var(--slate-100); }
.modal-head h2 { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0; }
.modal-head p { font-size: 13px; color: var(--slate-500); margin: 2px 0 0; }
.modal-close { padding: 8px; border-radius: var(--radius-sm); border: none; background: none; color: var(--slate-500); }
.modal-close:hover { background: var(--slate-100); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--slate-100); display: flex; justify-content: flex-end; gap: 12px; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--slate-100); padding: 0 24px; }
.modal-tab { padding: 12px 16px; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; color: var(--slate-500); text-transform: capitalize; background: none; border-top: none; border-left: none; border-right: none; }
.modal-tab.active { border-bottom-color: var(--gold); color: var(--navy); }

/* ---------------- Auth pages ---------------- */
.auth-shell {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy-dark) 100%);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-logo-mark {
  width: 64px; height: 64px; border-radius: var(--radius-lg); background: var(--gold);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  box-shadow: var(--shadow-lg);
}
.auth-title { text-align: center; color: #fff; font-size: 25px; font-weight: 600; margin: 0; }
.auth-subtitle { text-align: center; color: rgba(255,255,255,.6); font-size: 14px; margin: 4px 0 32px; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px; }
.auth-card h2 { font-size: 21px; font-weight: 600; color: var(--ink); margin: 0; }
.auth-card .sub { color: var(--slate-500); font-size: 14px; margin: 4px 0 0; }
.auth-demo-box { margin-top: 24px; padding: 16px; background: var(--slate-50); border-radius: var(--radius-sm); }
.auth-demo-box p.title { font-size: 12px; font-weight: 500; color: var(--slate-600); margin: 0 0 8px; }
.auth-demo-box .line { font-size: 12px; color: var(--slate-500); font-family: var(--font-mono); }
.auth-success-icon { width: 64px; height: 64px; border-radius: 999px; background: var(--emerald-100); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* ---------------- Dashboard banners ---------------- */
.welcome-banner { border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 24px; color: #fff; border: 1px solid rgba(182,134,44,.25); }
.welcome-banner h2 { font-size: 18px; font-weight: 600; margin: 0; }
.welcome-banner p { color: rgba(255,255,255,.7); font-size: 13px; margin: 4px 0 0; }
.welcome-pill { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 12px; }
.welcome-pill.success { background: rgba(16,185,129,.2); border: 1px solid rgba(52,211,153,.3); color: #d1fae5; }
.welcome-pill svg { width: 14px; height: 14px; }

.profile-banner { border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--navy), var(--navy-light)); padding: 24px; color: #fff; display: flex; align-items: center; gap: 16px; }
.profile-avatar-lg { width: 64px; height: 64px; border-radius: var(--radius-md); background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; }
.profile-banner h2 { font-size: 20px; font-weight: 600; margin: 0; }
.profile-banner p { color: rgba(255,255,255,.7); font-size: 13px; margin: 2px 0 0; }
.pill-row { display: flex; gap: 8px; margin-top: 8px; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.2); }
.pill.subtle { background: rgba(255,255,255,.1); }

/* bar chart (executive dashboard) */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.bar-row .bar-label { width: 32px; font-size: 12px; color: var(--slate-500); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--slate-100); border-radius: 999px; height: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--navy); border-radius: 999px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 8%; }
.bar-fill span { font-size: 10px; color: #fff; font-weight: 500; white-space: nowrap; }
.bar-count { width: 24px; font-size: 12px; color: var(--slate-400); flex-shrink: 0; }

/* ---------------- Notifications ---------------- */
.notif-list { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); }
.notif-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px; border-bottom: 1px solid var(--slate-50); cursor: pointer; transition: background .15s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--slate-50); }
.notif-item.unread { background: rgba(20,83,45,.03); }
.notif-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.notif-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.notif-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; margin-top: 6px; }
.notif-tabs { display: flex; gap: 8px; }
.notif-tab { padding: 6px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--slate-600); }
.notif-tab:hover { background: var(--slate-100); }
.notif-tab.active { background: var(--navy); color: #fff; }

/* ---------------- misc text helpers ---------------- */
.text-xs { font-size: 12px; } .text-sm { font-size: 13px; } .text-base { font-size: 14px; } .text-lg { font-size: 17px; } .text-xl { font-size: 20px; } .text-2xl { font-size: 24px; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.text-muted { color: var(--slate-500); }
.text-faint { color: var(--slate-400); }
.text-success { color: var(--emerald-600); }
.text-danger { color: var(--red-600); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.mt-1{margin-top:4px;} .mt-2{margin-top:8px;} .mt-3{margin-top:12px;} .mt-4{margin-top:16px;}
.mb-1{margin-bottom:4px;} .mb-2{margin-bottom:8px;} .mb-3{margin-bottom:12px;} .mb-4{margin-bottom:16px;}

/* upload dropzone */
.dropzone { border: 2px dashed var(--slate-200); border-radius: 12px; padding: 32px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: rgba(30,58,95,.4); background: var(--slate-50); }

/* details/diff viewer in audit log */
details.diff-viewer summary { cursor: pointer; color: var(--navy); font-size: 12px; }
details.diff-viewer summary:hover { text-decoration: underline; }
.diff-block { border-radius: 6px; padding: 6px; margin-top: 4px; font-size: 11px; max-width: 260px; }
.diff-block.before { background: var(--red-50); border: 1px solid var(--red-100); color: #991b1b; }
.diff-block.after { background: var(--emerald-50); border: 1px solid var(--emerald-100); color: #065f46; }
.diff-block pre { white-space: pre-wrap; word-break: break-word; max-height: 80px; overflow: auto; margin: 4px 0 0; }

/* QR code box for 2FA */
.qr-box { display: flex; justify-content: center; }
.qr-box img { width: 192px; height: 192px; border: 1px solid var(--slate-200); border-radius: 12px; padding: 8px; }

@media print {
  .no-print { display: none !important; }
}
