/* ═══════════════════════════════════════════════════════════
   SIDI MBAREK — Premium Admin Design System v2.0
   Inspired by: Stripe · Linear · Vercel · Framer
═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Brand Palette */
  --cream:         #F7F2E8;
  --cream-dark:    #EDE8DC;
  --navy:          #0B1929;
  --navy-2:        #0F2540;
  --ocean:         #0B3D6B;
  --ocean-mid:     #1A6BA0;
  --ocean-light:   #E8F2FA;
  --ocean-ghost:   #F0F6FB;
  --forest:        #1B5E3A;
  --forest-light:  #E6F4ED;
  --sand:          #D4A96A;
  --sand-light:    #FAF3E4;
  --orange:        #C95E28;
  --orange-light:  #FDF0E7;
  --red:           #C0392B;
  --red-light:     #FDECEB;
  --purple:        #6B46C1;
  --purple-light:  #F0EBFF;

  /* Surfaces */
  --surface:       #FFFFFF;
  --surface-2:     #FDFCF9;
  --surface-3:     #F9F5EE;
  --page-bg:       #F2EDE3;

  /* Text */
  --text:          #1A1814;
  --text-2:        #4A453E;
  --text-3:        #8C8680;
  --text-4:        #B8B3AC;
  --text-inv:      #FFFFFF;

  /* Borders */
  --border:        #E5DDD0;
  --border-2:      #D4CAB8;
  --border-focus:  var(--ocean);

  /* Shadows */
  --shadow-xs:     0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.09), 0 3px 8px rgba(0,0,0,0.05);
  --shadow-xl:     0 16px 48px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.07);
  --shadow-ocean:  0 4px 16px rgba(11,61,107,0.22);

  /* Radii */
  --r-xs:   4px;
  --r-sm:   6px;
  --r:      10px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Transitions */
  --t:      150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --sb-w:      260px;
  --sb-w-col:  68px;
  --topbar-h:  60px;

  /* Sidebar tokens */
  --sb-bg:       #0B1929;
  --sb-surface:  rgba(255,255,255,0.04);
  --sb-border:   rgba(255,255,255,0.07);
  --sb-text:     rgba(255,255,255,0.45);
  --sb-text-h:   rgba(255,255,255,0.72);
  --sb-text-act: rgba(255,255,255,0.97);
  --sb-item-h:   rgba(255,255,255,0.06);
  --sb-item-act: rgba(255,255,255,0.10);

  /* Typography */
  --font:         'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }
ul, ol { list-style: none; }

.hidden { display: none !important; }

/* ─── APP LAYOUT ─────────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-left: var(--sb-w);
  transition: margin-left var(--t-slow);
  min-width: 0;
}

html.sb-col .main { margin-left: var(--sb-w-col); }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sb-w);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width var(--t-slow);
  overflow: hidden;
  border-right: 1px solid var(--sb-border);
}

html.sb-col .sidebar { width: var(--sb-w-col); }

.sb-header {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--sb-border);
  gap: 10px;
}

.sb-logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.sb-logo-mark {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--ocean-mid) 0%, var(--forest) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sb-logo-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sb-text-act);
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: opacity var(--t), width var(--t);
  overflow: hidden;
}

.sb-logo-sub {
  font-size: 10px;
  color: var(--sb-text);
  white-space: nowrap;
  transition: opacity var(--t);
  letter-spacing: 0.02em;
}

html.sb-col .sb-logo-name,
html.sb-col .sb-logo-sub { opacity: 0; width: 0; }

.sb-toggle {
  width: 26px; height: 26px;
  border-radius: var(--r-xs);
  color: var(--sb-text);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  flex-shrink: 0;
}

.sb-toggle:hover { background: var(--sb-item-h); color: var(--sb-text-h); }
html.sb-col .sb-toggle svg { transform: rotate(180deg); }
.sb-toggle svg { transition: transform var(--t-slow); }

.sb-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  scrollbar-width: none;
}
.sb-nav::-webkit-scrollbar { display: none; }

.sb-section { margin-bottom: 2px; padding: 0 10px; }

.sb-section-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--sb-text);
  padding: 14px 8px 5px;
  white-space: nowrap;
  transition: opacity var(--t);
}

html.sb-col .sb-section-label { opacity: 0; }

.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  height: 34px;
  margin: 1px 0;
  border-radius: var(--r-sm);
  color: var(--sb-text);
  transition: all var(--t);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.sb-item:hover { background: var(--sb-item-h); color: var(--sb-text-h); }

.sb-item.active {
  background: var(--sb-item-act);
  color: var(--sb-text-act);
}

.sb-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--ocean-mid);
  border-radius: 0 3px 3px 0;
}

.sb-icon {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.sb-icon svg { width: 15px; height: 15px; }

.sb-label {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  transition: opacity var(--t), width var(--t);
  overflow: hidden;
}

html.sb-col .sb-label { opacity: 0; width: 0; }

.sb-pill {
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--orange);
  color: white;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: opacity var(--t);
}

html.sb-col .sb-pill { opacity: 0; }

/* Tooltip in collapsed mode */
html.sb-col .sb-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(var(--sb-w-col) - 6px);
  top: 50%; transform: translateY(-50%);
  background: var(--navy-2);
  color: var(--sb-text-act);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t);
  z-index: 300;
  border: 1px solid var(--sb-border);
  box-shadow: var(--shadow-lg);
}

