/* Huisstijl overgenomen uit grafiekapplicatie-streams (dashboard.live-streams.nl) —
   zelfde merk "Live Streams", zodat player.live-streams.nl er hetzelfde uitziet.
   Bootstrap blijft geladen voor alle bestaande content (kaarten/formulieren/tabellen);
   dit bestand stuurt alleen de loginpagina en de navigatie-schil aan. */
:root {
    --bg: #F7F4F3;
    --card-bg: #FFFFFF;
    --border: #E3D9D6;
    --text: #181310;
    --muted: #6E645F;
    --accent: #CC0000;
    --accent-hover: #A80000;
    --accent-ink: #FFFFFF;
    --accent-glow-strong: rgba(204, 0, 0, 0.42);
    --grid: rgba(24, 19, 16, 0.09);
    --shadow: 0 1px 2px rgba(24, 19, 16, 0.06), 0 10px 26px rgba(24, 19, 16, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #080808;
        --card-bg: #111111;
        --border: #2A2A2A;
        --text: #E6E2E0;
        --muted: #928B87;
        --accent: #E1000A;
        --accent-hover: #FF3B3B;
        --accent-ink: #FFFFFF;
        --accent-glow-strong: rgba(225, 0, 10, 0.55);
        --grid: rgba(230, 226, 224, 0.09);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.45);
    }
}

body:not(.auth-page) {
    background-color: var(--bg);
    background-image: repeating-radial-gradient(circle at 100% 0%, var(--grid) 0 1px, transparent 1px 34px);
    background-attachment: fixed;
}

img.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    img.logo-light { display: none; }
    img.logo-dark { display: block; }
}

/* Loginpagina: gecentreerde kaart op een geanimeerde golfachtergrond. */
.auth-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--bg);
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat-x;
    background-position: bottom left;
}

.auth-page::before {
    height: 38vh;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='rgba(24,19,16,0.09)' d='M0,55 C25,35 75,35 100,55 C125,75 175,75 200,55 L200,100 L0,100 Z'/%3E%3C/svg%3E");
    background-size: 76vh 38vh;
    animation: auth-wave-a 26s linear infinite;
}

.auth-page::after {
    height: 52vh;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='rgba(204,0,0,0.14)' d='M0,60 C30,40 70,40 100,60 C130,80 170,80 200,60 L200,100 L0,100 Z'/%3E%3C/svg%3E");
    background-size: 104vh 52vh;
    opacity: 0.8;
    animation: auth-wave-b 34s linear infinite reverse;
}

@media (prefers-color-scheme: dark) {
    .auth-page::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='rgba(230,226,224,0.09)' d='M0,55 C25,35 75,35 100,55 C125,75 175,75 200,55 L200,100 L0,100 Z'/%3E%3C/svg%3E");
    }
    .auth-page::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='rgba(225,0,10,0.24)' d='M0,60 C30,40 70,40 100,60 C130,80 170,80 200,60 L200,100 L0,100 Z'/%3E%3C/svg%3E");
    }
}

@keyframes auth-wave-a {
    from { background-position-x: 0; }
    to   { background-position-x: -76vh; }
}

@keyframes auth-wave-b {
    from { background-position-x: 0; }
    to   { background-position-x: -104vh; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page::before,
    .auth-page::after {
        animation: none;
    }
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2.1rem 2rem 1.9rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    margin: 0 auto 1.4rem;
}

.auth-card h1 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem;
    color: var(--text);
}

.auth-card p.sub {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-card form { text-align: left; }

.auth-card label {
    display: block;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-card input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
}

.auth-card input:focus, .auth-card button:focus-visible, .auth-card a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.auth-card button {
    margin-top: 1.25rem;
    width: 100%;
    padding: 0.6rem 1.1rem;
    background: var(--accent);
    color: var(--accent-ink);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 16px var(--accent-glow-strong);
}

.auth-card button:hover { background: var(--accent-hover); }

.auth-card a { color: var(--accent); }
.auth-card a:hover { color: var(--accent-hover); }

.auth-card .alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0 0 1rem;
    font-size: 0.9rem;
    text-align: left;
}

/* Donkere linker sidebar, zelfde patroon als het admin-paneel van dashboard.live-streams.nl —
   vervangt de vorige lichte Bootstrap-navbar bovenaan. */
.admin-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.admin-side {
    flex: none;
    width: 230px;
    background: #0F1A2E;
    color: #B8C2DA;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 1.4rem 1rem;
}

.admin-side-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.4rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    text-decoration: none;
}

.admin-side-brand img {
    height: 28px;
    width: auto;
    border-radius: 6px;
    flex: none;
}

.admin-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-side-nav a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: #B8C2DA;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-side-nav a:hover { background: #182238; color: #fff; }

.admin-side-nav a.active {
    background: var(--accent);
    color: var(--accent-ink);
}

.admin-side-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0 0.4rem;
    font-size: 0.82rem;
}

.admin-side-foot .admin-side-user {
    color: #B8C2DA;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-side-foot button {
    background: none;
    border: 1px solid #2A3A5C;
    color: #B8C2DA;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    cursor: pointer;
    flex: none;
}

.admin-side-foot button:hover { border-color: var(--accent); color: #fff; }

.admin-main {
    flex: 1;
    min-width: 0;
}

.impersonation-banner {
    background: #FFB020;
    color: #2B1C00;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.impersonation-banner form { margin: 0; }

.impersonation-banner button {
    background: #2B1C00;
    color: #FFB020;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    flex: none;
}

.impersonation-banner button:hover { background: #4a3000; }

@media (max-width: 760px) {
    .admin-shell { flex-direction: column; min-height: 0; }
    .admin-side { width: auto; }
}

/* Vereenvoudigde streamstatus-kaart voor de beheerder (klantvriendelijke MistServer-gegevens). */
.stream-status-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    box-shadow: var(--shadow);
}

.stream-status-card h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.stream-status-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.stream-status-line .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.stream-status-line.online .dot { background: #1E8E5A; }
.stream-status-line.offline .dot { background: var(--muted); }

.stream-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
}

.stream-status-grid .stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.stream-status-grid .stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.stream-status-empty {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}
