* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #171819;
    color: #e9edf2;
    min-height: 100vh;
}
:root {
    --admin-bg: #171819;
    --admin-surface: #202224;
    --admin-surface-2: #282b2f;
    --admin-line: #3a3f46;
    --admin-muted: #8c949f;
    --admin-text: #e9edf2;
    --admin-soft: #c7cdd5;
    --admin-blue: #3aa0ff;
    --admin-blue-soft: rgba(58, 160, 255, 0.16);
    --admin-green: #54c6a0;
    --admin-disabled: #5f6670;
}
.icon-sprite {
    display: none;
}
.app-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
}
.tabs-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: #202123;
    border-right: 1px solid var(--admin-line);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid var(--admin-line);
}
.sidebar-brand-text {
    min-width: 0;
}
.sidebar-brand-title {
    color: var(--admin-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.sidebar-brand-subtitle {
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 12px;
}
.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 10px 16px;
}
.sidebar-section {
    width: 100%;
}
.sidebar-section + .sidebar-section {
    margin-top: 13px;
}
.sidebar-section-title {
    padding: 0 10px 7px;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}
.tabs-sidebar .tab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 7px;
    line-height: 1.3;
    color: var(--admin-soft);
    font-size: 14px;
    transition: all 0.2s;
}
.tabs-sidebar .tab + .tab {
    margin-top: 2px;
}
.tabs-sidebar .tab:hover {
    background: rgba(255, 255, 255, 0.045);
    color: var(--admin-text);
}
.tabs-sidebar .tab.disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.tabs-sidebar .tab.disabled:hover {
    background: transparent;
    color: var(--admin-soft);
}
.tabs-sidebar .tab.active {
    border-color: rgba(58, 160, 255, 0.35);
    background: var(--admin-blue-soft);
    color: #ffffff;
}
.tab-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: var(--admin-muted);
    fill: none;
    pointer-events: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tab.active .tab-icon {
    color: var(--admin-blue);
}
.tab-label {
    display: block;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
.main-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-width: 0;
    min-height: 100vh;
    background: var(--admin-bg);
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid var(--admin-line);
    background: var(--admin-surface);
}
.topbar-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
}
.topbar h1,
#current-section-title {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.casino-context {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
}
.casino-context-group {
    display: inline-flex;
    align-items: stretch;
    max-width: min(280px, 42vw);
    border: 1px solid var(--admin-line);
    border-radius: 8px;
    background: var(--admin-surface-2);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.casino-context-label {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 0 8px;
    border-right: 1px solid var(--admin-line);
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.casino-context-label::before {
    content: '';
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--admin-line);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.casino-context.is-empty:not(.unsupported) .casino-context-select select {
    color: var(--admin-muted);
}
.casino-context.has-casino:not(.unsupported) .casino-context-group {
    border-color: rgba(58, 160, 255, 0.38);
    background: linear-gradient(180deg, rgba(58, 160, 255, 0.14) 0%, rgba(58, 160, 255, 0.06) 100%);
    box-shadow:
        inset 0 1px 0 rgba(58, 160, 255, 0.14),
        0 0 0 1px rgba(58, 160, 255, 0.06);
}
.casino-context.has-casino:not(.unsupported) .casino-context-label {
    border-right-color: rgba(58, 160, 255, 0.24);
    background: rgba(58, 160, 255, 0.1);
    color: #8ec8ff;
}
.casino-context.has-casino:not(.unsupported) .casino-context-label::before {
    background: var(--admin-blue);
    box-shadow: 0 0 0 2px rgba(58, 160, 255, 0.22);
}
.casino-context.has-casino:not(.unsupported) .casino-context-select select {
    color: #ffffff;
    font-weight: 600;
}
.casino-context.has-casino:not(.unsupported) .casino-refresh-btn {
    border-left-color: rgba(58, 160, 255, 0.24);
    color: #8ec8ff;
}
.casino-context.has-casino:not(.unsupported) .select-wrapper::after {
    color: #8ec8ff;
}
.casino-required-hint {
    display: none;
    flex: 0 0 auto;
    color: #f48771;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.casino-context.requires-casino.is-empty:not(.unsupported) .casino-required-hint {
    display: inline-flex;
}
.casino-context-select {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}
.casino-context .select-wrapper {
    min-width: 0;
    height: 100%;
}
.casino-context-select select {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 5px 26px 5px 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--admin-text);
    font-size: 12px;
    line-height: 1.2;
}
.casino-context-select option {
    background: var(--admin-surface-2);
    color: var(--admin-text);
}
.casino-context-select select:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px var(--admin-blue);
}
.casino-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    min-height: 30px;
    padding: 0;
    border: none;
    border-left: 1px solid var(--admin-line);
    border-radius: 0;
    background: transparent;
    color: var(--admin-muted);
}
.casino-refresh-btn:hover,
.casino-context .casino-refresh-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--admin-text);
}
.casino-context .casino-refresh-btn.secondary {
    background: transparent;
    color: var(--admin-muted);
}
.casino-context .select-wrapper::after {
    right: 8px;
    font-size: 9px;
    color: var(--admin-muted);
}
.casino-refresh-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.casino-context-note {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.casino-context.unsupported .casino-context-group {
    opacity: 0.72;
    border-style: dashed;
}
.casino-context.unsupported .casino-context-label {
    color: var(--admin-disabled);
}
.casino-context.unsupported select,
.casino-context.unsupported .casino-refresh-btn {
    color: var(--admin-disabled);
    cursor: not-allowed;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.topbar-user-email {
    max-width: 260px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-logout-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
}
@media (max-width: 1180px) {
    .topbar-user-email {
        display: none;
    }
    #current-section-title {
        max-width: 210px;
    }
}
@media (max-width: 980px) {
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }
    .topbar-main {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
    .casino-context {
        width: 100%;
    }
    .casino-context-group {
        max-width: 100%;
    }
    .topbar-actions {
        justify-self: end;
    }
}
.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}
.select-wrapper {
    position: relative;
    flex: 1;
    min-width: 300px;
}
select {
    width: 100%;
    padding: 10px 35px 10px 10px;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
}
select:focus {
    outline: none;
    border-color: #007acc;
}
.wl-filter-input:focus {
    outline: none;
    border-color: #007acc;
}
.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #e0e0e0;
    font-size: 10px;
}
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--admin-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled) {
    filter: brightness(1.08);
}
button:disabled,
button[data-readonly-lock="1"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}
button.secondary {
    background: var(--admin-surface-2);
    border-color: var(--admin-line);
    color: var(--admin-soft);
    filter: none;
}
button.secondary:hover:not(:disabled) {
    background: #32363b;
    color: var(--admin-text);
}
button.danger-btn,
button.btn-danger {
    background: #9a3030;
    border-color: #b84848;
    color: #fff;
    filter: none;
}
button.danger-btn:hover:not(:disabled),
button.btn-danger:hover:not(:disabled) {
    background: #b03838;
}
button.btn-sm {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 5px;
}
button.btn-block {
    width: 100%;
}
button.btn-grow {
    flex: 1 1 0;
    min-width: 0;
}
button.subtab-btn {
    min-height: auto;
    padding: 8px 12px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--admin-muted);
    font-weight: 600;
    filter: none;
}
button.subtab-btn:hover:not(:disabled) {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.04);
    filter: none;
}
button.subtab-btn.is-active {
    color: var(--admin-green);
    border-bottom-color: var(--admin-green);
}
.modal-actions button {
    min-width: 96px;
}
.pagination-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#game-dropdown-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    min-height: auto;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #e0e0e0;
    font-size: 12px;
    filter: none;
    transition: background 0.2s;
}
#game-dropdown-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}
#game-dropdown-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#games-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    will-change: transform;
}
#games-dropdown > div {
    will-change: background;
}
#games-dropdown::-webkit-scrollbar {
    width: 8px;
}
#games-dropdown::-webkit-scrollbar-track {
    background: #1e1e1e;
}
#games-dropdown::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
#games-dropdown::-webkit-scrollbar-thumb:hover {
    background: #666;
}
.gr-warn-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e05252;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
    margin-top: 1px;
    user-select: none;
}
.gr-warn-badge:hover .gr-warn-tooltip {
    display: block;
}
.gr-warn-tooltip {
    display: none;
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: #3a1a1a;
    color: #ff9090;
    border: 1px solid #e05252;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.content-shell {
    min-width: 0;
    padding: 24px;
    overflow: auto;
}
@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 226px minmax(0, 1fr);
    }
    .sidebar-brand {
        padding: 0 12px;
    }
    .sidebar-brand-subtitle {
        display: none;
    }
    .sidebar-nav {
        padding: 12px 8px 16px;
    }
    .sidebar-section + .sidebar-section {
        margin-top: 12px;
    }
    .sidebar-section-title {
        padding: 0 8px 6px;
        font-size: 10px;
    }
    .tabs-sidebar .tab {
        min-height: 34px;
        padding: 7px 8px;
        font-size: 13px;
    }
    .tab-icon {
        width: 17px;
        font-size: 11px;
    }
    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 0 16px;
    }
    .topbar-main {
        gap: 12px;
        flex-wrap: wrap;
    }
    .casino-context-group {
        max-width: min(100%, 280px);
    }
    .topbar-user-email {
        max-width: 120px;
    }
    .topbar-logout-btn {
        padding: 7px 10px;
    }
    .content-shell {
        padding: 18px;
    }
}
@media (max-width: 560px) {
    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    .sidebar-brand {
        min-height: 58px;
        padding: 0 9px;
    }
    .sidebar-brand-title {
        font-size: 13px;
    }
    .topbar-user-email {
        display: none;
    }
    .topbar {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 12px;
    }
    .topbar-main,
    .casino-context {
        width: 100%;
    }
    .casino-context-group {
        width: 100%;
        max-width: 100%;
    }
    #current-section-title {
        max-width: 100%;
    }
    .sidebar-section-title {
        padding-right: 8px;
        padding-left: 8px;
    }
    .tabs-sidebar .tab {
        font-size: 12px;
        gap: 7px;
        padding-right: 8px;
        padding-left: 8px;
    }
    .content-shell [style*="min-width"],
    .content-shell .input-group,
    .content-shell .select-wrapper,
    .content-shell input,
    .content-shell select,
    .content-shell textarea {
        min-width: 0 !important;
    }
    .content-shell {
        padding: 14px;
    }
}
.status {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    background: #2d2d30;
    border-left: 4px solid #007acc;
    display: none;
    white-space: pre-wrap;
    max-height: 280px;
    overflow: auto;
}
.status.error {
    border-left-color: #d13438;
    background: #3b2426;
}
.status.success {
    border-left-color: #4ec9b0;
    background: #263d3a;
}
.status.warning {
    border-left-color: #dcdcaa;
    background: #3b3a2d;
}
.status.visible {
    display: block;
}
.config-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #252526;
    border-radius: 4px;
    border: 1px solid #3e3e42;
}
.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.info-label {
    font-size: 12px;
    color: #858585;
    text-transform: uppercase;
    font-weight: 600;
}
.info-value {
    font-size: 14px;
    color: #e0e0e0;
}
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge.default {
    background: #dcdcaa;
    color: #000;
}
.badge.custom {
    background: #4ec9b0;
    color: #000;
}
.config-empty-state {
    padding: 28px;
    margin-bottom: 20px;
    border: 1px dashed var(--admin-line);
    border-radius: 8px;
    background: var(--admin-surface);
    text-align: center;
}
.config-empty-title {
    color: var(--admin-text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}
.config-empty-message {
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.5;
}
.editor-container {
    border: 1px solid var(--admin-line);
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
}
.config-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-line);
    background: var(--admin-surface);
}
.config-editor-search {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 220px;
}
.config-editor-search input {
    width: 100%;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--admin-line);
    border-radius: 6px;
    background: var(--admin-surface-2);
    color: var(--admin-text);
    font-size: 12px;
}
.config-editor-search input:focus {
    outline: none;
    border-color: var(--admin-blue);
}
.config-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.config-editor-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.config-editor-status.valid {
    color: var(--admin-green);
}
.config-editor-status.invalid {
    color: #f48771;
}
.config-editor-changes {
    max-width: 280px;
    overflow: hidden;
    color: #dcdcaa;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.config-editor-icon-btn {
    min-width: 30px;
    padding-inline: 0;
}
.config-editor-body .CodeMirror {
    height: calc(100vh - 380px);
}
.editor-container .CodeMirror {
    height: calc(100vh - 380px);
    min-height: 400px;
    font-size: 13px;
}
.config-editor-invalid .CodeMirror {
    box-shadow: inset 0 0 0 1px rgba(244, 135, 113, 0.35);
}
.config-json-error-line {
    background: rgba(244, 135, 113, 0.14) !important;
}
.config-key-changed {
    background: rgba(220, 220, 170, 0.18);
    border-left: 2px solid #dcdcaa;
}
.CodeMirror-foldgutter {
    width: 12px;
}
.CodeMirror-foldmarker {
    color: #858585;
}
.loading {
    text-align: center;
    padding: 40px;
    color: #858585;
}
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.visible {
    display: flex;
}
.modal-content {
    background: #2d2d30;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #3e3e42;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.modal-content h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #e0e0e0;
}
.modal-content p {
    margin-bottom: 20px;
    color: #b0b0b0;
    line-height: 1.5;
}
.modal-content .input-group {
    margin-bottom: 20px;
}
.modal-content .input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #858585;
}
.modal-content .input-group input {
    width: 100%;
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}
.modal-content .input-group input:focus {
    outline: none;
    border-color: #007acc;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
/* ── Game Info tab ─────────────────────────────── */
.gi-page { padding:28px 28px 48px; }
.gi-search-bar { display:flex; align-items:center; gap:10px; margin-bottom:28px; flex-wrap:wrap; }
.gi-select-wrap { position:relative; }
.gi-select-wrap::after { content:'▾'; position:absolute; right:10px; top:50%; transform:translateY(-50%); pointer-events:none; color:#888; font-size:14px; }
.gi-select { padding:8px 32px 8px 12px; background:#252526; border:1px solid #3e3e42; border-radius:6px; color:#d4d4d4; font-size:14px; appearance:none; cursor:pointer; min-width:180px; width:auto; transition:border-color .15s; }
.gi-select:focus { outline:none; border-color:#007acc; }
.gi-input { padding:8px 12px; background:#252526; border:1px solid #3e3e42; border-radius:6px; color:#d4d4d4; font-size:14px; width:340px; transition:border-color .15s; }
.gi-input:focus { outline:none; border-color:#007acc; }
.gi-alert { border-radius:8px; padding:12px 16px; font-size:13px; margin-bottom:16px; line-height:1.5; }
.gi-alert-error { background:rgba(240,70,60,.1); border:1px solid rgba(240,70,60,.3); color:#f87171; }
.gi-alert-warn { background:rgba(200,110,20,.1); border:1px solid rgba(220,130,30,.35); color:#fbbf68; }
.gi-result-wrap { display:flex; gap:24px; align-items:flex-start; }
.gi-thumb-card { flex:0 0 180px; height:240px; border-radius:10px; overflow:hidden; background:#1a1a1a; border:1px solid #2d2d2d; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.gi-thumb-link { display:block; width:100%; height:100%; }
.gi-thumb { width:100%; height:100%; object-fit:cover; display:block; transition:opacity .2s; }
.gi-thumb:hover { opacity:.82; }
.gi-thumb-na { color:#555; font-size:12px; text-align:center; padding:16px; }
.gi-panel { flex:1; min-width:0; }
.gi-game-title { font-size:24px; font-weight:600; color:#e8e8e8; margin:0 0 4px; line-height:1.25; }
.gi-game-id { font-size:12px; color:#555; font-family:monospace; margin-bottom:22px; }
.gi-info-cols { display:flex; gap:28px; flex-wrap:wrap; margin-bottom:22px; }
.gi-info-cols .gi-section { flex:1; min-width:160px; }
.gi-section { margin-bottom:22px; }
.gi-section-head { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; color:#4a4a4a; padding-bottom:7px; border-bottom:1px solid #252525; margin-bottom:2px; }
.gi-row { display:flex; align-items:baseline; gap:12px; padding:6px 0; border-bottom:1px solid #1c1c1c; }
.gi-row:last-child { border-bottom:none; }
.gi-label { font-size:13px; color:#5c5c5c; flex:0 0 130px; }
.gi-value { font-size:14px; color:#c8c8c8; }
.gi-badge-on { color:#4ec994; font-weight:600; }
.gi-badge-on::before { content:'● '; }
.gi-badge-off { color:#f47067; font-weight:600; }
.gi-badge-off::before { content:'● '; }
.gi-tags { display:flex; flex-wrap:wrap; gap:4px; }
.gi-tag { display:inline-block; padding:2px 8px; background:#1e2630; border:1px solid #2e3d52; border-radius:4px; font-size:12px; color:#7fa8cc; font-family:monospace; }
.gi-tag-none { font-size:13px; color:#3a3a3a; font-style:italic; }
.gi-muted { font-size:14px; color:#4a4a4a; font-style:italic; }
.gi-entries-tbl { border-collapse:collapse; width:100%; }
.gi-entries-tbl th { text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:#4a4a4a; padding:0 20px 8px 0; border-bottom:1px solid #252525; }
.gi-entries-tbl td { padding:7px 20px 7px 0; font-size:14px; color:#b0b0b0; border-bottom:1px solid #1c1c1c; }
.gi-entries-tbl tbody tr:last-child td { border-bottom:none; }
.gi-entries-tbl tbody tr:hover td { color:#e0e0e0; }
.gi-vis-yes { color:#4ec994 !important; font-weight:500; }
.gi-vis-no { color:#f47067 !important; }
.gi-spinner { display:inline-block; width:13px; height:13px; border:2px solid #2d2d2d; border-top-color:#007acc; border-radius:50%; animation:gi-spin .7s linear infinite; vertical-align:middle; margin-right:6px; }
@keyframes gi-spin { to { transform:rotate(360deg); } }

/* ── Player Balance tab ─────────────────────────── */
#player-balance-tab .input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #858585;
}
#player-balance-tab .input-group input {
    width: 100%;
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}
#player-balance-tab .input-group input:focus {
    outline: none;
    border-color: #007acc;
}

/* ── Bonuses tab ───────────────────────────────── */
#bonuses-tab .bonus-filters-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
#bonuses-tab .bonus-filter-control {
    min-width: 0;
}
#bonuses-tab .bonus-filter-type {
    flex: 1 1 220px;
    max-width: 260px;
}
#bonuses-tab .bonus-filter-id {
    flex: 0 1 160px;
}
#bonuses-tab .bonus-filter-name {
    flex: 2 1 260px;
}
#bonuses-tab .bonus-filter-type .select-wrapper {
    min-width: 0;
}
#bonuses-tab .input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #858585;
}
#bonuses-tab .input-group input,
#bonuses-tab .input-group select {
    width: 100%;
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}
#bonuses-tab .input-group select {
    padding-right: 35px;
}
#bonuses-tab .input-group input:focus,
#bonuses-tab .input-group select:focus {
    outline: none;
    border-color: #007acc;
}
#bonuses-tab .bonus-sort-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
#bonuses-tab .bonus-sort-label {
    color: #858585;
    font-size: 12px;
    font-weight: 600;
}
#bonuses-tab .bonus-sort-header.is-sorted .bonus-sort-label {
    color: #d7ba7d;
}
#bonuses-tab .bonus-sort-controls {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
#bonuses-tab .bonus-sort-btn {
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    background: #252526;
    color: #9a9a9a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    filter: none;
}
#bonuses-tab .bonus-sort-btn:hover:not(:disabled) {
    background: #32363b;
    color: #e0e0e0;
    border-color: #4a4f56;
    filter: none;
}
#bonuses-tab .bonus-sort-btn.is-active {
    border-color: #007acc;
    background: rgba(0, 122, 204, 0.18);
    color: #9cdcfe;
}

.environment-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid #3e3e42;
}
.environment-chip.env-local {
    background: #24303b;
    color: #9cdcfe;
    border-color: #355a73;
}
.environment-chip.env-staging {
    background: #3b3424;
    color: #dcdcaa;
    border-color: #6b5a2a;
}
.environment-chip.env-prod {
    background: #3b2426;
    color: #f48771;
    border-color: #8a3a3a;
}
.audit-notice {
    display: none;
    margin: 0 24px 12px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #263d3a;
    border: 1px solid #355a52;
    color: #b7e7d8;
    font-size: 13px;
}
.audit-notice.visible {
    display: block;
}
.tab-page-header {
    margin-bottom: 18px;
}
.tab-page-description {
    margin: 0;
    color: #9a9a9a;
    font-size: 14px;
    line-height: 1.5;
}
.danger-confirm-modal h2 {
    color: #f48771;
}
.admin-empty-state {
    padding: 28px;
    border: 1px dashed #3e3e42;
    border-radius: 8px;
    background: #252526;
    text-align: center;
}
.admin-empty-title {
    font-size: 16px;
    color: #d4d4d4;
    margin-bottom: 8px;
}
.admin-empty-message {
    font-size: 13px;
    color: #858585;
    margin-bottom: 14px;
}
.admin-loading-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: #858585;
}
.admin-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #2d2d30;
    text-align: left;
    vertical-align: top;
}
.admin-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #858585;
}
.copy-chip-btn {
    margin-left: 6px;
}
.bonus-admin-card {
    background: #202224;
    border: 1px solid var(--admin-line);
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 20px;
}
.bonus-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.bonus-admin-header h3 {
    font-size: 18px;
    line-height: 1.25;
}
.bonus-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--admin-line);
}
.bonus-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.65fr) minmax(260px, 2.4fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
}
.bonus-filter-bar .input-group {
    min-width: 0;
    margin: 0;
}
.bonus-filter-bar label {
    display: block;
    margin-bottom: 6px;
    color: var(--admin-muted);
    font-size: 12px;
}
.bonus-filter-bar select,
.bonus-filter-bar input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}
.bonus-filter-bar select:focus,
.bonus-filter-bar input:focus {
    outline: none;
    border-color: #007acc;
}
.bonus-filter-bar button {
    min-height: 44px;
    white-space: nowrap;
}
.bonus-table-shell {
    overflow: auto;
    max-height: calc(100vh - 300px);
    background: #1b1c1e;
    border: 1px solid var(--admin-line);
    border-radius: 6px;
}
.bonus-templates-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.bonus-templates-table th,
.bonus-templates-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #2d2f33;
    text-align: left;
    vertical-align: middle;
}
.bonus-templates-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #202224;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}
.bonus-templates-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}
.bonus-templates-table .copy-chip-btn {
    margin: 0;
}
.bonus-col-id {
    width: 130px;
}
.bonus-col-name {
    width: 280px;
}
.bonus-col-casino {
    width: 110px;
}
.bonus-col-type {
    width: 120px;
}
.bonus-col-details {
    width: 300px;
}
.bonus-col-value {
    width: 130px;
}
.bonus-col-actions {
    width: 150px;
}
.bonus-cell-stack,
.bonus-details-cell,
.bonus-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.bonus-details-cell span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.35;
}
.bonus-id,
.bonus-value {
    color: #f4f7fb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    white-space: nowrap;
}
.bonus-value {
    color: #54d8bb;
}
.bonus-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.35;
}
.bonus-name-cell span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}
.bonus-casino {
    color: #d7ba7d;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.bonus-type-badge,
.bonus-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.bonus-type-badge {
    background: var(--bonus-type-color, #1e3a5f);
}
.bonus-type-badge.is-cash {
    background: #3f6f36;
}
.bonus-type-badge.is-sports {
    background: #8c6f2e;
}
.bonus-status-badge {
    flex: 0 0 auto;
    background: #6c3333;
}
.bonus-sync-state {
    color: var(--admin-muted);
    font-size: 12px;
    white-space: nowrap;
}
.bonus-row-actions {
    justify-content: flex-start;
}
.bonus-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}
@media (max-width: 900px) {
    .bonus-admin-header {
        align-items: stretch;
        flex-direction: column;
    }
    .bonus-filter-bar {
        grid-template-columns: 1fr;
    }
    .bonus-table-shell {
        max-height: none;
    }
}
.admin-filter-bar,
.admin-filter-bar-ready {
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.role-blocked {
    opacity: 0.55;
}
.bonus-inactive-toggle { display: flex; align-items: center; gap: 6px; font-weight: normal; }
.bonus-inactive-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.bonus-templates-table th.bonus-col-actions, .bonus-templates-table td:last-child { position: sticky; right: 0; background: #252526; }
.bonus-verdict-ok { color: #4e8c3f; }
.bonus-verdict-bad { color: #d13438; }
.bonus-verdict-unknown { color: #858585; }
.bonus-status-badge.is-warn { background: #4a3b12; color: #e6b450; }
/* the verdict chip reuses .bonus-status-badge, whose default red background would
   contradict the verdict colour above */
.bonus-status-badge.bonus-verdict-ok { background: #2f4a29; }
.bonus-status-badge.bonus-verdict-unknown { background: #3a3a3a; }
.bonus-status-badge:empty { display: none; }

/* Casino Settings tab: a settings page — one section per product area, its title and note on the left,
   checkboxes and value inputs on the right. Inputs are styled here on purpose: the shared .bonus-filter-bar
   rules size every input as a 44px text field, which turns checkboxes into 44px squares. */
#casino-settings-tab #cs-meta {
    white-space: normal;
    text-align: right;
    max-width: 60%;
    line-height: 1.4;
}
#casino-settings-tab #cs-meta.gi-alert-warn {
    padding: 6px 10px;
    border-radius: 4px;
}
#casino-settings-tab .cs-section {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px 40px;
    padding: 20px 0;
    border-top: 1px solid var(--admin-line);
}
#casino-settings-tab .cs-section:first-child {
    padding-top: 4px;
    border-top: 0;
}
#casino-settings-tab .cs-section-head h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--admin-text);
}
#casino-settings-tab .cs-section-head p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--admin-muted);
}
#casino-settings-tab .cs-section-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
#casino-settings-tab .cs-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#casino-settings-tab .cs-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    color: var(--admin-text);
    cursor: pointer;
}
#casino-settings-tab .cs-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--admin-blue);
    cursor: pointer;
}
#casino-settings-tab .cs-check-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#casino-settings-tab .cs-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px 16px;
    max-width: 720px;
}
#casino-settings-tab .cs-field {
    min-width: 0;
}
#casino-settings-tab .cs-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--admin-muted);
}
#casino-settings-tab .cs-field input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}
#casino-settings-tab .cs-field input:focus {
    outline: none;
    border-color: #007acc;
}
#casino-settings-tab .cs-field .cs-help {
    display: block;
    margin-top: 5px;
}
#casino-settings-tab .cs-help {
    font-size: 12px;
    line-height: 1.4;
    color: var(--admin-muted);
}
#casino-settings-tab .cs-actions {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-line);
}
@media (max-width: 900px) {
    #casino-settings-tab #cs-meta {
        max-width: none;
        text-align: left;
    }
    #casino-settings-tab .cs-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* Rewards tab: same checkbox fix as Casino Settings (.bonus-filter-bar input sets min-height: 44px). */
