:root {
    --background: #0d0d12;
    --sidebar: #121218;
    --surface: #17171f;
    --surface-raised: #1d1d27;
    --surface-hover: #232330;
    --border: #2b2b38;
    --border-soft: #242430;
    --text: #f5f4f8;
    --muted: #9492a2;
    --muted-light: #b7b5c1;
    --purple: #1688ff;
    --purple-light: #69b9ff;
    --green: #31d0aa;
    --red: #ff5c75;
    --orange: #ffb454;
    --blue: #64b5ff;
    --shadow: 0 20px 60px rgba(0, 0, 0, .28);
    font-family: "Open Sans", Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--background);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 82% 0%, rgba(22, 136, 255, .10), transparent 30rem),
        var(--background);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: rgba(18, 18, 24, .96);
    border-right: 1px solid var(--border-soft);
    backdrop-filter: blur(18px);
}

.brand {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--purple), #6632ba);
    box-shadow: 0 9px 24px rgba(22, 136, 255, .27);
    font-size: 17px;
    font-weight: 800;
}

.brand div,
.sidebar-footer div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand small,
.sidebar-footer small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.main-navigation {
    display: grid;
    gap: 7px;
    margin-top: 22px;
}

.navigation-button {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted-light);
    text-align: left;
    transition: .16s ease;
}

.navigation-button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.navigation-button.active {
    border-color: rgba(22, 136, 255, .3);
    background: rgba(22, 136, 255, .13);
    color: #fff;
}

.navigation-icon {
    width: 20px;
    color: var(--purple-light);
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 11px 4px;
    border-top: 1px solid var(--border-soft);
}

.sidebar-footer strong {
    font-size: 11px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(49, 208, 170, .10);
}

.status-dot.error {
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(255, 92, 117, .12);
}

.workspace {
    min-width: 0;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(13, 13, 18, .8);
    backdrop-filter: blur(18px);
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--purple-light);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: 19px;
}

h2 {
    font-size: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.last-updated {
    color: var(--muted);
    font-size: 10px;
}

.refresh-button {
    min-height: 35px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.refresh-button:hover {
    border-color: var(--purple);
    background: var(--surface-raised);
}

.account {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
}

.account-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--purple-light);
}

main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 28px 38px;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.statistic {
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(29, 29, 39, .92), rgba(21, 21, 29, .92));
    box-shadow: 0 10px 35px rgba(0, 0, 0, .12);
}

.statistic-icon {
    flex: 0 0 auto;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(22, 136, 255, .12);
    color: var(--purple-light);
    font-size: 15px;
    font-weight: 800;
}

.statistic div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.statistic small,
.statistic span {
    color: var(--muted);
    font-size: 10px;
}

.statistic strong {
    overflow: hidden;
    margin: 5px 0 4px;
    font-size: clamp(16px, 1.4vw, 21px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skeleton {
    overflow: hidden;
    position: relative;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
    animation: skeleton 1.3s infinite;
}

@keyframes skeleton {
    to { transform: translateX(100%); }
}

.summary-error {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    color: var(--red);
}

.content-card {
    margin-top: 17px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(23, 23, 31, .96);
    box-shadow: var(--shadow);
}

.content-heading {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.result-count {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted-light);
    background: var(--surface-raised);
    font-size: 10px;
    font-weight: 700;
}

.content-area {
    min-height: 490px;
}

.loading-state,
.error-state,
.empty-state {
    min-height: 490px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 35px;
    text-align: center;
}

.loading-state p,
.error-state p,
.empty-state p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.spinner {
    width: 27px;
    height: 27px;
    border: 3px solid var(--border);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state strong {
    color: var(--red);
}

.error-state button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-raised);
    color: var(--text);
}

.empty-state > span {
    color: var(--purple-light);
    font-size: 27px;
}

.table-wrapper {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

th,
td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: middle;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #1b1b24;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

tbody tr {
    transition: background .14s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, .025);
}

.rank-column {
    width: 55px;
    text-align: center;
}

.numeric-column {
    text-align: right;
}

.rank {
    width: 25px;
    height: 25px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: var(--surface-raised);
    color: var(--muted-light);
    font-weight: 800;
}

.channel-cell {
    min-width: 170px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-cell div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.channel-cell strong,
.channel-cell small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-cell small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.channel-avatar {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-raised);
}

.channel-avatar.fallback {
    display: grid;
    place-items: center;
    color: var(--purple-light);
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
}

.live-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.live-status.online {
    color: var(--red);
}

.live-status.online span {
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(255, 92, 117, .10);
}

.live-status.offline {
    color: var(--muted);
}

.live-status.offline span {
    background: #575765;
}

.title-column {
    max-width: 440px;
    overflow: hidden;
    color: var(--muted-light);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-toolbar {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(20, 20, 28, .94);
}

.chat-toolbar > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-toolbar strong {
    font-size: 11px;
}

.chat-toolbar small,
.chat-refresh-label {
    color: var(--muted);
    font-size: 9px;
}

.live-pulse {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 0 rgba(255, 92, 117, .4);
    animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
    70% { box-shadow: 0 0 0 7px rgba(255, 92, 117, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 117, 0); }
}

.chat-feed {
    height: 620px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #474755 #191920;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.chat-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(43, 43, 56, .72);
    font-size: 11px;
    line-height: 1.45;
    transition: background .12s ease;
}

.chat-line.chat-line-new {
    animation: chat-line-in .32s cubic-bezier(.2, .75, .25, 1);
}

@keyframes chat-line-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
        background: rgba(22, 136, 255, .13);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        background: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-feed { scroll-behavior: auto; }
    .chat-line.chat-line-new { animation: none; }
}

.chat-line:nth-child(even) {
    background: rgba(255, 255, 255, .012);
}

.chat-line:hover {
    background: rgba(22, 136, 255, .055);
}

.chat-time {
    flex: 0 0 auto;
    width: 132px;
    color: #737180;
    font-size: 8px;
    font-variant-numeric: tabular-nums;
}

.chat-channel {
    flex: 0 0 auto;
    color: var(--purple-light);
    font-weight: 800;
    text-decoration: none;
}

.chat-channel:hover {
    text-decoration: underline;
}

.chat-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.chat-badge {
    min-height: 19px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 5px;
    background: #292934;
    color: #d4d2db;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.chat-badge > span {
    font-size: 8px;
}

.chat-badge.broadcaster {
    border-color: rgba(255, 92, 117, .30);
    background: rgba(255, 92, 117, .14);
    color: #ff8294;
}

.chat-badge.moderator {
    border-color: rgba(49, 208, 170, .28);
    background: rgba(49, 208, 170, .12);
    color: #72e5c8;
}

.chat-badge.vip {
    border-color: rgba(255, 108, 183, .30);
    background: rgba(255, 108, 183, .12);
    color: #ff91ca;
}

.chat-badge.subscriber,
.chat-badge.founder {
    border-color: rgba(22, 136, 255, .32);
    background: rgba(22, 136, 255, .14);
    color: #8acaff;
}

.chat-badge.partner,
.chat-badge.staff,
.chat-badge.admin {
    border-color: rgba(100, 181, 255, .30);
    background: rgba(100, 181, 255, .13);
    color: #93ceff;
}

.chat-badge.bits,
.chat-badge.turbo,
.chat-badge.premium {
    border-color: rgba(255, 180, 84, .28);
    background: rgba(255, 180, 84, .12);
    color: #ffc879;
}

.chat-username {
    flex: 0 0 auto;
    color: #f2eff7;
    font-size: 10px;
}

.chat-username::after {
    content: ':';
    color: var(--muted);
}

.chat-message {
    min-width: 0;
    color: #d2d0d9;
    overflow-wrap: anywhere;
}

.bits-badge {
    flex: 0 0 auto;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(22, 136, 255, .13);
    color: var(--purple-light);
    font-size: 8px;
    font-weight: 800;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 14px;
}

.event-card {
    min-width: 0;
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface);
}

