@font-face {
    font-family: 'ObelixPro';
    src: url('/assets/fonts/ObelixPro.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Press2P';
    src: url('/assets/fonts/Press2P.ttf') format('truetype');
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #000;
    --panel: #0b0b0d;
    --panel-strong: #111116;
    --text: #eef3ff;
    --muted: #9ba4bd;
    --accent: #a58ad1;
    --accent-2: #cf1ef9;
    --twitch: #9147ff;
    --danger: #ff5d62;
    --success: #54d99f;
    --border: rgba(255,255,255,.09);
    --shadow: 0 24px 60px rgba(0,0,0,.46);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #000; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: #000;
    font-family: 'ObelixPro', Inter, system-ui, sans-serif;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.mod-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(165,138,209,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(165,138,209,.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 82%);
}

.container {
    position: relative;
    z-index: 2;
    width: min(1320px, calc(100% - 32px));
    margin-inline: auto;
}

.mod-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px max(20px, calc((100vw - 1320px) / 2));
    background: rgba(0,0,0,.86);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.mod-brand { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.mod-brand__logo { width: 48px; height: 48px; object-fit: contain; }
.mod-brand span { display: grid; gap: 2px; }
.mod-brand strong { font-size: 15px; letter-spacing: .04em; }
.mod-brand small { color: var(--accent); font-family: 'Press2P', monospace; font-size: 8px; }

.mod-nav { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.mod-nav a { padding: 10px 13px; border-radius: 8px; color: var(--muted); transition: .2s ease; }
.mod-nav a:hover { color: #fff; background: rgba(165,138,209,.10); box-shadow: 0 0 22px rgba(207,30,249,.10); }

.mod-user { display: flex; align-items: center; gap: 10px; }
.mod-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.16); }
.mod-user form { margin: 0; }
.mod-link-button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px; }
.mod-link-button:hover { color: #fff; }

.mod-main { padding-block: 52px 80px; }
.mod-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px max(20px, calc((100vw - 1320px) / 2));
    color: #747b8e;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.mod-hero {
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    align-items: center;
    gap: 70px;
}
.mod-hero h1, .mod-page-head h1, .mod-channel-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5.4vw, 72px);
    line-height: 1.03;
    letter-spacing: -.035em;
}
.mod-hero p { max-width: 760px; margin: 24px 0 32px; color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 18px; }
.mod-eyebrow { display: inline-block; margin-bottom: 14px; color: var(--accent-2); font-family: 'Press2P', monospace; font-size: 10px; letter-spacing: .09em; }

.mod-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(180deg, rgba(165,138,209,.30), rgba(137,107,179,.18));
    box-shadow: 0 10px 28px rgba(0,0,0,.24);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mod-button:hover { transform: translateY(-2px); border-color: rgba(207,30,249,.55); box-shadow: 0 14px 34px rgba(0,0,0,.34), 0 0 24px rgba(207,30,249,.13); }
