: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; }
.section-head div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.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: 14px; margin-top: 20px; }
.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: 110px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.stats article:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(23, 35, 30, .07);
    border-color: #bcd5c8;
}
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-head span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-head svg { width: 17px; height: 17px; color: var(--accent); }
.stat-body { display: flex; flex-direction: column; gap: 2px; }
.stat-body strong { font-size: 32px; line-height: 1.1; font-weight: 800; color: var(--ink); }
.stat-body small { color: var(--muted); font-size: 11.5px; font-weight: 500; margin-top: 2px; }

.dashboard-actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0 30px; }
.dashboard-action-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.dashboard-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(23, 35, 30, .1);
    border-color: var(--accent);
}
.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.action-icon svg { width: 22px; height: 22px; }
.action-text { display: flex; flex-direction: column; gap: 4px; }
.action-text strong { font-size: 14.5px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.action-text strong svg { width: 15px; height: 15px; color: var(--accent); transition: transform 0.15s ease; }
.dashboard-action-card:hover .action-text strong svg { transform: translateX(3px); }
.action-text span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.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; flex-wrap: wrap; 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; }
.credential-grid { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.credential-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: #13221b; border-radius: 4px; }
.credential-label { flex: none; width: 92px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #9fd6bb; }
.credential-value { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; color: #d7f8e9; }
.credential-row .button { flex: none; min-height: 28px; padding: 0 10px; border-color: #2d4a3d; background: #1c3229; color: #d7f8e9; }
.credential-row .button:hover { border-color: var(--accent); color: white; }
@media (max-width: 760px) {
    .credential-row { flex-wrap: wrap; }
    .credential-value { flex-basis: 100%; order: 3; }
}

/* Catalog & Meus Jogos Styles */
.catalog-hero {
    position: relative;
    overflow: hidden;
    margin: 20px 0 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #10241b 0%, #173629 100%);
    border: 1px solid #204d3b;
    border-radius: 10px;
    color: #eaf4ef;
    box-shadow: 0 4px 20px rgba(10, 30, 20, 0.08);
}
.catalog-hero-content { position: relative; z-index: 1; }
.catalog-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(8, 125, 111, 0.35);
    border: 1px solid rgba(110, 231, 183, 0.25);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6ee7b7;
    margin-bottom: 10px;
}
.catalog-badge svg { width: 14px; height: 14px; }
.catalog-hero h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.catalog-hero p {
    margin: 0 0 16px;
    max-width: 680px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #b5cebf;
}
.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}
.catalog-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 12px;
    color: #eaf4ef;
}
.catalog-chip svg { width: 14px; height: 14px; color: #6ee7b7; flex-shrink: 0; }
.catalog-chip strong { color: #ffffff; font-weight: 750; }
.chip-label { color: #9ab4a5; font-size: 11.5px; }
.chip-val {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 11.5px;
    color: #d7f8e9;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chip-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: -2px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #d7f8e9;
    cursor: pointer;
    transition: all 0.15s ease;
}
.chip-copy-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.chip-copy-btn svg { width: 12px; height: 12px; }
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 2s infinite;
    display: inline-block;
    flex-shrink: 0;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 14px;
}
.catalog-search-wrap {
    position: relative;
    flex: 1 1 280px;
    max-width: 440px;
}
.catalog-search-wrap svg.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}
.catalog-search-wrap input {
    width: 100%;
    min-height: 40px;
    padding: 0 36px 0 36px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.catalog-search-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 125, 111, 0.15);
}
.catalog-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: #eef2ef;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
}
.catalog-search-clear:hover { background: #dfe5e1; color: var(--ink); }
.catalog-search-clear svg { width: 13px; height: 13px; }
.catalog-results-info {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.catalog-results-info strong { color: var(--ink); }

.provider-filter { margin: 8px 0 22px; padding-bottom: 2px; display: flex; flex-wrap: wrap; gap: 7px; }
.provider-filter a { min-height: 34px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: all 0.15s ease; }
.provider-filter a:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.provider-filter a.active { border-color: var(--accent); color: white; background: var(--accent); box-shadow: 0 2px 8px rgba(8, 125, 111, 0.28); }
.provider-filter a small { padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 10.5px; font-weight: 700; }
.provider-filter a.active small { background: rgba(255,255,255,.24); color: white; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 36px; }
.game-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(23, 35, 30, .11); border-color: #a3c4b5; }
.game-cover { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #0c1813; }
.game-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-cover img { transform: scale(1.05); }
.game-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 19, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}
.game-card:hover .game-cover-overlay { opacity: 1; }
.game-cover-overlay form { margin: 0; }
.game-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 750;
    font-size: 12.5px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(8, 125, 111, 0.5);
    transition: transform 0.15s ease, background 0.15s ease;
}
.game-play-btn:hover { background: var(--accent-strong); transform: scale(1.04); }
.game-play-btn svg { width: 14px; height: 14px; fill: currentColor; }

.game-provider-tag {
    position: absolute;
    left: 7px;
    top: 7px;
    z-index: 1;
    max-width: calc(100% - 14px);
    padding: 3px 7px;
    overflow: hidden;
    border-radius: 4px;
    color: #fff;
    background: rgba(15, 23, 19, .82);
    font-size: 9.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .04em;
    backdrop-filter: blur(4px);
}
.game-type-tag {
    position: absolute;
    right: 7px;
    top: 7px;
    z-index: 1;
    padding: 3px 6px;
    border-radius: 4px;
    color: #fff;
    background: rgba(8, 125, 111, .85);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    backdrop-filter: blur(4px);
}
.game-info { padding: 10px 11px; display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: space-between; }
.game-info-main { display: grid; gap: 2px; }
.game-info-main strong, .game-info-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-info-main strong { font-size: 13px; font-weight: 750; color: var(--ink); }
.game-info-main small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.game-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 6px; border-top: 1px solid #edf1ee; }
.game-code-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 4px;
    background: #f1f5f2;
    border: 1px solid #dce4df;
    color: #43544b;
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: calc(100% - 34px);
}
.game-code-pill:hover { background: #e3ede7; border-color: var(--accent); color: var(--accent-strong); }
.game-code-pill code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 10px; }
.game-code-pill svg { width: 11px; height: 11px; flex-shrink: 0; }
.game-mini-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    background: #eef6f2;
    border: 1px solid #bedad0;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.game-mini-launch:hover { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.game-mini-launch svg { width: 13px; height: 13px; }

