:root {
  --bg: #0f1419;
  --sidebar: #161b22;
  --surface: #ffffff;
  --surface2: #f4f6f8;
  --border: #e2e8f0;
  --text: #1a202c;
  --muted: #64748b;
  --wb: #7b2cbf;
  --ozon: #005bff;
  --accent: #2563eb;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--surface2);
  color: var(--text);
  min-height: 100dvh;
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100dvh;
}

.sidebar {
  background: var(--sidebar);
  color: #e2e8f0;
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}

.sidebar-toggle {
  display: none;
  margin: 0 1rem 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #e2e8f0;
  font-size: 0.8rem;
  cursor: pointer;
}

.brand {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid #30363d;
  margin-bottom: 0.75rem;
}

.brand h1 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand p {
  font-size: 0.75rem;
  color: #8b949e;
  margin-top: 0.25rem;
}

.workspace-select {
  padding: 0 1rem 1rem;
}

.workspace-select label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b949e;
  display: block;
  margin-bottom: 0.35rem;
}

.workspace-select select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.nav { flex: 1; overflow-y: auto; }

.nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  color: #c9d1d9;
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
}

.nav a:hover { background: #21262d; color: #fff; }

.nav a.active {
  background: #21262d;
  color: #fff;
  border-left-color: var(--accent);
}

.nav a.hidden { display: none; }

.nav .badge {
  margin-left: auto;
  font-size: 0.65rem;
  background: #30363d;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: #8b949e;
}

.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group.hidden { display: none; }

.nav-group__head {
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.nav-group__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem 0.55rem 1.25rem;
  color: #c9d1d9;
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
}

.nav-group__link:hover { background: #21262d; color: #fff; }

.nav-group__link.active,
.nav-group.is-open > .nav-group__head .nav-group__link {
  background: #21262d;
  color: #fff;
}

.nav-group__link.active { border-left-color: var(--accent); }

.nav-group__toggle {
  flex: 0 0 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
}

.nav-group__toggle:hover {
  background: #21262d;
  color: #fff;
}

.nav-group.is-open > .nav-group__head .nav-group__toggle {
  background: #21262d;
  border-left-color: #30363d;
  color: #fff;
}

.nav-burger {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  position: relative;
}

.nav-burger::before,
.nav-burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-burger::before { top: -4px; }
.nav-burger::after { top: 4px; }

.nav-sub {
  display: flex;
  flex-direction: column;
  padding: 0.15rem 0 0.35rem;
  background: #0d1117;
  border-left: 3px solid #30363d;
}

.nav-sub[hidden] { display: none; }

.nav-sub a {
  display: block;
  padding: 0.4rem 1rem 0.4rem 2rem;
  color: #8b949e;
  text-decoration: none;
  font-size: 0.8125rem;
  border-left: 3px solid transparent;
  margin-left: -3px;
}

.nav-sub a:hover {
  background: #161b22;
  color: #fff;
}

.nav-sub a.active {
  color: #fff;
  background: #161b22;
  border-left-color: var(--accent);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  font-size: 0.7rem;
  color: #6e7681;
  border-top: 1px solid #30363d;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.topbar h2 { font-size: 1.15rem; font-weight: 600; }

.detail-head-tabs {
  display: flex;
  gap: 0.35rem;
  flex: 1 1 auto;
}

.detail-head-tabs[hidden] {
  display: none !important;
}

.detail-head-tabs button {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.detail-head-tabs button:hover {
  background: #f8fafc;
}

.detail-head-tabs button.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.filters select, .filters button {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.8rem;
}

.filters button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filters button.primary:focus-visible,
.nav a:focus-visible,
.sidebar-toggle:focus-visible,
.workspace-select select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chart-host {
  min-height: 180px;
  width: 100%;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}

.alert-strip {
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: #92400e;
}

.content {
  padding: 1.25rem 1.5rem 2rem;
  flex: 1;
}

.page { display: none; }
.page.active { display: block; }

.grid-4,
.grid-5,
.grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dds-note.warn {
  color: var(--warn, #b45309);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.card .label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card .value {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.35rem 0;
  font-variant-numeric: tabular-nums;
}

.card .fish {
  color: #94a3b8;
  font-style: italic;
}

.card .delta { font-size: 0.8rem; color: var(--muted); }

.card.wb { border-top: 3px solid var(--wb); }
.card.ozon { border-top: 3px solid var(--ozon); }
.card.total { border-top: 3px solid var(--bg); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.panel-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-body { padding: 1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface2);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.tag.wb { background: #f3e8ff; color: var(--wb); }
.tag.ozon { background: #dbeafe; color: var(--ozon); }
.tag.ok { background: #d1fae5; color: var(--ok); }
.tag.warn { background: #fef3c7; color: var(--warn); }
.tag.bad { background: #fee2e2; color: var(--bad); }

.chart-placeholder {
  height: 180px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.pivot-grid {
  display: grid;
  grid-template-columns: 140px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  font-size: 0.75rem;
}

.pivot-grid > div {
  background: var(--surface);
  padding: 0.45rem;
  text-align: center;
}

.pivot-grid .corner { background: var(--surface2); font-weight: 600; }

.tasks { display: flex; flex-direction: column; gap: 0.75rem; }

.task {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--surface);
}

.task h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.task p { font-size: 0.8rem; color: var(--muted); }

.sync-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.session-box {
  margin: 0 1rem 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.session-box[hidden] { display: none; }

.session-box__who { overflow: hidden; }

.session-box strong {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-box .muted { color: #8b949e; font-size: 0.72rem; }

.session-box button,
.session-box a {
  flex-shrink: 0;
  padding: 0.3rem 0.5rem;
  border: 1px solid #30363d;
  border-radius: 5px;
  background: #161b22;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.72rem;
  text-decoration: none;
  cursor: pointer;
}

.session-box button:focus-visible,
.session-box a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* --- страница «Люди и доступ» --- */

.people-form { display: flex; flex-direction: column; gap: 1rem; }

.people-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.people-form label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.people-form input[type="text"],
.people-form select,
.people-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
}

.people-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem 0.9rem;
}

.people-fieldset[hidden] { display: none; }

.people-fieldset legend {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0.35rem;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0 0.15rem;
}

.people-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.35rem 0.75rem;
}

.people-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text);
}

.people-form button.primary {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.invite-result {
  margin-top: 1.25rem;
  padding: 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 0.85rem;
}

.invite-result[hidden] { display: none; }

.invite-link-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 0.4rem;
}

.invite-link-row input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text);
}

.invite-link-row button {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.people-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.people-actions button {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.people-actions button:focus-visible,
.people-form button:focus-visible,
.invite-link-row button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.value.pos { color: var(--ok); }
.value.neg { color: var(--bad); }

.pnl-report-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pnl-report-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 1 1 320px;
  max-width: 1100px;
}

@media (max-width: 960px) {
  .pnl-report-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pnl-report-tabs {
    grid-template-columns: 1fr;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.pnl-table td.pos,
.pnl-table td.neg {
  font-weight: 600;
}

.doli-note {
  margin-top: 0.75rem;
  line-height: 1.45;
}

.doli-history td:first-child {
  white-space: nowrap;
}

.doli-history tr.doli-history-current td {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}

.doli-history tr.doli-history-current td:first-child {
  color: var(--accent);
}

.dds-note {
  margin-top: 0.75rem;
  line-height: 1.45;
}

.dds-history td:first-child {
  white-space: nowrap;
}

.dds-history tr.dds-history-current td {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}

.dds-history tr.dds-history-current td:first-child {
  color: var(--accent);
}

#pnl-report-refresh {
  align-self: center;
  white-space: nowrap;
  min-height: 44px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.pnl-report-tabs button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.pnl-report-tabs button:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pnl-report-tabs button.active {
  border-color: var(--accent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, #fff), var(--surface));
  box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(37, 99, 235, 0.12);
}

.pnl-report-tab-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.pnl-report-tab-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.pnl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.pnl-toolbar .tabs button {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.pnl-toolbar .tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pnl-select {
  min-width: 160px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--surface);
}

#pnl-banner.banner {
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
  color: #065f46;
}

#stock-banner.banner {
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
  color: #065f46;
}

#stock-banner.banner.warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.inventory-hint {
  margin: 0;
  max-width: 42rem;
  font-size: 0.82rem;
}

#inventory-banner.banner {
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
  color: #065f46;
}

#inventory-banner.banner.warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.inv-meta {
  font-size: 0.95rem !important;
}

.inv-wh-cell {
  vertical-align: top;
  min-width: 7rem;
}

.inv-wh-details {
  margin: 0;
}

.inv-wh-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #2563eb;
  list-style: none;
}

.inv-wh-details summary::-webkit-details-marker {
  display: none;
}

.inv-wh-details summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.inv-wh-details[open] summary::before {
  transform: rotate(90deg);
}

.inv-wh-list {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.inv-wh-list li {
  margin-bottom: 0.2rem;
}

.inv-wh-name {
  color: var(--text-muted, #64748b);
}

#pnl-banner.banner.warn {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.pnl-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.pnl-metrics div span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pnl-metrics div strong {
  display: block;
  font-size: 1.05rem;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.pnl-tax { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.75rem; }
.pnl-meta { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.75rem; }
.pnl-top h4 { margin: 0 0 0.5rem; font-size: 0.82rem; }
.pnl-top-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.pnl-top-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.pnl-toggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  margin-top: 0.5rem;
}
.pnl-overhead { margin-top: 0.5rem; font-size: 0.8rem; }
.pnl-oh-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--border);
}
.pnl-mp-panel.wb .panel-head { border-top: 3px solid var(--wb); }
.pnl-mp-panel.ozon .panel-head { border-top: 3px solid var(--ozon); }
.pnl-table td:nth-child(n+2),
.pnl-table th:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pnl-alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.load-sidebar {
  margin: 0.75rem 0.85rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid #93c5fd;
  background: #eff6ff;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #1e40af;
}

.load-sidebar[hidden] {
  display: none !important;
}

.load-sidebar__spinner {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  flex-shrink: 0;
  animation: load-spin 0.75s linear infinite;
}

.load-sidebar__label {
  font-weight: 600;
  line-height: 1.3;
}

.load-sidebar__step {
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

@keyframes load-spin {
  to { transform: rotate(360deg); }
}

#pnl-banner.loading {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.pnl-toolbar button:disabled,
.pnl-toolbar select:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    height: auto;
    position: relative;
    max-height: none;
  }
  .sidebar-toggle {
    display: block;
  }
  body.sidebar-collapsed .nav,
  body.sidebar-collapsed .workspace-select,
  body.sidebar-collapsed .hints-toggle,
  body.sidebar-collapsed .session-box,
  body.sidebar-collapsed .sidebar-footer {
    display: none;
  }
}

.video-ads-stills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.video-ads-still {
  margin: 0;
}

.video-ads-still img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #1c2228;
}

.video-ads-player {
  display: block;
  width: min(280px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0.75rem 0;
  border-radius: 8px;
  background: #111;
}

.video-ads-player[hidden] {
  display: none;
}

.video-ads-progress {
  margin: 0.75rem 0 0;
  max-width: 28rem;
}

.video-ads-progress[hidden] {
  display: none;
}

.video-ads-progress__track {
  height: 14px;
  border-radius: 99px;
  background: #dbe3ea;
  overflow: hidden;
  border: 1px solid #c5d0d8;
}

.video-ads-progress__track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #2563eb;
  transition: width 0.12s linear;
}

.video-ads-progress__label {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.video-ads-still figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.video-ads-still-dl,
.video-ads-still-regen,
.video-ads-still-up {
  display: inline-block;
  margin: 0.15rem 0.15rem 0 0;
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
}

.video-ads-still-edit[hidden] {
  display: none;
}
