:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --green: #4274ba;
  --green-2: #315f9c;
  --danger: #c2413b;
  --shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

[data-theme="dark"] {
  --bg: #171620;
  --panel: #201f2b;
  --panel-2: #2a2837;
  --text: #e7e9ff;
  --muted: #a4a3c2;
  --line: #353342;
  --green: #4274ba;
  --green-2: #6f9bda;
  --danger: #a6121b;
  --shadow: none;
}

* { box-sizing: border-box; }

html,
body,
button,
input,
a,
.sidebar,
.table-card,
.panel,
.login-card,
.balance-card,
.theme-switch,
.theme-switch::after,
.filter-popover {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 22px 16px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand.large {
  font-size: 18px;
  margin-bottom: 22px;
  justify-content: center;
}

.brand-mark {
  width: 42px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-weight: 900;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}

.brand-logo img {
  width: 178px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-logo .logo-dark {
  display: none;
}

[data-theme="dark"] .brand-logo .logo-light {
  display: none;
}

[data-theme="dark"] .brand-logo .logo-dark {
  display: block;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
}

nav a.active,
nav a:hover {
  background: var(--green);
  color: #fff;
}

nav a,
button,
.cart-link,
.asset-button {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms ease, opacity 160ms ease;
}

button:hover,
.cart-link:hover,
.asset-button:hover {
  transform: translateY(-1px);
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.balance-card,
.panel,
.metric,
.login-card,
.code-panel,
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.balance-card {
  padding: 14px;
}

.clickable-balance:hover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--panel));
  transform: translateY(-1px);
}

.balance-card label,
.metric label,
.panel label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.balance-card strong,
.metric strong,
.panel strong {
  display: block;
  font-size: 20px;
}

.balance-card span,
.panel span {
  color: var(--muted);
  font-size: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #185ccc;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.user-chip small {
  display: block;
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
  margin-left: 260px;
  padding: 0 56px 56px;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin: 0 -56px 28px;
  padding: 0 56px;
}

