:root {
  --bg: #0b0f14;
  --bg-soft: #0f141b;
  --panel: #141b24;
  --panel-2: #111821;
  --panel-3: #0f1620;
  --line: #1f2937;
  --text: #e6e9ef;
  --muted: #95a3b3;
  --accent: #3b82f6;
  --accent-2: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(900px 500px at 10% -10%, #1b2433 0%, rgba(27, 36, 51, 0) 70%),
    radial-gradient(700px 400px at 90% -10%, #1a2a3f 0%, rgba(26, 42, 63, 0) 70%),
    linear-gradient(180deg, #0b0f14 0%, #0b1017 55%, #0a0f15 100%);
  color: var(--text);
  font-family: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

code {
  background: #0b1220;
  border: 1px solid #1f2a3d;
  padding: 2px 6px;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

.card,
.panel,
.stat,
.note,
.ok,
.err,
.errbox,
.okbox,
.value,
.muted,
.badge,
.pill,
.marketplace-log,
.appointments-sync-box,
.appointments-selection-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row > *,
.row2 > *,
.filter-grid > *,
.table-toolbar > *,
.stat-grid > *,
.marketplace-admin-grid > *,
.marketplace-admin-grid-3 > *,
.marketplace-upload-layout > *,
.split > *,
.appointments-grid > * {
  min-width: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.links a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--muted);
  transition: all .2s ease;
}

.links a.active {
  color: #dbeafe;
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(59, 130, 246, 0.16);
}

.links a:hover:not(.active) {
  color: var(--text);
  border-color: #2a3444;
  background: #0f1620;
}

.links a.danger {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.container {
  max-width: 1320px;
  margin: 28px auto 60px auto;
  padding: 0 22px;
}

.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 16px 0 32px 0;
}

h1 { margin: 0 0 14px 0; font-size: 28px; letter-spacing: .2px; }

h2 { margin: 0 0 12px 0; font-size: 22px; }

h3 { margin: 0 0 10px 0; font-size: 18px; }

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel.soft { background: var(--panel-2); }

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

  .storage-hero,
  .storage-admin-grid,
  .storage-kpi-grid,
  .storage-thresholds {
    grid-template-columns: 1fr;
  }
}

.input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #223043;
  border-radius: 12px;
  background: #0c121a;
  color: var(--text);
  font-size: 14px;
}

textarea.input { min-height: 90px; }

.auction-form .input,
.auction-form select,
.auction-form textarea {
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 14px;
  min-height: 46px;
  background: #0f1a28;
  border-color: #2b3b57;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auction-form .row2 {
  gap: 16px;
  margin-bottom: 12px;
}

.auction-form label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.auction-form .input::placeholder {
  color: #7e8da0;
}

.auction-form .input:focus,
.auction-form select:focus,
.auction-form textarea:focus {
  outline: none;
  border-color: #5b7eea;
  box-shadow: 0 0 0 2px rgba(91, 126, 234, 0.18);
}

.btn {
  background: #0f1722;
  border: 1px solid #253247;
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  transition: all .2s ease;
}

.btn:hover { border-color: #334155; }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1020;
}

.btn.success {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #04120b;
}

.btn.warn {
  background: var(--warn);
  border-color: var(--warn);
  color: #1d1202;
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #120404;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.btn.ghost.subtle {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn.ghost.subtle:hover {
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

.modal-delete {
  position: absolute;
  right: 18px;
  bottom: 16px;
  margin: 0;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.edit {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.7);
  color: #dbeafe;
}

.btn.edit:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.95);
  color: #ffffff;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #243248;
  background: #101826;
  color: var(--muted);
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.badge.fix { background: rgba(34, 197, 94, 0.12); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
.badge.auk { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }
.badge.sold { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border-color: rgba(59, 130, 246, 0.35); }

.badge.scope-business { background: rgba(59, 130, 246, 0.14); color: #bfdbfe; border-color: rgba(59, 130, 246, 0.4); }
.badge.scope-personal { background: rgba(16, 185, 129, 0.12); color: #a7f3d0; border-color: rgba(16, 185, 129, 0.35); }
.badge.scope-family { background: rgba(168, 85, 247, 0.12); color: #e9d5ff; border-color: rgba(168, 85, 247, 0.35); }

.badge.kind-expense { background: rgba(239, 68, 68, 0.12); color: #fecaca; border-color: rgba(239, 68, 68, 0.35); }
.badge.kind-income { background: rgba(34, 197, 94, 0.12); color: #bbf7d0; border-color: rgba(34, 197, 94, 0.35); }
.badge.kind-capital { background: rgba(14, 165, 233, 0.12); color: #bae6fd; border-color: rgba(14, 165, 233, 0.35); }
.badge.kind-savings { background: rgba(245, 158, 11, 0.12); color: #fde68a; border-color: rgba(245, 158, 11, 0.35); }

.tablewrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d141c;
}

.tablewrap.market {
  background: #0c131d;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.purchases-table td.r,
.purchases-table th.r {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.purchases-table {
  font-size: 12px;
}

.purchases-table th,
.purchases-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.purchases-table .col-price {
  min-width: 140px;
}

.purchases-table .col-ship {
  min-width: 95px;
}

.purchases-table .col-landed {
  min-width: 115px;
}

.purchases-table .col-date {
  min-width: 95px;
  white-space: nowrap;
}

.purchases-table .col-name {
  min-width: 300px;
}

.purchases-table .name {
  font-weight: 600;
  font-size: 12.5px;
}

.purchases-table .sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchases-table .cell-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.purchases-table .cell-stack .line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.purchases-table .cell-stack .label {
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
}

.purchases-table .cell-stack .label {
  color: var(--muted);
  font-size: 11px;
}

.purchases-table .cell-stack .num {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.purchases-table .col-profit {
  min-width: 140px;
}

.purchases-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 36, 0.55);
}

.modal.gallery-modal {
  width: min(860px, calc(100vw - 24px));
}

.gallery-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-frame {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 12px;
  border-radius: 12px;
  background: #0b111a;
  border: 1px solid var(--line);
}

.gallery-frame img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
}

.gallery-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 6px;
}

.gallery-nav[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.gallery-modal .panel {
  background: rgba(9, 14, 22, 0.98);
  border: 1px solid rgba(120, 140, 180, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  padding: 16px;
}

.gallery-modal .gallery-desc {
  background: rgba(12, 18, 28, 0.98);
  border: 1px solid rgba(140, 160, 200, 0.35);
}

.gallery-modal h3 {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.gallery-modal .gallery-desc .note {
  font-size: 15px;
  line-height: 1.7;
  color: #eef5ff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.gallery-modal .gallery-desc .note strong {
  color: #e6f0ff;
}

.gallery-modal .gallery-desc .note + .note {
  margin-top: 12px;
}

.gallery-modal .gallery-desc .note .value {
  display: inline;
}

.gallery-modal .gallery-desc .note .label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #c2d1ee;
  letter-spacing: 0.2px;
}

thead th {
  text-align: left;
  background: #0f1824;
  color: var(--muted);
  border-bottom: 1px solid #1e2a3b;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  background: #0f1824;
  z-index: 2;
}

.data-table td:first-child {
  background: #0d141c;
}

.data-table thead th:first-child {
  z-index: 3;
}

tbody td {
  border-bottom: 1px solid #162233;
  padding: 10px 12px;
  vertical-align: top;
}

tbody tr:hover { background: rgba(59, 130, 246, 0.05); }

.row-negative {
  background: rgba(239, 68, 68, 0.08);
}

.data-table thead th {
  background: #101b2a;
  font-weight: 600;
  padding: 12px 14px;
}

.data-table tbody td {
  padding: 12px 14px;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 36, 0.55);
}

.data-table.mini thead th,
.data-table.mini tbody td {
  padding: 10px 12px;
  font-size: 12px;
}

.reports-table th,
.reports-table td {
  font-size: 12px;
  white-space: nowrap;
}

.reports-table .th-sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}

.reports-table .btn.small {
  padding: 6px 10px;
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  font-size: 12px;
}

.reports-table .cell-main {
  white-space: nowrap;
}

.reports-table .cell-sub {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
  text-align: left;
}

.reports-table .cell-sub span {
  white-space: nowrap;
}

.market-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 36, 0.55);
}

.market-table tbody td {
  padding: 12px 12px;
}

.market-table thead th {
  padding: 12px 12px;
}

.r { text-align: right; }
.c { text-align: center; }

.muted { color: var(--muted); font-size: 13px; }

.note { color: var(--muted); font-size: 12px; }
.note-warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-block;
}

.row-danger {
  background: rgba(239, 68, 68, 0.08) !important;
}

.row-warn {
  background: rgba(245, 158, 11, 0.08) !important;
}

.row-ok {
  background: rgba(34, 197, 94, 0.08) !important;
}

.row-soft {
  background: rgba(59, 130, 246, 0.06) !important;
}

.fx {
  font-size: 12px;
  color: #8de7b4;
  margin-top: 4px;
}

.fx.muted {
  color: var(--muted);
}

.rate-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.rate-line .value {
  color: var(--text);
  font-weight: 600;
}

.rate-link {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #223043;
  background: #0f1622;
  color: var(--muted);
  font-size: 11px;
  transition: all .2s ease;
}

.rate-link:hover {
  color: var(--text);
  border-color: #314059;
  background: #101a28;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.analytics-filters {
  padding: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  padding-top: 4px;
}

.saved-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-grid.market {
  grid-template-columns: repeat(5, 1fr);
}

.stat-grid.analytics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stat-grid.finance {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stat.section {
  grid-column: 1 / -1;
  background: transparent;
  border: 0;
  padding: 0 4px;
  box-shadow: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.table-toolbar .input {
  flex: 1 1 180px;
  max-width: 260px;
}

.table-toolbar #entry_count {
  margin-left: auto;
}

.table-toolbar .input[type="number"] {
  max-width: 140px;
}

.finance-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 184px;
}

.finance-edit-modal {
  width: min(720px, calc(100vw - 24px));
}

.panel.finance-entry {
  background: linear-gradient(180deg, #22345a 0%, #18253b 100%);
  border: 1px solid #36507d;
  box-shadow:
    0 18px 48px rgba(6, 12, 24, 0.55),
    0 0 0 1px rgba(90, 140, 235, 0.12),
    inset 0 1px 0 rgba(118, 160, 245, 0.25);
}

.finance-entry .row2 {
  gap: 16px;
  margin-bottom: 12px;
}

.finance-entry label {
  font-size: 13px;
  color: var(--muted);
}

.finance-entry .input,
.finance-entry select,
.finance-entry textarea {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  min-height: 46px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1.3fr 3fr 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bar-label {
  color: var(--text);
  font-weight: 600;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #0f1624;
  border: 1px solid #1f2a3d;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.7);
}

.bar-fill.personal { background: rgba(16, 185, 129, 0.75); }
.bar-fill.family { background: rgba(168, 85, 247, 0.75); }
.bar-fill.income { background: rgba(34, 197, 94, 0.75); }

.stat {
  background: var(--panel-2);
  border: 1px solid #1f2a3d;
  border-radius: 14px;
  padding: 12px;
}

.stat .value { font-weight: 800; font-size: 16px; }

.stat.positive .value { color: var(--accent-2); }
.stat.warn .value { color: #fbbf24; }
.stat.negative .value { color: #fca5a5; }

.chart-panel {
  padding: 16px;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chart-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.legend-item {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: #3b82f6;
}

.legend-item.net::before { background: #22c55e; }
.legend-item.in::before { background: #3b82f6; }
.legend-item.out::before { background: #f59e0b; }
.legend-item.flow::before { background: #22c55e; }

.bar-chart {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 180px;
  overflow-x: auto;
  padding: 6px 4px 0;
}

.bar-group {
  min-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bar-stack {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 140px;
}

.bar {
  width: 14px;
  border-radius: 6px 6px 0 0;
  background: rgba(59, 130, 246, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.9);
}

.bar.net {
  background: rgba(34, 197, 94, 0.6);
  border-color: rgba(34, 197, 94, 0.9);
}

.bar.net.neg {
  background: rgba(239, 68, 68, 0.5);
  border-color: rgba(239, 68, 68, 0.85);
}

@media (max-width: 640px) {
  .bar-chart {
    gap: 8px;
    justify-content: space-between;
  }

  .bar-group {
    min-width: 42px;
  }

  .bar-stack {
    gap: 4px;
  }

  .bar {
    width: 11px;
  }
}

.bar.in {
  background: rgba(59, 130, 246, 0.6);
  border-color: rgba(59, 130, 246, 0.9);
}

.bar.out {
  background: rgba(245, 158, 11, 0.55);
  border-color: rgba(245, 158, 11, 0.9);
}

.bar.flow {
  background: rgba(34, 197, 94, 0.6);
  border-color: rgba(34, 197, 94, 0.9);
}

.bar.flow.neg {
  background: rgba(239, 68, 68, 0.55);
  border-color: rgba(239, 68, 68, 0.9);
}

.bar-group .label {
  font-size: 11px;
  color: var(--muted);
}

.stat-link {
  display: block;
  color: inherit;
  transition: all .2s ease;
}

.stat-link:hover {
  border-color: #35507a;
  background: #101a2a;
}

.stat.highlight {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(15,23,34,0.95));
  border-color: rgba(59,130,246,0.45);
}

.stat.highlight .value {
  font-size: 22px;
}

.stat.highlight .note {
  margin-top: 4px;
  color: #9fc0ff;
  font-size: 12px;
}

.stat.max-bid {
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(15,23,34,0.95));
  border-color: rgba(34,197,94,0.5);
}

.stat.max-bid .value {
  font-size: 26px;
  color: var(--accent-2);
}

.stat.max-bid .note {
  color: #9fe6ba;
}

.note.profit {
  color: var(--accent-2);
  font-weight: 600;
}

.text-green {
  color: var(--accent-2);
  font-weight: 700;
}

.text-warn {
  color: #fbbf24;
  font-weight: 700;
}

.text-negative {
  color: #fca5a5;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.market { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid.market { grid-template-columns: 1fr; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 10px;
  background: #0f1624;
  border: 1px solid #213047;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.chip strong { color: var(--text); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.cat-card {
  display: block;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #1f2a3d;
  background: #0f1624;
  color: var(--text);
  transition: all .2s ease;
}

.cat-card:hover {
  border-color: #35507a;
  background: #121b2c;
}

.cat-card.active {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(59, 130, 246, 0.16);
}

.cat-card .title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.cat-card .count {
  font-size: 12px;
  color: var(--muted);
}

.thumb {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #1f2a3d;
  background: #0f1624;
  cursor: zoom-in;
}

.purchases-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 76px;
}

.desc-cell {
  max-width: 260px;
}

.desc-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(59,130,246,0.35);
}

.link:hover {
  text-decoration-color: rgba(59,130,246,0.75);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.gallery-item {
  background: #0f1624;
  border: 1px solid #1f2a3d;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.img-viewer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.88);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.img-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  border: 1px solid #1f2a3d;
}

@media (max-width: 1200px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cat-row {
  border: 1px solid #1d2a3d;
  background: #0f1624;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.cat-row .input {
  height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.dropdown {
  position: relative;
}

.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0e1520;
  border: 1px solid #263246;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
  z-index: 20;
}

.dropdown-list.show { display: block; }

.dropdown-item {
  padding: 8px 10px;
  border-bottom: 1px solid #1b2638;
  color: var(--muted);
  cursor: pointer;
}

.dropdown-item:last-child { border-bottom: 0; }

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.6);
  z-index: 190;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 16px;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  box-shadow: var(--shadow);
  z-index: 200;
}

.modal.small { width: min(520px, calc(100vw - 24px)); }

.modal.edit-modal {
  padding: 22px;
  background: linear-gradient(160deg, #1b3268, #0e1422);
  border-color: rgba(59, 130, 246, 0.35);
}

.confirm-modal {
  width: min(520px, calc(100vw - 24px));
  background: linear-gradient(180deg, #151f2d 0%, #0f1622 100%);
  border: 1px solid #22324a;
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-message {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal.edit-modal h3 {
  margin-bottom: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.modal-head h3 {
  margin: 0;
}

.modal.edit-modal .row2 {
  gap: 16px;
  margin-bottom: 10px;
}

.modal.edit-modal label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.modal.edit-modal .input,
.modal.edit-modal select,
.modal.edit-modal textarea {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
}

.modal.edit-modal .actions {
  margin-top: 16px;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.settings-form {
  max-width: 980px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.settings-block label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.settings-block .input,
.settings-block select {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  min-height: 46px;
}

.settings-head {
  margin-bottom: 12px;
}

.settings-head h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
}

.settings-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  border: 1px solid transparent;
}

.pill.ok {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.pill.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.pill.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

.pill.soft {
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.32);
}

.pill.muted {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}

.marketplace-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.marketplace-live-banner {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin: 12px 0 18px 0;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  background: linear-gradient(180deg, rgba(8, 27, 17, 0.88), rgba(8, 20, 15, 0.96));
}

.marketplace-live-banner--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(41, 26, 6, 0.92), rgba(24, 18, 7, 0.98));
}

.marketplace-live-banner--info {
  border-color: rgba(96, 165, 250, 0.24);
  background: linear-gradient(180deg, rgba(9, 23, 43, 0.92), rgba(8, 17, 31, 0.98));
}

.marketplace-live-banner__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.16);
}

.marketplace-live-banner--warning .marketplace-live-banner__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.16);
}

.marketplace-live-banner--info .marketplace-live-banner__dot {
  background: #60a5fa;
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.16);
}

.marketplace-live-banner__meta {
  color: #a7f3d0;
  font-size: 12px;
  white-space: normal;
  text-align: right;
}

.marketplace-live-banner--warning .marketplace-live-banner__meta {
  color: #fcd34d;
}

.marketplace-live-banner--info .marketplace-live-banner__meta {
  color: #bfdbfe;
}

.marketplace-breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin: -4px 0 14px 0;
}

.marketplace-log {
  margin: 0;
  padding: 14px;
  background: #0b1220;
  border: 1px solid #1f2a3d;
  border-radius: 14px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  max-height: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}

.marketplace-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

.marketplace-product-card {
  background: linear-gradient(180deg, rgba(27, 37, 52, 0.95), rgba(18, 24, 35, 0.98));
  border: 1px solid #263447;
  border-radius: 18px;
  padding: 14px;
}

.marketplace-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.marketplace-id-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #233043;
  background: rgba(9, 14, 22, 0.78);
}

.marketplace-id-strip .note {
  display: block;
  margin-bottom: 4px;
}

.marketplace-id-strip strong {
  font-size: 14px;
  color: #eef2ff;
}

.oha-localization-callout,
.oha-localization-preview {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(12, 23, 40, 0.92), rgba(8, 14, 24, 0.98));
}

.oha-localization-callout {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.oha-localization-preview__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.oha-localization-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.oha-locale-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.46);
  color: #dbeafe;
  font-size: 12px;
}

.oha-locale-pill strong {
  color: #f8fafc;
}

.oha-flag-code {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.95), rgba(59, 130, 246, 0.86));
  color: #08111f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.oha-localization-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.22), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(34, 197, 94, 0.18), transparent 25%),
    linear-gradient(135deg, rgba(28, 22, 15, 0.96), rgba(10, 17, 28, 0.98));
}

.oha-localization-hero h2 {
  margin: 3px 0 8px 0;
  font-size: clamp(28px, 4vw, 46px);
}

.oha-localization-hero__stats,
.oha-currency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oha-localization-hero__stats div,
.oha-currency-grid div {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.34);
}

.oha-localization-hero__stats span,
.oha-currency-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.oha-localization-hero__stats strong,
.oha-currency-grid strong {
  color: #f8fafc;
  font-size: 22px;
}

.oha-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.oha-country-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #263447;
  background: rgba(12, 18, 29, 0.86);
}

.oha-country-card__flag {
  width: 42px;
  height: 31px;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.showroom-lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 16px;
}

.showroom-lead-card {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, rgba(27, 37, 52, 0.96), rgba(16, 23, 34, 0.98));
  border: 1px solid #2a3a52;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.showroom-lead-card.is-overdue {
  border-color: rgba(245, 158, 11, 0.5);
}

