/*
 * TEMA TABEL BERSAMA
 * ------------------
 * Panggil pada halaman PHP/HTML dengan:
 * <link rel="stylesheet" href="tema-tabel.css">
 *
 * Untuk tabel lain, gunakan class yang sama jika sesuai:
 * .page-shell, .hero, .navigation, .nav-link, .panel,
 * .panel-header, .data-table, .table-wrap, .date-cell,
 * .balls, .ball-red, .empty-value, .notice, .footer.
 */

:root {
    color-scheme: light;
    --page: #f3f6fb;
    --surface: #ffffff;
    --ink: #182230;
    --muted: #687386;
    --line: #e4eaf2;
    --brand: #172554;
    --brand-2: #263f83;
    --accent: #e53945;
    --accent-dark: #b91c2a;
    --shadow: 0 14px 40px rgba(26, 42, 76, .08);
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a { color: inherit; }

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 52px);
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(120deg, #111c3e 0%, #1d3470 62%, #3456a5 100%);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -110px;
    border: 42px solid rgba(255,255,255,.07);
    border-radius: 50%;
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    color: #e2eaff;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6873;
    box-shadow: 0 0 0 4px rgba(255,104,115,.16);
}

.hero h1 {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.25rem);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.hero p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 16px 0 0;
    color: #d7e1ff;
    font-size: 1rem;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(26,42,76,.04);
}

.nav-link {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f2f5fb;
    color: #34415b;
    font-size: .88rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover, .nav-link:focus-visible {
    background: #e6ecfb;
    color: var(--brand-2);
    transform: translateY(-1px);
}

.nav-link.is-active {
    background: var(--brand);
    color: #fff;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.panel-heading { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.panel-subtitle { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

.count-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #314786;
    font-size: .78rem;
    font-weight: 750;
    white-space: nowrap;
}

.count-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4f6bc2;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Class data-table menjaga tema tabel ini tidak mengubah tabel lain secara tak sengaja. */
.data-table {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
}

.data-table thead th {
    padding: 15px 12px;
    background: #f7f9fd;
    color: #5d6980;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 13px 12px;
    border-top: 1px solid #edf0f6;
    vertical-align: middle;
}

.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #f8faff; }

.date-cell {
    color: #47536a;
    font-size: .87rem;
    font-weight: 750;
    white-space: nowrap;
}

.balls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: max-content;
}

.ball-red {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c92132;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6470, #dc2537 72%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 2px 4px rgba(185,28,42,.16);
    color: #fff;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1;
}

.empty-value {
    color: #9aa4b5;
    font-size: .9rem;
    letter-spacing: .08em;
}

.empty-state {
    padding: 28px !important;
    color: var(--muted);
}

.notice {
    margin-top: 22px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.notice h2 { margin: 0 0 8px; font-size: 1.1rem; }
.notice p { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }

.footer {
    padding: 24px 8px 0;
    color: #8a94a6;
    font-size: .78rem;
    text-align: center;
}

@media (max-width: 640px) {
    .page-shell { width: min(100% - 20px, 1120px); padding-top: 10px; }
    .hero { padding: 25px 21px; border-radius: 22px; }
    .hero p { font-size: .92rem; }
    .navigation { gap: 7px; padding: 9px; margin: 14px 0; }
    .nav-link { flex: 1 1 calc(50% - 7px); padding: 9px 8px; font-size: .78rem; }
    .panel-header { align-items: flex-start; padding: 18px 16px; }
    .panel-heading { font-size: 1.02rem; }
    .panel-subtitle { font-size: .8rem; }
    .data-table thead th { padding: 12px 9px; }
    .data-table tbody td { padding: 11px 8px; }
    .ball-red { width: 25px; height: 25px; font-size: .72rem; }
    .balls { gap: 3px; }
    .notice { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}


/* Tema gelap-merah mengikuti tampilan angka_togel.php */
body {
    background: #000 !important;
    color: #fff !important;
}

.page-shell {
    color: #fff;
}

.navigation {
    background: #000 !important;
    border-color: #fff !important;
    box-shadow: none !important;
}

.nav-link,
.nav-link:visited {
    background: #c60000 !important;
    color: #ffd700 !important;
    border: 1px solid #ff3b3b !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: #ff0000 !important;
    color: #ffd700 !important;
    transform: none;
}

.nav-link.is-active {
    background: #ff0000 !important;
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.panel,
.panel-header,
.notice {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
}

.panel-heading,
.panel-subtitle,
.notice h2,
.notice p,
.footer,
.date-cell,
.empty-value,
.empty-state {
    color: #fff !important;
}

.count-pill {
    background: #690404 !important;
    color: #ffd700 !important;
}

.data-table {
    background: #000 !important;
    color: #fff !important;
    border-collapse: collapse !important;
}

.data-table thead th {
    background: #690404 !important;
    color: #ffd700 !important;
    border: 1px solid #fff !important;
}

.data-table tbody td {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

.data-table tbody tr:hover,
.data-table tbody tr:hover td {
    background: #1b1b1b !important;
}

@media (max-width: 640px) {
    .nav-link {
        border-radius: 5px !important;
    }
}