html.sb-col .sb-item[data-tip]:hover::after { opacity: 1; }

.sb-footer {
  padding: 10px;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: background var(--t);
  cursor: default;
}

.sb-user:hover { background: var(--sb-item-h); }

.sb-avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-xs);
  background: linear-gradient(135deg, var(--ocean) 0%, var(--ocean-mid) 100%);
  color: white;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.sb-user-info { flex: 1; min-width: 0; transition: opacity var(--t); overflow: hidden; }
html.sb-col .sb-user-info { opacity: 0; width: 0; }

.sb-user-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--sb-text-act); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { display: block; font-size: 10.5px; color: var(--sb-text); }

.sb-logout {
  width: 26px; height: 26px;
  border-radius: var(--r-xs);
  color: var(--sb-text);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  flex-shrink: 0;
}

html.sb-col .sb-logout { opacity: 0; width: 0; overflow: hidden; }
.sb-logout:hover { background: rgba(192,57,43,0.18); color: #e74c3c; }
.sb-logout svg { width: 14px; height: 14px; }

.sb-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  flex-shrink: 0;
  z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.topbar-menu { width: 34px; height: 34px; border-radius: var(--r-sm); color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: all var(--t); display: none; }
.topbar-menu:hover { background: var(--surface-3); }
.topbar-menu svg { width: 18px; height: 18px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); }
.breadcrumb-sep { color: var(--border-2); }
.breadcrumb b { font-weight: 600; color: var(--text); }

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

.topbar-weather {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: 12.5px; color: var(--text-2);
  cursor: default;
}

.topbar-weather .w-icon { font-size: 15px; }
.topbar-weather .w-temp { font-weight: 600; color: var(--text); }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
}

.topbar-search:hover { border-color: var(--border-2); background: var(--surface-3); }
.topbar-search svg { width: 13px; height: 13px; }
.topbar-search kbd { font-size: 10px; padding: 1px 5px; border: 1px solid var(--border-2); border-radius: 4px; background: var(--surface); color: var(--text-3); font-family: var(--font); }

.topbar-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  position: relative;
}

.topbar-icon:hover { background: var(--surface-3); color: var(--text); }
.topbar-icon svg { width: 16px; height: 16px; }

.notif-badge {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--surface);
}

.btn-new {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 13px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--ocean); color: white;
  font-size: 12.5px; font-weight: 600;
  transition: all var(--t);
  white-space: nowrap;
}

.btn-new:hover { background: var(--ocean-mid); box-shadow: var(--shadow-ocean); }
.btn-new svg { width: 13px; height: 13px; }