.showroom-lead-card__head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.showroom-lead-card__identity h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.showroom-lead-summary,
.showroom-contact-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.showroom-lead-summary > div,
.showroom-contact-strip > div,
.showroom-lead-note {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #233043;
  background: rgba(8, 13, 22, 0.72);
}

.showroom-lead-summary__primary {
  grid-column: 1 / -1;
}

.showroom-lead-summary strong,
.showroom-contact-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.showroom-contact-strip strong {
  font-size: 14px;
  line-height: 1.35;
}

.showroom-lead-note p {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.showroom-edit-panel {
  border: 1px solid #26384f;
  border-radius: 16px;
  background: rgba(8, 13, 22, 0.58);
  overflow: hidden;
}

.showroom-edit-panel summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #bfdbfe;
  font-weight: 800;
  list-style: none;
}

.showroom-edit-panel summary::-webkit-details-marker {
  display: none;
}

.showroom-edit-panel summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.showroom-edit-panel[open] summary {
  border-bottom: 1px solid #26384f;
}

.showroom-edit-panel[open] summary::before {
  content: "−";
}

.showroom-edit-panel form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.showroom-edit-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 36, 0.44);
}

.showroom-edit-section__title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketplace-lifecycle-box {
  display: grid;
  gap: 10px;
  margin: 0 0 12px 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(31, 24, 14, 0.88), rgba(20, 16, 10, 0.96));
}