.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; }

/* Operation Credentials & Webhook Card */
.operation-credentials-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px 26px;
    margin: 18px 0 28px;
    box-shadow: 0 2px 10px rgba(23, 35, 30, 0.04);
}
.operation-credentials-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf1ee;
}
.credentials-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.credentials-badge-row .catalog-badge {
    margin-bottom: 0;
}
.operation-credentials-head h2 {
    margin: 0 0 5px;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.operation-credentials-head p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.credentials-box-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 24px;
}
.credential-item-card {
    background: #f8faf8;
    border: 1px solid #dce4df;
    border-radius: 7px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.credential-item-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-strong);
}
.credential-item-label svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}
.credential-field-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #c8d5cd;
    border-radius: 6px;
    padding: 3px 5px 3px 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.credential-field-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 125, 111, 0.12);
}
.credential-field-row .credential-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0;
    min-height: 30px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
}
.credential-field-row .credential-input[type="password"] {
    letter-spacing: 0.12em;
    font-size: 14px;
}
.credential-action-btn {
    flex: none;
    min-height: 29px;
    padding: 0 9px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid #d2ded7;
    border-radius: 4px;
    background: #f4f8f6;
    color: #244b3e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}
.credential-action-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
}
.credential-action-btn svg {
    width: 12px;
    height: 12px;
}
.webhook-edit-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1ee;
}
.webhook-form-header {
    margin-bottom: 10px;
}
.webhook-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
}
.webhook-label svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}
.webhook-help {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}
.webhook-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.webhook-input-wrapper {
    position: relative;
    flex: 1;
}
.webhook-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--muted);
    pointer-events: none;
}
.webhook-input-wrapper input {
    width: 100%;
    min-height: 38px;
    padding: 0 12px 0 36px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    background: #ffffff;
    border: 1px solid #c8d5cd;
    border-radius: 6px;
    color: var(--ink);
}
.webhook-input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 125, 111, 0.14);
}
.webhook-save-btn {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 750;
    border-radius: 6px;
}

@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)); }
    .credentials-box-grid { grid-template-columns: 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, .dashboard-actions-grid, .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; }
    .credentials-box-grid { grid-template-columns: 1fr; }
    .webhook-input-group { flex-direction: column; align-items: stretch; }
    .webhook-save-btn { width: 100%; }
    .operation-credentials-head { flex-direction: column; align-items: stretch; }
    .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; }
    .catalog-hero { padding: 18px 16px; }
    .catalog-hero h2 { font-size: 18px; }
    .catalog-chip { font-size: 11.5px; padding: 0 10px; }
    .chip-val { max-width: 140px; }
    .catalog-controls { flex-direction: column; align-items: stretch; }
    .catalog-search-wrap { max-width: 100%; }
    .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .game-card { border-radius: 8px; }
    .game-info strong { font-size: 12px; }
    .game-info small { font-size: 10.5px; }
    .game-play-btn { padding: 7px 12px; font-size: 11px; }
}
