/*
 * Ataria Super Admin: the panel's only stylesheet.
 *
 * Apple-style: system font, light grey canvas, white rounded cards, one blue
 * accent and generous spacing. Every size and colour comes from the tokens
 * below; components never use raw values that aren't in this block.
 * Light mode only for now (dark mode later: redefine the tokens).
 */

/* =====================================================================
 * Tokens
 * =================================================================== */
:root {
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #86868b;
    --line: #d2d2d7;
    --line-soft: #e8e8ed;
    --hover: #fafafc;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ring: rgba(0, 113, 227, 0.18);
    --link: #0066cc;
    --ok: #34c759;
    --warn: #ff9f0a;
    --bad: #ff3b30;
    --idle: #aeaeb2;
    --warn-text: #b25000;
    --bad-text: #d70015;
    --warn-bg: #fff8ec;
    --bad-bg: #fff2f1;

    --radius: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --width: 1024px;
    --gutter: 22px;
    --nav-h: 44px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* =====================================================================
 * Base
 * =================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--mono); font-size: 0.88em; letter-spacing: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.text-bad { color: var(--bad-text); }
.text-warn { color: var(--warn-text); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* =====================================================================
 * Global nav
 * =================================================================== */
.gnav {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--nav-h);
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    view-transition-name: gnav;
}

.gnav-inner {
    max-width: var(--width);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 12px;
    letter-spacing: -0.01em;
}

.gnav-brand { display: flex; align-items: center; }
.gnav-brand img { height: 18px; display: block; transition: transform 0.4s var(--ease-spring); }
.gnav-brand:hover img { transform: scale(1.1) rotate(-4deg); }

.gnav-links { display: flex; gap: 32px; flex: 1; justify-content: center; }
.gnav-links a { position: relative; color: rgba(0, 0, 0, 0.8); transition: color 0.2s var(--ease); }
.gnav-links a:hover { color: var(--text); text-decoration: none; }
.gnav-links a.active { color: var(--text); font-weight: 600; }
.gnav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 2px;
    border-radius: 2px; background: var(--text); transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.gnav-links a.active::after { transform: scaleX(1); }

.gnav-burger {
    display: none;
    width: 32px; height: 32px; margin-left: -8px;
    border: 0; background: none; cursor: pointer; color: var(--text);
    align-items: center; justify-content: center;
}
.gnav-burger svg { width: 18px; height: 18px; }

