/* ============================================================
   AIM Playr — control room
   Loaded after app.css on admin pages only.
   ============================================================ */

.admin-body {
  --admin-side: 264px;
  --admin-top: 64px;
  background:
    radial-gradient(900px 540px at 78% -10%, rgba(0, 230, 118, 0.055), transparent 62%),
    radial-gradient(700px 500px at -10% 40%, rgba(0, 230, 118, 0.03), transparent 60%),
    var(--bg);
  font-size: 14px;
}

.admin-body::after {
  opacity: 0.22;
}

/* ---------- Shell ---------- */

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--admin-side);
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(420px 300px at 0% 0%, rgba(0, 230, 118, 0.07), transparent 70%),
    linear-gradient(180deg, #070d09 0%, #050906 100%);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 255, 216, 0.14) transparent;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.admin-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(0, 230, 118, 0.06);
  color: var(--green);
  box-shadow: inset 0 0 20px rgba(0, 230, 118, 0.06), 0 10px 30px -16px rgba(0, 230, 118, 0.5);
}

.admin-brand__mark svg {
  width: 26px;
  height: 26px;
}

.admin-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.admin-brand__text b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.admin-brand__text small {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  flex: 1;
}

.admin-nav__group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav__label {
  padding: 0 12px;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.admin-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.admin-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.admin-nav a:hover {
  color: var(--text);
  background: rgba(190, 255, 216, 0.045);
}

.admin-nav a.is-current {
  border-color: rgba(0, 230, 118, 0.18);
  background: linear-gradient(90deg, rgba(0, 230, 118, 0.13), rgba(0, 230, 118, 0.03));
  color: var(--green-soft);
}

.admin-nav a.is-current::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.admin-nav a.is-current svg {
  color: var(--green);
  opacity: 1;
}

.admin-nav__badge {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber);
  color: #1d1402;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}

.admin-nav__note {
  display: flex;
  gap: 10px;
  margin: 2px 6px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 200, 87, 0.035);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.admin-nav__note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-linecap: round;
  margin-top: 1px;
}

.admin-side__foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  border: 1px solid rgba(0, 230, 118, 0.24);
  background: linear-gradient(145deg, rgba(0, 230, 118, 0.18), rgba(0, 230, 118, 0.04));
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.admin-avatar--sm {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 9px;
  font-size: 10px;
}

.admin-user__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.admin-user__text b {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user__text small {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-side__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 0 2px;
}

.admin-side__actions a,
.admin-side__actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted-2);
  font-size: 10.5px;
  transition: color 0.2s;
}

.admin-side__actions a:hover,
.admin-side__actions button:hover {
  color: var(--green-soft);
}

.admin-backdrop {
  display: none;
}

.admin-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--admin-side);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--admin-top);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 6, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
}

.admin-menu-btn {
  display: none;
  place-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 10px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: rgba(2, 8, 5, 0.5);
}

.admin-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease);
}

.admin-topbar__trail {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-topbar__trail i {
  color: rgba(190, 255, 216, 0.22);
  font-style: normal;
}

.admin-topbar__trail b {
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.admin-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.12), 0 0 10px var(--green);
  animation: admin-pulse 2.4s ease-out infinite;
}

@keyframes admin-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.admin-topbar__link {
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.2s;
}

.admin-topbar__link:hover {
  color: var(--green-soft);
}

.admin-role-chip {
  padding: 5px 10px;
  border: 1px solid var(--line-3);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-content {
  width: 100%;
  max-width: 1480px;
  padding: 30px 28px 70px;
}

/* ---------- Page head ---------- */

.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-page-head > div:first-child {
  min-width: 0;
}

.admin-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-page-head h1 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.admin-page-head h1 .head-sub {
  color: var(--muted-2);
  font-weight: 500;
}

.admin-page-head p {
  max-width: 68ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-page-head--order h1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--green-soft);
}

.order-head-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.order-code,
.mono-heading {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 1px solid var(--line-3);
  border-radius: 9px;
  background: rgba(2, 8, 5, 0.5);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover,
.icon-btn.is-copied {
  border-color: var(--line-2);
  background: rgba(0, 230, 118, 0.08);
  color: var(--green);
}

.icon-btn--sm {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: 7px;
}

.icon-btn--sm svg {
  width: 12px;
  height: 12px;
}

/* ---------- KPI cards ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

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

.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(190, 255, 216, 0.025), transparent 48%),
    rgba(8, 16, 11, 0.72);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

a.kpi:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  background:
    linear-gradient(160deg, rgba(190, 255, 216, 0.05), transparent 48%),
    rgba(9, 19, 13, 0.85);
}

.kpi__icon {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-2);
}

.kpi__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi__label {
  padding-right: 40px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kpi__value {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.kpi__value--text {
  font-size: 22px;
}

.kpi__hint {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.kpi__hint a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kpi--green {
  border-color: rgba(0, 230, 118, 0.2);
  background:
    radial-gradient(280px 140px at 100% 0%, rgba(0, 230, 118, 0.1), transparent 70%),
    rgba(7, 18, 12, 0.8);
}

.kpi--green .kpi__value {
  color: var(--green-soft);
}

.kpi--green .kpi__icon {
  color: var(--green);
  border-color: rgba(0, 230, 118, 0.22);
}

.kpi--amber {
  border-color: rgba(255, 200, 87, 0.24);
  background:
    radial-gradient(280px 140px at 100% 0%, rgba(255, 200, 87, 0.08), transparent 70%),
    rgba(18, 14, 7, 0.7);
}

.kpi--amber .kpi__value {
  color: var(--amber);
}

.kpi--amber .kpi__icon {
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.22);
}

/* ---------- Panels & grids ---------- */

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(170deg, rgba(190, 255, 216, 0.022), transparent 40%),
    rgba(8, 15, 10, 0.74);
}

.panel + .panel {
  margin-top: 16px;
}

.panel--muted {
  background: rgba(6, 12, 8, 0.55);
}

.panel--attention {
  border-color: rgba(255, 200, 87, 0.22);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(255, 200, 87, 0.06), transparent 60%),
    rgba(12, 11, 7, 0.7);
}

.panel--danger {
  border-color: rgba(255, 112, 112, 0.2);
}