.showroom-reminder-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.showroom-reminder-card,
.showroom-reminder-empty {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #233043;
  background: rgba(8, 13, 22, 0.72);
}

.showroom-reminder-card.is-danger {
  border-color: rgba(239, 68, 68, 0.34);
}

.showroom-reminder-card.is-warn {
  border-color: rgba(245, 158, 11, 0.34);
}

.showroom-reminder-card.is-ok {
  border-color: rgba(34, 197, 94, 0.34);
}

.showroom-reminder-card__head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.showroom-reminder-card__body {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.8fr 1fr;
  gap: 10px;
}

.showroom-reminder-card__body > div {
  min-width: 0;
}

.showroom-reminder-card__body strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.showroom-reminder-empty {
  color: var(--muted);
  text-align: center;
}

.marketplace-platform-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.marketplace-platform-item {
  background: rgba(10, 16, 24, 0.75);
  border: 1px solid #233043;
  border-radius: 14px;
  padding: 14px;
}

.marketplace-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 10px 0;
  font-size: 13px;
}

@media (max-width: 980px) {
  .marketplace-admin-grid {
    grid-template-columns: 1fr;
  }

  .showroom-lead-grid,
  .showroom-lead-summary,
  .showroom-contact-strip {
    grid-template-columns: 1fr;
  }

  .showroom-lead-card__head {
    flex-direction: column;
  }

  .showroom-lead-card .marketplace-card-badges {
    justify-content: flex-start;
  }

  .showroom-reminder-card__head {
    flex-direction: column;
  }

  .showroom-reminder-card__body {
    grid-template-columns: 1fr;
  }

  .marketplace-meta-grid {
    grid-template-columns: 1fr;
  }
}

