/* ============================================================
   Echo911 VAULT — EchoCAD design system ("Moderate" direction)
   IBM Plex Sans (UI) + IBM Plex Mono (serials, timestamps, labels)
   True-black dispatch-grade dark UI. Elevation via surface tint
   + border, not heavy shadows.
   ============================================================ */

:root {
  color-scheme: dark;

  /* Base / surfaces */
  --bg-base:        #07090c;
  --bg-sunken:      #04050a;
  --surface-1:      #0e1116;
  --surface-2:      #151a21;
  --surface-3:      #1b222b;
  --surface-inset:  #0b0e12;

  /* Borders */
  --border-subtle:  #1a212a;
  --border-default: #232c37;
  --border-mid:     #2a3545;
  --border-strong:  #36424f;

  /* Text */
  --text-primary:   #e8ecf2;
  --text-secondary: #97a2b2;
  --text-muted:     #8a94a6;
  --text-tertiary:  #5b6472;
  --text-faint:     #4b5563;

  /* Brand */
  --accent:         #2c6bed;
  --accent-dark:    #1e56ce;
  --accent-light:   #5e92f0;
  --accent-lighter: #8fb4f7;
  --accent-soft:    rgba(44, 107, 237, 0.14);
  --accent-border:  rgba(44, 107, 237, 0.4);
  --green:          #149e60;
  --green-light:    #3fca8b;
  --green-soft:     rgba(20, 158, 96, 0.14);
  --red:            #e23744;
  --red-light:      #e2887f;
  --red-soft:       rgba(226, 55, 68, 0.16);
  --amber:          #d9a94b;
  --amber-soft:     rgba(217, 138, 43, 0.16);

  --flag-red:       #e23744;
  --flag-white:     #edeff3;
  --flag-blue:      #2c6bed;

  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent-lighter); }

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

video { outline: none; }
img { max-width: 100%; }

@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Tricolor flag strip ---------- */
.flagbar { height: 3px; display: flex; flex-shrink: 0; }
.flagbar > span { flex: 1; }
.flagbar > span:nth-child(1) { background: var(--flag-red); }
.flagbar > span:nth-child(2) { background: var(--flag-white); }
.flagbar > span:nth-child(3) { background: var(--flag-blue); }
.flagbar.thick { height: 4px; }

/* ---------- Typography helpers ---------- */
.mono { font-family: var(--font-mono); }
.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.wordmark {
  font-family: var(--font-mono);
  letter-spacing: .34em;
  font-size: 13px;
  color: #c6cdda;
}