.event-icon {
    flex: 0 0 auto;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(22, 136, 255, .12);
    color: var(--purple-light);
    font-weight: 800;
}

.event-icon.donation {
    background: rgba(49, 208, 170, .10);
    color: var(--green);
}

.event-icon.cheer {
    color: var(--purple-light);
}

.event-body {
    min-width: 0;
    flex: 1;
}

.event-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.event-heading > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.event-heading span {
    color: var(--muted);
    font-size: 9px;
}

.event-heading strong {
    margin-top: 3px;
    font-size: 11px;
}

.event-value {
    flex: 0 0 auto;
    color: var(--purple-light);
}

.event-value.eur {
    color: var(--green);
}

.event-value.usd {
    color: var(--blue);
}

.event-card p {
    margin: 10px 0;
    color: var(--muted-light);
    font-size: 10px;
    line-height: 1.5;
}

.event-card footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 9px;
}

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

    .event-grid {
        grid-template-columns: 1fr;
    }

    .message-row {
        grid-template-columns: 210px minmax(250px, 1fr);
    }

    .message-row time {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 12px;
    }

    .brand {
        padding-bottom: 12px;
    }

    .main-navigation {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 12px;
    }

    .navigation-button {
        justify-content: center;
        padding: 0 8px;
    }

    .sidebar-footer {
        display: none;
    }

    .topbar {
        align-items: flex-start;
        padding: 15px;
    }

    .last-updated,
    .account span:last-child {
        display: none;
    }

    main {
        padding: 14px;
    }

    .statistics {
        grid-template-columns: 1fr;
    }

    .message-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .message-row time {
        grid-column: auto;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .chat-time {
        display: none;
    }

    .chat-line {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .chat-message {
        flex-basis: 100%;
        padding-left: 2px;
    }
}

@media (max-width: 560px) {
    .chat-toolbar small,
    .chat-refresh-label {
        display: none;
    }

    .chat-feed {
        height: 540px;
    }

    .chat-badge {
        padding: 2px 4px;
    }
}


/* V6: overzicht, historische chatzoekfunctie en vaste chatregel */
.database-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding: 14px 14px 3px;
}

.database-total-card {
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface));
}

.database-total-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--purple-light);
    background: rgba(22, 136, 255, .13);
    font-size: 15px;
    font-weight: 900;
}

.database-total-card div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.database-total-card small {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.database-total-card strong {
    margin: 4px 0;
    font-size: 18px;
}

.database-total-card p {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding: 11px 14px 14px;
}

.ranking-card {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface);
}

.ranking-card > header {
    min-height: 61px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .018);
}

.ranking-card > header > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.ranking-card > header > div > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--purple-light);
    background: rgba(22, 136, 255, .12);
    font-weight: 900;
}

.ranking-card h3,
.ranking-card small {
    margin: 0;
}

.ranking-card h3 {
    margin-top: 2px;
    font-size: 12px;
}

