:root {
  --bg: #0b0f14;
  --surface: #121820;
  --surface-2: #171e28;
  --border: #2a3544;
  --grid-line: #243040;
  --text: #e6edf5;
  --muted: #8b9bb0;
  --accent: #1d9e75;
  --accent-dim: #143d32;
  --danger: #e05555;
  --danger-dim: #3a1a1a;
  --warn: #d4a017;
  --radius: 8px;
  --info: #3b82f6;
  --zebra: rgba(255,255,255,.02);
  --row-hover: rgba(29,158,117,.08);
  --header-bg: #0e151c;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    linear-gradient(180deg, rgba(20,40,36,.35) 0%, transparent 280px),
    radial-gradient(900px 420px at 8% -8%, #152820 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 13.5px;
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.1rem; border-bottom: 1px solid var(--border);
  background: rgba(11,15,20,.92); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; letter-spacing: .05em; font-size: 1.05rem; }
.brand span { color: var(--accent); font-weight: 600; }
nav button, .tabs button {
  display: inline-flex; align-items: center; gap: .35rem;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: .32rem .65rem; border-radius: 5px; cursor: pointer; margin-left: .3rem; font-size: .82rem;
  font-weight: 600;
}
nav button:hover, .tabs button:hover, .tabs button.active, nav button.active {
  color: var(--text); border-color: var(--accent); background: var(--accent-dim);
}
nav button > i, .tabs button > i { font-size: .78em; opacity: .9; }
.panel { max-width: 1280px; margin: 1rem auto; padding: 0 1rem 2rem; }
#view-stadium.panel, #view-media.panel, #view-reports.panel, #view-users.panel, #view-stadiums.panel, #view-homiy.panel {
  max-width: 1560px;
}
h1 { margin: .25rem 0 .5rem; font-size: 1.6rem; }
.muted { color: var(--muted); font-size: .92rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: .75rem 0; }
.form label, label { display: block; margin: .6rem 0 .25rem; color: var(--muted); font-size: .85rem; }
input, select { width: 100%; max-width: 100%; padding: .55rem .7rem; border-radius: 6px; border: 1px solid var(--border); background: #0c1117; color: var(--text); }

/* Unified button hierarchy */
button.primary, button.ghost, .lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 5px; cursor: pointer; font: inherit; font-weight: 650; font-size: .875rem;
  line-height: 1.2; min-height: 2.05rem; padding: .42rem .85rem; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
button.primary > i, button.ghost > i, .lp-btn > i { font-size: .85em; line-height: 1; }
button.primary {
  background: var(--accent); color: #04140f; border: 1px solid transparent;
}
button.primary:hover { filter: brightness(1.06); }
button.primary.sm, button.ghost.sm, .lp-btn.sm, .lp-btn-sm {
  padding: .28rem .55rem; min-height: 1.7rem; font-size: .8rem; margin-top: 0;
}
button.ghost, .lp-btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
}
button.ghost:hover, .lp-btn-outline:hover { color: var(--text); border-color: #3a4a5c; background: #151c26; }
button.ghost.danger, .danger, button.danger { color: #fecaca; border-color: #633; }
button.ghost.danger:hover { background: var(--danger-dim); border-color: var(--danger); }
.lp-btn-primary { background: var(--accent); color: #04140f; border: 1px solid transparent; }
.lp-btn-save { background: #16a34a; color: #fff; border: 1px solid transparent; }
.lp-btn-outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.err { color: #f88; }
.hidden { display: none !important; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; margin-top: .75rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; cursor: pointer; }
.tile:hover { border-color: var(--accent); }
.tile h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.st-creds { margin-top: .5rem; margin-bottom: 1rem; }
.st-creds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem 1.25rem;
  margin-top: .35rem;
}
.st-creds-grid label { margin: 0 0 .2rem; }
.st-creds code { word-break: break-all; }

/* Qabul lock / Accept — Excel-like compact grid */
.st-accept-card { margin-top: .75rem; padding: .65rem .75rem .7rem; }
.st-accept-head { margin-bottom: .35rem; align-items: flex-start; }
.st-accept-title h2 {
  margin: 0;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.st-accept-title h2 > i { font-size: .78em; color: var(--accent); opacity: .95; }
.st-accept-title h2 .muted { font-weight: 400; font-size: .82em; }
.st-accept-sub {
  margin: .2rem 0 0;
  font-size: .78rem;
  line-height: 1.35;
  max-width: 62ch;
}
.st-accept-wrap {
  margin: 0;
  max-height: none;
  border-radius: 4px;
}
.st-accept-table { font-variant-numeric: tabular-nums; }
.st-accept-table th,
.st-accept-table td {
  padding: .28rem .45rem;
  height: 1.85rem;
  vertical-align: middle;
}
.st-accept-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.st-accept-table .col-check { width: 4.2rem; text-align: center; }
.st-accept-table .col-check input[type="checkbox"] {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}
.st-accept-table .col-check input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .65;
}
.st-accept-table tbody#acc-cats.is-locked {
  opacity: .55;
}
.st-accept-table tbody#acc-cats.is-locked tr:not(.acc-always-row) td {
  color: var(--muted);
}
.st-accept-table .acc-lock-row td:first-child { font-weight: 650; }
.st-accept-table .acc-always-row { opacity: .8; }
.st-accept-table tfoot td {
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  font-size: .76rem;
}
.st-accept-table .acc-last-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  min-height: 1.2rem;
}
.st-accept-table .acc-last-msg {
  color: var(--muted);
  font-size: .74rem;
  margin-left: .15rem;
}
.lp-upload-icon { font-size: 1.65rem; color: var(--accent); opacity: .9; line-height: 1; }
.lp-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  border-radius: 4px; padding: .28rem .55rem; font-size: .78rem; font-weight: 650;
  background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer;
}
.lp-chip.active { color: var(--text); border-color: var(--accent); background: #12241e; }
.badge { display: inline-block; font-size: .72rem; padding: .15rem .45rem; border-radius: 4px; background: #3a1d1d; color: #fbb; margin-left: .35rem; }
.badge.ok { background: #163528; color: #9de0c2; }
.code { background: #0c1117; padding: .75rem; border-radius: 8px; overflow: auto; font-size: .8rem; }
.table { width: 100%; border-collapse: collapse; margin-top: .75rem; }
.table th, .table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border); font-size: .9rem; }

/* ── Excel-style data grids ─────────────────────────────────────────── */
.xl-toolbar {
  display: flex; gap: .45rem; align-items: center; flex-wrap: wrap;
  margin: .55rem 0 .65rem; padding: .55rem .65rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
}
/* Drag-reorderable filter chips (actions stay pinned via .xl-filter-pin) */
.xl-filter-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  cursor: grab; touch-action: none;
  padding: .05rem; border-radius: 5px; border: 1px solid transparent;
  max-width: 100%;
}
.xl-filter-chip:active { cursor: grabbing; }
.xl-filter-chip.dragging { opacity: .45; border-color: var(--accent); background: var(--accent-dim); }
.xl-filter-chip.drag-over {
  border-color: var(--accent);
  box-shadow: -3px 0 0 0 var(--accent);
}
.xl-filter-chip .xl-drag-handle {
  color: var(--muted); font-size: .7rem; letter-spacing: -.08em;
  user-select: none; padding: 0 .15rem; line-height: 1; opacity: .65;
}
.xl-filter-chip:hover .xl-drag-handle { opacity: 1; color: var(--text); }
.xl-filter-chip > input,
.xl-filter-chip > select,
.xl-filter-chip > .lp-filter-btns { margin: 0; }
.xl-filter-chip:has(.grow) { flex: 1 1 180px; min-width: 160px; }
.xl-filter-chip .grow { flex: 1 1 140px; min-width: 120px; max-width: none; width: auto; }
.xl-filter-pin {
  display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  margin-left: auto;
}
.xl-toolbar.dnd-ready .xl-filter-chip { transition: box-shadow .12s ease, opacity .12s ease; }
.xl-toolbar input, .xl-toolbar select {
  width: auto; min-width: 120px; max-width: 220px; margin: 0;
  padding: .32rem .5rem; font-size: .82rem; border-radius: 5px;
  background: #0c1117; border: 1px solid var(--border); color: var(--text);
}
.xl-toolbar input.grow, .xl-toolbar .grow { flex: 1 1 180px; min-width: 160px; max-width: none; width: auto; }
.xl-toolbar .xl-count { color: var(--muted); font-size: .78rem; margin-left: auto; white-space: nowrap; }
.xl-wrap {
  position: relative; overflow: auto; max-height: min(70vh, 780px);
  border: 1px solid var(--grid-line); border-radius: 4px;
  background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.xl-wrap.xl-compact { max-height: min(58vh, 520px); }
.xl-table {
  width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0;
  table-layout: fixed; font-size: .8rem; font-variant-numeric: tabular-nums;
}
.xl-table th, .xl-table td {
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  padding: .28rem .45rem; text-align: left; vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.35; height: 1.85rem;
}
.xl-table th:last-child, .xl-table td:last-child { border-right: none; }
.xl-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--header-bg); color: #a8b8cc;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 2px solid #3a4a5c; cursor: pointer; user-select: none;
  box-shadow: 0 1px 0 var(--grid-line);
}
.xl-table thead th:hover { color: var(--text); background: #141c26; }
.xl-table thead th.sorted-asc::after { content: " ▲"; font-size: .6rem; color: var(--accent); }
.xl-table thead th.sorted-desc::after { content: " ▼"; font-size: .6rem; color: var(--accent); }
.xl-table thead th.no-sort { cursor: default; }
.xl-table thead th.no-sort:hover { color: #a8b8cc; background: var(--header-bg); }
.xl-table tbody tr { background: transparent; }
.xl-table tbody tr:nth-child(even) { background: var(--zebra); }
.xl-table tbody tr:hover { background: var(--row-hover); }
.xl-table tbody tr.selected { background: rgba(29,158,117,.16); outline: 1px solid rgba(29,158,117,.35); outline-offset: -1px; }
.xl-table tbody tr.row-click { cursor: pointer; }
.xl-table .col-acts { width: 11.5rem; text-align: right; white-space: nowrap; overflow: visible !important; }
.xl-table .col-acts .xl-acts {
  display: inline-flex; gap: .2rem; justify-content: flex-end; align-items: center; flex-wrap: nowrap;
}
.xl-table td.col-acts { overflow: visible !important; text-overflow: clip; }
.xl-table .col-idx { width: 2.4rem; text-align: center; color: var(--muted); }
.xl-table .col-thumb { width: 3.4rem; padding: .15rem .25rem; }
.xl-table .col-num { width: 4.5rem; text-align: right; }
.xl-table .col-check { width: 3.2rem; text-align: center; }
.xl-thumb {
  width: 36px; height: 22px; object-fit: cover; border-radius: 2px;
  background: #000; display: block; border: 1px solid var(--grid-line);
}
.xl-thumb-ph {
  width: 36px; height: 22px; border-radius: 2px; background: #0c1117;
  border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center;
  font-size: .55rem; color: var(--muted);
}
.xl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
  background: #151c26; border: 1px solid var(--border); color: var(--text);
  border-radius: 4px; cursor: pointer; padding: .15rem .4rem; font-size: .72rem;
  line-height: 1.3; white-space: nowrap; min-height: 1.55rem;
}
.xl-btn > i { font-size: .85em; }
.xl-btn:hover { border-color: var(--accent); color: #fff; }
.xl-btn.danger { color: #fecaca; border-color: #5c2a2a; background: var(--danger-dim); }
.xl-btn.danger:hover { border-color: var(--danger); }
.xl-btn.primary { background: var(--accent); color: #04140f; border: none; font-weight: 700; }
.xl-btn.on { border-color: var(--accent); background: var(--accent-dim); color: #9de0c2; }
.xl-empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .85rem; }
.xl-badge {
  display: inline-block; font-size: .65rem; padding: .08rem .32rem; border-radius: 3px;
  background: #1e2a38; color: #9ec5ff; border: 1px solid #2a3a4e; margin-right: .2rem;
}
.xl-badge.ok { background: #143528; color: #9de0c2; border-color: #1d5c42; }
.xl-badge.warn { background: #3a2a10; color: #f0c674; border-color: #6b4e16; }
.xl-badge.danger { background: #3a1a1a; color: #fecaca; border-color: #6b2a2a; }
.xl-mono { font-family: var(--mono); font-size: .78rem; }
.xl-muted { color: var(--muted); }

/* Confirm / dialog modal */
.ux-modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4,8,12,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.ux-modal {
  background: #121820; border: 1px solid #334155; border-radius: 10px;
  width: min(440px, 100%); box-shadow: 0 24px 64px rgba(0,0,0,.55);
  overflow: hidden;
}
.ux-modal.wide { width: min(560px, 100%); }
.ux-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .95rem;
}
.ux-modal-body { padding: 1rem; color: var(--text); font-size: .9rem; line-height: 1.45; }
.ux-modal-body .muted { margin-top: .35rem; }
.ux-modal-foot {
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: .75rem 1rem; border-top: 1px solid var(--border); background: #0e141b;
}
.ux-modal label { margin-top: .65rem; }
.ux-modal input, .ux-modal select { max-width: 100%; }

.lp-filter-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: .55rem .65rem;
}
.tabs { margin: .75rem 0; }
code { background: #0c1117; padding: .1rem .35rem; border-radius: 4px; }
.grow { flex: 1 1 auto; min-width: 140px; }
.mt { margin-top: .75rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; color: var(--text); margin-right: 1rem; cursor: pointer; }
.check input { width: auto; }

.lp-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
/* Side list must fit Name + Dur/# + Open/Del without clipping actions */
.lp-split {
  display: grid;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  gap: 1rem; min-height: 420px;
}
@media (max-width: 900px) { .lp-split { grid-template-columns: 1fr; } }
.lp-side {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .55rem .65rem; min-width: 0;
}
.lp-side .xl-wrap {
  max-height: min(62vh, 560px); overflow-x: auto; overflow-y: auto;
}
.lp-side .xl-table {
  width: 100%; min-width: 300px; table-layout: fixed;
}
.lp-side .xl-table th,
.lp-side .xl-table td {
  padding: .22rem .3rem; font-size: .76rem;
}
.lp-side .xl-table .col-acts {
  width: 6.75rem; min-width: 6.75rem; max-width: 6.75rem;
  overflow: visible !important; padding-right: .35rem;
}
.lp-side .xl-table .col-acts .xl-acts { gap: .15rem; }
.lp-side .xl-table .col-acts .xl-btn {
  padding: .1rem .3rem; font-size: .66rem;
}
.lp-side .xl-table td:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Playlists: shrink Name so Flags + Open/QA/SC/Del stay on one row */
#st-playlists .lp-split {
  grid-template-columns: minmax(400px, 460px) minmax(0, 1fr);
}
.lp-side .lp-pl-table {
  min-width: 0; width: 100%;
}
.lp-side .lp-pl-table .col-name {
  width: auto; max-width: 0; /* fixed table: take leftover only */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lp-side .lp-pl-table .col-name strong {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lp-side .lp-pl-table .col-num {
  width: 2.1rem; min-width: 2.1rem; max-width: 2.1rem; text-align: right;
}
.lp-side .lp-pl-table .col-flags {
  width: 3.5rem; min-width: 3.5rem; max-width: 3.5rem;
  overflow: hidden; white-space: nowrap;
}
.lp-side .lp-pl-table .col-acts {
  width: 10.5rem; min-width: 10.5rem; max-width: 10.5rem;
  overflow: visible !important; padding-right: .25rem;
}
.lp-side .lp-pl-table .col-acts .xl-btn {
  padding: .08rem .28rem; font-size: .64rem;
}
.lp-main { min-width: 0; }
.lp-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.lp-card-head h2 { margin: 0; font-size: 1rem; }
.lp-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.lp-list li { padding: .65rem .7rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; margin-bottom: .25rem; }
.lp-list li:hover { background: #121820; }
.lp-list li.active { border-color: var(--accent); background: #12241e; }
.lp-list-title { font-weight: 650; }
.lp-list-title-row { display: flex; justify-content: space-between; gap: .35rem; align-items: flex-start; }
.lp-list-meta { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.lp-list-badges { display: flex; flex-wrap: wrap; gap: .25rem; }
.lp-badge-qa, .lp-badge-sc { font-size: .65rem; padding: .1rem .35rem; border-radius: 4px; background: #1e3a5f; color: #9ec5ff; }
.lp-badge-sc { background: #3a2a10; color: #f0c674; }
.lp-empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.lp-inline { display: flex; gap: .75rem; flex-wrap: wrap; }
.lp-label { color: var(--muted); font-size: .8rem; margin-bottom: .35rem; letter-spacing: .04em; }

.lp-input { width: 100%; max-width: 420px; background: #0c1117; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: .5rem .7rem; }
.lp-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lp-center { text-align: center; }
.lp-table { width: 100%; border-collapse: collapse; }
.lp-table th, .lp-table td { border-bottom: 1px solid var(--border); padding: .55rem .35rem; text-align: left; vertical-align: middle; }
.lp-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.lp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; padding: 0;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 4px; cursor: pointer; font-size: .78rem; line-height: 1;
}
.lp-icon-btn:hover { background: #151c26; border-color: #3a4a5c; }
.lp-icon-btn.danger { color: #fecaca; border-color: #7f1d1d; }

.lp-band-preview {
  position: relative; width: 100%; background: #000;
  border-radius: 8px; overflow: hidden; border: 1px solid var(--border); margin: .5rem 0;
}
.lp-band-item {
  position: absolute; top: 0; bottom: 0; overflow: hidden; border-right: 1px solid #222;
  display: flex; align-items: flex-start; justify-content: flex-start;
}
.lp-band-label {
  display: block; font-size: 10px; font-weight: 700; color: #fff; padding: 4px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.lp-cab-ruler {
  position: relative; height: 1.1rem; margin-top: .35rem; color: #64748b; font-size: .7rem;
}
.lp-cab-ruler span { position: absolute; transform: translateX(-50%); }
.lp-badge-ok {
  display: inline-block; font-size: .7rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 6px; margin-right: .25rem; background: #14532d; color: #bbf7d0;
}
.lp-badge-overflow {
  display: inline-block; font-size: .68rem; font-weight: 800;
  padding: .12rem .4rem; border-radius: 5px; margin-left: .35rem;
  background: #7f1d1d; color: #fecaca; border: 1px solid #b91c1c;
  letter-spacing: .02em; vertical-align: middle; white-space: nowrap;
}
.lp-media-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; }
.lp-panels-cell {
  display: flex; align-items: center; justify-content: center; gap: .28rem;
  white-space: nowrap; width: 100%;
}
.lp-panels-sep {
  color: var(--muted); flex: 0 0 auto; width: .75rem; text-align: center;
  font-weight: 700; line-height: 1; user-select: none;
}
.lp-num {
  box-sizing: border-box;
  width: 4.25rem !important; min-width: 4.25rem; max-width: 4.25rem !important;
  height: 2rem; text-align: center; padding: 0 .15rem 0 .2rem !important;
  font-variant-numeric: tabular-nums; font-size: .875rem; line-height: 1;
  -moz-appearance: auto; appearance: auto;
}
.lp-num::-webkit-outer-spin-button,
.lp-num::-webkit-inner-spin-button {
  -webkit-appearance: auto; opacity: 1; height: 1.55rem; margin: 0; cursor: pointer;
}
.lp-pin-cell {
  display: inline-flex; align-items: center; justify-content: center; gap: .2rem;
  min-width: 1.75rem; min-height: 1.75rem; padding: .15rem .25rem;
  border-radius: 6px; margin: 0; cursor: pointer;
}
.lp-pin-cell.on { background: rgba(59,130,246,.25); }
.lp-pin-cell input { width: auto; margin: 0; }
.lp-row-pin { background: rgba(59,130,246,.06); }
.lp-drag { opacity: .45; cursor: grab; flex: 0 0 auto; }
.lp-table-wrap { overflow-x: auto; }

.lp-scene-table {
  table-layout: fixed; width: 100%; min-width: 920px; border-collapse: collapse;
}
.lp-scene-table col.col-idx { width: 3rem; }
.lp-scene-table col.col-media { width: auto; }
.lp-scene-table col.col-pin { width: 3rem; }
.lp-scene-table col.col-num { width: 5.1rem; }
.lp-scene-table col.col-panels { width: 10.6rem; }
.lp-scene-table col.col-chk { width: 3.2rem; }
.lp-scene-table col.col-acts { width: 6.5rem; }
.lp-scene-table th,
.lp-scene-table td {
  vertical-align: middle; padding: .4rem .28rem; height: 3.25rem; box-sizing: border-box;
}
.lp-scene-table thead th {
  height: 2.4rem; padding: .35rem .28rem; font-size: .68rem; letter-spacing: .04em;
  white-space: nowrap; text-align: center; border-bottom: 1px solid #3a4554;
}
.lp-scene-table thead th.col-media,
.lp-scene-table thead th.col-idx { text-align: left; }
.lp-scene-table .lp-cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 2rem; width: 100%; gap: .25rem;
}
.lp-scene-table .col-idx .lp-cell { justify-content: flex-start; }
.lp-scene-table .col-media { text-align: left; }
.lp-scene-table td.col-media { height: auto; min-height: 3.25rem; padding-top: .45rem; padding-bottom: .45rem; }
.lp-scene-table .lp-media-cell {
  display: flex; align-items: center; gap: .55rem; min-width: 0; width: 100%;
}
.lp-scene-table .lp-thumb-sm {
  flex: 0 0 56px; width: 56px; height: 32px; object-fit: cover;
  border-radius: 4px; background: #000;
}
.lp-scene-table .lp-media-meta { min-width: 0; flex: 1; }
.lp-scene-table .lp-media-title {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600; font-size: .9rem; line-height: 1.2;
}
.lp-scene-table .lp-media-sub {
  font-size: .75rem; line-height: 1.25; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; color: var(--muted);
}
.lp-scene-table .lp-media-name-row { flex-wrap: nowrap; gap: .35rem; min-width: 0; }
.lp-scene-table .lp-badge-overflow { flex-shrink: 0; font-size: .65rem; padding: .1rem .35rem; }
.lp-scene-table .lp-row-actions {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center;
  justify-content: flex-end; gap: .25rem;
}
.lp-scene-table .lp-row-actions .lp-icon-btn {
  flex: 0 0 auto; width: 1.75rem; height: 1.75rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.lp-scene-table .col-chk input[type="checkbox"] {
  width: 1rem; height: 1rem; margin: 0; cursor: pointer;
}
.lp-scene-table .lp-num { display: block; margin: 0 auto; }

.lp-upload-panel {
  background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.lp-upload-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.lp-upload-drop {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.25rem; border: 1px dashed var(--border); border-radius: 10px; margin: .75rem 0; background: #0c1117;
}
.lp-upload-icon { font-size: 1.65rem; color: var(--accent); opacity: .9; line-height: 1; }
.file-btn { display: inline-block; cursor: pointer; margin-top: 0 !important; }
.lp-upload-progress { margin: .75rem 0; }
.lp-progress-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.lp-progress-track { height: 8px; background: #0c1117; border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.lp-progress-bar { height: 100%; background: linear-gradient(90deg, #1d9e75, #38bdf8); transition: width .12s linear; }

.lp-filter-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .75rem 0; }
.lp-filter-bar select {
  min-width: 140px; max-width: 200px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: .4rem .55rem; font-size: .85rem;
}
.lp-filter-btns { display: flex; gap: .35rem; }
.lp-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: .28rem .55rem; border-radius: 4px; cursor: pointer; font-size: .78rem; font-weight: 650;
}
.lp-chip.active { color: var(--text); border-color: var(--accent); background: #12241e; }

.lp-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.lp-media-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer;
}
.lp-media-card:hover { border-color: var(--accent); }
.lp-media-thumb {
  position: relative; aspect-ratio: 16/9; background: #0c1117; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lp-media-thumb img, .lp-media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lp-badge-fmt, .lp-badge-res {
  position: absolute; bottom: .35rem; left: .35rem; font-size: .65rem; padding: .1rem .35rem;
  border-radius: 4px; background: rgba(0,0,0,.7); color: #fff;
}
.lp-badge-res { left: auto; right: .35rem; }
.lp-badge-meta {
  position: absolute; top: .35rem; left: .35rem; font-size: .65rem; padding: .1rem .35rem;
  border-radius: 4px; background: rgba(56,189,248,.25); color: #7dd3fc; border: 1px solid #38bdf8;
}
.lp-media-body { padding: .65rem .7rem; }
.lp-fit { color: #9de0c2; font-size: .8rem; margin-top: .25rem; }
.lp-media-actions { display: flex; gap: .35rem; padding: 0 .7rem .7rem; flex-wrap: wrap; }
.lp-media-actions button { margin-top: 0; font-size: .8rem; }

.lp-scene-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .65rem;
  margin-top: .75rem;
  max-height: 340px;
  overflow-y: auto;
  padding: .15rem;
}
.lp-scene-media-card {
  background: #121820;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}
.lp-scene-media-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(29,158,117,.35); }
.lp-scene-media-card.overflow { border-color: #7f1d1d; }
.lp-scene-media-thumb {
  position: relative;
  aspect-ratio: 16 / 7;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.lp-scene-media-thumb img,
.lp-scene-media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-scene-media-check {
  position: absolute; top: 6px; right: 6px;
  width: 1.35rem; height: 1.35rem; border-radius: 4px;
  background: rgba(0,0,0,.65); border: 1px solid var(--border);
  color: #86efac; font-size: .85rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.lp-scene-media-card.selected .lp-scene-media-check {
  background: var(--info); color: #fff; border-color: transparent;
}
.lp-scene-media-meta { min-width: 0; }
.lp-scene-media-meta .lp-list-title {
  font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-btn-add { min-width: 2.4rem; font-size: .85rem; padding: .35rem .55rem; margin-top: 0; }

.lp-pl-row, .lp-layer-row {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .4rem;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.lp-chip-num { background: #121820; border: 1px solid var(--border); border-radius: 6px; padding: .15rem .4rem; font-size: .8rem; }

.lp-preview-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 1100;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
.lp-preview {
  background: #0b1220; border: 1px solid var(--border); border-radius: 12px;
  max-width: min(960px, 100%); width: 100%; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column;
}
.lp-preview-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.lp-preview-body { padding: 1rem; background: #000; min-height: 220px; display: flex; align-items: center; justify-content: center; }
.lp-preview-body img, .lp-preview-body video { max-width: 100%; max-height: 70vh; }

.tile .row-actions { margin-top: .5rem; }

/* Homiy admin — denser Excel-like panes */
.admin-h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.admin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  align-items: start;
}
@media (max-width: 960px) {
  .admin-split { grid-template-columns: 1fr; }
}
.admin-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .55rem .65rem .75rem;
  min-height: 280px;
}
.admin-inline-form {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
  margin: .4rem 0 .55rem; padding: .4rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px;
}
.admin-inline-form input, .admin-inline-form select {
  padding: .28rem .45rem; font-size: .8rem; border-radius: 4px; max-width: 220px;
}
.admin-inline-form .grow { flex: 1; min-width: 120px; max-width: none; }
.admin-dense .xl-wrap { margin-top: .25rem; }
.xl-table.xl-dense th, .xl-table.xl-dense td {
  padding: .22rem .4rem; font-size: .78rem; line-height: 1.25;
}
.xl-table.xl-dense th { font-size: .72rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.xl-table.xl-dense tr.selected { background: var(--row-hover); outline: 1px solid var(--accent); }
.xl-table.xl-dense .col-acts { white-space: nowrap; }
.homiy-tabs { margin-top: .25rem; }

/* Toast notifications (Homiy delete success / errors without logout noise) */
.ux-toast-host {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .4rem; pointer-events: none;
  max-width: min(360px, calc(100vw - 2rem));
}
.ux-toast {
  pointer-events: auto;
  padding: .55rem .85rem;
  border-radius: 6px;
  font-size: .85rem;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}
.ux-toast.ok { background: #14532d; border-color: #166534; }
.ux-toast.err { background: #7f1d1d; border-color: #991b1b; }
.ux-toast.out { opacity: 0; transform: translateY(6px); }

