/* ═══════════════════════════════════════════════════════════════
   BEYOND BORDERS — Global Admin Design System
   Theme: Creamy White (#FFFCF2) + Dark Gold (#B8930A)
   Matches: travelbeyondborders.ae brand identity
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts fallback if not loaded by page ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;500;700;900&display=swap');

/* ───────────────────────────────
   DESIGN TOKENS
─────────────────────────────── */
:root {
  /* Brand palette */
  --cream:          #FFFCF2;
  --cream-mid:      #FAF4E4;
  --cream-light:    #F5EDD8;
  --cream-border:   #EDE0C4;

  --gold:           #B8930A;
  --gold-bright:    #C9A72A;
  --gold-light:     #D4AF37;
  --gold-muted:     #C9A72A55;
  --gold-dark:      #8B6914;
  --gold-ultra:     #6B4F0A;

  --charcoal:       #1A1209;
  --dark:           #2C1F06;
  --sidebar-bg:     #120D04;
  --sidebar-hover:  rgba(212,175,55,0.10);
  --sidebar-active-bg: rgba(212,175,55,0.14);
  --sidebar-active-border: #D4AF37;
  --sidebar-text:   rgba(255,255,255,0.70);
  --sidebar-text-active: #D4AF37;
  --sidebar-width:  240px;

  --text:           #2C1F06;
  --text-mid:       #6B5730;
  --text-light:     #9A8060;
  --white:          #FFFFFF;

  --border:         rgba(184,147,10,0.18);
  --border-strong:  rgba(184,147,10,0.32);
  --shadow-sm:      0 2px 10px rgba(184,147,10,0.10);
  --shadow-md:      0 6px 24px rgba(184,147,10,0.14);
  --shadow-lg:      0 16px 52px rgba(184,147,10,0.18);

  /* Status colours (accessible) */
  --status-confirmed: #065f46;
  --status-confirmed-bg: #d1fae5;
  --status-pending:   #92400e;
  --status-pending-bg:#fef3c7;
  --status-cancelled: #991b1b;
  --status-cancelled-bg:#fee2e2;
  --status-active:    #065f46;
  --status-active-bg: #d1fae5;
  --status-inactive:  #6b7280;
  --status-inactive-bg:#f3f4f6;
  --status-approved:  #1e40af;
  --status-approved-bg:#dbeafe;
  --status-no_show-bg:#fce7f3;
  --status-no_show:   #9d174d;

  /* Geometry */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', 'Open Sans', system-ui, sans-serif;

  /* Topbar */
  --topbar-h: 64px;

  /* Transition */
  --t: 0.25s cubic-bezier(.4,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: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(184,147,10,0.16), transparent 60%),
    radial-gradient(900px 520px at 92% -20%, rgba(184,147,10,0.10), transparent 64%),
    linear-gradient(180deg, var(--cream) 0%, #fffdfa 100%);
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }
code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--cream-light);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--gold-dark);
}
pre {
  font-family: 'Courier New', monospace;
  background: var(--cream-light);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  color: var(--charcoal);
}

/* ───────────────────────────────
   DASHBOARD LAYOUT
─────────────────────────────── */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(165deg, #120d04 0%, #1a1209 58%, #221708 100%);
  border-right: 1px solid rgba(212,175,55,0.12);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--t);
}

/* Sidebar removed globally for admin pages */
.sidebar {
  display: none !important;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(212,175,55,0.36), rgba(212,175,55,0.04));
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 4px; }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(212,175,55,0.12);
  flex-shrink: 0;
}
.sidebar__brand-mark,
.sidebar__brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(184,147,10,0.4);
}
.sidebar__brand-text {
  display: flex;
  flex-direction: column;
}
.sidebar__brand-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.2px;
}
.sidebar__brand-sub {
  font-size: 0.62rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 500;
  margin-top: 3px;
}

