/* =====================================================
   HOME FACTORY — Admin Studio  ·  Luxury Edition
   ===================================================== */

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

/* ── Design tokens ── */
:root {
  /* Sidebar */
  --sb-bg:        #06100a;
  --sb-surface:   #0c1a10;
  --sb-hover:     rgba(255,255,255,.045);
  --sb-active:    rgba(201,164,80,.10);
  --sb-border:    rgba(255,255,255,.07);
  --sb-w:         248px;

  /* Canvas & surfaces */
  --canvas:       #f2efe8;
  --canvas-2:     #ece9e0;
  --surface:      #ffffff;
  --surface-2:    #faf9f5;
  --surface-3:    #f7f5ef;

  /* Borders */
  --border:       rgba(0,0,0,.10);
  --border-2:     rgba(0,0,0,.06);
  --border-warm:  rgba(180,150,90,.18);

  /* Text */
  --ink:    #0d160b;
  --ink-2:  #283826;
  --ink-3:  #566756;
  --ink-4:  #96a896;

  /* Brand colours */
  --pine:      #27431e;
  --pine-2:    #1c3016;
  --pine-l:    rgba(39,67,30,.08);
  --gold:      #c9a450;
  --gold-2:    #b89040;
  --gold-3:    #e3c47a;
  --gold-l:    rgba(201,164,80,.12);
  --gold-ll:   rgba(201,164,80,.06);

  /* Semantic */
  --success:  #1a7a40;
  --danger:   #b83228;
  --warn:     #b87333;

  /* Radii */
  --r:     14px;
  --r-sm:  9px;
  --r-lg:  20px;

  /* Shadows */
  --sh:    0 1px 2px rgba(0,0,0,.04), 0 3px 12px rgba(0,0,0,.05);
  --sh-md: 0 4px 24px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --sh-lg: 0 16px 48px rgba(0,0,0,.11), 0 2px 8px rgba(0,0,0,.05);
  --sh-gold: 0 4px 20px rgba(201,164,80,.22);

  /* Type */
  --ff-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-display: 'Cormorant Garamond', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-ui);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.admin-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.admin-sidebar {
  width: var(--sb-w);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--sb-border);
  position: relative;
}
.admin-sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 280px;
  background: radial-gradient(ellipse at 30% 0%, rgba(201,164,80,.08) 0%, transparent 65%);
  pointer-events: none;
}
.admin-sidebar::-webkit-scrollbar { width: 3px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

/* Brand strip */
.sidebar-brand {
  padding: 26px 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-size: 14px; font-weight: 600; font-style: italic;
  color: #06100a;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(201,164,80,.3);
  letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-size: 13.5px; font-weight: 600;
  color: rgba(255,255,255,.92);
  letter-spacing: -.01em;
  line-height: 1.2;
}
.brand-sub {
  font-size: 9.5px; font-weight: 500;
  color: rgba(255,255,255,.28);
  text-transform: uppercase; letter-spacing: .14em;
  line-height: 1;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 8px 10px 10px; position: relative; z-index: 1; }

.nav-group-label {
  padding: 16px 10px 5px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.22);
}
.nav-divider { height: 1px; background: var(--sb-border); margin: 8px 10px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  margin-bottom: 1.5px;
  background: none;
  border: none;
  color: rgba(255,255,255,.42);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--ff-ui);
  font-weight: 400;
  text-align: left;
  transition: background .16s, color .16s;
  white-space: nowrap;
  position: relative;
}
.nav-item::after {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-3), var(--gold));
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s;
}
.nav-item:hover  { background: var(--sb-hover); color: rgba(255,255,255,.72); }
.nav-item.active {
  background: var(--sb-active);
  color: rgba(255,255,255,.95);
  font-weight: 500;
}
.nav-item.active::after { opacity: 1; }
.nav-icon {
  font-size: 13.5px; width: 19px; text-align: center;
  flex-shrink: 0;
  color: inherit;
  transition: color .16s;
}
.nav-item.active .nav-icon { color: var(--gold-3); }

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.sidebar-footer-live {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--sb-border);
  border-radius: 7px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
  animation: pulse-live 2.4s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.sidebar-footer-live span { font-size: 11px; color: rgba(255,255,255,.35); }
.btn-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 13px;
  background: none;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.38);
  cursor: pointer;
  font-family: var(--ff-ui);
  font-size: 12.5px;
  transition: all .2s;
}
.btn-logout:hover {
  border-color: rgba(184,50,40,.4);
  color: rgba(255,110,90,.8);
  background: rgba(184,50,40,.08);
}

/* ══════════════════════════════════════════
   MAIN AREA
══════════════════════════════════════════ */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* Topbar */
.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 30px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
}
.admin-topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold) 0%, transparent 40%);
  opacity: .35;
}
.topbar-left { flex: 1; display: flex; align-items: center; gap: 10px; }
.topbar-eyebrow {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  opacity: .7;
}
.topbar-title {
  font-family: var(--ff-display);
  font-size: 20px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-live-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: rgba(26,122,64,.07);
  border: 1px solid rgba(26,122,64,.18);
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  color: var(--success);
}
.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pine) 0%, #4a7040 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  letter-spacing: .05em;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  font-family: var(--ff-ui);
}

/* Content area */
.admin-content { flex: 1; overflow-y: auto; padding: 28px; }
.admin-content::-webkit-scrollbar { width: 5px; }
.admin-content::-webkit-scrollbar-thumb { background: var(--canvas-2); border-radius: 4px; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold-l), transparent 60%);
}

/* ══════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════ */
.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.sec-header h2 {
  font-family: var(--ff-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-ll);
  border: 1px solid var(--border-warm);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px; font-weight: 600;
  color: var(--gold-2);
  font-family: var(--ff-ui);
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-adm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--ff-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .12s;
  white-space: nowrap;
}
.btn-adm:active { transform: translateY(1px); }

.btn-primary {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
  box-shadow: 0 1px 3px rgba(27,48,22,.35);
}
.btn-primary:hover {
  background: var(--pine-2);
  border-color: var(--pine-2);
  box-shadow: 0 2px 8px rgba(27,48,22,.35);
}
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #a02820; }
.btn-ghost   { background: transparent; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover   { border-color: rgba(39,67,30,.3); background: var(--pine-l); color: var(--pine); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #fff;
  border-color: var(--gold-2);
  box-shadow: var(--sh-gold);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-3) 0%, var(--gold) 100%);
  box-shadow: 0 6px 24px rgba(201,164,80,.3);
}
.btn-sm { padding: 5.5px 13px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }

/* ══════════════════════════════════════════
   TABLES
══════════════════════════════════════════ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.admin-table th {
  text-align: left;
  padding: 9px 14px;
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold-2);
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
}
.admin-table th:first-child { border-radius: var(--r-sm) 0 0 0; }
.admin-table th:last-child  { border-radius: 0 var(--r-sm) 0 0; }
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .12s; }
.admin-table tbody tr:hover td { background: var(--gold-ll); }

.table-thumb {
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--canvas-2);
  display: block;
  border: 1px solid var(--border);
}
.id-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  background: var(--canvas-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 10px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--ink-3);
  letter-spacing: .03em;
}
.cell-muted { color: var(--ink-3); }
.cell-truncate { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.cell-id { font-family: 'SF Mono','Fira Code',monospace; font-size: 12px; color: var(--ink-3); }
.pg-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pg-bar button:disabled { opacity: .35; cursor: not-allowed; }
.pg-info { flex: 1; text-align: center; font-size: 13px; color: var(--ink-3); }
.pg-nums { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.pg-num { min-width: 26px; width: 26px; padding: 0; height: 26px; border-radius: 50% !important; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.pg-num.active { background: var(--gold) !important; color: #06100a !important; font-weight: 700; pointer-events: none; }
.pg-ellipsis { font-size: 13px; color: var(--ink-3); padding: 0 2px; line-height: 32px; }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form-group { margin-bottom: 22px; }
.form-group > label {
  display: block;
  margin-bottom: 7px;
  font-size: 10.5px; font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--ff-ui);
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  appearance: auto;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,164,80,.14);
}
.form-group textarea { resize: vertical; min-height: 90px; line-height: 1.65; }
.form-hint { margin-top: 5px; font-size: 11.5px; color: var(--ink-4); }
.form-hint code { background: var(--canvas); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 11px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-actions {
  display: flex; gap: 10px; align-items: center;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--border-2);
}
.form-section-title {
  margin: 28px 0 18px;
  padding: 10px 14px;
  background: linear-gradient(to right, var(--gold-ll), transparent 70%);
  border-left: 2.5px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--gold-2);
  display: flex; align-items: center; gap: 8px;
}
.form-section-title::before {
  content: '—';
  opacity: .5;
}

/* ══════════════════════════════════════════
   IMAGE UPLOAD ZONE
══════════════════════════════════════════ */
.img-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-3);
  transition: border-color .2s, background .2s;
}
.img-upload-zone:hover:not(.has-image) {
  border-color: var(--gold);
  background: var(--gold-ll);
}
.img-upload-zone.drag-over { border-color: var(--gold); background: var(--gold-l); }
.img-upload-zone.has-image {
  border: 1px solid var(--border);
  cursor: default;
  min-height: 210px;
}
.img-preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r) - 1px);
}
.img-upload-placeholder {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  pointer-events: none; padding: 20px;
  text-align: center;
}
.img-upload-placeholder svg { color: var(--ink-4); }
.img-upload-placeholder p { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.img-upload-placeholder small { font-size: 11px; color: var(--ink-4); }
.img-upload-actions {
  position: absolute; bottom: 10px; right: 10px;
  display: flex; gap: 6px; z-index: 3;
}
.img-btn-change {
  padding: 5px 13px; border: none; border-radius: 7px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-family: var(--ff-ui); font-size: 12px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(10px);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: background .15s;
}
.img-btn-change:hover { background: #fff; }
.img-btn-remove {
  padding: 5px 10px; border: none; border-radius: 7px;
  background: rgba(184,50,40,.88); color: #fff;
  font-family: var(--ff-ui); font-size: 12px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(10px);
  transition: background .15s;
}
.img-btn-remove:hover { background: var(--danger); }

/* Gallery image picker (landing thumbnail selector) */
.gallery-picker { margin-top: 10px; }
.gallery-picker-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 8px;
}
.gallery-picker-thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.gallery-picker-item { position: relative; flex-shrink: 0; }
.gallery-picker-thumb {
  display: block;
  width: 62px; height: 62px; object-fit: cover;
  border-radius: 7px; border: 2px solid var(--border);
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.gallery-picker-thumb:hover { border-color: var(--gold-2); transform: scale(1.06); }
.gallery-picker-thumb.selected {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-l);
}
.gallery-picker-del {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(20,20,20,.75); color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.gallery-picker-del:hover { background: var(--danger); transform: scale(1.15); }

/* Gallery */
.gallery-zone { padding: 14px; background: var(--canvas); border: 1px solid var(--border); border-radius: var(--r); }
.gallery-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px; min-height: 72px; align-items: flex-start;
}
.gallery-thumb-wrap {
  position: relative;
  width: 88px; height: 66px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); flex-shrink: 0;
}
.gallery-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-del {
  position: absolute; top: 5px; right: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(20,20,20,.72); color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  backdrop-filter: blur(4px);
}
.gallery-del:hover { background: var(--danger); transform: scale(1.12); }
.gallery-add-btn {
  width: 88px; height: 66px;
  border: 2px dashed var(--border); border-radius: 8px;
  background: transparent; color: var(--ink-4); font-size: 22px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.gallery-add-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-ll); }
.gallery-url-row {
  display: flex; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border); align-items: center;
}
.gallery-url-input { flex: 1; padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; font-family: var(--ff-ui); }
.gallery-url-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,80,.12); }
.gallery-url-add { padding: 7px 12px; background: var(--pine); color: #fff; border: none; border-radius: 7px; font-size: 12.5px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.gallery-url-add:hover { background: var(--pine-2); }

/* Video upload */
.video-upload-zone { border: 1px solid var(--border); border-radius: var(--r); padding: 18px; background: var(--canvas); }
.video-preview-wrap { margin-bottom: 12px; border-radius: 8px; overflow: hidden; background: #000; }
.video-preview-wrap video { display: block; width: 100%; max-height: 200px; object-fit: contain; }
.video-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 24px; text-align: center; color: var(--ink-4);
  border: 2px dashed var(--border); border-radius: 8px; margin-bottom: 12px; background: #fff;
}
.video-placeholder p { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.video-placeholder small { font-size: 11.5px; }
.video-upload-row { display: flex; gap: 10px; align-items: center; }
.video-filename { font-size: 12px; color: var(--ink-3); font-style: italic; }

/* ══════════════════════════════════════════
   DASHBOARD v2 — Luxury Edition
══════════════════════════════════════════ */
.dbv2 { display: flex; flex-direction: column; gap: 18px; }

/* ── Hero ── */
.dbv2-hero {
  position: relative;
  background: linear-gradient(135deg, #06100a 0%, #0e1d0c 45%, #182d13 100%);
  border-radius: var(--r-lg);
  padding: 36px 40px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.22), 0 1px 0 rgba(201,164,80,.15);
}
.dbv2-hero-mesh {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(201,164,80,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,164,80,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.dbv2-hero-glow {
  position: absolute; top: -60px; right: 160px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,164,80,.13) 0%, transparent 65%);
  pointer-events: none;
}
.dbv2-hero-left { position: relative; z-index: 1; flex: 1; }
.dbv2-hero-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-3); opacity: .75; margin-bottom: 14px;
}
.dbv2-live-ring {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  box-shadow: 0 0 8px rgba(74,222,128,.7);
  animation: pulse-live 2.4s ease-in-out infinite;
}
.dbv2-hero-title {
  font-family: var(--ff-display);
  font-size: 34px; font-weight: 500; line-height: 1.15;
  color: #fff; letter-spacing: -.02em; margin-bottom: 10px;
}
.dbv2-hero-title em { color: var(--gold-3); font-style: italic; }
.dbv2-hero-sub { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.55; margin-bottom: 8px; }
.dbv2-hero-date { font-size: 11px; color: rgba(255,255,255,.28); letter-spacing: .04em; margin-bottom: 22px; }
.dbv2-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dbv2-btn-primary {
  padding: 9px 20px; border-radius: 8px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #06100a; font-size: 12.5px; font-weight: 700; font-family: var(--ff-ui);
  letter-spacing: .02em;
  box-shadow: 0 2px 12px rgba(201,164,80,.35);
  transition: filter .18s, transform .18s, box-shadow .18s;
}
.dbv2-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(201,164,80,.45); }
.dbv2-btn-ghost {
  padding: 9px 20px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.72); font-size: 12.5px; font-weight: 500; font-family: var(--ff-ui);
  transition: background .18s, border-color .18s;
}
.dbv2-btn-ghost:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }

.dbv2-hero-right {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.dbv2-monogram {
  font-family: var(--ff-display);
  font-size: 72px; font-style: italic; font-weight: 500;
  line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--gold-3) 0%, var(--gold) 50%, rgba(201,164,80,.35) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
  filter: drop-shadow(0 2px 16px rgba(201,164,80,.3));
}
.dbv2-hero-total {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 24px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,164,80,.18);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.dbv2-total-num {
  font-family: var(--ff-display);
  font-size: 32px; font-weight: 500; line-height: 1;
  color: var(--gold-3);
}
.dbv2-total-lbl { font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.32); }

