*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1a1a;
  --surface: #2a2a2a;
  --surface2: #333333;
  --border: #444444;
  --accent: #007bff;
  --accent-hover: #2693ff;
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --row-hover: #333333;
  --row-selected: #003d80;
  --danger: #e05555;
}

body {
  font-family: sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── LOGIN ── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 2rem 2rem 2rem;
  width: 440px;
}

.login-card h1 { font-size: 1.2rem; margin-bottom: 0.4rem; white-space: nowrap; }
.login-card p  { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.85rem; }

label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.3rem; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.error-msg { color: var(--danger); font-size: 0.8rem; margin-bottom: 0.4rem; min-height: 0; }

/* ── MAIN APP LAYOUT ── */
:root {
  --calc-h: 160px;
}
.app-shell {
  display: grid;
  grid-template-rows: 48px auto 1fr 6px var(--calc-h);
  height: 100vh;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  border-radius: 0;
}
.header .logo { font-weight: 700; font-size: 1rem; color: var(--accent); letter-spacing: 0.02em; }
.header .spacer { flex: 1; }
.header .user-email { font-size: 0.8rem; color: var(--text-muted); }

/* Project Navigation bar */
.project-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0.2rem 1.25rem;
  gap: 0.75rem;
  overflow: hidden;
}
.project-nav-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.project-nav-path {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  line-height: 1;
}
.project-nav-seg { color: var(--text-muted); }
.project-nav-sep { color: var(--border); font-size: 0.62rem; }
.project-nav-current { color: var(--accent); font-weight: 600; }
.project-nav .spacer { flex: 1; }
.sheet-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  outline: none;
}
.sheet-select:focus { border-color: var(--accent); }

/* Main content: sheet left, video right */
.main-content {
  display: flex;
  overflow: hidden;
}
.sheet-panel {
  flex: 0 0 var(--sheet-w, 30%);
  min-width: 180px;
}
.h-resize-handle {
  flex: 0 0 5px;
  background: var(--border);
  cursor: col-resize;
  transition: background 0.15s;
}
.h-resize-handle:hover,
.h-resize-handle.dragging { background: var(--accent); }
.video-panel {
  flex: 1 1 0;
  min-width: 200px;
}
.v-resize-handle {
  background: var(--border);
  height: 5px;
  cursor: row-resize;
  transition: background 0.15s;
}
.v-resize-handle:hover,
.v-resize-handle.dragging { background: var(--accent); }

/* Sheet panel */
.sheet-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.panel-header {
  height: 42px;
  padding: 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#sheetFilter {
  flex: 1;
  max-width: 220px;
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  outline: none;
}
#sheetFilter:focus { border-color: var(--accent); }

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.filter-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin: 0;
}
.sheet-scroll {
  overflow: auto;
  flex: 1;
}
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.sheet-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface2);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.78rem;
  position: relative;
  user-select: none;
}

.col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  background: transparent;
}
.col-resize-handle:hover { background: var(--accent); opacity: 0.4; }
.sheet-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.sheet-table tbody tr:hover { background: var(--row-hover); }
.sheet-table tbody tr.selected { background: var(--row-selected); }
.sheet-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-direction: column;
  gap: 0.5rem;
}

