/* ================================================
   BEST HOUSE TOURS - Admin Panel Styles
   Corporate identity: BH Yellow + Deep Blue
================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Best House Corporate */
  --bh-blue-deep: #1e3c72;
  --bh-blue-mid: #2a52a0;
  --bh-blue-light: #3a6bc8;
  --bh-yellow: #faca31;
  --bh-yellow-hover: #e5b92d;
  --bh-yellow-dark: #c9a520;

  /* Dark theme (default) */
  --bg: #080e1a;
  --surface: #0e1e38;
  --surface-2: #152847;
  --card: #1a3050;
  --sidebar-bg: #0a1628;
  --sidebar-border: rgba(250,202,49,0.12);
  --sidebar-active-bg: rgba(250,202,49,0.1);
  --sidebar-active-color: #faca31;
  --border: rgba(250,202,49,0.15);
  --border-subtle: rgba(250,202,49,0.08);
  --text: #eef2ff;
  --muted: #607090;
  --text-secondary: #a8bcdc;
  --gold: #faca31;
  --gold-light: #fcd966;
  --input-bg: rgba(21,40,71,0.8);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.35);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --sidebar-w: 240px;
  --topbar-h: 60px;
}

html.light {
  --bg: #f0f4ff;
  --surface: #ffffff;
  --surface-2: #e8eeff;
  --card: #ffffff;
  --sidebar-bg: #1e3c72;
  --sidebar-border: rgba(255,255,255,0.12);
  --sidebar-active-bg: rgba(250,202,49,0.15);
  --sidebar-active-color: #faca31;
  --border: rgba(30,60,114,0.12);
  --border-subtle: rgba(30,60,114,0.07);
  --text: #1e3c72;
  --muted: #5070a0;
  --text-secondary: #2a52a0;
  --input-bg: rgba(240,244,255,0.9);
  --shadow: 0 8px 32px rgba(30,60,114,0.15);
  --shadow-card: 0 4px 20px rgba(30,60,114,0.1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; transition: color var(--transition); }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

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

.sidebar-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--bh-yellow), var(--bh-yellow-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--bh-blue-deep);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.light .logo-name { color: #fff; }

.logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 12px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  padding: 8px 12px 4px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: all var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  border: 1px solid rgba(250,202,49,0.2);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.sidebar-bottom {
  padding: 12px 8px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  margin-bottom: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bh-yellow), var(--bh-yellow-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bh-blue-deep);
  flex-shrink: 0;
}

.user-details { min-width: 0; }
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { font-size: 11px; color: rgba(255,255,255,0.45); }

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-logout:hover { background: rgba(239,68,68,0.1); color: var(--error); }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background var(--transition);
}

.hamburger:hover { background: var(--surface-2); }

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.topbar-breadcrumb a { color: var(--muted); }
.topbar-breadcrumb a:hover { color: var(--gold); }
.topbar-breadcrumb .sep { color: var(--muted); opacity: 0.5; }
.topbar-breadcrumb .current { color: var(--text); font-weight: 500; }

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  display: none;
}

.topbar-spacer { flex: 1; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme toggle in topbar */
.topbar-theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.topbar-theme-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Page Body ────────────────────────────────────────────── */
.page-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

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

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.stat-icon.gold { background: rgba(250,202,49,0.15); }
.stat-icon.green { background: rgba(34,197,94,0.15); }
.stat-icon.blue { background: rgba(59,130,246,0.15); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-trend {
  font-size: 12px;
  font-weight: 500;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--error); }
.stat-trend.flat { color: var(--muted); }

/* ── Section Card ─────────────────────────────────────────── */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.section-card-body {
  padding: 16px 20px;
}

/* ── Table ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table thead th.sortable:hover { color: var(--gold); }
.data-table thead th.sorted { color: var(--gold); }
.sort-icon { margin-left: 4px; opacity: 0.5; }

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td {
  background: rgba(250,202,49,0.04);
}

/* Table thumbnail */
.table-thumb {
  width: 46px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-2);
  flex-shrink: 0;
}