/* ─── PAGE CONTENT ───────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px;
  scroll-behavior: smooth;
}

.page-header {
  margin-bottom: 24px;
}

.page-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 5px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-sub { font-size: 13.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

.page-header-row { display: flex; align-items: flex-end; gap: 16px; }
.page-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.card-p { padding: 20px; }
.card-p-lg { padding: 24px; }

.card-header {
  display: flex; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

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

.card-title svg { width: 15px; height: 15px; color: var(--text-3); }

.card-action { font-size: 12.5px; font-weight: 600; color: var(--ocean); cursor: pointer; transition: color var(--t); }
.card-action:hover { color: var(--ocean-mid); }

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 14px;
  transition: all var(--t);
  cursor: default;
}

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

.stat-top { display: flex; align-items: center; justify-content: space-between; }

.stat-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.stat-ico {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}

.stat-ico svg { width: 16px; height: 16px; }
.stat-ico.oc { background: var(--ocean-light); color: var(--ocean); }
.stat-ico.fo { background: var(--forest-light); color: var(--forest); }
.stat-ico.sa { background: var(--sand-light); color: #8A5E1A; }
.stat-ico.or { background: var(--orange-light); color: var(--orange); }
.stat-ico.pu { background: var(--purple-light); color: var(--purple); }

.stat-value {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
}

.stat-delta {
  font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  color: var(--text-3);
}

.stat-delta.up { color: var(--forest); }
.stat-delta.down { color: var(--red); }
.stat-delta svg { width: 11px; height: 11px; }

/* ─── GRID HELPERS ───────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.g12 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.g21 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.g31 { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; }
.mb16 { margin-bottom: 16px; }
.mb24 { margin-bottom: 24px; }
.mb32 { margin-bottom: 32px; }
.flex-cc { display: flex; align-items: center; gap: 8px; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 36px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  transition: all var(--t);
  white-space: nowrap; cursor: pointer;
}

.btn svg { width: 14px; height: 14px; }
.btn-sm { height: 30px; font-size: 12px; padding: 0 10px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-lg { height: 42px; font-size: 14px; padding: 0 18px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn-icon-sm { width: 28px; height: 28px; padding: 0; justify-content: center; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary { background: var(--ocean); color: white; border: 1px solid transparent; }
.btn-primary:hover { background: var(--ocean-mid); box-shadow: var(--shadow-ocean); }

.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--text); }

.btn-forest { background: var(--forest); color: white; border: 1px solid transparent; }
.btn-forest:hover { filter: brightness(1.08); }

.btn-danger { background: var(--red); color: white; border: 1px solid transparent; }
.btn-danger:hover { filter: brightness(1.08); }

.btn-orange { background: var(--orange); color: white; border: 1px solid transparent; }
.btn-orange:hover { filter: brightness(1.08); }

.btn-sand { background: var(--sand-light); color: #7A5218; border: 1px solid rgba(212,169,106,0.3); }
.btn-sand:hover { background: #F5EDDB; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
  white-space: nowrap; line-height: 1.4;
}

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.badge-oc     { background: var(--ocean-light);  color: var(--ocean);  }
.badge-fo     { background: var(--forest-light); color: var(--forest); }
.badge-or     { background: var(--orange-light); color: var(--orange); }
.badge-sa     { background: var(--sand-light);   color: #7A5218;      }
.badge-rd     { background: var(--red-light);    color: var(--red);   }
.badge-gy     { background: var(--surface-3);    color: var(--text-3);}
.badge-pu     { background: var(--purple-light); color: var(--purple);}

.chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.04em;
}

.chip-easy   { background: var(--forest-light); color: var(--forest); }
.chip-medium { background: var(--sand-light);   color: #7A5218; }
.chip-hard   { background: var(--orange-light); color: var(--orange); }
.chip-expert { background: var(--red-light);    color: var(--red); }

/* ─── TABLES ─────────────────────────────────────────────── */
.tbl-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.tbl-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tbl-label { font-size: 14px; font-weight: 700; flex: 1; min-width: 120px; }
.tbl-count { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 6px; }

.tbl-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 11px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: all var(--t);
}

.tbl-search:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(11,61,107,0.08); background: var(--surface); }
.tbl-search svg { width: 13px; height: 13px; color: var(--text-3); flex-shrink: 0; }
.tbl-search input { border: none; outline: none; background: none; font-size: 12.5px; color: var(--text); width: 170px; }
.tbl-search input::placeholder { color: var(--text-4); }

.tbl-filter {
  height: 32px; padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12.5px; color: var(--text);
  outline: none; cursor: pointer;
  transition: all var(--t);
}

.tbl-filter:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(11,61,107,0.08); }

.tbl-toolbar-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--t);
}

thead th:hover { color: var(--text-2); }
thead th.th-asc::after { content: ' ↑'; color: var(--ocean); }
thead th.th-desc::after { content: ' ↓'; color: var(--ocean); }

tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

tbody td {
  padding: 11px 16px;
  font-size: 13px; color: var(--text);
  vertical-align: middle;
}

.tbl-thumb {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tbl-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}

.cell-main { font-weight: 500; color: var(--text); }
.cell-sub  { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.cell-flex { display: flex; align-items: center; gap: 10px; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }

.tbl-actions { display: flex; align-items: center; gap: 4px; }

.tbl-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t); cursor: pointer;
}

