/* De Narrowcasters — Screen Manager — component styles */

.app-shell { display:flex; height:100vh; overflow:hidden; background:var(--surface-subtle); }

/* ---------- Sidebar ---------- */
.sidebar { width:248px; flex:0 0 248px; background:var(--indigo-900); color:#fff; display:flex; flex-direction:column; padding:22px 16px; }
.sidebar__logo { padding:6px 10px 24px; }
.sidebar__logo img { height:32px; width:auto; display:block; }
.sidebar__nav { display:flex; flex-direction:column; gap:4px; flex:1; }
.nav-item { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:var(--radius-md); border:none; cursor:pointer; background:transparent; color:rgba(255,255,255,.72); font-size:14.5px; font-weight:600; text-align:left; width:100%; }
.nav-item:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav-item.is-active { background:rgba(255,255,255,.12); color:#fff; }
.nav-item svg { flex:0 0 auto; }
.sidebar__account { border:none; background:transparent; padding:0; cursor:pointer; text-align:left; border-top:1px solid var(--border-on-dark); padding-top:14px; display:flex; align-items:center; gap:10px; border-radius:var(--radius-md); width:100%; }
.sidebar__account:hover .account-chevron { color:rgba(255,255,255,.8); }
.avatar-badge { width:34px; height:34px; border-radius:999px; background:var(--grad-energy); color:var(--indigo-950); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; flex:0 0 auto; }
.account-name { font-size:13.5px; font-weight:700; color:#fff; }
.account-sub { font-size:12px; color:rgba(255,255,255,.6); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-chevron { color:rgba(255,255,255,.45); flex:0 0 auto; }

/* ---------- Main / topbar ---------- */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 28px; border-bottom:1px solid var(--border-subtle); background:#fff; flex:0 0 auto; }
.topbar__title { font-size:22px; font-weight:800; color:var(--ink-900); letter-spacing:-.02em; margin:0; }
.topbar__sub { font-size:13.5px; color:var(--text-muted); margin:2px 0 0; }
.topbar__actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.icon-btn { width:40px; height:40px; border-radius:999px; border:1px solid var(--border-subtle); background:#fff; color:var(--ink-600); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.icon-btn:hover { background:var(--surface-subtle); }
.btn { font-family:inherit; font-weight:700; font-size:13.5px; border-radius:999px; padding:9px 16px; cursor:pointer; border:none; display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.btn:disabled { cursor:not-allowed; opacity:.55; }
.btn--dark { background:var(--indigo-800); color:#fff; }
.btn--dark:hover:not(:disabled) { background:var(--indigo-700); }
.btn--accent { background:var(--accent); color:var(--accent-contrast); font-weight:800; box-shadow:var(--shadow-cyan); }
.btn--accent:hover:not(:disabled) { background:var(--accent-hover); }
.btn--ghost { background:#fff; color:var(--text-body); border:1px solid var(--border-subtle); font-weight:700; }
.btn--ghost:hover:not(:disabled) { background:var(--surface-subtle); }
.btn--danger-ghost { background:#fff; color:var(--danger); border:1px solid var(--border-subtle); font-weight:700; font-size:12px; padding:6px 13px; }
.btn--sm { padding:7px 13px; font-size:12.5px; }
.tooltip-wrap { position:relative; display:inline-flex; }
.tooltip-wrap .tooltip-bubble { display:none; position:absolute; bottom:calc(100% + 8px); right:0; width:240px; background:var(--ink-900); color:#fff; font-size:12px; font-weight:600; line-height:1.4; padding:9px 12px; border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); z-index:20; }
.tooltip-wrap:hover .tooltip-bubble, .tooltip-wrap:focus-within .tooltip-bubble { display:block; }

.scroll-area { flex:1; overflow-y:auto; min-height:0; }
.view-pad { padding:22px 28px; display:flex; flex-direction:column; gap:18px; box-sizing:border-box; }
.view-pad--tight { padding:18px 28px; }
.view-pad--full-height { height:100%; }

/* ---------- Cards ---------- */
.card { background:#fff; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.card--pad { padding:16px 18px; }
.card--pad-lg { padding:20px; }
h2.section-title { font-size:19px; font-weight:800; color:var(--ink-900); margin:0; }
h3.card-title { font-size:14.5px; font-weight:800; color:var(--ink-900); margin:0; }
.muted { color:var(--text-muted); }
.label-caps { display:block; font-size:12px; font-weight:800; color:var(--text-body); text-transform:uppercase; letter-spacing:.05em; margin-bottom:7px; }

/* ---------- Dashboard ---------- */
.dash-header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.dash-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.stat-card { display:flex; align-items:center; gap:14px; }
.stat-dot-wrap { width:40px; height:40px; border-radius:999px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.stat-dot { width:10px; height:10px; border-radius:999px; background:currentColor; }
.stat-num { font-size:24px; font-weight:900; color:var(--ink-900); line-height:1; }
.stat-lbl { font-size:12.5px; color:var(--text-muted); margin-top:3px; }
.storage-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.storage-track { width:100%; height:7px; border-radius:999px; background:var(--surface-subtle); margin-top:10px; overflow:hidden; }
.storage-fill { height:100%; border-radius:999px; background:var(--accent); }
.storage-fill.is-warning { background:var(--warning); }
.storage-fill.is-danger { background:var(--danger); }
.dash-grid { display:grid; grid-template-columns:1.1fr .85fr 1.15fr; gap:16px; flex:1; min-height:0; }
.list-col { display:flex; flex-direction:column; min-height:0; }
.list-col__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; flex:0 0 auto; }
.link-btn { background:transparent; border:none; color:var(--accent-deep); font-weight:700; font-size:12.5px; cursor:pointer; }
.list-col__body { display:flex; flex-direction:column; gap:8px; overflow-y:auto; min-height:0; }
.row-btn { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:#fff; cursor:pointer; text-align:left; width:100%; }
.row-btn:hover { border-color:var(--border-strong); }
.row-dot { width:8px; height:8px; border-radius:999px; background:var(--accent); flex:0 0 auto; }
.row-title { display:block; font-size:13px; font-weight:700; color:var(--ink-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row-sub { display:block; font-size:11.5px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row-badge { font-size:11px; font-weight:800; color:var(--accent-deep); flex:0 0 auto; font-variant-numeric:tabular-nums; }
.update-item { border:1px solid var(--border-subtle); border-radius:var(--radius-md); padding:10px 12px; flex:0 0 auto; }
.update-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.update-title { font-size:12.5px; font-weight:800; color:var(--ink-900); }
.update-date { font-size:10.5px; color:var(--text-muted); font-weight:700; white-space:nowrap; flex:0 0 auto; }
.update-body { font-size:11.5px; color:var(--text-body); line-height:1.5; margin:6px 0 0; white-space:pre-line; }

/* ---------- Playlists chip bar ---------- */
.playlist-bar-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.eyebrow { font-size:11.5px; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.09em; }
.playlist-chips { display:flex; gap:10px; overflow-x:auto; padding-bottom:3px; }
.playlist-chip { flex:0 0 auto; width:230px; text-align:left; border:1px solid var(--border-subtle); border-radius:var(--radius-md); padding:12px 14px; background:#fff; cursor:pointer; color:var(--ink-900); }
.playlist-chip.is-active { border-color:var(--accent); box-shadow:0 0 0 1.5px var(--accent) inset; background:var(--accent-tint); }
.playlist-chip__top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.playlist-chip__name { font-size:13.5px; font-weight:800; color:inherit; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.playlist-chip__sched { font-size:11px; font-weight:800; margin-top:6px; color:var(--accent-deep); font-variant-numeric:tabular-nums; }
.playlist-chip__target { font-size:11.5px; color:var(--text-muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.add-dashed-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 13px; border-radius:999px; border:1px dashed var(--border-strong); background:transparent; cursor:pointer; font-size:13px; font-weight:700; color:var(--text-muted); flex:0 0 auto; }
.add-dashed-btn:hover { color:var(--accent-deep); border-color:var(--accent); }

/* ---------- Editor grid ---------- */
.editor-grid { display:grid; grid-template-columns:minmax(0,1fr) 348px; gap:18px; align-items:start; }
.editor-left { display:flex; flex-direction:column; gap:18px; min-width:0; }

/* mini preview strip */
.mini-preview-row { display:flex; align-items:center; gap:14px; }
.mini-thumb { position:relative; flex:0 0 120px; width:120px; aspect-ratio:16/9; border-radius:var(--radius-sm); overflow:hidden; background:var(--indigo-800); }
.name-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.name-input { max-width:260px; border:1px solid var(--accent); border-radius:var(--radius-sm); padding:6px 10px; font-size:16px; font-weight:800; color:var(--ink-900); outline:none; background:#fff; }
.name-title { font-size:17px; font-weight:800; color:var(--ink-900); margin:0; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border-radius:999px; font-size:10.5px; font-weight:800; flex:0 0 auto; }
.badge--always { background:var(--success-bg); color:var(--success); }
.badge--range { background:var(--accent-tint); color:var(--accent-deep); font-variant-numeric:tabular-nums; }
.badge-dot { width:6px; height:6px; border-radius:999px; background:currentColor; }
.icon-ghost-btn { border:none; background:transparent; padding:3px; cursor:pointer; color:var(--text-muted); display:inline-flex; flex:0 0 auto; }
.icon-ghost-btn:hover { color:var(--ink-900); }
.toggle-track { width:42px; height:24px; border-radius:999px; position:relative; border:none; cursor:pointer; padding:0; }
.toggle-track.is-on { background:var(--accent); }
.toggle-track.is-off { background:var(--line-2); }
.toggle-knob { position:absolute; top:3px; width:18px; height:18px; border-radius:999px; background:#fff; box-shadow:var(--shadow-xs); transition:right var(--dur) var(--ease-standard), left var(--dur) var(--ease-standard); }
.toggle-track.is-on .toggle-knob { right:3px; }
.toggle-track.is-off .toggle-knob { left:3px; }

/* ---------- Preview player ---------- */
.player-frame { position:relative; width:100%; aspect-ratio:16/9; border-radius:var(--radius-md); overflow:hidden; background:var(--indigo-950); }
.player-surface { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; text-align:center; }
.player-placeholder-tag { position:absolute; top:10px; left:10px; background:rgba(0,0,0,.45); color:#fff; font-size:11px; font-weight:800; padding:4px 9px; border-radius:999px; letter-spacing:.03em; }
.player-empty, .player-error { display:flex; flex-direction:column; align-items:center; gap:8px; color:rgba(255,255,255,.7); font-size:13px; font-weight:700; padding:20px; }
.player-error { color:#FFB4B4; }
.player-controls { display:flex; align-items:center; gap:10px; padding:10px 4px 0; }
.player-scrub { flex:1; height:6px; border-radius:999px; background:var(--paper-2); position:relative; cursor:pointer; }
.player-scrub__fill { position:absolute; inset:0; border-radius:999px; background:var(--accent); width:0%; }
.player-time { font-size:11.5px; font-variant-numeric:tabular-nums; color:var(--text-muted); font-weight:700; white-space:nowrap; }
.play-btn { width:38px; height:38px; border-radius:999px; border:none; background:var(--accent); color:var(--accent-contrast); cursor:pointer; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }

/* ---------- Timeline ---------- */
.timeline-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border-bottom:1px solid var(--border-subtle); }
.timeline-ruler { position:relative; height:22px; margin:12px 18px 0; border-bottom:1px solid var(--border-subtle); font-size:10.5px; font-weight:700; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.timeline-track-wrap { overflow-x:auto; padding:12px 18px 18px; }
.timeline-track { display:flex; gap:8px; align-items:stretch; width:max-content; }
.tblock { flex:0 0 auto; width:120px; min-width:80px; border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--border-subtle); background:#fff; display:flex; flex-direction:column; cursor:grab; }
.tblock.is-dragging { opacity:.4; }
.tblock.is-selected { border-color:var(--accent); box-shadow:0 0 0 1.5px var(--accent) inset; }
.tblock__bar { height:4px; }
.tblock__bar.widget { background:var(--accent); }
.tblock__bar.media { background:var(--cyan-600); }
.tblock__art { position:relative; height:54px; }
.tblock__meta { padding:7px 9px; }
.tblock__title { font-size:11.5px; font-weight:700; color:var(--ink-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tblock__sub { display:flex; align-items:center; gap:6px; margin-top:3px; font-size:10.5px; color:var(--text-muted); }
.tblock__remove { position:absolute; top:5px; right:5px; width:20px; height:20px; border-radius:999px; border:none; background:rgba(27,24,56,.55); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.tblock__drag { position:absolute; top:5px; left:5px; color:rgba(255,255,255,.85); display:inline-flex; }
.timeline-drop-target { flex:0 0 auto; width:158px; border:2px dashed var(--border-strong); border-radius:var(--radius-md); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; color:var(--text-muted); text-align:center; padding:12px; }
.timeline-drop-target.is-dragover { border-color:var(--accent); color:var(--accent-deep); background:var(--accent-tint); }
.timeline-empty { padding:26px 18px; text-align:center; color:var(--text-muted); font-size:13px; font-weight:600; }

/* ---------- Right rail (library) ---------- */
.rail { display:flex; flex-direction:column; overflow:hidden; }
.rail-tabs { display:flex; gap:6px; padding:14px 14px 0; }
.rail-tab { flex:1; padding:9px; border:none; border-radius:var(--radius-md); background:transparent; color:var(--text-muted); font-weight:800; font-size:13px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px; }
.rail-tab.is-active { background:var(--surface-subtle); color:var(--ink-900); }
.rail-divider { height:1px; background:var(--border-subtle); margin-top:14px; }
.rail-body { padding:16px; overflow-y:auto; }
.dropzone { border:2px dashed var(--border-strong); border-radius:var(--radius-md); padding:22px 16px; text-align:center; background:var(--surface-subtle); }
.dropzone.is-dragover { border-color:var(--accent); background:var(--accent-tint); }
.dropzone-icon { width:44px; height:44px; border-radius:999px; background:var(--accent-tint); display:flex; align-items:center; justify-content:center; margin:0 auto 11px; color:var(--accent-deep); }
.media-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.media-card { border:1px solid var(--border-subtle); border-radius:var(--radius-md); overflow:hidden; background:#fff; cursor:pointer; text-align:left; padding:0; transition:box-shadow var(--dur-fast), transform var(--dur-fast); width:100%; }
.media-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.media-thumb { position:relative; height:58px; }
.media-type-tag { position:absolute; left:6px; bottom:6px; padding:2px 7px; border-radius:999px; background:rgba(27,24,56,.6); color:#fff; font-size:9.5px; font-weight:800; }
.media-meta { padding:7px 9px; }
.media-title { font-size:11.5px; font-weight:700; color:var(--ink-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.media-sub { font-size:10.5px; color:var(--text-muted); margin-top:2px; font-variant-numeric:tabular-nums; }
.widget-row { display:flex; align-items:center; gap:12px; padding:11px 12px; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:#fff; cursor:pointer; text-align:left; transition:box-shadow var(--dur-fast); width:100%; }
.widget-row:hover:not(:disabled) { box-shadow:var(--shadow-md); }
.widget-row:disabled { cursor:not-allowed; opacity:.5; }
.widget-icon { width:38px; height:38px; border-radius:var(--radius-md); background:var(--indigo-800); color:var(--accent); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.widget-name { font-size:13px; font-weight:700; color:var(--ink-900); }
.widget-desc { font-size:11.5px; color:var(--text-muted); margin-top:1px; }
.widget-future-tag { font-size:10px; font-weight:800; color:var(--text-muted); background:var(--paper-2); padding:2px 7px; border-radius:999px; flex:0 0 auto; }

/* ---------- Widget settings panel ---------- */
.settings-panel { border-top:1px solid var(--border-subtle); background:var(--surface-subtle); padding:16px 18px; }
.settings-panel__head { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.settings-panel__icon { width:26px; height:26px; border-radius:7px; background:var(--indigo-800); color:var(--accent); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.settings-panel__title { font-size:13.5px; font-weight:800; color:var(--ink-900); }
.field-row { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; }
.field { min-width:160px; flex:1; }
.field label { display:block; font-size:11px; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.field input, .field textarea, .field select { width:100%; border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:9px 11px; font-size:13.5px; color:var(--ink-900); outline:none; background:#fff; }
.field input:focus, .field textarea:focus, .field select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(36,245,255,.25); }
.field-error { color:var(--danger); font-size:11.5px; font-weight:700; margin-top:5px; }
.computed-duration { display:flex; gap:18px; flex-wrap:wrap; background:#fff; border:1px solid var(--border-subtle); border-radius:var(--radius-md); padding:10px 14px; margin-top:12px; }
.computed-duration__item { font-size:12px; color:var(--text-muted); }
.computed-duration__item b { color:var(--ink-900); font-variant-numeric:tabular-nums; }
.settings-panel__footer { display:flex; justify-content:flex-end; margin-top:14px; }

/* ---------- Planning & koppelen ---------- */
.schedule-grid { display:grid; grid-template-columns:1fr 1.3fr; gap:22px; align-items:start; }
.pill-toggle-row { display:flex; gap:8px; }
.pill-toggle { padding:9px 15px; border-radius:999px; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; font-size:13px; font-weight:700; color:var(--text-body); }
.pill-toggle.is-active { background:var(--indigo-900); color:#fff; border-color:var(--indigo-900); }
.pill-toggle:disabled { cursor:not-allowed; opacity:.5; }
.time-row { display:flex; align-items:flex-end; gap:10px; }
.day-chips { display:flex; gap:6px; flex-wrap:wrap; }
.day-chip { padding:6px 12px; border-radius:999px; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; font-size:12.5px; font-weight:700; color:var(--text-body); }
.day-chip.is-active { background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }
.target-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; max-height:210px; overflow-y:auto; }
.target-card { display:flex; align-items:center; gap:9px; padding:9px 10px; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:#fff; cursor:pointer; text-align:left; min-width:0; width:100%; }
.target-check { width:19px; height:19px; border-radius:6px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
.target-check.checked { background:var(--accent); color:var(--accent-contrast); }
.target-check.unchecked { border:2px solid var(--border-strong); }
.target-name { display:flex; align-items:center; gap:5px; font-size:12.5px; font-weight:700; color:var(--ink-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.target-sub { display:block; font-size:10.5px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.schedule-warning { display:flex; gap:8px; align-items:flex-start; background:var(--danger-bg); color:var(--danger); border-radius:var(--radius-md); padding:10px 12px; font-size:12px; font-weight:700; margin-top:12px; }

/* ---------- Screens & groups ---------- */
.groups-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:14px; }
.group-card { display:flex; flex-direction:column; gap:10px; }
.group-card__head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.group-card__name { font-size:14.5px; font-weight:800; color:var(--ink-900); }
.group-card__name-input { font-size:14.5px; font-weight:800; color:var(--ink-900); border:1px solid var(--accent); border-radius:var(--radius-sm); padding:5px 8px; }
.group-card__actions { display:flex; gap:6px; }
.group-card__screens { display:flex; flex-wrap:wrap; gap:6px; }
.screen-pill { font-size:11px; font-weight:700; color:var(--ink-700); background:var(--paper-2); padding:4px 9px; border-radius:999px; }
.status-dot { width:8px; height:8px; border-radius:999px; display:inline-block; }
.status-dot.live { background:var(--success); }
.status-dot.concept { background:var(--warning); }
.status-dot.offline { background:var(--danger); }
.screens-table { width:100%; border-collapse:collapse; }
.screens-table th { text-align:left; font-size:11px; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; padding:9px 10px; border-bottom:1px solid var(--border-subtle); }
.screens-table td { padding:11px 10px; border-bottom:1px solid var(--border-subtle); font-size:13px; color:var(--ink-900); }
.confirm-banner { background:var(--warning-bg); color:#8a5c00; border-radius:var(--radius-md); padding:12px 14px; font-size:12.5px; font-weight:600; display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* ---------- Content library ---------- */
.content-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.filter-chip { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; font-size:12.5px; font-weight:700; color:var(--text-body); }
.filter-chip.is-active { background:var(--indigo-900); color:#fff; border-color:var(--indigo-900); }
.content-library-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:12px; }
.library-card { display:flex; flex-direction:column; }
.library-card__thumb { position:relative; aspect-ratio:16/9; border-radius:var(--radius-md) var(--radius-md) 0 0; overflow:hidden; }
.library-card__unused-tag { position:absolute; top:6px; right:6px; background:var(--warning-bg); color:#8a5c00; font-size:9.5px; font-weight:800; padding:2px 7px; border-radius:999px; }
.library-card__body { padding:8px 10px; border:1px solid var(--border-subtle); border-top:none; border-radius:0 0 var(--radius-md) var(--radius-md); }
.library-card__delete { width:100%; margin-top:6px; }

/* ---------- Support chat ---------- */
.chat-panel { position:fixed; top:0; right:0; height:100vh; width:380px; background:#fff; box-shadow:var(--shadow-lg); border-left:1px solid var(--border-subtle); display:flex; flex-direction:column; transform:translateX(100%); transition:transform var(--dur) var(--ease-standard); z-index:1000; }
.chat-panel.is-open { transform:translateX(0); }
.chat-panel__head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border-subtle); background:var(--indigo-900); color:#fff; }
.chat-panel__title { font-size:14.5px; font-weight:800; }
.chat-panel__sub { font-size:11.5px; color:rgba(255,255,255,.65); margin-top:2px; }
.chat-close { background:transparent; border:none; color:rgba(255,255,255,.75); cursor:pointer; padding:4px; }
.chat-messages { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.chat-msg { max-width:82%; padding:9px 12px; border-radius:var(--radius-md); font-size:13px; line-height:1.45; }
.chat-msg.from-user { align-self:flex-end; background:var(--accent); color:var(--accent-contrast); font-weight:600; }
.chat-msg.from-admin { align-self:flex-start; background:var(--paper-2); color:var(--ink-900); }
.chat-faq-row { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; }
.chat-faq-btn { font-size:11.5px; font-weight:700; color:var(--accent-deep); background:var(--accent-tint); border:none; border-radius:999px; padding:6px 11px; cursor:pointer; }
.chat-input-row { display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--border-subtle); }
.chat-input-row input { flex:1; border:1px solid var(--border-subtle); border-radius:999px; padding:9px 14px; font-size:13px; outline:none; }
.chat-send-btn { width:38px; height:38px; border-radius:999px; border:none; background:var(--accent); color:var(--accent-contrast); cursor:pointer; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.chat-backdrop { position:fixed; inset:0; background:rgba(27,24,56,.25); z-index:999; opacity:0; pointer-events:none; transition:opacity var(--dur); }
.chat-backdrop.is-open { opacity:1; pointer-events:auto; }

/* ---------- Help & tutorials (full width) ---------- */
.help-hero { background:var(--indigo-900); color:#fff; border-radius:var(--radius-lg); padding:26px 30px; }
.help-hero h2 { font-size:22px; font-weight:800; margin:0; }
.help-hero p { color:rgba(255,255,255,.7); margin:6px 0 0; font-size:13.5px; }
.help-search { margin-top:16px; display:flex; gap:8px; }
.help-search input { flex:1; border-radius:999px; border:none; padding:11px 16px; font-size:13.5px; outline:none; max-width:420px; }
.help-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.help-card { padding:16px 18px; }
.help-card__icon { width:38px; height:38px; border-radius:var(--radius-md); background:var(--accent-tint); color:var(--accent-deep); display:flex; align-items:center; justify-content:center; margin-bottom:10px; }
.help-card__title { font-size:14px; font-weight:800; color:var(--ink-900); }
.help-card__desc { font-size:12.5px; color:var(--text-muted); margin-top:5px; line-height:1.5; }
.video-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.video-card__thumb { position:relative; aspect-ratio:16/9; border-radius:var(--radius-md); overflow:hidden; background:var(--indigo-800); display:flex; align-items:center; justify-content:center; color:#fff; }
.video-card__title { font-size:12.5px; font-weight:700; color:var(--ink-900); margin-top:8px; }
.faq-item { border-bottom:1px solid var(--border-subtle); padding:12px 0; }
.faq-item summary { cursor:pointer; font-size:13.5px; font-weight:700; color:var(--ink-900); list-style:none; display:flex; align-items:center; justify-content:space-between; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item p { font-size:13px; color:var(--text-body); margin:8px 0 0; line-height:1.6; }

/* ---------- Modal (account) ---------- */
.modal-backdrop { position:fixed; inset:0; background:rgba(27,24,56,.4); display:flex; align-items:center; justify-content:center; z-index:1100; }
.modal { background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); width:460px; max-width:92vw; max-height:88vh; overflow-y:auto; padding:24px; }
.modal__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal__head h3 { font-size:17px; font-weight:800; color:var(--ink-900); margin:0; }
.modal__close { background:transparent; border:none; color:var(--text-muted); cursor:pointer; padding:4px; }
.modal__field { margin-bottom:14px; }
.modal__footer { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
.modal__saved-msg { font-size:12px; font-weight:700; color:var(--success); }

/* ---------- Login ---------- */
.login-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--indigo-950); background-image:radial-gradient(circle at 20% 20%, rgba(36,245,255,.12), transparent 40%), radial-gradient(circle at 80% 80%, rgba(40,255,183,.10), transparent 45%); }
.login-card { background:#fff; border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); padding:40px; width:400px; max-width:92vw; }
.login-card img { height:34px; margin-bottom:22px; }
.login-card h1 { font-size:20px; font-weight:800; color:var(--ink-900); margin:0 0 4px; }
.login-card p.sub { font-size:13px; color:var(--text-muted); margin:0 0 22px; }
.login-field { margin-bottom:14px; }
.login-submit { width:100%; margin-top:8px; justify-content:center; }
.login-hint { font-size:12px; color:var(--text-muted); margin-top:16px; text-align:center; line-height:1.5; }

/* ---------- Toast (unpublished / autosave / publish status) ---------- */
.status-strip { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:var(--radius-md); font-size:12.5px; font-weight:700; }
.status-strip--saved { background:var(--paper-2); color:var(--text-muted); }
.status-strip--unpublished { background:var(--warning-bg); color:#8a5c00; }
.status-strip--publishing { background:var(--accent-tint); color:var(--accent-deep); }
.status-strip--success { background:var(--success-bg); color:var(--success); }
.status-strip--error { background:var(--danger-bg); color:var(--danger); }

@media (max-width: 1180px) {
  .dash-grid { grid-template-columns:1fr 1fr; }
  .dash-grid > :nth-child(3) { grid-column:1 / -1; }
  .editor-grid { grid-template-columns:1fr; }
  .schedule-grid { grid-template-columns:1fr; }
  .help-grid { grid-template-columns:repeat(2,1fr); }
  .video-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 860px) {
  .sidebar { position:fixed; z-index:500; height:100vh; transform:translateX(-100%); transition:transform var(--dur); }
  .sidebar.is-open { transform:translateX(0); }
  .dash-stats { grid-template-columns:1fr 1fr; }
  .dash-grid { grid-template-columns:1fr; }
  .chat-panel { width:100vw; }
}