.mod-button:disabled { opacity: .55; cursor: wait; transform: none; }
.mod-button--twitch { min-height: 56px; padding-inline: 26px; background: linear-gradient(135deg, #9147ff, #6e2ad4); border-color: rgba(255,255,255,.18); }
.mod-button--secondary { background: #0b0b0d; }
.mod-button--full { width: 100%; }
.mod-button__icon { font-size: 21px; }

.mod-hero__preview { display: grid; gap: 16px; perspective: 900px; }
.mod-preview-card, .mod-feature-card, .mod-channel-card, .mod-module-card, .mod-settings-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(11,11,13,.88);
    box-shadow: var(--shadow);
}
.mod-preview-card { display: flex; align-items: center; gap: 15px; min-height: 105px; padding: 20px; transform: rotateY(-5deg); }
.mod-preview-card:nth-child(2) { margin-left: 34px; }
.mod-preview-card:nth-child(3) { margin-left: 12px; }
.mod-preview-card:hover { border-color: rgba(207,30,249,.42); box-shadow: var(--shadow), 0 0 36px rgba(207,30,249,.10); }
.mod-preview-card strong, .mod-preview-card small { display: block; }
.mod-preview-card small { color: var(--muted); margin-top: 4px; font-family: Inter, system-ui, sans-serif; }
.mod-preview-avatar { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(165,138,209,.13); border: 1px solid rgba(165,138,209,.27); }
.mod-preview-dot { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; background: var(--danger); box-shadow: 0 0 24px rgba(255,93,98,.65); animation: modPulse 1.5s ease-in-out infinite; }

.mod-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mod-feature-card { padding: 22px; transition: .2s ease; }
.mod-feature-card:hover, .mod-module-card:hover, .mod-channel-card:hover { transform: translateY(-3px); border-color: rgba(207,30,249,.42); box-shadow: var(--shadow), 0 0 34px rgba(207,30,249,.09); }
.mod-feature-card h2 { margin: 0 0 10px; font-size: 17px; }
.mod-feature-card p, .mod-module-card p, .mod-settings-card p { margin: 0; color: var(--muted); font-family: Inter, system-ui, sans-serif; }

.mod-page-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 32px; }
.mod-page-head h1 { font-size: clamp(34px, 4vw, 58px); }
.mod-page-head p, .mod-channel-hero p { max-width: 750px; margin: 12px 0 0; color: var(--muted); font-family: Inter, system-ui, sans-serif; }

.mod-channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mod-channel-card { position: relative; display: flex; flex-direction: column; gap: 20px; padding: 20px; overflow: hidden; transition: .2s ease; }
.mod-channel-card.is-live::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--danger); box-shadow: 0 0 22px rgba(255,93,98,.65); }
.mod-channel-card__top { display: flex; align-items: center; gap: 13px; }
.mod-channel-card__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.16); }
.mod-channel-card__avatar--fallback { display: grid; place-items: center; background: rgba(165,138,209,.14); }
.mod-channel-card__identity { min-width: 0; flex: 1; }
.mod-channel-card__identity h2 { overflow: hidden; margin: 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mod-channel-card__identity span { display: block; overflow: hidden; color: var(--muted); font-family: Inter, system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.mod-role-badge, .mod-status-pill { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 999px; color: #d9cdf1; background: rgba(165,138,209,.12); border: 1px solid rgba(165,138,209,.22); font-family: Inter, system-ui, sans-serif; font-size: 11px; }
.mod-stream-status { min-height: 92px; display: grid; align-content: start; gap: 6px; padding: 14px; border-radius: 8px; background: rgba(255,255,255,.025); }
.mod-stream-status strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mod-stream-status small { color: var(--muted); font-family: Inter, system-ui, sans-serif; }
.mod-live-badge, .mod-offline-badge { display: inline-flex; width: fit-content; align-items: center; gap: 7px; color: var(--danger); font-family: 'Press2P', monospace; font-size: 8px; }
.mod-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 12px rgba(255,93,98,.7); }
.mod-offline-badge { color: #858b9b; }

.mod-channel-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin-bottom: 34px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11,11,13,.84); }
.mod-channel-hero > img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.16); }
.mod-channel-hero h1 { font-size: clamp(34px, 4vw, 58px); }
.mod-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mod-module-card { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; padding: 22px; transition: .2s ease; }
.mod-module-card__icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 10px; color: #fff; background: rgba(165,138,209,.13); border: 1px solid rgba(165,138,209,.26); }
.mod-module-card h2 { margin: 0 0 9px; font-size: 19px; }
.mod-module-card p { flex: 1; }
.mod-status-pill { margin-top: 18px; }