#rewards-tab .rw-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
#rewards-tab .rw-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    cursor: pointer;
}
#rewards-tab .rw-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
#rewards-tab .rw-days {
    display: block;
}
#rewards-tab .rw-day-col {
    width: 56px;
}
#rewards-tab .rw-fs-template-col {
    min-width: 220px;
}
#rewards-tab .rw-day-fs-template {
    width: 100%;
    max-width: 280px;
}
#rewards-tab .rw-welcome-fs-block {
    margin: 8px 0 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}
#rewards-tab .rw-actions {
    margin-top: 12px;
}
#rewards-tab .rw-note {
    padding: 8px 12px;
    border-radius: 4px;
}
/* Rewards tab: the meta line is long ("… not configured in revision N yet — …"): wrap it like #cs-meta. */
#rewards-tab #rw-meta {
    white-space: normal;
    text-align: right;
    max-width: 60%;
    line-height: 1.4;
}
@media (max-width: 900px) {
    #rewards-tab #rw-meta {
        max-width: none;
        text-align: left;
    }
}
/* Shop tab: a list like Bonus Templates (read-only rows, per-row actions) and a modal editor. */
#shop-tab #sp-meta {
    display: block;
    margin: -4px 0 12px;
    white-space: normal;
    line-height: 1.4;
}
#shop-tab .sp-intro {
    margin-bottom: 12px;
}
#shop-tab .sp-note {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 4px;
}
#shop-tab .sp-actions {
    margin-top: 12px;
}
#shop-tab .sp-table {
    min-width: 1050px;
}
#shop-tab .sp-col-type {
    width: 140px;
}
#shop-tab .sp-col-price {
    width: 150px;
}
#shop-tab .sp-col-badges {
    width: 200px;
}
#shop-tab .sp-col-sort {
    width: 70px;
}
#shop-tab .sp-col-actions {
    width: 240px;
}
#shop-tab tr.sp-group td {
    position: static;
    padding: 8px 16px;
    background: #202224;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
