/* App Pages dashboard. Light only: white console, cobalt for actions, coral for what needs attention. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f6fa;
  --ink: #14161c;
  --muted: #5e6472;
  --line: #e3e6ee;
  --cobalt: #2348f0;
  --cobalt-deep: #1733c2;
  --cobalt-wash: #ecf0ff;
  --coral: #ff5c3d;
  --coral-ink: #b8361c;
  --coral-wash: #ffede8;
  --amber: #8f5e00;
  --amber-wash: #fff4d6;
  --red: #c93030;
  --red-wash: #fdebeb;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
a { color: var(--cobalt-deep); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--display); letter-spacing: -0.02em; }
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; line-height: 1.1; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
img { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.break { word-break: break-all; }
.eyebrow { font: 600 11.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--cobalt); }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 20px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 800 18px/1 var(--display); letter-spacing: -0.03em; }
.appchip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; max-width: 220px; }
.appchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
.tabs a { white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--panel); }
.tabs i { font-style: normal; font: 600 11px var(--mono); background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .who span { display: none; } }

/* layout */
.wrap { max-width: 1280px; margin-inline: auto; padding: 24px 20px 80px; }
.wrap.narrow { max-width: 720px; }
.head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.head p { margin-top: 6px; }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.two { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .two, .two.even { grid-template-columns: minmax(0, 1fr); } }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* panels and cards */
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 14px 16px; display: grid; gap: 14px; }
.panel-body.tight { gap: 4px; }
details.panel > summary { cursor: pointer; list-style: none; border-bottom: 0; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary { border-bottom: 1px solid var(--line); }
.danger h2 { color: var(--red); }
.card { border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 16px; }
.card.center { text-align: center; justify-items: center; max-width: 520px; margin: 8vh auto 0; }
.card.center.wide { max-width: 680px; }
.card .stack { width: 100%; text-align: left; }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.notice.info { background: var(--cobalt-wash); }
.notice.warn { background: var(--amber-wash); color: #5c3c00; margin-bottom: 16px; }
.dev { padding: 10px 14px; border-radius: 10px; background: var(--amber-wash); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 50; animation: toast 3.2s ease forwards; max-width: calc(100% - 32px); }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer; background: var(--bg); color: var(--ink); white-space: nowrap; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; justify-self: start; }
.btn-lg { padding: 13px 20px; font-size: 15.5px; border-radius: 12px; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14.5px; }
textarea.input { resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-wash); }
.input.mono { font-family: var(--mono); font-size: 13.5px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0; margin-bottom: 6px; }
.field > span .muted { text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 500; }
.paste { display: flex; gap: 8px; padding: 6px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--bg); width: 100%; }
.paste .input { border: 0; min-width: 0; flex: 1; }
.paste .input:focus { box-shadow: none; }
@media (max-width: 560px) { .paste { flex-direction: column; } }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; cursor: pointer; }
.check input, .toggle input { accent-color: var(--cobalt); width: 16px; height: 16px; flex: none; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; font-size: 14.5px; cursor: pointer; }
.toggle code { display: block; font-size: 12px; color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { position: relative; cursor: pointer; }
.sw input[type="radio"] { position: absolute; opacity: 0; }
.sw span, .sw input[type="color"] { display: block; width: 36px; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(20, 22, 28, 0.12); }
.sw input[type="color"] { padding: 0; border: 0; background: none; cursor: pointer; }
.sw input[type="radio"]:checked + span, .sw.custom:has(input[type="radio"]:checked) input[type="color"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw input[type="radio"]:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.seg { display: inline-flex; padding: 3px; background: var(--panel); border-radius: 10px; gap: 2px; justify-self: start; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg input:checked + span { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 22, 28, 0.12); }
.seg input:focus-visible + span { outline: 2px solid var(--cobalt); }
.faq-edit { display: grid; gap: 10px; }
.faq-item { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--panel); }
.savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(6px); border: 1px solid var(--line); }