/* ── KPI tiles ── */
.dbv2-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.dbv2-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 18px 16px 14px;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.dbv2-kpi::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,164,80,.04) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
}
.dbv2-kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--border-warm); }
.dbv2-kpi:hover::after { opacity: 1; }
.dbv2-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dbv2-kpi-icon { font-size: 16px; color: var(--gold); opacity: .8; }
.dbv2-kpi-arrow { font-size: 12px; color: var(--gold); opacity: 0; transition: opacity .18s; }
.dbv2-kpi:hover .dbv2-kpi-arrow { opacity: 1; }
.dbv2-kpi-num {
  font-family: var(--ff-display);
  font-size: 36px; font-weight: 500; line-height: 1;
  color: var(--pine); letter-spacing: -.03em; margin-bottom: 6px;
}
.dbv2-kpi-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 4px;
}
.dbv2-kpi-desc { font-size: 10.5px; color: var(--ink-4); line-height: 1.4; margin-bottom: 10px; }
.dbv2-kpi-bar { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.dbv2-kpi-fill { height: 100%; background: linear-gradient(to right, var(--gold), var(--gold-3)); border-radius: 2px; transition: width .5s ease; }

/* ── Body grid ── */
.dbv2-body { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.dbv2-right-col { display: flex; flex-direction: column; gap: 14px; }

/* ── Panel ── */
.dbv2-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  overflow: hidden;
}
.dbv2-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-2);
}
.dbv2-panel-title {
  font-family: var(--ff-display);
  font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -.01em;
}
.dbv2-panel-sub { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }

/* ── Inventory table ── */
.dbv2-inv-table { width: 100%; border-collapse: collapse; }
.dbv2-inv-table thead th {
  padding: 9px 16px;
  font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4); text-align: left; background: var(--surface-3);
  border-bottom: 1px solid var(--border-2);
}
.dbv2-inv-row {
  cursor: pointer; transition: background .14s;
  border-bottom: 1px solid var(--border-2);
}
.dbv2-inv-row:last-child { border-bottom: none; }
.dbv2-inv-row:hover { background: var(--gold-ll); }
.dbv2-inv-row td { padding: 13px 16px; vertical-align: middle; }
.dbv2-inv-icon { margin-right: 8px; color: var(--gold); font-size: 13px; }
.dbv2-inv-desc { font-size: 12px; color: var(--ink-4); }
.dbv2-inv-count {
  font-family: var(--ff-display);
  font-size: 20px; font-weight: 500; color: var(--pine);
}
.dbv2-inv-go { font-size: 11.5px; color: var(--gold-2); font-weight: 600; white-space: nowrap; }