.panel--decision {
  border-color: rgba(0, 230, 118, 0.18);
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel__head h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel__head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.panel__link {
  flex-shrink: 0;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.panel__link:hover {
  color: var(--green-2);
}

.panel-copy {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

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

.admin-grid--wide-left {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
}

.admin-grid + .admin-grid,
.admin-grid + .panel,
.panel + .admin-grid,
.admin-grid + .approval-grid {
  margin-top: 16px;
}

.admin-grid .panel + .panel {
  margin-top: 16px;
}

.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.admin-stack .panel + .panel {
  margin-top: 0;
}

.admin-content > .panel + .panel {
  margin-top: 16px;
}

.catalogue-layout,
.settings-layout,
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 16px;
  align-items: start;
}

.catalogue-layout__main,
.catalogue-layout__side,
.settings-layout__main,
.settings-layout__side,
.order-layout__main,
.order-layout__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.settings-layout__side {
  position: sticky;
  top: calc(var(--admin-top) + 18px);
}

/* ---------- Buttons & tags additions ---------- */

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 11.5px;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  flex: 0 0 auto;
}

.btn-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(4, 19, 10, 0.9);
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 9px;
}

.tag-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--line-3);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  vertical-align: middle;
  white-space: nowrap;
}

.tag-mini--green {
  border-color: rgba(0, 230, 118, 0.28);
  background: rgba(0, 230, 118, 0.07);
  color: var(--green);
}

.tag-mini--red {
  border-color: rgba(255, 112, 112, 0.28);
  background: rgba(255, 112, 112, 0.06);
  color: var(--red);
}

.tag-mini--violet {
  border-color: rgba(180, 140, 255, 0.3);
  background: rgba(180, 140, 255, 0.07);
  color: #cbb0ff;
}

.link-danger {
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.link-danger:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.break-all {
  word-break: break-all;
}

.pre-line {
  white-space: pre-line;
}

.masked-money {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Status badges ---------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line-3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--green {
  border-color: rgba(0, 230, 118, 0.26);
  background: rgba(0, 230, 118, 0.07);
  color: var(--green);
}

.status-badge--amber {
  border-color: rgba(255, 200, 87, 0.28);
  background: rgba(255, 200, 87, 0.07);
  color: var(--amber);
}

.status-badge--red {
  border-color: rgba(255, 112, 112, 0.3);
  background: rgba(255, 112, 112, 0.07);
  color: var(--red);
}

.status-badge--blue {
  border-color: rgba(124, 199, 255, 0.28);
  background: rgba(124, 199, 255, 0.07);
  color: var(--blue);
}

.status-badge--gray {
  border-color: var(--line-3);
  background: rgba(190, 255, 216, 0.03);
  color: var(--muted-2);
}

/* ---------- Tables ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 255, 216, 0.14) transparent;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(190, 255, 216, 0.14);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
  color: var(--muted);
  font-size: 12.5px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.18s;
}

.data-table tbody tr:hover {
  background: rgba(190, 255, 216, 0.025);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table--orders {
  min-width: 860px;
}

.data-table--keys {
  min-width: 880px;
}

.data-table--stock {
  min-width: 820px;
}

.data-table--audit {
  min-width: 780px;
}

.data-table--stock td,
.data-table--keys td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.cell-strong {
  display: inline-block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.4;
}

.cell-muted {
  color: var(--muted-2) !important;
}

.cell-money {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.cell-money.is-muted {
  color: var(--muted-2);
}

.cell-mono {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.cell-nowrap {
  white-space: nowrap;
}

.cell-right {
  text-align: right;
}

.cell-action {
  text-align: right;
  white-space: nowrap;
}

.cell-action a,
.cell-action button {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
}

.cell-action a:hover {
  color: var(--green-2);
}

.cell-action .inline-form {
  display: inline;
  margin-left: 10px;
}

.data-table tr.is-dim td {
  opacity: 0.55;
}

.cell-check {
  width: 30px;
}

.cell-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
  cursor: pointer;
}

.check-placeholder {
  display: block;
  width: 14px;
  height: 14px;
}

.mono-link {
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.mono-link:hover {
  color: var(--green);
}

.mono-link--button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.tool-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tool-cell img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.tool-cell--sm img {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 8px;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-number {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.stock-number.is-low {
  color: var(--amber);
}

.stock-number.is-out {
  color: var(--red);
}

.stock-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 6px;
  background: rgba(0, 230, 118, 0.06);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.stock-tag.is-low {
  border-color: rgba(255, 200, 87, 0.25);
  background: rgba(255, 200, 87, 0.06);
  color: var(--amber);
}

.stock-tag.is-out {
  border-color: rgba(255, 112, 112, 0.22);
  background: rgba(255, 112, 112, 0.05);
  color: var(--red);
}

.key-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.key-inline code {
  overflow: hidden;
  max-width: 210px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(2, 8, 5, 0.55);
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-inline--sm code {
  max-width: 180px;
}

.ledger-amount {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.ledger-amount.is-plus {
  color: var(--green);
}

.ledger-amount.is-minus {
  color: var(--muted);
}

/* ---------- Filters, tabs, pagination ---------- */

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  margin: 0 -2px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 10, 6, 0.5);
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: rgba(2, 8, 5, 0.55);
  color: var(--text);
  font-size: 12.5px;
}

.filter-search input::placeholder {
  color: #56685c;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.07);
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: rgba(2, 8, 5, 0.55);
}

.filter-select > span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-select select {
  max-width: 200px;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366796c' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
  color: var(--text);
  font-size: 12px;
  appearance: none;
  cursor: pointer;
}

.filter-select select:focus {
  outline: none;
}

.filter-select--wide select {
  max-width: 230px;
}

.filter-clear {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-clear:hover {
  color: var(--red);
}

.filter-count {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 10, 6, 0.5);
  overflow-x: auto;
  scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
  display: none;
}

.status-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.status-tabs a span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.status-tabs a:hover {
  background: rgba(190, 255, 216, 0.04);
  color: var(--text);
}

.status-tabs a.is-current {
  background: rgba(0, 230, 118, 0.1);
  color: var(--green-soft);
}

.status-tabs a.is-current span {
  color: var(--green);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.pagination a,
.pagination > span:not(.pagination__pages) {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.pagination a:hover {
  border-color: var(--line-2);
  color: var(--green-soft);
}

.pagination .is-disabled {
  opacity: 0.35;
}

.pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0 !important;
  padding: 0 !important;
}

.pagination__pages a {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
}

.pagination__pages a.is-current {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.09);
  color: var(--green-soft);
}

