/* =========================================================================
   Account area: sign-in pages and the dashboard.
   Builds on site.css (tokens, .glass, .btn, .chip, .badge, type).
   ========================================================================= */

/* (header account pill and .av live in site.css) */

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 16px; align-content: start; }
.field > label, .field-label { font: 500 13px/1 var(--sans); color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; }
.field > label a { color: var(--ink-3); transition: color .3s; }
.field > label a:hover { color: var(--ink); }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 14px; outline: none;
  font: 400 15.5px/1 var(--sans); color: var(--ink);
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 2px 6px rgba(0, 0, 0, .35);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 2px 6px rgba(0, 0, 0, .35); }
.input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px rgba(169, 156, 242, .16); }
.input:disabled { opacity: .55; }
.input.mono { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; }
.input-wrap .input { padding-right: 52px; }
.reveal-btn {
  position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--ink-3); transition: color .3s, background .3s;
}
.reveal-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.reveal-btn svg { width: 18px; height: 18px; }
.field.invalid .input { box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .8), 0 0 0 4px rgba(255, 90, 110, .12); }
.field-error { font-size: 13px; color: #ffb0ba; min-height: 0; }
.field-error:empty { display: none; }
.hint { font-size: 12.5px; color: var(--ink-3); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 7px; cursor: pointer; flex: none; display: grid; place-items: center;
  background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: background .25s, box-shadow .25s; }
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid #0a0c0d; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .3s var(--spring); }
.check input:checked { background: var(--accent); box-shadow: none; }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); transition: background .35s var(--ease); }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--ha); }
.strength[data-score="2"] i:nth-child(-n+2) { background: #ffb36b; }
.strength[data-score="3"] i:nth-child(-n+3) { background: #c8e86a; }
.strength[data-score="4"] i { background: var(--oiii); }

/* loading state on buttons */
.btn[data-loading] { color: transparent !important; pointer-events: none; }
.btn[data-loading] > * { opacity: 0; }
.btn[data-loading]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(10, 12, 13, .25); border-top-color: #0a0c0d; animation: spin .7s linear infinite;
}
.btn.glass[data-loading]::after, .btn-ghost[data-loading]::after, .btn-danger[data-loading]::after { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-danger { color: #ffd2d8; background: rgba(255, 90, 110, .14); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .45); }
.btn-danger:hover { background: rgba(255, 90, 110, .22); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .7), 0 0 30px -8px rgba(255, 90, 110, .5); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-xs { --h: 32px; padding: 0 13px; font-size: 13px; gap: 7px; }
.btn-icon { --h: 36px; width: 36px; padding: 0; }

/* alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; margin-bottom: 18px;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: var(--ink-2);
  animation: rise .5s var(--ease) both; }
.alert[hidden] { display: none; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert b { color: var(--ink); font-weight: 600; }
.alert.err { background: rgba(255, 90, 110, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .4); color: #ffd2d8; }
.alert.ok { background: rgba(111, 208, 154, .09); box-shadow: inset 0 0 0 1px rgba(111, 208, 154, .35); color: #c9f0da; }
.alert.warn { background: rgba(255, 179, 107, .08); box-shadow: inset 0 0 0 1px rgba(255, 179, 107, .38); color: #ffe1c2; }
.alert .grow { flex: 1; }
.alert .btn { margin-left: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } }

/* ---------- auth pages ---------- */
.auth-main { min-height: 100svh; display: grid; place-items: center; padding: 120px 16px 60px; }
.auth-card { --g-r: var(--r-xl); --g-blur: 28px; --g-dark: .34; width: min(460px, 100%); padding: clamp(26px, 5vw, 40px); animation: rise .8s var(--ease) both; }
.auth-card h1 { font: 600 clamp(30px, 6vw, 38px)/1.1 var(--sans); letter-spacing: -.03em; margin: 0 0 10px;
  background: linear-gradient(180deg, #fff 35%, rgba(255, 255, 255, .62)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em; }
.auth-card h1 .soft { -webkit-text-fill-color: rgba(242, 245, 244, .42); }
.auth-card .sub { color: var(--ink-2); font-size: 15px; margin-bottom: 26px; }
.auth-card .row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 22px; flex-wrap: wrap; }
.auth-foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hair); text-align: center; font-size: 14px; color: var(--ink-3); }
.auth-foot a { color: var(--ink); font-weight: 500; }
.auth-done { text-align: center; }
.auth-done .orb { width: 74px; height: 74px; margin: 4px auto 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(111, 208, 154, .14);
  color: var(--oiii); box-shadow: inset 0 0 0 1px rgba(111, 208, 154, .4); animation: pop .7s var(--spring) both; }
.auth-done .orb.bad { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), rgba(255, 90, 110, .18) 60%, transparent 72%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 50px -6px rgba(255, 90, 110, .5); }
.auth-done .orb svg { width: 28px; height: 28px; }
.auth-done .sub { margin-bottom: 22px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.auth-steps { display: none; }
.auth-steps.on { display: block; animation: rise .6s var(--ease) both; }
.dev-note { margin-top: 18px; font: 500 12px/1.5 var(--mono); color: var(--ink-3); text-align: center; }
.dev-note a { color: var(--oiii); }

/* ---------- dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; max-width: 1360px; margin: 0 auto; padding: 18px 28px 80px; min-height: 100svh; }
.side {
  --g-r: var(--r-xl); --g-blur: 26px; --g-dark: .30;
  position: sticky; top: 18px; height: calc(100svh - 36px); display: flex; flex-direction: column; padding: 14px;
}
.side .brand { --g-blur: 0px; height: 48px; padding: 0 10px 0 4px; background: none; box-shadow: none; }
.side .brand::before, .side .brand::after { display: none; }
.side-nav { display: grid; gap: 3px; margin-top: 18px; }
.side-label { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 14px 12px 8px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px;
  font: 500 14.5px/1 var(--sans); color: var(--ink-2); transition: color .3s, background .3s;
}
.side-nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; transition: opacity .3s, transform .45s var(--spring); }
.side-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.side-nav a:hover svg { transform: scale(1.08); }
.side-nav a[aria-current=page] { color: var(--ink); background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.side-nav a[aria-current=page] svg { opacity: 1; color: var(--accent-ink); }
.side-nav a .count { margin-left: auto; font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); min-width: 0; }
.me .who { min-width: 0; }
.me .who b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .btn { justify-content: flex-start; padding: 0 12px; color: var(--ink-2); }
.side-foot .btn svg { width: 16px; height: 16px; }

.main { min-width: 0; padding-top: 10px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 18px 0 30px; flex-wrap: wrap; }
.topbar h1 { font: 600 clamp(28px, 3.6vw, 40px)/1.08 var(--sans); letter-spacing: -.035em; margin: 0;
  background: linear-gradient(180deg, #fff 35%, rgba(255, 255, 255, .6)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em; }
.topbar h1 .soft { -webkit-text-fill-color: rgba(242, 245, 244, .4); }
.topbar .kicker { margin-bottom: 14px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.view { display: none; }
.view.on { display: block; animation: view-in .55s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); filter: blur(8px); } }
.view > * + *, .view [data-body] > * + * { margin-top: 20px; }

/* ---------- cards & content ---------- */
.card { --g-r: var(--r-xl); --g-blur: 22px; --g-dark: .26; padding: clamp(20px, 2.4vw, 28px); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2, .card h2 { font: 600 19px/1.2 var(--sans); letter-spacing: -.02em; margin: 0; }
.card-head p { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.card h3 { font: 600 15px/1.3 var(--sans); margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-hero { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.metric { padding: 20px 22px; }
.metric .lbl { font: 500 11px/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.metric .lbl svg { width: 14px; height: 14px; color: var(--ink-2); }
.metric .val { font: 600 30px/1 var(--sans); letter-spacing: -.03em; margin-top: 16px; font-variant-numeric: tabular-nums; }
.metric .val small { font: 500 14px/1 var(--sans); font-style: normal; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.metric .note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.plan-hero { position: relative; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; }
.plan-hero .bg { position: absolute; inset: 0; z-index: -2; border-radius: inherit; background-size: cover; background-position: center; opacity: .5; }
.plan-hero .bg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(100deg, rgba(27, 27, 30, .94) 24%, rgba(27, 27, 30, .7) 62%, rgba(27, 27, 30, .35)); }
.plan-hero .plan-name { font: 600 clamp(28px, 3.4vw, 40px)/1.05 var(--sans); letter-spacing: -.035em; margin: 14px 0 10px; }
.plan-hero .plan-meta { color: var(--ink-2); font-size: 14.5px; max-width: 30em; }
.plan-hero .actions { margin-top: auto; padding-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }

.quick { display: grid; gap: 8px; }
.quick a, .quick button { display: flex; align-items: center; gap: 14px; padding: 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; width: 100%;
  font: inherit; color: var(--ink); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: background .3s, transform .45s var(--spring), box-shadow .3s; }
.quick a:hover, .quick button:hover { background: rgba(255, 255, 255, .08); transform: translateX(3px); }
.quick .icon-tile { width: 40px; height: 40px; }
.quick b { display: block; font-weight: 600; font-size: 14.5px; }
.quick span { display: block; font-size: 13px; color: var(--ink-3); }
.quick .chev { margin-left: auto; width: 16px; height: 16px; color: var(--ink-3); }

/* status badges */
.badge.muted { color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); }
.badge.warn { color: #ffd6ad; box-shadow: inset 0 0 0 1px rgba(255, 179, 107, .45); background: rgba(255, 179, 107, .1); }
.badge.violet { color: #cfc8ff; box-shadow: inset 0 0 0 1px rgba(141, 125, 255, .45); background: rgba(141, 125, 255, .12); }
.badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* rows (definition lists, histories) */
.rows { display: grid; }
.rows > .r { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 14.5px; min-width: 0; }
.rows > .r:last-child { border-bottom: 0; }
.rows > .r > span:first-child { color: var(--ink-3); flex: none; }
.rows > .r > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rows .r .stack { display: grid; gap: 3px; text-align: left; }
.rows .r .stack small { color: var(--ink-3); font-size: 12.5px; }

/* product */
.product { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.product .art { position: relative; min-height: 240px; }
.product .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-xl) 0 0 var(--r-xl); }
.product .art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, transparent 50%, rgba(27, 27, 30, .7)); }
.product .body { padding: clamp(20px, 2.6vw, 30px); min-width: 0; }
.product .body h2 { font: 600 28px/1.1 var(--sans); letter-spacing: -.03em; margin: 0 0 6px; }
.product .kind { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } .product .art { min-height: 170px; } .product .art img { border-radius: var(--r-xl) var(--r-xl) 0 0; } }

.dl-list { display: grid; gap: 10px; margin-top: 18px; }
.dl { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); min-width: 0; flex-wrap: wrap; }
.dl .icon-tile { width: 40px; height: 40px; }
.dl .txt { flex: 1; min-width: 180px; }
.dl .txt b { display: block; font-size: 14.5px; }
.dl .txt span { display: block; font-size: 13px; color: var(--ink-3); }
.dl.locked { opacity: .55; }
.dl .copyline { display: flex; gap: 8px; width: 100%; }
.dl .copyline code { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.2; padding: 9px 12px; border-radius: 12px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }

/* license */
.license .top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.license .title-line { display: flex; align-items: center; gap: 14px; min-width: 0; }
.license .title-line h3 { font: 600 19px/1.2 var(--sans); letter-spacing: -.02em; margin: 0; }
.license .title-line small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.keybox { display: flex; align-items: center; gap: 8px; margin: 20px 0 6px; padding: 8px 8px 8px 16px; border-radius: 16px; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .15)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.keybox .key { flex: 1; min-width: 0; font: 500 15px/1.4 var(--mono); letter-spacing: .06em; overflow-wrap: anywhere; color: var(--ink); }
.keybox .key.masked { color: var(--ink-2); }
.keybox .btns { display: flex; gap: 6px; }
.lic-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.lic-facts div span { display: block; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.lic-facts div b { font-weight: 500; font-size: 14.5px; }
@media (max-width: 760px) { .lic-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.usage { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.usage i { display: block; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: none; transition: width .8s var(--ease); }
.usage.full i { background: linear-gradient(90deg, #ffb36b, var(--ha)); box-shadow: 0 0 12px rgba(255, 90, 110, .5); }
.devices { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--hair); }
.device { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.device:last-child { border-bottom: 0; }
.device .dev-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.device .dev-ico svg { width: 18px; height: 18px; color: var(--ink-2); }
.device .txt { flex: 1; min-width: 0; }
.device .txt b { display: block; font-size: 14.5px; font-weight: 500; }
.device .txt span { display: block; font-size: 12.5px; color: var(--ink-3); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .35s, transform .45s var(--spring); }
.plan:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.plan.current { box-shadow: inset 0 0 0 1px rgba(169, 156, 242, .6); background: rgba(169, 156, 242, .07); }
.plan .pn { font: 600 15px/1.2 var(--sans); }
.plan .pp { font: 600 28px/1 var(--sans); letter-spacing: -.03em; margin: 10px 0 2px; }
.plan .pp small { font: 500 13px/1 var(--sans); font-style: normal; color: var(--ink-3); }
.plan .pd { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.plan .btn { margin-top: auto; }

/* empty + skeleton */
.empty { text-align: center; padding: clamp(34px, 6vw, 56px) 20px; }
.empty .orb { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), rgba(255, 255, 255, .03) 65%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.empty .orb svg { width: 24px; height: 24px; color: var(--ink-2); }
.empty h3 { font: 600 20px/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 8px; }
.empty p { color: var(--ink-3); font-size: 14.5px; max-width: 30em; margin: 0 auto 20px; }

.sk { position: relative; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 14px; margin: 10px 0; }
.sk-title { height: 34px; width: 55%; margin-bottom: 16px; }
.sk-block { height: 120px; border-radius: 18px; }

/* modal */
.modal { --g-r: var(--r-xl); --g-blur: 30px; --g-dark: .5; width: min(480px, calc(100% - 32px)); padding: 28px; border: 0; color: var(--ink); margin: auto; }
.modal::backdrop { background: rgba(2, 3, 4, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal[open] { animation: modal-in .45s var(--spring) both; }
.modal[open]::backdrop { animation: fade .3s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }
.modal h2 { font: 600 22px/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 10px; }
.modal p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { --g-r: 999px; --g-blur: 24px; --g-dark: .55; display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 14px; animation: toast-in .5s var(--spring) both; }
.toast.out { animation: toast-out .35s var(--ease) both; }
.toast .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--oiii); box-shadow: 0 0 10px var(--oiii); flex: none; }
.toast.err .pulse { background: var(--ha); box-shadow: 0 0 10px var(--ha); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

.danger-zone { box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .22), 0 30px 70px -30px rgba(0, 0, 0, .8); }
.session-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.session-ico svg { width: 18px; height: 18px; color: var(--ink-2); }
.form-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.form-inline .field { margin: 0; }
@media (max-width: 560px) { .form-inline { grid-template-columns: 1fr; } }

/* ---------- mobile: sidebar becomes a floating tab bar ---------- */
.mobile-top { display: none; }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; padding: 12px 16px 120px; gap: 0; }
  .side { position: fixed; top: auto; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 70; height: auto; padding: 6px; --g-r: 26px; --g-dark: .5; --g-blur: 30px; }
  .side .brand, .side-label, .side-foot { display: none; }
  .side-nav { margin: 0; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .side-nav a { flex-direction: column; gap: 6px; padding: 9px 4px; font-size: 11px; text-align: center; border-radius: 18px; }
  .side-nav a .count { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-top .brand { --g-r: 999px; height: 44px; }
  .mobile-top .brand b { display: none; }
  .mobile-top .acts { display: flex; gap: 8px; }
  .mobile-top .btn { --h: 44px; }
  .topbar { margin: 26px 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .view.on, .auth-card, .alert, .toast, .modal[open], .auth-steps.on { animation: none; }
}

/* =========================================================================
   Analytics theme for the account area (see the matching block in site.css)
   ========================================================================= */
.auth-card { --g-r: 20px; }
.input { background: #101012; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.input:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }
.reveal-btn { border-radius: 9px; }
.field > label, .field-label { color: var(--ink-2); font-weight: 500; }
.alert { border-radius: 12px; }
.alert.warn { background: rgba(232, 169, 92, .09); box-shadow: inset 0 0 0 1px rgba(232, 169, 92, .34); color: #f3dcb9; }
.badge.warn { color: #f0c07f; background: rgba(232, 169, 92, .12); box-shadow: inset 0 0 0 1px rgba(232, 169, 92, .32); }
.badge.violet { color: var(--accent-ink); background: var(--accent-bg); box-shadow: inset 0 0 0 1px rgba(169, 156, 242, .34); }
.badge.muted { color: var(--ink-2); }
.side-label, .metric .lbl, .lic-facts div span { font-family: var(--sans); letter-spacing: 0; text-transform: none; }
.side-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.metric .lbl { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.lic-facts div span { font-size: 12.5px; font-weight: 500; }
.product .kind { font-family: var(--sans); letter-spacing: .02em; text-transform: none; font-size: 12.5px; }

.side-nav a[aria-current=page] { color: var(--accent-ink); background: var(--accent-bg); box-shadow: none; }
.me { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.quick a, .quick button { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.quick a:hover, .quick button:hover { background: var(--card-3); transform: translateX(2px); }
/* tinted icon tiles, like the status findings in the reference */
.quick a:nth-child(2) .icon-tile { color: #f0c07f; background: rgba(232, 169, 92, .14); }
.quick a:nth-child(3) .icon-tile { color: #86dcab; background: rgba(111, 208, 154, .13); }
.quick a:nth-child(4) .icon-tile { color: #f59a94; background: rgba(239, 106, 98, .13); }
.plan-hero .bg { opacity: .32; }
.metric .val small { font-weight: 500; }
.dl, .device .dev-ico, .session-ico { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.dl { border-radius: 14px; }
.keybox { background: #101012; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.plan { background: var(--card-2); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.plan:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-2); }
.empty .orb { background: var(--accent-bg); box-shadow: none; }
.empty .orb svg { color: var(--accent-ink); }
.modal { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px -20px rgba(0, 0, 0, .8); --g-r: 20px; }
.toast { background: var(--card-3); box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 40px -12px rgba(0, 0, 0, .7); }
.danger-zone { box-shadow: inset 0 0 0 1px rgba(239, 106, 98, .28); }
.side .brand { background: none; box-shadow: none; }
.view.on { animation-name: view-in; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* phone: the sidebar becomes a full-width bottom tab bar */
@media (max-width: 900px) {
  .side { left: 0; right: 0; bottom: 0; --g-r: 0; border-radius: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom));
    background: rgba(27, 27, 30, .94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 var(--line-2); }
  .side-nav a { border-radius: 12px; color: var(--ink-3); }
  .side-nav a[aria-current=page] { background: none; color: var(--accent-ink); }
  .dash { padding-bottom: 100px; }
}
.btn-text { background: none; box-shadow: none; }
.btn-text:hover { background: rgba(255, 255, 255, .05); }