.topbar small {
  color: var(--muted);
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

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

h1, h2, p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.top-actions,
.toolbar,
.actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.partner-pill,
.icon-button,
input,
button,
.ghost {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 7px;
}

.theme-switch {
  position: relative;
  width: 70px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  cursor: pointer;
}

.theme-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 30px;
  height: 28px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

[data-theme="dark"] .theme-switch::after {
  transform: translateX(30px);
}

.theme-switch span {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.theme-switch .action-icon {
  width: 20px;
  height: 20px;
  display: block;
}

[data-theme="light"] .action-icon,
:root:not([data-theme="dark"]) .action-icon {
  filter: brightness(0) saturate(100%);
}

[data-theme="dark"] .action-icon {
  filter: none;
}

.partner-pill {
  padding: 10px 12px;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-form {
  margin-left: auto;
  width: min(440px, 100%);
}

input {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  outline: none;
}

button {
  min-height: 38px;
  padding: 9px 14px;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--green-2);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ghost,
.ghost:hover {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.full { width: 100%; }

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

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

.metric,
.panel {
  padding: 16px;
}

.table-card {
  overflow: auto;
  border-radius: 6px;
}

.catalog-card {
  min-height: 560px;
  overflow: visible;
}

.catalog-scroll {
  overflow: visible;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

td {
  color: var(--text);
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.num {
  text-align: center;
  white-space: nowrap;
}

.num.center,
th.num {
  text-align: center;
}

.buy-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 7px;
  font-size: 20px;
}

.buy-button.disabled,
.buy-button:disabled {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 13px;
  color: #fff;
  background: var(--green);
  border-radius: 7px;
  font-weight: 800;
}

.cart-link span {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.status-pending {
  background: #f59e0b;
  color: #111827;
}

.status-completed {
  background: #4274ba;
}

.status-seen {
  background: #128a47;
}

.status-cancelled {
  background: #b91c1c;
}

.actions a {
  color: var(--muted);
  font-weight: 800;
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.asset-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  cursor: pointer;
}

.asset-button:hover {
  background: color-mix(in srgb, var(--green) 18%, var(--panel-2));
}

.asset-button.disabled {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}

.asset-button.disabled:hover {
  background: var(--panel-2);
}

.action-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.inline-copy {
  min-height: auto;
  padding: 2px 7px;
  font-size: 12px;
  border-radius: 5px;
}

.filter-menu {
  position: relative;
  display: inline-block;
  margin-right: 7px;
}

.filter-trigger {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  transform: rotate(90deg);
}

.filter-popover {
  position: absolute;
  top: 30px;
  left: -10px;
  z-index: 80;
  width: 280px;
  max-height: 320px;
  display: none;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.filter-menu.open .filter-popover {
  display: block;
}

.filter-popover strong {
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.filter-search {
  min-height: 34px;
  margin-bottom: 10px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.filter-options {
  max-height: 210px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
}

.filter-option:hover {
  background: var(--panel-2);
}

.filter-option input {
  appearance: none;
  width: 16px;
  height: 16px;
  min-height: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  accent-color: var(--green);
}

.filter-option input:checked {
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 0 0 3px var(--panel);
}

.filter-clear {
  width: 100%;
  min-height: 30px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.filter-actions button {
  min-height: 34px;
}

.availability-trigger {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 700;
}

.table-foot {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 16px;
  color: var(--muted);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.active-filter span {
  color: var(--muted);
  font-size: 12px;
}

.active-filter em {
  color: var(--muted);
  font-style: normal;
}

.active-filter.clear-all {
  background: transparent;
}

.pagination {
  width: fit-content;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pagination span {
  min-width: 96px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.page-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-2);
  font-size: 22px;
}

.page-arrow.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.per-page-form select {
  min-height: 34px;
  padding: 5px 30px 5px 10px;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
  min-height: calc(100vh - 120px);
}

.qty-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.qty-input {
  width: 82px;
  min-height: 34px;
  text-align: center;
}

.help-tip {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--green-2);
  font-size: 11px;
  font-weight: 900;
  cursor: help;
}

.floating-tooltip {
  position: fixed;
  z-index: 200;
  max-width: 320px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.floating-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 220;
  padding: 10px 14px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.toast.clickable {
  cursor: pointer;
  pointer-events: auto;
}

.toast.clickable::after {
  content: "  Click for log";
  opacity: 0.78;
  font-size: 11px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.log-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.log-modal[hidden] {
  display: none;
}

.availability-modal {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.availability-modal[hidden] {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 275;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  padding: 28px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #ffffff 6%), var(--panel));
  border: 1px solid color-mix(in srgb, var(--orange) 42%, var(--line));
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.confirm-modal[data-tone="danger"] .confirm-modal-card {
  border-color: color-mix(in srgb, #b92d3c 58%, var(--line));
}

.confirm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 24%, transparent);
  color: #ffd7a0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confirm-modal[data-tone="danger"] .confirm-badge {
  background: color-mix(in srgb, #b92d3c 26%, transparent);
  color: #ffc2c8;
}

.confirm-modal-card h2 {
  margin: 14px 52px 10px 0;
  font-size: 30px;
}

.confirm-modal-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.confirm-modal-actions {
  gap: 12px;
}

.confirm-modal[data-tone="danger"] [data-confirm-accept] {
  background: linear-gradient(180deg, #c84556, #a42b3a);
  border-color: #a42b3a;
}

body.modal-open {
  overflow: hidden;
}

.availability-card {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.availability-label {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.availability-block {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.availability-block strong {
  display: block;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  text-align: center;
}

.availability-allowed strong {
  background: #269046;
}

.availability-restricted strong {
  background: #b92d3c;
}

.availability-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 52px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  font-weight: 800;
}

.availability-empty {
  color: var(--muted);
  font-weight: 700;
}

.availability-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.availability-actions button {
  min-height: 34px;
}

.availability-actions-all {
  margin-top: 18px;
}

.log-modal-card {
  position: relative;
  width: min(900px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 24px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.log-modal-card h2 {
  margin: 0 52px 12px 0;
}

.log-modal-card p {
  color: var(--muted);
  font-weight: 800;
}

.log-modal-card pre {
  margin-top: 16px;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.cart-table {
  border-radius: 0;
  border-right: 0;
}

.cart-summary {
  border-radius: 0;
  border-left: 1px solid var(--line);
  box-shadow: none;
}

.cart-summary hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.cart-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  margin: 22px 0 28px;
}

.cart-summary dt,
.cart-summary dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.cart-summary dd {
  text-align: right;
}

.ghost-link {
  min-height: 38px;
  margin-top: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: 7px;
  font-weight: 800;
}

.icon-only {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
}

.danger {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

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

.doc-link {
  display: inline-flex;
  max-width: 100%;
  margin: 2px 4px 2px 0;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.hero-metrics .metric {
  min-height: 130px;
}

.metric.big strong {
  font-size: 34px;
}

.hub-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  margin-bottom: 18px;
}

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

.chart-controls {
  margin-left: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
}

.date-range-picker {
  position: relative;
  display: none;
}

.date-range-picker.active {
  display: block;
}

.date-range-button {
  min-height: 38px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.date-popover {
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 120;
  width: 326px;
  padding: 12px;
  background: #1f1f24;
  color: #fff;
  border: 1px solid #34343c;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.date-popover h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.date-popover > strong {
  display: block;
  margin: 0 0 14px;
  text-align: center;
  font-size: 15px;
}

.calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  min-height: 38px;
  background: #f4f4f5;
  color: #111;
  border-radius: 4px 4px 0 0;
  text-align: center;
}

.calendar-head a {
  color: #c7c7ca;
  font-size: 30px;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fff;
  color: #111;
}

.calendar-weekdays span {
  padding: 8px 0;
  text-align: center;
  font-weight: 900;
}

.calendar-grid {
  padding: 4px;
  border-radius: 0 0 4px 4px;
}

.calendar-day {
  min-height: 34px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: #111;
  border: 0;
  font-weight: 800;
}

.calendar-day:hover,
.calendar-day.selected {
  background: #9ec2de;
  color: #fff;
  transform: none;
}

.calendar-day.edge {
  background: #4d82d9;
}

.calendar-day.muted {
  color: #111;
  opacity: 0.82;
}

.calendar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.calendar-actions button {
  min-height: 46px;
  font-size: 16px;
}

.sales-chart svg {
  width: 100%;
  min-height: 420px;
}

.sales-chart .area {
  fill: rgba(54, 166, 235, 0.36);
}

.sales-chart .line {
  fill: none;
  stroke: #36a6eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-chart circle {
  fill: color-mix(in srgb, #36a6eb 55%, var(--panel));
  stroke: #36a6eb;
  stroke-width: 3;
}

.sales-chart .grid line {
  stroke: color-mix(in srgb, var(--line) 55%, transparent);
  stroke-width: 1;
}

.sales-chart .y-labels text {
  fill: var(--muted);
  font-size: 12px;
}

.axis-labels {
  position: relative;
  height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.axis-labels span {
  position: absolute;
  transform: translateX(-50%);
}

.report-side dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  margin: 18px 0 0;
}

.report-side dt,
.report-side dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.report-side dd {
  text-align: right;
}

.top-offers table,
.report-side table {
  min-width: 0;
}

.month-form select,
.report-month-form select {
  width: auto;
  min-width: 160px;
}

.month-form {
  margin-top: 8px;
}

.report-month-form {
  margin: 14px 0 18px;
}

.code-panel-head,
.download-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.download-actions {
  justify-content: flex-end;
  color: var(--muted);
  font-weight: 800;
}

.download-actions a {
  color: var(--green);
}

.inline-copy {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 7px;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 22%, var(--panel));
  color: var(--green-2);
  font-weight: 900;
}

.cart-link.small {
  min-height: 34px;
  padding: 7px 12px;
}

.mapping-toggle {
  min-height: 34px;
  padding: 0;
  background: transparent;
  border: 0;
}

.mapping-toggle:hover {
  background: transparent;
  transform: none;
}

.mapping-toggle.open .pill {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 35%, transparent);
}

.mapping-row td {
  padding: 0;
  background: color-mix(in srgb, var(--panel-2) 35%, var(--panel));
}

.mapping-panel {
  padding: 20px 32px;
  border-top: 1px solid var(--line);
}

.mapping-panel table {
  min-width: 900px;
}

.margin-form input {
  width: 92px;
  min-height: 34px;
  text-align: center;
}

.partner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.edit-panel-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.product-heading {
  margin-bottom: 18px;
}

.info-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 16px;
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.button-link-secondary {
  min-height: 44px;
  min-width: 96px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  padding: 0 16px;
}

.button-link-primary {
  min-height: 44px;
  min-width: 108px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  padding: 0 16px;
}

.deposit-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
}

.deposit-panel p {
  margin: 24px 0;
  color: var(--text);
  font-size: 16px;
}

.deposit-steps {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  font-size: 18px;
}

.deposit-steps span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 13px;
}

.deposit-steps em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.deposit-steps em span {
  background: var(--line);
}

.deposit-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.deposit-actions > * {
  min-width: 120px;
}

.deposit-panel {
  overflow: hidden;
}

.deposit-list {
  margin: 20px 0 28px 20px;
  color: var(--text);
  display: grid;
  gap: 8px;
}

.deposit-wire {
  margin-top: 18px;
}

.wire-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 18px;
}

.wire-field {
  min-width: 0;
}

.wire-field.wide {
  grid-column: 1 / -1;
}

.wire-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.wire-field > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wire-field strong {
  overflow-wrap: anywhere;
}

.asset-button.compact {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.deposit-faq {
  max-width: 900px;
  margin: 24px auto 0;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-item p {
  margin: 12px 0 0;
}

.status-select {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-weight: 800;
  background: var(--panel-2);
  color: var(--text);
}

.status-select.status-approved {
  color: var(--green);
}

.status-select.status-denied {
  color: var(--danger);
}

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

.kyc-form {
  max-height: calc(100vh - 130px);
  overflow: auto;
}

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

.positive { color: var(--green); }
.negative { color: var(--danger); }
.empty { color: var(--muted); text-align: center; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 28px;
}

.login-card .g-recaptcha {
  display: flex;
  justify-content: center;
}

.login-card h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.login-card p {
  color: var(--muted);
  margin-bottom: 22px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.demo-logins,
.alert {
  margin-top: 16px;
  color: var(--muted);
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.demo-login-button {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  text-align: left;
}

.demo-login-button:hover {
  background: color-mix(in srgb, var(--green) 14%, var(--panel-2));
  color: var(--text);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-field button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}

.password-field button .action-icon {
  width: 17px;
  height: 17px;
}

.password-field button.visible {
  background: color-mix(in srgb, var(--green) 18%, var(--panel));
  border-color: var(--green);
}

.password-field button .eye-off {
  display: none;
}

.password-field button.visible .eye-on {
  display: none;
}

.password-field button.visible .eye-off {
  display: block;
}

.alert {
  margin: 0 0 16px;
  padding: 10px;
  color: #fff;
  background: var(--danger);
  border-radius: 6px;
}

.split {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.partners-layout {
  display: grid;
  gap: 16px;
}

.add-partner-toggle {
  width: 100%;
  min-height: 48px;
}

.segmented-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 760px;
  width: 100%;
  justify-self: center;
}

.segmented-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.segmented-form legend {
  padding: 0 8px;
  color: var(--text);
  font-weight: 900;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.wizard-steps span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-weight: 900;
}

.wizard-steps span.active,
.wizard-steps span.done {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

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

.wizard-actions button {
  min-width: 120px;
}

.inline-form input {
  width: 120px;
}

.code-panel {
  margin-top: 18px;
  padding: 18px;
}

.code-panel > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.code-panel a {
  color: var(--green);
  font-weight: 800;
}

.ordered-code-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ordered-code-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ordered-code-group h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.code-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.code-image-link {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.code-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

pre {
  margin: 0 0 14px;
  padding: 16px;
  overflow: auto;
  background: #0f1118;
  color: #e7e9ff;
  border-radius: 8px;
}

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

  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell {
    margin-left: 0;
    padding: 0 18px 28px;
  }

  .topbar {
    margin: 0 -18px 18px;
    padding: 16px 18px;
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .metric-grid,
  .detail-grid,
  .split,
  .cart-layout,
  .hub-report-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }
}

.supplier-map-button,
.supplier-map-link {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
}

.supplier-map-button:hover,
.supplier-map-link:hover {
  color: var(--green-2);
  background: transparent;
  transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-cell form {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green-2);
  font-weight: 700;
}

.supplier-products-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.inline-map-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 360px;
}

.inline-map-form input,
.inline-map-form select {
  width: 100%;
}

.global-product-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: center;
}

.global-product-form input,
.global-product-form select {
  width: 100%;
}

.global-product-form button {
  min-height: 44px;
  white-space: nowrap;
}

.add-product-row-button {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
}

.add-global-product-panel {
  margin-top: 12px;
}

.error-note {
  border-color: color-mix(in srgb, #ef6b6b 55%, var(--line));
  color: #ffb7b7;
}

.mapping-panel {
  padding: 16px 18px 18px;
}

.mapping-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.supplier-toolbar {
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
}

.supplier-toolbar .search-form {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 8px;
  width: min(700px, 100%);
  margin-left: 0;
}

.sync-log-panel {
  margin-top: 18px;
}

.sync-log-panel pre {
  max-height: 280px;
  overflow: auto;
}

.mapping-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: start center;
  padding-top: 80px;
  background: rgba(0, 0, 0, 0.58);
}

.mapping-modal[hidden] {
  display: none;
}

.mapping-modal-card {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  padding: 26px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.mapping-modal-card h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.delete-col {
  width: 46px;
  min-width: 46px;
  text-align: center;
}

.delete-product-button {
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.delete-product-button:hover {
  color: #fff;
  background: #b33a3a;
  border-color: #b33a3a;
}

.mapping-modal-card label {
  display: block;
  margin-bottom: 8px;
}

.mapping-modal-card [data-mapping-supplier] {
  margin-bottom: 18px;
}

.mapping-search-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.mapping-results {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.mapping-result {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.mapping-result span {
  color: var(--muted);
}
