/* The owner's dashboard (/account): calm and roomy, like a site builder's home. Same brand as the public site. */
:root {
  --ink: #16202b; --text: #2b3642; --muted: #6b7684; --line: #e7e2d8; --bg: #faf8f4; --card: #fff;
  --brand: #1f4e79; --brand-2: #2b6cb0; --brand-soft: #eaf1f9; --ok: #15803d; --ok-soft: #e7f6ec; --danger: #b42318;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
h1, h2 { color: var(--ink); margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
h2 { font-size: 1.02rem; }
a { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--danger); }

/* app shell: a sidebar like any site builder's, a top bar on phones */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.4rem; padding: 1.2rem .9rem;
  background: #fff; border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); text-decoration: none; padding: 0 .4rem; }
.logo .mark { flex: none; width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.nav nav { display: grid; gap: .15rem; }
.nav nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav nav a:hover { background: var(--bg); color: var(--ink); }
.nav nav a[aria-current] { background: var(--brand-soft); color: var(--brand); }
.nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-foot { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .4rem; min-width: 0; }
.nav-foot .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-legal { display: flex; gap: .8rem; margin: 0; padding: 0 .4rem; font-size: .78rem; }
.nav-legal a { color: var(--muted); text-decoration: none; }
.nav-legal a:hover { color: var(--ink); text-decoration: underline; }
.main { width: min(1180px, 100% - 3rem); margin: 0 auto; padding: clamp(1.4rem, 4vw, 2.4rem) 0 4rem; }

/* buttons, chips, tabs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600;
  padding: .55rem 1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: #193f62; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #cfd4db; background: #fbfbfc; }
.btn.sm { padding: .35rem .7rem; font-size: .87rem; border-radius: 8px; }
.btn.big { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.chip { display: inline-block; font-size: .74rem; font-weight: 650; padding: .12rem .5rem; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand); vertical-align: middle; text-transform: capitalize; }
.chip.soft { background: var(--bg); color: var(--muted); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border-radius: 10px; }
.seg button { border: 0; background: none; border-radius: 7px; padding: .3rem .7rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 1.4rem 0 1.2rem; overflow-x: auto; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: .6rem .9rem; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--brand); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.card > h2 { margin-bottom: .7rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }

/* list page */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head p { margin: .3rem 0 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1.4rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.6rem; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .88rem; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.site-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.site-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 12px 28px rgba(16,24,40,.08); }
.site-thumb { display: block; border-bottom: 1px solid var(--line); }
.site-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.site-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.site-title a { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-domain, .site-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.site-last { margin: .35rem 0 0; font-size: .86rem; color: var(--text); background: var(--bg); border-radius: 8px; padding: .35rem .55rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: .8rem; }

/* live thumbnails: a real-width page, scaled down */
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(110deg, #eef0f3 30%, #f7f8fa 50%, #eef0f3 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s infinite linear; }
.thumb.ready { animation: none; background: #fff; }
.thumb iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.thumb.ready iframe { opacity: 1; }
.thumb.empty { display: grid; place-items: center; color: var(--muted); font-size: .9rem; animation: none; background: var(--bg); }
@keyframes shimmer { to { background-position: -300% 0; } }

/* one site */
.crumb { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.crumb:hover { color: var(--ink); }
.site-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.site-head-row p { margin: .35rem 0 0; }
.overview { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.1rem; align-items: start; }
.side { display: grid; gap: 1.1rem; }
.preview-stage { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); display: flex; justify-content: center; }
.preview-stage .thumb { width: 100%; aspect-ratio: 16 / 10.5; }
.preview-stage .thumb.phone { width: 300px; aspect-ratio: 390 / 760; border-inline: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.fact:first-of-type { border-top: 0; }
.fact span { color: var(--muted); }
.fact b { color: var(--ink); font-weight: 600; }
.activity { padding: .5rem 0; border-top: 1px solid var(--line); }
.activity:first-of-type { border-top: 0; }
.activity p { margin: .25rem 0 .1rem; font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card > .btn { margin-top: .6rem; }
.card.live { background: linear-gradient(160deg, #f8fafc, #eef4fb); }
.card.live p { margin: .3rem 0; }

/* history */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: .7rem; padding: .9rem 0; border-top: 1px solid var(--line); align-items: start; }
.timeline li:first-child { border-top: 0; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; background: #cfd5dd; margin: .3rem 0 0 4px; }
.timeline li.current .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.tl-title { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tl-body p { margin: .2rem 0; overflow-wrap: anywhere; }

/* sharing */
.links { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .7rem; }
.links li { display: flex; gap: 1rem; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; flex-wrap: wrap; }
.link-main { flex: 1; min-width: 240px; }
.link-title { display: flex; gap: .6rem; align-items: baseline; }
.link-main input { width: 100%; margin: .35rem 0 .15rem; font: inherit; font-size: .9rem; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.link-main p { margin: 0; }
.empty-line { color: var(--muted); text-align: center; padding: 1.5rem; border: 1px dashed var(--line); border-radius: 12px; margin: .8rem 0 0; }

/* empty and signed-out states */
.empty { max-width: 560px; margin: clamp(2rem, 8vw, 5rem) auto; text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.empty h1, .empty h2 { margin-bottom: .5rem; }
.empty p { margin: 0 0 1.2rem; }
.start { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.start input { flex: 1 1 220px; font: inherit; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 10px; }
.skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.skeleton div { height: 300px; border-radius: var(--radius); background: linear-gradient(110deg, #eceef1 30%, #f6f7f9 50%, #eceef1 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s infinite linear; }

.toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem;
  border-radius: 10px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 20; }

@media (max-width: 900px) {
  .overview { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .stat { padding: .7rem .8rem; }
  .stat b { font-size: 1.25rem; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: .6rem; padding: .55rem .8rem;
    border-right: 0; border-bottom: 1px solid var(--line); }
  .logo span:last-child { display: none; }
  .nav nav { display: flex; flex: 1; }
  .nav nav a { padding: .45rem .55rem; font-size: .9rem; }
  .nav nav a svg { display: none; }
  .nav-foot { margin: 0; padding: 0; }
  .nav-foot .small, .nav-legal { display: none; }
  .main { width: calc(100% - 2rem); }
}
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 22px 1fr; }
  .timeline li .actions { grid-column: 2; }
  .site-head-row .actions { width: 100%; }
  .site-head-row .actions .btn { flex: 1; }
}

/* status: Draft, Live, Live with unpublished changes */
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 650; padding: .18rem .6rem; border-radius: 999px;
  background: var(--bg); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.status.live { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: #fff4e0; color: #9a5b00; }
.status.bad { background: #fde8e7; color: var(--danger); }
.title-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.site-foot .btn { flex: 1; }

/* make it live */
.golive h2 { margin-bottom: .6rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .num { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd5dd; display: grid; place-items: center; font-size: .75rem; font-weight: 700; margin-top: 1px; }
.checklist li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.now .num { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.checklist li.done b { color: var(--muted); }
.checklist p { margin: .1rem 0 .45rem; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; padding: .7rem .8rem;
  border-radius: 10px; background: #fff4e0; color: #7a4800; font-size: .9rem; font-weight: 600; }

/* domain */
.domain { display: grid; gap: 1.1rem; max-width: 900px; }
.connect { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.connect input { flex: 1 1 240px; font: inherit; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 10px; }
.hosts { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .4rem; }
.hosts li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
/* the cutover: three short steps, then the records, each on its own row */
.cutover { margin: .4rem 0 1rem; padding-left: 1.2rem; display: grid; gap: .8rem; }
.cutover li::marker { font-weight: 700; color: var(--brand); }
.records { display: grid; gap: .6rem; margin-top: .6rem; }
.rec { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; background: #fcfcfd; }
.rec-main { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.rec-type { font-weight: 700; color: var(--ink); min-width: 92px; padding-bottom: .15rem; }
.rec-field { display: grid; gap: .15rem; }
.rec-field.grow { flex: 1; min-width: 220px; }
.rec-field small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.rec code { background: var(--bg); padding: .2rem .45rem; border-radius: 6px; font-size: .9rem; overflow-wrap: anywhere; }
.rec p { margin: .45rem 0 0; }
.foot-links { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
button.link { border: 0; background: none; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--brand-2); cursor: pointer; }
button.link:hover { text-decoration: underline; }
.btn.xs { padding: .15rem .5rem; font-size: .78rem; border-radius: 6px; margin-left: .35rem; }
.help-form { display: grid; gap: .5rem; max-width: 520px; margin-top: .6rem; }
.help-form input, .help-form textarea { font: inherit; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; }
.help-form .btn { justify-self: start; }
.ok-text { color: var(--ok); font-weight: 600; }
.locked { background: linear-gradient(160deg, #f8fafc, #eef4fb); }
.locked p { margin: .4rem 0 1rem; }
.skeleton.one { grid-template-columns: 1fr; }
.skeleton.one div { height: 220px; }

/* billing */
.plan-on { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem;
  background: linear-gradient(160deg, #f3fbf6, #e7f6ec); border-color: #cfe9d8; }
.plan-on p { margin: .2rem 0 0; }
.pricing { min-height: 200px; }
button.link.danger { color: var(--danger); margin-left: auto; }
.card.verified { background: linear-gradient(160deg, #f3fbf6, #fff); border-color: #cfe9d8; }
.card.verified .btn { margin-top: .4rem; }
.tip { background: var(--bg); border-radius: 8px; padding: .5rem .7rem; }
.golive .edit-link { display: inline-block; margin-top: .4rem; font-weight: 600; }
