/* store.iigo.dev — same tokens as iigo.dev and the panel */

:root {
    --canvas: #f4f6fa;
    --surface: #ffffff;
    --surface-muted: #f8f9fb;
    --border: #e3e7ee;
    --text: #1d2433;
    --text-muted: #667085;
    --link: #1a73d9;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow: 0 8px 24px rgba(16, 24, 40, .12);
    --chip-bg: #eef1f5;
    --success-bg: #ecfdf3;
    --success-fg: #067647;
    --warning-bg: #fffaeb;
    --warning-fg: #93370d;
    --danger-bg: #fef3f2;
    --danger-fg: #b42318;
    --info-bg: #eff8ff;
    --info-fg: #175cd3;

    --navy: #0f172a;
    --navy-border: rgba(255, 255, 255, .08);
    --navy-fg: #cbd5e1;
    --blue: #35acff;
    --purple: #a05bec;
    --brand-gradient: linear-gradient(135deg, #35acff 0%, #a05bec 100%);
    --success: #12b76a;
    --radius-sm: .375rem;
    --radius: .5rem;
    --radius-lg: .75rem;
    --radius-xl: 1rem;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    --wrap: 1100px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --canvas: #0d121b;
        --surface: #141b27;
        --surface-muted: #19212f;
        --border: #263042;
        --text: #e6eaf0;
        --text-muted: #98a2b3;
        --link: #6cc2ff;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
        --shadow: 0 8px 24px rgba(0, 0, 0, .5);
        --chip-bg: #1f2937;
        --success-bg: #0b2b1d;
        --success-fg: #6ce9a6;
        --warning-bg: #2e2109;
        --warning-fg: #fec84b;
        --danger-bg: #2d1210;
        --danger-fg: #fda29b;
        --info-bg: #0c2340;
        --info-fg: #84caff;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --canvas: #0d121b;
    --surface: #141b27;
    --surface-muted: #19212f;
    --border: #263042;
    --text: #e6eaf0;
    --text-muted: #98a2b3;
    --link: #6cc2ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 8px 24px rgba(0, 0, 0, .5);
    --chip-bg: #1f2937;
    --success-bg: #0b2b1d;
    --success-fg: #6ce9a6;
    --warning-bg: #2e2109;
    --warning-fg: #fec84b;
    --danger-bg: #2d1210;
    --danger-fg: #fda29b;
    --info-bg: #0c2340;
    --info-fg: #84caff;
    color-scheme: dark;
}

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .875em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 2000; padding: .5rem 1rem; background: var(--surface); border-radius: var(--radius); }
.skip-link:focus { left: 1rem; }

.gradient-text { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.bi { line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.75rem; padding: .5rem 1.125rem;
    border: 1px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 20px rgba(91, 132, 245, .35); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(91, 132, 245, .45); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--surface-muted); }
.btn-sm { min-height: 2.25rem; padding: .375rem .75rem; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; padding: 0;
    border: 1px solid transparent; border-radius: var(--radius);
    background: transparent; color: var(--navy-fg); font-size: 1.05rem; cursor: pointer;
}
.btn-icon:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- Header and footer ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15, 23, 42, .92);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--navy-border);
}
.header-inner { display: flex; align-items: center; gap: .75rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .625rem; font-weight: 700; font-size: 1.25rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.brand .brand-sub { color: var(--navy-fg); font-weight: 500; font-size: 1rem; }
.header-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.header-nav a { padding: .5rem .75rem; border-radius: var(--radius); color: var(--navy-fg); font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.header-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.header-nav .hide-sm { display: none; }
@media (min-width: 640px) { .header-nav .hide-sm { display: inline-block; } }

.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-light { display: inline; }
    :root:not([data-theme="light"]) .theme-icon-dark { display: none; }
}

.site-footer { margin-top: 4rem; padding: 2rem 0; background: var(--navy); color: var(--navy-fg); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer-inner a { color: var(--navy-fg); }
.footer-inner a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; list-style: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: 4rem 0 5rem;
    background: radial-gradient(1200px 400px at 80% -10%, rgba(160, 91, 236, .35), transparent 60%),
                radial-gradient(900px 400px at 0% 0%, rgba(53, 172, 255, .3), transparent 60%),
                var(--navy);
    color: #fff;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.hero p { max-width: 640px; color: var(--navy-fg); font-size: 1.125rem; }
.kicker { display: inline-block; margin-bottom: .75rem; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: var(--navy-fg); font-size: .9375rem; }
.hero-points i { color: var(--blue); margin-right: .375rem; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0 0; }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--text-muted); }

/* ---------- Plans ---------- */
.plans { display: grid; gap: 1.25rem; margin-top: -3rem; position: relative; }
@media (min-width: 800px) { .plans { grid-template-columns: repeat(2, 1fr); } }