.mod-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mod-settings-card { padding: 24px; }
.mod-settings-card h2 { margin: 0 0 20px; }
.mod-settings-card dl { margin: 0; }
.mod-settings-card dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mod-settings-card dt { color: var(--muted); font-family: Inter, system-ui, sans-serif; }
.mod-settings-card dd { margin: 0; text-align: right; }
.mod-scope-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-scope-list code { padding: 7px 9px; border-radius: 7px; color: #dccdf5; background: rgba(165,138,209,.11); border: 1px solid rgba(165,138,209,.20); }
.mod-muted { margin-top: 18px !important; font-size: 13px; }

.mod-flashes { padding-top: 16px; }
.mod-flash { padding: 13px 16px; border: 1px solid var(--border); border-radius: 8px; background: #111; }
.mod-flash--success { border-color: rgba(84,217,159,.38); color: #a8f0d1; }
.mod-flash--warning { border-color: rgba(255,194,92,.38); color: #ffd99a; }
.mod-flash--error { border-color: rgba(255,93,98,.38); color: #ffb0b3; }

.mod-empty { display: grid; justify-items: center; gap: 12px; padding: 70px 24px; text-align: center; border: 1px dashed rgba(255,255,255,.12); border-radius: 12px; background: rgba(11,11,13,.58); }
.mod-empty h1, .mod-empty h2 { margin: 0; }
.mod-empty p { max-width: 650px; margin: 0 0 12px; color: var(--muted); font-family: Inter, system-ui, sans-serif; }
.mod-empty__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); border: 1px solid rgba(255,93,98,.35); background: rgba(255,93,98,.08); font-size: 26px; }

@keyframes modPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.88); } }

@media (max-width: 1040px) {
    .mod-topbar { flex-wrap: wrap; gap: 10px 20px; }
    .mod-nav { order: 3; width: 100%; overflow-x: auto; }
    .mod-user { margin-left: auto; }
    .mod-hero { grid-template-columns: 1fr; gap: 36px; padding-block: 35px; }
    .mod-hero__preview { max-width: 720px; }
    .mod-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mod-channel-grid, .mod-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .container { width: min(100% - 20px, 1320px); }
    .mod-topbar { position: relative; min-height: auto; padding: 10px; }
    .mod-brand { min-width: 0; margin-right: auto; }
    .mod-brand strong { font-size: 12px; }
    .mod-brand small { font-size: 6px; }
    .mod-user > span { display: none; }
    .mod-nav { gap: 2px; }
    .mod-nav a { padding: 8px 10px; font-size: 12px; }
    .mod-main { padding-block: 32px 56px; }
    .mod-hero { min-height: auto; }
    .mod-hero h1 { font-size: clamp(35px, 12vw, 54px); }
    .mod-hero p { font-size: 16px; }
    .mod-preview-card { transform: none; min-height: 92px; }
    .mod-preview-card:nth-child(n) { margin-left: 0; }
    .mod-feature-grid, .mod-channel-grid, .mod-module-grid, .mod-settings-grid { grid-template-columns: 1fr; }
    .mod-page-head { align-items: stretch; flex-direction: column; }
    .mod-page-head form .mod-button { width: 100%; }
    .mod-channel-hero { grid-template-columns: auto 1fr; }
    .mod-channel-hero .mod-button { grid-column: 1 / -1; }
    .mod-channel-hero > img { width: 68px; height: 68px; }
    .mod-footer { flex-direction: column; padding-inline: 14px; }
}

/* ===== Moderation tools v2 ===== */
.mod-module-link { display: block; min-width: 0; }
.mod-module-link .mod-module-card { height: 100%; }
.mod-module-card.is-active { border-color: rgba(84,217,159,.25); }
.mod-status-pill.is-ready { color: #a8f0d1; border-color: rgba(84,217,159,.32); background: rgba(84,217,159,.09); }

.mod-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -18px 0 26px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}
.mod-breadcrumbs a:hover { color: #fff; }
.mod-breadcrumbs strong { color: #fff; }

.mod-permission-card,
.mod-search-card,
.mod-user-profile,
.mod-history-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(11,11,13,.88);
    box-shadow: var(--shadow);
}

.mod-permission-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 20px;
    border-color: rgba(145,71,255,.34);
}
.mod-permission-card > div { display: flex; align-items: center; gap: 15px; }
.mod-permission-card__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: rgba(145,71,255,.15);
    border: 1px solid rgba(145,71,255,.35);
}
.mod-permission-card h2 { margin: 0 0 5px; font-size: 18px; }
.mod-permission-card p { margin: 0; color: var(--muted); font-family: Inter, system-ui, sans-serif; }