.pagination__gap {
  padding: 0 2px;
}

/* ---------- Empty states ---------- */

.admin-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 34px 22px;
  border: 1px dashed var(--line-3);
  border-radius: 14px;
  text-align: center;
}

.admin-empty__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border: 1px solid rgba(0, 230, 118, 0.26);
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.07);
  color: var(--green);
  font-size: 18px;
}

.admin-empty b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.admin-empty p {
  max-width: 46ch;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
}

.admin-empty .btn {
  margin-top: 12px;
}

.admin-empty--slim {
  min-height: 0;
  padding: 24px 18px;
}

.admin-empty--tall {
  min-height: 300px;
}

/* ---------- Dashboard ---------- */

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 13px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background 0.2s, border-color 0.2s;
}

.queue-row:hover {
  border-color: var(--line);
  background: rgba(190, 255, 216, 0.03);
}

.queue-row__proof {
  width: 62px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 8, 5, 0.6);
}

.queue-row__proof img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-row__glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.07);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.queue-row__main {
  min-width: 0;
}

.queue-row__main b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row__main b em {
  margin-left: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.queue-row__main small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.queue-row__meta b {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
}

.queue-row__arrow {
  color: var(--muted-2);
  font-size: 13px;
  transition: color 0.2s, transform 0.2s;
}

.queue-row:hover .queue-row__arrow {
  color: var(--green);
  transform: translateX(2px);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 168px;
  padding: 0 2px;
}

.chart__col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}

.chart__count {
  height: 14px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.chart__bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 34px;
  height: var(--h);
  max-height: calc(100% - 38px);
  min-height: 4px;
  overflow: hidden;
  border-radius: 7px 7px 3px 3px;
  background: rgba(0, 230, 118, 0.1);
}

.chart__bar i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: var(--d);
  background: linear-gradient(180deg, var(--green), rgba(0, 230, 118, 0.35));
  border-radius: 3px;
}

.chart__label {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.chart-legend__all {
  background: rgba(0, 230, 118, 0.14);
}

.chart-legend__done {
  background: var(--green);
}

.mini-list {
  display: flex;
  flex-direction: column;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
  transition: background 0.18s;
}

.mini-row:last-child {
  border-bottom: 0;
}

a.mini-row:hover {
  background: rgba(190, 255, 216, 0.03);
}

.mini-row__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
}

.mini-row__dot.is-low {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.45);
}

.mini-row__dot.is-out {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 112, 112, 0.4);
}

.mini-row__dot.is-plus {
  background: var(--green);
}

.mini-row__dot.is-minus {
  background: var(--blue);
  box-shadow: 0 0 8px rgba(124, 199, 255, 0.4);
}

.mini-row__main {
  flex: 1;
  min-width: 0;
}

.mini-row__main b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row__main small {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row__time {
  flex-shrink: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

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

.mini-stats > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 8, 5, 0.35);
}

.mini-stats span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mini-stats b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.mini-stats--stack {
  grid-template-columns: 1fr;
}

.support-playbook .playbook-list {
  margin-top: 4px;
}

/* ---------- Playbooks & rules ---------- */

.playbook-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.playbook-list li {
  display: flex;
  gap: 12px;
}

.playbook-list li > span {
  flex: 0 0 22px;
  padding-top: 1px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.playbook-list b {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.playbook-list p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.6;
}

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

.rules-grid > div {
  padding-left: 14px;
  border-left: 1px solid rgba(0, 230, 118, 0.2);
}

.rules-grid b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.rules-grid p {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.6;
}

.admin-link-list {
  display: flex;
  flex-direction: column;
}

.admin-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s, padding 0.2s;
}

.admin-link-list a:last-child {
  border-bottom: 0;
}

.admin-link-list a:hover {
  padding-left: 5px;
  color: var(--green-soft);
}

.fx-card {
  display: grid;
  gap: 13px;
  margin-bottom: 16px;
  padding: 15px 16px;
  border: 1px solid rgba(190, 255, 216, 0.1);
  border-radius: 13px;
  background:
    radial-gradient(380px 200px at 100% 0%, rgba(0, 230, 118, 0.075), transparent 70%),
    linear-gradient(160deg, rgba(190, 255, 216, 0.035), rgba(255, 255, 255, 0.01));
}

.fx-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-card__label {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.fx-card__kicker {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fx-card__source {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.fx-card__value {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.fx-card__value strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.fx-card__value span {
  color: var(--muted-2);
  font-size: 11.5px;
}

.fx-card__meta {
  margin: 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.65;
}

.fx-card__error {
  color: #ff9a9a;
}

.inline-note {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 8, 5, 0.4);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}

.inline-note b {
  color: var(--muted);
  font-weight: 500;
}

.inline-note a {
  color: var(--green);
}

.lowstock-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}

.lowstock-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 200, 87, 0.16);
  border-radius: 11px;
  background: rgba(255, 200, 87, 0.035);
  transition: border-color 0.2s, background 0.2s;
}

.lowstock-chip:hover {
  border-color: rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.06);
}

.lowstock-chip b {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.lowstock-chip small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.lowstock-chip em {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
}

.lowstock-chip em.is-low {
  background: rgba(255, 200, 87, 0.1);
  color: var(--amber);
}

.lowstock-chip em.is-out {
  background: rgba(255, 112, 112, 0.1);
  color: var(--red);
}

/* ---------- Drawers & forms ---------- */

.add-drawer {
  position: relative;
}

.add-drawer > summary {
  list-style: none;
  cursor: pointer;
}

.add-drawer > summary::-webkit-details-marker {
  display: none;
}

.drawer-form {
  display: grid;
  gap: 13px;
  width: min(430px, calc(100vw - 36px));
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  background:
    linear-gradient(170deg, rgba(0, 230, 118, 0.04), transparent 50%),
    #08110c;
  box-shadow: 0 30px 80px -30px #000;
}

.add-drawer--head > .drawer-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
}

.drawer-form--right {
  margin-top: 0;
}