.ranking-card small,
.ranking-card header b {
    color: var(--muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ranking-row {
    min-height: 47px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-position {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--muted-light);
    background: var(--surface-raised);
    font-size: 9px;
    font-weight: 800;
}

.ranking-row:nth-child(1) .ranking-position {
    color: #15120a;
    background: #f1c75b;
}

.ranking-row:nth-child(2) .ranking-position {
    color: #151515;
    background: #c5c7ce;
}

.ranking-row:nth-child(3) .ranking-position {
    color: #1b100a;
    background: #c88b58;
}

.ranking-person {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ranking-person strong,
.ranking-person small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-person strong {
    font-size: 10px;
}

.ranking-person small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.ranking-value {
    color: var(--purple-light);
    font-size: 10px;
}

.ranking-empty {
    padding: 30px 14px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.donation-ranking .ranking-value {
    color: var(--green);
}

.chat-toolbar {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .018);
}

.chat-toolbar-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-toolbar-status > div {
    display: flex;
    flex-direction: column;
}

.chat-toolbar-status strong {
    font-size: 11px;
}

.chat-toolbar-status small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.live-pulse.paused {
    background: var(--orange);
    box-shadow: 0 0 0 5px rgba(255, 180, 84, .1);
}

.chat-search {
    display: flex;
    gap: 6px;
    width: min(580px, 60%);
}

.chat-search input {
    min-width: 0;
    flex: 1;
    height: 35px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #111118;
    color: var(--text);
    font-size: 10px;
}

.chat-search input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(22, 136, 255, .1);
}

.chat-search button,
.search-pagination button {
    height: 35px;
    padding: 0 12px;
    border: 1px solid var(--purple);
    border-radius: 8px;
    background: var(--purple);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.chat-search button.secondary {
    border-color: var(--border);
    background: var(--surface-raised);
}

.chat-column-headings {
    display: grid;
    grid-template-columns: 72px minmax(95px, 145px) minmax(0, auto) minmax(220px, 1fr);
    gap: 9px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: #1b1b24;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chat-feed {
    height: 590px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--purple) var(--surface);
    scrollbar-width: thin;
}

.chat-feed.search-results {
    height: 530px;
}

.chat-line {
    min-height: 39px;
    display: grid;
    grid-template-columns: 72px minmax(95px, 145px) minmax(0, auto) auto minmax(160px, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.chat-line:nth-child(even) {
    background: rgba(255, 255, 255, .012);
}

.chat-line:hover {
    background: rgba(22, 136, 255, .045);
}

.chat-time {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 9px;
    white-space: nowrap;
}

.chat-channel {
    overflow: hidden;
    color: var(--purple-light);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-channel:hover {
    text-decoration: underline;
}

.chat-badges {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.chat-badge {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface-raised);
    color: var(--muted-light);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .03em;
    white-space: nowrap;
}

.chat-badge i {
    font-style: normal;
}

.chat-badge.broadcaster {color: #fff; background: #d83c56; border-color: #d83c56;}
.chat-badge.moderator {color: #09180f; background: #50d890; border-color: #50d890;}
.chat-badge.vip {color: #fff; background: #e957ad; border-color: #e957ad;}
.chat-badge.subscriber {color: #fff; background: #1c6fbd; border-color: #1c6fbd;}
.chat-badge.founder {color: #241b03; background: #e8bf4f; border-color: #e8bf4f;}
.chat-badge.partner {color: #fff; background: #287fcf; border-color: #287fcf;}
.chat-badge.staff, .chat-badge.admin {color: #fff; background: #2d8de0; border-color: #2d8de0;}
.chat-badge.premium {color: #fff; background: #1685ba; border-color: #1685ba;}
.chat-badge.bits {color: #fff; background: #227dcc; border-color: #227dcc;}

.chat-username {
    color: #f0d6ff;
    font-size: 10px;
    white-space: nowrap;
}

.chat-message {
    min-width: 0;
    color: #e1dfe6;
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bits-badge {
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(22, 136, 255, .14);
    color: var(--purple-light);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.search-pagination {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 9px;
    border-top: 1px solid var(--border-soft);
}

.search-pagination span {
    color: var(--muted);
    font-size: 9px;
}

.search-pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.empty-state.compact {
    min-height: 400px;
}

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

    .database-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-line,
    .chat-column-headings {
        grid-template-columns: 68px 115px minmax(0, auto) auto minmax(170px, 1fr);
    }

    .chat-line .bits-badge {
        display: none;
    }
}

@media (max-width: 800px) {
    .ranking-grid,
    .database-totals {
        grid-template-columns: 1fr;
    }

    .chat-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-search {
        width: 100%;
    }

    .chat-column-headings {
        display: none;
    }

    .chat-line {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 4px 8px;
        padding: 10px 12px;
    }

    .chat-time {
        grid-column: 1;
    }

    .chat-channel {
        grid-column: 2;
    }

    .chat-badges {
        grid-column: 1 / -1;
    }

    .chat-username {
        grid-column: 1;
    }

    .chat-message {
        grid-column: 2;
    }
}


/* V7: vernieuwde events en gebruikersprofielen */
.profile-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-link:hover strong,
.profile-link:hover {
    color: var(--purple-light);
}

.profile-link:disabled {
    cursor: default;
}

.events-page {
    padding-bottom: 14px;
}

.event-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    padding: 14px;
}

.event-summary-grid article {
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface));
}

.event-summary-grid article > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.event-summary-grid small {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.event-summary-grid strong {
    margin-top: 5px;
    font-size: 20px;
}

.event-summary-grid em {
    margin-top: 3px;
    color: var(--blue);
    font-size: 10px;
    font-style: normal;
}

.event-summary-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    font-weight: 900;
}

.event-summary-icon.gift {background: rgba(255, 180, 84, .12); color: var(--orange);}
.event-summary-icon.sub {background: rgba(22, 136, 255, .13); color: var(--purple-light);}
.event-summary-icon.cheer {background: rgba(100, 181, 255, .12); color: var(--blue);}
.event-summary-icon.donation {background: rgba(49, 208, 170, .12); color: var(--green);}

.event-toolbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .016);
}

.event-toolbar h3 {
    margin: 0;
    font-size: 13px;
}

.event-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.event-filters button {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-raised);
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 800;
}

.event-filters button.active {
    border-color: var(--purple);
    background: rgba(22, 136, 255, .15);
    color: #fff;
}

.event-timeline {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 20px 5px;
}

.event-timeline::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 39px;
    width: 1px;
    background: var(--border);
}

.timeline-event {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 12px;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    padding-top: 12px;
}

.timeline-marker span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--purple-light);
    box-shadow: 0 0 0 6px var(--surface);
    font-weight: 900;
}

.timeline-event.gift .timeline-marker span {color: var(--orange);}
.timeline-event.cheer .timeline-marker span {color: var(--blue);}
.timeline-event.donation .timeline-marker span {color: var(--green);}

.timeline-card {
    padding: 14px 15px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(31,31,42,.98), rgba(23,23,31,.98));
    transition: .16s ease;
}

.timeline-card:hover {
    border-color: rgba(22, 136, 255, .38);
    transform: translateY(-1px);
}

.timeline-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.timeline-user {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.event-profile-name {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-user > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.timeline-value {
    flex: 0 0 auto;
    color: var(--purple-light);
    font-size: 13px;
}

.timeline-value.eur {color: var(--green);}
.timeline-value.usd {color: var(--blue);}

.timeline-card > p {
    margin: 11px 0 0;
    color: var(--muted-light);
    font-size: 10px;
    line-height: 1.55;
}

.timeline-card blockquote {
    margin: 10px 0 0;
    padding: 9px 11px;
    border-left: 2px solid var(--purple);
    border-radius: 0 7px 7px 0;
    background: rgba(0,0,0,.15);
    color: var(--muted);
    font-size: 9px;
}

.timeline-card footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 8px;
}

.timeline-card footer a {
    color: var(--purple-light);
    text-decoration: none;
}

.timeline-card footer time {
    margin-left: auto;
}

.profile-page {
    padding: 14px;
}

.profile-hero {
    min-height: 132px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background:
        radial-gradient(circle at 80% 20%, rgba(22, 136, 255,.16), transparent 22rem),
        linear-gradient(145deg, var(--surface-raised), var(--surface));
}

.profile-avatar {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 2px solid rgba(22, 136, 255,.45);
    border-radius: 50%;
    background: rgba(22, 136, 255,.14);
    color: var(--purple-light);
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 0 0 7px rgba(22, 136, 255,.07);
}

img.profile-avatar {
    display: block;
    object-fit: cover;
}

.profile-identity h2 {
    margin: 0;
    font-size: 22px;
}

.profile-identity > span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.profile-back {
    margin-left: auto;
    min-height: 35px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 9px;
    font-weight: 800;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 11px;
}

.profile-stat {
    min-height: 96px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface);
}

.profile-stat > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: rgba(22, 136, 255,.12);
    color: var(--purple-light);
    font-weight: 900;
}

.profile-stat > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.profile-stat small,
.profile-stat p {
    color: var(--muted);
    font-size: 8px;
}

.profile-stat strong {
    overflow: hidden;
    margin: 4px 0;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-stat p {
    margin: 0;
}

.profile-section {
    overflow: hidden;
    margin-top: 11px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: var(--surface);
}

.profile-section-heading {
    min-height: 61px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
}

.profile-section-heading h3 {
    margin: 0;
    font-size: 12px;
}

.profile-section-heading > span {
    color: var(--muted);
    font-size: 9px;
}

.profile-channel-table {
    overflow-x: auto;
}

.profile-channel-table table td,
.profile-channel-table table th {
    white-space: nowrap;
}

.money-eur {color: var(--green);}
.money-usd {color: var(--blue);}

.profile-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.profile-activity-list article {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-soft);
}

.profile-activity-list article:last-child {
    border-bottom: 0;
}

.profile-activity-list header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.profile-activity-list a {
    color: var(--purple-light);
    font-size: 9px;
    text-decoration: none;
}

.profile-activity-list time {
    color: var(--muted);
    font-size: 8px;
}

.profile-activity-list p {
    margin: 7px 0 0;
    color: var(--muted-light);
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width: 1250px) {
    .profile-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .event-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .event-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-columns,
    .profile-stat-grid,
    .event-summary-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .profile-back {
        width: 100%;
        margin-left: 0;
    }

    .timeline-card header,
    .timeline-card footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-card footer time {
        margin-left: 0;
    }
}


/* V8 — visuele vernieuwing en gecombineerde profielactiviteiten */
:root {
    --background: #0a0a0f;
    --sidebar: #111117;
    --surface: #15151d;
    --surface-raised: #1c1c27;
    --surface-hover: #232330;
    --border: #2c2c3a;
    --border-soft: #242430;
    --text: #f7f6fa;
    --muted: #908e9d;
    --muted-light: #bbb9c4;
    --purple: #1688ff;
    --purple-light: #7ac4ff;
    --green: #39d7aa;
    --red: #ff6178;
    --orange: #ffbc62;
    --blue: #68b9ff;
}

body {
    background:
        radial-gradient(circle at 74% -10%, rgba(22, 136, 255, .17), transparent 34rem),
        radial-gradient(circle at 100% 70%, rgba(18, 76, 138, .10), transparent 32rem),
        var(--background);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(18, 18, 25, .98), rgba(13, 13, 19, .98));
    box-shadow: 18px 0 55px rgba(0, 0, 0, .16);
}

.brand-icon {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .13);
    background: linear-gradient(145deg, #3aa3ff, #6832bd);
}

.brand-icon::after {
    content: "";
    position: absolute;
    inset: -70% -35%;
    transform: rotate(28deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}

.navigation-button {
    min-height: 46px;
    border-radius: 11px;
}

.navigation-button.active {
    box-shadow: inset 3px 0 0 var(--purple), 0 8px 24px rgba(0,0,0,.12);
}

.topbar {
    min-height: 82px;
    background: rgba(10, 10, 15, .76);
}

main {
    padding-top: 27px;
}

.statistic,
.content-card,
.profile-section,
.ranking-card {
    box-shadow: 0 16px 45px rgba(0, 0, 0, .16);
}

.statistic {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    border-radius: 14px;
}

.statistic::after {
    content: "";
    position: absolute;
    width: 95px;
    height: 95px;
    right: -42px;
    bottom: -52px;
    border-radius: 50%;
    background: rgba(22, 136, 255, .07);
}

.content-card {
    border-radius: 15px;
    background: rgba(21, 21, 29, .94);
    backdrop-filter: blur(18px);
}

.content-heading {
    min-height: 74px;
    padding-inline: 20px;
}

.profile-page {
    padding: 18px;
}

.profile-hero {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 25px;
    border-radius: 15px;
    background:
        linear-gradient(115deg, rgba(22, 136, 255,.16), transparent 48%),
        linear-gradient(145deg, #20202c, #16161e);
}

.profile-hero::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    top: -180px;
    right: -65px;
    border: 1px solid rgba(105, 185, 255,.14);
    border-radius: 50%;
    box-shadow:
        0 0 0 40px rgba(22, 136, 255,.025),
        0 0 0 80px rgba(22, 136, 255,.018);
}

.profile-avatar {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    border-width: 3px;
    background:
        linear-gradient(145deg, rgba(22, 136, 255,.34), rgba(14, 74, 135,.2));
    font-size: 32px;
}

.profile-identity {
    position: relative;
    z-index: 1;
}

.profile-identity h2 {
    font-size: 26px;
    letter-spacing: -.025em;
}

.profile-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 13px;
}

.profile-meta span {
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    background: rgba(0,0,0,.16);
    color: var(--muted-light);
    font-size: 8px;
}

.profile-meta b {
    color: #fff;
}

.profile-back {
    position: relative;
    z-index: 1;
    border-color: rgba(105, 185, 255,.25);
    background: rgba(22, 136, 255,.10);
    color: var(--purple-light);
}

.profile-back:hover {
    border-color: var(--purple);
    background: rgba(22, 136, 255,.18);
}

.profile-stat-grid {
    gap: 12px;
    margin-top: 13px;
}

.profile-stat {
    position: relative;
    overflow: hidden;
    min-height: 108px;
    border-radius: 12px;
    background: linear-gradient(145deg, #1d1d27, #16161e);
}

.profile-stat::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    right: -35px;
    bottom: -38px;
    border-radius: 50%;
    background: rgba(22, 136, 255,.08);
}

.profile-stat > span {
    position: relative;
    z-index: 1;
    width: 39px;
    height: 39px;
}

.profile-stat > div {
    position: relative;
    z-index: 1;
}

.profile-section {
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(27,27,37,.98), rgba(20,20,28,.98));
}

.profile-section-heading {
    min-height: 68px;
    padding-inline: 16px;
    background: rgba(255,255,255,.012);
}

.profile-columns {
    gap: 13px;
}

.profile-activity-list {
    max-height: 620px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) transparent;
}

.profile-activity-list > article {
    transition: background .15s ease;
}

.profile-activity-list > article:hover {
    background: rgba(22, 136, 255,.035);
}

.profile-activity-event {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    align-items: flex-start;
    padding: 13px 14px !important;
}

.profile-activity-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(22, 136, 255,.12);
    color: var(--purple-light);
    font-size: 13px;
    font-weight: 900;
}

