/* EBC Live – Social Streaming Control Panel */
:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #17191d;
    --muted: #5f6875;
    --line: #e1e4e9;
    --accent: #0b5cad;
    --accent-soft: #e8f1fb;
    --live: #d0021b;
    --ok: #1f8a46;
    --warn: #b26a00;
    --radius: 10px;
    font-family: "Segoe UI", "Noto Sans Ethiopic", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: var(--text);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: var(--bg);
}

h1 {
    font-size: 24px;
    margin: 0 0 4px;
}

    h1:focus {
        outline: none;
    }

h2 {
    font-size: 16px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.nowrap {
    white-space: nowrap;
}

.empty {
    padding: 8px 0;
}

/* ---------- shell */
.shell {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 100vh;
    background: linear-gradient(to right, #0f1b2d 230px, var(--bg) 230px);
}

.side {
    background: #0f1b2d;
    color: #dfe6f0;
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 22px;
}

.brand-mark {
    background: #c8102e;
    color: #fff;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: .04em;
}

.brand-text {
    font-weight: 600;
}

.side nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .side nav a {
        color: #c5d0de;
        text-decoration: none;
        padding: 9px 10px;
        border-radius: 8px;
        display: flex;
        gap: 10px;
        align-items: center;
    }

        .side nav a:hover {
            background: rgba(255,255,255,.06);
            color: #fff;
        }

        .side nav a.active {
            background: rgba(255,255,255,.12);
            color: #fff;
            font-weight: 600;
        }

.ico {
    width: 18px;
    text-align: center;
    opacity: .8;
}

.side-foot {
    margin-top: auto;
    font-size: 12px;
    color: #7f8ea3;
    padding: 8px;
}

.content {
    padding: 26px 32px 60px;
    max-width: 100%;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

    .page-head p {
        margin: 0;
    }

/* ---------- blocks */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.count {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 12px;
    padding: 1px 9px;
    font-weight: 700;
}

.alert {
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 0 14px;
}

    .alert.error {
        background: #fdecee;
        color: #8a1020;
        border: 1px solid #f5c2c8;
    }

    .alert.ok {
        background: #e8f6ee;
        color: #155f33;
        border: 1px solid #bfe3cd;
    }

.error-text {
    color: #a0122a;
    margin: 6px 0 0;
}

.help {
    background: #f7f9fc;
    border-left: 3px solid var(--accent);
    padding: 8px 12px;
    color: var(--muted);
    margin: 4px 0 12px;
}

/* ---------- buttons */
.btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: #e9edf2;
    color: var(--text);
}

    .btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

    .btn.primary {
        background: var(--accent);
        color: #fff;
    }

        .btn.primary:hover:not(:disabled) {
            background: #094c8f;
        }

    .btn.big {
        width: 100%;
        padding: 13px;
        font-size: 16px;
        margin-top: 6px;
    }

    .btn.ghost {
        background: transparent;
        border-color: var(--line);
    }

        .btn.ghost:hover {
            background: #f0f2f5;
        }

    .btn.danger {
        background: var(--live);
        color: #fff;
    }

    .btn.danger-outline {
        background: transparent;
        border-color: #efb3bc;
        color: #a0122a;
    }

    .btn.small {
        padding: 5px 10px;
        font-size: 13px;
    }

    .btn.connect {
        color: #fff;
        padding: 10px 18px;
    }

        .btn.connect.pf-youtube {
            background: #e62117;
        }

        .btn.connect.pf-facebook {
            background: #1877f2;
        }

.btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

    .chip:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

/* ---------- forms */
.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

    .field > span {
        font-size: 13px;
        font-weight: 600;
        color: #39404a;
    }

    .field input, .field select, .field textarea {
        font: inherit;
        padding: 8px 10px;
        border: 1px solid #cfd5dd;
        border-radius: 8px;
        background: #fff;
        width: 100%;
    }

        .field input:focus, .field select:focus, .field textarea:focus {
            outline: 2px solid var(--accent-soft);
            border-color: var(--accent);
        }

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

    .form-grid .wide {
        grid-column: span 2;
    }

/* ---------- platform badges */
.pf {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    color: #fff;
    background: #6b7380;
    margin-right: 6px;
    vertical-align: 1px;
}

.pf-youtube {
    background: #e62117;
}

.pf-facebook {
    background: #1877f2;
}

.pf-telegram {
    background: #229ed9;
}

.pf-tiktok {
    background: #111;
}

.pf-instagram {
    background: #c13584;
}

.pf-x {
    background: #000;
}

.pf-twitch {
    background: #9146ff;
}

.pf-kick {
    background: #3c9d14;
}

.tag {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef1f5;
    color: var(--muted);
    margin-left: 6px;
}

    .tag.live {
        background: #fde8ea;
        color: var(--live);
    }

    .tag.warn {
        background: #fff3e0;
        color: var(--warn);
    }

.status {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--muted);
}

    .status.s-active, .status.s-live {
        background: #e5f5eb;
        color: var(--ok);
    }

    .status.s-failed, .status.s-reconnectneeded {
        background: #fde8ea;
        color: #a0122a;
    }

    .status.s-disabled {
        background: #f1f1f1;
        color: #888;
    }

    .status.s-ended {
        background: #eef1f5;
        color: var(--muted);
    }

/* ---------- live now */
.live-now {
    margin-bottom: 20px;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.session-card {
    background: #fff;
    border: 1px solid #f2c4ca;
    border-left: 4px solid var(--live);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.session-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.live-pill {
    background: var(--live);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    margin-right: 8px;
    letter-spacing: .05em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    50% {
        opacity: .55;
    }
}

.dest-health {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

    .dest-health li {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 14px;
    }

    .dest-health .dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--warn);
        margin-right: 4px;
    }

    .dest-health li.ok .dot {
        background: var(--ok);
    }

    .dest-health .muted {
        font-size: 13px;
        margin-left: 4px;
    }

/* ---------- go live layout */
.golive-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 18px;
    align-items: start;
}

    .golive-grid .panel {
        margin: 0;
    }

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

.channel {
    position: relative;
    text-align: left;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .channel:hover {
        border-color: #9fbfe0;
    }

    .channel.selected {
        border-color: var(--accent);
        box-shadow: inset 0 0 0 1px var(--accent);
        background: var(--accent-soft);
    }

.ch-type {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--muted);
    text-transform: uppercase;
}

    .ch-type.radio {
        color: #7a3fb0;
    }

.ch-name {
    font-weight: 700;
}

.ch-now {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ch-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

    .ch-dot.on {
        background: var(--ok);
    }

    .ch-dot.off {
        background: #b4bac3;
    }

.preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

    .preview iframe {
        width: 100%;
        height: 100%;
        border: 0;
        display: block;
    }

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.dest-pick {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .dest-pick li label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 8px;
        border-radius: 8px;
        cursor: pointer;
    }

        .dest-pick li label:hover {
            background: #f3f6fa;
        }

    .dest-pick li.disabled label {
        opacity: .55;
        cursor: default;
    }

    .dest-pick input {
        width: 17px;
        height: 17px;
    }

.dest-name {
    font-weight: 600;
}

/* ---------- tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .table th {
        text-align: left;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--muted);
        padding: 8px 10px;
        border-bottom: 1px solid var(--line);
    }

    .table td {
        padding: 10px;
        border-bottom: 1px solid #eef0f3;
        vertical-align: top;
    }

        .table td.actions {
            white-space: nowrap;
            text-align: right;
        }

            .table td.actions .btn {
                margin-left: 4px;
            }

    .table tr.inline-form td {
        background: #f8fafc;
    }

.action {
    font-weight: 600;
}

/* ---------- presets */
.preset-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f3;
}

    .preset-card:last-child {
        border-bottom: 0;
    }

.preset-accounts {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}

@media (max-width: 1200px) {
    .golive-grid {
        grid-template-columns: 1fr 1fr;
    }

        .golive-grid .panel:first-child {
            grid-column: 1 / -1;
        }
}

@media (max-width: 800px) {
    .shell {
        grid-template-columns: 1fr;
        background: var(--bg);
    }

    .side {
        position: static;
        height: auto;
    }

    .content {
        padding: 16px;
    }

    .golive-grid, .form-grid {
        grid-template-columns: 1fr;
    }

        .form-grid .wide {
            grid-column: auto;
        }

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

/* ---------- Blazor error UI (from template) */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.inline-select {
    font: inherit;
    font-size: 14px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    max-width: 170px;
}

    .inline-select:hover, .inline-select:focus {
        border-color: #cfd5dd;
        background: #fff;
    }

/* ---------- signed-in user (sidebar) */
.side-user {
    margin-top: 18px;
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.side-user-name {
    font-weight: 600;
    color: #fff;
}

.side-user-role {
    font-size: 12px;
    color: #9aa8bb;
    margin-top: 2px;
}

.side-user-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
}

    .side-user-actions a, .side-user-actions .link {
        color: #c5d0de;
    }

    .side-user-actions form {
        margin: 0;
    }

button.link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- sign-in pages */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f1b2d;
    padding: 20px;
}

.auth-card {
    background: var(--panel);
    border-radius: 14px;
    padding: 28px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

    .auth-card .brand {
        padding: 0 0 18px;
    }

    .auth-card .brand-text {
        color: var(--text);
    }

    .auth-card h1 {
        margin-bottom: 16px;
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .auth-form label {
        display: flex;
        flex-direction: column;
        gap: 5px;
        font-size: 13px;
        font-weight: 600;
        color: #39404a;
    }

    .auth-form input {
        font: inherit;
        font-weight: 400;
        padding: 10px 11px;
        border: 1px solid #cfd5dd;
        border-radius: 8px;
    }

        .auth-form input:focus {
            outline: 2px solid var(--accent-soft);
            border-color: var(--accent);
        }

    .auth-form .btn {
        padding: 11px;
        font-size: 16px;
        margin-top: 4px;
    }

.auth-note {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0 0;
}

.auth-who {
    margin: 0 0 8px;
}

.auth-out {
    margin-top: 14px;
}

/* ---------- users */
.role-pill {
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 12px;
    font-weight: 700;
}

    .role-pill.admin {
        background: #fff1e0;
        color: #8a4b00;
    }

    .role-pill.operator {
        background: var(--accent-soft);
        color: var(--accent);
    }

.temp-pass {
    font-family: Consolas, monospace;
    background: #f7f9fc;
    border: 1px dashed #cfd5dd;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    user-select: all;
}

.warn-text {
    color: var(--warn);
    font-weight: 600;
}

.auth-who + .auth-note {
    margin: 0 0 14px;
}

.btn.connect.pf-telegram {
    background: #229ed9;
}

.tg-login {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    max-width: 640px;
}

    .tg-login h3 {
        margin: 0 0 8px;
        font-size: 15px;
    }

/* ---------- scheduling */
.when-row {
    display: flex;
    gap: 18px;
    padding: 4px 0;
}

.radio, .check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    cursor: pointer;
}

.check {
    margin: 2px 0 12px;
}

.day-pick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.day {
    border: 1px solid #cfd5dd;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    background: #fff;
}

    .day input {
        display: none;
    }

    .day.on {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        font-weight: 600;
    }

.table td .pf {
    margin: 0 4px 2px 0;
    display: inline-block;
}

.status.s-cancelled {
    background: #fff4e0;
    color: var(--warn);
}

.page-head .btn-row {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* ---------- channel monitor */
.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

    .nav-badge.critical {
        background: #d6203a;
    }

    .nav-badge.warning {
        background: #c77700;
    }

.mon-summary {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 15px;
}

    .mon-summary.ok {
        background: #e5f5eb;
        color: #17663a;
    }

    .mon-summary.warning {
        background: #fff4e0;
        color: #8a4b00;
    }

    .mon-summary.critical {
        background: #fde8ea;
        color: #a0122a;
    }

.mon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
}

.mon-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    border-top: 4px solid #2a9d5c;
}

    .mon-card.lvl-warning {
        border-top-color: #e08a00;
    }

    .mon-card.lvl-critical {
        border-top-color: #d6203a;
        box-shadow: 0 0 0 2px #f6c3cb;
    }

    .mon-card.lvl-unknown {
        border-top-color: #9aa3ad;
    }

.mon-pic {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b1320;
}

    .mon-pic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.mon-radio, .mon-nopic {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8fa0b5;
    font-weight: 700;
    letter-spacing: .12em;
}

.mon-radio {
    background: linear-gradient(135deg, #16233a, #2b1a3d);
    color: #c9b6ea;
}

.mon-level {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 8px;
    border-radius: 5px;
    color: #fff;
    background: #2a9d5c;
}

.lvl-warning .mon-level {
    background: #e08a00;
}

.lvl-critical .mon-level {
    background: #d6203a;
}

.lvl-unknown .mon-level {
    background: #6b7480;
}

.mon-stale {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,.65);
    padding: 2px 6px;
    border-radius: 4px;
}

.mon-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mon-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .mon-title strong {
        font-size: 16px;
    }

.mon-problems {
    margin: 0;
    padding-left: 18px;
    color: #8a2a1a;
    font-size: 13px;
}

.lvl-critical .mon-problems {
    color: #a0122a;
    font-weight: 600;
}

.mon-audio {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meter {
    flex: 1;
    height: 8px;
    background: #edf0f4;
    border-radius: 4px;
    overflow: hidden;
}

    .meter .fill {
        height: 100%;
        background: linear-gradient(90deg, #2a9d5c 70%, #e0b400 88%, #d6203a);
    }

        .meter .fill.silent {
            background: #d6203a;
        }

.mon-server {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
}

.mon-server-name {
    font-weight: 600;
}

.mon-server .btn {
    margin-left: auto;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: #9aa3ad;
}

    .dot.ok {
        background: #2a9d5c;
    }

    .dot.bad {
        background: #d6203a;
    }

.mon-details {
    border-top: 1px dashed var(--line);
    padding-top: 8px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mon-log {
    background: #0f1b2d;
    color: #cfd8e3;
    font-size: 11px;
    padding: 8px;
    border-radius: 6px;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    margin: 4px 0 0;
}

button.link.small {
    font-size: 13px;
    align-self: flex-start;
}

.mon-server {
    flex-wrap: nowrap;
}

    .mon-server > .muted {
        flex: 1;
        min-width: 0;
    }

    .mon-server .btn {
        margin-left: 0;
        flex-shrink: 0;
    }

.tg-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 6px 0 8px;
}

    .tg-choice > div {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 12px 14px;
    }

    .tg-choice p {
        margin: 4px 0 10px;
    }

.tag.ok {
    background: #e5f5eb;
    color: #17663a;
}

.tg-qr-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.tg-qr {
    width: 200px;
    height: 200px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex-shrink: 0;
}

    .tg-qr svg {
        width: 100%;
        height: 100%;
    }

.tg-qr-row ol {
    margin: 0;
    padding-left: 18px;
    line-height: 1.7;
}

.alerts-box {
    margin-top: 20px;
}

.alert-ways {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .alert-ways li {
        display: flex;
        align-items: center;
        gap: 8px;
    }

/* ---------- websites & apps */
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .panel-head h2 {
        margin: 0;
    }

.sub-form {
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 6px 0 14px;
}

pre.code {
    background: #0f1b2d;
    color: #dbe4ee;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre;
}

.small-head {
    font-size: 14px;
    margin: 14px 0 6px;
}

.page-head > .tag {
    white-space: nowrap;
    flex-shrink: 0;
}

.key-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0;
}

.copy-btn {
    margin-left: 6px;
    padding: 2px 8px;
}

/* Thumbnail picker (YouTube custom thumbnail) */
.thumb-picker .thumb-upload {
    position: relative;
    overflow: hidden;
    align-self: flex-start;
    cursor: pointer;
}

    .thumb-picker .thumb-upload input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

    .thumb-picker .thumb-upload.disabled {
        opacity: .6;
        pointer-events: none;
    }

.thumb-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.thumb-preview {
    width: 192px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cfd5dd;
    background: #0b0d10;
}

.thumb-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa3ad;
    font-size: 12px;
}

.thumb-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.thumb-thumb {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
}