.drawer-form--flush {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.drawer-note {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid--single {
  grid-template-columns: 1fr;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.label-text {
  color: #dbe8de;
  font-size: 12px;
  font-weight: 500;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line-3);
  border-radius: 9px;
  background: rgba(2, 8, 5, 0.4);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.check-pill:has(input:checked) {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.07);
  color: var(--green-soft);
}

.check-pill input {
  width: 13px;
  height: 13px;
  accent-color: var(--green);
}

.switch-line,
.switch-field {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(2, 8, 5, 0.35);
  cursor: pointer;
}

.switch-line input,
.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 34px;
  border: 1px solid var(--line-3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: transform 0.2s var(--ease), background 0.2s;
}

.switch-line input:checked + .switch,
.switch-field input:checked + .switch-field__ui {
  border-color: rgba(0, 230, 118, 0.4);
  background: rgba(0, 230, 118, 0.22);
}

.switch-line input:checked + .switch::after,
.switch-field input:checked + .switch-field__ui::after {
  transform: translateX(15px);
  background: var(--green);
}

.switch-line > span:last-child,
.switch-field > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-line b,
.switch-field b {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.switch-line small,
.switch-field small {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.switch-field {
  position: relative;
}

.switch-field__ui {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 34px;
  border: 1px solid var(--line-3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

.switch-field__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: transform 0.2s var(--ease), background 0.2s;
}

.switch-field--compact {
  padding: 9px 11px;
}

.field--align-end {
  align-self: end;
}

.admin-form .form-actions {
  margin-top: 18px;
}

/* ---------- Entity lists (catalogue, team) ---------- */

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 10, 6, 0.42);
  overflow: hidden;
  transition: border-color 0.2s;
}

.entity[open] {
  border-color: var(--line-3);
  background: rgba(6, 13, 9, 0.7);
}

.entity > summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
}

.entity > summary::-webkit-details-marker {
  display: none;
}

.entity > summary:hover {
  background: rgba(190, 255, 216, 0.025);
}

.entity__thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 230, 118, 0.05);
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.entity__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.entity__main b {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity__main b .tag-mini {
  margin-left: 4px;
}

.entity__main small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity__meta {
  flex-shrink: 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.entity__chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: 0 4px 4px 2px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

details[open] > summary .entity__chevron {
  transform: rotate(225deg);
  margin-bottom: -2px;
}

.entity__body {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.entity__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entity__toggle {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.entity-list--dense .entity > summary {
  padding: 10px 13px;
}

/* ---------- Approvals ---------- */

.approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.approval-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 15, 10, 0.78);
}

.approval-card__media {
  position: relative;
  height: 190px;
  background: #030705;
  border-bottom: 1px solid var(--line);
}

.approval-card__media > .status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(5, 8, 6, 0.82);
  backdrop-filter: blur(8px);
}

.approval-card__image {
  display: block;
  width: 100%;
  height: 100%;
}

.approval-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.35s var(--ease);
}

.approval-card__image:hover img {
  opacity: 1;
  transform: scale(1.02);
}

.approval-card__image > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border: 1px solid var(--line-3);
  border-radius: 7px;
  background: rgba(5, 8, 6, 0.8);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.approval-card__fake {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 24px;
  text-align: center;
}

.approval-card__fake .queue-row__glyph {
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 12px;
}

.approval-card__fake b {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.approval-card__fake small {
  max-width: 34ch;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.approval-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 18px;
}

.approval-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.approval-card__top h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.approval-card__top h2 span {
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
}

.approval-card__amount {
  flex-shrink: 0;
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.approval-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  margin: 0;
}

.approval-facts dt {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approval-facts dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.4;
}

.approval-facts dd a {
  color: var(--green-soft);
}

.approval-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.approval-card__actions form {
  flex: 1;
}

.approval-card__actions .btn {
  width: 100%;
}

/* ---------- Order detail ---------- */

.order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 350px);
}

.order-product {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 8, 5, 0.4);
}

.order-product__img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}

.order-product__main {
  flex: 1;
  min-width: 0;
}

.order-product__game {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-product__main b {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.order-product__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11px;
}

.order-product__price {
  flex-shrink: 0;
  text-align: right;
}

.order-product__price b {
  display: block;
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
}

.order-product__price small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
}

.fact-grid--single {
  grid-template-columns: 1fr;
  gap: 11px;
}

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

.fact-grid > div {
  min-width: 0;
}

.fact-grid dt {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.fact-grid dd small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.fact-grid dd.mono {
  color: var(--green-soft);
  font-size: 10.5px;
  word-break: break-all;
}

.proof-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.proof-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.proof-block__head h3 {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.proof-shot {
  position: relative;
  display: block;
  max-width: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.proof-shot img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #030705;
}

.proof-shot > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(5, 8, 6, 0.82);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 8px;
}

.gift-code,
.key-box,
.key-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line-3);
  border-radius: 11px;
  background: rgba(2, 8, 5, 0.55);
}

.gift-code code,
.key-box code,
.key-display code {
  flex: 1;
  overflow-wrap: anywhere;
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
}

.locked-note {
  display: flex;
  gap: 11px;
  padding: 13px;
  border: 1px dashed var(--line-3);
  border-radius: 11px;
  background: rgba(2, 8, 5, 0.35);
}