.sidebar__section {
  padding: 16px 12px 4px;
}
.sidebar__section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(212,175,55,0.45);
  padding: 0 8px;
  margin-bottom: 6px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar__link:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,0.92);
}
.sidebar__link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active-border);
  font-weight: 600;
}
.sidebar__link .link-icon {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.sidebar__link .link-badge {
  margin-left: auto;
  background: rgba(212,175,55,0.2);
  color: var(--gold-light);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar__footer {
  margin-top: auto;
  padding: 14px 12px 20px;
  border-top: 1px solid rgba(212,175,55,0.10);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__user,
.sidebar__footer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.83rem;
}
.sidebar__avatar,
.sidebar__footer-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--gold-bright),var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.sidebar__user-name,
.sidebar__footer-name {
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-role {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(212,175,55,0.65);
}

/* ── Main area ── */
.dash-main {
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ── */
.dash-topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184,147,10,0.16);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 22px rgba(26,18,8,0.06);
}
.dash-topbar__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  flex: 1;
}

/* ── Content area ── */
.dash-content {
  padding: 28px;
  flex: 1;
}

/* ───────────────────────────────
   CARDS
─────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 100%);
  border: 1px solid rgba(184,147,10,0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: box-shadow var(--t);
}
.card:hover { box-shadow: var(--shadow-md); }

.system-core {
  position: relative;
  border: 1px solid rgba(184,147,10,0.34);
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, #20170a 0%, #2a1d07 52%, #3a2a0b 100%);
  color: var(--white);
  padding: 22px 24px;
  margin-bottom: 18px;
  overflow: hidden;
}
.system-core::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent 45%);
  pointer-events: none;
}
.system-core::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(212,175,55,0.10);
}
.system-core__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.system-core__eyebrow {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #f0cd63;
}
.system-core__title {
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff7e7;
}
.system-core__desc {
  margin-top: 6px;
  color: rgba(255,247,231,0.86);
  max-width: 700px;
  font-size: .9rem;
}
.system-core__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.system-core .btn--outline {
  border-color: rgba(255,247,231,0.62);
  color: #fff7e7;
  background: rgba(255,255,255,0.04);
}
.system-core .btn--outline:hover:not(:disabled) {
  border-color: #fff7e7;
  color: #fff7e7;
  background: rgba(255,255,255,0.14);
}
.system-core .btn--primary {
  background: #c9a72a;
  border-color: #c9a72a;
  color: #ffffff;
}
.system-core .btn--primary:hover:not(:disabled) {
  background: #b8930a;
  border-color: #b8930a;
}

.admin-hero {
  position: relative;
  border: 1px solid rgba(184,147,10,0.24);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(26,18,9,0.98) 0%, rgba(44,31,6,0.95) 56%, rgba(26,18,9,0.98) 100%);
  color: var(--white);
  padding: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}
.admin-hero::before {
  content: '';
  position: absolute;
  left: -80px;
  bottom: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(212,175,55,0.12);
}
.admin-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(212,175,55,0.08) 50%, transparent 100%);
  pointer-events: none;
}
.admin-hero__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.admin-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 8px;
}
.admin-hero__sub {
  color: rgba(255,255,255,0.78);
  max-width: 780px;
  font-size: .92rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.module-card {
  border: 1px solid rgba(184,147,10,0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,252,242,0.95));
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
}
.module-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(184,147,10,0.14);
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.module-card__title {
  font-weight: 700;
  color: var(--charcoal);
}
.module-card__meta {
  font-size: .82rem;
  color: var(--text-mid);
  flex: 1;
}
.module-card .btn {
  justify-content: flex-start;
}

.module-overview {
  border: 1px solid rgba(184,147,10,0.2);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,252,242,0.95));
}
.module-overview__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.module-overview__title {
  font-weight: 700;
  color: var(--charcoal);
}
.module-overview__meta {
  font-size: .82rem;
  color: var(--text-mid);
}
.module-overview__grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.module-pill {
  border: 1px solid rgba(184,147,10,0.2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .76rem;
  color: var(--text-mid);
  background: rgba(184,147,10,0.06);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.module-command {
  border: 1px solid rgba(184,147,10,0.2);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,252,242,0.94));
}
.module-command__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.module-command__title {
  font-weight: 700;
  color: var(--charcoal);
}
.module-command__sub {
  font-size: .81rem;
  color: var(--text-mid);
}
.module-command__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.global-signout-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
}

.global-signout-btn .btn {
  box-shadow: 0 10px 28px rgba(26,18,9,0.22);
}

.dash-content > .card {
  margin-bottom: 14px;
}

.user-table,
.agency-table,
.sub-table,
.booking-table,
.hotel-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.user-table thead,
.agency-table thead,
.sub-table thead,
.booking-table thead,
.hotel-table thead,
.data-table thead {
  background: linear-gradient(180deg, rgba(184,147,10,0.08), rgba(184,147,10,0.03));
  border-bottom: 1px solid rgba(184,147,10,0.24);
}
.user-table th,
.agency-table th,
.sub-table th,
.booking-table th,
.hotel-table th,
.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.user-table td,
.agency-table td,
.sub-table td,
.booking-table td,
.hotel-table td,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(184,147,10,0.14);
  font-size: .87rem;
}
.user-table tr:hover,
.agency-table tr:hover,
.sub-table tr:hover,
.booking-table tr:hover,
.hotel-table tr:hover,
.data-table tr:hover {
  background: rgba(184,147,10,0.05);
}

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-light));
}
.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mid);
}
.stat-card__value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}
.stat-card__delta {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-card__delta.up   { color: #16a34a; }
.stat-card__delta.down { color: #dc2626; }
.stat-card__icon {
  position: absolute;
  top: 18px; right: 20px;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(184,147,10,0.14), rgba(184,147,10,0.06));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--gold);
}

/* ───────────────────────────────
   DATA TABLE
─────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr {
  border-bottom: 2px solid var(--border);
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-mid);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--cream-border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background var(--t);
}
.data-table tbody tr:hover { background: var(--cream-mid); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ───────────────────────────────
   BADGES
─────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--gold     { background: rgba(184,147,10,0.12); color: var(--gold-dark); border: 1px solid rgba(184,147,10,0.25); }
.badge--green    { background: var(--status-confirmed-bg); color: var(--status-confirmed); }
.badge--red      { background: var(--status-cancelled-bg); color: var(--status-cancelled); }
.badge--yellow   { background: var(--status-pending-bg);   color: var(--status-pending);   }
.badge--blue     { background: var(--status-approved-bg);  color: var(--status-approved);  }
.badge--gray     { background: var(--status-inactive-bg);  color: var(--status-inactive);  }
.badge--pink     { background: var(--status-no_show-bg);   color: var(--status-no_show);   }

/* ───────────────────────────────
   BUTTONS
─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(184,147,10,0.25);
}
.btn--primary:hover:not(:disabled) {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  box-shadow: 0 4px 16px rgba(184,147,10,0.35);
}

.btn--outline {
  background: transparent;
  color: #1a1208;
  border-color: #ece5d8;
}
.btn--outline:hover:not(:disabled) {
  background: #f8f3e8;
  border-color: #c8a541;
  color: #1a1208;
}

.btn--ghost {
  background: transparent;
  color: var(--text-mid);
}
.btn--ghost:hover:not(:disabled) { background: var(--cream-mid); color: var(--text); }

.btn--danger {
  background: #dc2626;
  color: var(--white);
  box-shadow: 0 3px 10px rgba(220,38,38,0.25);
}
.btn--danger:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}

.btn--sm { padding: 6px 16px; font-size: 0.8rem; }
.btn--lg { padding: 13px 32px; font-size: 1rem; }
.btn--full { width: 100%; }

/* ───────────────────────────────
   FORMS
─────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.2px;
}
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(184,147,10,0.12);
}
.form-control::placeholder { color: var(--text-light); }
.form-control[type="search"]::-webkit-search-cancel-button { display: none; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B6914' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ───────────────────────────────
   MODAL
─────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,18,9,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn { from { opacity:0; } to { opacity:1; } }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,0.25), 0 0 0 1px var(--border);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s cubic-bezier(.34,1.56,.64,1);
}
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

@keyframes modalIn {
  from { opacity:0; transform:scale(0.94) translateY(12px); }
  to   { opacity:1; transform:none; }
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal__header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
}
.modal__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream-light);
  color: var(--text-mid);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t);
  flex-shrink: 0;
}
.modal__close:hover { background: var(--cream-border); color: var(--charcoal); }
.modal__body { padding: 24px; }
.modal__footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

/* ───────────────────────────────
   TOAST NOTIFICATIONS
─────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: all;
  border-left: 4px solid var(--gold-bright);
}
.toast.success { border-left-color: #16a34a; }
.toast.error   { border-left-color: #dc2626; }
.toast.info    { border-left-color: #2563eb; }
@keyframes toastIn {
  from { opacity:0; transform:translateX(20px) scale(0.95); }
  to   { opacity:1; transform:none; }
}
.toast__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast__icon { color: #16a34a; }
.toast.error   .toast__icon { color: #dc2626; }
.toast.info    .toast__icon { color: #2563eb; }
.toast__body { flex: 1; }
.toast__title { font-size: 0.88rem; font-weight: 600; color: var(--charcoal); }
.toast__msg   { font-size: 0.82rem; color: var(--text-mid); margin-top: 2px; }

/* ───────────────────────────────
   LOADING OVERLAY
─────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,252,242,0.7);
  backdrop-filter: blur(3px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(184,147,10,0.2);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
}

/* ───────────────────────────────
   NOTIFICATION BELL
─────────────────────────────── */
.notif-bell-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--cream-mid);
  color: var(--text-mid);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all var(--t);
  margin-left: auto;
}
.notif-bell-btn:hover { border-color: var(--gold-bright); color: var(--gold); background: rgba(184,147,10,0.07); }
.notif-bell-btn .notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--white);
  transition: transform var(--t);
}

