:root {
  --bg: #0B0C0E; --surface: #161719; --surface-2: #1E2023; --line: #2A2D31;
  --sky: #4DB8E0; --amber: #F2A93B; --text: #EDEEF0; --dim: #8E949C;
  --danger: #E5636B; --ok: #5CC689;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--sky); }
.demo-banner { background: rgba(242,169,59,0.14); border-bottom: 1px solid rgba(242,169,59,0.45); color: #F6CF8E; font-size: 0.85rem; padding: 9px 20px; text-align: center; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 26px; object-fit: contain; }
.brand span { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: 0.02em; }
.brand em { font-style: normal; font-size: 0.78rem; font-weight: 600; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }

/* Sign in */
.signin { min-height: calc(100vh - 40px); display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.signin-card h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; margin: 22px 0 6px; }
.sub { color: var(--dim); font-size: 0.92rem; line-height: 1.5; }
.signin-card .sub { margin-bottom: 22px; }
label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--dim); margin: 14px 0 7px; }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; font-size: 0.98rem; padding: 11px 13px; }
.input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(77,184,224,0.18); }
textarea.input { resize: vertical; }
.btn-primary { border: 0; border-radius: 9px; background: var(--sky); color: #06161E; font: inherit; font-weight: 700; font-size: 0.95rem; padding: 11px 20px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary[disabled] { opacity: 0.6; cursor: default; }
.signin-card .btn-primary { width: 100%; margin-top: 22px; padding: 13px; }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; font-weight: 600; font-size: 0.9rem; padding: 10px 16px; cursor: pointer; text-decoration: none; }
.btn-ghost:hover { border-color: var(--sky); }
.btn-link { background: none; border: 0; color: var(--sky); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.signin-card > .btn-link { display: block; margin: 18px auto 0; }
.msg { border-radius: 9px; padding: 11px 13px; font-size: 0.88rem; line-height: 1.45; margin-bottom: 8px; background: rgba(229,99,107,0.12); border: 1px solid rgba(229,99,107,0.4); color: #F3B2B6; }
.msg.ok { background: rgba(92,198,137,0.12); border-color: rgba(92,198,137,0.4); color: #B9E9CB; }

/* Console */
.top { display: flex; align-items: center; gap: 24px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs button, .tabs a { background: none; border: 0; color: var(--dim); font: inherit; font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.tabs button.on { color: var(--text); background: var(--surface-2); }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.who { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; color: var(--dim); }
.role { text-transform: capitalize; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 0.75rem; font-weight: 600; }
.panel { max-width: 1180px; margin: 0 auto; padding: 28px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.45rem; margin-bottom: 4px; }
.search { max-width: 320px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.grid { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.grid th { text-align: left; font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: rgba(77,184,224,0.04); }
.grid .num { text-align: right; white-space: nowrap; }
.co-name { font-weight: 600; }
.small { display: block; color: var(--dim); font-size: 0.8rem; margin-top: 2px; }
.pill { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.building { background: rgba(77,184,224,0.14); color: var(--sky); }
.pill.login-moved { background: rgba(242,169,59,0.14); color: var(--amber); }
.pill.live { background: rgba(92,198,137,0.14); color: var(--ok); }
.pill.canceled { background: var(--surface-2); color: var(--dim); }
.due { font-weight: 600; white-space: nowrap; }
.due.late { color: var(--danger); }
.due.today { color: var(--amber); }
.row-action { white-space: nowrap; }
.empty { color: var(--dim); padding: 28px 4px; }
.log { list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.log li { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.9rem; display: grid; grid-template-columns: 170px 1fr; gap: 14px; }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--dim); font-size: 0.82rem; }

/* Dialog */
dialog { margin: auto; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); }
dialog::backdrop { background: rgba(0,0,0,0.6); }
dialog h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; margin-bottom: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--dim); font-size: 0.84rem; margin-top: 10px; }
.dialog-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.spacer { flex: 1; }
.history { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.history h3 { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.history li { list-style: none; font-size: 0.84rem; color: var(--dim); padding: 4px 0; }

@media (max-width: 700px) {
  .top { padding: 14px 16px; gap: 12px; }
  .panel { padding: 20px 16px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .log li { grid-template-columns: 1fr; gap: 4px; }
  .signin-card { padding: 28px 22px; }
}

/* Sales numbers */
.range { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.range button { background: none; border: 0; color: var(--dim); font: inherit; font-weight: 600; font-size: 0.86rem; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.range button.on { background: var(--surface-2); color: var(--text); }
.ga-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; min-width: 0; }
.ga-card h3 { font-size: 1rem; margin-bottom: 6px; }
.ga-card .btn-primary { margin-top: 16px; }
.sub.small { font-size: 0.84rem; margin-bottom: 12px; }
.ga-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0.9rem; color: var(--dim); }
.ga-now strong { color: var(--text); }
.now-total { display: flex; align-items: center; gap: 8px; color: var(--text); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(92,198,137,0.18); }
.now-site { display: flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.tile-label { font-size: 0.8rem; color: var(--dim); font-weight: 600; }
.tile-num { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; margin: 6px 0 2px; }
.tile-sub { font-size: 0.78rem; color: var(--dim); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; color: var(--dim); margin: 4px 0 8px; }
.leg { display: inline-flex; align-items: center; gap: 7px; }
.chart { width: 100%; overflow: hidden; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--dim); font-size: 11px; }
.chart .lab { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart .cross { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; }
.ga-details { margin-top: 12px; font-size: 0.86rem; color: var(--dim); }
.ga-details summary { cursor: pointer; font-weight: 600; }
.ga-details .table-wrap { margin-top: 10px; max-height: 320px; overflow: auto; }
.ga-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { cursor: default; }
.bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; margin-bottom: 5px; }
.bar-top span { color: var(--dim); }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; }
.ga-table { font-size: 0.86rem; }
.ga-table td, .ga-table th { padding: 9px 12px; }
.ga-table tbody tr { cursor: default; }
.ga-tip { position: fixed; z-index: 50; pointer-events: none; background: #0F1012; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 0.82rem; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,0.5); min-width: 150px; }
.tip-row { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.tip-row b { margin-left: auto; padding-left: 14px; color: var(--text); }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ga-two { grid-template-columns: 1fr; }
  .tile-num { font-size: 1.5rem; }
}

/* Phone: tabs in one swipeable row under the logo */
@media (max-width: 700px) {
  .top { flex-direction: column; align-items: stretch; gap: 10px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button, .tabs a { white-space: nowrap; }
  .who { justify-content: space-between; }
}
.input:disabled { opacity: .6; cursor: not-allowed; }

/* Review */
.tabs .count { display: inline-block; margin-left: 7px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--amber); color: #1A1204; font-size: 0.74rem; font-weight: 700; text-align: center; }
.pill.signed-up, .pill.choosing-plan { background: var(--surface-2); color: var(--text); }
.pill.under-review { background: rgba(242,169,59,0.14); color: var(--amber); }
.pill.declined { background: rgba(229,99,107,0.14); color: var(--danger); }
.flag { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin: 2px 4px 2px 0; white-space: nowrap; }
.flag.red { background: rgba(229,99,107,0.14); color: var(--danger); }
.flag.amber { background: rgba(242,169,59,0.14); color: var(--amber); }
.flags { margin: 14px 0 4px; display: grid; gap: 8px; }
.flag-row { border: 1px solid rgba(229,99,107,0.45); background: rgba(229,99,107,0.07); border-radius: 10px; padding: 10px 13px; font-size: 0.9rem; line-height: 1.45; }
.flag-row.amber { border-color: rgba(242,169,59,0.45); background: rgba(242,169,59,0.07); }
.decided { margin: 12px 0 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 13px; font-size: 0.9rem; }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.rv-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.rv-box h3 { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.rv-box .btn-ghost { display: inline-block; margin-bottom: 8px; }
.rv-links { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 0.9rem; }
.kv dt { color: var(--dim); }
label.check { display: flex; gap: 9px; align-items: flex-start; color: var(--text); font-weight: 500; font-size: 0.9rem; margin: 9px 0 0; cursor: pointer; }
label.check input { margin-top: 3px; accent-color: var(--sky); }
label.check .small { display: inline; margin-left: 4px; }
.input.short { max-width: 140px; }
.rv-decline { margin-top: 12px; }
.rv-decline textarea { margin-top: 6px; font-size: 0.9rem; }
.rv-decline .btn-ghost { margin-top: 8px; }
.btn-danger { border: 0; border-radius: 9px; background: var(--danger); color: #1E0607; font: inherit; font-weight: 700; font-size: 0.95rem; padding: 11px 20px; cursor: pointer; }
.btn-danger[disabled], .btn-ghost[disabled] { opacity: 0.6; cursor: default; }
@media (max-width: 800px) { .rv-grid { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