.settings-actions {
  margin-top: 14px;
}

.settings-spacer {
  min-height: 1px;
}

.settings-actions-row {
  gap: 12px;
  align-items: center;
}

.settings-actions-row .btn {
  min-width: 220px;
}

.settings-guide .guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.storage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.storage-hero h1 {
  margin-bottom: 6px;
}

.storage-status-card {
  background:
    linear-gradient(135deg, rgba(20, 27, 36, 0.96), rgba(12, 18, 28, 0.96)),
    radial-gradient(240px 140px at 100% 0%, rgba(59, 130, 246, 0.18), transparent 70%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.storage-status-card strong {
  display: block;
  font-size: 24px;
  margin: 6px 0 10px;
}

.storage-status-card--warning {
  border-color: rgba(245, 158, 11, 0.45);
}

.storage-status-card--critical,
.storage-status-card--emergency {
  border-color: rgba(239, 68, 68, 0.55);
}

.storage-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.storage-admin-grid--wide {
  align-items: start;
}

.storage-meter {
  display: grid;
  gap: 10px;
}

.storage-meter__bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #0a111c;
  border: 1px solid #1d2a3d;
}

.storage-meter__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #f59e0b 72%, #ef4444);
  min-width: 2px;
}

.storage-meter__bar--accent span {
  background: linear-gradient(90deg, #3b82f6, #22c55e 58%, #f59e0b 82%, #ef4444);
}

.storage-meter__label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.storage-kpi-grid > div,
.storage-thresholds > div {
  background: rgba(15, 22, 32, 0.9);
  border: 1px solid #1d2a3d;
  border-radius: 14px;
  padding: 12px;
}

.storage-kpi-grid span,
.storage-thresholds span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.storage-kpi-grid strong,
.storage-thresholds strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.storage-thresholds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.storage-actions {
  margin: 0 0 12px;
}

.storage-plan-list {
  display: grid;
  gap: 10px;
}

.storage-plan-item {
  border: 1px solid #1d2a3d;
  background: rgba(15, 22, 32, 0.72);
  border-radius: 14px;
  padding: 12px;
}

.storage-plan-item strong {
  display: block;
  margin: 8px 0 4px;
}

.guide-card {
  border: 1px solid #1d2a3c;
  background: #0f1622;
  border-radius: 14px;
  padding: 14px;
}

.guide-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.guide-steps li + li {
  margin-top: 6px;
}


.hidden { display: none; }

.errbox {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  margin-bottom: 12px;
}

.okbox {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  margin-bottom: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.tabbar {
  display: inline-flex;
  background: #0f1724;
  border: 1px solid #223247;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.tabbar a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.tabbar a.active {
  background: #1f2a3d;
  color: var(--text);
}

.marketplace-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 16px 0;
}

.marketplace-quicklinks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 12px 0;
}

