:root {
    --canvas: #f4f7f4;
    --surface: #ffffff;
    --line: #dbe3de;
    --ink: #17231e;
    --muted: #64736b;
    --accent: #087d6f;
    --accent-strong: #046357;
    --accent-soft: #ddf1ea;
    --warn: #a96000;
    --warn-soft: #fff3d9;
    --danger: #b13732;
    --danger-soft: #fee9e7;
    --radius: 6px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    display: flex;
    flex-direction: column;
    background: #17231e;
    color: #eaf4ef;
    border-right: 1px solid #25362e;
}

.brand {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 22px;
    font-size: 18px;
    font-weight: 760;
}

.brand-mark, .user-initial {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-weight: 800;
}

.sidebar nav { display: grid; gap: 4px; padding: 14px 12px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 0 11px;
    border-radius: 5px;
    color: #aebdb5;
    font-size: 14px;
}
.nav-item svg, .icon-text svg, .button svg { width: 17px; height: 17px; stroke-width: 2; }
.nav-item:hover, .nav-item.active { color: white; background: #28453a; }
.sidebar-footer { margin-top: auto; padding: 14px; border-top: 1px solid #2a3d34; }

.main { margin-left: 236px; min-height: 100vh; padding: 28px clamp(22px, 4vw, 56px) 52px; }
.topbar, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { padding-bottom: 29px; border-bottom: 1px solid var(--line); }
.topbar h1, .section-head h2 { margin: 0; letter-spacing: 0; color: var(--ink); }
.topbar h1 { font-size: 24px; }
.section-head { margin: 34px 0 14px; }
.section-head h2 { font-size: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.user-chip { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.user-initial { width: 28px; height: 28px; font-size: 12px; background: #d7e8df; color: #205145; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.stats article, .plan-card, .auth-form, .auth-brand, .doc-layout article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.stats article { min-height: 108px; padding: 19px; display: grid; align-content: space-between; }
.stats span { color: var(--muted); font-size: 13px; }
.stats strong { font-size: 30px; line-height: 1; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; }
th { padding: 12px 15px; color: var(--muted); background: #f8faf8; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
td { padding: 14px 15px; border-bottom: 1px solid #edf1ee; font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 12px; }

.status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 4px; background: #eef2ef; color: #5e6c64; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.status.success, .status.active { background: var(--accent-soft); color: var(--accent-strong); }
.status.pending { background: var(--warn-soft); color: var(--warn); }
.status.suspended { background: var(--danger-soft); color: var(--danger); }
.status.muted { background: #edf0ee; color: #65726b; }

.button, .icon-text {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 0 13px;
    border: 1px solid #b9c9c0;
    border-radius: 5px;
    background: white;
    color: #244238;
    font-size: 13px;
    font-weight: 750;
}
.button:hover, .icon-text:hover { border-color: var(--accent); color: var(--accent-strong); }
.button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.button.primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); color: white; }
.button.small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.icon-text.quiet { width: 100%; justify-content: flex-start; border: 0; color: #b9c8c0; background: transparent; }
.icon-text.quiet:hover { background: #28453a; color: white; }

.notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 19px 0; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; }
.notice.success { border-left-color: var(--accent); background: #f6fcf9; }
.notice.warning { border-left-color: #d38d1f; background: var(--warn-soft); }
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); }
.secret-output { margin: 0; max-width: 100%; overflow: auto; padding: 10px; background: #13221b; color: #d7f8e9; border-radius: 4px; font-size: 12px; }

.provider-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.provider-row { display: flex; align-items: center; gap: 10px; min-height: 78px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.provider-row:nth-child(3n) { border-right: 0; }
.provider-row.selected { background: #eff9f4; box-shadow: inset 0 -2px 0 var(--accent); }
.provider-row strong, .provider-row small { display: block; }
.provider-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.provider-row .status { margin-left: auto; }
.config-dot { color: #8d9b93; font-size: 11px; }
.config-dot.ready { color: var(--accent); }
.editor { margin-top: 24px; padding-top: 1px; border-top: 1px solid var(--line); }

.operation-tabs { display: flex; gap: 7px; margin: 20px 0 8px; overflow-x: auto; padding-bottom: 4px; }
.operation-tab { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 37px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 750; }
.operation-tab svg { width: 15px; height: 15px; }
.operation-tab:hover, .operation-tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.provider-scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provider-scope-grid article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 76px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.provider-scope-grid article > div:nth-child(2) span, .provider-scope-grid article > div:nth-child(2) strong { display: block; }
.provider-scope-grid article > div:nth-child(2) span { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.provider-scope-grid article > div:nth-child(2) strong { font-size: 14px; }
.provider-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; }
.provider-icon svg { width: 20px; height: 20px; }
.provider-icon.global { background: #e4eefc; color: #285b9c; }
.provider-icon.pg { background: #ffede7; color: #a84726; }

.activation-band, .empty-state { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; padding: 18px 20px; border-block: 1px solid var(--line); background: var(--surface); }
.activation-band strong, .activation-band span { display: block; }
.activation-band span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.empty-state { justify-content: flex-start; margin-top: 22px; }
.empty-state > svg { width: 25px; color: var(--muted); }
.empty-state h2, .empty-state p { margin: 0; }
.empty-state h2 { font-size: 17px; }
.empty-state p { margin-top: 5px; color: var(--muted); font-size: 13px; }

.provider-settings-form { display: grid; gap: 14px; padding-bottom: 78px; }
.config-section { padding: 19px 20px 21px; border-block: 1px solid var(--line); background: var(--surface); }
.config-section + .config-section { margin-top: -1px; }
.config-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.config-section-head h3 { margin: 0; font-size: 16px; }
.config-section-head div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.config-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.config-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.config-fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.config-fields.probability-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.config-fields label > small { overflow-wrap: anywhere; }

.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; min-width: 240px; padding: 3px; border: 1px solid #c8d5cd; border-radius: 5px; background: #f2f6f3; }
.segmented label { display: block; position: relative; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 31px; padding: 0 12px; border-radius: 3px; color: var(--muted); font-size: 12px; font-weight: 750; }
.segmented input:checked + span { background: var(--surface); color: var(--accent-strong); box-shadow: 0 1px 3px rgba(23, 35, 30, .14); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.mode-lock { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; padding: 0 10px; border: 1px solid #bdd8cd; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 750; }
.mode-lock svg { width: 15px; height: 15px; }

.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 34px; }
.input-suffix b { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.config-groups { display: grid; gap: 8px; }
.config-group { border: 1px solid var(--line); border-radius: 5px; background: #fbfcfb; }
.config-group summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; min-height: 46px; padding: 0 13px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; }
.config-group summary::-webkit-details-marker { display: none; }
.config-group summary small { color: var(--muted); font-size: 11px; font-weight: 650; }
.config-group summary svg { width: 16px; transition: transform .18s ease; }
.config-group[open] summary svg { transform: rotate(180deg); }
.config-group .config-fields { padding: 14px; border-top: 1px solid var(--line); background: var(--surface); }
.setting-toggle { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fafcfa; }
.setting-toggle > input[type="hidden"] { display: none; }
.setting-toggle > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle small { margin-top: 3px; overflow-wrap: anywhere; }
.sticky-actions { position: sticky; z-index: 4; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 10px 12px 10px 16px; border: 1px solid #b9c9c0; border-radius: 6px; background: rgba(255, 255, 255, .96); box-shadow: 0 7px 24px rgba(25, 47, 38, .12); backdrop-filter: blur(8px); }
.sticky-actions > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.sticky-actions > span svg { width: 17px; color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 17px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.form-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 7px; color: #394a41; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-size: 11px; font-weight: 600; }
input, select { width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid #c8d5cd; border-radius: 4px; background: white; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8, 125, 111, .12); }
.wide, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.toggle { grid-template-columns: auto 1fr; align-items: center; gap: 10px; min-height: 39px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.inline-form { display: flex; align-items: center; gap: 7px; min-width: 320px; }
.inline-form select { min-height: 30px; font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-card { display: grid; gap: 14px; padding: 20px; }
.doc-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.doc-layout article { padding: 19px; }
.doc-layout h3 { margin: 0 0 10px; font-size: 16px; }
.doc-layout p { margin: 11px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
code { padding: 3px 5px; background: #e7efea; color: #1d5043; border-radius: 3px; overflow-wrap: anywhere; font-size: .9em; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, .85fr) minmax(340px, 430px); align-items: center; justify-content: center; gap: 40px; padding: 30px; }
.auth-brand { min-height: 260px; padding: 32px; background: #17231e; border-color: #17231e; color: #edf8f2; }
.auth-brand .brand-mark { width: 42px; height: 42px; margin-bottom: 29px; }
.auth-brand h1 { margin: 0 0 9px; font-size: 30px; letter-spacing: 0; }
.auth-brand p { margin: 0; color: #bdd2c6; line-height: 1.5; }
.auth-form { display: grid; gap: 17px; padding: 28px; }
.auth-form h2 { margin: 0 0 4px; font-size: 21px; }
.auth-form fieldset { display: grid; gap: 8px; padding: 0; border: 0; }
.auth-form legend { margin-bottom: 8px; color: #394a41; font-size: 13px; font-weight: 700; }
.choice { grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; }
.choice input { width: 17px; height: 17px; accent-color: var(--accent); }
.choice strong, .choice small { display: block; }
.choice small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.auth-link { margin: 0; color: var(--muted); font-size: 13px; }
.auth-link a { color: var(--accent-strong); font-weight: 750; }
.field-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 700; }

@media (max-width: 1050px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .provider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .provider-row:nth-child(3n) { border-right: 1px solid var(--line); }
    .provider-row:nth-child(2n) { border-right: 0; }
    .form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .config-fields.four, .config-fields.probability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .sidebar { position: static; width: auto; min-height: auto; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar-footer { display: none; }
    .main { margin-left: 0; padding: 20px 15px 36px; }
    .topbar { align-items: flex-start; }
    .user-chip span:last-child { display: none; }
    .stats, .plan-grid, .doc-layout, .provider-list, .form-grid, .form-grid.compact, .provider-scope-grid, .config-fields, .config-fields.three, .config-fields.four, .config-fields.probability-grid { grid-template-columns: 1fr; }
    .provider-row, .provider-row:nth-child(2n), .provider-row:nth-child(3n) { border-right: 0; }
    .form-actions { justify-content: stretch; }
    .form-actions .button { width: 100%; }
    .auth-shell { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
    .auth-brand { min-height: auto; }
    .notice { align-items: flex-start; flex-direction: column; }
    .provider-scope-grid article { grid-template-columns: 42px minmax(0, 1fr); }
    .provider-scope-grid article > .status { grid-column: 2; justify-self: start; }
    .activation-band, .config-section-head, .sticky-actions { align-items: stretch; flex-direction: column; }
    .activation-band .button, .sticky-actions .button { width: 100%; }
    .segmented { width: 100%; min-width: 0; }
}

/* Connect Games sign-in and registration experience */
body.auth-page {
    min-height: 100vh;
    color: #19203a;
    background:
        radial-gradient(ellipse at 8% 12%, rgba(105, 86, 232, .16), transparent 30%),
        radial-gradient(ellipse at 93% 88%, rgba(39, 213, 178, .15), transparent 32%),
        #f2f4fb;
}

.auth-page .auth-shell {
    width: min(1160px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1.08fr) minmax(370px, .92fr);
    gap: 0;
    padding: 48px 30px;
}

.auth-page .auth-brand {
    position: relative;
    z-index: 0;
    min-height: 590px;
    padding: clamp(36px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.17);
    border-right: 0;
    border-radius: 28px 0 0 28px;
    color: #f6f7ff;
    background:
        radial-gradient(circle at 78% 20%, rgba(45, 226, 190, .31), transparent 25%),
        radial-gradient(circle at 20% 100%, rgba(255, 117, 150, .22), transparent 34%),
        linear-gradient(145deg, #11172d 4%, #29235f 53%, #145c62 115%);
    box-shadow: 0 30px 80px rgba(27, 31, 77, .18);
}

.auth-page .auth-brand::before,
.auth-page .auth-brand::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.auth-page .auth-brand::before {
    width: 380px;
    height: 380px;
    top: -135px;
    right: -135px;
    border: 1px solid rgba(228, 231, 255, .22);
    border-radius: 48% 52% 59% 41%;
    box-shadow: 0 0 0 22px rgba(255,255,255,.025), 0 0 0 52px rgba(255,255,255,.02);
    transform: rotate(24deg);
}

.auth-page .auth-brand::after {
    content: "CG";
    right: 24px;
    bottom: -88px;
    color: rgba(255,255,255,.055);
    font-size: clamp(190px, 25vw, 310px);
    font-weight: 950;
    letter-spacing: -.12em;
    line-height: 1;
}

.auth-page .auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-page .auth-brand .brand-mark {
    width: 58px;
    height: 58px;
    margin: 0 0 34px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 18px;
    background: linear-gradient(145deg, #8c7cff, #5542cf 68%, #22b99d);
    box-shadow: 0 12px 28px rgba(17, 9, 72, .32);
    font-size: 17px;
    letter-spacing: -.06em;
}

.auth-page .auth-brand h1 {
    max-width: 470px;
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(38px, 4.6vw, 56px);
    font-weight: 850;
    letter-spacing: -.065em;
    line-height: 1.02;
}

.auth-page .auth-brand p {
    max-width: 390px;
    color: rgba(237, 241, 255, .78);
    font-size: 16px;
    line-height: 1.7;
}

.auth-page .auth-form {
    position: relative;
    z-index: 1;
    min-width: 0;
    align-content: center;
    gap: 19px;
    padding: clamp(28px, 4.8vw, 56px);
    border: 1px solid #e3e7f2;
    border-left: 0;
    border-radius: 0 28px 28px 0;
    background: rgba(255,255,255,.97);
    box-shadow: 0 30px 80px rgba(27, 31, 77, .15);
    backdrop-filter: blur(16px);
}

.auth-page .auth-form h2 {
    margin: 0 0 3px;
    color: #171d35;
    font-size: 27px;
    font-weight: 820;
    letter-spacing: -.045em;
}

.auth-page .auth-form > p:not(.field-error) {
    margin: -10px 0 2px;
    color: #727b91;
    font-size: 13px;
    line-height: 1.5;
}

.auth-page .auth-form label:not(.choice) {
    gap: 8px;
    color: #343b55;
    font-size: 13px;
    font-weight: 750;
}

.auth-page .auth-form input:not([type="radio"]):not([type="hidden"]),
.auth-page .auth-form select {
    min-height: 49px;
    padding: 0 14px;
    border: 1px solid #dce1ed;
    border-radius: 11px;
    color: #1c2340;
    background: #fbfcff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-page .auth-form input:not([type="radio"]):not([type="hidden"]):hover,
.auth-page .auth-form select:hover {
    border-color: #b8b1f3;
}

.auth-page .auth-form input:not([type="radio"]):not([type="hidden"]):focus,
.auth-page .auth-form select:focus {
    border-color: #7161e8;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(113, 97, 232, .14);
}

.auth-page .auth-form .button.primary {
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    color: #071c1b;
    background: linear-gradient(105deg, #3cdbbb, #55ead0 54%, #a3f3dd);
    box-shadow: 0 10px 24px rgba(39, 197, 167, .22);
    font-size: 14px;
    font-weight: 850;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-page .auth-form .button.primary:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 15px 30px rgba(39, 197, 167, .29);
}

.auth-page .auth-link {
    color: #727b91;
    text-align: center;
}

.auth-page .auth-link a {
    color: #5c4bd0;
}

.auth-page .field-error {
    padding: 11px 13px;
    border: 1px solid #ffc8ca;
    border-radius: 10px;
    color: #a82f43;
    background: #fff2f2;
    line-height: 1.45;
}

.auth-page .auth-form fieldset {
    gap: 9px;
}

.auth-page .auth-form legend {
    color: #343b55;
    font-weight: 750;
}

.auth-page .auth-form .choice {
    min-height: 60px;
    padding: 12px 14px;
    border: 1px solid #e1e5f0;
    border-radius: 12px;
    color: #333a55;
    background: #fbfcff;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.auth-page .auth-form .choice:hover,
.auth-page .auth-form .choice:has(input:checked) {
    border-color: #8a7df0;
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(113, 97, 232, .08);
}

.auth-page .auth-form .choice input {
    width: 18px;
    height: 18px;
    accent-color: #6e5be4;
}

.auth-page .auth-form .choice small {
    color: #747c92;
}

.auth-page .auth-form:only-child {
    grid-column: 1 / -1;
    width: min(580px, 100%);
    margin: 0 auto;
    border-left: 1px solid #e3e7f2;
    border-radius: 24px;
}

@media (max-width: 760px) {
    body.auth-page {
        padding: 0;
    }

    .auth-page .auth-shell {
        width: min(560px, 100%);
        min-height: 100svh;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 18px;
    }

    .auth-page .auth-brand {
        min-height: 215px;
        padding: 28px;
        border: 1px solid rgba(255,255,255,.17);
        border-radius: 22px 22px 10px 10px;
    }

    .auth-page .auth-brand .brand-mark {
        width: 46px;
        height: 46px;
        margin-bottom: 18px;
        border-radius: 14px;
        font-size: 14px;
    }

    .auth-page .auth-brand h1 {
        margin-bottom: 8px;
        font-size: 36px;
    }

    .auth-page .auth-brand p {
        max-width: 310px;
        font-size: 14px;
    }

    .auth-page .auth-brand::after {
        right: 6px;
        bottom: -62px;
        font-size: 190px;
    }

    .auth-page .auth-form {
        gap: 16px;
        padding: 26px 23px;
        border: 1px solid #e3e7f2;
        border-radius: 10px 10px 22px 22px;
    }

    .auth-page .auth-form:only-child {
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        transition-duration: .01ms !important;
    }
}

/* Connect Games dashboard theme */
:root {
    --canvas: #f2f4fb;
    --surface: #ffffff;
    --line: #e0e5f1;
    --ink: #19203a;
    --muted: #68718a;
    --accent: #7057e8;
    --accent-strong: #543bd0;
    --accent-soft: #eeeaff;
    --radius: 14px;
}
body:not(.auth-page) {
    background:
        radial-gradient(ellipse at 98% 0%, rgba(112,87,232,.09), transparent 26%),
        radial-gradient(ellipse at 0% 98%, rgba(39,213,178,.08), transparent 28%),
        var(--canvas);
}
.sidebar {
    color: #f2f4ff;
    border: 0;
    background:
        radial-gradient(circle at 95% 5%, rgba(40,220,189,.2), transparent 26%),
        linear-gradient(175deg, #171a36 0%, #242451 58%, #174a55 120%);
    box-shadow: 9px 0 34px rgba(22,26,57,.12);
}
.brand { height: 82px; font-size: 18px; letter-spacing: -.3px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 13px;
    background: linear-gradient(145deg,#34dfc0,#6b58e8 76%);
    box-shadow: 0 6px 18px rgba(70,183,207,.24);
}
.sidebar nav { gap: 6px; padding: 16px 12px; }
.nav-item { min-height: 43px; border-radius: 11px; color: #c4c9df; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.09); transform: translateX(2px); }
.nav-item.active {
    color: #fff;
    background: linear-gradient(100deg,rgba(116,91,238,.48),rgba(45,205,184,.18));
    box-shadow: inset 3px 0 #43dfc1, 0 7px 20px rgba(9,13,39,.12);
}
.sidebar-footer { border-color: rgba(255,255,255,.12); }
.icon-text.quiet { color: #d2d6e9; border-radius: 10px; }
.icon-text.quiet:hover { background: rgba(255,255,255,.10); }
.main { padding-top: 32px; }
.topbar { border-color: rgba(107,119,153,.18); }
.topbar h1 { font-size: clamp(23px,2vw,29px); letter-spacing: -.6px; }
.eyebrow { color: #725be6; letter-spacing: 1.3px; }
.user-chip { padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.82); box-shadow: 0 5px 15px rgba(34,43,86,.05); }
.user-initial { color: white; background: linear-gradient(145deg,#34dabe,#7057e8); }
.stats article, .plan-card, .doc-layout article, .form-grid, .provider-list, .table-wrap, .config-section, .provider-scope-grid article {
    border-color: #e1e6f2;
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(38,44,89,.055);
}
.stats article { position: relative; overflow: hidden; min-height: 120px; padding: 21px; }
.stats article::before { position: absolute; content: ""; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg,#6c57e8,#39d8bd); }
.stats article:nth-child(2)::before { background: linear-gradient(90deg,#ff8f76,#ffc76a); }
.stats article:nth-child(3)::before { background: linear-gradient(90deg,#36c9d4,#6688ff); }
.stats article:nth-child(4)::before { background: linear-gradient(90deg,#e56bb2,#8d64ed); }
.stats strong { color: #242347; font-size: 32px; letter-spacing: -1px; }
.table-wrap { overflow: auto; }
th { color: #707893; background: #f7f8fd; }
td { border-color: #eef0f7; }
tbody tr:hover { background: #fafaff; }
.button, .icon-text { min-height: 39px; border-color: #dfe3ef; border-radius: 10px; color: #343754; transition: .18s ease; }
.button:hover, .icon-text:hover { border-color: #a99bf0; color: var(--accent-strong); box-shadow: 0 5px 14px rgba(83,63,189,.10); }
.button.primary { border-color: transparent; background: linear-gradient(105deg,#7258e9,#5850d7 62%,#398dba); box-shadow: 0 7px 17px rgba(98,77,220,.22); }
.button.primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(98,77,220,.28); }
input, select { min-height: 42px; border-color: #dce1ee; border-radius: 9px; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(112,87,232,.13); }
.notice { border-radius: 12px; box-shadow: 0 8px 22px rgba(38,44,89,.05); }
.operation-tab, .config-group, .segmented { border-radius: 10px; }
.operation-tab:hover, .operation-tab.active { box-shadow: 0 5px 14px rgba(82,63,190,.08); }
.provider-row { transition: background .16s ease; }
.provider-row:hover, .provider-row.selected { background: #f7f5ff; }
.provider-icon { border-radius: 12px; }
.support-fab {
    position: fixed; z-index: 20; right: 26px; bottom: 24px;
    display: inline-flex; align-items: center; gap: 9px; min-height: 52px;
    padding: 0 19px; border: 1px solid rgba(255,255,255,.36); border-radius: 999px;
    color: #fff; background: linear-gradient(115deg,#1eba78,#13a98f 54%,#127eaa);
    box-shadow: 0 12px 30px rgba(18,151,121,.32); font-size: 14px; font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease;
}
.support-fab:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(18,151,121,.40); }
.support-fab svg { width: 20px; height: 20px; }
.support-settings {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.9fr); gap: 24px;
    padding: clamp(22px,4vw,38px); border: 1px solid var(--line); border-radius: 20px;
    background: linear-gradient(135deg,rgba(255,255,255,.98),rgba(245,247,255,.96));
    box-shadow: 0 16px 40px rgba(38,44,89,.08);
}
.support-copy h3 { margin: 14px 0 8px; font-size: 21px; letter-spacing: -.3px; }
.support-copy p { max-width: 490px; color: var(--muted); line-height: 1.65; }
.support-copy .muted { font-size: 13px; }
.support-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: linear-gradient(145deg,#34d9a8,#127fbb); box-shadow: 0 9px 20px rgba(24,168,137,.22); }
.support-icon svg { width: 25px; height: 25px; }
.support-form { display: grid; align-content: center; gap: 16px; padding: 22px; border: 1px solid #e3e6f2; border-radius: 15px; background: #fff; }
.support-form label small { line-height: 1.5; }
@media (max-width: 760px) {
    .main { padding-top: 20px; }
    .support-fab { right: 16px; bottom: 16px; min-height: 49px; padding: 0 16px; }
    .support-settings { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
    .support-form { padding: 17px; }
}

/* Operator owned agent credentials */
.stats .stat-text { max-width: 100%; overflow-wrap: anywhere; font-size: 20px; line-height: 1.2; letter-spacing: -.3px; }
.credential-card {
    display: grid; gap: 12px; padding: 18px 20px; border: 1px solid #e1e6f2;
    border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(38,44,89,.055);
}
.credential-card > p { margin: 0 0 2px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.credential-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-width: 0; padding: 12px 13px; border: 1px solid #e7eaf3; border-radius: 11px;
    background: linear-gradient(100deg,#fafaff,#f5fbfb);
}
.credential-row > div { display: grid; gap: 6px; min-width: 0; }
.credential-row span { color: #626b83; font-size: 12px; font-weight: 750; }
.credential-row code { padding: 0; background: none; color: #242347; font-size: 12px; overflow-wrap: anywhere; user-select: all; }
.credential-row .button { flex: 0 0 auto; }
.flash-credentials { width: 100%; margin-top: 12px; }
@media (max-width: 760px) {
    .credential-row { align-items: stretch; flex-direction: column; }
    .credential-row .button { width: 100%; }
}
.credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credential-heading > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
@media (max-width: 760px) { .credential-heading { align-items: stretch; flex-direction: column; } .credential-heading .button { width: 100%; } }
