/* Brian Barbershop — Aura Noire & Or */
:root {
  --gold: #d4af37; --gold-2: #f2ca50; --bronze: #aa771c; --champagne: #f3e5ab;
  --grad: linear-gradient(135deg, #e9c349 0%, #d4af37 45%, #aa771c 100%);
  --radius: 6px; --radius-lg: 12px;
  --font-display: "Playfair Display", Georgia, serif;
  --font: "Inter", system-ui, sans-serif;
  --ok: #4ade80; --warn: #fbbf24; --err: #f87171; --info: #60a5fa;
}
:root, [data-theme="dark"] {
  --bg: #0c0c0e; --bg-2: #131316; --card: #18181c; --card-2: #212126;
  --text: #f9f8f6; --text-2: #b3b1a9; --muted: #76746e;
  --line: rgba(255,255,255,.07); --line-gold: rgba(212,175,55,.22);
  --glass: rgba(12,12,14,.82); --shadow: 0 12px 32px -6px rgba(212,175,55,.14);
  --accent-text: var(--gold-2); color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f5f0; --bg-2: #efebe2; --card: #ffffff; --card-2: #f6f2e8;
  --text: #17171a; --text-2: #4b4a46; --muted: #8a877e;
  --line: rgba(0,0,0,.08); --line-gold: rgba(170,119,28,.3);
  --glass: rgba(255,255,255,.85); --shadow: 0 12px 30px -10px rgba(120,90,20,.22);
  --accent-text: #8a6212; color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f5f0; --bg-2: #efebe2; --card: #ffffff; --card-2: #f6f2e8;
    --text: #17171a; --text-2: #4b4a46; --muted: #8a877e;
    --line: rgba(0,0,0,.08); --line-gold: rgba(170,119,28,.3);
    --glass: rgba(255,255,255,.85); --shadow: 0 12px 30px -10px rgba(120,90,20,.22);
    --accent-text: #8a6212; color-scheme: light;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh; transition: background .35s, color .35s;
  padding-bottom: 76px; overflow-x: hidden;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 100% - 3.5rem); margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .container { width: calc(100% - 2.5rem); } }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--accent-text); }
.muted { color: var(--text-2); }
.gold { color: var(--accent-text); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-gold);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transition: padding .2s;
}
@media all and (display-mode: standalone) {
  .header {
    padding-top: max(34px, env(safe-area-inset-top, 34px));
  }
}
html.is-standalone .header {
  padding-top: max(34px, env(safe-area-inset-top, 34px));
}
.header .container { display: flex; align-items: center; gap: .75rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-gold); object-fit: cover; flex-shrink: 0; }
.brand small { display: block; font-size: 10px; letter-spacing: .18em; color: var(--accent-text); font-weight: 700; }
.brand strong { font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; }
.nav { display: none; gap: .3rem; margin-left: auto; }
.nav a { padding: .5rem .9rem; border-radius: var(--radius); font-size: 14px; font-weight: 500; color: var(--text-2); transition: .2s; }
.nav a:hover, .nav a.active { color: var(--accent-text); background: rgba(212,175,55,.08); }
.header-actions { display: flex; gap: .5rem; margin-left: auto; align-items: center; flex-shrink: 0; }
@media (min-width: 900px) { .nav { display: flex; } .header-actions { margin-left: .5rem; } }
@media (max-width: 899px) {
  .header .container { height: 60px; }
  .brand strong { font-size: 1rem; }
  .brand img { width: 36px; height: 36px; }
  .header-actions .btn { display: none; } /* No mobile, ações principais ficam na barra inferior */
}
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-gold); background: var(--card); color: var(--text); cursor: pointer; transition: .2s; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--gold); color: var(--accent-text); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-icon-sun { display: none; }
[data-mode="light"] .theme-icon-sun { display: block; } [data-mode="light"] .theme-icon-moon { display: none; }

