:root {
    color-scheme: dark;
    --bg: #101214;
    --surface: #171a1f;
    --surface-strong: #20252b;
    --border: #303842;
    --text: #f3f7fb;
    --muted: #a9b5c2;
    --accent: #42d7a4;
    --accent-strong: #2fbf8d;
    --danger: #ff6b73;
    --warn: #ffc75f;
    --shadow: rgba(0, 0, 0, 0.28);
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(66, 215, 164, 0.08), transparent 32rem),
        var(--bg);
    color: var(--text);
}

.shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 44px;
    margin-bottom: 44px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 48px;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.status-pill {
    min-width: 88px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.panel {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 60px var(--shadow);
}

.compact-panel {
    padding: 22px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    max-width: 720px;
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.04;
    letter-spacing: 0;
}

.lede {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.small-lede {
    margin-bottom: 0;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .wide {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

input {
    min-height: 42px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
}

input:focus {
    border-color: rgba(66, 215, 164, 0.75);
    outline: none;
}

.consent-row {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    line-height: 1.5;
}

.consent-row input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--accent);
}

input:focus-visible,
button:focus-visible,
.button:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(66, 215, 164, 0.95);
    outline-offset: 3px;
}

.result {
    display: grid;
    gap: 16px;
}

.account-dashboard {
    display: grid;
    gap: 18px;
}

.dashboard-heading,
.section-heading,
.mini-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-heading {
    margin-bottom: 18px;
}

.dashboard-heading h1 {
    margin-bottom: 6px;
    font-size: 28px;
    line-height: 1.18;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 20px;
}

.section-heading span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 18px;
}

.dashboard-grid > .panel:last-child {
    grid-column: 1 / -1;
}

.license-box {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
}

.label {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.license-key {
    overflow-wrap: anywhere;
    margin: 0;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: clamp(19px, 4vw, 30px);
    color: var(--text);
}

.metadata {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.metadata div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.metadata dd,
.metadata dt {
    margin: 0;
}

.metadata dt {
    color: var(--muted);
    font-size: 13px;
}

.metadata dd {
    margin-top: 5px;
    font-weight: 650;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.mini-item.inactive {
    opacity: 0.72;
}

.mini-item.muted {
    color: var(--muted);
}

.mini-item dl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 6px 10px;
    margin: 0;
    font-size: 13px;
}

.mini-item dt,
.mini-item dd {
    margin: 0;
}

.mini-item dt {
    color: var(--muted);
}

.mini-item dd {
    overflow-wrap: anywhere;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
}

button,
.button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: #06120e;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-strong);
}

.button-secondary {
    border-color: var(--border);
    background: transparent;
    color: var(--text);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.notice {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    line-height: 1.55;
}

.notice strong {
    color: var(--text);
}

.panel > .notice + .form-grid {
    margin-top: 18px;
}

.notice-error {
    border-color: rgba(255, 107, 115, 0.45);
    color: #ffd3d6;
}

.notice-warn {
    border-color: rgba(255, 199, 95, 0.45);
    color: #ffe6ad;
}

.footer {
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.footer a,
.purchase-summary a {
    color: var(--accent-strong);
}

.language-switcher {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.language-switcher a,
.language-switcher span {
    display: grid;
    place-items: center;
    min-width: 34px;
    min-height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.language-switcher [aria-current="page"] {
    background: var(--accent);
    color: #06120e;
}

.purchase-summary {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(64, 210, 166, 0.32);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(64, 210, 166, 0.08), rgba(58, 150, 255, 0.05));
    line-height: 1.55;
}

.purchase-summary p {
    margin: 0;
}

.purchase-summary .eyebrow {
    margin-bottom: 6px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 24px, 920px);
        padding: 24px 0;
    }

    .topbar {
        margin-bottom: 24px;
    }

    .topbar,
    .top-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel {
        padding: 20px;
    }

    .metadata {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-heading,
    .section-heading,
    .mini-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .mini-item dl {
        grid-template-columns: 1fr;
    }
}