.profile-activity-event.gift .profile-activity-icon {
    background: rgba(255,188,98,.12);
    color: var(--orange);
}

.profile-activity-event.bits .profile-activity-icon {
    background: rgba(104,185,255,.12);
    color: var(--blue);
}

.profile-activity-event.donation .profile-activity-icon {
    background: rgba(57,215,170,.12);
    color: var(--green);
}

.profile-activity-content {
    min-width: 0;
}

.profile-activity-content header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.profile-activity-content header > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-activity-content header strong {
    color: var(--text);
    font-size: 10px;
}

.profile-activity-content header a {
    font-size: 8px;
}

.profile-activity-value {
    margin: 8px 0 0 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800;
}

.profile-activity-content > small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.combined-label {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 7px;
    border: 1px solid rgba(22, 136, 255,.20);
    border-radius: 6px;
    background: rgba(22, 136, 255,.08);
    color: var(--purple-light);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.profile-channel-table tbody tr {
    transition: background .14s ease;
}

.profile-channel-table tbody tr:hover {
    background: rgba(22, 136, 255,.035);
}

.event-summary-grid article,
.timeline-card,
.database-total-card {
    border-radius: 13px;
}

.timeline-card {
    box-shadow: 0 10px 32px rgba(0,0,0,.11);
}

.ranking-card {
    border-radius: 13px;
}

.ranking-row {
    min-height: 50px;
}

@media (max-width: 850px) {
    .profile-page {
        padding: 11px;
    }

    .profile-hero {
        padding: 19px;
    }

    .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }

    .profile-identity h2 {
        font-size: 21px;
    }

    .profile-activity-list {
        max-height: none;
    }
}

/* V11 — doorlopende chat, profielenzoeker en uitgesproken blauwe interface */
:root {
    --background: #05111e;
    --sidebar: #071725;
    --surface: #0b1c2c;
    --surface-raised: #10283e;
    --surface-hover: #153653;
    --border: #245071;
    --border-soft: #173a56;
    --text: #f4f9ff;
    --muted: #84a4bd;
    --muted-light: #b7d0e3;
    --purple: #087fea;
    --purple-light: #72c5ff;
    --blue: #39a9ff;
}

html,
body {
    background-color: var(--background);
}