#shop-tab .sp-coins {
    color: #ffffff;
    font-weight: 700;
}
#shop-tab .sp-key {
    display: block;
    margin-top: 4px;
    color: var(--admin-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}
#shop-tab .sp-price {
    color: #54d8bb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
}
#shop-tab .sp-was {
    margin-left: 8px;
    color: var(--admin-muted);
    font-size: 12px;
}
#shop-tab .sp-sort {
    color: var(--admin-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#shop-tab .sp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#shop-tab tr.sp-inactive td:not(:last-child) {
    opacity: 0.55;
}
#shop-tab .sp-none {
    padding: 32px;
    color: var(--admin-muted);
    text-align: center;
}
.bonus-type-badge.is-offer {
    background: #5b3f8c;
}
.bonus-type-badge.is-package {
    background: #1e3a5f;
}
.bonus-type-badge.is-unknown {
    background: #6c3333;
}
.bonus-status-badge.is-off {
    background: #3a3a3a;
    color: #c8c8c8;
}
.bonus-status-badge.is-flash {
    background: #4a3b12;
    color: #f2c94c;
}
#sp-modal .sp-m-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
#sp-modal .input-group {
    margin-bottom: 16px;
}
#sp-modal .sp-hint {
    display: block;
    margin-top: 4px;
    color: #858585;
    font-size: 11px;
    line-height: 1.35;
}
#sp-modal .sp-m-checks {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
#sp-modal .sp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
}
#sp-modal .sp-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
}
#sp-modal .sp-m-preview {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    background: #1e1e1e;
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.4;
}
#sp-modal .sp-note {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}
#sp-modal .sp-m-error {
    margin-bottom: 12px;
    color: #f48771;
    font-size: 13px;
}
@media (max-width: 700px) {
    #sp-modal .sp-m-grid {
        grid-template-columns: 1fr;
    }
}
#danger-confirm-message {
    white-space: pre-line;
}
