/* TV Wizard web — dark background, amber accent, white selection (the app's default look). */
:root {
  --bg: #0b0d12; --panel: #161a22; --panel2: #1d222c; --panel3: #242a36; --line: #2a303c; --text: #e9ebef; --muted: #8e96a6;
  --accent: #f5a623; --accent-ink: #141414; --accent-soft: rgba(245,166,35,.14); --ok: #3ccf7a; --warn: #f5c044; --bad: #ff5d5d; --radius: 12px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 24px -14px rgba(0,0,0,.55);
  --ease: cubic-bezier(.2,.7,.2,1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 19px; margin-top: 26px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none !important; }
.brand img { image-rendering: pixelated; border-radius: 10px; }
.brand small { display: block; font-size: 11px; color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brand h1 { margin: 0; font-size: 22px; }

/* buttons & forms */
.btn { display: inline-block; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease); }
.btn:hover, .btn:focus-visible { border-color: var(--accent); outline: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: #5a2a2a; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 13px; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,166,35,.18); }
input[type=radio] { display: inline-block; width: auto; margin: 0 6px 0 0; accent-color: var(--accent); }
/* checkboxes: dark rounded square, amber when on (same look everywhere) */
input[type=checkbox] { -webkit-appearance: none; appearance: none; display: inline-block; flex: none; width: 20px; height: 20px; min-width: 20px; padding: 0; margin: 0 6px 0 0; vertical-align: middle; cursor: pointer; background-color: var(--bg); border: 1.5px solid #3a4152; border-radius: 6px; box-shadow: none; transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease); }
input[type=checkbox]:hover { border-color: var(--accent); background-color: rgba(245,166,35,.08); }
input[type=checkbox]:active { transform: scale(.92); }
input[type=checkbox]:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,166,35,.28); }
input[type=checkbox]:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--accent); }
input[type=checkbox]:indeterminate { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' stroke='%23141414' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--accent); }
input[type=checkbox]:disabled { opacity: .4; cursor: not-allowed; }
label.check input[type=checkbox] { margin-right: 10px; }
.table td > input[type=checkbox], .table th > input[type=checkbox] { margin-top: 2px; }

/* features matrix */
.matrix th, .matrix td { vertical-align: middle; }
.matrix th, .matrix td { padding-left: 6px; padding-right: 6px; }
.matrix th:first-child, .matrix td:first-child { min-width: 200px; padding-left: 10px; }
.matrix th.center, .matrix td.center { text-align: center; }
.matrix th.center { white-space: nowrap; }
.matrix td.center input[type=checkbox] { margin: 0; }
.th-sub { display: block; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; margin-top: 2px; }

/* dashboard live bar */
.live-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-end; margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.live-bar label.check { color: var(--muted); font-size: 13px; }
.live-bar .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.live-bar.paused .dot { background: var(--muted); }

label.check { display: flex; align-items: center; color: var(--text); font-weight: 500; }
textarea { min-height: 110px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }

/* alerts & pills */
.alert { border-radius: 10px; padding: 11px 14px; margin: 0 0 14px; border: 1px solid; }
.alert.ok { background: rgba(60,207,122,.08); border-color: rgba(60,207,122,.35); }
.alert.bad { background: rgba(255,93,93,.08); border-color: rgba(255,93,93,.4); }
.alert.warn { background: rgba(245,192,68,.08); border-color: rgba(245,192,68,.4); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel2); }
.pill.ok { color: var(--ok); } .pill.bad { color: var(--bad); } .pill.warn { color: var(--warn); } .pill.mute { color: var(--muted); }