body {
    background:
        radial-gradient(circle at 76% -8%, rgba(0, 132, 255, .28), transparent 35rem),
        radial-gradient(circle at 100% 74%, rgba(0, 93, 190, .18), transparent 35rem),
        linear-gradient(135deg, #05111e, #071a2c 62%, #061522);
}

.sidebar {
    background: linear-gradient(180deg, rgba(7, 25, 41, .99), rgba(5, 17, 30, .99));
    border-right-color: rgba(61, 151, 220, .24);
    box-shadow: 18px 0 55px rgba(0, 31, 63, .24);
}

.topbar {
    background: rgba(5, 20, 34, .82);
    border-bottom-color: rgba(61, 151, 220, .22);
}

.brand-icon {
    background: linear-gradient(145deg, #2ca8ff, #0756bd);
    box-shadow: 0 10px 28px rgba(0, 126, 237, .34);
}

.content-card,
.statistic,
.ranking-card,
.profile-section,
.event-summary-grid article,
.timeline-card,
.database-total-card {
    border-color: rgba(66, 150, 211, .26);
    background-color: rgba(10, 29, 46, .96);
    box-shadow: 0 16px 46px rgba(0, 35, 68, .22);
}

.content-card {
    background: rgba(8, 25, 41, .95);
}

.profile-section,
.profile-stat {
    background: linear-gradient(145deg, rgba(15, 43, 66, .98), rgba(8, 27, 44, .98));
}

.profile-hero {
    background:
        linear-gradient(115deg, rgba(0, 137, 255, .27), transparent 52%),
        linear-gradient(145deg, #123b5c, #081c30);
}

.navigation-button.active {
    border-color: rgba(67, 169, 255, .42);
    background: linear-gradient(90deg, rgba(9, 126, 232, .26), rgba(9, 126, 232, .10));
    box-shadow: inset 3px 0 0 #2ba8ff, 0 8px 24px rgba(0, 56, 108, .22);
}

.chat-search input,
.users-search input,
.profile-message-search input {
    border-color: rgba(70, 153, 216, .42);
    background: #061827;
    color: var(--text);
}

.chat-search input:focus,
.users-search input:focus,
.profile-message-search input:focus {
    border-color: #2aa7ff;
    box-shadow: 0 0 0 3px rgba(25, 148, 255, .14);
}

.chat-badge.lead-moderator {
    color: #fff;
    border-color: #087fea;
    background: linear-gradient(135deg, #1ba5ff, #0757bd);
}

.chat-username {
    color: #8fd2ff;
}

.chat-page {
    min-width: 0;
}

.chat-live-heading {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(90deg, rgba(8, 127, 234, .14), rgba(8, 127, 234, .025));
}

.chat-live-heading > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.chat-live-heading strong {
    font-size: 10px;
}

.chat-live-heading small {
    color: var(--muted);
    font-size: 8px;
}

.chat-search-panel {
    margin: 13px;
    overflow: hidden;
    border: 1px solid rgba(47, 153, 233, .34);
    border-radius: 12px;
    background: rgba(7, 29, 48, .96);
    box-shadow: 0 16px 38px rgba(0, 38, 75, .24);
}

.chat-search-panel-heading {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(90deg, rgba(11, 130, 236, .18), transparent);
}

.chat-search-panel-heading h3 {
    margin: 0;
    font-size: 12px;
}

.chat-search-panel-heading > span {
    color: var(--purple-light);
    font-size: 9px;
    font-weight: 800;
}

.chat-search-results {
    max-height: 360px;
    overflow-y: auto;
    scrollbar-color: var(--purple) transparent;
    scrollbar-width: thin;
}

.chat-search-loading,
.chat-search-empty,
.chat-feed-empty {
    min-height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.chat-feed-empty {
    min-height: 260px;
    flex-direction: column;
}

.chat-feed-empty > span {
    color: var(--purple-light);
    font-size: 22px;
}

.users-page {
    padding: 15px;
}

.users-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 21px;
    border: 1px solid rgba(61, 159, 232, .30);
    border-radius: 14px;
    background:
        radial-gradient(circle at 95% 0%, rgba(33, 160, 255, .20), transparent 22rem),
        linear-gradient(135deg, #103754, #081d31);
}

.users-hero h3,
.users-hero p {
    margin: 0;
}

.users-hero h3 {
    font-size: 16px;
}

.users-hero > div > p:last-child {
    max-width: 560px;
    margin-top: 7px;
    color: var(--muted-light);
    font-size: 9px;
    line-height: 1.55;
}

.users-search,
.profile-message-search {
    display: flex;
    gap: 7px;
}

.users-search {
    width: min(640px, 58%);
}

.users-search input,
.profile-message-search input {
    min-width: 0;
    flex: 1;
    height: 37px;
    padding: 0 11px;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    outline: none;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 13px;
}

.user-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 12px;
    padding: 13px;
    border: 1px solid rgba(56, 137, 199, .25);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(14, 42, 65, .96), rgba(8, 27, 44, .96));
    color: var(--text);
    text-align: left;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.user-card:hover {
    transform: translateY(-1px);
    border-color: rgba(54, 169, 255, .62);
    background: linear-gradient(145deg, rgba(16, 53, 82, .98), rgba(9, 34, 55, .98));
}

.user-card-avatar {
    grid-row: 1 / span 3;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(103, 195, 255, .35);
    border-radius: 13px;
    background: linear-gradient(145deg, #168ee8, #084b9c);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    object-fit: cover;
}

.user-card-identity,
.user-card-metrics {
    min-width: 0;
    display: flex;
}

.user-card-identity {
    flex-direction: column;
}

.user-card-identity strong,
.user-card-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-identity strong {
    font-size: 11px;
}

.user-card-identity small,
.user-card time {
    color: var(--muted);
    font-size: 8px;
}

.user-card-metrics {
    grid-column: 2 / span 2;
    gap: 6px;
    flex-wrap: wrap;
}

.user-card-metrics span {
    padding: 4px 6px;
    border: 1px solid rgba(66, 150, 211, .22);
    border-radius: 6px;
    background: rgba(0, 82, 151, .12);
    color: var(--muted-light);
    font-size: 7px;
}

.user-card-metrics b {
    color: #fff;
}

.user-card > i {
    grid-column: 3;
    grid-row: 1;
    color: var(--purple-light);
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
}

.users-pagination {
    margin-top: 13px;
}

.profile-message-heading {
    border-bottom: 0;
}

.profile-message-search {
    padding: 0 13px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.profile-message-pagination {
    min-height: 48px;
}

@media (max-width: 1050px) {
    .users-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .users-search {
        width: 100%;
    }
}

@media (max-width: 800px) {
    .users-page {
        padding: 10px;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .users-search,
    .profile-message-search {
        flex-wrap: wrap;
    }

    .users-search input,
    .profile-message-search input {
        flex-basis: 100%;
    }

    .chat-live-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-search-panel {
        margin: 9px;
    }
}

/* V12 — live klok, kanaalonderzoek en moderatielog */
.sidebar-footer time {
    margin-top: 4px;
    color: #8fd2ff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .02em;
}

.chat-search select {
    height: 35px;
    padding: 0 9px;
    border: 1px solid rgba(70, 153, 216, .42);
    border-radius: 8px;
    outline: none;
    background: #061827;
    color: var(--text);
    font-size: 9px;
    font-weight: 700;
}

.matched-channel-section {
    border-bottom: 1px solid var(--border-soft);
    background: rgba(5, 24, 40, .76);
}

.matched-channel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px 5px;
}

.matched-channel-heading strong {
    font-size: 10px;
}

.matched-channel-heading small {
    color: var(--muted);
    font-size: 8px;
}

.matched-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    max-height: 255px;
    padding: 8px 13px 13px;
    overflow-y: auto;
    scrollbar-color: var(--purple) transparent;
    scrollbar-width: thin;
}

.matched-channel-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
    padding: 8px;
    border: 1px solid rgba(64, 146, 208, .24);
    border-radius: 9px;
    background: rgba(16, 48, 73, .62);
    color: var(--text);
    text-decoration: none;
}

.matched-channel-card:hover {
    border-color: rgba(64, 172, 255, .58);
    background: rgba(19, 64, 98, .78);
}

.matched-channel-card img,
.matched-channel-card > .channel-avatar {
    grid-row: 1 / span 2;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.matched-channel-card > span:not(.channel-avatar) {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.matched-channel-card strong,
.matched-channel-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.matched-channel-card strong {
    font-size: 9px;
}

.matched-channel-card small,
.matched-channel-card time {
    color: var(--muted);
    font-size: 7px;
}

.matched-channel-card b {
    color: var(--purple-light);
    font-size: 9px;
}

.matched-channel-card time {
    grid-column: 2 / span 2;
}

.profile-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-moderation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-moderation-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-soft);
}

.profile-moderation-row:nth-child(odd) {
    border-right: 1px solid var(--border-soft);
}

.profile-moderation-row > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 79, 105, .12);
    color: var(--red);
    font-weight: 900;
}

.profile-moderation-row.timeout > span {
    background: rgba(255, 188, 98, .12);
    color: var(--orange);
}

.profile-moderation-row > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-moderation-row strong {
    font-size: 9px;
}

.profile-moderation-row a {
    color: var(--purple-light);
    font-size: 8px;
    text-decoration: none;
}

.profile-moderation-row time {
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.ban-page {
    padding: 15px;
}

.ban-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ban-summary-grid article {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(66, 150, 211, .26);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 43, 66, .98), rgba(8, 27, 44, .98));
}

.ban-summary-grid article > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 79, 105, .11);
    color: var(--red);
    font-size: 14px;
    font-weight: 900;
}

