/* LiveSign: shared styles for account and policy pages. Same tokens as the homepage. */
:root {
  --ls-charcoal: #16171C;
  --ls-blue: #1A99D5;
  --ls-pink: #FD2B8C;
  --ls-yellow: #FED23B;
  --ls-white: #F3F4F9;
  --pink-btn: #D4006F;
  --blue-light: #5CC3F2;
  --brand-grad: linear-gradient(90deg, #009EFD 0%, #7B3FE4 55%, #FD2B8C 100%);
  --bg: var(--ls-charcoal);
  --panel: #24262C;
  --panel-2: #31343B;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.18);
  --text: var(--ls-white);
  --muted: rgba(243,244,249,.74);
  --faint: #9FA1A8;
  --danger: #FF7AB8;        /* error text on dark: 7.6:1 */
  --ok: #7FE0A3;            /* success text on dark: 11:1 */
  --font: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --r: 10px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: radial-gradient(700px 420px at 90% -10%, rgba(253,43,140,.10), transparent 70%), radial-gradient(600px 400px at -10% 110%, rgba(0,158,253,.08), transparent 70%), var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); display: flex; flex-direction: column; }
a { color: var(--blue-light); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--ls-yellow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
.lsw { text-transform: none; letter-spacing: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--pink-btn); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1100px, 100% - 32px); margin: 0 auto; padding: 20px 0; }
.top img { height: 44px; width: auto; display: block; }
.top nav { display: flex; gap: 6px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.top nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.top nav a.btn { color: #fff; padding: 0 16px; }
.top nav a.btn-pink:hover { background: var(--pink-btn); }
.h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: var(--r); border: 0; cursor: pointer; font: 800 .95rem/1 var(--font); text-transform: uppercase; letter-spacing: .01em; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn-pink { background: var(--pink-btn); color: #fff; }
.btn-pink:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 28px -10px rgba(212,0,111,.8); }
.btn-ghost { background: rgba(255,255,255,.05); color: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.09); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Auth card */
main { flex: 1; width: min(1100px, 100% - 32px); margin: 0 auto; padding: 16px 0 56px; }
.auth { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: start; padding-top: 24px; }
.auth-side h1 { margin-bottom: 14px; }
.auth-side .lede { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.auth-side li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--brand-grad); -webkit-mask: radial-gradient(circle, #000 0 4px, transparent 5px); mask: radial-gradient(circle, #000 0 4px, transparent 5px); }
.auth-side li b { color: var(--text); }
.bar { display: block; width: 72px; height: 4px; border-radius: 2px; background: var(--brand-grad); margin: 0 0 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 32px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.65); }
.card h2 { margin-bottom: 6px; }
.card > p.sub { color: var(--muted); margin-bottom: 20px; font-size: .95rem; }
.auth-single { max-width: 460px; margin: 24px auto 0; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 700; font-size: .9rem; }
.field .opt { color: var(--faint); font-weight: 500; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel] {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: #1B1C21; color: #fff; font: 500 1rem var(--font);
}
.field input::placeholder { color: #7D7F86; }
.field input:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(92,195,242,.25); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .hint { color: var(--faint); font-size: .82rem; }
.field .err { color: var(--danger); font-size: .85rem; font-weight: 600; }
.field .err:empty { display: none; }
.pw { position: relative; }
.pw input { padding-right: 70px !important; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--blue-light); font: 700 .8rem var(--font); padding: 8px 10px; cursor: pointer; border-radius: 6px; min-height: 36px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plans label { position: relative; display: grid; gap: 2px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line-strong); cursor: pointer; text-align: center; font-weight: 700; font-size: .9rem; }
.plans label small { color: var(--faint); font-weight: 600; font-size: .78rem; }
.plans input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plans label:has(input:checked) { border-color: var(--ls-pink); background: rgba(253,43,140,.10); }
.plans label:has(input:focus-visible) { outline: 3px solid var(--ls-yellow); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 4px 0 18px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--pink-btn); flex: none; }
.form-msg { border-radius: var(--r); padding: 12px 14px; font-size: .92rem; font-weight: 600; margin-bottom: 16px; }
.form-msg:empty { display: none; }
.form-msg.error { background: rgba(255,122,184,.10); border: 1px solid rgba(255,122,184,.45); color: var(--danger); }
.form-msg.ok { background: rgba(127,224,163,.10); border: 1px solid rgba(127,224,163,.45); color: var(--ok); }
.alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.notice { background: rgba(254,210,59,.08); border: 1px solid rgba(254,210,59,.4); color: var(--text); border-radius: var(--r); padding: 14px 16px; font-size: .92rem; margin-bottom: 18px; }
.notice b { color: var(--ls-yellow); }
.notice[hidden] { display: none; }

/* Account */
.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 16px 0 28px; }
.acct-head p { color: var(--muted); margin-top: 6px; }
.acct-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.acct-grid .card { box-shadow: none; }
.k { font: 700 .72rem var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; display: block; }
.plan-name { font-size: 2rem; font-weight: 900; letter-spacing: -.03em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 700 .75rem var(--font); text-transform: uppercase; letter-spacing: .06em; vertical-align: middle; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--blue-light); background: rgba(92,195,242,.12); }
.pill.off { color: var(--ls-yellow); background: rgba(254,210,59,.12); }
.pill.wait { color: #C7B8FF; background: rgba(123,63,228,.18); }
.meter { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; background: var(--brand-grad); border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.screens { list-style: none; padding: 0; margin: 0; }
.screens li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.screens li:last-child { border-bottom: 0; }
.screens small { display: block; color: var(--faint); }
.empty { color: var(--muted); padding: 10px 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-weight: 800; }
.steps li.done::before { content: "✓"; background: rgba(127,224,163,.15); color: var(--ok); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: .9rem; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* Legal pages */
.legal { max-width: 760px; margin: 24px auto 0; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--faint); margin-bottom: 28px; }
.legal h2 { margin: 34px 0 10px; font-size: 1.25rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 10px 0 0; display: grid; gap: 6px; }
.legal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-top: 18px; }

/* Footer */
.foot { width: min(1100px, 100% - 32px); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: .88rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: #fff; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; gap: 28px; }
  .auth-side ul { display: none; }
  .acct-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .top nav a:not(.btn) { display: none; }
  .plans { grid-template-columns: 1fr; }
  .plans label { text-align: left; grid-template-columns: 1fr auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Dashboard */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 24px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font: 700 .95rem var(--font); padding: 12px 16px; min-height: 48px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--ls-pink); }
.tabs button:hover { color: #fff; }
.tabs .count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .75rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.dash-grid .card { box-shadow: none; }
.field select, .field textarea, .field input[type=number] { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: #1B1C21; color: #fff; font: 500 .95rem var(--font); }
.field textarea { min-height: 72px; resize: vertical; line-height: 1.4; }
.field select:focus, .field textarea:focus, .field input[type=number]:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(92,195,242,.25); }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800 !important; }
.howto { background: #1B1C21; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.howto b { color: var(--text); }
.howto code { color: var(--ls-yellow); font: 700 .9rem ui-monospace, Menlo, monospace; word-break: break-all; }
.scr { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--panel); margin-bottom: 12px; }
.scr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.scr-head small { display: block; color: var(--faint); font-size: .85rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two .field { margin-bottom: 12px; }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,122,184,.45); }
.btn-danger:hover { color: #fff; background: rgba(255,122,184,.14); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.thumb { aspect-ratio: 16/9; background: #0E0F12; display: grid; place-items: center; position: relative; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .tag { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.72); color: #fff; font: 700 .7rem var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.tile-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.tile-body b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--faint); }
.tile-row input { width: 70px; min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: #1B1C21; color: #fff; font: 600 .85rem var(--font); }
.icon-btn { background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); color: #fff; border-radius: 8px; min-width: 40px; min-height: 40px; cursor: pointer; font: 700 .85rem var(--font); padding: 0 10px; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.icon-btn.del { color: var(--danger); }
.drop { display: grid; place-items: center; text-align: center; gap: 6px; border: 2px dashed var(--line-strong); border-radius: 16px; padding: 28px 16px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over, .drop:hover { border-color: var(--blue-light); background: rgba(92,195,242,.06); }
.drop b { color: var(--text); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--ls-yellow); outline-offset: 3px; }
.progress { font-size: .88rem; color: var(--muted); margin-top: 12px; }
.pl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pl-list button { width: 100%; text-align: left; background: transparent; border: 1px solid var(--line); color: var(--text); padding: 12px 14px; border-radius: 12px; cursor: pointer; font: 600 .95rem var(--font); display: flex; justify-content: space-between; gap: 8px; }
.pl-list button small { color: var(--faint); font-weight: 500; }
.pl-list button[aria-current="true"] { border-color: var(--ls-pink); background: rgba(253,43,140,.08); }
.items { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.items li { display: grid; grid-template-columns: 28px 64px 1fr auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #1F2126; }
.items .num { color: var(--faint); font-weight: 800; text-align: center; }
.items .mini { width: 64px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #0E0F12; }
.items .mini img, .items .mini video { width: 100%; height: 100%; object-fit: cover; display: block; }
.items .nm { min-width: 0; }
.items .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.items .nm small { color: var(--faint); font-size: .8rem; }
.items .ctl { display: flex; gap: 6px; align-items: center; }
.items .ctl input { width: 64px; min-height: 40px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: #1B1C21; color: #fff; font: 600 .85rem var(--font); }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { flex: 1; min-width: 180px; margin-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: #16171C; font-weight: 700; padding: 12px 18px; border-radius: 12px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); z-index: 50; max-width: calc(100% - 32px); }
.toast:empty { display: none; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .items li { grid-template-columns: 22px 1fr; } .items .mini { display: none; } .items .ctl { grid-column: 1 / -1; justify-content: flex-end; } }