.marketplace-main-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px;
  border: 1px solid rgba(35, 50, 71, 0.84);
  border-radius: 18px;
  background: rgba(8, 13, 22, 0.92);
  backdrop-filter: blur(14px);
}

.marketplace-tab {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid #233247;
  background: #0f1722;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all .2s ease;
}

.marketplace-tab:hover {
  color: var(--text);
  border-color: #45628e;
  background: linear-gradient(180deg, #182232, #111b28);
}

.marketplace-tab.active {
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.9);
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.marketplace-status-drawer {
  margin: 0 0 16px 0;
  border: 1px solid rgba(35, 50, 71, 0.88);
  border-radius: 16px;
  background: rgba(15, 23, 34, 0.72);
}

.marketplace-status-drawer summary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.marketplace-status-drawer summary::-webkit-details-marker {
  display: none;
}

.marketplace-status-drawer summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.38);
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.14);
  font-weight: 900;
}

.marketplace-status-drawer[open] summary::before {
  content: "-";
}

.marketplace-status-drawer summary strong {
  color: #f8fafc;
}

.marketplace-status-drawer summary span:not(:first-child) {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 13, 22, 0.62);
}

.marketplace-status-grid {
  margin: 0;
  padding: 0 12px 12px 12px;
}

.marketplace-admin-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketplace-grid-span-2 {
  grid-column: span 2;
}

.marketplace-operator-dashboard {
  margin-bottom: 16px;
  padding: 18px;
  border-color: rgba(96, 165, 250, 0.22);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(18, 27, 41, 0.98), rgba(13, 19, 30, 0.98));
}

.marketplace-operator-dashboard__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.marketplace-operator-dashboard h2 {
  margin: 0 0 6px 0;
  font-size: 25px;
}

.marketplace-primary-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 34%),
    rgba(8, 13, 22, 0.82);
}

.marketplace-primary-focus--ok {
  border-color: rgba(34, 197, 94, 0.32);
}

.marketplace-primary-focus--warn {
  border-color: rgba(245, 158, 11, 0.38);
}

.marketplace-primary-focus--danger {
  border-color: rgba(239, 68, 68, 0.42);
}

.marketplace-primary-focus h3 {
  margin: 4px 0 6px 0;
  font-size: 20px;
}

.marketplace-primary-focus p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.marketplace-operator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.marketplace-operator-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(8, 13, 22, 0.72);
}

.marketplace-operator-card--ok {
  border-color: rgba(34, 197, 94, 0.28);
}

.marketplace-operator-card--warn {
  border-color: rgba(245, 158, 11, 0.34);
}

.marketplace-operator-card--danger {
  border-color: rgba(239, 68, 68, 0.38);
}

.marketplace-operator-card__metric {
  margin: 4px 0;
  font-size: 22px;
  font-weight: 900;
  color: #f8fafc;
}

.marketplace-operator-card p {
  min-height: 36px;
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.marketplace-work-session-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(20, 184, 166, 0.26);
  background:
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.14), transparent 36%),
    rgba(8, 13, 22, 0.78);
}

.marketplace-work-session-panel h3 {
  margin: 4px 0 6px 0;
  font-size: 20px;
}

.marketplace-work-session-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.marketplace-work-session-summary > div {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(9, 14, 22, 0.68);
}

.marketplace-work-session-summary strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
}

.marketplace-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.marketplace-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #22c55e);
}

.marketplace-work-session-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.marketplace-work-session-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 13, 22, 0.7);
}

.marketplace-work-session-step .marketplace-step-index,
.marketplace-workflow-step .marketplace-step-index {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.marketplace-work-session-step--ok {
  border-color: rgba(34, 197, 94, 0.3);
}

.marketplace-work-session-step--warn {
  border-color: rgba(245, 158, 11, 0.34);
}

.marketplace-work-session-step--danger {
  border-color: rgba(239, 68, 68, 0.4);
}

.marketplace-work-session-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.marketplace-work-session-step .marketplace-work-session-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketplace-work-session-step .marketplace-work-session-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.marketplace-work-session-close-form,
.marketplace-work-session-start-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
}

.marketplace-work-session-empty {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.marketplace-operator-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marketplace-operator-list li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(41, 26, 6, 0.28);
  color: #fde68a;
}

.marketplace-operator-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.marketplace-operator-proof span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  font-size: 12px;
}

.marketplace-workflow-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(8, 13, 22, 0.7);
}

.marketplace-workflow-step--ok {
  border-color: rgba(34, 197, 94, 0.28);
}

.marketplace-workflow-step--warn {
  border-color: rgba(245, 158, 11, 0.34);
}

.marketplace-workflow-step--danger {
  border-color: rgba(239, 68, 68, 0.38);
}

.marketplace-checklist-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 13, 22, 0.62);
}

.marketplace-checklist-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.12);
}

.marketplace-checklist-item--ok .marketplace-checklist-dot {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.marketplace-checklist-item--warn .marketplace-checklist-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.marketplace-checklist-item--danger .marketplace-checklist-dot {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14);
}

