/* ============================================================
   Casino Console — dark operator theme
   Loaded after Filament's stylesheet (PanelsRenderHook::STYLES_AFTER)
   ============================================================ */

:root {
    --cc-bg: #0a0e13;
    --cc-bg-2: #070b0f;
    --cc-panel: #101720;
    --cc-panel-2: #0d131a;
    --cc-border: #1d2833;
    --cc-border-soft: #16202a;
    --cc-text: #e6edf3;
    --cc-muted: #8b98a5;
    --cc-accent: #10b981;
    --cc-accent-soft: rgba(16, 185, 129, .12);
}

html.dark,
html.dark body {
    background-color: var(--cc-bg);
    color: var(--cc-text);
}

html.dark .fi-layout {
    background-color: var(--cc-bg);
}

/* ---------- sidebar ---------- */
html.dark .fi-sidebar {
    background-color: var(--cc-bg-2);
    border-right: 1px solid var(--cc-border);
}

html.dark .fi-sidebar-header {
    border-bottom: 1px solid var(--cc-border-soft);
    padding-top: .5rem;
    padding-bottom: .5rem;
}

html.dark .fi-sidebar .fi-brand-name {
    font-weight: 700;
    letter-spacing: -.01em;
}

html.dark .fi-sidebar-group-label {
    font-size: .6875rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #64748b;
}

html.dark .fi-sidebar-item-btn {
    border-radius: .5rem;
    padding-top: .45rem;
    padding-bottom: .45rem;
}

html.dark .fi-sidebar-item-btn:hover {
    background-color: #131c25;
}

html.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
html.dark .fi-sidebar-item-btn[aria-current="page"] {
    background-color: var(--cc-accent-soft);
    box-shadow: inset 2px 0 0 var(--cc-accent);
}

html.dark .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #d1fae5;
    font-weight: 600;
}

/* ---------- topbar ---------- */
html.dark .fi-topbar > nav {
    background-color: var(--cc-bg-2);
    border-bottom: 1px solid var(--cc-border);
    box-shadow: none;
}

/* ---------- content ---------- */
html.dark .fi-main {
    background-color: var(--cc-bg);
}

html.dark .fi-page-header-heading-title {
    font-weight: 700;
    letter-spacing: -.01em;
}

html.dark .fi-page-sub-navigation {
    border-bottom: 1px solid var(--cc-border);
}

/* ---------- cards / sections / tables ---------- */
html.dark .fi-section,
html.dark .fi-ta-ctn,
html.dark .fi-wi-stats-overview-stat,
html.dark .fi-modal-window {
    background-color: var(--cc-panel);
    border: 1px solid var(--cc-border);
    border-radius: .75rem;
    box-shadow: none;
}

html.dark .fi-section-header {
    border-bottom: 1px solid var(--cc-border-soft);
}

/* dense tables */
html.dark .fi-ta-table {
    font-size: .8125rem;
}

html.dark .fi-ta-table > thead > tr > th {
    background-color: var(--cc-panel-2);
    color: var(--cc-muted);
    font-size: .6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding-top: .55rem;
    padding-bottom: .55rem;
}

html.dark .fi-ta-table > tbody > tr > td {
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-color: var(--cc-border-soft);
}

html.dark .fi-ta-table > tbody > tr:hover {
    background-color: #131c25;
}

/* KPI cards */
html.dark .fi-wi-stats-overview-stat-label {
    font-size: .6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cc-muted);
}

html.dark .fi-wi-stats-overview-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

/* buttons */
html.dark .fi-btn {
    border-radius: .5rem;
    font-weight: 600;
}

html.dark .fi-btn-color-primary {
    background-color: var(--cc-accent);
}

/* inputs */
html.dark .fi-input,
html.dark .fi-select-input,
html.dark .fi-fo-field-wrp input,
html.dark .fi-fo-field-wrp textarea {
    background-color: var(--cc-panel-2);
    border-color: var(--cc-border);
}

/* scrollbar */
html.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #1f2b37;
    border-radius: 999px;
}

html.dark ::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
   Demo Play grid
   ============================================================ */
.dp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dp-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cc-text);
    margin: 0 0 .25rem;
}

.dp-sub {
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--cc-muted);
    max-width: 68ch;
    margin: 0;
}

.dp-count {
    flex: none;
    font-size: .75rem;
    font-weight: 600;
    color: var(--cc-accent);
    background: var(--cc-accent-soft);
    border: 1px solid rgba(16, 185, 129, .25);
    border-radius: 999px;
    padding: .3rem .7rem;
}

.dp-empty {
    padding: 2.5rem;
    text-align: center;
    color: var(--cc-muted);
    border: 1px dashed var(--cc-border);
    border-radius: .75rem;
    background: var(--cc-panel-2);
    font-size: .875rem;
}

.dp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: .875rem;
}

.dp-card {
    background: var(--cc-panel);
    border: 1px solid var(--cc-border);
    border-radius: .75rem;
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.dp-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, .45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.dp-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(160deg, #13202b, #0b1117);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dp-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dp-cover-fallback {
    font-size: 1.75rem;
    font-weight: 800;
    color: #274052;
    letter-spacing: .05em;
}

.dp-body {
    padding: .625rem .75rem .75rem;
    border-top: 1px solid var(--cc-border-soft);
}

.dp-name {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--cc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-meta {
    font-size: .6875rem;
    color: var(--cc-muted);
    margin-top: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-dot {
    margin: 0 .2rem;
    opacity: .6;
}

.dp-play {
    margin-top: .6rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: #052e21;
    background: var(--cc-accent);
    border-radius: .45rem;
    padding: .4rem .5rem;
    text-decoration: none;
    transition: filter .15s ease;
}

.dp-play:hover {
    filter: brightness(1.08);
}

/* Revenue settings + report */
.rv-actions {
    margin-top: 1rem;
}

.rp-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    font-size: .75rem;
    color: #94a3b8;
}

.rp-filter label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.rp-filter input {
    background: #0b1220;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: .4rem;
    padding: .35rem .5rem;
    font-size: .75rem;
}

.rp-hint {
    opacity: .65;
}

.rp-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.rp-kpi {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: .6rem;
    padding: .85rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.rp-kpi-accent {
    border-color: rgba(16, 185, 129, .5);
}

.rp-kpi-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
}

.rp-kpi-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
}

.rp-block {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: .6rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.rp-title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #cbd5e1;
    margin-bottom: .75rem;
}

.rp-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .75rem;
}

.rp-table th {
    text-align: left;
    color: #94a3b8;
    font-weight: 500;
    padding: .4rem .5rem;
    border-bottom: 1px solid #1e293b;
    white-space: nowrap;
}

.rp-table td {
    padding: .45rem .5rem;
    border-bottom: 1px solid rgba(30, 41, 59, .5);
    color: #e2e8f0;
}

.rp-table tr:last-child td {
    border-bottom: none;
}

.rp-muted {
    color: #64748b;
    margin-left: .35rem;
    font-size: .68rem;
}

.rp-negative {
    color: #fb7185;
}

.rp-empty {
    color: #94a3b8;
    font-size: .8rem;
    padding: .5rem 0;
}

.rp-scroll {
    overflow-x: auto;
}

@media (max-width: 1024px) {
    .rp-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