.mod-search-card { margin-bottom: 20px; padding: 22px; }
.mod-user-search { display: grid; gap: 10px; }
.mod-user-search > label,
.mod-action-card label {
    color: #d9deef;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}
.mod-user-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }

.mod-user-search input,
.mod-action-card select,
.mod-action-card textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: #fff;
    background: #070709;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    outline: none;
    font-family: Inter, system-ui, sans-serif;
}
.mod-action-card textarea { min-height: 88px; resize: vertical; }
.mod-user-search input:focus,
.mod-action-card select:focus,
.mod-action-card textarea:focus {
    border-color: rgba(207,30,249,.55);
    box-shadow: 0 0 0 3px rgba(207,30,249,.08);
}

.mod-inline-error,
.mod-inline-warning {
    margin: 0 0 20px;
    padding: 13px 16px;
    border-radius: 8px;
    font-family: Inter, system-ui, sans-serif;
}
.mod-inline-error { color: #ffb0b3; background: rgba(255,93,98,.08); border: 1px solid rgba(255,93,98,.35); }
.mod-inline-warning { color: #ffd99a; background: rgba(255,194,92,.07); border: 1px solid rgba(255,194,92,.30); }

.mod-user-profile { margin-bottom: 22px; padding: 24px; }
.mod-user-profile__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.mod-user-profile__identity img,
.mod-user-profile__fallback {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.16);
}
.mod-user-profile__fallback { display: grid; place-items: center; background: rgba(165,138,209,.14); font-size: 30px; }
.mod-user-profile__identity h2 { margin: 0; font-size: clamp(26px, 3vw, 42px); }
.mod-user-profile__identity p,
.mod-user-profile__identity small { display: block; margin: 4px 0 0; color: var(--muted); font-family: Inter, system-ui, sans-serif; }

.mod-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mod-action-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.022);
}
.mod-action-card--danger { border-color: rgba(255,93,98,.22); }
.mod-action-card--success { border-color: rgba(84,217,159,.22); }
.mod-action-card h3 { margin: 0 0 8px; font-size: 18px; }
.mod-action-card > p { min-height: 48px; margin: 0 0 16px; color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 14px; }
.mod-action-card form { display: grid; gap: 9px; }

.mod-button--danger { background: linear-gradient(180deg, rgba(255,93,98,.30), rgba(180,40,48,.20)); border-color: rgba(255,93,98,.42); }
.mod-button--warning { background: linear-gradient(180deg, rgba(255,194,92,.24), rgba(154,100,25,.18)); border-color: rgba(255,194,92,.36); }
.mod-button--success { background: linear-gradient(180deg, rgba(84,217,159,.24), rgba(36,134,91,.18)); border-color: rgba(84,217,159,.36); }