/* Badges */
.dbv2-badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
}
.dbv2-badge-ok   { background: rgba(26,122,64,.10);  color: #1a7a40; border: 1px solid rgba(26,122,64,.18); }
.dbv2-badge-info { background: rgba(39,67,200,.09);  color: #2743c8; border: 1px solid rgba(39,67,200,.16); }
.dbv2-badge-warn { background: rgba(184,115,51,.10); color: var(--warn); border: 1px solid rgba(184,115,51,.18); }

/* ── Action list ── */
.dbv2-action-list { padding: 6px 0; }
.dbv2-action {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; cursor: pointer;
  transition: background .14s;
  border-bottom: 1px solid var(--border-2);
}
.dbv2-action:last-child { border-bottom: none; }
.dbv2-action:hover { background: var(--gold-ll); }
.dbv2-action-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gold-l); color: var(--gold-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.dbv2-action-text { flex: 1; min-width: 0; }
.dbv2-action-label { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.dbv2-action-sub { font-size: 11px; color: var(--ink-4); }
.dbv2-action-arr { font-size: 13px; color: var(--gold-2); opacity: 0; transition: opacity .15s, transform .15s; }
.dbv2-action:hover .dbv2-action-arr { opacity: 1; transform: translateX(2px); }

/* ── System panel ── */
.dbv2-sys-panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.dbv2-sys-row { display: flex; align-items: center; gap: 10px; }
.dbv2-sys-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
  animation: pulse-live 2.4s ease-in-out infinite;
}
.dbv2-dot-gold { background: var(--gold); box-shadow: 0 0 6px rgba(201,164,80,.5); animation: none; }
.dbv2-dot-blue { background: #60a5fa; box-shadow: 0 0 6px rgba(96,165,250,.5); animation: none; }
.dbv2-sys-lbl { font-size: 11.5px; color: var(--ink-4); flex: 1; }
.dbv2-sys-val { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.dbv2-sys-val code {
  background: rgba(39,67,30,.1); border-radius: 4px;
  padding: 1px 6px; font-size: 11px;
  font-family: 'SF Mono','Fira Code', monospace;
  color: var(--pine);
}

/* ══════════════════════════════════════════
   TESTIMONIALS EDITOR (landing page)
══════════════════════════════════════════ */
.testi-editor { display: flex; flex-direction: column; gap: 14px; }
.testi-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.testi-card:hover { border-color: var(--border-warm); box-shadow: var(--sh); }
.testi-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.testi-card-num {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-2);
  display: flex; align-items: center; gap: 6px;
}
.testi-card-num::before { content: ''; width: 16px; height: 1.5px; background: var(--gold); border-radius: 2px; }
.testi-del-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--border); border-radius: 6px;
  background: none; color: var(--ink-4);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all .15s;
}
.testi-del-btn:hover { border-color: rgba(184,50,40,.4); color: var(--danger); background: rgba(184,50,40,.06); }
.testi-add-row {
  display: flex; justify-content: center; padding: 14px 0 2px;
}
.testi-add-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border: 1.5px dashed var(--border-warm);
  border-radius: var(--r-sm);
  background: var(--gold-ll);
  color: var(--gold-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s;
  font-family: var(--ff-ui);
}
.testi-add-btn:hover { border-color: var(--gold); background: var(--gold-l); }

/* ══════════════════════════════════════════
   CLIENTS
══════════════════════════════════════════ */
.clients-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.client-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px; font-weight: 500;
  transition: border-color .15s;
}
.client-chip:hover { border-color: var(--border-warm); }
.client-chip button { border: none; background: none; cursor: pointer; color: var(--ink-4); font-size: 15px; line-height: 1; padding: 0; display: flex; align-items: center; }
.client-chip button:hover { color: var(--danger); }
.client-add-row { display: flex; gap: 8px; align-items: center; }
.client-add-input {
  flex: 1; padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--ff-ui); font-size: 13.5px;
}
.client-add-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,80,.12); }

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--ink-4);
}
.empty-state p { font-size: 13.5px; margin-top: 8px; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.admin-toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 13px 20px 13px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(90px);
  opacity: 0;
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .28s;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  max-width: 340px;
  border: 1px solid rgba(255,255,255,.07);
}
.admin-toast::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}
.admin-toast.show { transform: translateY(0); opacity: 1; }
.admin-toast.success::before { background: #4ade80; }
.admin-toast.error::before   { background: #f87171; }
.admin-toast.warn::before    { background: #fbbf24; }

/* ══════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--canvas);
  background-image:
    radial-gradient(ellipse at 72% 22%, rgba(201,164,80,.09) 0%, transparent 50%),
    radial-gradient(ellipse at 18% 82%, rgba(39,67,30,.07) 0%, transparent 50%);
}
.login-wrap { width: 100%; max-width: 390px; padding: 24px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-mark {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-size: 22px; font-weight: 600; font-style: italic;
  color: #06100a;
  margin: 0 auto 18px;
  box-shadow: var(--sh-gold);
}
.login-logo h1 {
  font-family: var(--ff-display);
  font-size: 26px; font-weight: 500;
  letter-spacing: -.01em; color: var(--ink);
}
.login-logo p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; letter-spacing: .04em; }
.login-card { padding: 30px; }
.login-card h2 {
  font-family: var(--ff-display);
  font-size: 18px; font-weight: 500;
  margin-bottom: 22px; color: var(--ink);
}
.login-error {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 16px;
  background: rgba(184,50,40,.07);
  border: 1px solid rgba(184,50,40,.22);
  border-radius: var(--r-sm);
  color: var(--danger); font-size: 13px;
}
.login-submit { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }
.login-back { text-align: center; margin-top: 22px; font-size: 13px; }
.login-back a { color: var(--ink-3); text-decoration: none; transition: color .15s; }
.login-back a:hover { color: var(--gold-2); }

/* ══════════════════════════════════════════
   BACK BREADCRUMB
══════════════════════════════════════════ */
.back-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-3); cursor: pointer;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 7px; transition: all .15s;
  border: 1px solid transparent;
}
.back-crumb:hover { color: var(--ink); border-color: var(--border); background: var(--surface); }

/* ══════════════════════════════════════════
   TABS
══════════════════════════════════════════ */
.adm-tab-nav {
  display: flex;
  flex-wrap: wrap;
  margin: -26px -26px 26px;
  padding: 0 6px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
}
/* When a title h3 precedes the form, push the tab bar down for breathing room */
h3 ~ form .adm-tab-nav { margin-top: 16px; }
.adm-tab-btn {
  padding: 13px 16px;
  border: none;
  background: none;
  font-family: var(--ff-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  line-height: 1;
}
.adm-tab-btn:hover { color: var(--ink-2); border-bottom-color: var(--border-warm); }
.adm-tab-btn.active { color: var(--pine); border-bottom-color: var(--gold); font-weight: 600; }

.adm-tab-panel { display: none; }
.adm-tab-panel.active { display: block; }

/* ══════════════════════════════════════════
   STICKY SAVE BAR
══════════════════════════════════════════ */
.form-sticky-bar {
  position: sticky;
  bottom: 0;
  margin: 48px -26px -26px;
  padding: 14px 26px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 10;
  border-radius: 0 0 var(--r) var(--r);
}

/* ══════════════════════════════════════════
   COMPACT FORM VARIANT
══════════════════════════════════════════ */
.form-compact .form-group { margin-bottom: 15px; }
.form-compact .form-section-title { margin: 20px 0 14px; }
.form-compact .form-row { gap: 14px; }

/* ══════════════════════════════════════════
   RESET ROW
══════════════════════════════════════════ */
.reset-row { margin-top: 12px; display: flex; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .dbv2-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --sb-w: 210px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-welcome-mark { display: none; }
  .dbv2-body { grid-template-columns: 1fr; }
  .dbv2-hero { flex-direction: column; align-items: flex-start; }
  .dbv2-hero-right { flex-direction: row; align-self: stretch; justify-content: center; }
  .dbv2-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .admin-sidebar { display: none; }
  .admin-content { padding: 16px; }
  .dbv2-kpis { grid-template-columns: 1fr 1fr; }
  .dbv2-hero { padding: 24px 20px; }
  .dbv2-monogram { font-size: 48px; }
}

/* ─── Error Popup ─── */
.err-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.err-popup {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px 24px;
  max-width: 380px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  text-align: center;
}
.err-popup-icon {
  font-size: 36px; line-height: 1; margin-bottom: 14px;
}
.err-popup-title {
  font-size: 16px; font-weight: 700; color: #1a1a1a;
  margin-bottom: 8px; letter-spacing: -.01em;
}
.err-popup-msg {
  font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 22px;
}
.err-popup-btn {
  background: #c0392b; color: #fff;
  border: none; border-radius: 7px;
  padding: 9px 28px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.err-popup-btn:hover { background: #a93226; }

/* ─── Form Popup Modal (for Add/Edit records) ─── */
.form-popup-modal {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .2s ease-out forwards;
}
@keyframes modalIn {
  0% { opacity: 0; transform: translateY(15px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.form-popup-head {
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.form-popup-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
}
.form-popup-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.form-popup-body .form-group { margin-bottom: 16px; }
.form-popup-body .form-group input,
.form-popup-body .form-group select {
  padding: 11px 14px;
  min-height: 42px;
  font-size: 13.5px;
}
.form-popup-body .form-row,
.form-popup-body .form-row-3 { gap: 14px; }
.form-actions {
  display: flex; gap: 12px; margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border-2);
}

/* ─── Country Combobox ─── */
.cty-wrap { position: relative; }
.cty-wrap input[type="text"] { width: 100%; }
.cty-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface-2, #1c1f1c);
  border: 1px solid var(--border, #2e332e);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: none;
}
.cty-dropdown.open { display: block; }
.cty-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #000;
  transition: background .12s;
}
.cty-item:hover, .cty-item.active {
  background: var(--surface-3, #252825);
}
.cty-flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.cty-name { flex: 1; }
.cty-code { font-size: 11px; color: #555; font-family: monospace; }

/* ── Phases Editor ── */
.phases-editor { display: flex; flex-direction: column; gap: 12px; }
.phase-row {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
}
.phase-row-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #06100a; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.phase-row-fields { flex: 1; min-width: 0; }
.phase-row-fields .form-group { margin-bottom: 10px; }
.phase-del-btn { flex-shrink: 0; margin-top: 2px; }
.phase-img-upload-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.phase-img-pick { display: inline-flex; align-items: center; gap: 6px; }
.ph-img-preview {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  flex-shrink: 0;
}
.ph-img-empty { background: var(--surface-2); display: block; }
.phase-img-group { margin-top: 10px; }

/* ══════════════════════════════════════════
   ENTERPRISE EXTENSIONS — native to panel
══════════════════════════════════════════ */

/* ── Dark mode overrides ── */
html.dark-mode {
  --canvas:     #0e1610;
  --canvas-2:   #111a13;
  --surface:    #141f16;
  --surface-2:  #182019;
  --surface-3:  #1c2620;
  --border:     rgba(255,255,255,.09);
  --border-2:   rgba(255,255,255,.05);
  --border-warm:rgba(201,164,80,.14);
  --ink:        #e8ede8;
  --ink-2:      #c4cfc4;
  --ink-3:      #8fa08f;
  --ink-4:      #5a705a;
}
html.dark-mode .admin-topbar,
html.dark-mode .card,
html.dark-mode .adm-tab-panel { background: var(--surface); }
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border);
}
html.dark-mode .admin-table thead th { background: var(--surface-2); }
html.dark-mode .admin-table tbody tr:hover { background: var(--surface-3); }
html.dark-mode .dbv2-panel { background: var(--surface); border-color: var(--border); }
html.dark-mode .dbv2-kpi { background: var(--surface); border-color: var(--border); }

/* ── Global search ── */
.topbar-search-wrap {
  position: relative;
  margin-left: 14px;
}
.topbar-search {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  width: 220px;
  transition: border-color .18s, box-shadow .18s;
}
.topbar-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ll);
}
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  z-index: 900;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}
.search-results.open { display: block; }
.sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border-2);
  transition: background .14s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--surface-2); }
.sr-icon { font-size: 14px; color: var(--gold); flex-shrink: 0; width: 20px; text-align: center; }
.sr-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.sr-sub   { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.sr-empty { padding: 16px; text-align: center; color: var(--ink-4); font-size: 13px; }

/* ── adm-select (reusable) ── */
.adm-select {
  height: 34px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--ff-ui); font-size: 13px; color: var(--ink);
  outline: none; cursor: pointer;
}

