/* ============================================================
   BridgeHR — Design System
   Brand: BridgeHedge Limited
   Primary: Navy #041E4C · Accent: Gold #926C15 · HR: Dark Green #102009
   Fonts: Playfair Display (headlines) · Poppins (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand Colours */
  --navy:          #041E4C;
  --navy-light:    #0a2d6e;
  --navy-dark:     #020f26;
  --gold:          #926C15;
  --gold-light:    #b8892a;
  --gold-pale:     #f5edd6;
  --hr-green:      #102009;
  --hr-green-light:#1a350f;
  --grey:          #C3C3C4;
  --grey-light:    #f0f0f1;
  --grey-mid:      #e4e4e6;
  --cream:         #F7F4EF;
  --white:         #FFFFFF;

  /* Semantic Aliases */
  --primary:       var(--navy);
  --accent:        var(--gold);
  --surface:       var(--cream);
  --bg:            #f4f3f0;
  --border:        #dbd8d0;
  --text:          #1a1a2e;
  --text-muted:    #6b6b7a;
  --text-light:    #9898a5;

  /* Status Colours */
  --success:       #1a6b3c;
  --success-bg:    #edf7f1;
  --warning:       #92620a;
  --warning-bg:    #fdf6e3;
  --danger:        #8b1a1a;
  --danger-bg:     #fdf0f0;
  --info:          #0e3d6b;
  --info-bg:       #e8f1fb;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:     'Poppins', 'Segoe UI', sans-serif;

  /* Spacing */
  --radius:        6px;
  --radius-lg:     10px;
  --radius-xl:     16px;
  --shadow-sm:     0 1px 4px rgba(4,30,76,0.08);
  --shadow:        0 2px 12px rgba(4,30,76,0.10);
  --shadow-lg:     0 8px 32px rgba(4,30,76,0.14);

  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      64px;
}

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

html { font-size: 15px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

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

/* ── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 0.75rem; }

.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-sm    { font-size: 0.8125rem; }
.text-xs    { font-size: 0.75rem; }
.text-gold  { color: var(--gold); }
.text-navy  { color: var(--navy); }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn:disabled, .btn.loading {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Primary — Gold CTA */
.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(146,108,21,0.35);
  transform: translateY(-1px);
}

/* Navy */
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover:not(:disabled) {
  background: var(--navy-light);
  color: var(--white);
  transform: translateY(-1px);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--navy);
  background: rgba(4,30,76,0.04);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-outline-gold:hover:not(:disabled) {
  background: var(--gold-pale);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--grey-light);
  color: var(--navy);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { opacity: 0.88; }

/* Sizes */
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius); }

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(4,30,76,0.10);
}

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(139,26,26,0.12); }
.form-control::placeholder { color: var(--text-light); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b7a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-text { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.invalid-feedback { font-size: 0.78rem; color: var(--danger); margin-top: 0.3rem; display: none; }
.form-control.is-invalid + .invalid-feedback { display: block; }

/* Password toggle */
.input-password { position: relative; }
.input-password .form-control { padding-right: 2.75rem; }
.btn-password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  line-height: 0;
}
.btn-password-toggle:hover { color: var(--navy); }

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--grey-mid);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

/* Stat Cards */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  border-radius: 4px 0 0 4px;
}
.stat-card.accent-navy::before  { background: var(--navy); }
.stat-card.accent-gold::before  { background: var(--gold); }
.stat-card.accent-green::before { background: var(--hr-green); }

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-change { font-size: 0.78rem; color: var(--text-muted); }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-icon {
  position: absolute;
  top: 1rem; right: 1.25rem;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--gold-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}

/* Stat card body / icon variants used in dashboard.php */
.stat-card-body { position: relative; z-index: 1; }
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.stat-card-trend { font-size: 0.75rem; font-weight: 500; }
.stat-card-trend.trend-up      { color: var(--success); }
.stat-card-trend.trend-down    { color: var(--danger); }
.stat-card-trend.trend-neutral { color: var(--text-muted); }
.stat-card-trend.trend-action  { color: var(--gold); font-weight: 600; text-decoration: none; }
.stat-card-trend.trend-action:hover { text-decoration: underline; }