.table-thumb-placeholder {
  width: 46px;
  height: 36px;
  border-radius: 5px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.5;
}

.prop-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prop-meta { display: flex; flex-direction: column; gap: 2px; }
.prop-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-city { font-size: 11px; color: var(--muted); }

/* Table actions */
.table-actions { display: flex; align-items: center; gap: 6px; }
.action-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.delete:hover { border-color: var(--error); color: var(--error); background: rgba(239,68,68,0.08); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.btn-primary {
  background: var(--bh-yellow);
  color: var(--bh-blue-deep);
  box-shadow: 0 2px 12px rgba(250,202,49,0.25);
}
.btn-primary:hover {
  background: var(--bh-yellow-hover);
  color: var(--bh-blue-deep);
  box-shadow: 0 4px 16px rgba(250,202,49,0.35);
}

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

.btn-ghost {
  background: none;
  color: var(--muted);
  border: none;
}
.btn-ghost:hover { color: var(--gold); background: rgba(250,202,49,0.07); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: var(--error); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.w-full { width: 100%; justify-content: center; }

/* ── Status badges ────────────────────────────────────────── */
.status-badge, .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}
.badge-publicado, .status-publicado { background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.badge-borrador, .status-borrador { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.badge-vendido, .status-vendido { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.badge-reservado, .status-reservado { background: rgba(59,130,246,0.12); color: #3b82f6; border: 1px solid rgba(59,130,246,0.25); }
.badge-3d { background: rgba(250,202,49,0.12); color: var(--gold); border: 1px solid rgba(250,202,49,0.25); }

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(250,202,49,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; cursor: pointer; }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }

.form-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

/* ── Checkbox & radio ─────────────────────────────────────── */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ── Filter bar (admin property list) ────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  max-width: 300px;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(250,202,49,0.1); }

.filter-bar select {
  padding: 8px 12px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
}
.filter-bar select:focus { border-color: var(--gold); }

/* ── Pagination (admin) ───────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}

.pagination-info { font-size: 12px; color: var(--muted); }

.pagination-buttons { display: flex; gap: 6px; }

.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-family: inherit;
}

.page-btn:hover { background: var(--surface-2); color: var(--text); }

.page-btn.active {
  background: rgba(250,202,49,0.12);
  border-color: rgba(250,202,49,0.3);
  color: var(--gold);
}

.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }

.modal-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

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

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Upload zones ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--input-bg);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(250,202,49,0.05);
}

.upload-zone-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.6; }
.upload-zone-text { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.upload-zone-hint { font-size: 12px; color: var(--muted); }

/* ── Image previews ───────────────────────────────────────── */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

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

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(239,68,68,0.85);
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.image-preview-remove:hover { background: var(--error); }

/* ── Progress bar ─────────────────────────────────────────── */
.progress-wrap {
  background: var(--surface-2);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bh-yellow), var(--bh-yellow-hover));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

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

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

.skeleton-row td { padding: 14px 16px; }
.skeleton-cell { height: 14px; border-radius: 4px; }
.skeleton-cell.w-40  { width: 40%; }
.skeleton-cell.w-60  { width: 60%; }
.skeleton-cell.w-80  { width: 80%; }
.skeleton-cell.w-full{ width: 100%; }
.skeleton-badge { height: 22px; width: 70px; border-radius: 20px; }
.skeleton-avatar { width: 46px; height: 36px; border-radius: 5px; flex-shrink: 0; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border-left: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  min-width: 280px;
  max-width: 380px;
  animation: toast-in 0.3s ease;
  position: relative;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { font-size: 18px; }
.toast-text { flex: 1; font-size: 13.5px; color: var(--text); font-weight: 500; }

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
}

/* ── Visits bar ───────────────────────────────────────────── */
.visits-bar { display: flex; align-items: center; gap: 10px; }
.visits-bar-track {
  flex: 1; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.visits-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}
.visits-count { font-size: 12px; font-weight: 600; color: var(--muted); width: 40px; text-align: right; }

/* ── Misc divider ─────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Danger zone ──────────────────────────────────────────── */
.danger-zone {
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 22px;
}
.danger-zone h3 { font-size: 14px; font-weight: 700; color: var(--error); margin-bottom: 8px; }
.danger-zone p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ── Chart placeholder ────────────────────────────────────── */
.chart-placeholder {
  background: var(--surface);
  border-radius: var(--radius-sm);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
}
.chart-placeholder .chart-icon { font-size: 32px; opacity: 0.4; }

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(250,202,49,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(42,82,160,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bh-blue-deep), var(--bh-yellow), var(--bh-blue-deep));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--bh-yellow), var(--bh-yellow-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.login-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 16px;
}

.login-logo-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.login-logo-sub { font-size: 13px; color: var(--muted); }

.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form .form-group { gap: 7px; }

.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 42px; }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--gold); }