.tbl-btn:hover { background: var(--surface-3); color: var(--text); }
.tbl-btn.danger:hover { background: var(--red-light); color: var(--red); }
.tbl-btn svg { width: 14px; height: 14px; }

.tbl-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.tbl-page-info { font-size: 12.5px; color: var(--text-3); }

.tbl-page-btns { display: flex; align-items: center; gap: 3px; }

.tbl-page-btn {
  min-width: 28px; height: 28px;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t);
  padding: 0 7px;
}

.tbl-page-btn:hover { background: var(--surface-3); border-color: var(--border); }
.tbl-page-btn.active { background: var(--ocean); color: white; border-color: var(--ocean); }
.tbl-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tbl-page-btn.dots { cursor: default; color: var(--text-4); }
.tbl-page-btn.dots:hover { background: none; border-color: transparent; }

/* ─── FORMS ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field label, .field-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
}

.field-hint { font-size: 11px; color: var(--text-3); }

.input,
input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], input[type=url],
input[type=search], select, textarea {
  width: 100%; height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px; color: var(--text);
  outline: none;
  transition: all var(--t);
  -webkit-appearance: none;
  appearance: none;
}

textarea.input, textarea {
  height: auto; min-height: 84px;
  padding: 10px 12px;
  resize: vertical; line-height: 1.5;
}

input:focus, select:focus, textarea:focus, .input:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(11,61,107,0.09);
}

input::placeholder, textarea::placeholder { color: var(--text-4); }

.input-error { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(192,57,43,0.09) !important; }
.field-error { font-size: 11.5px; color: var(--red); font-weight: 500; }

.form-error {
  font-size: 12.5px; color: var(--red);
  background: var(--red-light);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  display: none;
}

.form-error.show { display: block; }

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }

.toggle {
  position: relative; width: 38px; height: 22px;
  flex-shrink: 0;
}

.toggle input { display: none; }

.toggle-track {
  position: absolute; inset: 0;
  background: var(--border-2);
  border-radius: var(--r-full);
  transition: background var(--t);
  cursor: pointer;
}

.toggle input:checked + .toggle-track { background: var(--ocean); }

.toggle-track::after {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t);
}

.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

.toggle-label { font-size: 13px; font-weight: 500; color: var(--text); }

/* Tags input */
.tags-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  min-height: 42px; cursor: text;
  transition: all var(--t);
}

.tags-wrap:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(11,61,107,0.09); }

.tag-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--ocean-light);
  color: var(--ocean);
  font-size: 12px; font-weight: 500;
}

.tag-rm { cursor: pointer; opacity: 0.6; font-size: 14px; line-height: 1; transition: opacity var(--t); }
.tag-rm:hover { opacity: 1; }

.tags-wrap input {
  flex: 1; min-width: 80px;
  height: 24px; border: none; padding: 0 4px;
  outline: none; background: none; font-size: 13px;
}

/* Days picker */
.days-picker { display: flex; gap: 5px; }

.day-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 10.5px; font-weight: 800;
  color: var(--text-3);
  transition: all var(--t); cursor: pointer;
  letter-spacing: 0.02em;
}

.day-btn.on { background: var(--ocean); border-color: var(--ocean); color: white; }

/* Image upload */
.img-field { display: flex; flex-direction: column; gap: 8px; }

.img-drop {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--t);
}

.img-drop:hover, .img-drop.over { border-color: var(--ocean); background: var(--ocean-ghost); }

.img-preview { max-height: 130px; width: 100%; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 10px; }

.img-drop-label { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.img-drop-label span { color: var(--ocean); font-weight: 600; cursor: pointer; }
.img-drop-label span:hover { text-decoration: underline; }

.img-url-row { display: flex; gap: 8px; }
.img-url-row input { flex: 1; }

/* ─── DRAWER ─────────────────────────────────────────────── */
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(11,25,41,0.45);
  z-index: 400;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-slow);
  backdrop-filter: blur(2px);
}

.drawer-bg.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 480px;
  background: var(--surface);
  z-index: 401;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.drawer-bg.open .drawer { transform: translateX(0); }

.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}

.drawer-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }

.drawer-x {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}

.drawer-x:hover { background: var(--surface-3); color: var(--text); }
.drawer-x svg { width: 16px; height: 16px; }

.drawer-body {
  flex: 1; overflow-y: auto;
  padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
}

