:root {
  --ink: #101010;
  --paper: #f2f0ea;
  --card: #ffffff;
  --line: rgba(16, 16, 16, 0.13);
  --line-soft: rgba(16, 16, 16, 0.08);
  --muted: #6c6c6c;
  --font-display: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 248px;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.admin-eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-screen {
  min-height: 100vh;
  background:
    radial-gradient(80% 70% at 70% 10%, rgba(245, 244, 240, 0.07) 0%, transparent 60%),
    var(--ink);
  color: #f5f4f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
  position: relative;
}

.login-card {
  width: min(430px, 100%);
  background: #141414;
  border: 1px solid rgba(245, 244, 240, 0.14);
  padding: clamp(28px, 4vw, 42px);
}

.login-logo {
  width: 168px;
  margin-bottom: 30px;
}

.login-card .admin-eyebrow {
  color: rgba(245, 244, 240, 0.45);
  margin-bottom: 10px;
}

.login-card h1 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.login-copy {
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(245, 244, 240, 0.5);
  margin-bottom: 28px;
}

.login-card form label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.5);
  margin-bottom: 8px;
}

.login-input {
  display: flex;
  border: 1px solid rgba(245, 244, 240, 0.22);
}

.login-input input {
  flex: 1;
  min-width: 0;
  height: 46px;
  background: transparent;
  border: 0;
  padding: 0 12px;
  color: #f5f4f0;
  font-family: var(--font-body);
  font-size: 14px;
}

.login-input input:focus {
  outline: none;
}

.login-input:focus-within {
  border-color: rgba(245, 244, 240, 0.6);
}

.login-input .admin-btn {
  margin: 4px;
  height: 36px;
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #e3a6a6;
}

.login-back {
  display: inline-block;
  margin-top: 26px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.45);
  transition: color 0.3s var(--ease);
}

.login-back:hover {
  color: #f5f4f0;
}

.login-foot {
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.28);
}

.admin-app {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--ink);
  color: #f5f4f0;
  padding: 26px 18px 22px;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.admin-brand {
  padding: 0 10px 26px;
  border-bottom: 1px solid rgba(245, 244, 240, 0.12);
  margin-bottom: 22px;
}

.admin-brand img {
  width: 148px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.58);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  text-align: left;
}

.admin-nav button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  flex-shrink: 0;
}

.admin-nav button:hover {
  background: rgba(245, 244, 240, 0.06);
  color: #f5f4f0;
}

.admin-nav button.is-active {
  background: #f5f4f0;
  color: var(--ink);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(245, 244, 240, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0;
}

.admin-nav button.is-active .nav-badge {
  background: var(--ink);
  color: #f5f4f0;
}

.sidebar-foot {
  border-top: 1px solid rgba(245, 244, 240, 0.12);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-foot a,
.sidebar-foot button {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 244, 240, 0.45);
  padding: 6px 10px;
  text-align: left;
  transition: color 0.25s var(--ease);
}

.sidebar-foot a:hover,
.sidebar-foot button:hover {
  color: #f5f4f0;
}

.admin-main {
  margin-left: var(--sidebar-w);
  padding: clamp(22px, 3vw, 40px);
  max-width: 1500px;
}

.admin-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(22px, 3vw, 34px);
}