/* Video panel */
.video-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}
.video-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
  overflow: hidden;
}
.video-wrap video {
  max-width: 100%;
  max-height: 100%;
  outline: none;
}
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}
/* Combined info bar: tech data + SELECTED badge + I/O markers */
.info-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  min-width: 0;
  overflow: hidden;
}
.info-tech {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.info-selected-badge {
  color: #4caf50;
  font-weight: 700;
  font-size: 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.info-sep {
  color: var(--border);
  flex-shrink: 0;
}
.marker-key {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.marker-tc {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 82px;
  display: inline-block;
  flex-shrink: 0;
}
.marker-tc.is-set { color: var(--accent); }
.marker-arrow { color: var(--text-muted); flex-shrink: 0; }
.marker-hint { color: var(--text-muted); margin-left: auto; font-size: 0.7rem; white-space: nowrap; }
.char-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  margin-left: 0.5rem;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
}
.char-picker-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-right: 0.25rem;
}
.char-check {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.char-check input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.char-check.all-check { color: var(--accent); font-weight: 600; }

.marker-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.marker-form input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  margin-bottom: 0;
}
.marker-form input:focus { border-color: var(--accent); }
.marker-form .btn { width: auto; flex-shrink: 0; }
.marker-form .btn-ghost { padding: 0.3rem 0.55rem; }

.segments-bar {
  flex-direction: column;
  background: #1a2e1a;
  border-top: 1px solid rgba(76,175,80,0.4);
  flex-shrink: 0;
  overflow-y: visible;
}
.segments-list { padding: 0.35rem 0.75rem 0.4rem; }
.segment-item {
  display: grid;
  grid-template-columns: minmax(80px, 160px) 90px 180px 80px 1fr 20px;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(76,175,80,0.1);
}
.segment-item:last-child { border-bottom: none; }
.segment-clip    { font-size: 0.7rem; color: var(--text-muted); opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segment-user    { color: #81c784; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segment-tc      { color: #558b57; font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.segment-charsec { color: #4caf50; font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.segment-text    { color: #a5d6a7; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segment-del-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 0.25rem;
  flex-shrink: 0;
  opacity: 0.6;
  line-height: 1;
}
.segment-del-btn:hover { opacity: 1; }

/* Loading spinner */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Iconik link */
.iconik-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.iconik-link:hover { text-decoration: underline; }

/* Metadata / Calculations panel */
.calc-panel {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.calc-scroll {
  overflow: auto;
  flex: 1;
  padding: 0.15rem 0;
}
#calcGrid { width: 100%; }
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.calc-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.22rem 0.75rem;
  width: 20%;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.calc-table td {
  color: var(--text);
  padding: 0.22rem 0.75rem;
  width: 30%;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
}
.calc-table th + td + th {
  border-left: 1px solid var(--border);
}
.calc-table tr:last-child th,
.calc-table tr:last-child td { border-bottom: none; }
.notes-cell { white-space: normal; color: var(--text); font-size: 0.76rem; line-height: 1.4; }

/* Rows with confirmed selects */
.sheet-table tbody tr.row-has-selects td:first-child { border-left: 3px solid #5cdb95; }
.sheet-table tbody tr.row-has-selects { background: rgba(92, 219, 149, 0.07); }

/* ── NAV BUDGET ── */
.nav-budget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
}
.nav-budget-item { display: flex; align-items: baseline; gap: 0.3rem; }
.nav-budget-item strong { color: var(--text); font-weight: 600; }
.nav-budget-sep { color: var(--border); font-size: 0.65rem; }

/* ── POST SELECTS ── */
.calc-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 0.22rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.post-select-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.18rem 0.75rem;
  font-size: 0.78rem;
}
.ps-tc {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}
.ps-stat {
  color: var(--accent);
  white-space: nowrap;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.ps-comment {
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── CUSTOM VIDEO CONTROLS ── */
.vc-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  min-width: 0;
}
.vc-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
  user-select: none;
  padding: 0;
}
.vc-btn:hover { background: var(--surface2); }
.vc-play, .vc-fs { font-size: 0.75rem; }

.vc-vol-wrap { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.vc-vol-icon { font-size: 0.8rem; line-height: 1; user-select: none; flex-shrink: 0; }
.vc-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  border: none;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.vc-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.vc-vol::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.vc-tc {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 0;
}
.vc-seek-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.vc-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  border: none;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
.vc-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.vc-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.video-wrap video { cursor: pointer; }

/* ── MULTI-TAKE STRIP ── */
.take-strip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}
.take-strip-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.take-strip-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  overflow-y: auto;
}
.take-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.45rem;
  width: 160px;
  transition: border-color 0.15s, background 0.15s;
}
.take-card:hover { border-color: var(--accent); background: var(--surface2); }
.take-thumb {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg);
  display: block;
}
.take-thumb-placeholder {
  width: 100%;
  height: 88px;
  border-radius: 3px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--border);
}
.take-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  word-break: break-all;
  line-height: 1.3;
  max-height: 3.9em;
  overflow: hidden;
  width: 100%;
}

/* ── TAKE STRIP SELECTION ── */
.take-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--surface2); }
.take-strip-action { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.35rem; flex-shrink: 0; }
.take-strip-action .action-hint { font-size: 0.72rem; color: var(--text-muted); }

/* ── QUAD PLAYER ── */
.quad-grid { display: grid; width: 100%; height: 100%; gap: 2px; background: var(--bg); }
.quad-grid.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.quad-grid.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.quad-grid.count-3,
.quad-grid.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.quad-cell { position: relative; overflow: hidden; background: #000; cursor: pointer; }
.quad-cell.primary-cell::after { content: "●"; position: absolute; top: 5px; left: 6px; font-size: 0.65rem; color: var(--accent); pointer-events: none; }
.quad-cell video { width: 100%; height: 100%; object-fit: contain; display: block; }
.quad-cell-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); }

/* ── VIDEO ZOOM ── */
.zoom-reset-btn { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.65); color: var(--text); border: 1px solid var(--border); border-radius: 4px; font-size: 0.7rem; padding: 2px 6px; cursor: pointer; display: none; z-index: 10; }
.zoom-reset-btn:hover { background: rgba(0,0,0,0.85); }

/* ── BUDGET PRICE ── */
.nav-budget-cost {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.68rem;
  margin-left: 0.15rem;
}

/* ── EXPORT MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 500px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.35rem;
  line-height: 1;
  border-radius: 3px;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-section { display: flex; flex-direction: column; gap: 0.45rem; }
.modal-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.export-format-group { display: flex; gap: 1.25rem; }
.export-radio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.export-radio input[type="radio"] {
  accent-color: var(--accent);
  width: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.export-check-grid { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.export-check-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}
.export-check-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.modal-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-footer .btn-primary { width: auto; }

/* ── ADMIN ── */
.admin-wrap {
  max-width: 540px;
  margin: 3rem auto;
  padding: 0 1rem;
}
.admin-wrap h1 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.admin-wrap p  { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.1rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: -0.5rem; margin-bottom: 1rem; }
.success-msg { color: #5cdb95; font-size: 0.82rem; margin-bottom: 0.75rem; min-height: 1em; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