/* Profile menu */
.gmenu-wrap { position: relative; margin-left: auto; }
.gnav-user {
    width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: var(--line-soft); color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    font: 600 11px/1 var(--font); letter-spacing: 0; cursor: pointer;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.gnav-user:hover { background: var(--line); }
.gnav-user:active { transform: scale(0.92); }

.popover {
    position: absolute; right: 0; top: 38px; z-index: 40; min-width: 230px; padding: 8px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 14px; box-shadow: var(--shadow-pop);
    opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right; pointer-events: none;
    visibility: hidden;
    transition: opacity 0.18s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.popover.open {
    opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    transition: opacity 0.18s var(--ease), transform 0.25s var(--ease), visibility 0s;
}
.popover-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.popover-head b { display: block; font-size: 14px; font-weight: 600; }
.popover-head span { font-size: 12px; color: var(--text-2); }
.popover-item, .popover form button {
    display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
    letter-spacing: -0.01em;
}
.popover-item:hover, .popover form button:hover { background: var(--bg); text-decoration: none; }
.popover-item.danger, .popover form button.danger { color: var(--bad-text); }
.popover form { margin: 0; }
.popover-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }

/* =====================================================================
 * Local nav: page name + tabs + action, sticky under the global nav
 * =================================================================== */
.lnav {
    position: sticky;
    top: var(--nav-h);
    z-index: 20;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.lnav.stuck { background: rgba(251, 251, 253, 0.85); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }

.lnav-inner {
    max-width: var(--width);
    min-height: 52px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 24px;
}

.lnav-title {
    font-size: 21px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; min-width: 0;
    transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.lnav:not(.stuck) .lnav-title { opacity: 0; transform: translateY(6px); }

.lnav-links { position: relative; display: flex; gap: 24px; margin-left: auto; font-size: 12px; }
.lnav-links a { padding: 6px 0; color: var(--text); opacity: 0.75; white-space: nowrap; transition: opacity 0.2s var(--ease); }
.lnav-links a:hover { opacity: 1; text-decoration: none; }
.lnav-links a.active { opacity: 1; font-weight: 500; }
.lnav-ink {
    position: absolute; bottom: -11px; height: 2px; border-radius: 2px; background: var(--text);
    transition: left 0.45s var(--ease), width 0.45s var(--ease);
}
.lnav-actions { display: flex; gap: 10px; align-items: center; }
.lnav-links + .lnav-actions { margin-left: 4px; }
.lnav-actions:first-child, .lnav-title + .lnav-actions { margin-left: auto; }

/* =====================================================================
 * Page
 * =================================================================== */
.page {
    flex: 1;
    width: 100%;
    max-width: var(--width);
    margin: 0 auto;
    padding: 48px var(--gutter) 96px;
}

.back { display: inline-block; font-size: 14px; margin-bottom: 10px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}
.page-head .actions { flex: none; }

.eyebrow { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }

.headline {
    font-size: 40px;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.005em;
    overflow-wrap: anywhere;
}
.headline-xl { font-size: 48px; line-height: 1.08; }

.subhead {
    font-size: 19px;
    line-height: 1.42;
    color: var(--text-2);
    margin-top: 10px;
    letter-spacing: 0.006em;
    max-width: 720px;
}

.section { margin-top: 48px; }
.section:first-child { margin-top: 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-title { font-size: 24px; font-weight: 600; letter-spacing: 0.009em; }
.section-title .count { color: var(--text-3); font-weight: 400; margin-left: 4px; }
.section-link { font-size: 15px; white-space: nowrap; }
.section-note { font-size: 14px; color: var(--text-2); margin-top: 12px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-2 > .section { margin-top: 0; }
.stack > * + * { margin-top: 20px; }

/* =====================================================================
 * Buttons
 * =================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 18px;
    border-radius: 980px;
    border: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease), opacity 0.2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.btn-secondary:hover { background: var(--link); color: #fff; }
.btn-plain { background: transparent; color: var(--link); padding-left: 8px; padding-right: 8px; }
.btn-plain:hover { text-decoration: underline; }
.btn-danger { background: transparent; color: var(--bad-text); box-shadow: inset 0 0 0 1px var(--bad-text); }
.btn-danger:hover { background: var(--bad-text); color: #fff; }
.btn-small { min-height: 28px; padding: 4px 14px; font-size: 12px; }
.btn-large { min-height: 48px; padding: 12px 28px; font-size: 17px; }
.btn-block { width: 100%; min-height: 50px; font-size: 17px; border-radius: var(--radius-md); }

.btn.is-busy { opacity: 0.8; pointer-events: none; }
.btn-ring {
    width: 14px; height: 14px; border-radius: 50%; flex: none;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* =====================================================================
 * Tiles (big numbers)
 * =================================================================== */
.tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile {
    position: relative;
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 26px 22px;
    color: var(--text);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
a.tile:hover, .tile.lift:hover { text-decoration: none; transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-hover); }
.tile-label { font-size: 14px; color: var(--text-2); }
.tile-value {
    font-size: 48px; font-weight: 600; line-height: 1.1; margin-top: 6px;
    letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.tile-value.warn { color: var(--warn-text); }
.tile-value.bad { color: var(--bad-text); }
.tile-value .unit { font-size: 17px; font-weight: 400; color: var(--text-2); letter-spacing: -0.02em; }
.tile-note { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.tile-foot { margin-top: 20px; }
.tile.featured { box-shadow: inset 0 0 0 2px var(--accent); }
.tile.featured:hover { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-hover); }

/* =====================================================================
 * Cards
 * =================================================================== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 30px;
}
.card + .card { margin-top: 20px; }
.card-title { font-size: 21px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 6px; }
.card-text { font-size: 15px; color: var(--text-2); }
.card-text + * { margin-top: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.card-head .card-title { margin-bottom: 0; }

.card-danger { box-shadow: inset 0 0 0 1px #ffd2cf; }
.card-danger .card-title { color: var(--bad-text); }

/* =====================================================================
 * Grouped lists (iOS-style rows with inset separators)
 * =================================================================== */
.list {
    background: var(--card);
    border-radius: var(--radius);
    margin: 0;
    padding: 0 0 0 24px;
    list-style: none;
    overflow: hidden;
}

.row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 12px 24px 12px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    font-size: 17px;
}
.list > li:last-child > .row, .list > .row:last-child, .list > li.last-shown > .row { border-bottom: 0; }

a.row { transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
a.row:hover { text-decoration: none; background: var(--hover); box-shadow: -24px 0 0 var(--hover); }
a.row:active { background: var(--line-soft); box-shadow: -24px 0 0 var(--line-soft); }

.row-main { flex: 1; min-width: 0; }
.row-title { display: block; overflow-wrap: anywhere; }
.row-sub { display: block; font-size: 14px; color: var(--text-2); margin-top: 1px; overflow-wrap: anywhere; }
.row-meta { font-size: 15px; color: var(--text-2); text-align: right; white-space: nowrap; }
.row-meta small { display: block; font-size: 13px; color: var(--text-3); }
.row-chev { color: var(--text-3); font-size: 22px; line-height: 1; transition: transform 0.3s var(--ease), color 0.2s var(--ease); }
a.row:hover .row-chev { transform: translateX(4px); color: var(--text-2); }
.row-end { display: flex; align-items: center; gap: 8px; }

/* Row with a link plus a ⋯ menu beside it */
.row.split { gap: 6px; padding-top: 0; padding-bottom: 0; transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.row.split:hover { background: var(--hover); box-shadow: -24px 0 0 var(--hover); }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 0; color: inherit; }
.row-link:hover { text-decoration: none; }
.row.split:hover .row-chev { transform: translateX(4px); color: var(--text-2); }

.list-empty { padding: 28px 24px 28px 0; color: var(--text-2); font-size: 15px; }

/* =====================================================================
 * Status
 * =================================================================== */
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
    background: var(--idle);
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.live::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
    animation: ping 3.2s var(--ease) infinite; opacity: 0.6;
}
.dot.bad.live::after { animation-duration: 1.4s; opacity: 1; }
.dot.warn.live::after { animation-duration: 2.4s; opacity: 1; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

.tag {
    display: inline-block; padding: 2px 10px; border-radius: 980px;
    background: var(--bg); color: var(--text-2); font-size: 12px; font-weight: 500;
    letter-spacing: 0; white-space: nowrap; vertical-align: 2px;
}
.tag.warn { background: var(--warn-bg); color: var(--warn-text); }
.tag.bad { background: var(--bad-bg); color: var(--bad-text); }
.tag.accent { background: #e8f2fd; color: var(--link); }

/* =====================================================================
 * Facts (key/value grid)
 * =================================================================== */
.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 32px;
    margin: 0;
}
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts dt { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.facts dd .big { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }

/* =====================================================================
 * Segmented control
 * =================================================================== */
.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    padding: 3px;
    background: rgba(118, 118, 128, 0.12);
    border-radius: 10px;
}
.segmented a {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.segmented a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.5); }
.segmented a.active {
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
    font-weight: 500;
}

/* =====================================================================
 * Tables (only for real tabular data)
 * =================================================================== */
.table-card { background: var(--card); border-radius: var(--radius); padding: 6px 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
    text-align: left;
    font-weight: 400;
    font-size: 13px;
    color: var(--text-2);
    padding: 12px 20px;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}
.table td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s var(--ease); }
.table tbody tr:hover { background: var(--hover); }
.table .end { text-align: right; }
.table .wrap-anywhere { overflow-wrap: anywhere; word-break: break-word; }
.table .clip { max-width: 420px; overflow-wrap: anywhere; }
.table .error { font-family: var(--font); font-size: 13px; letter-spacing: -0.01em; }
.table-empty { padding: 28px 20px; color: var(--text-2); font-size: 15px; }

/* Search + filter bar above a list */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar-search { flex: 1 1 260px; max-width: 360px; background: var(--card); }
.toolbar .segmented a .faint { margin-left: 2px; }

/* =====================================================================
 * Package price cards and spec lists (like the public pricing page)
 * =================================================================== */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan {
    position: relative; display: flex; flex-direction: column;
    background: var(--card); border-radius: var(--radius); padding: 28px 26px 24px; color: var(--text);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
a.plan:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.plan.featured { box-shadow: inset 0 0 0 2px var(--accent); }
a.plan.featured:hover { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-hover); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-name { font-size: 24px; font-weight: 600; letter-spacing: 0.009em; }
.plan-tagline { font-size: 14px; color: var(--text-2); margin-top: 6px; min-height: 2.9em; }
.plan-price { margin: 18px 0 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.plan-price .now { font-size: 40px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.plan-price .was { font-size: 20px; color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.plan-price .per { font-size: 17px; color: var(--text-2); }
.plan-price .none { font-size: 21px; color: var(--text-2); }
.plan-foot { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-2); }
.plan .spec { margin-top: 18px; }

.spec { font-size: 14px; }
.spec-group + .spec-group { margin-top: 16px; }
.spec-title { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.spec ul { list-style: none; margin: 0; padding: 0; }
.spec li { position: relative; padding: 3px 0 3px 22px; line-height: 1.4; }
.spec li::before {
    content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 5px;
    border: 2px solid var(--ok); border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.spec li.off { color: var(--text-3); }
.spec li.off::before { border: 0; width: 9px; height: 2px; background: var(--idle); top: 11px; transform: none; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.spec-grid .spec-group + .spec-group { margin-top: 0; }

/* Form sections */
.form-section + .form-section { margin-top: 20px; }
.form-section .card-title { margin-bottom: 4px; }
.form-section .card-text { margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checks-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-inline { margin-top: 10px; padding: 10px 14px; }
.static-value { min-height: 48px; display: flex; align-items: center; font-size: 17px; }

@media (max-width: 900px) {
    .plans, .spec-grid { grid-template-columns: 1fr; }
    .checks-3, .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .form-grid, .form-grid-3, .checks-3 { grid-template-columns: 1fr; }
}

/* =====================================================================
 * Availability (suspension) controls
 * =================================================================== */
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.side {
    border-radius: var(--radius-md); background: var(--bg); padding: 18px 20px;
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.side:has(input[value="suspended"]:checked) { background: var(--bad-bg); box-shadow: inset 0 0 0 1px #ffd2cf; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-title { font-size: 17px; font-weight: 600; }
.side-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.side-now { font-size: 13px; color: var(--text-2); margin-top: 10px; }
.side .msg { display: none; margin-top: 14px; }
.side:has(input[value="suspended"]:checked) .msg { display: block; animation: rise 0.35s var(--ease) both; }
.side .textarea { background: #fff; min-height: 84px; }

.switch2 { display: inline-flex; padding: 3px; background: rgba(118, 118, 128, 0.12); border-radius: 9px; flex: none; }
.switch2 input { position: absolute; opacity: 0; pointer-events: none; }
.switch2 label {
    padding: 5px 14px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--text);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.switch2 input:checked + label { background: var(--card); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.switch2 input[value="suspended"]:checked + label { background: var(--bad-text); color: #fff; }
.switch2 input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 760px) { .sides { grid-template-columns: 1fr; } }

/* Ignored migration/seeder rows */
.table tr.is-ignored td:not(.end) { opacity: 0.45; }
.table tr.is-ignored .error { text-decoration: line-through; }
.ignore-done { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ignore-done form, .table .end form { margin: 0; display: inline; }

/* =====================================================================
 * Chips
 * =================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-size: 14px; padding: 5px 12px; border-radius: 980px;
    background: var(--bg); color: var(--text);
    transition: background 0.2s var(--ease);
}
.chip:hover { background: var(--line-soft); }

/* =====================================================================
 * Forms
 * =================================================================== */
.form { max-width: 560px; }
.form-wide { max-width: none; }
.field { margin-bottom: 20px; }
.field > label, .field-label {
    display: block; font-size: 14px; color: var(--text-2); margin: 0 0 6px 2px;
}
.input, .select, .textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    font: inherit;
    font-size: 17px;
    color: var(--text);
    transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.textarea { padding: 12px 16px; min-height: 96px; resize: vertical; line-height: 1.4; }
.select {
    appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b8b8bf; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input:disabled { background: var(--bg); color: var(--text-2); }
.input.mono { font-size: 15px; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.15); }
.input-sm, .select-sm { min-height: 40px; font-size: 15px; padding: 0 12px; border-radius: 10px; }
.select-sm { padding-right: 34px; background-position: right 12px center; }

.help { font-size: 13px; color: var(--text-2); margin: 6px 2px 0; line-height: 1.4; }
.error { font-size: 13px; color: var(--bad-text); margin: 6px 2px 0; }

.affix {
    display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-md);
    background: #fff; overflow: hidden; transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.affix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.affix.is-invalid { border-color: var(--bad); }
.affix span { white-space: nowrap; display: flex; align-items: center; padding: 0 14px; color: var(--text-2); font-size: 15px; background: var(--hover); }
.affix .input { border: 0; border-radius: 0; box-shadow: none !important; }

.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row > .field { margin-bottom: 0; flex: 1 1 180px; min-width: 0; }
.form-row > .field.grow-2 { flex-grow: 2; }
.form-row > .field.narrow { flex: 0 1 110px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

/* Checkbox cards (package features) */
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
    border-radius: var(--radius-md); background: var(--bg); cursor: pointer;
    transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.check:hover { background: var(--line-soft); }
.check:has(input:checked) { background: #e8f2fd; box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.35); }
.check input {
    appearance: none; -webkit-appearance: none; flex: none; margin: 2px 0 0;
    width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
    display: grid; place-content: center; transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.check input::after {
    content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0;
    transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform 0.25s var(--ease-spring);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check-title { display: block; font-size: 15px; font-weight: 500; }
.check-sub { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* =====================================================================
 * Notices (inline) and toasts
 * =================================================================== */
.notice {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 18px; border-radius: var(--radius-md);
    background: var(--warn-bg); color: #7a3d00; font-size: 15px; margin-bottom: 24px;
}
.notice .dot { margin-top: 7px; }
.notice.bad { background: var(--bad-bg); color: #8a0010; }
.notice.info { background: #eef5fd; color: #0b4a8f; }
.notice > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice strong { font-weight: 600; }

.toast {
    position: fixed; left: 50%; bottom: 32px; z-index: 60; display: flex; align-items: center; gap: 10px;
    max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 980px; font-size: 15px; color: #fff;
    background: rgba(29, 29, 31, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, 160%); opacity: 0;
    transition: transform 0.5s var(--ease-spring), opacity 0.3s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* =====================================================================
 * Row action menu (⋯)
 * =================================================================== */
.more-btn {
    width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.more-btn:hover, .more-btn[aria-expanded="true"] { background: var(--line-soft); color: var(--text); }
.more-btn svg { width: 18px; height: 18px; }
.more { display: inline-block; }
.more-menu { position: fixed; top: 0; left: 0; right: auto; transform-origin: top right; }

/* =====================================================================
 * Pagination
 * =================================================================== */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.pager-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pager-links a, .pager-links span {
    min-width: 34px; height: 34px; padding: 0 10px; border-radius: 980px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.pager-links a { color: var(--text); background: var(--card); transition: background 0.2s var(--ease); }
.pager-links a:hover { background: var(--line-soft); text-decoration: none; }
.pager-links .current { background: var(--text); color: #fff; }
.pager-links .disabled { color: var(--text-3); }

/* =====================================================================
 * Footer
 * =================================================================== */
.footer {
    width: 100%;
    max-width: var(--width);
    margin: 0 auto;
    padding: 18px var(--gutter) 36px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.footer a { color: var(--text-2); }

/* =====================================================================
 * Sign-in and other guest pages
 * =================================================================== */
.auth {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px var(--gutter);
    text-align: center;
}
.auth h1 { font-size: 40px; font-weight: 600; letter-spacing: 0; line-height: 1.1; }
.auth .lead { font-size: 19px; color: var(--text-2); margin: 10px auto 36px; max-width: 460px; }
.auth form { width: 100%; max-width: 380px; text-align: left; }
.auth .notice { max-width: 380px; width: 100%; text-align: left; }
.auth-links { margin-top: 24px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.auth-foot { margin-top: 32px; font-size: 12px; color: var(--text-3); }

.auth > * { animation: rise 0.9s var(--ease) both; }
.auth > *:nth-child(2) { animation-delay: 0.08s; }
.auth > *:nth-child(3) { animation-delay: 0.16s; }
.auth > *:nth-child(4) { animation-delay: 0.24s; }
.auth > *:nth-child(5) { animation-delay: 0.32s; }
.auth > *:nth-child(n+6) { animation-delay: 0.4s; }

/* Floating labels */
.float { position: relative; margin-bottom: 14px; }
.float .input { height: 56px; padding-top: 18px; }
.float label {
    position: absolute; left: 17px; top: 16px; margin: 0; font-size: 17px; color: var(--text-3);
    pointer-events: none; transform-origin: left top; transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.float .input:focus + label,
.float .input:not(:placeholder-shown) + label,
.float .input:disabled + label { transform: translateY(-10px) scale(0.7); color: var(--text-2); }
.float .help { text-align: left; }

/* Six-digit code boxes */
.otp { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.otp input {
    width: 52px; height: 64px; border: 1px solid var(--line); border-radius: var(--radius-md);
    background: #fff; text-align: center; font: 600 26px/1 var(--font); color: var(--text);
    transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.2s var(--ease-spring);
}
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); transform: translateY(-2px); }
.otp input:not(:placeholder-shown) { border-color: #b8b8bf; }
.otp-gap { width: 6px; }

.shake { animation: shake 0.45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* QR and recovery codes (Security) */
.qr { display: inline-block; padding: 14px; background: #fff; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line-soft); }
.qr svg { display: block; width: 180px; height: 180px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 14px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 15px; }

/* =====================================================================
 * Motion
 * Easing follows Apple's: quick start, long soft landing.
 * =================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease) both vt-out; }
::view-transition-new(root) { animation: 300ms var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* app.js adds .reveal to content, then .in once it scrolls into view */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--delay, 0ms);
}

/* Headline words rise in turn */
.headline .w { display: inline-block; }
.js .headline .w { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
.js .headline.in .w {
    opacity: 1; transform: none; filter: none;
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
    transition-delay: calc(var(--i) * 60ms);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal, .js .headline .w { opacity: 1 !important; transform: none !important; filter: none !important; }
    @view-transition { navigation: none; }
}

/* =====================================================================
 * Small screens
 * =================================================================== */
@media (max-width: 900px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-2 > .section + .section { margin-top: 28px; }
}

@media (max-width: 760px) {
    :root { --gutter: 16px; }
    .gnav-inner { gap: 16px; }
    .gnav-burger { display: inline-flex; }
    .gnav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 29;
        flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
        background: #fbfbfd;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
        transition: opacity 0.2s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
    }
    .gnav.menu-open .gnav-links { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
    .gnav-links a { font-size: 21px; font-weight: 600; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
    .gnav-links a::after { display: none; }
    .gmenu-wrap { margin-left: auto; }

    .lnav-inner { gap: 14px; overflow-x: auto; scrollbar-width: none; }
    .lnav-inner::-webkit-scrollbar { display: none; }
    .lnav-title { display: none; }
    .lnav-links { margin-left: 0; }
    .lnav-actions { margin-left: auto; }

    .page { padding-top: 32px; padding-bottom: 64px; }
    .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
    .headline { font-size: 32px; }
    .headline-xl { font-size: 36px; }
    .subhead { font-size: 17px; }
    .tile { padding: 18px 20px; }
    .tile-value { font-size: 36px; }
    .tiles, .tiles-3 { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { padding: 22px 20px; }
    .list { padding-left: 18px; }
    .row { padding-right: 16px; font-size: 16px; }
    a.row:hover { box-shadow: -18px 0 0 var(--hover); }
    .checks, .codes { grid-template-columns: 1fr; }
    .footer { flex-direction: column; }
    .otp input { width: 44px; height: 56px; font-size: 22px; }
    .auth h1 { font-size: 32px; }
}