/* ---------- Header / nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-default);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 20px; display: block; }

.nav { display: flex; gap: 2px; font-size: 13px; }
.nav a {
  padding: 7px 13px;
  border-radius: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .12s, color .12s;
}
.nav a:hover { color: var(--text-primary); background: var(--surface-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent-lighter); font-weight: 600; }
.nav ion-icon { font-size: 15px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--accent-lighter);
  text-transform: uppercase;
}
a.avatar:hover { border-color: var(--accent); color: var(--accent-lighter); }
.signout { font-size: 12.5px; color: var(--text-muted); }
.signout:hover { color: var(--text-primary); }

main.page { max-width: 1280px; margin: 0 auto; padding: 24px 20px 48px; }

/* ---------- Page headings ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.page-head .meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }

/* ---------- Cards / panels ---------- */
.card {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-1);
}
.card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 600; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 15px 16px;
  position: relative;
  overflow: hidden;
}
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.stat .stat-label {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.stat .stat-label ion-icon { font-size: 14px; color: var(--accent-light); }
.stat .stat-value {
  margin-top: 10px;
  font-size: 26px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: -.02em;
  color: #fff;
}
.stat .stat-sub { margin-top: 3px; font-size: 11px; color: var(--text-tertiary); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table thead th {
  text-align: left;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}
.table tbody td { padding: 11px 16px; border-bottom: 1px solid #12181f; }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.pill ion-icon { font-size: 12px; }
.pill-complete    { background: var(--green-soft); color: var(--green-light); }
.pill-downloading { background: var(--accent-soft); color: var(--accent-lighter); }
.pill-pending     { background: var(--amber-soft); color: var(--amber); }
.pill-failed      { background: var(--red-soft); color: var(--red-light); }
.pill-excluded    { background: var(--surface-2); color: var(--text-tertiary); }
.pill-neutral     { background: var(--surface-2); color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: filter .12s, background .12s;
}
.btn ion-icon { font-size: 15px; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 22px -10px var(--accent);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  color: #d5dbe4;
}
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger-ghost {
  background: transparent;
  border: 1px solid #3a2630;
  color: var(--red-light);
}
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-block { width: 100%; }
.btn-sm { font-size: 12px; padding: 7px 11px; }

.text-btn { background: none; border: none; cursor: pointer; font-size: 12px; padding: 0; }
.text-btn.danger { color: var(--red-light); }
.text-btn.danger:hover { color: #f1a9a2; }
.text-btn.muted { color: var(--text-muted); }
.text-btn.muted:hover { color: var(--text-primary); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); }

.input, select.input, textarea.input {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--text-tertiary); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { appearance: none; }

/* Native date inputs: dark-theme friendly, sized for the sidebar */
.input-date {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 9px 10px;
  min-width: 0;
  width: 100%;
  color-scheme: dark;
}
.input-date::-webkit-calendar-picker-indicator {
  filter: invert(.65);
  cursor: pointer;
  opacity: .9;
}
.input-date::-webkit-datetime-edit { color: var(--text-primary); }
.input-date:invalid::-webkit-datetime-edit,
.input-date::-webkit-datetime-edit-text:empty { color: var(--text-tertiary); }

.input-icon { position: relative; }
.input-icon ion-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--accent-light); pointer-events: none;
}
.input-icon .input { padding-left: 37px; }

/* Checkbox lists (owners / cameras pickers) */
.check-list {
  border: 1px solid var(--border-default);
  border-radius: 6px;
  overflow: hidden auto;
  max-height: 230px;
  background: var(--surface-1);
}
.check-list label {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px;
  border-bottom: 1px solid #12181f;
  font-size: 12px;
  cursor: pointer;
}
.check-list label:last-child { border-bottom: none; }
.check-list label:hover { background: var(--surface-2); }
.check-list .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.check-list .empty { padding: 10px 12px; font-size: 12px; color: var(--text-tertiary); }

input[type="checkbox"] {
  appearance: none;
  width: 14px; height: 14px; flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  cursor: pointer;
  position: relative;
}
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-error {
  font-size: 12.5px;
  color: var(--red-light);
  background: var(--red-soft);
  border: 1px solid #3a2630;
  border-radius: 6px;
  padding: 9px 12px;
}

/* ---------- Auth (login / unlock) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 390px;
  border: 1px solid #263042;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-base);
  box-shadow: 0 24px 60px -28px #000, 0 0 0 1px rgba(44, 107, 237, .12);
}
.auth-body { padding: 48px 34px 38px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.auth-body::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -10%, rgba(44, 107, 237, .16), transparent 60%);
  pointer-events: none;
}
.auth-body > * { position: relative; }
.auth-logo { height: 40px; }
.auth-wordmark { font-family: var(--font-mono); letter-spacing: .46em; font-size: 14px; color: #c6cdda; margin: 8px 0 6px; }
.auth-tagline { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: #6b7484; text-transform: uppercase; margin-bottom: 34px; }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-secure { margin-top: 30px; display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-tertiary); }
.auth-secure ion-icon { color: var(--green); font-size: 14px; }
.auth-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--text-faint);
}

/* ---------- Video cards ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .video-grid { grid-template-columns: 1fr; } }

.vcard {
  text-align: left;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-1);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  color: inherit;
  transition: border-color .12s;
  display: block;
  width: 100%;
}
.vcard:hover { border-color: var(--border-strong); }

.vframe {
  aspect-ratio: 16 / 9;
  position: relative;
  background: linear-gradient(135deg, #12161c, #0a0d11);
  overflow: hidden;
}
.vframe::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.vframe img.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vframe .rail { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 2; }
.rail-complete { background: var(--accent); }
.rail-failed   { background: var(--red); }
.rail-neutral  { background: #3a4658; }
.vframe .dur {
  position: absolute; bottom: 7px; right: 9px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px;
  background: rgba(5, 6, 8, .8); color: #c6cdda;
  padding: 2px 6px; border-radius: 4px;
}
.vframe .cam-tag {
  position: absolute; top: 8px; left: 11px; z-index: 2;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em;
  color: #93a0b3; text-shadow: 0 1px 3px #000;
}
.vframe .center-icon {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.vframe .center-icon > span {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(7, 9, 12, .6);
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.vframe .center-icon ion-icon { font-size: 20px; color: var(--text-primary); margin-left: 2px; }

/* Bulk selection */
.sel-check {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 4;
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1px solid #3a4658;
  background: rgba(7, 9, 12, .7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.sel-check ion-icon { font-size: 14px; color: #fff; opacity: 0; pointer-events: none; }
.sel-check:hover { border-color: var(--accent); }
.vcard.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.vcard.selected .sel-check { background: var(--accent); border-color: var(--accent); }
.vcard.selected .sel-check ion-icon { opacity: 1; }

.vmeta { padding: 11px 12px; }
.vmeta .vname { font-size: 12.5px; color: var(--text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmeta .vowner { margin-top: 3px; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmeta .vrow { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vmeta .vcam { font-family: var(--font-mono); font-size: 11px; color: var(--accent-lighter); }
.vmeta .vdate { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); }

/* ---------- Videos page layout ---------- */
.videos-layout { display: grid; grid-template-columns: 250px 1fr; gap: 0; border: 1px solid var(--border-default); border-radius: 10px; overflow: hidden; background: var(--bg-base); }
@media (max-width: 900px) { .videos-layout { grid-template-columns: 1fr; } }
.filters {
  border-right: 1px solid var(--border-subtle);
  padding: 18px 16px;
  background: var(--surface-inset);
  display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 900px) { .filters { border-right: none; border-bottom: 1px solid var(--border-subtle); } }
.videos-main { display: flex; flex-direction: column; min-width: 0; }
.videos-toolbar {
  min-height: 52px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center;
  padding: 10px 18px; gap: 14px;
  background: var(--surface-inset);
  font-size: 12.5px; color: var(--text-muted);
}
.videos-body { padding: 18px; }

/* ---------- Drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); }
.drawer-panel {
  position: absolute; right: 0; top: 0; height: 100%;
  width: 100%; max-width: 42rem;
  background: var(--surface-1);
  border-left: 1px solid var(--border-default);
  box-shadow: -20px 0 60px -20px #000;
  overflow-y: auto;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 54px;
  border-bottom: 1px solid var(--border-default);
  position: sticky; top: 0;
  background: var(--surface-1);
  z-index: 2;
}
.drawer-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.drawer-close { background: none; border: none; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.drawer-close:hover { color: #fff; }

/* Detail metadata grid */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.dl-grid .full { grid-column: span 2; }
.dl-grid dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-tertiary); }
.dl-grid dd { margin: 3px 0 0; font-size: 13px; color: var(--text-primary); }
.dl-grid dd.mono { font-family: var(--font-mono); font-size: 12px; }

.hash-box {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  word-break: break-all;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 9px 10px;
  line-height: 1.5;
}

details.meta-raw { border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--bg-base); }
details.meta-raw summary { cursor: pointer; padding: 9px 12px; font-size: 12.5px; color: var(--text-secondary); user-select: none; }
details.meta-raw pre { margin: 0; padding: 4px 12px 12px; font-size: 11px; color: var(--text-muted); overflow-x: auto; }

/* ---------- Owners ---------- */
.owner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 1000px) { .owner-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .owner-grid { grid-template-columns: 1fr; } }
.owner-card {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden;
  color: inherit;
  transition: border-color .12s;
}
.owner-card:hover { border-color: var(--border-strong); color: inherit; }
.owner-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.owner-av {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
  color: var(--accent-lighter);
}
.owner-card .oname { font-size: 13px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-card .ostat { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Two-column management pages (shares / users) ---------- */
.manage-layout { display: grid; grid-template-columns: 22rem 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .manage-layout { grid-template-columns: 1fr; } }
.manage-form { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; padding: 16px; }
@media (max-width: 900px) { .manage-form { position: static; } }
.manage-form h2 { margin: 0; font-size: 13px; font-weight: 600; }

.item-card { padding: 14px; }
.item-card.dim { opacity: .55; }
.item-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.item-title h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.item-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); margin-top: 5px; }

.url-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.url-box {
  flex: 1; min-width: 0;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-lighter);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--surface-2);
  color: #d5dbe4;
  border-radius: 4px;
  padding: 2px 7px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* ---------- Empty state ---------- */
.empty-state {
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  padding: 56px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* ---------- Pagination ---------- */
.pager { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; }
.pager .pg-btn {
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 7px 13px;
  color: #d5dbe4;
  cursor: pointer;
  background: var(--surface-1);
}
.pager .pg-btn:hover { background: var(--surface-2); color: #fff; }
.pager .pg-info { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }

/* ---------- Modal player (public share) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .75); }
.modal-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card {
  width: 100%; max-width: 56rem;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-1);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; height: 48px;
  border-bottom: 1px solid var(--border-default);
}
.modal-head .m-title { font-size: 13px; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Misc utilities ---------- */
.hidden { display: none !important; }
.wm-overlay {
  pointer-events: none;
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 15%;
  opacity: .55;
  z-index: 3;
}
.player-wrap { position: relative; border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden; background: #000; }
.player-wrap video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