@media (max-width: 1200px) {
  .marketplace-operator-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-work-session-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-work-session-form,
  .marketplace-work-session-close-form,
  .marketplace-work-session-start-form,
  .marketplace-work-session-empty {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .marketplace-live-banner {
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: start;
  }

  .marketplace-live-banner__meta {
    grid-column: 2;
    text-align: left;
  }

  .marketplace-operator-dashboard__header {
    display: grid;
  }

  .marketplace-primary-focus {
    grid-template-columns: 1fr;
  }

  .marketplace-operator-cards {
    grid-template-columns: 1fr;
  }
}

.marketplace-upload-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
}

.marketplace-stack {
  display: grid;
  gap: 12px;
}

.marketplace-stack.compact .marketplace-step-card {
  padding: 12px;
}

.marketplace-step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #213043;
  background: linear-gradient(180deg, rgba(14, 22, 32, 0.95), rgba(11, 18, 28, 0.98));
}

.marketplace-step-index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #dbeafe;
  font-weight: 800;
}

.marketplace-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketplace-country-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.marketplace-country-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #223142;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.96), rgba(11, 17, 27, 0.98));
}

.marketplace-country-card h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.marketplace-country-top5 {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 13px;
  color: #d3dbe8;
}

.marketplace-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.marketplace-log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.assistant-hub-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1.4fr) 320px;
  gap: 16px;
  align-items: start;
}

.assistant-sidebar,
.assistant-chat-panel,
.assistant-context-panel {
  min-height: 620px;
}

.assistant-thread-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px 0;
}

.assistant-thread-item {
  display: block;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #223142;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.96), rgba(11, 17, 27, 0.98));
  transition: all .2s ease;
}

.assistant-thread-item:hover,
.assistant-thread-item.active {
  border-color: #45628e;
  background: linear-gradient(180deg, rgba(21, 34, 51, 0.98), rgba(14, 23, 34, 0.98));
}

.assistant-create-thread {
  padding-top: 14px;
  border-top: 1px solid #223142;
}

.assistant-message-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.assistant-message {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #223142;
  background: #0f1622;
}

.assistant-message-user {
  background: linear-gradient(180deg, rgba(18, 36, 63, 0.92), rgba(12, 24, 42, 0.98));
  border-color: rgba(59, 130, 246, 0.35);
}

.assistant-message-assistant {
  background: linear-gradient(180deg, rgba(16, 34, 24, 0.92), rgba(10, 22, 17, 0.98));
  border-color: rgba(34, 197, 94, 0.28);
}

.assistant-message-system {
  background: linear-gradient(180deg, rgba(31, 24, 14, 0.88), rgba(20, 16, 10, 0.96));
  border-color: rgba(245, 158, 11, 0.28);
}

.assistant-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.assistant-message-body {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
}

.assistant-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.assistant-message-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.assistant-escalation-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(17, 28, 46, 0.75);
}

.assistant-auto-action-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(20, 25, 33, 0.86);
}

.assistant-orchestrator-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.20);
  background: rgba(11, 31, 22, 0.72);
}

.assistant-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.assistant-compose {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.assistant-compose-status {
  min-height: 18px;
  color: #9fb0c7;
}

.assistant-ai-test-status {
  min-height: 18px;
  color: #9fb0c7;
}

.assistant-quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.assistant-context-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #223142;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.96), rgba(11, 17, 27, 0.98));
  margin-bottom: 12px;
  overflow: hidden;
}

.assistant-inbox-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.assistant-inbox-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(12, 18, 28, 0.82);
}

.assistant-inbox-item--reply {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.85);
}

.assistant-inbox-item--unread {
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: inset 3px 0 0 rgba(249, 115, 22, 0.88);
}

.assistant-inbox-item--critical {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(180deg, rgba(54, 20, 23, 0.78), rgba(29, 12, 15, 0.88));
}

.assistant-inbox-item--high {
  border-color: rgba(245, 158, 11, 0.40);
  background: linear-gradient(180deg, rgba(47, 29, 10, 0.78), rgba(25, 17, 8, 0.88));
}

.customer-inbox-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.customer-inbox-pill--reply {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.36);
}

.customer-inbox-pill--unread {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.34);
}

.customer-inbox-preview {
  margin: 8px 0 6px;
  color: #d5deea;
  font-size: 13px;
  line-height: 1.45;
}

.customer-inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 2px 2px;
  color: #cbd5e1;
}

.customer-inline-checkbox input {
  width: 16px;
  height: 16px;
}

.customer-inbox-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.customer-followup-panel {
  border-style: dashed;
}

.customer-followup-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-followup-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.customer-followup-chip--urgent {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.42);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.customer-followup-chip--today {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.34);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.customer-followup-chip--soon {
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.26);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.customer-profile-panel {
  border-style: dashed;
}

.customer-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-profile-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.22);
  border: 1px solid rgba(71, 85, 105, 0.32);
  color: #dbe6f3;
  font-size: 12px;
  font-weight: 700;
}

.customer-profile-related {
  display: grid;
  gap: 8px;
}

.customer-profile-related__item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(71, 85, 105, 0.28);
  background: rgba(12, 18, 28, 0.58);
  color: #dbe6f3;
  text-decoration: none;
}

.customer-profile-related__item span {
  color: #9fb0c7;
  font-size: 12px;
}

.customer-sla {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.customer-sla--urgent {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.42);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.customer-sla--today {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.34);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.customer-sla--soon {
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.26);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.customer-sla--fresh {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.28);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.customer-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}

.customer-quick-reply {
  min-height: 36px;
}

.customer-quick-reply--recommended {
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.18), rgba(10, 25, 17, 0.26));
}

.customer-quick-reply__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.28);
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 700;
}

.customer-quick-reply__hint {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: #a8b7ca;
  font-size: 12px;
  line-height: 1.35;
}

.customer-timeline-panel {
  border-style: dashed;
}

.customer-timeline {
  display: grid;
  gap: 10px;
}

.customer-timeline-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(12, 18, 28, 0.68);
}

.customer-timeline-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.customer-timeline-item__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
}

.customer-timeline-item__body {
  color: #dbe6f3;
  line-height: 1.5;
}

.customer-timeline-item__meta {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.purchases-followup-panel {
  border-style: dashed;
}

.purchases-followup-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.purchases-followup-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.purchases-followup-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(12, 18, 28, 0.72);
  color: #dbe6f3;
  text-decoration: none;
}

.purchases-followup-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.purchases-followup-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #94a3b8;
  font-size: 12px;
}

.marketplace-bulk-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-radius: 14px;
  background: rgba(14, 20, 31, 0.88);
}