.login-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--error);
  display: none;
}
.login-error.visible { display: block; }

.btn-login { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.login-footer a { color: var(--gold); }
.login-footer a:hover { color: var(--gold-light); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
  .topbar-title { display: block; font-size: 15px; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 250;
  }
  .sidebar-overlay.open { display: block; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-wrap { max-width: 100%; }
  .data-table thead th:nth-child(n+5) { display: none; }
  .data-table td:nth-child(n+5) { display: none; }
}

/* ════════════════════════════════════════════
   ADMIN — LIGHT MODE OVERRIDES
════════════════════════════════════════════ */
html.light .admin-layout { background: #f0f4ff; }
html.light .sidebar { background: #1e3c72; }
html.light .sidebar .nav-link { color: rgba(255,255,255,0.8); }
html.light .sidebar .nav-link:hover,
html.light .sidebar .nav-link.active { color: #faca31; background: rgba(255,255,255,0.1); }
html.light .sidebar .logo-name { color: #fff; }
html.light .sidebar .user-name { color: #fff; }
html.light .sidebar .user-role { color: rgba(255,255,255,0.6); }
html.light .topbar { background: #fff; border-color: rgba(30,60,114,0.12); box-shadow: 0 1px 8px rgba(30,60,114,0.08); }
html.light .topbar-title { color: #1e3c72; }
html.light .topbar-breadcrumb a { color: #2a52a0; }
html.light .main-content { background: #f0f4ff; }
html.light .stat-card { background: #fff; border-color: rgba(30,60,114,0.1); box-shadow: 0 2px 12px rgba(30,60,114,0.08); }
html.light .stat-card-label { color: #5070a0; }
html.light .stat-card-value { color: #1e3c72; }
html.light .data-table { background: #fff; border-color: rgba(30,60,114,0.1); }
html.light .data-table th { background: #f0f4ff; color: #1e3c72; border-color: rgba(30,60,114,0.1); }
html.light .data-table td { color: #2a52a0; border-color: rgba(30,60,114,0.07); }
html.light .data-table tbody tr:hover { background: #e8eeff; }
html.light .form-section { background: #fff; border-color: rgba(30,60,114,0.1); }
html.light .section-title { color: #1e3c72; }
html.light input, html.light select, html.light textarea {
  background: #fff; border-color: rgba(30,60,114,0.2); color: #1e3c72;
}
html.light input:focus, html.light select:focus, html.light textarea:focus {
  border-color: #faca31; box-shadow: 0 0 0 3px rgba(250,202,49,0.15);
}
html.light label { color: #2a52a0; }
html.light .upload-zone { background: #f8faff; border-color: rgba(30,60,114,0.2); }
html.light .upload-zone:hover { border-color: #faca31; background: #fffef0; }
html.light .page-section-header { color: #1e3c72; border-color: rgba(30,60,114,0.1); }
html.light .login-card { background: #fff; box-shadow: 0 20px 60px rgba(30,60,114,0.15); }
html.light .login-subtitle { color: #5070a0; }
