/* Video — стили */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --bg: #0f1620; --panel: #17212c; --panel2: #1d2a38; --line: #2a3a4a;
  --text: #e6edf4; --muted: #8fa3b5; --accent: #3d8bfd; --gold: #c9a45c; --red: #d45757;
  --r: 8px;
}
body { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

.login-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--panel); padding: 34px 28px; border-radius: 12px; border: 1px solid var(--line); width: 320px; display: flex; flex-direction: column; gap: 14px; }
.login-brand { text-align: center; font-size: 22px; font-weight: 700; color: var(--gold); }
.login-card label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.login-card input { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; color: var(--text); }
.error { color: var(--red); font-size: 12px; min-height: 16px; }

.app { display: flex; height: 100vh; }
.sidebar { width: 200px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; flex-shrink: 0; }
.brand { font-size: 18px; font-weight: 700; color: var(--gold); padding: 6px 10px 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav button { background: none; border: none; color: var(--muted); padding: 10px 12px; border-radius: var(--r); cursor: pointer; text-align: left; font-size: 14px; }
.sidebar nav button:hover { background: var(--panel2); color: var(--text); }
.sidebar nav button.active { background: var(--accent); color: #fff; }
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.workspace { flex: 1; overflow: auto; padding: 20px 24px; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; cursor: pointer; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: none; border: none; color: var(--muted); padding: 6px 10px; }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.danger { color: var(--red); }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { font-size: 20px; font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data tr:hover td { background: var(--panel2); }
.cell-main { display: block; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 4px; }
.empty { color: var(--muted); padding: 20px; text-align: center; }

/* карточки видео */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; }
.video-card:hover { border-color: var(--accent); }
.video-card h3 { font-size: 15px; margin-bottom: 6px; }
.video-card p { color: var(--muted); font-size: 12px; }

/* плеер */
.player-modal { background: #000; border: 1px solid var(--line); border-radius: 12px; width: 90vw; max-width: 900px; overflow: hidden; }
.player-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--panel); }
.player-modal video { width: 100%; aspect-ratio: 16/9; background: #000; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: 460px; max-width: 92vw; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 14px; }
.modal form { display: flex; flex-direction: column; gap: 10px; }
.modal label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.modal input, .modal select, .modal textarea { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; color: var(--text); font-family: inherit; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.toast { position: fixed; bottom: 20px; right: 20px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; z-index: 200; }