.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--surface-2);
}

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(11,25,41,0.55);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  max-width: 420px; width: 100%;
  animation: scaleIn 0.2s var(--t-spring);
}

.modal-lg { max-width: 680px; }

.modal-head {
  padding: 24px 24px 0;
  display: flex; align-items: flex-start; gap: 14px;
}

.modal-ico-wrap {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.modal-ico-wrap.danger { background: var(--red-light); color: var(--red); }
.modal-ico-wrap.info   { background: var(--ocean-light); color: var(--ocean); }
.modal-ico-wrap.success { background: var(--forest-light); color: var(--forest); }
.modal-ico-wrap svg { width: 20px; height: 20px; }

.modal-t { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 8px; }

.modal-body { padding: 12px 24px 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

.modal-foot {
  padding: 0 24px 22px;
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast-stack {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 600;
  display: flex; flex-direction: column-reverse; gap: 8px;
  max-width: 360px; width: calc(100vw - 40px);
}

.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s var(--t-spring);
  position: relative; overflow: hidden;
}

.toast-ico {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

.toast-ico svg { width: 11px; height: 11px; }

.toast.ok .toast-ico  { background: rgba(27,94,58,0.7);   color: #4ade80; }
.toast.err .toast-ico { background: rgba(192,57,43,0.7);  color: #f87171; }
.toast.info .toast-ico{ background: rgba(11,61,107,0.6);  color: #60a5fa; }
.toast.warn .toast-ico{ background: rgba(212,169,106,0.4);color: var(--sand); }

.toast-msg { font-size: 13px; line-height: 1.45; flex: 1; }

.toast-bar {
  position: absolute; bottom: 0; left: 0;
  height: 2px;
  animation: toastBar linear forwards;
}

.toast.ok   .toast-bar { background: rgba(74,222,128,0.5); }
.toast.err  .toast-bar { background: rgba(248,113,113,0.5); }
.toast.info .toast-bar { background: rgba(96,165,250,0.5); }
.toast.warn .toast-bar { background: rgba(212,169,106,0.5); }

/* ─── COMMAND PALETTE ────────────────────────────────────── */
.cmd-bg {
  position: fixed; inset: 0;
  background: rgba(11,25,41,0.60);
  z-index: 700;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(4px);
}

.cmd-box {
  width: 100%; max-width: 580px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: scaleIn 0.18s var(--t-spring);
}

.cmd-row {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.cmd-row svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }

.cmd-row input {
  flex: 1; border: none; outline: none;
  font-size: 15px; color: var(--text); background: none;
}

.cmd-row kbd {
  font-size: 10.5px; padding: 2px 7px;
  border: 1px solid var(--border-2);
  border-radius: 5px; color: var(--text-3);
  background: var(--surface-2);
  font-family: var(--font);
}

.cmd-results { max-height: 380px; overflow-y: auto; padding: 6px; }

.cmd-group { font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px 5px; }

.cmd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--t);
}

.cmd-item:hover, .cmd-item.hi { background: var(--ocean-light); }

.cmd-item-ico {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.cmd-item-ico svg { width: 14px; height: 14px; color: var(--text-2); }
.cmd-item.hi .cmd-item-ico { background: var(--ocean); }
.cmd-item.hi .cmd-item-ico svg { color: white; }

.cmd-item-t { font-size: 13.5px; font-weight: 500; color: var(--text); }
.cmd-item-s { font-size: 11.5px; color: var(--text-3); }

.cmd-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.cmd-foot span { font-size: 11px; color: var(--text-3); display: flex; gap: 4px; align-items: center; }
.cmd-foot kbd { font-size: 9.5px; padding: 1px 5px; border: 1px solid var(--border-2); border-radius: 4px; background: var(--surface); font-family: var(--font); }

/* ─── SKELETON ───────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1200px 0; }
  100% { background-position:  1200px 0; }
}

.skel {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--border) 50%, var(--surface-3) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: var(--r-xs);
}

.skel-h { height: 14px; }
.skel-title { height: 22px; width: 55%; }
.skel-value { height: 34px; width: 40%; }
.skel-avatar { width: 36px; height: 36px; border-radius: 50%; }
.skel-thumb { width: 38px; height: 38px; border-radius: var(--r-sm); }
.skel-btn { height: 32px; width: 80px; border-radius: var(--r-sm); }
.skel-full { width: 100%; }
.skel-80 { width: 80%; }
.skel-60 { width: 60%; }
.skel-40 { width: 40%; }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 56px 20px;
  gap: 10px; text-align: center;
}

.empty-ico {
  width: 54px; height: 54px;
  border-radius: var(--r-lg);
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

.empty-ico svg { width: 26px; height: 26px; color: var(--text-4); }
.empty-t { font-size: 14.5px; font-weight: 600; color: var(--text); }
.empty-s { font-size: 13px; color: var(--text-3); max-width: 280px; line-height: 1.6; }

/* ─── WELCOME CARD ───────────────────────────────────────── */
.welcome {
  background: linear-gradient(135deg, #0B1929 0%, #0B3D6B 55%, #1A6BA0 100%);
  border-radius: var(--r-xl);
  padding: 28px 30px;
  color: white;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 30px rgba(11,57,107,0.28);
}

.welcome::before {
  content: '';
  position: absolute; top: -80px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.welcome::after {
  content: '';
  position: absolute; bottom: -100px; left: 30%;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  pointer-events: none;
}

.welcome-row { display: flex; align-items: flex-start; gap: 20px; }
.welcome-left { flex: 1; }

.welcome-greeting { font-size: 12.5px; opacity: 0.55; margin-bottom: 4px; letter-spacing: 0.03em; }

.welcome-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1; margin-bottom: 8px;
}

.welcome-desc { font-size: 13.5px; opacity: 0.6; max-width: 420px; line-height: 1.55; }

.welcome-kpis {
  display: flex; gap: 24px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.welcome-kpi { display: flex; flex-direction: column; gap: 2px; }
.welcome-kpi-v { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.welcome-kpi-l { font-size: 10.5px; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.07em; }

.welcome-right {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; min-width: 110px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  position: relative; z-index: 1;
}

.welcome-w-icon { font-size: 30px; }
.welcome-w-temp { font-size: 22px; font-weight: 700; }
.welcome-w-desc { font-size: 10.5px; opacity: 0.55; text-align: center; line-height: 1.4; }

/* ─── QUICK ACTIONS ──────────────────────────────────────── */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 14px;
  cursor: pointer; transition: all var(--t);
  display: flex; align-items: center; gap: 10px;
}

.quick-card:hover { border-color: var(--ocean); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.quick-ico {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.quick-ico svg { width: 15px; height: 15px; }
.quick-ico.oc { background: var(--ocean-light); color: var(--ocean); }
.quick-ico.fo { background: var(--forest-light); color: var(--forest); }
.quick-ico.sa { background: var(--sand-light); color: #8A5E1A; }
.quick-ico.or { background: var(--orange-light); color: var(--orange); }

.quick-label { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.3; }

/* ─── REVIEW MINI LIST ───────────────────────────────────── */
.rv-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.rv-item:last-child { border-bottom: none; }
.rv-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.rv-name { font-size: 13px; font-weight: 600; flex: 1; }
.rv-stars { font-size: 12px; color: var(--sand); letter-spacing: 1px; }
.rv-text { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.rv-date { font-size: 11px; color: var(--text-4); margin-top: 4px; }

/* ─── BAR CHART ──────────────────────────────────────────── */
.barchart { display: flex; flex-direction: column; gap: 10px; }

.bar-row { display: flex; align-items: center; gap: 10px; }

.bar-label { font-size: 12px; color: var(--text-2); width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bar-track { flex: 1; height: 7px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }

.bar-fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--ocean), var(--ocean-mid)); transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

.bar-val { font-size: 11.5px; font-weight: 700; color: var(--text); width: 28px; text-align: right; flex-shrink: 0; }

/* Upcoming */
.up-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.up-item:last-child { border-bottom: none; }

.up-date { width: 40px; height: 44px; border-radius: var(--r-sm); background: var(--ocean-light); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.up-day { font-size: 18px; font-weight: 800; color: var(--ocean); line-height: 1; }
.up-mon { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--ocean); letter-spacing: 0.06em; }

.up-name { font-size: 13px; font-weight: 600; color: var(--text); }
.up-sub  { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

/* ─── GALLERY ────────────────────────────────────────────── */
.gal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.gal-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.view-tog { display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.view-btn { width: 30px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; transition: all var(--t); }
.view-btn svg { width: 13px; height: 13px; }
.view-btn.on { background: var(--surface-3); color: var(--text); }

.drop-zone {
  margin: 16px; border: 2px dashed var(--border);
  border-radius: var(--r-lg); padding: 32px 20px;
  text-align: center; cursor: pointer;
  background: var(--surface-2);
  transition: all var(--t);
}

.drop-zone:hover, .drop-zone.over { border-color: var(--ocean); background: var(--ocean-ghost); }

.drop-ico { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.drop-ico svg { width: 22px; height: 22px; color: var(--text-3); }
.drop-t { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.drop-s { font-size: 12.5px; color: var(--text-3); }
.drop-s a { color: var(--ocean); font-weight: 600; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; padding: 16px; }

.gal-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-3); cursor: pointer;
  border: 2px solid transparent; transition: all var(--t);
}

.gal-item:hover { border-color: var(--ocean); }
.gal-item.sel { border-color: var(--ocean); }

.gal-item.sel::before {
  content: '✓';
  position: absolute; top: 8px; left: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ocean); color: white;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; box-shadow: var(--shadow-sm);
}

.gal-item img { width: 100%; height: 100%; object-fit: cover; }

.gal-overlay {
  position: absolute; inset: 0;
  background: rgba(11,25,41,0.65);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; transition: opacity var(--t);
}

.gal-item:hover .gal-overlay { opacity: 1; }

.gal-btn {
  width: 30px; height: 30px;
  border-radius: var(--r-xs);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t); cursor: pointer;
}

.gal-btn:hover { background: rgba(255,255,255,0.28); }
.gal-btn svg { width: 14px; height: 14px; }

.gal-list { display: flex; flex-direction: column; padding: 8px 16px; gap: 6px; }

.gal-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: all var(--t); cursor: pointer;
}

.gal-list-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.gal-list-thumb { width: 46px; height: 46px; border-radius: var(--r-xs); object-fit: cover; flex-shrink: 0; }
.gal-list-name { font-size: 13px; font-weight: 500; flex: 1; }
.gal-list-meta { font-size: 11.5px; color: var(--text-3); }

/* Bulk bar */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ocean-light);
  border-bottom: 1px solid rgba(11,61,107,0.15);
}

.bulk-count { font-size: 13px; font-weight: 600; color: var(--ocean); flex: 1; }

/* ─── SETTINGS ───────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }

.settings-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
  position: sticky; top: 0;
}

.settings-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all var(--t);
}

.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav-item.on { color: var(--ocean); background: var(--ocean-ghost); }
.settings-nav-item svg { width: 14px; height: 14px; }

.settings-panel { display: none; }
.settings-panel.on { display: flex; flex-direction: column; gap: 20px; }

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}

.settings-card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.settings-card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.settings-card-sub   { font-size: 12.5px; color: var(--text-3); }

.settings-card-body {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 16px;
}

.settings-card-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
}

.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── HOMEPAGE EDITOR ────────────────────────────────────── */
.hp-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }

.hp-nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
  position: sticky; top: 0;
}

.hp-nav-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.hp-nav-title { font-size: 13.5px; font-weight: 700; }
.hp-nav-sub   { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.hp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all var(--t);
}

.hp-nav-item:last-child { border-bottom: none; }
.hp-nav-item:hover { background: var(--surface-2); color: var(--text); }
.hp-nav-item.on { color: var(--ocean); background: var(--ocean-ghost); }
.hp-nav-item-ico { width: 28px; height: 28px; border-radius: var(--r-xs); background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hp-nav-item-ico svg { width: 13px; height: 13px; color: var(--text-2); }
.hp-nav-item.on .hp-nav-item-ico { background: var(--ocean-light); }
.hp-nav-item.on .hp-nav-item-ico svg { color: var(--ocean); }

.hp-panel { display: none; }
.hp-panel.on { display: flex; flex-direction: column; gap: 16px; }

.hp-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}

.hp-panel-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.hp-panel-title { font-size: 14px; font-weight: 700; }
.hp-panel-body  { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.hp-panel-foot  { padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: flex-end; gap: 8px; }

/* ─── RESERVATIONS ───────────────────────────────────────── */
.res-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.res-field { display: flex; flex-direction: column; gap: 3px; }
.res-field-l { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.res-field-v { font-size: 14px; color: var(--text); font-weight: 500; }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── CALENDAR ───────────────────────────────────────────── */
.cal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); }

.cal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 10px; }
.cal-title { font-size: 15px; font-weight: 700; flex: 1; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal-day-l { text-align: center; padding: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }

.cal-cell { min-height: 88px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background var(--t); cursor: pointer; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { opacity: 0.38; }
.cal-cell.today { background: var(--ocean-ghost); }

.cal-num { font-size: 12px; font-weight: 700; color: var(--text); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-bottom: 4px; }
.cal-cell.today .cal-num { background: var(--ocean); color: white; }

.cal-ev { font-size: 10px; padding: 2px 6px; border-radius: 3px; background: var(--ocean); color: white; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── ANALYTICS ──────────────────────────────────────────── */
.ana-chart { height: 180px; display: flex; align-items: flex-end; gap: 6px; padding: 0 4px; }

.ana-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }

.ana-bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--ocean), var(--ocean-mid)); transition: opacity var(--t); min-height: 4px; cursor: pointer; }
.ana-bar:hover { opacity: 0.75; }

.ana-lbl { font-size: 9.5px; color: var(--text-3); text-align: center; }

/* ─── NOTIFICATIONS ──────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: var(--topbar-h); right: 0;
  width: 330px; max-height: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none; border-right: none;
  border-radius: 0 0 0 var(--r-lg);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  display: flex; flex-direction: column;
  animation: slideDown 0.18s ease;
}

.notif-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.notif-head h3 { font-size: 14px; font-weight: 700; flex: 1; }
.notif-head button { color: var(--text-3); transition: color var(--t); }
.notif-head button:hover { color: var(--text); }
.notif-head button svg { width: 16px; height: 16px; }

.notif-list { overflow-y: auto; flex: 1; }

.notif-item { display: flex; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); transition: background var(--t); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ocean); flex-shrink: 0; margin-top: 5px; }
.notif-text { font-size: 13px; line-height: 1.5; flex: 1; color: var(--text-2); }
.notif-text strong { color: var(--text); font-weight: 600; }
.notif-time { font-size: 11px; color: var(--text-4); margin-top: 3px; }

.notif-empty { padding: 30px; text-align: center; font-size: 13px; color: var(--text-3); }

/* Quick create */
.quick-menu {
  position: absolute;
  right: 0; top: 100%;
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  z-index: 300; overflow: hidden;
  animation: slideDown 0.15s ease;
  margin-top: 6px;
}

.quick-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; cursor: pointer; transition: background var(--t); color: var(--text); }
.quick-menu-item:hover { background: var(--surface-2); }
.quick-menu-item svg { width: 14px; height: 14px; color: var(--text-3); }

/* ─── LOGIN ──────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0;
  background: var(--page-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; overflow: hidden;
}

.login-bg {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden;
}

.login-bg::before {
  content: ''; position: absolute; top: -20%; right: -5%;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(11,61,107,0.07) 0%, transparent 65%);
}

.login-bg::after {
  content: ''; position: absolute; bottom: -25%; left: -8%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(27,94,58,0.05) 0%, transparent 65%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 40px;
  width: 100%; max-width: 390px;
  box-shadow: var(--shadow-xl);
  position: relative; z-index: 1;
}

.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }

.login-mark {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--ocean) 0%, var(--forest) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: white;
  box-shadow: 0 4px 12px rgba(11,61,107,0.3);
}

.login-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.login-sub-name { font-size: 11px; color: var(--text-3); display: block; font-family: var(--font); }

.login-h { font-family: var(--font-display); font-size: 27px; font-weight: 600; color: var(--text); margin-bottom: 5px; letter-spacing: -0.02em; }
.login-p { font-size: 14px; color: var(--text-3); margin-bottom: 28px; }

.login-fields { display: flex; flex-direction: column; gap: 15px; margin-bottom: 6px; }

.login-btn {
  width: 100%; height: 44px;
  border-radius: var(--r-sm);
  background: var(--ocean); color: white;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--t); margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.login-btn:hover { background: var(--ocean-mid); box-shadow: var(--shadow-ocean); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-btn svg { width: 16px; height: 16px; }

.login-hint { text-align: center; margin-top: 20px; font-size: 11.5px; color: var(--text-4); }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

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

@keyframes toastBar {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; }

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

.page-in { animation: pageIn 0.22s ease; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
  .g21 { grid-template-columns: 1fr; }
  .g31 { grid-template-columns: 1fr; }
  .hp-layout { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
}

@media (max-width: 900px) {
  .topbar-weather, .topbar-search { display: none; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sb-w) !important; transition: transform var(--t-slow); }
  html.sb-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0 !important; }
  .topbar-menu { display: flex; }
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100%; }
  .settings-row { grid-template-columns: 1fr; }
  .res-detail { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