/* ---------- Bottom Navigation Mobile (Estilo App Nativo Premium) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: rgba(14, 14, 17, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 10px;
  color: #a8a69f;
  text-decoration: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s;
}

.bottom-nav a:hover,
.bottom-nav a:focus {
  color: var(--champagne);
}

.bottom-nav a.active {
  color: var(--gold-2);
  font-weight: 600;
  background: rgba(212, 175, 55, 0.12);
}

.bottom-nav a.active svg {
  transform: translateY(-1px) scale(1.08);
  stroke: var(--gold-2);
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.45));
}

@media all and (display-mode: standalone) {
  .bottom-nav {
    padding-bottom: max(18px, calc(8px + env(safe-area-inset-bottom, 0px)));
  }
}

html.is-standalone .bottom-nav {
  padding-bottom: max(18px, calc(8px + env(safe-area-inset-bottom, 0px)));
}

@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

/* Scroll margin para seções com âncora e etapas de agendamento */
[id^="step-"], section[id] {
  scroll-margin-top: 85px;
}
@media all and (display-mode: standalone) {
  [id^="step-"], section[id] {
    scroll-margin-top: 120px;
  }
}
html.is-standalone [id^="step-"], html.is-standalone section[id] {
  scroll-margin-top: 120px;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: var(--radius); font: 600 14px var(--font); letter-spacing: .02em; cursor: pointer; border: 1px solid transparent; transition: .2s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #0c0c0e; box-shadow: 0 8px 24px -8px rgba(212,175,55,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(212,175,55,.7); }
.btn-outline { border-color: var(--line-gold); color: var(--accent-text); background: transparent; }
.btn-outline:hover { border-color: var(--gold); background: rgba(212,175,55,.08); }
.btn-ghost { background: var(--card-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-gold); }
.btn-danger { background: rgba(248,113,113,.12); color: var(--err); border-color: rgba(248,113,113,.3); }
.btn-success { background: rgba(74,222,128,.12); color: var(--ok); border-color: rgba(74,222,128,.3); }
.btn-sm { padding: .4rem .75rem; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4rem 0 3rem; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(600px 300px at 80% 10%, rgba(212,175,55,.18), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(170,119,28,.14), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .05; background-image: repeating-linear-gradient(45deg, var(--gold) 0 1px, transparent 1px 22px); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.2fr .8fr; } }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: .6rem 0 1rem; }
.hero h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); max-width: 520px; font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-logo { justify-self: center; position: relative; width: min(340px, 80vw); aspect-ratio: 1; }
.hero-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-gold), 0 30px 80px -20px rgba(212,175,55,.45); animation: float 6s ease-in-out infinite; }
.hero-logo::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed var(--line-gold); animation: spin 40s linear infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.stats b { font-family: var(--font-display); font-size: 1.7rem; color: var(--accent-text); display: block; }
.stats span { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-head p { color: var(--text-2); font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: .25s; }
.card.pad { padding: 1.4rem; }
.card-hover:hover { border-color: var(--line-gold); transform: translateY(-3px); box-shadow: var(--shadow); }

/* barbers */
.pros { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
@media (min-width: 600px) {
  .pros { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
}
.pro { padding: 1.4rem .8rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #0c0c0e; background: var(--grad); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold); overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; font-size: 13px; }
.pro h3 { font-size: 1rem; }
.pro small { color: var(--muted); font-size: 11.5px; }

/* search */
.search { position: relative; width: 100%; max-width: 320px; }
.search input { padding-left: 2.6rem; }
.search svg { position: absolute; left: .9rem; top: 50%; translate: 0 -50%; width: 18px; color: var(--muted); }

/* filter chips */
.chips {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.chips::-webkit-scrollbar { display: none; width: 0; height: 0; }
.chips.grabbing, .chips:active { cursor: grabbing; }
.chip { padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--line-gold); font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; background: transparent; white-space: nowrap; transition: .2s; }
.chip.active, .chip:hover { background: var(--grad); color: #0c0c0e; border-color: transparent; }

/* services */
.services { display: grid; gap: .8rem; }
@media (min-width: 760px) { .services { grid-template-columns: 1fr 1fr; } }
.service { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
.service-thumb { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: var(--card-2); border: 1px solid var(--line-gold); display: grid; place-items: center; overflow: hidden; color: var(--accent-text); }
.service-thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-thumb svg { width: 24px; }
.service-info { flex: 1; min-width: 0; }
.service-info h3 { font-family: var(--font); font-size: 15px; font-weight: 600; }
.service-info p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { text-align: right; flex-shrink: 0; }
.price small { display: block; font-size: 10px; color: var(--muted); }
.price b { font-family: var(--font-display); font-size: 1.15rem; color: var(--accent-text); }
.price span { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.price span svg { width: 12px; }

/* products */
.products { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.product { display: flex; gap: 1rem; padding: 1rem; align-items: center; }
.product-thumb { width: 72px; height: 72px; border-radius: 10px; background: var(--card-2); flex-shrink: 0; overflow: hidden; display: grid; place-items: center; color: var(--accent-text); border: 1px solid var(--line-gold); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* features */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { padding: 1.4rem; display: flex; gap: 1rem; }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(212,175,55,.1); color: var(--accent-text); flex-shrink: 0; }
.feature-icon svg { width: 22px; }
.feature h3 { font-family: var(--font); font-size: 15px; }
.feature p { font-size: 13px; color: var(--text-2); }

.cta-band { padding: 2.5rem; border-radius: var(--radius-lg); background: radial-gradient(400px 200px at 90% 0%, rgba(212,175,55,.25), transparent), var(--card); border: 1px solid var(--line-gold); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { font-size: 1.8rem; }

footer { border-top: 1px solid var(--line-gold); padding: 2rem 0; margin-top: 3rem; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
label, .label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
input, select, textarea { width: 100%; padding: .75rem .9rem; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: 14px var(--font); transition: .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
.check { display: flex; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.grid-2 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* auth */
.auth { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 2rem 0; }
.auth .card { width: min(440px, 100%); padding: 2.2rem; box-shadow: var(--shadow); border-color: var(--line-gold); }
.auth img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem; }
.auth h1 { text-align: center; font-size: 1.7rem; margin-bottom: .3rem; }

/* ---------- Booking ---------- */
.booking-container { max-width: 860px; }
.booking-head { text-align: center; margin-bottom: 2.2rem; }
.booking-head .eyebrow { display: inline-block; }
.booking-head h1 { font-size: clamp(2rem, 3.5vw, 2.6rem); margin-top: .3rem; }
.booking { display: flex; flex-direction: column; gap: 2rem; width: 100%; min-width: 0; }
.steps { display: grid; gap: 2rem; width: 100%; min-width: 0; }
.steps > div { width: 100%; min-width: 0; }
.step-title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.step-title span { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #0c0c0e; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(212,175,55,.3); }
.step-title h2 { font-size: 1.25rem; }

/* Service & Pro Selection Cards (identical to home services cards, spacious & elegant) */
.service-pick { position: relative; display: block; cursor: pointer; text-decoration: none; width: 100%; min-width: 0; }
.service-pick input { position: absolute; opacity: 0; pointer-events: none; }
.service-pick .service { cursor: pointer; transition: .25s ease; width: 100%; box-sizing: border-box; }
.service-pick input:checked + .service {
  border-color: var(--gold);
  background: rgba(212,175,55,.12);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow);
  transform: translateY(-2px);
}
.service-pick input:checked + .service .service-thumb {
  background: var(--gold);
  color: #0c0c0e;
  border-color: var(--gold);
}

.dates {
  display: flex; gap: .55rem; overflow-x: auto; padding-bottom: .6rem;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%; min-width: 0;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.dates::-webkit-scrollbar { display: none; width: 0; height: 0; }
.dates.grabbing, .dates:active { cursor: grabbing; }
.date-btn { min-width: 66px; padding: .65rem .4rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-align: center; transition: .2s; font-family: var(--font); flex-shrink: 0; }
.date-btn small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.date-btn b { font-size: 1.25rem; font-family: var(--font-display); }
.date-btn.active { background: var(--grad); color: #0c0c0e; border-color: transparent; }
.date-btn.active small { color: #3c2f00; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .6rem; width: 100%; min-width: 0; }
.slot { height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font: 600 14px var(--font); cursor: pointer; transition: .15s; }
.slot:hover { border-color: var(--gold); color: var(--accent-text); }
.slot.active { background: var(--gold); color: #0c0c0e; border-color: var(--gold); box-shadow: 0 4px 12px rgba(212,175,55,.3); }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.summary { border-color: var(--line-gold); box-shadow: var(--shadow); background: radial-gradient(400px 200px at 90% 0%, rgba(212,175,55,.12), transparent), var(--card); padding: 1.8rem; border-radius: var(--radius-lg); width: 100%; box-sizing: border-box; }
.summary-row { display: flex; justify-content: space-between; padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 1rem; }
.summary-row span { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin: 1.2rem 0; }
.summary-total b { font-family: var(--font-display); font-size: 1.8rem; color: var(--accent-text); }

/* ---------- Badges / alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; border: 1px solid; }
.badge-pendente { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.1); }
.badge-confirmado { color: var(--ok); border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.1); }
.badge-cancelamento_solicitado { color: #fb923c; border-color: rgba(251,146,60,.35); background: rgba(251,146,60,.1); }
.badge-cancelado { color: var(--err); border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.1); }
.badge-concluido { color: var(--info); border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.1); }
.flashes { position: fixed; top: 80px; right: 1rem; z-index: 100; display: grid; gap: .5rem; width: min(380px, calc(100% - 2rem)); }
.flash { padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-gold); border-left: 4px solid var(--gold); box-shadow: var(--shadow); font-size: 14px; animation: slideIn .35s ease; }
.flash.error { border-left-color: var(--err); } .flash.success { border-left-color: var(--ok); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }

/* appointments list */
.appt { display: flex; gap: 1rem; padding: 1.1rem; align-items: center; flex-wrap: wrap; }
.appt-date { width: 62px; text-align: center; border-right: 1px solid var(--line-gold); padding-right: 1rem; }
.appt-date b { font-family: var(--font-display); font-size: 1.6rem; display: block; line-height: 1; color: var(--accent-text); }
.appt-date small { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .1em; }
.appt-info { flex: 1; min-width: 180px; }
.appt-info h3 { font-family: var(--font); font-size: 15px; }
.appt-info p { font-size: 13px; color: var(--text-2); }
.list { display: grid; gap: .7rem; }

/* ---------- Admin ---------- */
.admin-layout { display: grid; gap: 1.5rem; padding: 1.5rem 0 3rem; min-width: 0; }
@media (min-width: 1000px) { .admin-layout { grid-template-columns: 240px minmax(0, 1fr); } }
@media (max-width: 899px) { .admin-layout { padding-bottom: 6rem; } }
.admin-main { min-width: 0; width: 100%; }

.sidebar {
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; padding: .25rem 0 .5rem; margin-bottom: .25rem;
  width: 100%; max-width: 100%; min-width: 0; cursor: grab;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.grabbing { cursor: grabbing; }
@media (min-width: 1000px) {
  .sidebar { flex-direction: column; position: sticky; top: 90px; align-self: start; padding: 0; margin-bottom: 0; cursor: default; }
}
.sidebar a {
  display: inline-flex; align-items: center; gap: .6rem; padding: .65rem 1rem;
  border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text-2);
  white-space: nowrap; background: var(--card); border: 1px solid var(--line);
  transition: .2s; flex-shrink: 0;
}
.sidebar a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar a:hover { color: var(--text); border-color: var(--line-gold); background: var(--card-2); }
.sidebar a.active {
  color: #0c0c0e; background: var(--grad); border-color: transparent;
  font-weight: 700; box-shadow: 0 4px 14px rgba(212,175,55,.35);
}

.page-head {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; align-items: stretch;
}
@media (min-width: 680px) {
  .page-head { flex-direction: row; justify-content: space-between; align-items: center; }
}
.page-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); line-height: 1.15; }

.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card);
  border: 1px solid var(--line-gold); border-radius: 10px; padding: 4px; gap: 2px;
  width: 100%; max-width: 360px; box-sizing: border-box;
}
@media (min-width: 680px) { .tabs { width: auto; min-width: 290px; } }
.tabs a {
  padding: .5rem .6rem; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--text-2); text-align: center; display: flex; align-items: center;
  justify-content: center; transition: .2s; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--grad); color: #0c0c0e; font-weight: 700; box-shadow: 0 2px 8px rgba(212,175,55,.25); }

.kpis {
  display: grid; gap: .85rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem;
}
@media (max-width: 380px) { .kpis { grid-template-columns: 1fr; } }
@media (min-width: 768px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.kpi {
  padding: 1.15rem 1rem; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 116px; box-sizing: border-box; border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.kpi .label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--text-2); display: block; }
.kpi b {
  display: block; font-family: var(--font-display); font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  margin: .35rem 0 .2rem; line-height: 1.15;
}
.kpi.hero-kpi {
  background: radial-gradient(300px 160px at 100% 0%, rgba(212,175,55,.22), transparent), var(--card);
  border-color: var(--line-gold);
}
.kpi.hero-kpi b { color: var(--accent-text); font-size: clamp(1.55rem, 4.2vw, 2.2rem); }
.kpi small { color: var(--muted); font-size: 11.5px; display: block; }

.chart-scroll {
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 100%; padding-bottom: .4rem; cursor: grab;
}
.chart-scroll::-webkit-scrollbar { display: none; }
.chart-scroll.grabbing { cursor: grabbing; }

.chart {
  display: flex; align-items: end; gap: 8px; height: 180px; padding-top: 1.2rem;
  min-width: 500px; box-sizing: border-box;
}
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: end; min-width: 26px; }
.bar i { width: 100%; max-width: 32px; border-radius: 6px 6px 2px 2px; background: var(--grad); min-height: 3px; transition: height .8s cubic-bezier(.2,.8,.2,1); opacity: .9; position: relative; }
.bar i:hover { opacity: 1; }
.bar i::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; translate: -50% -4px; font-size: 10px; font-style: normal; white-space: nowrap; color: var(--text); background: var(--card-2); padding: 2px 6px; border-radius: 4px; opacity: 0; transition: .2s; pointer-events: none; }
.bar i:hover::after { opacity: 1; }
.bar small { font-size: 10px; color: var(--muted); white-space: nowrap; }

.two-col { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .two-col { grid-template-columns: 1.3fr 1fr; } }

.team-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.team-row:last-child { border-bottom: 0; }
.team-row .grow { min-width: 0; }
@media (max-width: 540px) {
  .team-row { grid-template-columns: auto 1fr; row-gap: .5rem; }
  .team-row > div:last-child {
    grid-column: 2 / -1; text-align: left !important;
    display: flex; justify-content: space-between; align-items: center;
  }
}

.progress { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-top: .4rem; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .8rem; border-bottom: 1px solid var(--line-gold); white-space: nowrap; }
td { padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(212,175,55,.03); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.actions form { display: inline; }
.admin-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .admin-grid { grid-template-columns: 360px 1fr; align-items: start; } .admin-grid > .card:first-child { position: sticky; top: 90px; } }
.inactive { opacity: .45; }
.automation { display: flex; gap: 1rem; align-items: center; }
.pill-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.pill-stat div { background: var(--card-2); border-radius: 8px; padding: .75rem .4rem; text-align: center; }
.pill-stat b { font-family: var(--font-display); font-size: clamp(1.15rem, 3.2vw, 1.4rem); display: block; }
.pill-stat small { font-size: 11px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* Global SVG constraints & icon badges */
svg { width: 1.25rem; height: 1.25rem; max-width: 1.5rem; max-height: 1.5rem; vertical-align: middle; flex-shrink: 0; }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(201,160,80,0.12); color: var(--gold); flex-shrink: 0; }
.icon-badge svg { width: 18px; height: 18px; }