/* ── Media library grid ── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.media-tile {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  transition: box-shadow .18s;
}
.media-tile:hover { box-shadow: var(--sh-md); }
.media-tile-img {
  width: 100%; aspect-ratio: 1;
  background-size: cover; background-position: center;
  background-color: var(--canvas-2);
}
.media-tile-info {
  padding: 7px 9px 4px;
}
.media-tile-name { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.media-tile-size { font-size: 10.5px; color: var(--ink-4); }
.media-tile-actions {
  padding: 4px 9px 8px;
}

/* ── Audit log action badges (extend existing dbv2-badge) ── */
.dbv2-badge-info {
  background: rgba(59,130,246,.12);
  color: #3b82f6;
  border: 1px solid rgba(59,130,246,.2);
}

/* ══════════════════════════════════════════════════════
   PHASE 3 — ENHANCED MEDIA LIBRARY
   ══════════════════════════════════════════════════════ */

.media-tile {
  position: relative;
  cursor: pointer;
}
.media-tile.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-l), var(--sh-md);
}
.media-tile-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 9.5px;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--ff-ui);
  backdrop-filter: blur(4px);
}

/* Meta side panel */
.media-meta-panel {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}
.meta-panel-inner {
  pointer-events: all;
  width: 340px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border-warm);
  box-shadow: var(--sh-lg);
  overflow-y: auto;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.meta-panel-head {
  display: flex; align-items: center; justify-content: space-between;
}
.meta-panel-title {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  word-break: break-all;
}
.meta-close-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--ink-3); padding: 2px 6px;
  border-radius: 6px; transition: background .14s;
}
.meta-close-btn:hover { background: var(--surface-3); }
.meta-preview-img {
  width: 100%; border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  object-fit: cover; max-height: 220px;
}
.meta-info-grid {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  overflow: hidden;
}
.meta-info-row {
  display: flex; justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-2);
  font-size: 12px;
}
.meta-info-row:last-child { border-bottom: none; }
.meta-info-row span:first-child { color: var(--ink-3); }
.meta-info-row span:last-child  { color: var(--ink-2); font-weight: 500; }
.meta-panel-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 4px;
}

/* ══════════════════════════════════════════════════════
   PHASE 2 — USERS & ROLES STYLES
   ══════════════════════════════════════════════════════ */

.perm-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
  margin-top: 8px;
}
.perm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s;
  font-size: 13px;
}
.perm-row:hover { background: var(--surface-2); border-color: var(--border-2); }
.perm-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--pine);
  cursor: pointer;
  flex-shrink: 0;
}
.perm-mod {
  font-weight: 500; color: var(--ink-2);
  font-family: monospace; font-size: 12px;
}
.perm-desc { font-size: 11.5px; color: var(--ink-4); }

/* btn-danger */
.btn-danger {
  background: rgba(184,50,40,.09);
  color: var(--danger);
  border: 1px solid rgba(184,50,40,.18);
}
.btn-danger:hover {
  background: rgba(184,50,40,.16);
  border-color: rgba(184,50,40,.3);
}

/* ══════════════════════════════════════════════════════
   PHASE 4 — LUXURY UI/UX REFINEMENTS
   ══════════════════════════════════════════════════════ */

/* ── Skeleton loading states ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--canvas-2) 25%, var(--surface-3) 50%, var(--canvas-2) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 6px;
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.wide  { width: 80%; }
.skeleton-line.med   { width: 55%; }
.skeleton-line.short { width: 32%; }
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}

/* ── Smooth page transitions ── */
#adminContent > * {
  animation: fadeSlideIn .22s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Refined card hover ── */
.dbv2-kpi {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dbv2-kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}
.dbv2-action {
  transition: background .14s, transform .14s;
}
.dbv2-action:hover {
  background: var(--gold-ll);
  transform: translateX(3px);
}

/* ── Table row microinteraction ── */
.admin-table tbody tr {
  transition: background .12s;
}
.admin-table tbody tr:hover {
  background: var(--gold-ll);
}
.dbv2-inv-row {
  transition: background .12s;
}
.dbv2-inv-row:hover {
  background: var(--gold-ll);
}

/* ── Enhanced form inputs ── */
.adm-form input[type="text"],
.adm-form input[type="email"],
.adm-form input[type="password"],
.adm-form input[type="search"],
.adm-form textarea,
.adm-form .adm-select,
.form-input {
  transition: border-color .16s, box-shadow .16s;
}
.adm-form input:focus,
.adm-form textarea:focus,
.adm-form .adm-select:focus,
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ll);
  outline: none;
}

/* ── Premium button refinements ── */
.btn-primary, .btn-adm.btn-primary,
.dbv2-btn-primary {
  transition: transform .14s, box-shadow .14s, background .14s;
}
.btn-primary:hover, .btn-adm.btn-primary:hover,
.dbv2-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-gold);
}
.btn-primary:active, .btn-adm.btn-primary:active {
  transform: translateY(0);
}

/* ── Sidebar nav active indicator ── */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-item { position: relative; }

/* ── Topbar refinement ── */
.admin-topbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(242,239,232,.88);
  border-bottom: 1px solid var(--border);
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.14); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.22); }

/* ── Media panel in dark mode ── */
html.dark-mode .meta-panel-inner {
  background: var(--surface);
  border-left-color: var(--border);
}
html.dark-mode .perm-row:hover { background: rgba(255,255,255,.05); }
html.dark-mode .admin-topbar {
  background: rgba(12,26,16,.88);
  border-bottom-color: var(--sb-border);
}
html.dark-mode ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }

/* ══════════════════════════════════════════════════════
   PHASE 4 — SEARCH RELOCATED INTO SECTION HEADER
   ══════════════════════════════════════════════════════ */

.sec-header-lux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-2);
}
.sec-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}
.sec-header-left h2 {
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -.01em;
  font-size: 24px;
  color: var(--ink);
  white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.sec-header-search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 200px;
}
.sec-header-search {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.sec-header-search::placeholder { color: var(--ink-4); }
.sec-header-search:focus {
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--gold-ll);
}
.sec-header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--ink-4);
  pointer-events: none;
}
.sec-header-results {
  width: 100%;
  left: 0;
  top: calc(100% + 6px);
}

@media (max-width: 720px) {
  .sec-header-lux { flex-direction: column; align-items: flex-start; }
  .sec-header-left { flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; }
  .sec-header-search-wrap { max-width: 100%; width: 100%; }
}

/* hide legacy topbar search if any leftover */
.topbar-search-wrap { display: none !important; }

/* ══════════════════════════════════════════════════════
   PHASE 5 — IMAGE UPLOAD METADATA MODAL
   ══════════════════════════════════════════════════════ */

.upload-meta-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13, 22, 11, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: background .22s ease, backdrop-filter .22s ease, opacity .22s ease;
}
.upload-meta-overlay.open {
  background: rgba(13, 22, 11, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  pointer-events: all;
}
.upload-meta-modal {
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow: hidden;
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border-warm);
  box-shadow: 0 30px 80px rgba(0,0,0,.28), 0 4px 16px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(.97);
  opacity: 0;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.upload-meta-overlay.open .upload-meta-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.upload-meta-head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--border-2);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.upload-meta-title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 2px;
}
.upload-meta-sub {
  font-size: 12.5px;
  color: var(--ink-3);
}
.upload-meta-close {
  background: transparent;
  border: 1px solid var(--border-2);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-3);
  transition: background .14s, border-color .14s, color .14s;
}
.upload-meta-close:hover {
  background: var(--surface-3);
  color: var(--ink);
  border-color: var(--border);
}
.upload-meta-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 24px 26px 22px;
  overflow-y: auto;
}
.upload-meta-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.upload-meta-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: var(--canvas-2);
  box-shadow: var(--sh);
}
.upload-meta-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: monospace;
}
.upload-meta-dot { color: var(--ink-4); }
.upload-meta-pathwrap {
  display: flex; gap: 6px; align-items: stretch;
}
.upload-meta-path {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: var(--surface-3);
  font-family: monospace;
  font-size: 11px;
  color: var(--ink-3);
  outline: none;
  cursor: text;
}
.upload-meta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.upload-meta-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upload-meta-form .form-input,
.upload-meta-form input[type="text"],
.upload-meta-form textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.upload-meta-form textarea { resize: vertical; line-height: 1.55; }
.upload-meta-form .form-input:focus,
.upload-meta-form input:focus,
.upload-meta-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ll);
}
.upload-meta-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.form-label-hint {
  color: var(--ink-4);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.upload-meta-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 12px;
}
.upload-meta-meta-lbl { color: var(--ink-3); }
.upload-meta-meta-val { color: var(--ink-2); font-weight: 500; }
.upload-meta-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-2);
  margin-top: 4px;
  padding-top: 14px;
}