/* ───────────────────────────────
   SKELETON LOADERS
─────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--cream-light) 25%, var(--cream-border) 50%, var(--cream-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───────────────────────────────
   SECTION / PAGE HEADER
─────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
}
.page-header__sub {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 2px;
}

/* ───────────────────────────────
   DIVIDER
─────────────────────────────── */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ───────────────────────────────
   TABS
─────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--t), border-color var(--t);
}
.tab-btn.active {
  color: var(--gold-dark);
  border-bottom-color: var(--gold-bright);
  font-weight: 600;
}
.tab-btn:hover:not(.active) { color: var(--text); }

/* ───────────────────────────────
   EMPTY STATE
─────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mid);
}
.empty-state__icon {
  font-size: 2.8rem;
  color: var(--cream-border);
  margin-bottom: 16px;
}
.empty-state h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p { font-size: 0.88rem; }

/* ───────────────────────────────
   KV DETAIL GRID
─────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.detail-item span, .detail-item strong {
  font-size: 0.9rem;
  color: var(--charcoal);
}
.detail-item.full { grid-column: span 2; }

/* ───────────────────────────────
   MOBILE SIDEBAR TOGGLE
─────────────────────────── */
.sidebar-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--cream-mid);
  color: var(--text-mid);
  font-size: 1rem;
  cursor: pointer;
  align-items: center; justify-content: center;
}

/* ───────────────────────────────
   RESPONSIVE
─────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.35);
  }
  .dash-main {
    margin-left: 0;
  }
  .sidebar-toggle { display: flex; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .dash-content { padding: 16px; }
  .dash-topbar { padding: 0 16px; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .dash-topbar__title { flex: 1 1 100%; margin-bottom: 10px; }
  .dash-topbar > * { min-width: 0; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .dash-topbar  { padding: 0 16px; }
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; }
  .system-core,
  .admin-hero { padding: 18px; }
  .global-signout-btn {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ───────────────────────────────
   UTILITY CLASSES
─────────────────────────── */
.text-gold    { color: var(--gold-bright); }
.text-mid     { color: var(--text-mid); }
.text-light   { color: var(--text-light); }
.text-danger  { color: #dc2626; }
.text-success { color: #16a34a; }
.text-sm      { font-size: 0.82rem; }
.text-xs      { font-size: 0.72rem; }
.text-heading { font-family: var(--font-heading); }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-center { display:flex; align-items:center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.overflow-auto { overflow: auto; }
.w-full { width: 100%; }
