/* INGEVIP Lottery Analytics AI — Estilos */

:root {
    --bg-dark: #121212;
    --card-dark: #1e1e1e;
    --primary-color: #0D47A1;
    --secondary-color: #FF9800;
    --text-main: #FFFFFF;
    --text-muted: #B0B0B0;
    --border-glow: rgba(13, 71, 161, 0.3);
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* SIDEBAR */
#sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    max-width: var(--sidebar-w);
    background: linear-gradient(180deg, #161616 0%, #1e1e1e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease;
    flex-shrink: 0;
}
#sidebar.sidebar-hidden-desktop {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden;
}
.sidebar-header {
    padding: 20px;
    background: var(--primary-color);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#sidebar ul li a {
    padding: 14px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}
#sidebar ul li a i { margin-right: 12px; width: 20px; text-align: center; }
#sidebar ul li a:hover,
#sidebar ul li.active a {
    color: var(--text-main);
    background: rgba(13, 71, 161, 0.15);
    border-left-color: var(--secondary-color);
}

/* HAMBURGER */
#btn-hamburger {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 6px;
    display: inline-block;
}
#btn-hamburger:hover { background: rgba(255, 255, 255, 0.1); }

/* OVERLAY */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
}
#sidebar-overlay.active { display: block; }

/* CARDS */
.casino-card {
    background: var(--card-dark);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.metric-value { font-size: 2rem; font-weight: 700; color: var(--secondary-color); }
.lottery-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #dddddd 20%, #999999 80%);
    color: #000000;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 0 4px;
}
.lottery-container {
    background: #000000;
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    border: 2px solid var(--secondary-color);
}
.view-section { display: none; }
.view-section.active-view { display: block; }

footer {
    background: #0b0b0b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.text-muted { color: var(--text-muted) !important; }

.metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a0a8b8;
    margin-bottom: 4px;
}

/* FREQ BARS */
.freq-bar-wrap { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.freq-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.72rem;
    line-height: 1.2;
}
.freq-item .fi-pos { font-weight: 700; color: #ccc; font-size: 0.65rem; }
.freq-item .fi-dig { font-size: 1rem; font-weight: 800; }
.freq-item .fi-pct { font-size: 0.62rem; color: #aaa; }

.table-responsive { -webkit-overflow-scrolling: touch; }
table.dataTable td, table.dataTable th { white-space: nowrap; }

/* RESPONSIVE */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        transform: translateX(-100%);
        overflow-y: auto;
    }
    #sidebar.sidebar-open { transform: translateX(0); }
    #btn-hamburger { display: inline-block; }
    .flex-grow-1.d-flex.flex-column { width: 100% !important; }
    header h4 { font-size: 0.95rem; }
    header .badge { font-size: 0.7rem; padding: 4px 6px !important; }
    main { padding: 0.75rem !important; }
    .casino-card { border-radius: 8px; }
    .metric-value { font-size: 1.5rem; }
    .table-responsive { overflow-x: auto; }
    footer .row > div { text-align: center; margin-bottom: 6px; }
}

@media (max-width: 480px) {
    .metric-value { font-size: 1.25rem; }
    header h4 { font-size: 0.85rem; }
}