.marketplace-bulk-toolbar .note strong {
  color: #d8e2f0;
}

.assistant-inbox-row--critical td {
  background: rgba(78, 24, 26, 0.28);
}

.assistant-inbox-row--high td {
  background: rgba(78, 50, 12, 0.22);
}

.assistant-inbox-row--now td {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.9);
}

.assistant-inbox-row--today td {
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.9);
}

.assistant-inbox-row--resolved td {
  opacity: 0.78;
}

.assistant-config-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.assistant-secret-value {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.assistant-context-list {
  margin: 8px 0 0 18px;
  padding: 0;
  color: #d3dbe8;
  line-height: 1.6;
}

.marketplace-remove-run {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(71, 85, 105, 0.36);
  border-radius: 12px;
  background: rgba(11, 17, 27, 0.72);
}

.marketplace-remove-run__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}

.marketplace-remove-run-card {
  overflow: hidden;
}

.marketplace-log--compact {
  max-height: 220px;
  overflow: auto;
}

.assistant-command-layer {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
}

.assistant-command-layer__core,
.assistant-command-layer__active {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #223142;
  background: linear-gradient(180deg, rgba(15, 23, 35, 0.98), rgba(11, 17, 27, 0.99));
}

.marketplace-assistant-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.marketplace-assistant-embed {
  min-height: 880px;
}

.marketplace-assistant-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid #223142;
  border-radius: 18px;
  background: #0b111a;
}

.assistant-embedded-body {
  background: #0b111a;
}

.assistant-embed-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 0 18px;
}

.assistant-embed-nav__title {
  font-size: 13px;
  color: #b9c8dc;
  letter-spacing: .02em;
}

.assistant-embed-nav__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.assistant-embedded-shell {
  max-width: none;
  padding: 12px 18px 18px 18px;
}

@media (max-width: 1280px) {
  .assistant-hub-grid {
    grid-template-columns: 1fr;
  }

  .assistant-sidebar,
  .assistant-chat-panel,
  .assistant-context-panel {
    min-height: auto;
  }

  .marketplace-assistant-grid {
    grid-template-columns: 1fr;
  }

  .assistant-embed-nav {
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
  }

  .assistant-embed-nav__actions {
    width: 100%;
  }

  .marketplace-assistant-embed {
    min-height: auto;
  }

  .marketplace-assistant-frame {
    min-height: 680px;
  }
}

.marketplace-upload-flags {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed #31455f;
  background: rgba(11, 18, 28, 0.72);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .marketplace-admin-grid-3,
  .marketplace-upload-layout {
    grid-template-columns: 1fr;
  }

  .marketplace-grid-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .marketplace-policy-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-step-card {
    grid-template-columns: 38px 1fr;
  }

  .marketplace-step-index {
    width: 38px;
    height: 38px;
  }
}

.appointments-page__head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.appointments-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.2rem;
}

.appointments-month-nav,
.appointments-legend,
.appointments-slot-groups {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.appointments-legend {
  justify-content: flex-start;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.appointments-calendar__weekdays,
.appointments-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
}

.appointments-calendar__weekdays {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.appointments-day-card {
  display: flex;
  min-height: 7rem;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #121722;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.appointments-day-card:hover {
  transform: translateY(-1px);
  border-color: #3f67ff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.appointments-day-card.is-selected {
  border-color: #4b7cff;
  box-shadow: inset 0 0 0 1px rgba(75, 124, 255, .55);
}

.appointments-day-card.is-other {
  opacity: 0.58;
}

.appointments-day-card.state-open {
  background: linear-gradient(180deg, rgba(24, 44, 33, .92), rgba(18, 23, 34, .98));
}

.appointments-day-card.state-full {
  background: linear-gradient(180deg, rgba(61, 43, 18, .92), rgba(18, 23, 34, .98));
}

.appointments-day-card.state-closed {
  background: linear-gradient(180deg, rgba(28, 31, 38, .92), rgba(18, 23, 34, .98));
}

.appointments-day-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.appointments-day-card__counts,
.appointments-day-card__meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.appointments-day-card__counts {
  display: grid;
  gap: 0.05rem;
}

.appointments-day-panel h4 {
  margin: 0 0 0.65rem;
}

.appointments-slot-groups {
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.appointments-slot-groups > div {
  flex: 1;
}

.appointments-slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.appointment-slot-button.is-active {
  border-color: #4b7cff;
  background: rgba(75, 124, 255, .16);
}

.appointments-booked-slot,
.appointments-selection-note,
.appointments-sync-box {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #121722;
}

.appointments-booked-slot {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 12rem;
}

.appointments-selection-note {
  margin-bottom: 1rem;
  color: var(--muted);
}

.appointments-sync-box.is-ok {
  border-color: rgba(47, 193, 111, .35);
}

.appointments-sync-box.is-error {
  border-color: rgba(233, 117, 118, .35);
}

.appointments-create-form,
.appointments-inline-form {
  display: grid;
  gap: 0.8rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

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

@media (max-width: 780px) {
  .appointments-month-nav,
  .appointments-slot-groups,
  .appointments-page__head {
    flex-direction: column;
    align-items: stretch;
  }

  .appointments-calendar__weekdays,
  .appointments-calendar__grid {
    gap: 0.32rem;
  }

  .appointments-day-card {
    min-height: 5.8rem;
    padding: 0.48rem;
  }

  .appointments-day-card__counts,
  .appointments-day-card__meta {
    font-size: 0.66rem;
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .appointments-day-card__counts span {
    white-space: nowrap;
  }

  .appointments-day-card__top {
    gap: 0.25rem;
  }

  .appointments-sync-box code,
  .appointments-sync-box .muted {
    overflow-wrap: anywhere;
  }
}

.bridge-kv {
  display: grid;
  gap: 10px;
}

.bridge-kv > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 160, 255, 0.12);
  border-radius: 14px;
  background: rgba(11, 16, 26, 0.45);
}

.bridge-kv code {
  word-break: break-all;
}

.bridge-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bridge-topics ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.marketplace-row-attention td {
  background: rgba(245, 167, 36, 0.08);
}

.vip-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(201, 151, 72, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(34, 24, 16, 0.96), rgba(11, 16, 26, 0.96));
  border-color: rgba(201, 151, 72, 0.28);
}

.vip-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vip-hero__stats > div {
  padding: 13px 14px;
  border: 1px solid rgba(201, 151, 72, 0.22);
  border-radius: 16px;
  background: rgba(7, 10, 16, 0.42);
}

.vip-hero__stats span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.vip-hero__stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.vip-product-hero {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(201, 151, 72, 0.18);
  margin: 12px 0;
  background: rgba(7, 10, 16, 0.48);
}

.vip-email-card {
  background: #efe4d0;
  color: #2a2118;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(92, 63, 34, 0.22);
}

.vip-email-card .eyebrow,
.vip-email-card .note {
  color: #6d5a43;
}

.vip-email-product {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(92, 63, 34, 0.16);
}

.vip-email-product img {
  width: 96px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
}

.vip-public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -8%, rgba(178, 128, 63, 0.34), transparent 34%),
    radial-gradient(circle at 88% 2%, rgba(62, 42, 26, 0.28), transparent 34%),
    linear-gradient(180deg, #e8ddc9 0%, #d8cbb5 56%, #c8b79c 100%);
  color: #241a12;
  font-family: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
}

.vip-public-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 18px 56px;
}

