/* ── TheMenu v2 — Admin Panel CSS ───────────────────────────────────────── */

/* ── Layout ────────────────────────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar — white with subtle border ────────────────────────────────────── */
.sidebar {
  width: 256px;
  background: #fff;
  border-right: 1px solid var(--charcoal-100);
  box-shadow: 1px 0 4px rgba(0,0,0,.03);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--charcoal-100);
}
.sidebar-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal-900);
}
.sidebar-brand-name span { color: var(--brand-500); }
.sidebar-brand-sub { font-size: 11px; color: var(--charcoal-400); margin-top: 2px; font-weight: 500; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--charcoal-400);
  padding: 12px 20px 4px;
}

.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal-600);
  text-decoration: none;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
}
.sidebar-item i { width: 18px; text-align: center; font-size: 14px; color: var(--charcoal-400); transition: color .15s; }
.sidebar-item:hover {
  color: var(--charcoal-900);
  background: var(--charcoal-50);
  text-decoration: none;
}
.sidebar-item:hover i { color: var(--charcoal-700); }

.sidebar-item.active {
  color: var(--brand-600);
  background: rgba(249,115,22,.08);
  border-left-color: var(--brand-500);
  font-weight: 600;
}
.sidebar-item.active i { color: var(--brand-500); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--charcoal-100);
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--charcoal-800); }
.sidebar-user-role { font-size: 11px; color: var(--charcoal-400); margin-top: 1px; }

/* ── Content area ──────────────────────────────────────────────────────────── */
.content-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--charcoal-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal-900);
}
.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search i {
  position: absolute;
  left: 12px;
  color: var(--charcoal-400);
  font-size: 13px;
  pointer-events: none;
}
.topbar-search input {
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--charcoal-200);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  background: var(--charcoal-50);
  outline: none;
  width: 200px;
  transition: border-color .15s, width .2s;
  color: var(--charcoal-900);
}
.topbar-search input:focus { border-color: var(--brand-500); background: #fff; width: 260px; }
.topbar-search input::placeholder { color: var(--charcoal-400); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.main-content { flex: 1; padding: 28px; }

.flash-container { margin-bottom: 20px; }

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--charcoal-900); line-height: 1.2; }
.page-sub   { font-size: 13px; color: var(--charcoal-400); margin-top: 3px; }

/* ── Quick action cards ────────────────────────────────────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.quick-action-card {
  background: #fff;
  border: 1.5px solid var(--charcoal-100);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--charcoal-800);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.quick-action-card:hover {
  border-color: var(--brand-500);
  box-shadow: 0 6px 20px rgba(249,115,22,.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.quick-action-card i {
  font-size: 22px;
  color: var(--brand-500);
  margin-bottom: 8px;
  display: block;
}
.quick-action-card span { display: block; font-size: 13px; font-weight: 600; }

/* ── Activity log ──────────────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--charcoal-50);
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-actor { font-size: 13px; font-weight: 600; color: var(--charcoal-900); }
.activity-desc  { font-size: 13px; color: var(--charcoal-600); }
.activity-time  { font-size: 11px; color: var(--charcoal-400); margin-top: 2px; }

/* ── Ad cards ──────────────────────────────────────────────────────────────── */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.ad-card {
  background: #fff;
  border: 1px solid var(--charcoal-100);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .15s, transform .15s;
}
.ad-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-1px); }
.ad-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--charcoal-100);
}
.ad-card-img-placeholder {
  width: 100%;
  height: 160px;
  background: var(--charcoal-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal-300);
  font-size: 32px;
}
.ad-card-body   { padding: 16px; }
.ad-card-title  { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--charcoal-900); }
.ad-stats       { display: flex; gap: 16px; margin: 12px 0; }
.ad-stat-item   { text-align: center; }
.ad-stat-val    { font-size: 18px; font-weight: 700; color: var(--charcoal-900); }
.ad-stat-lbl    { font-size: 10px; color: var(--charcoal-400); text-transform: uppercase; letter-spacing: .04em; }
.ad-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--charcoal-50);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

/* ── Rank list ─────────────────────────────────────────────────────────────── */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; align-items: center; gap: 12px; }
.rank-num {
  width: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal-400);
  text-align: right;
  flex-shrink: 0;
}
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--charcoal-800); }
.rank-bar-wrap { height: 4px; background: var(--charcoal-100); border-radius: 9999px; margin-top: 4px; }
.rank-bar      { height: 100%; background: var(--brand-500); border-radius: 9999px; }
.rank-val { font-size: 13px; font-weight: 700; color: var(--charcoal-900); flex-shrink: 0; }

/* ── Form page layout ──────────────────────────────────────────────────────── */
.form-page-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-sidebar-card { display: flex; flex-direction: column; gap: 16px; }

/* ── Location checkboxes ───────────────────────────────────────────────────── */
.location-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background .15s;
}
.checkbox-label:hover { background: var(--charcoal-50); }
.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
  accent-color: var(--brand-500);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Log tabs ──────────────────────────────────────────────────────────────── */
.log-tabs {
  display: flex;
  border-bottom: 2px solid var(--charcoal-100);
  margin-bottom: 20px;
}
.log-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: color .15s;
}
.log-tab:hover { color: var(--charcoal-800); text-decoration: none; }
.log-tab.active { color: var(--brand-500); border-bottom-color: var(--brand-500); }

/* ── Dashboard chart bar gradient colors ───────────────────────────────────── */
.chart-bar-col:nth-child(1)  .chart-bar { background: var(--brand-200); }
.chart-bar-col:nth-child(2)  .chart-bar { background: var(--brand-300); }
.chart-bar-col:nth-child(3)  .chart-bar { background: var(--brand-400); }
.chart-bar-col:nth-child(4)  .chart-bar { background: var(--brand-500); }
.chart-bar-col:nth-child(5)  .chart-bar { background: var(--brand-600); }
.chart-bar-col:nth-child(6)  .chart-bar { background: var(--brand-500); }
.chart-bar-col:nth-child(7)  .chart-bar { background: var(--brand-400); }
.chart-bar-col:nth-child(8)  .chart-bar { background: var(--brand-300); }
.chart-bar-col:nth-child(9)  .chart-bar { background: var(--brand-400); }
.chart-bar-col:nth-child(10) .chart-bar { background: var(--brand-500); }
.chart-bar-col:nth-child(11) .chart-bar { background: var(--brand-600); }
.chart-bar-col:nth-child(12) .chart-bar { background: var(--brand-500); }
