/* Scriben gym owner dashboard: the website's palette (black, lime, bone), kept quiet. */
:root {
  --black: #0e0e0c;
  --panel: #181816;
  --panel-2: #22221f;
  --line: #2e2d29;
  --bone: #f3f1ea;
  --muted: #a19d93;
  --lime: #d6ff3d;
  --lime-dk: #b8e01f;
  --ok: #7fd18b;
  --warn: #f2b84b;
  --bad: #ff7a66;
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--black); color: var(--bone); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(40px, 7vw, 56px); line-height: 0.9; }
h2 { font-size: 24px; line-height: 1; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.brand { font: 800 22px/1 var(--display); letter-spacing: 0.14em; margin: 0; }
.brand span { color: var(--black); background: var(--lime); padding: 2px 5px 1px; margin-left: 6px; letter-spacing: 0.08em; }
.link { color: var(--lime); text-decoration: none; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px;
  font: 700 13px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform 0.12s, background 0.2s, border-color 0.2s; }
.btn:active { transform: scale(0.97); }
.btn-lime { background: var(--lime); color: var(--black); }
.btn-lime:hover { background: var(--lime-dk); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--bone); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 18px; width: 40px; height: 40px; cursor: pointer; border-radius: 50%; }
.icon-btn:hover { color: var(--bone); background: var(--panel-2); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 14px; }
input, select, textarea { font: 15px/1.4 var(--body); color: var(--bone); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); outline: none; }
textarea { resize: vertical; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; }
.login-card h1 { margin: 28px 0 8px; }
.login-card .btn { width: 100%; margin-top: 12px; }

/* Shell */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px 28px; background: rgba(14, 14, 12, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
#nav { display: flex; gap: 4px; }
#nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
#nav a:hover { color: var(--bone); }
#nav a.on { color: var(--black); background: var(--lime); }
.top-end { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.top-link { background: none; border: 0; color: var(--muted); font: 500 14px var(--body); cursor: pointer; text-decoration: none; padding: 6px 0; }
.top-link:hover { color: var(--bone); }
.badge { background: var(--bad); color: var(--black); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 16px; }
#nav a.on .badge { background: var(--black); color: var(--lime); }
.main { max-width: 1180px; margin: 0 auto; padding: 32px 28px 64px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.kpi b { display: block; font: 800 48px/0.95 var(--display); margin: 8px 0 4px; }
.kpi.hot b { color: var(--lime); }
.kpi p { margin: 0; }

/* Chart and bars */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 8px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .bar { width: 100%; max-width: 28px; background: var(--lime); border-radius: 4px 4px 1px 1px; min-height: 2px; }
.chart .bar.zero { background: var(--line); }
.chart small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.bars { display: grid; gap: 10px; }
.bars .row { display: grid; grid-template-columns: 96px 1fr 36px; gap: 10px; align-items: center; font-size: 14px; }
.bars .track { display: block; height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--lime); border-radius: 999px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.list li:first-child { border-top: 0; }
.list button { all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; width: 100%; }
.list button:hover b { color: var(--lime); }
.list .when { color: var(--muted); white-space: nowrap; font-size: 13px; }

/* Leads */
.filters { display: grid; grid-template-columns: 1fr 180px 180px; gap: 10px; margin-bottom: 10px; }
.leads { display: grid; gap: 10px; margin-top: 10px; }
.lead { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.lead.new { border-color: color-mix(in srgb, var(--lime) 45%, var(--line)); }
.lead-main { min-width: 0; cursor: pointer; }
.lead-main b { font-size: 16px; }
.lead-main p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-side { display: flex; gap: 8px; align-items: center; }
.lead-side select { width: 140px; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.wa { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; font-size: 12px; font-weight: 700; color: var(--lime); }
.wa:hover { border-color: var(--lime); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--bone); margin-right: 6px; vertical-align: 2px; }
.st-new { color: var(--black); background: var(--lime); }
.st-contacted { color: var(--warn); }
.st-booked, .st-joined { color: var(--ok); }
.st-lost, .st-cancelled { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* Lead sheet */
.sheet { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); background: var(--panel); color: var(--bone); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.6); }
.sheet-x { position: absolute; top: 12px; right: 12px; margin: 0; }
.sheet h2 { font-size: 34px; padding-right: 40px; }
.fields { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 18px 0 4px; font-size: 14px; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--bone); color: var(--black); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: 0.25s; pointer-events: none; margin: 0; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters #f-q { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  #nav { order: 3; width: 100%; overflow-x: auto; }
  .main { padding: 24px 16px 48px; }
  .kpi b { font-size: 40px; }
  .lead { grid-template-columns: 1fr; }
  .lead-side select { flex: 1; width: auto; }
  .bars .row { grid-template-columns: 84px 1fr 30px; }
  .fields { grid-template-columns: 90px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