@media (max-width: 720px) {
  .upload-meta-body { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .upload-meta-form .form-row { grid-template-columns: 1fr; }
}

html.dark-mode .upload-meta-modal { background: var(--sb-surface); border-color: var(--sb-border); }
html.dark-mode .upload-meta-head { background: linear-gradient(180deg, rgba(255,255,255,.02), transparent); }
html.dark-mode .upload-meta-path { background: rgba(255,255,255,.04); }

/* ══════════════════════════════════════════════════════
   PHASE 6 — EXTRA LUXURY POLISH
   ══════════════════════════════════════════════════════ */

/* Refined cards */
.card {
  border-radius: var(--r-lg);
}

/* Section header H2 weight refinement (works alongside sec-header-lux) */
.sec-header h2 {
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -.01em;
}

/* Refined badge inside header */
.sec-header h2 .badge {
  font-family: var(--ff-ui);
  font-size: 11px;
  font-weight: 500;
  background: var(--gold-ll);
  color: var(--gold-2);
  border: 1px solid var(--border-warm);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: .02em;
}

/* Premium primary button */
.btn-adm.btn-primary {
  background: linear-gradient(180deg, var(--pine), var(--pine-2));
  color: #fff;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.08);
}
.btn-adm.btn-primary:hover {
  filter: brightness(1.06);
}

/* Subtle gold focus ring on every interactive element */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Empty-state luxury polish */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
  font-family: var(--ff-display);
  font-size: 18px;
  font-style: italic;
}

/* ══════════════════════════════════════════════════════
   LUXURY EXECUTIVE DASHBOARD
   ══════════════════════════════════════════════════════ */

.lux-dash {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: fadeSlideIn .32s ease both;
}

/* ── Hero ── */
.lux-hero {
  position: relative;
  padding: 38px 42px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% -20%, rgba(201,164,80,.18) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(39,67,30,.12) 0%, transparent 50%),
    linear-gradient(135deg, #0d160b 0%, #1c3016 60%, #27431e 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 18px 48px rgba(13,22,11,.18), 0 4px 12px rgba(0,0,0,.06);
  border: 1px solid rgba(255,255,255,.05);
}
.lux-hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.03) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(201,164,80,.05) 0%, transparent 40%);
  pointer-events: none;
}
.lux-hero-glow {
  position: absolute;
  top: -100px; right: -80px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,164,80,.18) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.lux-hero-content { position: relative; z-index: 1; }
.lux-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.42);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 22px;
}
.lux-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: luxPulse 2s infinite;
}
@keyframes luxPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
  50%     { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}
.lux-hero-title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 8px;
}
.lux-hero-title em {
  color: var(--gold-3);
  font-style: italic;
  font-weight: 500;
}
.lux-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,.45);
  letter-spacing: .01em;
}
.lux-hero-actions {
  position: relative; z-index: 1;
  display: flex; gap: 10px; flex-shrink: 0;
}
.lux-btn-primary, .lux-btn-ghost {
  height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  font-family: var(--ff-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .16s, box-shadow .16s, background .16s;
}
.lux-btn-primary {
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2));
  color: #06100a;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(201,164,80,.32);
}
.lux-btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 22px rgba(201,164,80,.44); }
.lux-btn-primary span { font-size: 16px; line-height: 1; }
.lux-btn-ghost {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}
.lux-btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ── KPI cards ── */
.lux-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.lux-kpi-card {
  position: relative;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.lux-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity .22s;
}
.lux-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,.07);
  border-color: var(--border-warm);
}
.lux-kpi-card:hover::before { opacity: 1; }
.lux-kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.lux-kpi-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  background: var(--gold-ll);
  color: var(--gold-2);
  border: 1px solid var(--border-warm);
}
.lux-tint-pine .lux-kpi-icon { background: var(--pine-l); color: var(--pine); border-color: rgba(39,67,30,.18); }
.lux-tint-blue .lux-kpi-icon { background: rgba(59,130,246,.08); color: #3b82f6; border-color: rgba(59,130,246,.18); }
.lux-tint-ok   .lux-kpi-icon { background: rgba(26,122,64,.08); color: #1a7a40; border-color: rgba(26,122,64,.18); }
.lux-tint-warn .lux-kpi-icon { background: rgba(184,115,51,.10); color: #b87333; border-color: rgba(184,115,51,.20); }

.lux-kpi-arr {
  font-size: 13px; color: var(--ink-4);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .2s, transform .2s, color .2s;
}
.lux-kpi-card:hover .lux-kpi-arr { opacity: 1; transform: translateX(0); color: var(--gold-2); }
.lux-kpi-num {
  font-family: var(--ff-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.lux-kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -.005em;
  margin-bottom: 3px;
}
.lux-kpi-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.4;
}

/* ── Panels ── */
.lux-panel {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.02), 0 4px 14px rgba(0,0,0,.03);
}
.lux-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
}
.lux-panel-title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.lux-panel-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 3px;
}

.lux-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.lux-grid-3-2 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.lux-grid-3-2 > div:nth-child(1) { grid-column: span 3; }
.lux-grid-3-2 > div:nth-child(2) { grid-column: span 2; }

.lux-grid-2-2-1 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.lux-grid-2-2-1 > div:nth-child(1) { grid-column: span 2; }
.lux-grid-2-2-1 > div:nth-child(2) { grid-column: span 2; }
.lux-grid-2-2-1 > div:nth-child(3) { grid-column: span 1; }

/* ── Quick Actions Redesign ── */
.lux-qa-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 8px;
}
.lux-qa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.lux-qa-item:hover {
  background: var(--pine-l);
  border-color: var(--pine);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 67, 30, 0.08);
}
.lux-qa-icon {
  color: var(--gold-2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  background: rgba(201, 164, 80, 0.1);
  border-radius: 8px;
}
.lux-qa-icon svg {
  width: 16px;
  height: 16px;
}
.lux-qa-item span:last-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ── Audit activity sparkline ── */
.lux-chart-area {
  display: flex; flex-direction: column; gap: 8px;
}
.lux-spark-svg {
  width: 100%; height: 130px;
  display: block;
}
.lux-spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-4);
  font-family: monospace;
  letter-spacing: .04em;
}
.lux-chart-legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--ink-3);
}
.lux-legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ── Donut ── */
.lux-donut-wrap {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  align-items: center;
}
.lux-donut-svg { width: 100%; height: 200px; }
.lux-donut-num {
  font-family: var(--ff-display);
  font-size: 38px; font-weight: 500; fill: var(--ink); letter-spacing: -.02em;
}
.lux-donut-lbl { font-size: 11px; fill: var(--ink-4); letter-spacing: .12em; text-transform: uppercase; }
.lux-donut-legend { display: flex; flex-direction: column; gap: 8px; }
.lux-donut-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-2);
}
.lux-donut-row:last-child { border-bottom: none; }
.lux-donut-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.lux-donut-key { flex: 1; color: var(--ink-2); font-family: monospace; font-size: 11px; }
.lux-donut-val { color: var(--ink); font-weight: 600; }