.mod-history-card { padding: 22px; }
.mod-section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.mod-section-title h2 { margin: 0; font-size: 25px; }
.mod-section-title a { color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 13px; }
.mod-section-title a:hover { color: #fff; }
.mod-history-list { display: grid; }
.mod-history-list article {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    align-items: start;
    gap: 15px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.mod-history-list article:first-child { border-top: 0; }
.mod-history-type { color: #dccdf5; font-family: Inter, system-ui, sans-serif; font-size: 12px; }
.mod-history-list strong,
.mod-history-list small { display: block; }
.mod-history-list small,
.mod-history-list time,
.mod-history-list p { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 12px; }
.mod-history-list p { margin: 5px 0 0; }
.mod-history-list time { white-space: nowrap; }

@media (max-width: 980px) {
    .mod-action-grid { grid-template-columns: 1fr; }
    .mod-action-card > p { min-height: 0; }
}

@media (max-width: 700px) {
    .mod-permission-card { align-items: stretch; flex-direction: column; }
    .mod-permission-card .mod-button { width: 100%; }
    .mod-user-search > div { grid-template-columns: 1fr; }
    .mod-user-profile { padding: 16px; }
    .mod-user-profile__identity { grid-template-columns: auto 1fr; }
    .mod-user-profile__identity .mod-button { grid-column: 1 / -1; }
    .mod-user-profile__identity img,
    .mod-user-profile__fallback { width: 64px; height: 64px; }
    .mod-history-list article { grid-template-columns: 1fr; gap: 5px; }
    .mod-history-list time { white-space: normal; }
    .mod-section-title { align-items: flex-start; flex-direction: column; }
}
/* ===== /Moderation tools v2 ===== */

/* ===== Customizable channel dashboard v3 ===== */
.mod-dashboard-page .container {
    width: min(1720px, calc(100% - 32px));
}

.mod-channel-hero--dashboard {
    margin-bottom: 20px;
}

.mod-widget-board {
    display: grid;
    gap: 16px;
}

.mod-dashboard-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(11, 11, 13, .88);
    box-shadow: var(--shadow);
}

.mod-dashboard-toolbar h2 {
    margin: 0;
    font-size: clamp(24px, 2.2vw, 34px);
}

.mod-dashboard-toolbar p {
    max-width: 900px;
    margin: 8px 0 0;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
}

.mod-dashboard-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.mod-layout-save-state {
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    white-space: nowrap;
}

.mod-layout-save-state[data-state="saving"],
.mod-layout-save-state[data-state="dirty"] {
    color: #ffd99a;
}

.mod-layout-save-state[data-state="saved"] {
    color: #a8f0d1;
}

.mod-layout-save-state[data-state="error"] {
    color: #ffb0b3;
}

.mod-hidden-widget-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px dashed rgba(255, 255, 255, .10);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(11, 11, 13, .55);
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
}

.mod-hidden-widget-button {
    padding: 6px 9px;
    border: 1px solid rgba(165, 138, 209, .26);
    border-radius: 999px;
    color: #e8ddf7;
    background: rgba(165, 138, 209, .10);
    cursor: pointer;
}

.mod-hidden-widget-button:hover {
    border-color: rgba(207, 30, 249, .50);
    box-shadow: 0 0 18px rgba(207, 30, 249, .10);
}

.mod-widget-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.mod-widget {
    grid-column: span var(--widget-span, 4);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(11, 11, 13, .92);
    box-shadow: var(--shadow);
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        opacity .18s ease;
}

.mod-widget:hover {
    border-color: rgba(207, 30, 249, .30);
    box-shadow: var(--shadow), 0 0 30px rgba(207, 30, 249, .07);
}

.mod-widget.is-dragging {
    opacity: .48;
    border-color: rgba(207, 30, 249, .70);
    box-shadow: 0 0 34px rgba(207, 30, 249, .18);
}

.mod-widget[hidden],
.mod-widget__body[hidden] {
    display: none !important;
}

.mod-widget__header {
    min-height: 54px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .018);
}

.mod-widget.is-collapsed .mod-widget__header {
    border-bottom: 0;
}

.mod-widget__header h3 {
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mod-widget__drag,
.mod-widget__controls button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 7px;
    color: #bfc6da;
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
}

.mod-widget__drag {
    letter-spacing: -4px;
    cursor: grab;
    touch-action: none;
}

.mod-widget__drag:active {
    cursor: grabbing;
}

.mod-widget__controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mod-widget__drag:hover,
.mod-widget__controls button:hover {
    color: #fff;
    border-color: rgba(207, 30, 249, .48);
    background: rgba(207, 30, 249, .08);
}

.mod-widget__body {
    min-width: 0;
    padding: 18px;
}

.mod-widget--player .mod-widget__body,
.mod-widget--chat .mod-widget__body {
    padding: 0;
}

.mod-twitch-player {
    width: 100%;
    min-height: 300px;
    aspect-ratio: 16 / 9;
    background: #050505;
}