.locked-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 1px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.locked-note b {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.locked-note p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.locked-note--compact {
  margin-bottom: 10px;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.decision-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(2, 8, 5, 0.4);
}

.decision-card h3 {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.decision-card > p {
  margin: 4px 0 12px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.decision-card form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.decision-card > small {
  display: block;
  margin-top: 9px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.decision-card--go {
  border-color: rgba(0, 230, 118, 0.18);
}

.decision-card--stop {
  border-color: rgba(255, 112, 112, 0.18);
}

.rollback-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.buyer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(2, 8, 5, 0.4);
  text-align: center;
}

.buyer-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border: 1px solid rgba(0, 230, 118, 0.24);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(0, 230, 118, 0.18), rgba(0, 230, 118, 0.03));
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.buyer-card b {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.buyer-card small {
  color: var(--muted-2);
  font-size: 10.5px;
  word-break: break-all;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.stock-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px;
  border: 1px solid rgba(0, 230, 118, 0.16);
  border-radius: 13px;
  background: rgba(0, 230, 118, 0.035);
  text-align: center;
}

.stock-hero b {
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stock-hero span {
  color: var(--muted-2);
  font-size: 10.5px;
}

.stock-hero a {
  margin-top: 8px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
}

.stock-hero.is-out {
  border-color: rgba(255, 112, 112, 0.2);
  background: rgba(255, 112, 112, 0.035);
}

.stock-hero.is-out b {
  color: var(--red);
}

.event-list,
.timeline {
  display: flex;
  flex-direction: column;
  padding-left: 4px;
}

.event-item,
.timeline__item {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 0 0 18px;
}

.event-item::before,
.timeline__item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.event-item:last-child::before,
.timeline__item:last-child::before {
  display: none;
}

.event-item:last-child,
.timeline__item:last-child {
  padding-bottom: 0;
}

.event-item__dot,
.timeline__dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-top: 5px;
  border: 2px solid #08110c;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 1px var(--line-3);
}

.event-item__dot--green,
.timeline__dot.status-badge--green {
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.3), 0 0 8px rgba(0, 230, 118, 0.3);
}

.event-item__dot--amber,
.timeline__dot.status-badge--amber {
  background: var(--amber);
  box-shadow: 0 0 0 1px rgba(255, 200, 87, 0.3);
}

.event-item__dot--red,
.timeline__dot.status-badge--red {
  background: var(--red);
  box-shadow: 0 0 0 1px rgba(255, 112, 112, 0.3);
}

.event-item__dot--blue,
.timeline__dot.status-badge--blue {
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(124, 199, 255, 0.3);
}

.event-item__main b,
.timeline__body b {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.event-item__main p,
.timeline__body p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.event-item__main small,
.timeline__body small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.prose-panel {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-line;
}

/* ---------- Catalogue & plans ---------- */

.plan-facts {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.plan-facts img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid var(--line);
  border-radius: 11px;
  object-fit: cover;
}

.plan-facts b {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.plan-facts span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-edit {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 8, 5, 0.35);
  overflow: hidden;
}

.plan-edit > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 13px;
  list-style: none;
  cursor: pointer;
}

.plan-edit > summary::-webkit-details-marker {
  display: none;
}

.plan-edit > summary:hover {
  background: rgba(190, 255, 216, 0.025);
}

.plan-edit__days {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 58px;
}

.plan-edit__days b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.plan-edit__days small {
  color: var(--muted-2);
  font-size: 9px;
}

.plan-edit__price {
  flex: 1;
  min-width: 0;
}

.plan-edit__price b {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.plan-edit__price small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9px;
}

.plan-edit__body {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.stock-hero + .fact-grid {
  margin-top: 12px;
}

/* ---------- Payment methods ---------- */

.method-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 10, 6, 0.42);
  overflow: hidden;
}

.method-card[open] {
  border-color: var(--line-3);
  background: rgba(6, 13, 9, 0.72);
}

.method-card > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
}

.method-card > summary::-webkit-details-marker {
  display: none;
}

.method-card > summary:hover {
  background: rgba(190, 255, 216, 0.025);
}