.vip-public-shell--narrow {
  max-width: 760px;
}

.vip-public-hero,
.vip-public-card,
.vip-public-product {
  background: rgba(250, 244, 233, 0.84);
  border: 1px solid rgba(88, 61, 35, 0.18);
  box-shadow: 0 22px 70px rgba(71, 48, 28, 0.18);
  backdrop-filter: blur(12px);
}

.vip-public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 28px;
  align-items: end;
  border-radius: 30px;
  padding: 34px;
}

.vip-public-eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  color: #86613c;
}

.vip-public-hero h1,
.vip-public-card h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-family: Georgia, "Times New Roman", serif;
}

.vip-public-lead {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: #5c4a36;
}

.vip-public-trust {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #27190d;
  color: #f6ead7;
  font-size: 13px;
}

.vip-public-meta {
  display: grid;
  gap: 10px;
}

.vip-public-meta > div,
.vip-public-pricegrid > div,
.vip-public-code {
  border: 1px solid rgba(88, 61, 35, 0.14);
  background: rgba(255, 250, 240, 0.56);
  border-radius: 16px;
  padding: 12px 14px;
}

.vip-public-meta span,
.vip-public-pricegrid span,
.vip-public-code span {
  display: block;
  color: #7b6851;
  font-size: 12px;
}

.vip-public-meta strong,
.vip-public-pricegrid strong,
.vip-public-code strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.vip-public-countrybar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 2px;
}

.vip-public-countrybar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(88, 61, 35, 0.18);
  background: rgba(250, 244, 233, 0.62);
  padding: 9px 12px;
  color: #3a291b;
}

.vip-public-countrybar a.active {
  background: #281b10;
  color: #fff2dc;
}

.vip-public-countrybar small {
  color: inherit;
  opacity: 0.72;
}

.vip-public-grid {
  display: grid;
  gap: 22px;
}

.vip-public-product {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
  border-radius: 28px;
  overflow: hidden;
}

.vip-public-product__image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #dccdb7;
}

.vip-public-product__body {
  padding: 26px;
}

.vip-public-product__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.vip-public-product h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-family: Georgia, "Times New Roman", serif;
}

.vip-public-badge {
  border-radius: 999px;
  padding: 8px 11px;
  background: #9a6a31;
  color: #fff7e8;
  font-size: 12px;
  font-weight: 800;
}

.vip-public-copy,
.vip-public-note,
.vip-public-warning {
  color: #5f4c36;
  line-height: 1.65;
}

.vip-public-note {
  background: rgba(92, 62, 31, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
}

.vip-public-warning {
  color: #6a361c;
  background: rgba(161, 83, 34, 0.11);
  border: 1px solid rgba(161, 83, 34, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
}

.vip-public-pricegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.vip-public-pricegrid__hero {
  background: #291b10 !important;
  color: #fff2dc;
}

.vip-public-pricegrid__hero span {
  color: #c9aa78;
}

.vip-public-form {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: #2a1c12;
  color: #fff3df;
}

.vip-public-form h3 {
  margin-top: 0;
}

.vip-public-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vip-public-form label {
  display: grid;
  gap: 6px;
  color: #dcc7a9;
  font-size: 13px;
}

.vip-public-form input,
.vip-public-form select,
.vip-public-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 242, 220, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff7ea;
  border-radius: 12px;
  padding: 11px 12px;
}

.vip-public-form textarea {
  resize: vertical;
}

.vip-signup-shell {
  max-width: 1040px;
}

.vip-signup-card {
  display: block;
}

.vip-public-card--success {
  border-color: rgba(45, 126, 76, 0.28);
  background: rgba(229, 247, 232, 0.84);
}

.vip-public-card--error {
  border-color: rgba(159, 59, 34, 0.32);
  background: rgba(255, 232, 222, 0.86);
}

.vip-public-checkbox {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  margin: 12px 0;
}

.vip-public-checkbox input {
  width: auto;
  margin-top: 3px;
}

.vip-public-form button,
.vip-public-paylink,
.vip-public-back {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: #d79b45;
  color: #23170d;
  font-weight: 900;
  cursor: pointer;
}

.vip-public-form small {
  display: block;
  color: #c9b79c;
  margin-top: 10px;
}

.vip-public-honey {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important;
}

.vip-public-card {
  border-radius: 28px;
  padding: 32px;
}

.vip-public-result p {
  color: #5f4c36;
  line-height: 1.65;
}

.vip-public-paylink,
.vip-public-back {
  margin-top: 16px;
  text-decoration: none;
}

.vip-public-back {
  background: rgba(42, 28, 18, 0.08);
  color: #2a1c12;
}

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

  .oha-localization-callout,
  .oha-localization-hero,
  .vip-hero {
    grid-template-columns: 1fr;
  }

  .oha-localization-hero__stats,
  .vip-hero__stats,
  .oha-currency-grid {
    grid-template-columns: 1fr;
  }

  .vip-public-hero,
  .vip-public-product,
  .vip-public-form__grid {
    grid-template-columns: 1fr;
  }

  .vip-public-hero {
    padding: 24px;
  }

  .vip-public-product__image {
    min-height: 280px;
  }

  .vip-public-pricegrid {
    grid-template-columns: 1fr;
  }
}