.plan {
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1.75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-gradient) border-box; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.plan-head h3 { margin: 0; font-size: 1.25rem; }
.plan-price { font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.plan-price small { font-size: .9375rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-summary { margin: 0; color: var(--text-muted); }

.pill { display: inline-block; padding: .125rem .5rem; border-radius: 999px; background: var(--brand-gradient); color: #fff; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; }

.check-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: .625rem; align-items: flex-start; }
.check-list i { color: var(--success); margin-top: .2rem; }

.buy-row { display: grid; gap: .75rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.qty-row label { font-weight: 600; }
.total-row { display: flex; justify-content: space-between; color: var(--text-muted); font-size: .9375rem; }
.total-row strong { color: var(--text); }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stepper button { width: 2.5rem; border: 0; background: var(--surface-muted); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.stepper button:hover { background: var(--chip-bg); }
.stepper input { width: 3.5rem; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Cards, steps, FAQ ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 1.25rem; }
@media (min-width: 640px) { .card-body { padding: 1.5rem; } }

.steps { display: grid; gap: 1rem; counter-reset: step; margin: 0; padding: 0; list-style: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { position: relative; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); counter-increment: step; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; margin-bottom: .75rem; border-radius: 50%; background: var(--brand-gradient); color: #fff; font-weight: 700; font-size: .875rem; }
.steps h3 { font-size: 1rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: .9375rem; }

.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: .75rem 0 0; color: var(--text-muted); }

/* ---------- Forms ---------- */
.field { display: grid; gap: .375rem; }
.field label { font-weight: 600; font-size: .9375rem; }
.field .hint { color: var(--text-muted); font-size: .8125rem; }
.input {
    width: 100%; min-height: 2.75rem; padding: .5rem .75rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); font: inherit;
}
.input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.input.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.input.mono::placeholder { text-transform: none; letter-spacing: 0; }

.form-row { display: grid; gap: .75rem; }
@media (min-width: 720px) { .form-row { grid-template-columns: 1.2fr 1fr auto; align-items: end; } }

/* ---------- Alerts and badges ---------- */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem; border-radius: var(--radius); font-size: .9375rem; }
.alert i { margin-top: .2rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--success-bg); color: var(--success-fg); }
.alert-warning { background: var(--warning-bg); color: var(--warning-fg); }
.alert-danger { background: var(--danger-bg); color: var(--danger-fg); }
.alert-info { background: var(--info-bg); color: var(--info-fg); }
.alert a { color: inherit; text-decoration: underline; }

.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge-success { background: var(--success-bg); color: var(--success-fg); }
.badge-warning { background: var(--warning-bg); color: var(--warning-fg); }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge-muted { background: var(--chip-bg); color: var(--text-muted); }

/* ---------- Account ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 2.5rem 0 1.5rem; }
.page-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--text-muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* minmax(0, 1fr) stops wide tables from stretching cards past a phone screen */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }

.license-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.license-head h2 { font-size: 1.25rem; margin: 0 0 .25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.license-head .license-id { font-family: var(--mono); font-size: .8125rem; color: var(--text-muted); overflow-wrap: anywhere; }

.meta { display: grid; gap: .75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 1.25rem; }
.meta div { min-width: 0; }
.meta dt { color: var(--text-muted); font-size: .8125rem; }
.meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.seat-bar { height: .5rem; border-radius: 999px; background: var(--chip-bg); overflow: hidden; margin-top: .375rem; }
.seat-bar span { display: block; height: 100%; background: var(--brand-gradient); }

.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 .75rem; }
.sub-head h3 { font-size: 1rem; margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { padding: .625rem .875rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: var(--surface-muted); color: var(--text-muted); font-size: .8125rem; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.mono { font-family: var(--mono); }
td.wrap-cell { white-space: normal; }

.empty { padding: 1.25rem; text-align: center; color: var(--text-muted); background: var(--surface-muted); border: 1px dashed var(--border); border-radius: var(--radius); }

.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.panel { margin-top: 1rem; padding: 1rem; background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Narrow pages (sign in, success) ---------- */
.narrow { max-width: 460px; margin: 3rem auto 0; }
.narrow .card-body { display: grid; gap: 1rem; }
.narrow h1 { font-size: 1.5rem; margin: 0; }
.narrow p { margin: 0; color: var(--text-muted); }

.spinner { display: inline-block; width: 1.25rem; height: 1.25rem; border: 2px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .btn { transition: none; } }

/* ---------- Dialog ---------- */
dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 23, 42, .6); }
dialog .card-body { display: grid; gap: 1rem; }
dialog h2 { font-size: 1.25rem; margin: 0; }
dialog p { margin: 0; color: var(--text-muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 1000; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: .75rem 1rem; border-radius: var(--radius); background: var(--navy); color: #fff; box-shadow: var(--shadow); font-size: .9375rem; }