.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.stat-card-icon svg { width: 22px; height: 22px; }
.stat-icon-navy  { background: rgba(4,30,76,0.1);  color: var(--navy); }
.stat-icon-gold  { background: var(--gold-pale);    color: var(--gold); }
.stat-icon-green { background: rgba(16,32,9,0.1);   color: var(--hr-green); }
.stat-icon-cream { background: var(--cream);         color: var(--text-muted); }

/* Topbar avatar + user display */
.topbar-avatar {
  width: 32px; height: 32px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
}
.topbar-user { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.topbar-user-name { font-size: 0.82rem; font-weight: 600; color: var(--navy); }

/* Notification badge on topbar button */
.topbar-badge {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--danger);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.topbar-icon-btn { position: relative; }

/* Nav badge (sidebar notification pill) */
.nav-badge-gold {
  background: var(--gold);
  color: var(--white);
}

/* Sidebar logout button */
.sidebar-logout {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); background: rgba(220,53,69,0.08); }
.sidebar-logout svg   { width: 16px; height: 16px; }

/* Sidebar user-email */
.sidebar-user-email {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ── TABLES ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
}

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

thead { background: var(--navy); }
thead th {
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.85);
  text-align: left;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--grey-mid); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(4,30,76,0.025); }
tbody td { padding: 0.85rem 1rem; color: var(--text); vertical-align: middle; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-navy    { background: rgba(4,30,76,0.1);  color: var(--navy); }
.badge-gold    { background: var(--gold-pale);   color: var(--gold); }
.badge-success { background: var(--success-bg);  color: var(--success); }
.badge-warning { background: var(--warning-bg);  color: var(--warning); }
.badge-danger  { background: var(--danger-bg);   color: var(--danger); }
.badge-info    { background: var(--info-bg);     color: var(--info); }
.badge-muted   { background: var(--grey-light);  color: var(--text-muted); }

/* ── AVATAR ─────────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--navy);
  color: var(--white);
  flex-shrink: 0;
}
.avatar-sm  { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md  { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg  { width: 52px; height: 52px; font-size: 1rem; }
.avatar-xl  { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-gold  { background: var(--gold); }
.avatar-green { background: var(--hr-green); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-left: 4px solid;
  margin-bottom: 1rem;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info); }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4,30,76,0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; color: var(--navy); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.25rem;
  border-radius: var(--radius); transition: color 0.15s, background 0.15s;
  line-height: 0;
}
.modal-close:hover { color: var(--navy); background: var(--grey-light); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

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

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}

/* Sidebar logo — real BridgeHedge logo image */
.sidebar-brand-logo {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.sidebar-logo-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.2);
  margin: 0 0.65rem;
  flex-shrink: 0;
}
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1; }
.sidebar-logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}
.sidebar-logo-sub {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-company {
  margin: 0.75rem 1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-company-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-company-role {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.nav-section { margin-bottom: 0.25rem; }
.nav-section-label {
  padding: 0.7rem 1.25rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border-left-color: rgba(146,108,21,0.4);
}
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: rgba(146,108,21,0.15);
  color: var(--white);
  border-left-color: var(--gold);
}
.nav-item.active svg { opacity: 1; color: var(--gold); }

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 0.68rem; color: var(--text-muted); text-transform: capitalize; }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); font-weight: 700; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; color: var(--text-muted); }
.topbar-breadcrumb .sep { opacity: 0.4; }
.topbar-breadcrumb .current { color: var(--navy); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.topbar-icon-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.topbar-icon-btn:hover { border-color: var(--navy); color: var(--navy); background: rgba(4,30,76,0.04); }

.topbar-notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--gold);
  border: 2px solid var(--white);
  border-radius: 50%;
}

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-user-btn:hover { border-color: var(--navy); background: rgba(4,30,76,0.03); }
.topbar-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--navy); }

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--navy);
}

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.main-content { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); flex: 1; min-width: 0; }
.page-content { padding: 1.75rem; max-width: 1400px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-header-left h1 { font-size: 1.5rem; margin-bottom: 0.2rem; }

/* ── TABS ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--grey-mid);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab {
  padding: 0.7rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
}
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  justify-content: center;
  padding: 1rem 0;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.page-btn:hover { border-color: var(--navy); color: var(--navy); }
.page-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── DROPDOWN ───────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
.dropdown-menu.open { display: block; animation: dropIn 0.15s ease; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  border: none; background: none;
  width: 100%; text-align: left;
  font-family: var(--font-body);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--grey-light); color: var(--navy); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }

/* ── TOAST ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--navy-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s ease;
  border-left: 4px solid var(--gold);
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 1rem; opacity: 0.3; color: var(--navy); }
.empty-state h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--navy); }
.empty-state p  { font-size: 0.875rem; margin-bottom: 1.25rem; }

/* ── SEARCH BAR ─────────────────────────────────────────────── */
.search-bar { position: relative; display: inline-block; }
.search-bar input { padding-left: 2.4rem; min-width: 240px; }
.search-bar svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-light);
  pointer-events: none;
}