/* chips, copy rows */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--body); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.c-live { background: var(--ink); color: #fff; }
.c-off { background: var(--panel); color: var(--muted); }
.c-new { background: var(--coral-wash); color: var(--coral-ink); }
.copyrow { display: grid; gap: 6px; }
.copyrow-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.copyrow-label .muted { font-weight: 500; font-size: 12px; }
.url { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.copy { border: 0; background: var(--panel); border-radius: 7px; padding: 5px 9px; font: 600 12px var(--body); cursor: pointer; color: var(--muted); flex: none; }
.copy:hover { color: var(--ink); }
.copy.done { color: var(--cobalt-deep); }

/* apps list */
.rows { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--panel); }
.row-name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.row-name b { display: block; }
.row-name .muted { display: block; font-size: 13px; }
.row-url { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-chips { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) { .row { grid-template-columns: minmax(0, 1fr) auto; } .row-url { grid-column: 1 / -1; grid-row: 2; } }
.appicon { width: 40px; height: 40px; border-radius: 22.5%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(20, 22, 28, 0.08); object-fit: cover; }
.appicon.mono { font-size: 0.9em; }

/* preview */
.browser { position: sticky; top: 72px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 1px 2px rgba(20, 22, 28, 0.05), 0 10px 30px rgba(20, 22, 28, 0.08); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.preview-tabs { display: flex; gap: 2px; overflow-x: auto; min-width: 0; flex: 1; }
.preview-tabs a { white-space: nowrap; text-decoration: none; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 7px; color: var(--muted); }
.preview-tabs a[aria-current="page"] { background: var(--bg); color: var(--ink); }
.open { font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.browser iframe { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: #fff; }
@media (max-width: 1000px) { .browser { position: static; } .browser iframe { height: 640px; } }

/* privacy builder */
.dcat { padding: 8px 0 4px; border-top: 1px solid var(--line); }
.dcat:first-child { border-top: 0; }
.dcat h3 { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.dt { padding: 5px 0; }
.dt-more { display: none; gap: 6px; padding: 8px 0 6px 25px; }
.dt:has(> .check input:checked) .dt-more { display: grid; }
.purposes, .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pills .pill span { padding: 6px 12px; font-size: 13px; }
.pill input:checked + span { border-color: var(--cobalt); background: var(--cobalt-wash); color: var(--cobalt-deep); }
.pill input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* universal links */
.code { margin: 0; background: var(--panel); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font: 500 12.5px/1.6 var(--mono); }
.checkrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checkrow:first-child { border-top: 0; }
.checkrow code { font-size: 12px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick, .cross { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.tick { background: var(--cobalt); }
.cross { background: var(--coral); }
.result { padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--panel); }
.result.yes { background: var(--cobalt-wash); }
.result:empty { display: none; }

/* inbox */
.msgs { display: grid; gap: 12px; max-width: 820px; }
.msg { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 8px; justify-items: start; }
.msg.unread { border-color: var(--coral); box-shadow: inset 3px 0 0 var(--coral); }
.msg header { display: flex; justify-content: space-between; gap: 12px; width: 100%; }
.msg time { font: 500 12px var(--mono); color: var(--muted); }
.msg .from { font-size: 13.5px; color: var(--muted); }
.msg .text { white-space: pre-wrap; }
.panel-body > .btn, .panel-body > form > .btn { justify-self: start; }

/* billing + domain */
.who .plan { font-weight: 600; font-size: 13px; text-decoration: none; padding: 5px 10px; border-radius: 999px; background: var(--cobalt-wash); color: var(--cobalt-deep); white-space: nowrap; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 12px; align-content: start; }
.plan-card.current { border: 2px solid var(--cobalt); }
.plan-card h2 { font-size: 20px; }
.plan-card .price { font: 800 40px/1 var(--display); letter-spacing: -0.03em; }
.plan-card .price small { font: 500 14px var(--body); color: var(--muted); letter-spacing: 0; }
.plan-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.plan-card form { display: grid; gap: 10px; }
.dns { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dns th { text-align: left; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dns td { padding: 10px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; word-break: break-all; vertical-align: top; }
.table-wrap { overflow-x: auto; }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.state.live::before { background: var(--cobalt); }
.state.bad::before { background: var(--red); }
.errs { margin: 0; padding-left: 18px; font-size: 13.5px; color: #5c3c00; }
.narrow-col { max-width: 760px; display: grid; gap: 16px; }
.notice.info + .panel, .notice.warn + .panel { margin-top: 16px; }
.c-ok { background: var(--cobalt-wash); color: var(--cobalt-deep); }
.c-warn { background: var(--amber-wash); color: var(--amber); }
.preview-tabs a:focus-visible, .open:focus-visible { outline-offset: -2px; }