.method-card__glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line-3);
  border-radius: 10px;
  background: rgba(190, 255, 216, 0.04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.method-card__glyph--green {
  border-color: rgba(0, 230, 118, 0.24);
  background: rgba(0, 230, 118, 0.07);
  color: var(--green);
}

.method-card__glyph--amber {
  border-color: rgba(255, 200, 87, 0.24);
  background: rgba(255, 200, 87, 0.06);
  color: var(--amber);
}

.method-card__glyph--blue {
  border-color: rgba(124, 199, 255, 0.24);
  background: rgba(124, 199, 255, 0.06);
  color: var(--blue);
}

.method-card__main {
  flex: 1;
  min-width: 0;
}

.method-card__main b {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.method-card__main small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.method-card__countries {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.method-card__countries em {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
}

.method-card__countries em.is-none {
  border-color: rgba(255, 112, 112, 0.2);
  color: var(--red);
}

.method-card__body {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.method-card__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 10px;
}

.method-card__note b {
  margin-right: 3px;
  color: var(--muted);
  font-weight: 500;
}

.method-card__lock {
  margin: 0 0 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.country-map {
  display: flex;
  flex-direction: column;
}

.country-map__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
}

.country-map__row:last-child {
  border-bottom: 0;
}

.country-map__row b {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.country-map__row span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.country-map__row small {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

/* ---------- Team ---------- */

.team-entity > summary {
  gap: 12px;
}

.team-entity .admin-avatar {
  flex-shrink: 0;
}

.role-matrix {
  display: flex;
  flex-direction: column;
}

.role-matrix > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 60px;
  align-items: center;
  gap: 4px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
}

.role-matrix > div:last-child {
  border-bottom: 0;
}

.role-matrix__head {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-matrix span {
  color: var(--muted);
  font-size: 11.5px;
}

.role-matrix i {
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.role-matrix i.is-yes {
  color: var(--green);
}

.role-matrix i.is-no {
  color: var(--muted-2);
}

/* ---------- Settings ---------- */

.settings-summary {
  position: relative;
}

.settings-save {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-save span {
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.settings-layout textarea {
  min-height: 110px;
}

/* ---------- Audit ---------- */

.detail-pop summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

.detail-pop summary::-webkit-details-marker {
  display: none;
}

.detail-pop summary::before {
  content: "+";
  display: inline-block;
  width: 12px;
  color: var(--muted-2);
}

.detail-pop[open] summary::before {
  content: "−";
}

.detail-pop pre {
  max-width: 420px;
  max-height: 280px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 8, 5, 0.75);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* ---------- Auth ---------- */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 38px 48px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 420px at 18% 8%, rgba(0, 230, 118, 0.14), transparent 65%),
    radial-gradient(500px 380px at 90% 90%, rgba(0, 230, 118, 0.06), transparent 60%),
    linear-gradient(160deg, #071009 0%, #030705 100%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(190, 255, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 255, 216, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(70% 60% at 30% 40%, #000 20%, transparent 100%);
}

.auth-brand,
.auth-copy,
.auth-status {
  position: relative;
  z-index: 1;
}

.auth-copy {
  max-width: 520px;
}

.auth-copy h1 {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-copy > p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 28px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-points li span {
  flex: 0 0 22px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.auth-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 36px;
  background:
    radial-gradient(500px 360px at 100% 0%, rgba(0, 230, 118, 0.04), transparent 65%),
    #040806;
}

.auth-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(170deg, rgba(190, 255, 216, 0.025), transparent 45%),
    rgba(7, 14, 9, 0.8);
  box-shadow: var(--shadow);
}

.auth-card__head {
  margin-bottom: 22px;
}

.auth-card__kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card__head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-card__head p {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
}

.auth-card .alert {
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form .btn {
  margin-top: 4px;
}

.auth-demo {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auth-demo__label {
  margin-bottom: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-demo__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 8, 5, 0.4);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.auth-demo__row:hover {
  border-color: var(--line-2);
  background: rgba(0, 230, 118, 0.04);
}

.auth-demo__row span {
  min-width: 0;
}

.auth-demo__row b {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
}

.auth-demo__row small {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
}

.auth-demo__row em {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid rgba(0, 230, 118, 0.22);
  border-radius: 6px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-card__foot {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
}

.auth-card__foot a {
  color: var(--muted);
}

.auth-card__foot a:hover {
  color: var(--green-soft);
}

/* ---------- Reseller shell ---------- */

.reseller-body {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(0, 230, 118, 0.055), transparent 62%),
    var(--bg);
}

.reseller-top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 6, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
}

[data-theme="light"] .reseller-top {
  background: rgba(244, 246, 241, 0.86);
}

.reseller-top__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  width: min(1240px, 100% - 48px);
  min-height: 68px;
  margin-inline: auto;
}

.reseller-brand {
  flex-shrink: 0;
}

.reseller-nav {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.reseller-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.reseller-nav a:hover {
  color: var(--text);
  background: rgba(190, 255, 216, 0.04);
}

.reseller-nav a.is-current {
  color: var(--green-soft);
  background: rgba(0, 230, 118, 0.08);
}

.reseller-top__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid rgba(0, 230, 118, 0.22);
  border-radius: 9px;
  background: rgba(0, 230, 118, 0.055);
}

.wallet-chip span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet-chip b {
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.reseller-user .admin-user__text {
  display: flex;
}

.reseller-logout button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-3);
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  transition: color 0.2s, border-color 0.2s;
}

.reseller-logout button:hover {
  border-color: rgba(255, 112, 112, 0.3);
  color: var(--red);
}

.reseller-logout svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reseller-main {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
  padding: 28px 0 56px;
}

.reseller-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
}

.reseller-foot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reseller-foot a {
  color: var(--muted);
}

.reseller-foot a:hover {
  color: var(--green-soft);
}

.reseller-foot .pulse-dot {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
}

/* ---------- Reseller catalogue ---------- */

.reseller-balance-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 10, 6, 0.5);
  color: var(--muted-2);
  font-size: 11px;
}

[data-theme="light"] .reseller-balance-bar {
  background: rgba(255, 255, 255, 0.6);
}

.reseller-balance-bar .live-line {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.reseller-balance-bar .text-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.reseller-catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.buy-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(190, 255, 216, 0.022), transparent 42%),
    rgba(8, 15, 10, 0.72);
  overflow: hidden;
  transition: border-color 0.25s;
}

[data-theme="light"] .buy-card {
  background:
    linear-gradient(165deg, rgba(19, 48, 30, 0.02), transparent 42%),
    rgba(255, 255, 255, 0.72);
}

.buy-card:hover {
  border-color: var(--line-3);
}

.buy-card__head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 18px 14px;
}

.buy-card__art {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 230, 118, 0.05);
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.buy-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buy-card__title {
  flex: 1;
  min-width: 0;
}

.buy-card__kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.buy-card__title h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.buy-card__title p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.buy-card__head .stock-tag {
  flex-shrink: 0;
}

.buy-card__plans {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(2, 8, 5, 0.25);
}

[data-theme="light"] .buy-card__plans {
  background: rgba(19, 48, 30, 0.02);
}

.buy-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(190, 255, 216, 0.055);
}

.buy-plan:last-child {
  border-bottom: 0;
}

.buy-plan.is-out {
  opacity: 0.6;
}

.buy-plan__main {
  flex: 0 0 74px;
}

.buy-plan__main b {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.buy-plan__main small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.buy-plan__price {
  flex: 1;
  min-width: 0;
}

.buy-plan__price b {
  display: block;
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.buy-plan__price small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.buy-plan form {
  flex-shrink: 0;
}

.buy-card__guide {
  border-top: 1px solid var(--line);
}

.buy-card__guide summary {
  padding: 10px 18px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
}

.buy-card__guide summary::-webkit-details-marker {
  display: none;
}

.buy-card__guide summary::before {
  content: "+ ";
  color: var(--green);
}

.buy-card__guide[open] summary::before {
  content: "− ";
}

.buy-card__guide p {
  padding: 0 18px 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.65;
  white-space: pre-line;
}

/* ---------- Reseller wallet & order ---------- */

.wallet-panel .panel__head {
  margin-bottom: 12px;
}

.wallet-balance {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 230, 118, 0.18);
  border-radius: 13px;
  background:
    radial-gradient(260px 130px at 100% 0%, rgba(0, 230, 118, 0.09), transparent 70%),
    rgba(0, 230, 118, 0.03);
}

.wallet-balance span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wallet-balance b {
  display: block;
  margin: 5px 0 4px;
  color: var(--green-soft);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.wallet-balance small {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.wallet-panel .btn--block {
  margin-top: 14px;
}

.order-hero.is-live {
  border-color: rgba(0, 230, 118, 0.24);
  background:
    radial-gradient(500px 250px at 100% 0%, rgba(0, 230, 118, 0.07), transparent 65%),
    rgba(8, 15, 10, 0.78);
}

.key-display {
  gap: 14px;
  padding: 16px;
}

.key-display code {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.key-warning {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 200, 87, 0.16);
  border-radius: 10px;
  background: rgba(255, 200, 87, 0.035);
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.key-warning svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ---------- Reseller approvals ---------- */

.approval-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-color: rgba(255, 200, 87, 0.28);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(255, 200, 87, 0.06), transparent 70%),
    rgba(10, 15, 10, 0.7);
}

.approval-banner--link {
  display: flex;
  margin-bottom: 18px;
  color: inherit;
}

.approval-banner--link:hover {
  border-color: rgba(255, 200, 87, 0.45);
}

.approval-banner__main {
  display: flex;
  gap: 13px;
  flex: 1;
  min-width: min(420px, 100%);
}

.approval-banner__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 200, 87, 0.24);
  border-radius: 10px;
  color: var(--amber);
  background: rgba(255, 200, 87, 0.05);
}

