@charset "UTF-8";

:root {
    --bg: #f5f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #eef2f7;
    --text: #101828;
    --text-muted: #667085;
    --border: rgba(16, 24, 40, 0.10);
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.10);
    --shadow-soft: 0 8px 25px rgba(16, 24, 40, 0.08);
    --brand-yellow: #f8dc5f;
    --brand-orange: #f97316;
    --brand-red: #f20f17;
    --accent: var(--brand-orange);
    --accent-strong: var(--brand-red);
    --accent-soft: rgba(249, 115, 22, 0.13);
    --brand-glow: rgba(248, 220, 95, 0.34);
    --yellow-row: rgba(255, 238, 130, 0.42);
    --row: #ffffff;
    --row-alt: #f7f8fb;
    --row-hover: rgba(249, 115, 22, 0.08);
    --chip-ok: rgba(16, 185, 129, 0.18);
    --chip-warning: rgba(245, 158, 11, 0.22);
    --chip-error: rgba(239, 68, 68, 0.18);
    --chip-missing: rgba(250, 204, 21, 0.24);
    --chip-only: rgba(248, 113, 113, 0.18);
    --footer-bg: rgba(255, 255, 255, 0.86);
}

html[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #171a22;
    --surface-soft: #1d212b;
    --surface-muted: #252b36;
    --text: #f3f4f6;
    --text-muted: #a7adba;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.40);
    --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.28);
    --brand-yellow: #ffd86b;
    --brand-orange: #ff8a1f;
    --brand-red: #ff3b30;
    --accent: var(--brand-orange);
    --accent-strong: var(--brand-red);
    --accent-soft: rgba(255, 138, 31, 0.18);
    --brand-glow: rgba(255, 216, 107, 0.18);
    --yellow-row: rgba(202, 138, 4, 0.30);
    --row: #171a22;
    --row-alt: #1b2029;
    --row-hover: rgba(255, 138, 31, 0.12);
    --chip-ok: rgba(16, 185, 129, 0.22);
    --chip-warning: rgba(245, 158, 11, 0.24);
    --chip-error: rgba(239, 68, 68, 0.24);
    --chip-missing: rgba(250, 204, 21, 0.22);
    --chip-only: rgba(248, 113, 113, 0.23);
    --footer-bg: rgba(23, 26, 34, 0.88);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 16px 16px 78px;
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(248, 220, 95, 0.20), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(249, 115, 22, 0.12), transparent 30%),
        radial-gradient(circle at 50% -5%, rgba(242, 15, 23, 0.055), transparent 34%),
        var(--bg);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 216, 107, 0.12), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(255, 138, 31, 0.12), transparent 30%),
        radial-gradient(circle at 50% -5%, rgba(255, 59, 48, 0.10), transparent 34%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}

a:hover {
    color: var(--accent-strong);
}

center {
    display: block;
    width: min(1180px, 96%);
    margin: 10px auto 12px;
    color: var(--text-muted);
}

h1 {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 800;
    color: inherit;
}

h2 {
    margin: 0;
    color: var(--accent-strong);
}

.blue { color: var(--accent-strong); }
.yellow { color: #facc15; }
.stream { display: block; text-align: center; margin-bottom: 30px; }
.subcat { font-size: 0.86rem; }

.container {
    width: 100%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
}

.menu-card {
    width: min(1220px, 96%);
    margin: 10px auto 20px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.menu {
    min-width: 860px;
}

.menu th {
    padding: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.menu th:last-child {
    border-right: 0;
}

.menu tr:last-child th {
    border-bottom: 0;
}

.menu th:first-child {
    width: 180px;
    background: var(--surface);
}

.menu th a {
    display: block;
    padding: 13px 12px;
    min-height: 44px;
}

.menu th[rowspan] a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.menu-logo {
    width: 150px;
    max-width: 150px;
    height: auto;
    display: block;
}

html[data-theme="dark"] .menu-logo {
    filter: brightness(0) invert(1);
}

.menu-logo-link {
    flex-direction: column;
    gap: 10px;
}

.live-viewers-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(248, 220, 95, 0.22), rgba(249, 115, 22, 0.12));
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.12);
}

.live-viewers-badge strong {
    color: var(--accent-strong);
    font-variant-numeric: tabular-nums;
}

.live-viewers-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--brand-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.live-viewers-badge.is-online .live-viewers-dot {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.live-viewers-badge.is-error {
    opacity: 0.78;
}

.live-viewers-badge.is-error .live-viewers-dot {
    background: var(--brand-red);
    box-shadow: 0 0 0 4px rgba(242, 15, 23, 0.14);
}

html[data-theme="dark"] .live-viewers-badge {
    border-color: rgba(255, 138, 31, 0.28);
    background: linear-gradient(135deg, rgba(255, 216, 107, 0.13), rgba(255, 138, 31, 0.14));
}

.menu .cat1:hover,
.menu .cat2:hover,
.menu .cat3:hover,
.menu th:hover {
    background: linear-gradient(180deg, rgba(248, 220, 95, 0.20), rgba(249, 115, 22, 0.12)) !important;
    color: var(--accent-strong);
}

html[data-theme="dark"] .menu .cat1:hover,
html[data-theme="dark"] .menu .cat2:hover,
html[data-theme="dark"] .menu .cat3:hover,
html[data-theme="dark"] .menu th:hover {
    background: linear-gradient(180deg, rgba(255, 216, 107, 0.13), rgba(255, 138, 31, 0.14)) !important;
}

.menu .cat1 > a,
.menu .cat2 > a,
.menu .cat3 > a {
    position: relative;
}

.menu .cat1 > a::after,
.menu .cat2 > a::after,
.menu .cat3 > a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange), var(--brand-red));
    opacity: 0.72;
}