/* ── Content distribution bars ── */
.lux-bar-list {
  display: flex; flex-direction: column; gap: 10px;
}
.lux-bar-list-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lux-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .14s;
}
.lux-bar-row-sm {
  grid-template-columns: 110px 1fr 36px;
  padding: 8px 10px;
  gap: 8px;
}
.lux-bar-row:hover { background: var(--gold-ll); }
.lux-bar-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lux-bar-icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--gold-2);
  font-size: 12px;
  flex-shrink: 0;
}
.lux-bar-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.lux-bar-track {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.lux-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-2));
  border-radius: 3px;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.lux-bar-val {
  text-align: right;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.01em;
}

/* ── Storage gauge ── */
.lux-gauge-wrap {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 14px;
}
.lux-gauge-svg { width: 220px; height: 120px; }
.lux-gauge-num {
  font-family: var(--ff-display);
  font-size: 32px; font-weight: 500; color: var(--ink);
  letter-spacing: -.02em;
  margin-top: -32px;
}
.lux-gauge-num span {
  font-size: 14px; color: var(--ink-3); font-weight: 400; margin-left: 4px;
}
.lux-gauge-lbl {
  font-size: 11px; color: var(--ink-4); margin-top: 4px;
}
.lux-mime-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.lux-mime-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  font-size: 11px;
}
.lux-mime-ext { font-family: monospace; color: var(--ink-2); font-weight: 500; }
.lux-mime-cnt { color: var(--ink-4); }

.lux-sys-rows { display: flex; flex-direction: column; gap: 8px; }
.lux-sys-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-size: 12.5px;
}
.lux-sys-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lux-sys-lbl { color: var(--ink-3); flex: 1; }
.lux-sys-val { color: var(--ink); font-weight: 500; }

/* ── Recent activity feed ── */
.lux-activity-list { display: flex; flex-direction: column; }
.lux-activity-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-2);
}
.lux-activity-row:last-child { border-bottom: none; }
.lux-activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-4);
  margin-top: 6px;
  margin-left: 8px;
  box-shadow: 0 0 0 4px rgba(150,168,150,.12);
}
.lux-act-login        { background: var(--pine) !important; box-shadow: 0 0 0 4px rgba(39,67,30,.12) !important; }
.lux-act-login_fail   { background: var(--danger) !important; box-shadow: 0 0 0 4px rgba(184,50,40,.14) !important; }
.lux-act-update       { background: var(--gold-2) !important; box-shadow: 0 0 0 4px rgba(201,164,80,.18) !important; }
.lux-act-create       { background: var(--success) !important; box-shadow: 0 0 0 4px rgba(26,122,64,.14) !important; }
.lux-act-delete       { background: var(--warn) !important; box-shadow: 0 0 0 4px rgba(184,115,51,.16) !important; }
.lux-activity-line { font-size: 12.5px; color: var(--ink-2); }
.lux-activity-action { font-family: monospace; font-size: 11px; color: var(--gold-2); }
.lux-activity-mod { color: var(--ink-4); font-size: 11px; }
.lux-activity-detail { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }
.lux-activity-time { font-size: 11px; color: var(--ink-4); white-space: nowrap; padding-top: 2px; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .lux-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .lux-grid-2, .lux-grid-3-2, .lux-grid-2-2-1 { grid-template-columns: 1fr; }
  .lux-grid-3-2 > div, .lux-grid-2-2-1 > div { grid-column: span 1 !important; }
}
@media (max-width: 720px) {
  .lux-hero { padding: 28px 22px; flex-direction: column; align-items: stretch; }
  .lux-hero-actions { width: 100%; }
  .lux-hero-title { font-size: 32px; }
  .lux-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .lux-donut-wrap { grid-template-columns: 1fr; }
  .lux-bar-row { grid-template-columns: 110px 1fr 36px; gap: 8px; }
}

/* ── Image hover hint (clickable globally) ── */
#adminContent img:not(.brand-mark img):not(.upload-meta-thumb):not([class*="icon"]) {
  cursor: zoom-in;
  transition: filter .18s;
}
#adminContent img:not(.brand-mark img):not(.upload-meta-thumb):not([class*="icon"]):hover {
  filter: brightness(1.04) contrast(1.02);
}

/* ── Dark mode for luxury dashboard ── */
html.dark-mode .lux-panel { background: var(--surface); border-color: var(--border); }
html.dark-mode .lux-kpi-card { background: var(--surface); border-color: var(--border); }
html.dark-mode .lux-bar-row:hover { background: rgba(201,164,80,.06); }
html.dark-mode .lux-mime-pill { background: rgba(255,255,255,.04); }

/* ══════════════════════════════════════════
   BACKUP & RESTORE PAGE
══════════════════════════════════════════ */
.bk-page { display: flex; flex-direction: column; gap: 22px; }