.ban-summary-grid article > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ban-summary-grid small {
    color: var(--muted);
    font-size: 8px;
}

.ban-summary-grid strong {
    margin-top: 4px;
    font-size: 17px;
}

.ban-toolbar {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(360px, 1.25fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(8, 29, 47, .92);
}

.ban-toolbar h3,
.ban-toolbar p {
    margin: 0;
}

.ban-toolbar > div > small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
}

.ban-search,
.ban-filters {
    display: flex;
    gap: 6px;
}

.ban-search input {
    min-width: 0;
    flex: 1;
    height: 35px;
    padding: 0 10px;
    border: 1px solid rgba(70, 153, 216, .42);
    border-radius: 8px;
    outline: none;
    background: #061827;
    color: var(--text);
}

.ban-filters button.active {
    border-color: rgba(50, 168, 255, .55);
    background: rgba(8, 127, 234, .22);
    color: #fff;
}

.ban-list {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(8, 27, 44, .92);
}

.ban-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: 38px minmax(150px, .65fr) minmax(220px, 1.35fr) auto;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--border-soft);
}

.ban-row:last-child {
    border-bottom: 0;
}

.ban-row:hover {
    background: rgba(19, 72, 109, .24);
}

.ban-row-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 79, 105, .12);
    color: var(--red);
    font-weight: 900;
}

.ban-row.timeout .ban-row-icon {
    background: rgba(255, 188, 98, .12);
    color: var(--orange);
}