/* ── UTILITIES ──────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.d-flex { display: flex; }
.d-none { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ── AUTH PAGES ─────────────────────────────────────────────── */
.auth-layout { display: flex; min-height: 100vh; }

/* Left panel — Navy dark brand panel */
.auth-left {
  width: 46%;
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border: 1.5px solid rgba(146,108,21,0.18);
  border-radius: 50%;
  top: -120px; right: -100px;
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  bottom: 60px; left: -60px;
  pointer-events: none;
}

.auth-logo { display: flex; align-items: center; gap: 0.85rem; margin-bottom: auto; }
.auth-bh-box {
  width: 44px; height: 44px;
  background: var(--gold);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-bh-box span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: -0.04em;
}
.auth-logo-text { display: flex; flex-direction: column; line-height: 1; }
.auth-logo-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--white); }
.auth-logo-sub {
  font-size: 0.65rem; font-weight: 600;
  color: var(--gold); letter-spacing: 0.08em;
  text-transform: uppercase; margin-top: 2px;
}

.auth-headline {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.auth-headline em { font-style: italic; color: var(--gold); }

.auth-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 360px;
}

.auth-features { list-style: none; margin-bottom: 2.5rem; }
.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.auth-features .feat-icon {
  width: 22px; height: 22px;
  background: rgba(146,108,21,0.25);
  border: 1px solid rgba(146,108,21,0.45);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-features .feat-icon svg { width: 11px; height: 11px; color: var(--gold); }

.auth-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(146,108,21,0.8);
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* Right panel — Form */
.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
  background: var(--cream);
}

.auth-form-header { margin-bottom: 2rem; }
.auth-form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.auth-form-title { font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); margin-bottom: 0.4rem; }
.auth-form-sub { font-size: 0.875rem; color: var(--text-muted); }

.auth-form { max-width: 420px; }
.auth-form .form-control { background: var(--white); border-color: #d8d4cc; }
.auth-form .form-control:focus { border-color: var(--navy); background: var(--white); }

.btn-auth-cta {
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  font-family: var(--font-body);
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(146,108,21,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-auth-cta:hover:not(:disabled) {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(146,108,21,0.4);
}
.btn-auth-cta:disabled { opacity: 0.65; cursor: not-allowed; }

.auth-divider {
  display: flex; align-items: center;
  gap: 0.75rem; margin: 1.25rem 0;
  color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-trust {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trust-badge svg { width: 14px; height: 14px; color: var(--gold); }

.auth-switch { font-size: 0.85rem; color: var(--text-muted); margin-top: 1.25rem; }
.auth-switch a { color: var(--navy); font-weight: 600; }
.auth-switch a:hover { color: var(--gold); }

/* ── LOADING SPINNER ─────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .auth-left { width: 42%; padding: 2.5rem; }
  .auth-right { padding: 2.5rem; }
  .auth-headline { font-size: 2.1rem; }
}

@media (max-width: 860px) {
  .auth-layout { flex-direction: column; }
  .auth-left { width: 100%; padding: 2rem; min-height: auto; }
  .auth-left::before, .auth-left::after { display: none; }
  .auth-headline { font-size: 1.6rem; }
  .auth-sub, .auth-features { display: none; }
  .auth-right { padding: 2rem; flex: none; justify-content: flex-start; }

  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .page-content { padding: 1.25rem; }
}

@media (max-width: 600px) {
  .auth-right { padding: 1.5rem; }
  .auth-form-title { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}