.admin-topbar h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-top: 4px;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-date {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.admin-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.admin-icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 400;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: 340px;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi small {
  font-size: 10.5px;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
}

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

.panel-head h2 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-muted {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.panel-link {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease);
}

.panel-link:hover {
  color: var(--ink);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 170px;
  padding-top: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.chart-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  min-height: 2px;
  background: var(--ink);
  opacity: 0.85;
  transition: opacity 0.25s var(--ease);
  position: relative;
}

.chart-col:hover .chart-bar {
  opacity: 1;
}

.chart-bar.is-zero {
  background: var(--line);
  opacity: 1;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.list-row:first-child {
  padding-top: 0;
}

.list-main {
  min-width: 0;
}

.list-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.list-main span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-side {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-side strong {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.list-empty {
  font-size: 11.5px;
  color: var(--muted);
  padding: 18px 0;
}

.order-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.order-row:hover strong {
  text-decoration: underline;
}

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

.toolbar-note {
  font-size: 11px;
  color: var(--muted);
  max-width: 60ch;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.filter:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.admin-input {
  height: 38px;
  min-width: 240px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
}

.admin-input:focus {
  outline: none;
  border-color: var(--ink);
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease);
  white-space: nowrap;
}

.admin-btn:hover {
  transform: translateY(-1px);
}

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

.admin-btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.admin-btn.ghost:hover {
  border-color: var(--ink);
}

.admin-btn.small {
  height: 32px;
  font-size: 8.5px;
}

.admin-btn.danger {
  background: #7d2e2e;
  border-color: #7d2e2e;
  color: #fff;
}

.table-panel {
  padding: 0;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}

.admin-table th {
  text-align: left;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

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

.admin-table tbody tr {
  transition: background 0.2s var(--ease);
}

.admin-table tbody tr:hover {
  background: #faf9f5;
}

.cell-strong {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}

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

.cell-amount {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.row-action {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease);
}

.row-action:hover {
  border-color: var(--ink);
}

.table-empty {
  padding: 34px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  white-space: nowrap;
}

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

.status-pendiente {
  color: #8a6716;
  border-color: rgba(138, 103, 22, 0.3);
  background: rgba(138, 103, 22, 0.06);
}

.status-confirmado {
  color: #2f4f6f;
  border-color: rgba(47, 79, 111, 0.28);
  background: rgba(47, 79, 111, 0.06);
}

.status-enviado {
  color: #4a5a6a;
  border-color: rgba(74, 90, 106, 0.28);
  background: rgba(74, 90, 106, 0.06);
}

.status-entregado {
  color: #2f5a3c;
  border-color: rgba(47, 90, 60, 0.28);
  background: rgba(47, 90, 60, 0.07);
}

.status-cancelado {
  color: #7d2e2e;
  border-color: rgba(125, 46, 46, 0.28);
  background: rgba(125, 46, 46, 0.06);
}

.status-activo {
  color: #2f5a3c;
  border-color: rgba(47, 90, 60, 0.28);
  background: rgba(47, 90, 60, 0.07);
}

.status-borrador {
  color: #6c6c6c;
  border-color: rgba(108, 108, 108, 0.3);
  background: rgba(108, 108, 108, 0.06);
}

.products-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.admin-product-card {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.apc-media {
  background: radial-gradient(80% 70% at 50% 35%, #f6f4ee 0%, #e9e6de 100%);
  display: grid;
  place-items: center;
  padding: 18px;
  min-height: 210px;
}

.apc-media svg {
  width: min(52%, 150px);
  height: auto;
}

.apc-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

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

.apc-name {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.apc-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.apc-meta {
  font-size: 10.5px;
  color: var(--muted);
}

.apc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding: 10px 16px;
}

.apc-actions button {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}

.apc-actions button:hover {
  color: var(--ink);
}

.apc-actions .delete-product:hover {
  color: #7d2e2e;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  margin: auto;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(16, 16, 16, 0.2);
  overflow: hidden;
}

.modal-wide {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.modal-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.order-detail-head .cell-sub {
  margin-top: 4px;
}

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

.order-block {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 16px;
}

.order-block h3 {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.order-block p {
  font-size: 12px;
  line-height: 1.65;
}

.order-block a {
  border-bottom: 1px solid var(--line);
}

.order-items {
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 18px;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

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

.order-item-row span:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.order-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 22px;
  font-size: 11.5px;
  color: var(--muted);
}

.order-totals .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.order-totals .row.total {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.order-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.order-status-actions select {
  height: 38px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
}

.order-status-actions .admin-btn {
  margin-left: auto;
}

.product-form .form-error,
.form-error {
  min-height: 18px;
  font-size: 12px;
  color: #7d2e2e;
  margin-bottom: 12px;
}

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

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field.full {
  grid-column: 1 / -1;
}

.admin-field label {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink);
  height: 40px;
  padding: 0 11px;
  border-radius: 0;
  transition: border-color 0.2s var(--ease);
}

.admin-field textarea {
  height: auto;
  padding: 10px 11px;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.variants-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.variants-head h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.variants-head p {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

.variants-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-card {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 14px;
}

.variant-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.variant-top .admin-field {
  gap: 4px;
}

.variant-top .admin-field input {
  height: 36px;
}

.variant-top input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

.variant-active {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  height: 36px;
  white-space: nowrap;
  cursor: pointer;
}

.variant-active input {
  accent-color: var(--ink);
  width: 14px;
  height: 14px;
}

.remove-variant {
  height: 36px;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 10px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.remove-variant:hover:not(:disabled) {
  color: #7d2e2e;
  border-color: #7d2e2e;
}

.remove-variant:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.stock-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stock-field span {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.stock-field input {
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
  width: 100%;
}

.stock-field input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--card);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}

.empty-state {
  background: var(--card);
  border: 1px dashed var(--line);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

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

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

@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(245, 244, 240, 0.14);
  }

  .admin-brand {
    padding: 0;
    border: 0;
    margin: 0;
    flex-shrink: 0;
  }

  .admin-brand img {
    width: 108px;
  }

  .admin-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
  }

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

  .admin-nav button {
    padding: 9px 10px;
    font-size: 9px;
    white-space: nowrap;
  }

  .admin-nav button svg {
    display: none;
  }

  .nav-badge {
    margin-left: 2px;
  }

  .sidebar-foot {
    border: 0;
    padding: 0;
    flex-direction: row;
    gap: 4px;
    flex-shrink: 0;
  }

  .sidebar-foot a {
    display: none;
  }

  .sidebar-foot button {
    padding: 8px;
    font-size: 8.5px;
  }

  .admin-main {
    margin-left: 0;
    padding: 20px 16px 40px;
  }

  .admin-topbar {
    align-items: center;
    margin-bottom: 20px;
  }

  .admin-date {
    display: none;
  }

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

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .kpi {
    padding: 15px;
  }

  .panel {
    padding: 16px;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-right {
    width: 100%;
  }

  .admin-input {
    flex: 1;
    min-width: 0;
  }

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

  .variant-top {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .variant-active {
    height: auto;
    grid-column: 1 / 2;
  }

  .remove-variant {
    grid-column: 2 / 3;
    justify-self: end;
  }

  .stock-grid {
    gap: 5px;
  }

  .admin-modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
  }

  .modal-head,
  .modal-body {
    padding: 18px;
  }

  .order-status-actions .admin-btn {
    margin-left: 0;
    width: 100%;
  }

  .admin-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}