.menu .cat1 > a::after {
    background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange));
}

.menu .cat2 > a::after {
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-red));
}

.menu .cat3 > a::after {
    background: linear-gradient(90deg, var(--brand-yellow), var(--brand-orange), var(--brand-red));
}

#iframe_rezultate {
    display: block;
    width: 100%;
    min-height: 520px;
}

.site-footer {
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(680px, calc(100% - 24px));
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--footer-bg);
    color: var(--text-muted);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.site-footer a {
    color: var(--text);
}

.footer-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--surface-soft);
}

.footer-top img {
    width: 22px;
    height: 22px;
}

html[data-theme="dark"] .footer-top img {
    filter: invert(1);
}

.theme-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: var(--accent-soft);
}

.results-toolbar {
    width: min(1220px, 96%);
    margin: 14px auto 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.results-search-wrap {
    flex: 1;
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.results-search-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.results-search {
    width: min(460px, 100%);
    min-width: 260px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.results-search::placeholder {
    color: var(--text-muted);
}

.results-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    background: var(--surface);
}

.results-search-count {
    min-width: 120px;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.splits-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.splits-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.splits-toggle-slider {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: var(--surface-muted);
    box-shadow: inset 0 0 0 1px var(--border);
    transition: background 0.18s ease;
}

.splits-toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease;
}

.splits-toggle-input:checked + .splits-toggle-slider {
    background: linear-gradient(135deg, var(--brand-yellow), var(--brand-orange), var(--brand-red));
}

.splits-toggle-input:checked + .splits-toggle-slider::after {
    transform: translateX(18px);
}

.results-table-wrap {
    width: min(1220px, 96%);
    margin: 0 auto 26px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.results-table {
    min-width: 760px;
}

.results-table th,
.results-table td {
    padding: 13px 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.results-table th:last-child,
.results-table td:last-child {
    border-right: 0;
}

.results-table tr:last-child td {
    border-bottom: 0;
}

.results-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.results-table td {
    background: var(--row);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
}

.results-table tr:nth-child(odd) td {
    background: var(--row-alt);
}

.results-table tr:hover td {
    background: var(--row-hover);
}

.results-table td:nth-child(3),
.results-table th:nth-child(3) {
    text-align: left;
}

.results-table td:nth-child(1),
.results-table td:nth-child(2) {
    font-weight: 800;
}

.results-table img[title="m"],
.results-table img[title="f"] {
    width: 22px !important;
    height: auto;
    display: inline-block;
}

.chip-time {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.25;
}

.results-table td.chip-compare-ok {
    background: var(--chip-ok) !important;
}

.results-table td.chip-compare-warning {
    background: var(--chip-warning) !important;
}

.results-table td.chip-compare-error {
    background: var(--chip-error) !important;
}

.results-table tr.chip-missing-finish td {
    background: var(--chip-missing) !important;
}

.results-table tr.chip-only-missing-excel td {
    background: var(--chip-only) !important;
}

body.splits-hidden [data-split-col] {
    display: none !important;
}

body.splits-visible [data-split-col] {
    display: table-cell !important;
}

@media (max-width: 768px) {
    body:not(.splits-visible) [data-split-col] {
        display: none !important;
    }
}

@media (max-width: 1000px) {
    body {
        padding: 10px 8px 72px;
        font-size: 14px;
    }

    .menu-card,
    .results-toolbar,
    .results-table-wrap,
    center {
        width: 100%;
    }

    .menu {
        min-width: 720px;
    }

    .menu th:first-child {
        width: 150px;
    }

    .menu-logo {
        width: 120px;
    }

    .live-viewers-badge {
        padding: 5px 8px;
        font-size: 0.70rem;
    }

    .results-toolbar {
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
        padding: 12px;
    }

    .results-search-wrap {
        width: 100%;
    }

    .results-search {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .splits-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .results-table {
        min-width: 620px;
    }

    .results-table th,
    .results-table td {
        padding: 10px 8px;
        font-size: 0.78rem;
    }

    .results-table td:nth-child(3),
    .results-table th:nth-child(3) {
        min-width: 150px;
    }

    h1 {
        font-size: 0.74rem;
    }

    .site-footer {
        bottom: 8px;
        gap: 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 520px) {
    .site-footer {
        justify-content: space-between;
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .footer-top,
    .theme-toggle {
        width: 30px;
        height: 30px;
    }

    .menu {
        min-width: 620px;
    }

    .results-table {
        min-width: 560px;
    }

    .results-table th,
    .results-table td {
        padding: 9px 7px;
    }
}

.eta-cell {
    font-weight: 900;
    white-space: nowrap;
}

.eta-cell strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.15;
}

.eta-duration {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.results-table td.eta-overdue {
    background: rgba(242, 15, 23, 0.23) !important;
    color: var(--text) !important;
    animation: etaPulse 1.05s ease-in-out infinite;
}

html[data-theme="dark"] .results-table td.eta-overdue {
    background: rgba(255, 59, 48, 0.30) !important;
}

@keyframes etaPulse {
    0% {
        box-shadow: inset 0 0 0 0 rgba(242, 15, 23, 0.18), 0 0 0 rgba(242, 15, 23, 0.0);
        transform: scale(1);
    }
    50% {
        box-shadow: inset 0 0 0 999px rgba(242, 15, 23, 0.08), 0 0 18px rgba(242, 15, 23, 0.40);
        transform: scale(1.015);
    }
    100% {
        box-shadow: inset 0 0 0 0 rgba(242, 15, 23, 0.18), 0 0 0 rgba(242, 15, 23, 0.0);
        transform: scale(1);
    }
}
