header { position: relative; }

.impersonation-banner {
  max-width: 900px;
  margin: 0 0 20px;
  background: rgba(217, 133, 59, 0.12);
  border: 1px solid rgba(217, 133, 59, 0.35);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--amber-soft);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.impersonation-banner .btn.ghost-sm {
  margin-left: auto;
  border-color: rgba(217, 133, 59, 0.45);
  color: var(--amber-soft);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-row .lang-toggle { position: static; margin-left: auto; }

/* ── Hero / welcome row ──────────────────────────────────────────── */
.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.dash-hero-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.dash-hero-title {
  margin: 0;
  font-size: 1.9rem;
  color: var(--cream);
  line-height: 1.15;
}
.dash-hero-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 56ch;
}
.dash-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }

/* ── KPI trend badge + sparkline (real data derived, never fabricated) ── */
.stat-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.stat-tile-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
}
.stat-tile-trend.up { color: var(--success); background: rgba(111, 207, 154, 0.14); }
.stat-tile-trend.down { color: var(--danger); background: rgba(232, 121, 138, 0.14); }
.stat-tile-trend.flat { color: var(--muted); background: rgba(148, 163, 191, 0.12); }
.stat-tile-trend svg { width: 10px; height: 10px; stroke: currentColor; }
.stat-spark { display: flex; align-items: flex-end; gap: 3px; height: 20px; margin-top: 10px; }
.stat-spark i {
  flex: 1;
  display: block;
  background: var(--border-strong);
  border-radius: 2px;
  min-height: 3px;
}
.stat-spark i.today { background: var(--gold); }

@media (max-width: 640px) {
  .dash-hero { align-items: flex-start; }
  .dash-hero-title { font-size: 1.5rem; }
  .dash-hero-cta { width: 100%; }
  .dash-hero-cta .btn { flex: 1; }
}

.hero-title { display: flex; align-items: center; gap: 14px; margin-top: 4px; }

/* User chip (name + role pill + logout), ported from dashboard/index.html */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.user-chip-textcol { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip-name { font-size: 0.85rem; color: var(--cream); font-weight: 600; }
.user-chip-role {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(205, 163, 73, 0.14);
  border: 1px solid rgba(205, 163, 73, 0.3);
  border-radius: 999px;
  padding: 3px 9px;
}
/* No empty pill when the name/role slot is blank (super-admin sessions) */
.user-chip-role:empty, .user-chip-name:empty { display: none; }
.header-row .lang-toggle { margin-left: 0; }
.btn.ghost { border-color: rgba(205, 163, 73, 0.35); color: var(--muted); }
.btn.ghost:hover { background: rgba(205, 163, 73, 0.12); color: var(--gold-soft); }

.venue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .venue-grid { grid-template-columns: 1fr; }
}

.venue-card {
  background:
    linear-gradient(180deg, var(--edge-highlight), transparent 90px),
    linear-gradient(160deg, var(--bg-soft), #1c150f);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.venue-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(205, 163, 73, 0.22);
}
.venue-card h2 { margin: 4px 0; font-size: 1.6rem; }
.venue-card p { margin: 0; color: var(--muted); }

/* Grid variant of the venue card (multiple venues in .venue-grid) */
.venue-grid .venue-card {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-top: 0;
}
/* Single-venue accounts get one full-width featured card instead of a
   half-empty 2-column grid — the horizontal default .venue-card layout. */
.venue-grid.single { grid-template-columns: 1fr; }
.venue-grid.single .venue-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 640px) {
  .venue-grid.single .venue-card { flex-direction: column; align-items: stretch; }
}
.venue-sub { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* Table rendering used when the account has more than one venue */
.venue-table-name { display: flex; flex-direction: column; gap: 2px; }
.venue-table-name strong { font-size: 0.92rem; color: var(--cream); }
.venue-table-name span { font-size: 0.76rem; color: var(--muted); }
table.dt .btn-sm { padding: 6px 12px; font-size: 0.76rem; }

/* A feature the venue's plan doesn't include: still visible so the customer
   knows it exists, but visibly not a working action. Same intent as the
   editor's .locked-by-role state. */
.feature-locked {
  opacity: 0.45;
  cursor: help;
  border-style: dashed;
}
table.dt .cell-actions .btn-row { justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.venue-demo-note { color: var(--muted); font-size: 0.78rem; font-style: italic; margin: 0; }

.feature-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.feature {
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(205, 163, 73, 0.08);
  border: 1px solid rgba(205, 163, 73, 0.2);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.feature::before {
  content: '✦';
  color: var(--gold);
  font-size: 0.6rem;
}

.page-footer-note {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