/* cards & tables */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card h3 { font-size: 16px; }
.stat { background: linear-gradient(165deg, var(--panel3), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.stat:hover { border-color: #3a4152; transform: translateY(-1px); }
.stat b { display: block; font-size: 28px; color: var(--accent); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table-wrap { overflow-x: auto; }
.inline { display: inline; }

/* dashboard / admin shell */
.nav-overlay { position: fixed; inset: 0; background: rgba(5,6,9,.65); opacity: 0; pointer-events: none; z-index: 45; transition: opacity .2s var(--ease); }
.shell { display: flex; min-height: 100vh; }
.side { width: 264px; flex: none; background: linear-gradient(180deg, var(--panel) 0%, #131620 100%); border-right: 1px solid var(--line); padding: 18px 14px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 50; }
.side .brand { padding: 2px 10px 16px; flex: none; }
.nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-group-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .75; }
.side nav a { display: flex; align-items: center; gap: 11px; color: var(--text); padding: 9px 11px; border-radius: 10px; text-decoration: none; border-left: 3px solid transparent; font-size: 14px; transition: background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease); }
.side nav a:hover { background: var(--panel2); text-decoration: none; }
.side nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-left-color: var(--accent); }
.side nav .navicon { width: 18px; height: 18px; flex: none; opacity: .8; }
.side nav a.on .navicon, .side nav a:hover .navicon { opacity: 1; }
.side-foot { flex: none; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.who:hover { background: var(--panel2); }
.who-badge { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.who-text { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.who-text b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { color: var(--muted); font-size: 11px; }
.side nav a.exit, .side-foot a.exit { display: flex; align-items: center; gap: 11px; margin-top: 4px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.side-foot a.exit:hover { background: rgba(255,93,93,.1); color: var(--bad); text-decoration: none; }
.side-foot a.exit .navicon { width: 17px; height: 17px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-in { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(11,13,18,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 34px; height: 34px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; flex: none; }
.hamburger span { display: block; width: 16px; height: 2px; background: var(--text); margin: 0 auto; border-radius: 2px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; min-width: 0; }
.crumb-group { white-space: nowrap; }
.crumb-sep { opacity: .5; }
.crumb-page { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { flex: 1; padding: 26px 34px 40px; max-width: 1200px; width: 100%; }
.page-title { font-size: 26px; margin-bottom: 20px; }

@media (max-width: 860px) {
  .side { position: fixed; top: 0; left: 0; width: 280px; max-width: 86vw; transform: translateX(-100%); box-shadow: 0 0 0 1px rgba(0,0,0,.2), 30px 0 60px -20px rgba(0,0,0,.6); transition: transform .22s var(--ease); }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .hamburger { display: inline-flex; }
  .content { padding: 18px; }
  .topbar-in { padding: 10px 14px; }
  .crumb-group { display: none; }
  .crumb-sep { display: none; }
}

/* auth pages */
.auth-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1000px 500px at 50% -10%, #2a1d08 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 860px; }
.auth-card h2 { margin-top: 22px; }
.steps li { margin-bottom: 8px; }

/* public site */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 10px; }
.topbar nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: var(--text); }
.site { max-width: 1100px; margin: 0 auto; padding: 28px; }
.hero { text-align: center; padding: 50px 10px 30px; }
.hero h1 { font-size: 44px; margin-bottom: 12px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto 22px; }
.hero img.logo { width: 128px; height: 128px; image-rendering: pixelated; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.features .card p { color: var(--muted); margin: 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.plan .price { font-size: 26px; font-weight: 800; color: var(--accent); }
.plan ul { padding-left: 18px; color: var(--muted); }
.plan.current { border-color: var(--accent); }
.foot { border-top: 1px solid var(--line); padding: 24px 28px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.foot nav { display: flex; gap: 16px; }
.code-box { font: 700 34px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; text-align: center; text-transform: uppercase; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; }
.avatars label { cursor: pointer; }
.avatars input { display: none; }
.avatars img { width: 54px; height: 54px; border-radius: 50%; border: 3px solid transparent; image-rendering: pixelated; background: var(--panel2); }
.avatars input:checked + img { border-color: #fff; }
.profile-chip { display: inline-flex; align-items: center; gap: 10px; }
.profile-chip img { width: 38px; height: 38px; border-radius: 50%; image-rendering: pixelated; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; }
details summary { cursor: pointer; color: var(--accent); }

/* scrollbars inside the dark panels */
.nav-scroll::-webkit-scrollbar { width: 6px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* analytics (admin) */
.chart { width: 100%; height: auto; display: block; }
.chart-key { margin: 4px 0 0; }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bar-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--panel2); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 700; margin-left: 6px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.stat small { display: block; color: var(--muted); margin-top: 2px; }
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 120px; gap: 10px; align-items: center; }
.funnel-bar { background: var(--panel2); border-radius: 8px; height: 26px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffcf78); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.range-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.range-form input[type=date] { max-width: 160px; }
.attn { border-left: 3px solid var(--warn); }
.attn.bad { border-left-color: var(--bad); }
.admin-search { margin-left: auto; display: flex; gap: 6px; }
.admin-search input { max-width: 240px; padding: 6px 10px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.timeline time { color: var(--muted); min-width: 118px; font-size: 13px; }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 90px 1fr auto; } }

/* clickable dashboard cards + quick actions */
a.stat.link { display: block; position: relative; color: inherit; text-decoration: none !important; cursor: pointer; }
a.stat.link:hover, a.stat.link:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
a.stat.link:active { transform: translateY(0); }
a.stat.link .go { position: absolute; top: 12px; right: 16px; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .15s var(--ease), transform .15s var(--ease); }
a.stat.link:hover .go, a.stat.link:focus-visible .go { opacity: 1; transform: none; color: var(--accent); }
a.stat.hot { border-color: rgba(245,192,68,.55); background: linear-gradient(165deg, rgba(245,192,68,.10), var(--panel)); }
a.stat.hot b { color: var(--warn); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.card h3 a { font-size: 13px; white-space: nowrap; }
@media (hover: none) { a.stat.link .go { opacity: .7; transform: none; } }

/* ==========================================================================
   Customer dashboard + sign-in pages: visual polish only (no behaviour change).
   Everything is scoped to .area-dashboard / .auth-page so the admin panel and
   the public site keep their current look.
   ========================================================================== */
.area-dashboard { --panel: #11141b; --panel2: #181c26; --panel3: #1f2430; --line: #222836; --muted: #8b94a6; --accent-soft: rgba(245,166,35,.12); --glow: 0 10px 28px -12px rgba(245,166,35,.55); -webkit-font-smoothing: antialiased; }
.area-dashboard h1, .area-dashboard h2, .area-dashboard h3 { letter-spacing: -.015em; }

/* sidebar */
.area-dashboard .side { width: 260px; background: #0e1118; padding: 20px 14px 14px; }
.area-dashboard .side .brand { padding: 2px 10px 18px; font-size: 19px; letter-spacing: -.01em; }
.area-dashboard .side .brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 4px 14px -6px rgba(245,166,35,.5); }
.area-dashboard .nav-group-label { margin: 20px 12px 6px; font-size: 10.5px; letter-spacing: .14em; opacity: .6; }
.area-dashboard .side nav a { position: relative; border-left: 0; padding: 10px 12px; border-radius: 10px; color: #c9cfdb; font-weight: 500; }
.area-dashboard .side nav a:hover { background: var(--panel2); color: #fff; }
.area-dashboard .side nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.area-dashboard .side nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.area-dashboard .side-foot { border-top-color: var(--line); }
.area-dashboard .who-badge { background: linear-gradient(135deg, #ffcf78, var(--accent)); }

/* top bar */
.area-dashboard .topbar-in { padding: 14px 40px; background: rgba(11,13,18,.78); }
.area-dashboard .top-links { margin-left: auto; display: flex; gap: 6px; }
.area-dashboard .top-links a { color: var(--muted); font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px; text-decoration: none; transition: background .12s var(--ease), color .12s var(--ease); }
.area-dashboard .top-links a:hover { color: #fff; background: var(--panel2); }

/* page frame */
.area-dashboard .main { min-height: 100vh; }
.area-dashboard .content { max-width: 1080px; padding: 40px 40px 56px; }
.area-dashboard .page-title { font-size: 32px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 22px; }
.area-dashboard .page-title + p.muted { margin: -12px 0 26px; max-width: 70ch; font-size: 15px; line-height: 1.6; }
.area-dashboard h2 { font-size: 20px; margin: 34px 0 14px; }

/* cards */
.area-dashboard .card { background: var(--panel); border-radius: 16px; padding: 24px 26px; margin-bottom: 20px; box-shadow: none; }
.area-dashboard .card h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.area-dashboard .card.muted { padding: 22px 26px; }

/* stat tiles */
.area-dashboard .grid3 { gap: 14px; margin-bottom: 4px; }
.area-dashboard .stat { background: var(--panel); border-radius: 14px; padding: 18px 20px 16px; box-shadow: none; display: flex; flex-direction: column; gap: 2px; }
.area-dashboard .stat:hover { border-color: #323a4b; transform: none; }
.area-dashboard .stat > span.muted:first-child { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.area-dashboard .stat b { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 6px 0 2px; }
.area-dashboard .stat .small { font-size: 12.5px; }
.area-dashboard .grid3 > .stat:first-child { border-color: rgba(245,166,35,.32); background: linear-gradient(160deg, rgba(245,166,35,.11), var(--panel) 70%); }
.area-dashboard .grid3 > .stat:first-child b { color: var(--accent); }

/* "Get started" steps */
.area-dashboard .steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.area-dashboard .steps li { counter-increment: step; position: relative; margin: 0; padding: 14px 0 14px 48px; border-top: 1px solid var(--line); line-height: 1.55; }
.area-dashboard .steps li:first-child { border-top: 0; padding-top: 4px; }
.area-dashboard .steps li:first-child::before { top: 4px; }
.area-dashboard .steps li::before { content: counter(step); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* tables: soft panel, roomy rows */
.area-dashboard .content > .table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 18px; }
.area-dashboard .card .table-wrap { margin: 0 -8px; }
.area-dashboard .table th { padding: 13px 16px; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); background: rgba(255,255,255,.018); border-bottom: 1px solid var(--line); white-space: nowrap; }
.area-dashboard .table td { padding: 15px 16px; border-bottom: 1px solid rgba(34,40,54,.7); vertical-align: middle; }
.area-dashboard .table tr:last-child td { border-bottom: 0; }
.area-dashboard .table tr:hover td { background: rgba(255,255,255,.022); }
.area-dashboard .table td.row { flex-wrap: nowrap; }
.area-dashboard .table td form.row input { margin-top: 0; }

/* buttons */
.area-dashboard .btn { border-radius: 10px; padding: 10px 18px; font-weight: 600; background: var(--panel2); border-color: #2a3140; }
.area-dashboard .btn:hover, .area-dashboard .btn:focus-visible { border-color: #4a5366; background: var(--panel3); }
.area-dashboard .btn.primary { background: linear-gradient(180deg, #ffbb3d, var(--accent)); border-color: #f5a623; color: var(--accent-ink); box-shadow: var(--glow); }
.area-dashboard .btn.primary:hover { filter: brightness(1.07); border-color: #ffc861; }
.area-dashboard .btn.danger { color: #ff7b7b; border-color: rgba(255,93,93,.28); background: rgba(255,93,93,.05); }
.area-dashboard .btn.danger:hover { border-color: rgba(255,93,93,.6); background: rgba(255,93,93,.12); }
.area-dashboard .btn.small { padding: 6px 13px; border-radius: 8px; font-size: 13px; }
.area-dashboard .btn[disabled] { box-shadow: none; }

/* forms */
.area-dashboard .form label { color: #aab2c2; font-size: 13px; }
.area-dashboard input, .area-dashboard select, .area-dashboard textarea { background: #0b0d12; border-color: #262c3a; border-radius: 10px; padding: 10px 13px; }
.area-dashboard input:hover, .area-dashboard select:hover, .area-dashboard textarea:hover { border-color: #384052; }
.area-dashboard input:focus, .area-dashboard select:focus, .area-dashboard textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,166,35,.16); }
.area-dashboard input[type=checkbox], .area-dashboard input[type=radio] { padding: 0; }
.area-dashboard .grid2 { gap: 0 20px; }
.area-dashboard details { background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 6px 0 14px; }
.area-dashboard details summary { font-weight: 600; font-size: 14px; }
.area-dashboard .code-box { background: var(--bg); border: 1px dashed #3a4152; border-radius: 14px; padding: 18px 12px; color: var(--accent); }
.area-dashboard .secret { color: #c9cfdb; }

/* alerts & pills */
.area-dashboard .alert { border-radius: 12px; padding: 13px 16px; border-width: 1px; border-left-width: 3px; line-height: 1.55; }
.area-dashboard .alert.ok { border-left-color: var(--ok); }
.area-dashboard .alert.warn { border-left-color: var(--warn); }
.area-dashboard .alert.bad { border-left-color: var(--bad); }
.area-dashboard .pill { padding: 3px 11px; font-size: 12px; letter-spacing: .01em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.area-dashboard .pill.ok { background: rgba(60,207,122,.12); }
.area-dashboard .pill.warn { background: rgba(245,192,68,.12); }
.area-dashboard .pill.bad { background: rgba(255,93,93,.12); }

/* profiles + avatars */
.area-dashboard .profile-chip { font-weight: 600; }
.area-dashboard .profile-chip img { width: 42px; height: 42px; box-shadow: 0 0 0 2px var(--line); background: var(--panel3); }
.area-dashboard .avatars { gap: 10px; }
.area-dashboard .avatars img { width: 58px; height: 58px; transition: transform .12s var(--ease), border-color .12s var(--ease); }
.area-dashboard .avatars label:hover img { transform: scale(1.07); }
.area-dashboard .avatars input:checked + img { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,166,35,.25); }

/* plans */
.area-dashboard .plans { gap: 16px; }
.area-dashboard .plan { position: relative; background: var(--panel); border-radius: 16px; padding: 24px; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.area-dashboard .plan:hover { border-color: #323a4b; transform: translateY(-2px); }
.area-dashboard .plan h3 { font-size: 18px; margin-bottom: 8px; }
.area-dashboard .plan .price { font-size: 30px; letter-spacing: -.02em; }
.area-dashboard .plan.current { border-color: rgba(245,166,35,.6); background: linear-gradient(165deg, rgba(245,166,35,.09), var(--panel) 65%); box-shadow: 0 0 0 1px rgba(245,166,35,.18); }
.area-dashboard .plan.current::after { content: "Current"; position: absolute; top: 18px; right: 18px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.area-dashboard .plan ul { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; color: #c9cfdb; }
.area-dashboard .plan li { position: relative; padding-left: 24px; }
.area-dashboard .plan li::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.area-dashboard .plan li.muted { color: var(--muted); }
.area-dashboard .plan li.muted::before { background: var(--muted); opacity: .5; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* footer */
.area-dashboard .btn + .muted { margin-left: 8px; }
.dash-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 22px 40px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.dash-foot nav { display: flex; gap: 18px; }
.dash-foot a { color: var(--muted); }
.dash-foot a:hover { color: var(--text); text-decoration: none; }

/* sign-in / register / reset pages */
.auth-page { background: radial-gradient(900px 480px at 50% -8%, rgba(245,166,35,.16) 0%, transparent 62%), radial-gradient(700px 420px at 100% 110%, rgba(110,90,255,.08) 0%, transparent 60%), var(--bg); }
.auth-card { background: #11141b; border-color: #232937; border-radius: 20px; padding: 34px 32px 30px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02); }
.auth-card .brand { gap: 14px; }
.auth-card .brand img { border-radius: 14px; box-shadow: 0 8px 22px -8px rgba(245,166,35,.55); }
.auth-card .brand h1 { font-size: 24px; letter-spacing: -.02em; }
.auth-card h2 { font-size: 20px; margin: 26px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.auth-card input, .auth-card select { background: #0b0d12; border-color: #262c3a; border-radius: 10px; padding: 11px 13px; }
.auth-card .form label { color: #aab2c2; }
.auth-card .btn { border-radius: 10px; padding: 11px 20px; }
.auth-card .btn.primary { background: linear-gradient(180deg, #ffbb3d, var(--accent)); box-shadow: 0 10px 28px -12px rgba(245,166,35,.55); }
.auth-card .alert { border-radius: 12px; border-left-width: 3px; }

@media (max-width: 860px) {
  .area-dashboard .content { padding: 22px 18px 40px; }
  .area-dashboard .page-title { font-size: 26px; }
  .area-dashboard .topbar-in { padding: 10px 14px; }
  .area-dashboard .top-links { display: none; }
  .area-dashboard .side nav a.on::before { left: -14px; }
  .area-dashboard .card { padding: 20px 18px; }
  .dash-foot { padding: 18px; }
}

/* Connections page (dashboard) */
.area-dashboard [hidden] { display: none !important; }
.area-dashboard .conn-card { padding: 8px 22px; }
.area-dashboard .conn-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.area-dashboard .conn-card > .conn-row:first-child { border-top: 0; }
.area-dashboard .conn-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.area-dashboard .conn-side { display: flex; align-items: center; gap: 10px; flex: none; }
.area-dashboard .conn-logo { width: 38px; height: 38px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 16px; }
.area-dashboard .conn-add { display: grid; gap: 0; }
.area-dashboard .conn-pick { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 600; padding: 14px 0; cursor: pointer; text-align: left; transition: color .12s var(--ease); }
.area-dashboard .conn-pick:first-child { border-top: 0; }
.area-dashboard .conn-pick:hover, .area-dashboard .conn-pick.on { color: var(--accent); }
.area-dashboard .conn-panel { margin: 6px 0 14px; padding: 18px 20px; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 14px; }
.area-dashboard .conn-panel h3 { font-size: 16px; margin-bottom: 8px; }
.area-dashboard .conn-code { margin-top: 10px; }
.area-dashboard .conn-code .code-box { font-size: 26px; padding: 12px 10px; max-width: 280px; }
@media (max-width: 640px) { .area-dashboard .conn-row { flex-wrap: wrap; } }

/* ==========================================================================
   Checklist (customer "Get started" + admin "Setup")
   ========================================================================== */
.checklist { list-style: none; margin: 0; padding: 0; }
.ck { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.ck:first-child { border-top: 0; padding-top: 4px; }
.ck-mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; border: 1.5px solid #323a4b; color: var(--muted); background: transparent; transition: background .15s var(--ease), border-color .15s var(--ease); }
.ck-mark svg { width: 18px; height: 18px; }
.ck.done .ck-mark { background: rgba(60,207,122,.14); border-color: rgba(60,207,122,.35); color: var(--ok); }
.ck.cur .ck-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px rgba(245,166,35,.7); }
.ck-body { min-width: 0; flex: 1; }
.ck-title { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; padding-top: 5px; }
.ck.todo .ck-title { color: #c9cfdb; font-weight: 600; }
.ck.done .ck-title { font-weight: 600; }
.ck-title a { color: inherit; }
.ck-title a:hover { color: var(--accent); }
.ck-sub { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 3px; max-width: 70ch; }
.ck.cur .ck-sub { color: #aab2c2; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ck-intro { margin: -6px 0 10px; font-size: 14px; }
.ck-foot { margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--text); text-decoration: underline; }
.card.getstarted { margin-bottom: 20px; }

/* ==========================================================================
   Shared polish for the admin panel (same visual language as the customer dashboard)
   ========================================================================== */
.area-admin { --panel: #11141b; --panel2: #181c26; --panel3: #1f2430; --line: #222836; --muted: #8b94a6; --accent-soft: rgba(245,166,35,.12); --glow: 0 10px 28px -12px rgba(245,166,35,.55); -webkit-font-smoothing: antialiased; }
.area-admin h1, .area-admin h2, .area-admin h3 { letter-spacing: -.015em; }
.area-admin [hidden] { display: none !important; }
.area-admin .side { background: #0e1118; width: 252px; padding: 20px 14px 14px; }
.area-admin .side .brand { padding: 2px 10px 18px; letter-spacing: -.01em; }
.area-admin .side .brand img { width: 38px; height: 38px; box-shadow: 0 4px 14px -6px rgba(245,166,35,.5); }
.area-admin .nav-group-label { margin: 20px 12px 6px; font-size: 10.5px; letter-spacing: .14em; opacity: .6; }
.area-admin .side nav a { position: relative; border-left: 0; padding: 9px 12px; color: #c9cfdb; font-weight: 500; }
.area-admin .side nav a:hover { background: var(--panel2); color: #fff; }
.area-admin .side nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.area-admin .side nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.area-admin .who-badge { background: linear-gradient(135deg, #ffcf78, var(--accent)); }
.area-admin .topbar-in { padding: 12px 36px; }
.area-admin .admin-search input { background: var(--bg); border-radius: 9px; }
.area-admin .content { max-width: 1280px; padding: 34px 36px 56px; }
.area-admin .page-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 20px; }
.area-admin h2 { font-size: 20px; margin: 30px 0 14px; }

.area-admin .card { background: var(--panel); border-radius: 16px; padding: 22px 24px; box-shadow: none; }
.area-admin .card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.area-admin .card h3 a { margin-left: auto !important; font-weight: 500 !important; color: var(--muted); }
.area-admin .card h3 a:hover { color: var(--accent); text-decoration: none; }
.area-admin .grid3 { gap: 14px; }
.area-admin .grid2 { gap: 18px; }
.area-admin .stat { background: var(--panel); border-radius: 14px; padding: 18px 20px 16px; box-shadow: none; display: flex; flex-direction: column; gap: 2px; }
.area-admin .stat:hover { border-color: #323a4b; transform: none; }
.area-admin a.stat.link:hover, .area-admin a.stat.link:focus-visible { border-color: rgba(245,166,35,.55); }
.area-admin .stat > span.muted:first-child { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.area-admin .stat b { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 6px 0 2px; }
.area-admin .stat small { font-size: 12.5px; }
.area-admin a.stat.hot b { color: var(--warn); }

.area-admin .table th { padding: 11px 14px; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); background: rgba(255,255,255,.018); border-bottom: 1px solid var(--line); white-space: nowrap; }
.area-admin .table td { padding: 12px 14px; border-bottom: 1px solid rgba(34,40,54,.7); vertical-align: middle; }
.area-admin .table tr:last-child td { border-bottom: 0; }
.area-admin .table tr:hover td { background: rgba(255,255,255,.022); }
.area-admin .card .table-wrap { margin: 0 -10px; }
.area-admin .content > .table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 18px; }

/* plain label / value lists inside cards */
.table.kv { margin: -6px 0 0; }
.table.kv td { background: none !important; padding: 11px 2px; }
.table.kv td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.area-admin .btn { border-radius: 10px; font-weight: 600; background: var(--panel2); border-color: #2a3140; }
.area-admin .btn:hover, .area-admin .btn:focus-visible { border-color: #4a5366; background: var(--panel3); }
.area-admin .btn.primary { background: linear-gradient(180deg, #ffbb3d, var(--accent)); border-color: #f5a623; color: var(--accent-ink); box-shadow: var(--glow); }
.area-admin .btn.danger { color: #ff7b7b; border-color: rgba(255,93,93,.28); background: rgba(255,93,93,.05); }
.area-admin .btn.small { padding: 6px 13px; border-radius: 8px; }
.area-admin input, .area-admin select, .area-admin textarea { background: #0b0d12; border-color: #262c3a; border-radius: 10px; }
.area-admin input[type=checkbox] { padding: 0; }
.area-admin .form label { color: #aab2c2; }
.area-admin details { background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 6px 0 14px; }
.area-admin .alert { border-radius: 12px; border-left-width: 3px; padding: 13px 16px; line-height: 1.55; }
.area-admin .alert.ok { border-left-color: var(--ok); } .area-admin .alert.warn { border-left-color: var(--warn); } .area-admin .alert.bad { border-left-color: var(--bad); }
.area-admin .pill { padding: 3px 11px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.area-admin .pill.ok { background: rgba(60,207,122,.12); } .area-admin .pill.warn { background: rgba(245,192,68,.12); } .area-admin .pill.bad { background: rgba(255,93,93,.12); }
.area-admin .attn { border-left-width: 1px; }

/* admin dashboard bits */
.live-bar { margin: -4px 0 16px; }
.quick { margin-bottom: 20px; gap: 10px; }
.lvl { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; background: var(--warn); box-shadow: 0 0 0 3px rgba(245,192,68,.16); }
.lvl.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(255,93,93,.16); }
.attn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attn-list a { color: var(--text); }
.attn-list a:hover { color: var(--accent); }
.area-admin .ck-title { padding-top: 6px; font-size: 14.5px; font-weight: 600; }
.area-admin .ck { padding: 11px 0; align-items: center; }
.area-admin .ck-mark { width: 26px; height: 26px; }
.area-admin .ck-mark svg { width: 14px; height: 14px; }
.area-admin .ck.todo .ck-mark { border-color: rgba(245,192,68,.55); }
.area-admin .ck-body { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.area-admin .ck-title { padding-top: 0; }
.area-admin .ck-sub { margin: 0; font-size: 13px; }
.area-admin .ck.todo .ck-title { color: var(--text); }

@media (max-width: 860px) {
  .area-admin .content { padding: 20px 16px 40px; }
  .area-admin .topbar-in { padding: 10px 14px; }
  .area-admin .page-title { font-size: 26px; }
  .ck { gap: 12px; }
}
.area-dashboard .grid3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.area-admin .ck.cur .ck-mark { background: transparent; border-color: rgba(245,192,68,.55); box-shadow: none; }
/* r12 fixes: long emails/dates no longer overflow label-value cards; more room under the dashboard stat tiles */
.table.kv { table-layout: auto; }
.table.kv td:first-child { overflow-wrap: anywhere; min-width: 0; }
.table.kv td.small { white-space: normal; text-align: right; width: 1%; min-width: 96px; font-weight: 500; }
.area-admin .card { overflow: hidden; }
.area-dashboard .grid3 { margin-bottom: 20px; }
/* r18 admin spacing: breathing room between toolbars/filters and the table/results below; inputs align with buttons */
.area-admin form.row.form, .area-admin .range-form, .area-admin .tabs, .area-admin p.row { margin: 0 0 22px; gap: 12px; }
.area-admin .row > input, .area-admin .row > select, .area-admin .row > textarea, .area-admin .range-form > input, .area-admin .range-form > select { margin-top: 0; }
.area-admin form.row.form > input[name=q] { flex: 1 1 260px; }
.area-admin .row > .btn, .area-admin .row > button { line-height: 1.2; }
.area-admin .content > form[method=get].row + p.muted { margin-top: 0; }
.area-admin .content > .card[style*="margin-top"], .area-admin .content > form > .card[style*="margin-top"] { margin-top: 22px !important; }
.area-admin .content > .table-wrap + .row, .area-admin .content > form > .table-wrap + .row, .area-admin .table-wrap + .row[style*="margin-top"] { margin-top: 18px !important; }
