/* ============================================================ */
/* FACADE - STANDALONE CSS (no dependency on main app)          */
/* ============================================================ */

/* ============================================================ */
/* BASE                                                         */
/* ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #e8e8ea;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================ */
/* NAV                                                          */
/* ============================================================ */
.nav {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    background: rgba(10,10,10,0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e8e8ea;
    text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-tab {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    font-family: inherit;
    border-radius: 4px;
    transition: all 0.15s ease;
    text-decoration: none;
}
.nav-tab:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.02); }
.nav-tab.active { color: #e8e8ea; background: rgba(255,255,255,0.05); font-weight: 500; }
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: 16px; }
.nav-user span { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ============================================================ */
/* TABS                                                         */
/* ============================================================ */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================ */
/* BUTTONS                                                      */
/* ============================================================ */
.btn { font-family: inherit; cursor: pointer; transition: all 0.15s; }
.btn-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
    background: #f0f0f2;
    color: #0a0a0a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.btn-sm:hover { opacity: 0.85; }

/* ============================================================ */
/* LAYOUT                                                       */
/* ============================================================ */
.facade-main { padding: 2rem; max-width: 1100px; margin: 0 auto; width: 100%; }

/* ============================================================ */
/* VIDEO COUNTER                                                */
/* ============================================================ */
.video-counter {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
}
.video-counter.counter-warn {
    color: #f43f5e;
    font-weight: 600;
}

/* ============================================================ */
/* UPLOAD ZONE                                                  */
/* ============================================================ */
.upload-zone {
    border: 2px dashed rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.35);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #f43f5e;
    background: rgba(244,63,94,0.15);
    color: #e8e8ea;
}
.upload-zone input { display: none; }

.upload-progress {
    margin-bottom: 1.25rem;
    padding: 8px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    display: none;
}

/* ============================================================ */
/* VIDEO LIST                                                   */
/* ============================================================ */
.fv-list { display: flex; flex-direction: column; gap: 2px; }
.fv-row {
    display: grid;
    grid-template-columns: 1fr 180px 100px 120px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.15s ease;
}
.fv-row:hover { background: rgba(255,255,255,0.04); }

.fv-title { color: #e8e8ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-title input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: #e8e8ea;
    padding: 2px 6px;
    font-size: 0.85rem;
    width: 100%;
    font-family: inherit;
}
.fv-schedule-btn {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: rgba(255,255,255,0.45);
    padding: 4px 8px;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.15s, color 0.15s;
}
.fv-schedule-btn:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.2);
    color: #e8e8ea;
}
.fv-schedule-btn.has-date { color: #e8e8ea; }
.fv-schedule-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.fv-header {
    display: grid;
    grid-template-columns: 1fr 180px 100px 120px;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================ */
/* CALENDAR (scheduler)                                         */
/* ============================================================ */
.cal-wrap {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 1.5rem;
}
.cal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.cal-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e8e8ea;
    text-transform: capitalize;
}
.cal-nav, .cal-today {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    color: rgba(255,255,255,0.5);
    padding: 3px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}
.cal-nav { min-width: 26px; }
.cal-nav:hover, .cal-today:hover { border-color: rgba(255,255,255,0.2); color: #e8e8ea; }
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 2px;
    text-align: center;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-cell {
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 52px;
    transition: border-color 0.15s, background 0.15s;
}
.cal-cell-empty { background: transparent; border-color: transparent; }
.cal-cell-today { border-color: #f43f5e; color: #e8e8ea; }
.cal-cell-has { background: rgba(255,255,255,0.035); color: #e8e8ea; }
.cal-cell-clickable { cursor: pointer; }
.cal-cell-clickable:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); }
.cal-daynum { font-weight: 500; line-height: 1; }
.cal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}
.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}
.cal-dot-scheduled { background: #60a5fa; }
.cal-dot-published { background: #34d399; }
.cal-more {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.45);
    line-height: 1;
}
.cal-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }

/* ROW FLASH — highlights the list row clicked from the calendar */
@keyframes fvRowFlash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 2px #f43f5e; }
}
.fv-row-flash { animation: fvRowFlash 1.2s ease; }

/* ============================================================ */
/* BADGES                                                       */
/* ============================================================ */
.fv-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
}
.fv-badge-uploaded { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }
.fv-badge-scheduled { background: rgba(96,165,250,0.15); color: #60a5fa; }
.fv-badge-publishing { background: rgba(251,191,36,0.15); color: #fbbf24; }
.fv-badge-published { background: rgba(52,211,153,0.25); color: #34d399; }
.fv-badge-failed { background: rgba(248,113,113,0.15); color: #f87171; }

/* ============================================================ */
/* ACTION BUTTONS                                               */
/* ============================================================ */
.fv-actions { display: flex; gap: 4px; justify-content: flex-end; }

.btn-publish {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    color: rgba(255,255,255,0.35);
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.btn-publish:hover { border-color: #f43f5e; color: #f43f5e; }

.btn-delete {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    color: rgba(255,255,255,0.35);
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.btn-delete:hover { border-color: #f87171; color: #f87171; }

/* ============================================================ */
/* EMPTY STATE                                                  */
/* ============================================================ */
.facade-empty { text-align: center; padding: 3rem; color: rgba(255,255,255,0.35); }

/* ============================================================ */
/* DASHBOARD KPI                                                */
/* ============================================================ */
.dash-kpi-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.dash-kpi-hero {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 28px 44px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 210px;
}
.stat-value { font-size: 2.4rem; font-weight: 600; color: #e8e8ea; }
.stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-kpi-followers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.dash-kpi-followers svg { opacity: 0.4; }
.dash-kpi-followers .stat-label { font-size: 0.7rem; }
.dash-kpi-engagement {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.dash-kpi-eng-item { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.dash-kpi-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}
.dash-kpi-card .stat-value { font-size: 1.4rem; }

.chart-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
}
.chart-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; color: #e8e8ea; }

/* ============================================================ */
/* PUBLISHED VIDEOS LIST                                        */
/* ============================================================ */
.fpub-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fpub-row:last-child { border-bottom: none; }
.fpub-title { flex: 1; color: #e8e8ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpub-link { color: #60a5fa; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpub-link:hover { text-decoration: underline; }
.fpub-stat { color: rgba(255,255,255,0.5); font-size: 0.78rem; white-space: nowrap; }
.fpub-url { color: #60a5fa; font-size: 0.78rem; text-decoration: none; }
.fpub-date { color: rgba(255,255,255,0.35); font-size: 0.78rem; }

/* DONUT CHARTS ROW */
.dash-donuts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg, 1.25rem);
}
@media (max-width: 700px) {
    .dash-donuts-row { grid-template-columns: 1fr; }
}
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 4px 0;
}
.donut-svg { flex-shrink: 0; }
.donut-total {
    fill: #e8e8ea;
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
}
.donut-total-label {
    fill: rgba(255,255,255,0.5);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: inherit;
}
.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
    min-width: 0;
}
.donut-legend-item {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 8px;
}
.donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.donut-legend-label { color: #e8e8ea; }
.donut-legend-val {
    color: rgba(255,255,255,0.75);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.donut-legend-pct { color: rgba(255,255,255,0.4); font-size: 0.75rem; }

/* REACH vs ENGAGEMENT SCATTER */
.scatter-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sc-svg {
    width: 100%;
    height: auto;
    font-family: inherit;
}
.sc-grid {
    stroke: rgba(255,255,255,0.05);
    stroke-width: 1;
}
.sc-median {
    stroke: rgba(255,255,255,0.25);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}
.sc-tick {
    fill: rgba(255,255,255,0.45);
    font-size: 10px;
}
.sc-axis-label {
    fill: rgba(255,255,255,0.55);
    font-size: 11px;
    font-weight: 500;
}
.sc-dot {
    fill-opacity: 0.8;
    transition: fill-opacity 0.15s, r 0.15s;
    cursor: pointer;
}
.sc-dot:hover {
    fill-opacity: 1;
    r: 7;
}
.sc-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    padding: 0 4px;
}
.sc-median-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sc-median-dash {
    display: inline-block;
    width: 18px;
    border-top: 1px dashed rgba(255,255,255,0.4);
}

/* custom tooltip — positioned absolutely inside sc-inner, translated to hover dot */
.sc-inner { position: relative; }
.sc-tip {
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    pointer-events: none;
    background: rgba(18, 18, 20, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #e8e8ea;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translate(0, 0);
    transition: opacity 0.12s ease;
    z-index: 5;
    backdrop-filter: blur(8px);
}
.sc-tip-on { opacity: 1; }
.sc-tip-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: #ffffff;
    white-space: normal;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sc-tip-rate {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sc-tip-metrics {
    display: flex;
    gap: 12px;
    font-variant-numeric: tabular-nums;
}
.sc-tip-metrics > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sc-tip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* TOP VIDEOS TABLE */
.ftv-header, .ftv-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px 100px 80px 90px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
}
.ftv-header {
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.ftv-row { border-bottom: 1px solid rgba(255,255,255,0.06); }
.ftv-row:last-child { border-bottom: none; }
.ftv-th {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.ftv-th:hover { color: #e8e8ea; }
.ftv-th-views, .ftv-th-likes, .ftv-th-comments, .ftv-th-shares, .ftv-th-date { justify-content: flex-end; }
.ftv-ico {
    display: inline-flex;
    width: 14px;
    height: 14px;
}
.ftv-ico svg { width: 100%; height: 100%; }
.ftv-arrow { min-width: 10px; color: #60a5fa; }
.ftv-title-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e8e8ea;
}
.ftv-cell {
    text-align: right;
    color: rgba(255,255,255,0.75);
    font-variant-numeric: tabular-nums;
}
.ftv-cell-date {
    text-align: right;
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* desktop compact mode: icons and labels inside cells are hidden; only the number shows */
.ftv-cell-ico,
.ftv-cell-label { display: none; }

/* ============================================================ */
/* PUBLISH MODAL                                                */
/* ============================================================ */
.pm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.pm-overlay.active { display: flex; }
.pm-modal {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    width: 960px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.pm-header h2 { font-size: 1.1rem; font-weight: 600; }
.pm-close { background: none; border: none; color: rgba(255,255,255,0.35); font-size: 1.4rem; cursor: pointer; }
.pm-close:hover { color: #e8e8ea; }

/* small modal variant — used by the schedule-only picker (narrow, single column) */
.pm-modal.sm-modal { width: 420px; }
.sm-body { padding: 20px 24px 24px; }

/* 2-column body: sticky video on the left, scrollable form on the right */
.pm-body {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
    gap: 0;
    flex: 1;
    min-height: 0;
}
.pm-left {
    padding: 20px 20px 20px 24px;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    background: rgba(255,255,255,0.01);
}
.pm-right {
    padding: 20px 24px 24px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pm-creator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    font-size: 0.85rem;
}
.pm-creator-avatar { width: 32px; height: 32px; border-radius: 50%; }
.pm-creator-name { color: #e8e8ea; font-weight: 500; }

.pm-preview {
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 280px;
    max-height: 60vh;
}
.pm-preview video { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }

.pm-label-hint {
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 6px;
    font-weight: 400;
}
.pm-input[type="datetime-local"] {
    cursor: pointer;
}

.pm-field { margin-bottom: 14px; }
.pm-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pm-input, .pm-select {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: #e8e8ea;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-family: inherit;
}
.pm-select { cursor: pointer; }
.pm-select option { background: #0a0a0a; color: #e8e8ea; }

.pm-toggles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pm-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.pm-toggle input[type="checkbox"] { accent-color: #f43f5e; width: 16px; height: 16px; }
.pm-toggle.disabled { opacity: 0.4; pointer-events: none; }

.pm-disclosure {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.pm-disclosure-master { margin-bottom: 0; }
.pm-disclosure-title { font-size: 0.8rem; font-weight: 500; color: #e8e8ea; }
.pm-disclosure-help { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-top: 6px; line-height: 1.5; }
.pm-disclosure-sub { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.pm-disclosure-note { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 6px; font-style: italic; }
.pm-disclosure-warn { font-size: 0.75rem; color: #fbbf24; margin-top: 6px; }
.pm-privacy-note { font-size: 0.75rem; color: #fbbf24; margin-top: 6px; }

.pm-legal { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-bottom: 16px; line-height: 1.5; }
.pm-legal a { color: #60a5fa; text-decoration: none; }

.pm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.pm-btn-cancel {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    color: rgba(255,255,255,0.35);
    padding: 8px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}
.pm-btn-publish {
    background: #f43f5e;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 8px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.pm-btn-publish:disabled { opacity: 0.4; cursor: not-allowed; }
.pm-btn-publish:not(:disabled):hover { opacity: 0.9; }

.pm-error { color: #f87171; font-size: 0.8rem; margin-bottom: 10px; display: none; }
.pm-processing { font-size: 0.8rem; color: #fbbf24; margin-top: 10px; display: none; }

/* ============================================================ */
/* GUIDE TAB                                                    */
/* ============================================================ */
.guide-section { max-width: 700px; margin: 0 auto; }
.guide-section h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
.guide-section h2 span { color: #f43f5e; }
.guide-section > p { font-size: 1rem; color: rgba(255,255,255,0.6); margin-bottom: 2rem; }
.guide-steps { display: flex; flex-direction: column; gap: 20px; margin-bottom: 3rem; }
.guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
}
.guide-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(244,63,94,0.15);
    color: #f43f5e;
    font-weight: 600;
    font-size: 0.9rem;
}
.guide-step h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.guide-step p { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.5; }
.guide-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-feature {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
}
.guide-feature h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.guide-feature p { font-size: 0.82rem; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* ============================================================ */
/* LOGGED OUT STATE                                             */
/* ============================================================ */
.app.logged-out .facade-main { display: none; }
.app.logged-out .nav-tab { display: none; }
.app.logged-out::after {
    content: "";
    display: block;
}
.login-cta {
    display: none;
    max-width: 500px;
    margin: 120px auto;
    text-align: center;
    padding: 0 24px;
}
.app.logged-out .login-cta { display: block; }
.login-cta h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.login-cta h1 span { color: #f43f5e; }
.login-cta p {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
}
.login-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #f0f0f2;
    color: #0a0a0a;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.login-cta-btn:hover { opacity: 0.85; }

/* ============================================================ */
/* BANNED STATE                                                 */
/* ============================================================ */
.banned-cta { display: none; }
.app.banned .facade-main { display: none; }
.app.banned .nav-tab { display: none; }
.app.banned .login-cta { display: none; }
.app.banned .banned-cta {
    display: block;
    max-width: 500px;
    margin: 120px auto;
    text-align: center;
    padding: 0 24px;
}
.banned-cta h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.banned-cta h1 span { color: #f87171; }
.banned-cta p {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
}

/* ============================================================ */
/* FOOTER                                                       */
/* ============================================================ */
.app { flex: 1; }
.facade-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
}
.facade-footer a { color: rgba(255,255,255,0.35); text-decoration: none; }
.facade-footer a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================ */
/* PREFERENCES TAB                                              */
/* ============================================================ */
.pref-section { max-width: 500px; margin: 0 auto; }
.pref-section h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.pref-section > p { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 1.5rem; }
.pref-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
}
.pref-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.pref-toggles { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pref-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.6); cursor: pointer; }
.pref-toggle input[type="checkbox"] { accent-color: #f43f5e; width: 16px; height: 16px; }
.btn-save-prefs {
    padding: 8px 20px;
    background: #f0f0f2;
    color: #0a0a0a;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.btn-save-prefs:hover { opacity: 0.85; }
.pref-saved { font-size: 0.8rem; color: #34d399; margin-left: 10px; }

/* ============================================================ */
/* SCHEDULED MESSAGE                                            */
/* ============================================================ */
.pm-scheduled { font-size: 0.8rem; color: #60a5fa; margin-top: 10px; display: none; }

/* ============================================================ */
/* STATUS TAB (admin)                                           */
/* ============================================================ */
.status-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 1.25rem;
}
.status-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #e8e8ea;
}
.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
}
.status-label { color: rgba(255,255,255,0.5); }
.status-value { display: flex; align-items: center; gap: 8px; }
.status-value input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: #e8e8ea;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-family: inherit;
}

/* ============================================================ */
/* EVENT LOG                                                    */
/* ============================================================ */
.event-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.event-filters select, .event-filters input[type="date"] {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: #e8e8ea;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-family: inherit;
}
.event-filters select option { background: #0a0a0a; color: #e8e8ea; }

.ev-header {
    display: grid;
    grid-template-columns: 160px 90px 1fr 120px;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ev-row {
    display: grid;
    grid-template-columns: 160px 90px 1fr 120px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ev-row:last-child { border-bottom: none; }
.ev-time { color: rgba(255,255,255,0.35); font-size: 0.75rem; white-space: nowrap; }
.ev-msg { color: #e8e8ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-user { color: rgba(255,255,255,0.35); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.ev-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.ev-badge-user_connected { background: rgba(96,165,250,0.15); color: #60a5fa; }
.ev-badge-video_uploaded { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
.ev-badge-video_deleted { background: rgba(248,113,113,0.15); color: #f87171; }
.ev-badge-video_published { background: rgba(52,211,153,0.25); color: #34d399; }
.ev-badge-video_scheduled { background: rgba(96,165,250,0.15); color: #60a5fa; }
.ev-badge-video_failed { background: rgba(248,113,113,0.15); color: #f87171; }

/* ============================================================ */
/* PAGINATION                                                   */
/* ============================================================ */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 12px;
}
.pag-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: rgba(255,255,255,0.5);
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
}
.pag-btn:hover { border-color: rgba(255,255,255,0.15); color: #e8e8ea; }
.pag-active { background: rgba(244,63,94,0.15); border-color: #f43f5e; color: #f43f5e; }

/* ============================================================ */
/* ADMIN VIDEO LIST                                             */
/* ============================================================ */
.admin-videos-total {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    padding: 0 4px;
}
.av-header {
    display: grid;
    grid-template-columns: 120px 1fr 100px 80px 70px 160px;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.av-row {
    display: grid;
    grid-template-columns: 120px 1fr 100px 80px 70px 160px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.12s ease;
}
.av-row:last-child { border-bottom: none; }
.av-row:hover { background: rgba(255,255,255,0.03); }
.av-user { color: rgba(255,255,255,0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-title { color: #e8e8ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-size, .av-duration { color: rgba(255,255,255,0.65); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.av-date { color: rgba(255,255,255,0.35); font-size: 0.75rem; }

/* ============================================================ */
/* VIDEO PLAYER MODAL (admin)                                   */
/* ============================================================ */
.vp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1100;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.vp-overlay.active { display: flex; }
.vp-modal {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    max-width: min(900px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
}
.vp-title {
    font-size: 0.9rem;
    color: #e8e8ea;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vp-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.vp-close:hover { color: #e8e8ea; }
.vp-modal video {
    max-width: 100%;
    max-height: 75vh;
    background: #000;
    display: block;
}

/* ============================================================ */
/* VIDEOS TAB                                                   */
/* ============================================================ */
.tv-header, .tv-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px 100px 80px 90px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
}
.tv-header {
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tv-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tv-row:last-child { border-bottom: none; }
.tv-row:hover { background: rgba(255,255,255,0.02); }

.tv-th {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.tv-th:hover { color: #e8e8ea; }
.tv-th-views, .tv-th-likes, .tv-th-comments, .tv-th-shares, .tv-th-date { justify-content: flex-end; }

.tv-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.tv-title input {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    color: #e8e8ea;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-family: inherit;
}
.tv-title input:focus {
    outline: none;
    border-color: rgba(244,63,94,0.6);
}
.tv-title input::placeholder { color: rgba(255,255,255,0.35); }
.tv-link {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    font-size: 1rem;
    padding: 0 4px;
}
.tv-link:hover { color: #60a5fa; }

.tv-cell {
    text-align: right;
    color: rgba(255,255,255,0.75);
    font-variant-numeric: tabular-nums;
}
.tv-date {
    text-align: right;
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* desktop compact mode: hide icons + labels inside cells, show only number */
.tv-cell-ico,
.tv-cell-label { display: none; }

/* ============================================================ */
/* EVENT LOG BATCH BAR                                          */
/* ============================================================ */
.event-batch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}
.event-batch-count {
    margin-left: 4px;
    color: rgba(255,255,255,0.6);
    font-variant-numeric: tabular-nums;
}
.btn-danger {
    background: rgba(248,113,113,0.15);
    color: #f87171;
}
.btn-danger:disabled {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.25);
    cursor: not-allowed;
}
.btn-danger:not(:disabled):hover { background: rgba(248,113,113,0.25); opacity: 1; }

/* event row: checkbox + 4 original columns + delete button */
.ev-header, .ev-row {
    grid-template-columns: 28px 160px 90px 1fr 120px 32px;
}
.ev-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ev-check input[type="checkbox"] {
    accent-color: #f43f5e;
    width: 14px;
    height: 14px;
    cursor: pointer;
}
.ev-row .btn-delete {
    padding: 2px 6px;
    font-size: 0.72rem;
}

/* ============================================================ */
/* NAV BADGE (unread events)                                    */
/* ============================================================ */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #f43f5e;
    color: white;
    font-size: 0.62rem;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}

/* ============================================================ */
/* MOBILE RESPONSIVE                                            */
/* - <=900px: nav becomes horizontally scrollable, grids collapse */
/* - <=600px: tables become stacked cards, modals go full screen  */
/* ============================================================ */
@media (max-width: 900px) {
    .facade-main { padding: 1rem; }
    .nav { padding: 0 1rem; gap: 6px; }
    .nav-links {
        flex: 1;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-user { margin-left: 8px; flex-shrink: 0; }
    .nav-user span { display: none; }

    /* dashboard grid collapses to single column */
    .dash-kpi-row { grid-template-columns: 1fr; }
    .dash-kpi-hero { padding: 20px; min-width: 0; }
    .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-donuts-row { grid-template-columns: 1fr; }

    /* admin tables */
    .av-header, .av-row { grid-template-columns: 1fr 80px 60px; gap: 6px; padding: 8px; }
    .av-header > :nth-child(1),
    .av-row > :nth-child(1) { grid-column: 1 / -1; font-size: 0.72rem; color: rgba(255,255,255,0.4); padding-bottom: 2px; }
    .av-header > :nth-child(n+5),
    .av-row > :nth-child(n+5) { display: none; }

    /* event log grid collapses — hide user column, shrink badge col */
    .ev-header, .ev-row { grid-template-columns: 24px 1fr 80px 28px; }
    .ev-header > :nth-child(2),
    .ev-row > .ev-time { grid-column: 2 / 4; }
    .ev-header > :nth-child(5),
    .ev-row > .ev-user { display: none; }
    .ev-header > :nth-child(4),
    .ev-row > .ev-msg { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    html { font-size: 13px; }
    .facade-main { padding: 0.75rem; }

    .nav { height: 44px; }
    .nav-brand { font-size: 0.82rem; }

    /* ============================================================ */
    /* CARD-STYLE LISTS ON MOBILE                                   */
    /* shared look (inspired by studio's video-card) for scheduler, */
    /* top videos, videos tab, event log, admin videos              */
    /* ============================================================ */

    /* SCHEDULER row → card */
    .fv-header { display: none; }
    .fv-list { gap: 10px; }
    .fv-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title status"
            "schedule schedule"
            "actions actions";
        padding: 14px;
        gap: 10px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
    }
    .fv-title     { grid-area: title; }
    .fv-row > div:nth-child(3) { grid-area: status; justify-self: end; align-self: start; }
    .fv-schedule  { grid-area: schedule; }
    .fv-schedule-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .fv-actions   { grid-area: actions; justify-content: stretch; gap: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
    .fv-actions .btn-publish { flex: 1; padding: 8px; }
    .fv-actions .btn-delete  { padding: 8px 14px; }

    /* TOP VIDEOS (dashboard) → card with metric rows */
    .ftv-header { display: none; }
    .ftv-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title title"
            "date date"
            "views likes"
            "comments shares";
        padding: 14px;
        gap: 10px 12px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .ftv-row:last-child { margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .ftv-title-cell {
        grid-area: title;
        white-space: normal;
        font-weight: 500;
        font-size: 0.92rem;
        line-height: 1.35;
    }
    .ftv-cell-date {
        grid-area: date;
        text-align: left;
        color: rgba(255,255,255,0.4);
        font-size: 0.72rem;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .ftv-cell-views    { grid-area: views; }
    .ftv-cell-likes    { grid-area: likes; }
    .ftv-cell-comments { grid-area: comments; }
    .ftv-cell-shares   { grid-area: shares; }
    .ftv-row .ftv-cell {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-align: left;
        font-size: 0.82rem;
    }
    .ftv-cell-ico {
        display: inline-flex !important;
        width: 14px;
        height: 14px;
        color: rgba(255,255,255,0.5);
        flex-shrink: 0;
    }
    .ftv-cell-ico svg { width: 100%; height: 100%; }
    .ftv-cell-label {
        display: none !important;
    }
    .ftv-cell-num {
        font-variant-numeric: tabular-nums;
        font-weight: 500;
        color: #e8e8ea;
    }

    /* VIDEOS TAB → same card layout */
    .tv-header { display: none; }
    #tvList { display: flex; flex-direction: column; gap: 10px; }
    .tv-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title title"
            "date date"
            "views likes"
            "comments shares";
        padding: 14px;
        gap: 10px 12px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
    }
    .tv-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
    .tv-title {
        grid-area: title;
    }
    .tv-title input {
        padding: 8px 10px;
        font-size: 0.88rem;
    }
    .tv-date {
        grid-area: date;
        text-align: left;
        color: rgba(255,255,255,0.4);
        font-size: 0.72rem;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .tv-cell-views    { grid-area: views; }
    .tv-cell-likes    { grid-area: likes; }
    .tv-cell-comments { grid-area: comments; }
    .tv-cell-shares   { grid-area: shares; }
    .tv-row .tv-cell {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-align: left;
        font-size: 0.82rem;
    }
    .tv-cell-ico {
        display: inline-flex !important;
        width: 14px;
        height: 14px;
        color: rgba(255,255,255,0.5);
        flex-shrink: 0;
    }
    .tv-cell-ico svg { width: 100%; height: 100%; }
    .tv-cell-label {
        display: none !important;
    }
    .tv-cell-num {
        font-variant-numeric: tabular-nums;
        font-weight: 500;
        color: #e8e8ea;
    }

    /* dashboard kpi */
    .dash-kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .dash-kpi-card { padding: 12px; }
    .dash-kpi-card .stat-value { font-size: 1.2rem; }
    .stat-value { font-size: 1.8rem; }

    /* scatter */
    .scatter-wrap { font-size: 0.72rem; }
    .sc-legend { flex-direction: column; align-items: flex-start; gap: 4px; }

    /* publish modal: collapse 2-col to single column on mobile */
    .pm-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    .pm-header { padding: 12px 16px; }
    .pm-body { grid-template-columns: 1fr; }
    .pm-left {
        padding: 12px 16px 0;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        gap: 10px;
    }
    .pm-right { padding: 14px 16px 20px; }
    .pm-preview { min-height: 180px; max-height: 30vh; }
    .pm-preview video { max-height: 30vh; }
    .pm-actions { flex-direction: column-reverse; }
    .pm-btn-cancel, .pm-btn-publish { width: 100%; padding: 12px; }

    /* video player modal */
    .vp-overlay { padding: 0; }
    .vp-modal { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
    .vp-modal video { max-height: calc(100vh - 48px); }

    /* EVENT FILTERS + batch bar wrap cleanly */
    .event-filters { gap: 6px; }
    .event-filters select, .event-filters input[type="date"] { flex: 1 1 140px; }
    .event-batch { flex-wrap: wrap; gap: 6px; }
    .event-batch-count { flex: 1; }

    /* EVENT LOG → card rows */
    #eventList { display: flex; flex-direction: column; gap: 8px; }
    .ev-header { display: none; }
    .ev-row {
        grid-template-columns: 20px 1fr auto;
        grid-template-areas:
            "check type delete"
            ".     msg  msg"
            ".     meta meta";
        padding: 12px;
        gap: 4px 10px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
    }
    .ev-check { grid-area: check; }
    .ev-row > .ev-badge { grid-area: type; justify-self: start; }
    .ev-row > .btn-delete { grid-area: delete; justify-self: end; }
    .ev-row > .ev-msg {
        grid-area: msg;
        white-space: normal;
        color: #e8e8ea;
        font-size: 0.82rem;
        line-height: 1.4;
    }
    .ev-row > .ev-time,
    .ev-row > .ev-user {
        grid-area: meta;
        display: inline;
        color: rgba(255,255,255,0.4);
        font-size: 0.7rem;
    }
    .ev-row > .ev-user::before {
        content: "·";
        margin: 0 6px;
        color: rgba(255,255,255,0.25);
    }

    /* ADMIN VIDEOS → card */
    #adminVideoList { display: flex; flex-direction: column; gap: 8px; }
    .av-header { display: none; }
    .av-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title status"
            "meta  meta";
        padding: 12px;
        gap: 6px 10px;
        background: rgba(255,255,255,0.025);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
    }
    .av-row > .av-title { grid-area: title; white-space: normal; line-height: 1.3; font-size: 0.9rem; }
    .av-row > :nth-child(3) { grid-area: status; justify-self: end; align-self: start; }
    .av-row > .av-user,
    .av-row > .av-size,
    .av-row > .av-duration,
    .av-row > .av-date {
        grid-area: meta;
        display: inline;
        color: rgba(255,255,255,0.4);
        font-size: 0.7rem;
    }
    .av-row > .av-size::before,
    .av-row > .av-duration::before,
    .av-row > .av-date::before {
        content: "·";
        margin: 0 6px;
        color: rgba(255,255,255,0.25);
    }

    /* footer */
    .facade-footer { flex-direction: column; gap: 8px; align-items: center; text-align: center; }

    /* CALENDAR on small screens — tighter cells, shorter weekday labels */
    .cal-wrap { padding: 10px; }
    .cal-cell { min-height: 42px; padding: 3px 4px; font-size: 0.68rem; }
    .cal-weekdays { font-size: 0.6rem; gap: 2px; }
    .cal-grid { gap: 2px; }
}