.approval-banner__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.approval-banner h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.approval-banner p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.6;
}

.approval-banner__actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.approval-reject {
  position: relative;
}

.approval-reject > summary {
  list-style: none;
  cursor: pointer;
}

.approval-reject > summary::-webkit-details-marker {
  display: none;
}

.approval-reject .drawer-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 48px));
  box-shadow: var(--shadow);
}

/* ---------- Reseller detail ---------- */

.reseller-page-head {
  align-items: flex-start;
}

.reseller-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 10px;
}

.reseller-identity__text {
  min-width: 0;
}

.reseller-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 16px;
  font-size: 17px;
}

.reseller-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.reseller-meta a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.reseller-meta a:hover {
  color: var(--green-soft);
  border-color: currentColor;
}

.reseller-head-actions {
  align-items: center;
}

.reseller-detail-grid {
  align-items: start;
}

.reseller-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.reseller-account-grid > .panel {
  min-width: 0;
}

.reseller-password {
  scroll-margin-top: 84px;
}

.btn--danger-ghost {
  border: 1px solid rgba(255, 112, 112, 0.26);
  background: transparent;
  color: var(--red);
}

.btn--danger-ghost:hover {
  border-color: rgba(255, 112, 112, 0.45);
  background: rgba(255, 112, 112, 0.06);
}

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .admin-grid--wide-left {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  }

  .catalogue-layout,
  .settings-layout,
  .order-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 310px);
  }
}