.mod-twitch-player iframe,
.mod-twitch-chat iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.mod-twitch-chat {
    width: 100%;
    height: clamp(420px, 34vw, 620px);
    min-height: 400px;
    background: #050505;
}

.mod-channel-status-widget {
    display: grid;
    gap: 14px;
}

.mod-channel-status-widget__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mod-channel-status-widget h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.mod-channel-status-widget dl {
    margin: 0;
}

.mod-channel-status-widget dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-top: 1px solid var(--border);
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}

.mod-channel-status-widget dt {
    color: var(--muted);
}

.mod-channel-status-widget dd {
    margin: 0;
    text-align: right;
}

.mod-dashboard-user-search {
    display: grid;
    gap: 10px;
}

.mod-dashboard-user-search label {
    color: #d9deef;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}

.mod-dashboard-user-search > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.mod-dashboard-user-search input {
    min-width: 0;
    min-height: 48px;
    padding: 11px 13px;
    color: #fff;
    background: #070709;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    outline: none;
    font-family: Inter, system-ui, sans-serif;
}

.mod-dashboard-user-search input:focus {
    border-color: rgba(207, 30, 249, .55);
    box-shadow: 0 0 0 3px rgba(207, 30, 249, .08);
}

.mod-widget-link-list {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.mod-widget-link-list a,
.mod-widget-footer-link {
    color: #d9cdf1;
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}

.mod-widget-link-list a:hover,
.mod-widget-footer-link:hover {
    color: #fff;
}

.mod-widget-history-list {
    display: grid;
}

.mod-widget-history-list article {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-family: Inter, system-ui, sans-serif;
}

.mod-widget-history-list article:first-child {
    border-top: 0;
    padding-top: 0;
}

.mod-widget-history-list span {
    color: #dccdf5;
    font-size: 11px;
}

.mod-widget-history-list strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mod-widget-history-list time {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.mod-widget-footer-link {
    display: inline-block;
    margin-top: 12px;
}

.mod-widget-empty-text {
    margin: 0;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
}

.mod-upcoming-widget {
    min-height: 180px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.mod-upcoming-widget > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(165, 138, 209, .28);
    border-radius: 12px;
    color: #fff;
    background: rgba(165, 138, 209, .11);
}

.mod-upcoming-widget h4 {
    margin: 6px 0 0;
    font-size: 17px;
}

.mod-upcoming-widget p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
}

.mod-upcoming-widget small {
    margin-top: 4px;
    color: #c9b6e8;
    font-family: 'Press2P', monospace;
    font-size: 7px;
}

@media (max-width: 1100px) {
    .mod-widget {
        grid-column: span 6;
    }

    .mod-widget--player,
    .mod-widget--chat {
        grid-column: span 12;
    }

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

    .mod-dashboard-toolbar__actions {
        justify-content: space-between;
    }
}

@media (max-width: 700px) {
    .mod-dashboard-page .container {
        width: min(100% - 14px, 1720px);
    }

    .mod-widget-grid {
        gap: 10px;
    }

    .mod-widget {
        grid-column: span 12;
    }

    .mod-dashboard-toolbar {
        padding: 16px;
    }

    .mod-dashboard-toolbar__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .mod-dashboard-toolbar__actions .mod-button {
        width: 100%;
    }

    .mod-widget__header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 7px;
    }

    .mod-widget__header h3 {
        font-size: 14px;
    }

    .mod-widget__drag,
    .mod-widget__controls button {
        width: 31px;
        height: 31px;
    }

    .mod-widget__body {
        padding: 14px;
    }

    .mod-twitch-player {
        min-height: 220px;
    }

    .mod-twitch-chat {
        height: 520px;
        min-height: 420px;
    }

    .mod-dashboard-user-search > div,
    .mod-widget-history-list article {
        grid-template-columns: 1fr;
    }

    .mod-widget-history-list article {
        gap: 3px;
    }

    .mod-widget-history-list time {
        white-space: normal;
    }
}
/* ===== /Customizable channel dashboard v3 ===== */