.bk-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, #06100a 0%, #0e1d0c 60%, #182d13 100%);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.20), 0 1px 0 rgba(201,164,80,.12);
}
.bk-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(201,164,80,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(201,164,80,.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.bk-hero-icon {
  font-size: 42px; color: var(--gold-3); flex-shrink: 0;
  filter: drop-shadow(0 2px 12px rgba(201,164,80,.4));
  position: relative; z-index: 1;
}
.bk-hero-title {
  font-family: var(--ff-display); font-size: 28px; font-weight: 500;
  color: #fff; letter-spacing: -.02em; margin-bottom: 5px;
  position: relative; z-index: 1;
}
.bk-hero-sub {
  font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.55;
  position: relative; z-index: 1;
}
.bk-hero-meta {
  margin-left: auto; text-align: right; flex-shrink: 0;
  position: relative; z-index: 1;
}
.bk-meta-lbl {
  display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 5px;
}
.bk-meta-val {
  display: block; font-family: var(--ff-display); font-size: 18px;
  color: var(--gold-3); font-weight: 500;
}
.bk-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) { .bk-grid { grid-template-columns: 1fr; } }
.bk-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  overflow: hidden;
  position: relative;
}
.bk-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--gold-l), transparent 60%);
}
.bk-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border-2);
}
.bk-panel-title { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.bk-panel-sub { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.bk-modules { display: flex; flex-direction: column; }
.bk-module-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; gap: 16px;
  border-bottom: 1px solid var(--border-2);
  cursor: pointer; transition: background .14s;
  user-select: none;
}
.bk-module-row:last-child { border-bottom: none; }
.bk-module-row:hover { background: var(--gold-ll); }
.bk-module-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bk-module-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gold-2); flex-shrink: 0;
  border: 1px solid var(--border);
}
.bk-module-info { min-width: 0; }
.bk-module-label {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.bk-module-desc { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.bk-required-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 1.5px 7px; border-radius: 99px;
  background: var(--gold-ll); border: 1px solid var(--border-warm);
  color: var(--gold-2);
}
.bk-toggle-wrap { position: relative; flex-shrink: 0; width: 44px; height: 26px; }
.bk-toggle { opacity: 0; position: absolute; width: 0; height: 0; }
.bk-toggle-track {
  display: block; width: 44px; height: 26px; border-radius: 13px;
  background: var(--canvas-2); border: 1.5px solid var(--border);
  transition: background .2s, border-color .2s; cursor: pointer; position: relative;
}
.bk-toggle-thumb {
  display: block; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-4); transition: left .2s, background .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.bk-toggle:checked + .bk-toggle-track { background: var(--pine); border-color: var(--pine); }
.bk-toggle:checked + .bk-toggle-track .bk-toggle-thumb { left: 20px; background: #fff; }
.bk-toggle:disabled + .bk-toggle-track { opacity: .55; cursor: not-allowed; }
.bk-module-row:has(.bk-toggle:not(:checked)) { opacity: .55; }
.bk-module-row:has(.bk-toggle:not(:checked)) .bk-module-icon { filter: grayscale(1); }
.bk-summary { padding: 14px 22px; background: var(--surface-3); border-top: 1px solid var(--border-2); }
.bk-summary-row { display: flex; align-items: baseline; gap: 10px; font-size: 12px; margin-bottom: 5px; }
.bk-summary-row:last-child { margin-bottom: 0; }
.bk-sum-lbl { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.bk-sum-val { color: var(--ink-2); }
.bk-sum-ok { color: var(--success); }
.bk-sum-warn { color: var(--warn); }
.bk-action-body { padding: 18px 22px 22px; }
.bk-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border-2);
  font-size: 12.5px;
}
.bk-info-row > span:first-child { color: var(--ink-3); }
.bk-info-row > span:last-child { color: var(--ink); font-weight: 500; }
.bk-progress-wrap { margin-bottom: 16px; }
.bk-progress-bar {
  height: 8px; border-radius: 4px;
  background: var(--canvas-2); overflow: hidden; margin-bottom: 8px;
}
.bk-progress-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, var(--pine) 0%, var(--gold) 100%);
  transition: width .5s ease;
}
.bk-progress-label { font-size: 11.5px; color: var(--ink-3); text-align: center; }
.bk-hist-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-bottom: 1px solid var(--border-2);
}
.bk-hist-row:last-child { border-bottom: none; }
.bk-hist-icon {
  font-size: 16px; color: var(--gold-2); flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gold-ll); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-warm);
}
.bk-hist-info { flex: 1; min-width: 0; }
.bk-hist-date { font-size: 13px; font-weight: 600; color: var(--ink); }
.bk-hist-mods { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-hist-size { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; flex-shrink: 0; }

/* Restore drop zone */
.bk-restore-drop {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-4);
}
.bk-restore-drop:hover { border-color: var(--gold); background: var(--gold-ll); color: var(--ink-2); }
.bk-restore-drop svg { color: var(--ink-4); }
.bk-restore-drop-label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.bk-restore-drop-hint { font-size: 11.5px; }
.bk-restore-info-box { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.bk-restore-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--border-2); font-size: 12.5px;
}
.bk-restore-info-row:last-child { border-bottom: none; }
.bk-restore-info-row > span:first-child { color: var(--ink-3); }
.bk-restore-info-row > span:last-child { color: var(--ink); font-weight: 500; }
.bk-progress-fill-restore {
  background: linear-gradient(90deg, var(--danger) 0%, #e06030 100%) !important;
}
.bk-restore-warn {
  font-size: 11.5px; color: var(--warn); margin-top: 10px;
  padding: 8px 10px; background: rgba(184,115,51,.07);
  border: 1px solid rgba(184,115,51,.18); border-radius: 7px;
  line-height: 1.5;
}

/* Activity list scrollbar */
.lux-activity-list::-webkit-scrollbar { width: 4px; }
.lux-activity-list::-webkit-scrollbar-thumb { background: var(--canvas-2); border-radius: 4px; }

/* Drag-over highlight for restore drop */
.bk-restore-drop.drag-over { border-color: var(--gold); background: var(--gold-l); }

/* ─── Catalog management ─── */
.catalog-current {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--canvas-1); border: 1px solid var(--canvas-2);
  margin-bottom: 10px;
}
.catalog-current svg { flex-shrink: 0; color: var(--ink-3); }
.catalog-current-name {
  flex: 1; font-size: 13px; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.catalog-upload-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
/* ─── Catalog manager (two-pane) ─── */
.cat-mgr {
  display: flex; gap: 0; min-height: 340px;
}
.cat-mgr-list {
  flex: 1; min-width: 0;
}
.cat-mgr-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cat-table { width: 100%; }
.cat-table th { font-size: 11px; }
.cat-table td { font-size: 13px; vertical-align: middle; }
.cat-row-selected { background: rgba(201,164,80,.08) !important; }
.cat-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px 20px; color: var(--ink-4); text-align: center; font-size: 13px;
}
.cat-mgr-panel {
  display: flex; flex-direction: column;
  width: 320px; flex-shrink: 0;
  border-left: 1px solid var(--canvas-2);
  margin-left: 20px; padding-left: 20px;
}
.cat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--canvas-2);
}
.cat-panel-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.cat-panel-body { flex: 1; overflow-y: auto; }
.cat-panel-info { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.cat-panel-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3); gap: 8px;
}
.cat-panel-info-row span:first-child { color: var(--ink-4); white-space: nowrap; }
.cat-panel-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--canvas-2);
}

/* ─── Feature flag toggle switch ─── */
.flag-switch { display: inline-flex; align-items: center; cursor: pointer; }
.flag-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.flag-switch-track {
  position: relative; width: 40px; height: 22px;
  background: var(--canvas-2); border-radius: 11px;
  transition: background .2s;
}
.flag-switch input:checked ~ .flag-switch-track { background: var(--gold); }
.flag-switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: left .2s;
}
.flag-switch input:checked ~ .flag-switch-track .flag-switch-thumb { left: 21px; }

/* ─── Clickable table rows ─── */
.admin-table-clickable tbody tr:hover { background: var(--gold-l, rgba(201,164,80,.08)); }

/* ─── Clients directory ─── */
.cl-card { padding: 0; overflow: hidden; }

.cl-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  padding: 18px 24px; border-bottom: 1px solid var(--canvas-2);
  background: var(--surface-2);
}
.cl-header-info { display: flex; flex-direction: column; gap: 3px; }
.cl-header-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.cl-header-sub { font-size: 12px; color: var(--ink-3); }
.cl-add-bar { display: flex; gap: 8px; align-items: center; }
.cl-add-input {
  width: 240px; padding: 8px 12px;
  border: 1px solid var(--canvas-2); border-radius: 7px;
  background: var(--surface); color: var(--ink);
  font-size: 13px; outline: none; transition: border-color .15s;
}
.cl-add-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,80,.12); }

.cl-list { padding: 8px 0; }
.cl-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; border-bottom: 1px solid var(--canvas-2);
  transition: background .12s;
}
.cl-row:last-child { border-bottom: none; }
.cl-row:hover { background: var(--canvas-1); }

.cl-avatar {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,.92);
  letter-spacing: .04em;
}

.cl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cl-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cl-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.cl-cat {
  font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 500;
  white-space: nowrap; letter-spacing: .02em;
}
.cl-cat-hotel   { background: rgba(58,120,200,.12); color: #3a78c8; }
.cl-cat-govt    { background: rgba(60,130,80,.12);  color: #3a8050; }
.cl-cat-comm    { background: rgba(180,130,40,.12); color: #b07f20; }
.cl-cat-bespoke { background: rgba(130,60,160,.12); color: #7a3ea0; }
.cl-cat-none    { background: var(--canvas-2); color: var(--ink-4); font-weight: 400; }

.cl-stat {
  display: flex; flex-direction: column; align-items: center;
  min-width: 52px; flex-shrink: 0;
}
.cl-stat-num {
  font-size: 22px; font-weight: 700; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cl-stat-lbl { font-size: 10.5px; color: var(--ink-4); margin-top: 2px; text-transform: uppercase; letter-spacing: .06em; }

.cl-del {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.cl-row:hover .cl-del { opacity: 1; }
.cl-del:hover { background: rgba(184,50,40,.1); color: var(--danger, #b83228); }

.cl-empty {
  padding: 52px 24px; text-align: center; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cl-empty p { margin: 0; font-size: 14px; font-weight: 500; }
.cl-empty small { color: var(--ink-4); font-size: 12px; }