@media (max-width: 1100px) {
  .admin-side {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    box-shadow: 30px 0 80px -20px transparent;
  }

  .admin-shell.is-nav-open .admin-side {
    transform: translateX(0);
    box-shadow: 30px 0 80px -20px rgba(0, 0, 0, 0.9);
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-menu-btn {
    display: grid;
  }

  .admin-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(2, 5, 3, 0.68);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }

  .admin-shell.is-nav-open .admin-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .admin-topbar {
    padding: 0 20px;
  }

  .admin-content {
    padding: 24px 20px 60px;
  }

  .admin-grid,
  .admin-grid--wide-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }

  .admin-stack .panel + .panel {
    margin-top: 0;
  }

  .catalogue-layout,
  .settings-layout,
  .order-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-layout__side {
    position: static;
  }

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

  .settings-layout__side .panel + .panel {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .reseller-top__inner {
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 0;
    width: min(1240px, 100% - 32px);
  }

  .reseller-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .reseller-nav::-webkit-scrollbar {
    display: none;
  }

  .reseller-user {
    display: none;
  }

  .reseller-main {
    width: min(1240px, 100% - 32px);
    padding-top: 20px;
  }

  .reseller-foot {
    width: min(1240px, 100% - 32px);
  }

  .reseller-catalogue {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 0;
    padding: 24px 24px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-copy,
  .auth-status {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px 50px;
  }

  .auth-card {
    padding: 24px;
    box-shadow: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .admin-page-actions {
    width: 100%;
  }

  .admin-page-actions .add-drawer--head {
    margin-left: auto;
  }

  .add-drawer--head > .drawer-form {
    position: fixed;
    top: 86px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }

  .fact-grid,
  .fact-grid--pay {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  .approval-grid {
    grid-template-columns: 1fr;
  }

  .admin-stack {
    grid-template-columns: 1fr;
  }

  .queue-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .queue-row__arrow {
    display: none;
  }

  .queue-row__meta b {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-row-2 {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    align-items: stretch;
  }

  .filter-search {
    flex: 1 0 100%;
  }

  .filter-select {
    flex: 1;
  }

  .filter-select select {
    width: 100%;
    max-width: none;
  }

  .filter-count {
    margin-left: 0;
    align-self: center;
  }

  .settings-layout__side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .data-table:not(.data-table--keys) {
    display: block;
    min-width: 0;
  }

  .data-table:not(.data-table--keys) thead {
    display: none;
  }

  .data-table:not(.data-table--keys) tbody {
    display: grid;
    gap: 10px;
  }

  .data-table:not(.data-table--keys) tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
    padding: 13px 14px;
    border: 1px solid rgba(190, 255, 216, 0.09);
    border-radius: 13px;
    background: linear-gradient(160deg, rgba(190, 255, 216, 0.03), rgba(255, 255, 255, 0.012));
  }

  .data-table:not(.data-table--keys) tbody tr:hover {
    background: linear-gradient(160deg, rgba(190, 255, 216, 0.045), rgba(255, 255, 255, 0.018));
  }

  .data-table:not(.data-table--keys) td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .data-table:not(.data-table--keys) td::before {
    content: attr(data-label);
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .data-table:not(.data-table--keys) td[data-label=""]::before {
    display: none;
  }

  .data-table:not(.data-table--keys) td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(190, 255, 216, 0.07);
  }

  .data-table:not(.data-table--keys) td:first-child .mono-link {
    font-size: 13px;
  }

  .data-table:not(.data-table--keys) td.cell-action {
    grid-column: 1 / -1;
    align-items: flex-end;
    padding-top: 1px;
  }

  .data-table:not(.data-table--keys) td.cell-action::before {
    display: none;
  }

  .data-table:not(.data-table--keys) td.cell-action > a,
  .data-table:not(.data-table--keys) td.cell-action > button,
  .data-table:not(.data-table--keys) td.cell-action .inline-form {
    font-size: 11px;
  }

  .data-table:not(.data-table--keys) td.cell-action .inline-form {
    margin-left: 14px;
  }

  .data-table:not(.data-table--keys) td:has(.key-inline),
  .data-table:not(.data-table--keys) td:has(.tool-cell),
  .data-table:not(.data-table--keys) td:has(.detail-pop) {
    grid-column: 1 / -1;
  }

  .data-table:not(.data-table--keys) .key-inline {
    display: flex;
    width: 100%;
  }

  .data-table:not(.data-table--keys) .key-inline code {
    flex: 1;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .data-table:not(.data-table--keys) .cell-sub {
    font-size: 10px;
  }

  .data-table:not(.data-table--keys) .cell-money,
  .data-table:not(.data-table--keys) .cell-mono,
  .data-table:not(.data-table--keys) .cell-nowrap {
    white-space: normal;
  }

  .data-table:not(.data-table--keys) .cell-right {
    text-align: left;
  }

  .data-table:not(.data-table--keys) .tool-cell--sm img {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .data-table:not(.data-table--keys) .detail-pop pre {
    max-width: 100%;
  }

  .status-tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .reseller-balance-bar {
    gap: 8px;
    font-size: 10px;
  }

  .reseller-balance-bar .text-link {
    margin-left: 0;
  }

  .reseller-top__inner {
    width: calc(100% - 24px);
  }

  .reseller-main {
    width: calc(100% - 24px);
  }

  .reseller-foot {
    flex-direction: column;
    align-items: flex-start;
    width: calc(100% - 24px);
  }

  .wallet-chip {
    padding: 5px 8px;
  }

  .wallet-chip span {
    display: none;
  }

  .key-display {
    flex-direction: column;
    align-items: stretch;
  }

  .key-display .btn {
    width: 100%;
  }

  .approval-banner__actions {
    width: 100%;
  }

  .approval-banner__actions > form,
  .approval-banner__actions .btn {
    flex: 1;
  }

  .approval-reject .drawer-form {
    right: auto;
    left: 0;
  }

  .admin-topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .admin-topbar__trail span,
  .admin-topbar__trail i {
    display: none;
  }

  .admin-topbar__actions {
    gap: 10px;
  }

  .admin-live,
  .admin-topbar__link {
    display: none;
  }

  .admin-content {
    padding: 18px 14px 54px;
  }

  .admin-page-head h1 {
    font-size: 26px;
  }

  .admin-page-head p {
    font-size: 12px;
  }

  .admin-page-actions .btn {
    flex: 1;
  }

  .kpi {
    padding: 14px;
  }

  .kpi__value {
    font-size: 23px;
  }

  .kpi__icon {
    width: 28px;
    height: 28px;
    top: 12px;
    right: 12px;
  }

  .kpi__hint {
    font-size: 10.5px;
  }

  .panel {
    padding: 15px;
    border-radius: 18px;
  }

  .panel__head {
    gap: 10px;
  }

  .panel__head h2 {
    font-size: 15.5px;
  }

  .panel__head p {
    font-size: 11px;
  }

  .panel__link {
    font-size: 9px;
  }

  .filter-bar {
    padding: 11px;
  }

  .status-tabs {
    gap: 2px;
    padding: 4px;
  }

  .status-tabs a {
    padding: 7px 9px;
    font-size: 11px;
  }

  .admin-empty {
    padding: 26px 16px;
  }

  .fact-grid,
  .fact-grid--pay {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .order-product {
    flex-wrap: wrap;
    gap: 11px;
  }

  .order-product__img {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .order-product__price {
    width: 100%;
    text-align: left;
  }

  .order-product__price b {
    font-size: 14px;
  }

  .approval-card__media {
    height: 160px;
  }

  .approval-facts {
    grid-template-columns: 1fr;
  }

  .approval-card__actions {
    flex-direction: column;
  }

  .queue-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .queue-row__proof {
    width: 48px;
    height: 40px;
  }

  .queue-row__meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .queue-row__meta b {
    display: inline;
  }

  .chart {
    gap: 5px;
    height: 140px;
  }

  .chart__bar {
    max-width: 26px;
  }

  .chart__label {
    font-size: 7.5px;
  }

  .entity__meta {
    display: none;
  }

  .entity > summary {
    gap: 9px;
    padding: 10px;
  }

  .entity__thumb {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .entity__body {
    padding: 12px;
  }

  .method-card > summary {
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px;
  }

  .method-card__countries {
    order: 4;
    width: 100%;
  }

  .method-card__main {
    flex: 1;
  }

  .method-card__body {
    padding: 12px;
  }

  .plan-edit > summary {
    flex-wrap: wrap;
    gap: 8px;
  }

  .plan-edit__price {
    flex: 1 0 100%;
    order: 3;
  }

  .buy-card__head {
    flex-wrap: wrap;
    padding: 14px;
  }

  .buy-card__art {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .buy-card__head .stock-tag {
    margin-left: auto;
  }

  .buy-plan {
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 14px;
  }

  .buy-plan__main {
    flex: 0 0 auto;
    min-width: 64px;
  }

  .buy-plan__price {
    flex: 1;
  }

  .buy-plan form,
  .buy-plan > .btn {
    flex: 1 0 100%;
  }

  .buy-plan form .btn,
  .buy-plan > .btn {
    width: 100%;
  }

  .key-display {
    flex-direction: column;
    align-items: stretch;
  }

  .key-display .btn {
    width: 100%;
  }

  .auth-card {
    padding: 20px 16px;
  }

  .auth-card__head h2 {
    font-size: 21px;
  }

  .pagination {
    gap: 8px;
  }

  .pagination__pages {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

.form-preview {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 16 / 9;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  object-fit: cover;
}

@media (max-width: 900px) {
  .reseller-account-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .reseller-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .reseller-head-actions .status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .reseller-head-actions .btn {
    width: 100%;
  }

  .reseller-avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 13px;
    font-size: 15px;
  }

  .reseller-meta {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-side,
  .admin-backdrop,
  .chart__bar i,
  .status-badge {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Confirmation Modal Component ---------- */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirm-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.confirm-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.confirm-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 24px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius);
  background: var(--panel, #0a120d);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(190, 255, 216, 0.08);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.22, 0.8, 0.24, 1);
  color: var(--text, #f1f7f2);
}

.confirm-modal.is-open .confirm-modal__dialog {
  transform: scale(1) translateY(0);
}

.confirm-modal__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.confirm-modal__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 112, 112, 0.12);
  border: 1px solid rgba(255, 112, 112, 0.25);
  color: var(--red, #ff7070);
}

.confirm-modal__icon svg {
  width: 22px;
  height: 22px;
}

.confirm-modal__icon--info {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.25);
  color: var(--green, #00e676);
}

.confirm-modal__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #f1f7f2);
  line-height: 1.3;
}

.confirm-modal__message {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #95a89b);
  line-height: 1.55;
  word-break: break-word;
}

.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line, rgba(190, 255, 216, 0.1));
}

/* ---------- Artwork pixel reference ---------- */

.image-dims {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2, var(--muted));
}

.image-dims:empty {
  display: none;
}

.image-dims--inline {
  display: inline;
  margin-top: 0;
}

.image-dims--sep:not(:empty)::before {
  content: " · ";
}