.ban-row-person,
.ban-row-action {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ban-row-person button {
    overflow: hidden;
    color: #a8dcff;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ban-row-person small,
.ban-row-action span,
.ban-row > time {
    color: var(--muted);
    font-size: 8px;
}

.ban-row-action strong {
    font-size: 10px;
}

.ban-row-action a {
    color: var(--purple-light);
    text-decoration: none;
}

.ban-row > time {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .matched-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ban-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .ban-filters {
        grid-column: 1 / -1;
    }
}

@media (max-width: 850px) {
    .profile-stat-grid,
    .ban-summary-grid,
    .profile-moderation-list,
    .matched-channel-grid {
        grid-template-columns: 1fr;
    }

    .profile-moderation-row:nth-child(odd) {
        border-right: 0;
    }

    .ban-toolbar {
        grid-template-columns: 1fr;
    }

    .ban-filters {
        grid-column: auto;
    }

    .ban-search {
        flex-wrap: wrap;
    }

    .ban-search input {
        flex-basis: 100%;
    }

    .ban-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .ban-row-action,
    .ban-row > time {
        grid-column: 2;
    }

    .matched-channel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* V13 — directe profiel- en kanaalsuggesties */
.users-search {
    position: relative;
}

.profile-suggestions {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: min(590px, 70vh);
    overflow-y: auto;
    border: 1px solid rgba(66, 172, 255, .48);
    border-radius: 12px;
    background: rgba(5, 22, 37, .99);
    box-shadow: 0 24px 65px rgba(0, 17, 35, .58), 0 0 0 1px rgba(39, 139, 214, .08);
    scrollbar-color: var(--purple) transparent;
    scrollbar-width: thin;
}

.profile-suggestions section + section {
    border-top: 1px solid var(--border-soft);
}

.profile-suggestions h4 {
    position: sticky;
    z-index: 1;
    top: 0;
    margin: 0;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(57, 139, 201, .16);
    background: rgba(8, 34, 55, .98);
    color: #72c5ff;
    font-size: 8px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.profile-suggestion-entry {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid rgba(38, 91, 130, .25);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    text-decoration: none;
}

.profile-suggestion-entry:hover,
.profile-suggestion-entry.active {
    background: linear-gradient(90deg, rgba(8, 127, 234, .25), rgba(8, 127, 234, .07));
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(88, 181, 248, .32);
    border-radius: 9px;
    background: linear-gradient(145deg, #148edc, #084d91);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    object-fit: cover;
}

.profile-suggestion-entry > span:not(.suggestion-avatar) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-suggestion-entry strong,
.profile-suggestion-entry small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-suggestion-entry strong {
    font-size: 10px;
}

.profile-suggestion-entry small {
    color: var(--muted);
    font-size: 8px;
}

.profile-suggestion-entry em {
    color: var(--muted-light);
    font-size: 8px;
    font-style: normal;
    white-space: nowrap;
}

.profile-suggestion-entry em.live {
    color: #59dcae;
}

.suggestion-loading,
.suggestion-empty {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px;
    color: var(--muted);
    font-size: 9px;
    text-align: center;
}

.suggestion-show-all {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-top: 1px solid rgba(65, 151, 216, .28);
    border-radius: 0;
    background: rgba(8, 127, 234, .14);
    color: var(--purple-light);
    font-size: 9px;
    font-weight: 800;
}

.suggestion-show-all:hover {
    background: rgba(8, 127, 234, .24);
}

@media (max-width: 800px) {
    .profile-suggestions {
        top: calc(100% + 6px);
        max-height: 60vh;
    }

    .profile-suggestion-entry {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .profile-suggestion-entry em {
        grid-column: 2;
    }
}

/* V15 — uitgebreide moderatielog en highlights */
.moderation-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.moderation-connection {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(54, 169, 255, .30);
    border-radius: 11px;
    background: linear-gradient(90deg, rgba(8, 127, 234, .16), rgba(7, 34, 54, .75));
}

.moderation-connection.error {
    border-color: rgba(255, 79, 105, .35);
}

.moderation-connection > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.moderation-connection strong {
    font-size: 9px;
}

.moderation-connection small {
    color: var(--muted);
    font-size: 8px;
}

.moderation-connection code {
    padding: 7px 9px;
    overflow: hidden;
    border: 1px solid rgba(85, 178, 245, .24);
    border-radius: 7px;
    background: rgba(3, 18, 31, .78);
    color: #8ed1ff;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moderation-row {
    grid-template-columns: 38px minmax(180px, .7fr) minmax(300px, 1.3fr) auto;
    align-items: start;
    padding-top: 13px;
    padding-bottom: 13px;
}

.moderation-row .ban-row-person {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.moderation-row .ban-row-person > img,
.moderation-person-fallback {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(80, 177, 245, .28);
    border-radius: 10px;
    background: linear-gradient(145deg, #148edc, #084d91);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    object-fit: cover;
}

.moderation-row .ban-row-person > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.moderation-row .ban-row-action {
    gap: 4px;
}

.moderation-row .ban-row-action span b {
    color: #b9e5ff;
}

.moderation-reason,
.moderation-row blockquote {
    margin: 3px 0 0;
    color: var(--muted-light);
    font-size: 8px;
    line-height: 1.5;
}

.moderation-row blockquote {
    padding: 7px 9px;
    border-left: 2px solid rgba(75, 177, 249, .48);
    border-radius: 0 6px 6px 0;
    background: rgba(5, 22, 36, .72);
    color: #d7ebf8;
}

.moderation-row-meta {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.moderation-row-meta time {
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.moderation-source {
    padding: 4px 6px;
    border: 1px solid rgba(86, 179, 245, .27);
    border-radius: 5px;
    background: rgba(8, 127, 234, .12);
    color: #82cfff;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.moderation-source.eventsub,
.moderation-source.irc\+eventsub {
    border-color: rgba(56, 211, 173, .30);
    background: rgba(56, 211, 173, .10);
    color: #6ce3c3;
}

.moderation-row.warning .ban-row-icon,
.moderation-row.warn .ban-row-icon {
    background: rgba(255, 188, 98, .12);
    color: var(--orange);
}

.moderation-row.release .ban-row-icon,
.moderation-row.role .ban-row-icon {
    background: rgba(56, 211, 173, .11);
    color: #62dfbd;
}

.moderation-row.delete .ban-row-icon {
    background: rgba(112, 175, 224, .12);
    color: #85cfff;
}

.profile-moderation-row.warning > span,
.profile-moderation-row.warn > span {
    background: rgba(255, 188, 98, .12);
    color: var(--orange);
}

.profile-moderation-row.release > span,
.profile-moderation-row.role > span {
    background: rgba(56, 211, 173, .11);
    color: #62dfbd;
}

.profile-moderation-row.delete > span {
    background: rgba(112, 175, 224, .12);
    color: #85cfff;
}

.profile-moderation-row small,
.profile-moderation-row p,
.profile-moderation-row blockquote {
    margin: 0;
    color: var(--muted);
    font-size: 7px;
    line-height: 1.45;
}

.profile-moderation-row blockquote {
    padding: 5px 7px;
    border-left: 2px solid rgba(75, 177, 249, .4);
    background: rgba(5, 22, 36, .55);
    color: var(--muted-light);
}

.highlights-page {
    padding: 15px;
}

.highlight-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.highlight-summary-grid article {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(66, 150, 211, .26);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 43, 66, .98), rgba(8, 27, 44, .98));
}

.highlight-summary-grid article > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(8, 127, 234, .15);
    color: #74c8ff;
    font-size: 14px;
    font-weight: 900;
}

.highlight-summary-grid article > div {
    display: flex;
    flex-direction: column;
}

.highlight-summary-grid small {
    color: var(--muted);
    font-size: 8px;
}

.highlight-summary-grid strong {
    margin-top: 4px;
    font-size: 17px;
}

.highlight-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(470px, 1.2fr);
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(8, 29, 47, .92);
}

.highlight-toolbar h3,
.highlight-toolbar p {
    margin: 0;
}

.highlight-toolbar small {
    color: var(--muted);
    font-size: 8px;
}

.highlight-toolbar form {
    display: flex;
    gap: 7px;
}

.highlight-toolbar input,
.highlight-toolbar select,
.highlight-rule-form input,
.highlight-rule-form select {
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(70, 153, 216, .42);
    border-radius: 8px;
    outline: none;
    background: #061827;
    color: var(--text);
}

.highlight-toolbar input {
    flex: 1;
}

.highlight-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, .8fr);
    align-items: start;
    gap: 12px;
    margin-top: 12px;
}

.highlight-feed-panel,
.highlight-manager {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(8, 27, 44, .92);
}

.highlight-manager {
    position: sticky;
    top: 12px;
}

.highlight-panel-heading {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 39, 61, .9);
}

.highlight-panel-heading h3,
.highlight-panel-heading p {
    margin: 0;
}

.highlight-panel-heading > span {
    color: var(--muted);
    font-size: 8px;
}

.highlight-hits-list {
    min-height: 280px;
}

.highlight-hit {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    border-left: 3px solid #288fe3;
}

.highlight-hit:last-child {
    border-bottom: 0;
}

.highlight-hit:hover {
    background: rgba(17, 65, 100, .22);
}

.highlight-hit.color-cyan { border-left-color: #25c4e6; }
.highlight-hit.color-green { border-left-color: #38d3ad; }
.highlight-hit.color-orange { border-left-color: #ffb35f; }
.highlight-hit.color-red { border-left-color: #ff5f78; }

.highlight-hit-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 8px;
}

.highlight-hit-head time {
    margin-left: auto;
    white-space: nowrap;
}

.highlight-rule-badge {
    padding: 4px 7px;
    border: 1px solid rgba(60, 160, 235, .32);
    border-radius: 6px;
    background: rgba(8, 127, 234, .15);
    color: #85d0ff;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
}

.highlight-rule-badge.color-cyan { border-color: rgba(37,196,230,.35); background: rgba(37,196,230,.12); color: #66e3fb; }
.highlight-rule-badge.color-green { border-color: rgba(56,211,173,.35); background: rgba(56,211,173,.11); color: #6ce3c3; }
.highlight-rule-badge.color-orange { border-color: rgba(255,179,95,.35); background: rgba(255,179,95,.11); color: #ffc27d; }
.highlight-rule-badge.color-red { border-color: rgba(255,95,120,.35); background: rgba(255,95,120,.11); color: #ff8a9c; }

.highlight-hit-body {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
}

.highlight-hit-body > img,
.highlight-avatar-fallback {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(80, 177, 245, .28);
    border-radius: 10px;
    background: linear-gradient(145deg, #148edc, #084d91);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    object-fit: cover;
}

.highlight-hit-body header {
    display: flex;
    align-items: center;
    gap: 7px;
}

.highlight-hit-body header button {
    color: #b9e5ff;
    font-size: 10px;
    font-weight: 800;
}

.highlight-hit-body header small {
    color: var(--muted);
    font-size: 8px;
}

.highlight-hit-body header a {
    margin-left: auto;
    color: #74c8ff;
    font-size: 8px;
    text-decoration: none;
}

.highlight-hit-body p {
    margin: 7px 0 0;
    color: #d5e7f2;
    font-size: 10px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.highlight-hit-body mark {
    padding: 1px 3px;
    border-radius: 3px;
    background: #087fea;
    color: #fff;
}

.highlight-pagination {
    margin: 0;
    padding: 11px 13px;
    border-top: 1px solid var(--border-soft);
}

.highlight-rule-form {
    display: grid;
    gap: 9px;
    padding: 13px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(5, 23, 38, .65);
}

.highlight-rule-form label {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.highlight-rule-form label > span {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 700;
}

.highlight-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.highlight-rule-form .highlight-active {
    display: flex;
    align-items: center;
    gap: 7px;
}

.highlight-rule-form .highlight-active input {
    width: 14px;
    height: 14px;
}

.highlight-form-actions,
.highlight-rule-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.highlight-rule-form > small,
.highlight-viewer-note {
    color: var(--muted);
    font-size: 7px;
    line-height: 1.45;
}

.highlight-viewer-note {
    padding: 13px;
    border-bottom: 1px solid var(--border-soft);
}

.highlight-rule-list {
    max-height: 640px;
    overflow-y: auto;
}

.highlight-rule-card {
    display: grid;
    gap: 9px;
    padding: 12px 13px;
    border-bottom: 1px solid var(--border-soft);
    border-left: 3px solid #288fe3;
}

.highlight-rule-card.color-cyan { border-left-color: #25c4e6; }
.highlight-rule-card.color-green { border-left-color: #38d3ad; }
.highlight-rule-card.color-orange { border-left-color: #ffb35f; }
.highlight-rule-card.color-red { border-left-color: #ff5f78; }
.highlight-rule-card.inactive { opacity: .58; }

.highlight-rule-card > div:first-child {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 8px;
}

.highlight-rule-card strong {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.highlight-rule-card code,
.highlight-rule-card small {
    grid-column: 1 / -1;
}

.highlight-rule-card code {
    color: #9dd8ff;
    font-size: 8px;
    overflow-wrap: anywhere;
}

.highlight-rule-card small {
    color: var(--muted);
    font-size: 7px;
}

.highlight-rule-actions button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 7px;
}

.highlight-rule-actions button.danger {
    border-color: rgba(255, 79, 105, .28);
    color: #ff8b9c;
}

@media (max-width: 1250px) {
    .moderation-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .moderation-connection { grid-template-columns: 12px minmax(0, 1fr); }
    .moderation-connection code { grid-column: 2; }
    .highlight-layout { grid-template-columns: 1fr; }
    .highlight-manager { position: static; }
}

@media (max-width: 850px) {
    .moderation-summary-grid,
    .highlight-summary-grid { grid-template-columns: 1fr 1fr; }
    .moderation-row { grid-template-columns: 38px minmax(0, 1fr); }
    .moderation-row .ban-row-person,
    .moderation-row .ban-row-action,
    .moderation-row-meta { grid-column: 2; }
    .moderation-row-meta { align-items: flex-start; }
    .highlight-toolbar { grid-template-columns: 1fr; }
    .highlight-toolbar form { flex-wrap: wrap; }
    .highlight-toolbar input { flex-basis: 100%; }
}

@media (max-width: 560px) {
    .moderation-summary-grid,
    .highlight-summary-grid,
    .highlight-form-row { grid-template-columns: 1fr; }
    .moderation-connection code { display: none; }
    .highlight-hit-head { align-items: flex-start; flex-wrap: wrap; }
    .highlight-hit-head time { width: 100%; margin-left: 0; }
}

/* V16: applicatieaccounts en beveiligde sessielogin */
.account-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-copy strong {
    overflow: hidden;
    max-width: 130px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy small {
    color: var(--muted);
    font-size: 7px;
    font-weight: 600;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--muted-light);
    font-size: 14px;
    transition: .16s ease;
}

.logout-form button:hover {
    border-color: rgba(255, 92, 117, .55);
    color: #ff8ca0;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% -10%, rgba(8, 127, 234, .26), transparent 35rem),
        radial-gradient(circle at 100% 100%, rgba(31, 153, 255, .11), transparent 28rem),
        #080f18;
}

.login-shell {
    width: min(100%, 440px);
    margin: 0;
    padding: 0;
}

.login-panel {
    overflow: hidden;
    border: 1px solid rgba(83, 171, 238, .25);
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(16, 35, 53, .98), rgba(8, 20, 32, .98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, .46), 0 0 0 1px rgba(8, 127, 234, .05) inset;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 23px;
    border-bottom: 1px solid rgba(83, 171, 238, .14);
    background: rgba(5, 20, 32, .48);
}

.login-brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #1595f5, #086fc9);
    box-shadow: 0 10px 28px rgba(8, 127, 234, .3);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.login-brand div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.login-brand strong { font-size: 13px; }
.login-brand small { color: var(--muted); font-size: 8px; }

.login-copy {
    padding: 25px 25px 8px;
}

.login-copy h1 {
    font-size: 25px;
}

.login-copy > p:last-child {
    margin: 8px 0 0;
    color: var(--muted-light);
    font-size: 10px;
}

.login-notice {
    margin: 12px 25px 0;
    padding: 10px 12px;
    border: 1px solid rgba(83, 171, 238, .22);
    border-radius: 9px;
    background: rgba(8, 127, 234, .09);
    color: #bce6ff;
    font-size: 9px;
    line-height: 1.5;
}

.login-notice.error {
    border-color: rgba(255, 92, 117, .3);
    background: rgba(255, 92, 117, .09);
    color: #ffb1bd;
}

.login-notice.warning {
    border-color: rgba(255, 180, 84, .32);
    background: rgba(255, 180, 84, .08);
    color: #ffd296;
}

.login-notice.success {
    border-color: rgba(49, 208, 170, .3);
    background: rgba(49, 208, 170, .08);
    color: #8fe6cf;
}

.login-form {
    display: grid;
    gap: 13px;
    padding: 20px 25px 13px;
}

.login-form label {
    display: grid;
    gap: 7px;
}

.login-form label > span {
    color: #c8dcea;
    font-size: 9px;
    font-weight: 800;
}

.login-form input,
.login-form select {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid rgba(83, 171, 238, .2);
    border-radius: 9px;
    outline: none;
    background: rgba(5, 17, 27, .9);
    color: #fff;
    font-size: 11px;
    transition: .16s ease;
}

.login-form input:focus,
.login-form select:focus {
    border-color: #1688ff;
    box-shadow: 0 0 0 3px rgba(22, 136, 255, .13);
}

.login-form button {
    min-height: 44px;
    margin-top: 4px;
    border: 1px solid #2699f0;
    border-radius: 9px;
    background: linear-gradient(135deg, #1688ff, #0875d2);
    box-shadow: 0 11px 28px rgba(8, 127, 234, .22);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.login-form button:hover {
    filter: brightness(1.08);
}

.login-security {
    margin: 0;
    padding: 4px 25px 22px;
    color: #71889a;
    font-size: 7px;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 760px) {
    .account-copy { display: none; }
    .account { padding-left: 7px; }
}

@media (max-width: 480px) {
    .login-body { padding: 12px; }
    .login-copy,
    .login-form { padding-right: 19px; padding-left: 19px; }
    .login-notice { margin-right: 19px; margin-left: 19px; }
}
