:root {
  --ink: #102033;
  --muted: #64748b;
  --paper: #eef3f7;
  --panel: #ffffff;
  --line: #d9e2ea;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --accent-soft: #d9f2ee;
  --accent-2: #b45309;
  --danger-soft: #fee2e2;
}

/* Productos Sprint 01: editor modal fiel a Propuesta B. */
body.product-editor-shell {
  overflow: hidden;
}

body.products-shell .s01-editor-stage {
  position: fixed;
  z-index: 1040;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 3vh 18px;
  background: rgb(1 4 9 / 76%);
  backdrop-filter: blur(4px);
}

body.products-shell .s01-editor-surface {
  width: min(1180px, 100%);
  height: min(92dvh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--s01-border);
  border-radius: 20px;
  background: var(--s01-surface);
  box-shadow: 0 26px 90px rgb(1 4 9 / 72%);
}

body.products-shell .s01-editor .s01-editor-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 18px 25px;
  border-bottom: 1px solid var(--s01-border);
  background: var(--s01-surface);
}

body.products-shell .s01-editor-header > div { min-width: 0; }
body.products-shell .s01-editor-header .s01-editor-mode { color: var(--s01-info); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
body.products-shell .s01-editor-header h2 { margin: 2px 0; overflow: hidden; color: var(--s01-ink); font-size: 24px; line-height: 1.1; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
body.products-shell .s01-editor-header p { margin: 0; color: var(--s01-muted); font-size: 13px; }
body.products-shell .s01-editor-close { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; color: var(--s01-muted); text-decoration: none; }
body.products-shell .s01-editor-close:hover { border-color: var(--s01-border); background: var(--s01-surface-soft); color: var(--s01-ink); }

body.products-shell .s01-editor-scroll {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--s01-page);
}

body.products-shell .s01-editor-error { margin: 18px 25px 0; box-shadow: var(--s01-shadow-raised); }
body.products-shell .s01-editor-error span { color: inherit; }

body.products-shell .s01-editor .s01-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 22px 25px 34px;
}

body.products-shell .s01-editor-grid > .product-form-main { display: contents; }
body.products-shell .s01-editor-grid .s01-identity-section { grid-column: 1; grid-row: 1; }
body.products-shell .s01-editor-grid .s01-presentation-section { grid-column: 1; grid-row: 2; }
body.products-shell .s01-editor-grid .s01-editor-aside { grid-column: 2; grid-row: 1 / span 2; }
body.products-shell .s01-editor-grid .s01-usage-section { grid-column: 1 / -1; grid-row: 3; }
body.products-shell .s01-editor-grid .s01-recipe-section { grid-column: 1 / -1; grid-row: 4; }

body.products-shell .s01-editor .s01-editor-section,
body.products-shell .s01-editor .s01-editor-aside > .panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--s01-border);
  border-radius: 14px;
  background: var(--s01-surface);
  box-shadow: var(--s01-shadow-low);
}

body.products-shell .s01-editor .panel-section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
body.products-shell .s01-editor .panel-section-title h3 { margin: 2px 0; color: var(--s01-ink); font-size: 20px; letter-spacing: -.02em; }
body.products-shell .s01-editor .panel-section-title p { margin: 0; color: var(--s01-muted); font-size: 13px; }

body.products-shell .s01-type-choice,
body.products-shell .s01-role-choice { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
body.products-shell .s01-type-choice legend,
body.products-shell .s01-role-choice legend { grid-column: 1 / -1; margin-bottom: 8px; color: var(--s01-ink); font-weight: 800; }
body.products-shell .s01-type-choice legend small { color: var(--s01-muted); font-size: 11px; font-weight: 500; }
body.products-shell .s01-type-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.products-shell .s01-type-choice label,
body.products-shell .s01-role-choice label { position: relative; min-width: 0; border: 1px solid var(--s01-control); border-radius: 12px; background: var(--s01-field); cursor: pointer; }
body.products-shell .s01-type-choice label { min-height: 88px; display: flex; align-items: center; gap: 11px; padding: 14px 38px 14px 14px; }
body.products-shell .s01-type-choice input,
body.products-shell .s01-role-choice input { position: absolute; opacity: 0; pointer-events: none; }
body.products-shell .s01-type-choice label:has(input:checked),
body.products-shell .s01-role-choice label:has(input:checked) { border-color: var(--s01-info); background: var(--s01-info-soft); box-shadow: 0 0 0 2px rgb(88 166 255 / 24%); }
body.products-shell .s01-type-choice label:has(input:focus-visible),
body.products-shell .s01-role-choice label:has(input:focus-visible) { outline: 3px solid rgb(88 166 255 / 34%); outline-offset: 2px; }
body.products-shell .s01-type-choice .choice-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 10px; background: var(--s01-surface-soft); color: var(--s01-info); font-size: 19px; }
body.products-shell .s01-type-choice b,
body.products-shell .s01-type-choice small,
body.products-shell .s01-role-choice b,
body.products-shell .s01-role-choice small { display: block; }
body.products-shell .s01-type-choice small,
body.products-shell .s01-role-choice small { margin-top: 2px; color: var(--s01-muted); font-size: 12px; }
body.products-shell .s01-type-choice label > i,
body.products-shell .s01-role-choice label > i { position: absolute; top: 12px; right: 12px; width: 17px; height: 17px; border: 1.5px solid var(--s01-control); border-radius: 50%; background: var(--s01-field); }
body.products-shell .s01-type-choice label:has(input:checked) > i,
body.products-shell .s01-role-choice label:has(input:checked) > i { border: 5px solid var(--s01-info); }

body.products-shell .s01-editor .s01-identity-fields { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(220px, 1fr); column-gap: 18px; row-gap: 14px; }
body.products-shell .s01-editor .s01-description-field { grid-column: 1; grid-row: 2; }
body.products-shell .s01-editor .s01-supplier-field { grid-column: 2; grid-row: 2; }
body.products-shell .s01-editor .s01-character-count { position: absolute; right: 8px; bottom: 7px; margin: 0; }
body.products-shell .s01-editor .form-field { position: relative; display: grid; align-content: start; gap: 6px; }
body.products-shell .s01-editor .form-label { color: var(--s01-ink); font-size: 13px; font-weight: 800; }
body.products-shell .s01-editor .form-label em { margin-left: 4px; color: var(--s01-info); font-size: 11px; font-style: normal; font-weight: 700; }
body.products-shell .s01-editor .form-control,
body.products-shell .s01-editor .form-select,
body.products-shell .s01-editor .supplier-combobox-summary { min-height: 44px; border: 1px solid var(--s01-control); border-radius: 9px; background: var(--s01-field); color: var(--s01-ink); }
body.products-shell .s01-editor .s01-field-error,
body.products-shell .s01-editor .s01-recipe-error { min-height: 16px; display: block; margin: 0; color: var(--s01-danger); font-size: 11px; line-height: 1.4; }
body.products-shell .s01-editor .form-field.has-error > .form-control,
body.products-shell .s01-editor .form-field.has-error > .form-select,
body.products-shell .s01-editor .form-field.has-error .money-input,
body.products-shell .s01-editor .form-field.has-error .supplier-combobox-summary,
body.products-shell .s01-editor .s01-recipe-section [aria-invalid="true"] { border-color: var(--s01-danger); box-shadow: 0 0 0 3px rgb(255 123 114 / 22%); }
body.products-shell .s01-editor .form-field.has-error .money-input > input { box-shadow: none; }
body.products-shell .s01-editor textarea.form-control { min-height: 76px; padding: 11px; resize: vertical; }
body.products-shell .s01-editor .s01-measure-fields { display: grid; grid-template-columns: 1.1fr .75fr .7fr; gap: 15px; }
body.products-shell .s01-editor .s01-commercial-row { display: grid; grid-template-columns: minmax(240px, 420px); margin-top: 18px; }
body.products-shell .s01-editor .money-input { display: flex; overflow: hidden; border: 1px solid var(--s01-control); border-radius: 9px; background: var(--s01-field); }
body.products-shell .s01-editor .money-input > span { display: grid; place-items: center; padding-left: 11px; border: 0; background: transparent; }
body.products-shell .s01-editor .money-input input { border: 0; box-shadow: none; }
body.products-shell .s01-entry-note { min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid var(--s01-info); border-radius: 10px; background: var(--s01-info-soft); color: var(--s01-info); }
body.products-shell .s01-entry-note > i { font-size: 24px; }
body.products-shell .s01-entry-note b,
body.products-shell .s01-entry-note span { display: block; }
body.products-shell .s01-entry-note span { margin-top: 2px; color: var(--s01-muted); font-size: 12px; }

body.products-shell .s01-capability-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.products-shell .s01-editor .product-switch-row { position: relative; min-width: 0; min-height: 76px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--s01-control); border-radius: 11px; background: var(--s01-field); cursor: pointer; }
body.products-shell .s01-editor .product-switch-row.is-locked { background: var(--s01-surface-soft); cursor: default; }
body.products-shell .s01-editor .product-switch-row .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
body.products-shell .s01-editor .switch-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--s01-info-soft); color: var(--s01-info); }
body.products-shell .s01-editor .s01-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--s01-control); transition: background 160ms ease; }
body.products-shell .s01-editor .s01-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(1 4 9 / 45%); transition: transform 160ms ease; }
body.products-shell .s01-editor .product-switch-row input:checked + .s01-switch { background: var(--s01-primary); }
body.products-shell .s01-editor .product-switch-row input:checked + .s01-switch::after { transform: translateX(18px); }

body.products-shell .s01-role-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
body.products-shell .s01-role-choice label { min-height: 78px; padding: 13px 37px 13px 13px; }
body.products-shell .s01-conditional-fields { display: grid; grid-template-columns: 210px minmax(320px, 420px) minmax(0, 1fr); align-items: end; gap: 12px; margin-top: 14px; }
body.products-shell .s01-derived-notice { min-height: 68px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--s01-info-soft); color: var(--s01-info); }
body.products-shell .s01-derived-notice b,
body.products-shell .s01-derived-notice span { display: block; }
body.products-shell .s01-derived-notice span { color: var(--s01-muted); font-size: 11px; }

body.products-shell .s01-editor-aside { min-width: 0; display: grid; grid-template-columns: 1fr; align-content: start; gap: 12px; position: static; }
body.products-shell .s01-editor .s01-editor-aside > .panel { padding: 16px; }
body.products-shell .s01-editor .s01-photo-panel header,
body.products-shell .s01-editor .s01-live-preview header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--s01-ink); font-size: 12px; font-weight: 800; }
body.products-shell .s01-editor .s01-photo-panel header small { color: var(--s01-muted); font-size: 10px; font-weight: 500; }
body.products-shell .s01-editor .compact-photo-preview { min-height: 170px; aspect-ratio: 4 / 3; border: 1px dashed var(--s01-control); border-radius: 10px; background: var(--s01-field); }
body.products-shell .s01-editor .product-photo-upload { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; border-color: var(--s01-control); color: var(--s01-info); }
body.products-shell .s01-editor .s01-live-preview { background: var(--s01-surface-soft); }
body.products-shell .s01-editor .s01-live-preview > p { margin-top: 13px; color: var(--s01-muted); text-transform: none; }
body.products-shell .s01-editor .s01-live-preview dl > div { border: 1px solid var(--s01-border); background: var(--s01-surface-raised); }

body.products-shell .s01-editor .s01-recipe-section .compact-recipe-table { overflow: visible; margin: 0; border: 0; border-radius: 0; background: transparent; }
body.products-shell .s01-editor .s01-recipe-section .recipe-head,
body.products-shell .s01-editor .s01-recipe-section .recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 42px; gap: 10px; }
body.products-shell .s01-editor .s01-recipe-section .recipe-head { align-items: end; padding: 0 2px 6px; border: 0; background: transparent; color: var(--s01-muted); font-size: 11px; font-weight: 800; }
body.products-shell .s01-editor .s01-recipe-section [data-recipe-rows] { display: grid; gap: 8px; }
body.products-shell .s01-editor .s01-recipe-section .recipe-row { align-items: start; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.products-shell .s01-editor .s01-recipe-section .recipe-row label { position: relative; display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; }
body.products-shell .s01-editor .s01-recipe-section .recipe-row label span { position: absolute; top: 50%; right: 10px; color: var(--s01-muted); font-size: 10px; transform: translateY(-50%); }
body.products-shell .s01-editor .s01-recipe-section .recipe-row label input { padding-right: 70px; }
body.products-shell .s01-editor .s01-recipe-section [data-remove-recipe] { width: 42px; min-width: 42px; min-height: 44px; padding: 0; border: 1px solid var(--s01-danger); border-radius: 9px; background: var(--s01-danger-soft); color: var(--s01-danger); }
body.products-shell .s01-editor .s01-recipe-section [data-remove-recipe]:hover { background: #421c21; color: var(--s01-danger); }
body.products-shell .s01-editor .s01-recipe-error { margin-top: 6px; }

body.products-shell .s01-editor .s01-editor-footer {
  position: relative;
  z-index: 4;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: 0;
  padding: 18px 25px;
  border-top: 1px solid var(--s01-border);
  background: var(--s01-surface);
  box-shadow: 0 -8px 24px rgb(1 4 9 / 34%);
}

@media (max-width: 900px) {
  body.products-shell .s01-editor-grid .s01-identity-section { grid-column: 1; grid-row: 1; }
  body.products-shell .s01-editor-grid .s01-editor-aside { grid-column: 1; grid-row: 2; grid-template-columns: 1fr 1fr; }
  body.products-shell .s01-editor-grid .s01-presentation-section { grid-column: 1; grid-row: 3; }
  body.products-shell .s01-editor-grid .s01-usage-section { grid-column: 1; grid-row: 4; }
  body.products-shell .s01-editor-grid .s01-recipe-section { grid-column: 1; grid-row: 5; }
  body.products-shell .s01-editor .s01-editor-grid { grid-template-columns: 1fr; }
  body.products-shell .s01-conditional-fields { grid-template-columns: 1fr 1fr; }
  body.products-shell .s01-derived-notice { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  body.products-shell .s01-editor-stage { padding: 0; }
  body.products-shell .s01-editor-surface { width: 100%; height: 100dvh; border-radius: 0; }
  body.products-shell .s01-editor .s01-editor-header,
  body.products-shell .s01-editor .s01-editor-footer { padding: 14px 16px; }
  body.products-shell .s01-editor-header p { display: none; }
  body.products-shell .s01-editor-header h2 { font-size: 20px; }
  body.products-shell .s01-editor .s01-editor-grid { padding: 16px; }
  body.products-shell .s01-editor-error { margin: 14px 16px 0; }
  body.products-shell .s01-editor .s01-editor-aside { grid-template-columns: 1fr; }
  body.products-shell .s01-type-choice,
  body.products-shell .s01-role-choice,
  body.products-shell .s01-capability-grid,
  body.products-shell .s01-editor .s01-identity-fields,
  body.products-shell .s01-editor .s01-measure-fields,
  body.products-shell .s01-conditional-fields { grid-template-columns: 1fr; }
  body.products-shell .s01-editor .s01-description-field,
  body.products-shell .s01-editor .s01-supplier-field { grid-column: 1; grid-row: auto; }
  body.products-shell .s01-derived-notice { grid-column: 1; }
  body.products-shell .s01-editor .panel-section-title { align-items: stretch; flex-direction: column; }
  body.products-shell .s01-editor .panel-section-title .s01-button { width: 100%; }
  body.products-shell .s01-editor .s01-recipe-section .recipe-head { display: none; }
  body.products-shell .s01-editor .s01-recipe-section .recipe-row { grid-template-columns: minmax(0, 1fr) 92px 40px; }
  body.products-shell .s01-editor .s01-recipe-section [data-remove-recipe] { width: 40px; min-width: 40px; }
}

/*
 * PRODUCTOS SPRINT 01 — PROPUESTA B
 * THESIS: catálogo visual primero; métricas y configuración aparecen solo cuando la tarea las necesita.
 * OWN-WORLD: grafito azulado, bordes de acero y acentos semánticos verde, azul, amarillo, rojo y violeta.
 * STORY: reconocer, consultar y actuar; el editor explica dependencias antes de guardar.
 * FIRST VIEWPORT: encabezado breve, acción verde, filtros compactos y productos fotográficos sin métricas administrativas.
 * FORM: adaptación nativa fiel de la propuesta aprobada; conserva MVC, filtros, proveedores y contratos del servidor.
 */

body.products-shell {
  --s01-page: #0f1720;
  --s01-chrome: #0d141c;
  --s01-surface: #161f2a;
  --s01-surface-soft: #1c2632;
  --s01-surface-raised: #202c38;
  --s01-field: #111923;
  --s01-ink: #f0f6fc;
  --s01-muted: #b1bac4;
  --s01-border: #3d4a57;
  --s01-control: #6e7781;
  --s01-primary: #238636;
  --s01-primary-hover: #1a7f37;
  --s01-success: #56d364;
  --s01-success-soft: #12261c;
  --s01-info: #58a6ff;
  --s01-info-soft: #10243a;
  --s01-warning: #e3b341;
  --s01-warning-soft: #302513;
  --s01-danger: #ff7b72;
  --s01-danger-soft: #33171b;
  --s01-prepared: #d2a8ff;
  --s01-prepared-soft: #251a35;
  --s01-shadow-low: 0 1px 2px rgb(1 4 9 / 45%);
  --s01-shadow-raised: 0 10px 30px rgb(1 4 9 / 42%);
  background: var(--s01-page);
  color: var(--s01-ink);
}

body.products-shell .content {
  background: var(--s01-page);
}

body.products-shell .content > .alert {
  margin: -18px 0 24px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 8px;
  box-shadow: var(--s01-shadow-low);
  font-weight: 700;
}

body.products-shell .content > .alert-success { background: var(--s01-success-soft) !important; border-color: var(--s01-success) !important; color: var(--s01-success) !important; }
body.products-shell .content > .alert-warning { background: var(--s01-warning-soft) !important; border-color: var(--s01-warning) !important; color: var(--s01-warning) !important; }
body.products-shell .content > .alert-danger { background: var(--s01-danger-soft) !important; border-color: var(--s01-danger) !important; color: var(--s01-danger) !important; }

.s01-products,
.s01-products * {
  box-sizing: border-box;
}

.s01-products {
  color: var(--s01-ink);
}

.s01-products [hidden],
.s01-dialog [hidden] {
  display: none !important;
}

.s01-products :focus-visible,
.s01-dialog :focus-visible {
  outline: 3px solid var(--s01-info);
  outline-offset: 2px;
}

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

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

.s01-kicker {
  margin: 0 0 7px;
  color: var(--s01-info) !important;
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.s01-page-head h2 {
  margin: 0;
  color: var(--s01-ink);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: -.04em;
}

.s01-page-head > div:first-child > p:last-child {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--s01-muted);
  font-size: 16px;
}

.s01-page-actions,
.s01-confirm-actions,
.s01-detail-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.s01-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.s01-button:hover:not(:disabled):not(.is-disabled) {
  transform: translateY(-1px);
}

.s01-button--primary {
  background: var(--s01-primary);
  border-color: var(--s01-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgb(1 4 9 / 36%);
}

.s01-button--primary:hover { background: var(--s01-primary-hover); border-color: var(--s01-primary-hover); color: #fff; }
.s01-button--secondary { background: var(--s01-surface); border-color: var(--s01-control); color: var(--s01-ink); }
.s01-button--secondary:hover { background: var(--s01-info-soft); border-color: var(--s01-info); color: var(--s01-info); }
.s01-button--danger { background: var(--s01-danger-soft); border-color: var(--s01-danger); color: var(--s01-danger); }
.s01-button--danger:hover { background: #421c21; color: var(--s01-danger); }
.s01-button--success { background: var(--s01-success-soft); border-color: var(--s01-success); color: var(--s01-success); }
.s01-button--success:hover { background: #183423; color: var(--s01-success); }
.s01-button.is-disabled,
.s01-button:disabled { background: #21262d; border-color: var(--s01-control); color: #8c959f; cursor: not-allowed; box-shadow: none; transform: none; }

/* El tema global declara colores para todos los enlaces; estas variantes conservan el contraste de los botones S01. */
body.products-shell a.s01-button--primary,
body.products-shell a.s01-button--primary:visited,
body.products-shell a.s01-button--primary:hover { color: #fff; }
body.products-shell a.s01-button--secondary,
body.products-shell a.s01-button--secondary:visited { color: var(--s01-ink); }
body.products-shell a.s01-button--secondary:hover { color: var(--s01-info); }
body.products-shell a.s01-button--action,
body.products-shell a.s01-button--action:visited { color: var(--s01-ink); }
body.products-shell a.s01-button--action:hover,
body.products-shell a.s01-button--consult,
body.products-shell a.s01-button--consult:visited { color: var(--s01-info); }
body.products-shell a.s01-button--danger,
body.products-shell a.s01-button--danger:visited,
body.products-shell a.s01-button--danger:hover { color: var(--s01-danger); }
body.products-shell a.s01-button--success,
body.products-shell a.s01-button--success:visited,
body.products-shell a.s01-button--success:hover { color: var(--s01-success); }
body.products-shell a.s01-icon-action,
body.products-shell a.s01-icon-action:visited { color: var(--s01-info); }

.s01-button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: s01-spin 700ms linear infinite;
}

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

.s01-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 200px auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--s01-border);
  border-radius: 14px;
  background: var(--s01-surface);
  box-shadow: var(--s01-shadow-low);
}

.s01-search-field {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--s01-control);
  border-radius: 10px;
  background: var(--s01-field);
  color: var(--s01-muted);
}

.s01-search-field:focus-within,
.s01-filter-field select:focus {
  border-color: var(--s01-info);
  box-shadow: 0 0 0 3px rgb(88 166 255 / 32%);
  outline: 0;
}

.s01-search-field input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--s01-ink);
}

.s01-search-field input::placeholder { color: var(--s01-muted); }
.s01-filter-field { display: grid; gap: 5px; }
.s01-filter-field > span { color: var(--s01-muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.s01-filter-field select { height: 46px; min-width: 0; padding: 0 34px 0 11px; border: 1px solid var(--s01-control); border-radius: 10px; background: var(--s01-field); color: var(--s01-ink); }
.s01-filter-submit { min-width: 94px; }

.s01-view-switch {
  height: 46px;
  display: flex;
  padding: 4px;
  border: 1px solid var(--s01-control);
  border-radius: 11px;
  background: var(--s01-surface-soft);
}

.s01-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--s01-muted);
  font: inherit;
  font-weight: 700;
}

.s01-view-switch button[aria-pressed="true"] { background: var(--s01-surface-raised); color: var(--s01-info); box-shadow: var(--s01-shadow-low); }

.s01-catalog-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 19px 2px 13px;
}

.s01-catalog-summary div { display: flex; align-items: baseline; gap: 9px; }
.s01-catalog-summary span,
.s01-catalog-summary small { color: var(--s01-muted); }
.s01-catalog-summary a { color: var(--s01-info); font-weight: 800; text-decoration: none; }

.s01-cards-view {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.s01-product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--s01-border);
  border-radius: 20px;
  background: var(--s01-surface);
  box-shadow: var(--s01-shadow-low);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.s01-product-card:hover { transform: translateY(-3px); border-color: var(--s01-control); box-shadow: var(--s01-shadow-raised); }
.s01-product-card.is-inactive { opacity: .72; }
.s01-product-photo { position: relative; height: 205px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, var(--s01-surface-soft), var(--s01-field)); }
.s01-product-photo::after { content: ""; position: absolute; right: -35px; bottom: -65px; width: 150px; height: 150px; border-radius: 50%; background: rgb(88 166 255 / 8%); }
.s01-product-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 260ms ease; }
.s01-product-card:hover .s01-product-photo img { transform: scale(1.025); }
.s01-product-monogram { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 24px; background: var(--s01-info-soft); color: var(--s01-info); font-size: 26px; font-weight: 900; }
.s01-product-photo > .s01-status { position: absolute; z-index: 2; top: 13px; left: 13px; }

.s01-status {
  width: max-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--s01-success);
  border-radius: 7px;
  background: var(--s01-success-soft);
  color: var(--s01-success);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.s01-status.is-inactive { border-color: var(--s01-control); background: #21262d; color: #aeb6bf; }
.s01-product-card__body { padding: 18px; }
.s01-product-card__top { display: flex; justify-content: space-between; gap: 12px; }
.s01-product-card__top > div:first-child { min-width: 0; }
.s01-product-category { margin: 0 0 6px; color: var(--s01-info) !important; font-size: 11px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.s01-product-card h3 { margin: 0; overflow-wrap: anywhere; color: var(--s01-ink); font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.s01-product-measure { margin: 5px 0 0; color: var(--s01-muted); font-size: 13px; }
.s01-product-price { flex: none; text-align: right; }
.s01-product-price strong { display: block; color: var(--s01-ink); font-size: 21px; }
.s01-product-price span { color: var(--s01-muted); font-size: 11px; }

.s01-chip-row { min-height: 28px; display: flex; flex-wrap: wrap; gap: 6px; margin: 15px 0; }
.s01-chip { width: max-content; min-height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 800; line-height: 1; }
.s01-chip--sale { border-color: var(--s01-success); background: var(--s01-success-soft); color: var(--s01-success); }
.s01-chip--base { border-color: var(--s01-info); background: var(--s01-info-soft); color: var(--s01-info); }
.s01-chip--prepared { border-color: var(--s01-prepared); background: var(--s01-prepared-soft); color: var(--s01-prepared); }
.s01-chip--inventory { border-color: var(--s01-control); background: var(--s01-surface-soft); color: var(--s01-muted); }

.s01-product-actions {
  display: grid;
  grid-template-columns: 1fr .8fr 1fr;
  align-items: stretch;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--s01-border);
}

.s01-product-actions form { min-width: 0; margin: 0; }
.s01-button--action { width: 100%; min-width: 0; min-height: 40px; padding: 0 9px; background: var(--s01-surface); border-color: var(--s01-control); color: var(--s01-ink); font-size: 12px; box-shadow: none; }
.s01-button--action:hover { background: var(--s01-surface-raised); border-color: var(--s01-info); color: var(--s01-info); }
.s01-button--consult { border-color: var(--s01-info); color: var(--s01-info); }
.s01-button--action.s01-button--danger { border-color: var(--s01-danger); color: var(--s01-danger); }
.s01-button--action.s01-button--success { border-color: var(--s01-success); color: var(--s01-success); }

.s01-table-view { display: none; }
[data-product-catalog-view="table"] .s01-cards-view { display: none; }
[data-product-catalog-view="table"] .s01-table-view { display: block; }
.s01-table-wrap { overflow: auto; border: 1px solid var(--s01-border); border-radius: 14px; background: var(--s01-surface); box-shadow: var(--s01-shadow-low); }
.s01-product-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.s01-product-table th { padding: 12px 14px; border-bottom: 1px solid var(--s01-border); background: var(--s01-surface-soft); color: var(--s01-muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.s01-product-table td { padding: 11px 14px; border-bottom: 1px solid var(--s01-border); color: var(--s01-ink); vertical-align: middle; }
.s01-product-table tbody tr:last-child td { border-bottom: 0; }
.s01-product-table tbody tr:hover { background: var(--s01-surface-soft); }
.s01-product-table tbody tr.is-inactive { opacity: .7; }
.s01-table-product { min-width: 210px; display: flex; align-items: center; gap: 11px; }
.s01-table-product > span,
.s01-compact-photo { width: 46px; height: 46px; flex: 0 0 46px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--s01-border); border-radius: 9px; background: var(--s01-surface-soft); color: var(--s01-info); }
.s01-table-product img,
.s01-compact-photo img { width: 100%; height: 100%; object-fit: cover; }
.s01-table-product strong,
.s01-table-product small { display: block; }
.s01-table-product small { margin-top: 3px; color: var(--s01-muted); font-size: 11px; }
.s01-table-category { color: var(--s01-info); font-size: 12px; font-weight: 800; }
.s01-table-usage { display: flex; flex-wrap: wrap; gap: 5px; }
.s01-table-price { color: var(--s01-ink); font-weight: 900; white-space: nowrap; }
.s01-row-actions { display: flex; justify-content: end; gap: 6px; }
.s01-row-actions form { margin: 0; }
.s01-icon-action { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--s01-control); border-radius: 9px; background: var(--s01-surface); color: var(--s01-info); text-decoration: none; transition: background 180ms ease, border-color 180ms ease, color 180ms ease; }
.s01-icon-action:hover { background: var(--s01-info-soft); border-color: var(--s01-info); color: #79c0ff; }
.s01-icon-action.is-danger { color: var(--s01-danger); }
.s01-icon-action.is-danger:hover { background: var(--s01-danger-soft); border-color: var(--s01-danger); }
.s01-icon-action.is-success { color: var(--s01-success); }
.s01-icon-action.is-success:hover { background: var(--s01-success-soft); border-color: var(--s01-success); }
.s01-compact-view { display: none; }

.s01-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; color: var(--s01-muted); }
.s01-pagination > span:not(.s01-button) strong { color: var(--s01-ink); }
.s01-empty-state { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 36px; border: 1px dashed var(--s01-control); border-radius: 16px; background: var(--s01-surface); text-align: center; }
.s01-empty-state > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--s01-info-soft); color: var(--s01-info); font-size: 24px; }
.s01-empty-state h3 { margin: 8px 0 0; color: var(--s01-ink); }
.s01-empty-state p { margin: 0; color: var(--s01-muted); }
.s01-empty-state > div { display: flex; gap: 8px; margin-top: 8px; }

.s01-dialog {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--s01-ink);
}

.s01-dialog::backdrop,
.product-mode-dialog::backdrop { background: rgb(1 4 9 / 72%); backdrop-filter: blur(4px); }
.s01-dialog-surface { position: relative; overflow: hidden; border: 1px solid var(--s01-border); border-radius: 16px; background: var(--s01-surface); box-shadow: 0 24px 80px rgb(1 4 9 / 60%); }
.s01-detail-surface { width: min(850px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.s01-dialog-close { position: absolute; z-index: 4; top: 14px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--s01-control); border-radius: 10px; background: rgb(22 31 42 / 92%); color: var(--s01-ink); }
.s01-dialog-close:hover { background: var(--s01-surface-raised); border-color: var(--s01-info); color: var(--s01-info); }

.s01-detail-hero { display: grid; grid-template-columns: 280px 1fr; min-height: 270px; }
.s01-detail-image { position: relative; min-height: 270px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, var(--s01-surface-soft), var(--s01-field)); }
.s01-detail-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s01-detail-image-empty { display: grid; justify-items: center; gap: 9px; color: var(--s01-muted); }
.s01-detail-image-empty b { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 24px; background: var(--s01-info-soft); color: var(--s01-info); font-size: 28px; }
.s01-detail-title { padding: 42px 42px 30px; }
.s01-chip-row--detail { margin: 0 44px 18px 0; }
.s01-detail-title h2 { margin: 0 44px 8px 0; color: var(--s01-ink); font-size: 34px; line-height: 1.08; letter-spacing: -.035em; }
.s01-detail-title > p:not(.s01-product-category) { margin: 0; color: var(--s01-muted); }
.s01-detail-title > small { color: var(--s01-muted); }
.s01-detail-price { margin-top: 22px; color: var(--s01-ink); font-size: 27px; font-weight: 900; }
.s01-detail-body { padding: 28px 34px 32px; border-top: 1px solid var(--s01-border); }
.s01-detail-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.s01-detail-metrics > div { min-width: 0; padding: 14px; border-radius: 11px; background: var(--s01-surface-soft); }
.s01-detail-metrics span,
.s01-detail-metrics strong,
.s01-detail-metrics small { display: block; }
.s01-detail-metrics span { color: var(--s01-muted); font-size: 11px; }
.s01-detail-metrics strong { margin-top: 4px; overflow-wrap: anywhere; color: var(--s01-ink); }
.s01-detail-metrics small { margin-top: 4px; color: var(--s01-muted); font-size: 10px; line-height: 1.35; }
.s01-detail-metrics .is-positive { color: var(--s01-success); }
.s01-detail-metrics .is-negative { color: var(--s01-danger); }
.s01-detail-suppliers,
.s01-detail-recipe { margin-top: 20px; padding: 16px; border: 1px solid var(--s01-border); border-radius: 12px; }
.s01-detail-suppliers > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.s01-detail-suppliers h3,
.s01-detail-recipe h3 { margin: 0; color: var(--s01-ink); font-size: 16px; }
.s01-detail-suppliers > div:first-child small { color: var(--s01-muted); }
.s01-supplier-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.s01-supplier-chip { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--s01-info); border-radius: 8px; background: var(--s01-info-soft); color: var(--s01-info); font-size: 12px; font-weight: 800; }
.s01-supplier-chip small { padding-left: 7px; border-left: 1px solid currentColor; color: inherit; font-size: 10px; }
.s01-supplier-chip.is-inactive { border-color: var(--s01-control); background: #21262d; color: #aeb6bf; }
.s01-detail-empty-note { display: flex; align-items: center; gap: 8px; margin: 11px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--s01-info-soft); color: var(--s01-info); }
.s01-detail-empty-note.is-warning { background: var(--s01-warning-soft); color: var(--s01-warning); }
.s01-detail-recipe ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.s01-detail-recipe li { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--s01-border); }
.s01-detail-recipe li:last-child { padding-bottom: 0; border-bottom: 0; }
.s01-detail-recipe li span,
.s01-detail-recipe > p { color: var(--s01-muted); font-size: 12px; }
.s01-detail-recipe > p { margin: 12px 0 0; }
.s01-detail-actions { justify-content: end; margin-top: 24px; }
.s01-detail-actions form { margin: 0; }
.s01-detail-state { min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 40px; text-align: center; }
.s01-detail-state strong { color: var(--s01-ink); font-size: 20px; }
.s01-detail-state small { max-width: 430px; color: var(--s01-muted); }
.s01-detail-state > div { display: flex; gap: 8px; margin-top: 8px; }
.s01-detail-state-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--s01-danger-soft); color: var(--s01-danger); font-size: 26px; }
.s01-detail-loader { width: 44px; height: 44px; border: 3px solid var(--s01-border); border-top-color: var(--s01-info); border-radius: 50%; animation: s01-spin 800ms linear infinite; }

.s01-confirm-surface { width: min(440px, calc(100vw - 32px)); padding: 28px; text-align: center; }
.s01-confirm-symbol { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 18px; background: var(--s01-danger-soft); color: var(--s01-danger); font-size: 27px; }
.s01-confirm-dialog[data-mode="activate"] .s01-confirm-symbol { background: var(--s01-success-soft); color: var(--s01-success); }
.s01-confirm-surface h2 { margin: 0 0 9px; color: var(--s01-ink); font-size: 25px; }
.s01-confirm-surface > p:not(.s01-kicker) { margin: 0; color: var(--s01-muted); }
.s01-confirm-impact { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0; padding: 12px; border-radius: 8px; background: var(--s01-danger-soft); color: var(--s01-danger); text-align: left; }
.s01-confirm-dialog[data-mode="activate"] .s01-confirm-impact { background: var(--s01-success-soft); color: var(--s01-success); }
.s01-confirm-actions { justify-content: center; }

/* Editor: estructura real del MVC con el lenguaje visual de Propuesta B. */
.s01-editor { display: grid; gap: 18px; }
.s01-editor .product-form-heading { align-items: end; margin: 0 0 4px; padding-bottom: 18px; border-bottom: 1px solid var(--s01-border); }
.s01-editor .product-form-heading h2 { margin: 9px 0 5px; color: var(--s01-ink); font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.s01-editor .product-form-heading p { max-width: 680px; color: var(--s01-muted); }
.s01-editor .back-link { color: var(--s01-info); font-weight: 800; text-decoration: none; }
.s01-form-alert { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid; border-radius: 9px; }
.s01-form-alert i { margin-top: 1px; font-size: 18px; }
.s01-form-alert strong,
.s01-form-alert span { display: block; }
.s01-form-alert span { margin-top: 2px; font-size: 13px; }
.s01-form-alert--danger { background: var(--s01-danger-soft); border-color: var(--s01-danger); color: var(--s01-danger); }

.s01-editor .product-form-layout { align-items: start; gap: 18px; grid-template-columns: minmax(0, 1fr) 300px; }
.s01-editor .product-form-main,
.s01-editor .product-form-side { gap: 18px; }
.s01-editor .product-form-side { top: 18px; }
.s01-editor .panel { margin: 0; border: 1px solid var(--s01-border); border-radius: 14px; background: var(--s01-surface); box-shadow: var(--s01-shadow-low); color: var(--s01-ink); }
.s01-editor .product-form-panel { padding: 20px; }
.s01-editor .panel-section-title { align-items: flex-start; margin-bottom: 18px; }
.s01-editor .panel-section-title h3 { margin: 3px 0 0; color: var(--s01-ink); font-size: 19px; }
.s01-editor .panel-section-hint { color: var(--s01-muted); font-size: 11px; }
.s01-editor .eyebrow { color: var(--s01-info); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.s01-editor .compact-product-fields { gap: 14px; }
.s01-editor .presentation-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.s01-editor .form-field { min-width: 0; }
.s01-editor .form-label { color: var(--s01-muted); font-size: 12px; font-weight: 800; }
.s01-editor .form-control,
.s01-editor .form-select,
.s01-editor input,
.s01-editor select,
.s01-editor textarea { border-color: var(--s01-control); background-color: var(--s01-field); color: var(--s01-ink); }
.s01-editor .form-control:focus,
.s01-editor .form-select:focus,
.s01-editor input:focus,
.s01-editor select:focus,
.s01-editor textarea:focus { border-color: var(--s01-info); box-shadow: 0 0 0 3px rgb(88 166 255 / 32%); }
.s01-editor .form-field small,
.s01-editor .form-field small a { color: var(--s01-muted); }
.s01-editor .form-field small a { color: var(--s01-info); }
.s01-editor .money-input > span { border-color: var(--s01-control); background: var(--s01-surface-soft); color: var(--s01-muted); }

.s01-editor .supplier-combobox summary { min-height: 42px; border-color: var(--s01-control); background: var(--s01-field); color: var(--s01-ink); }
.s01-editor .supplier-combobox[open] summary { border-color: var(--s01-info); box-shadow: 0 0 0 3px rgb(88 166 255 / 32%); }
.s01-editor .supplier-combobox-menu { border-color: var(--s01-control); background: var(--s01-surface-raised); box-shadow: var(--s01-shadow-raised); }
.s01-editor .supplier-combobox-option { color: var(--s01-ink); }
.s01-editor .supplier-combobox-option small { color: var(--s01-muted); }
.s01-editor .supplier-combobox-option:hover,
.s01-editor .supplier-combobox-option:has(input:checked) { background: var(--s01-info-soft); }
.s01-editor .inactive-supplier-note { background: var(--s01-warning-soft); border-color: var(--s01-warning); color: var(--s01-warning); }
.s01-editor .supplier-combobox-empty { background: var(--s01-warning-soft); border-color: var(--s01-warning); color: var(--s01-warning); }

.s01-editor .product-switch-list { border-color: var(--s01-border); border-radius: 12px; }
.s01-editor .product-switch-row { position: relative; min-height: 70px; border-color: var(--s01-border); background: var(--s01-surface); }
.s01-editor .product-switch-row:hover { background: var(--s01-surface-soft); }
.s01-editor .product-switch-row b { color: var(--s01-ink); }
.s01-editor .product-switch-row small { color: var(--s01-muted); }
.s01-editor .product-switch-row.is-locked { background: var(--s01-surface-soft); }
.s01-editor .product-switch-row.is-locked > span:nth-child(2)::after { content: attr(data-locked-copy); display: block; margin-top: 4px; color: var(--s01-info); font-size: 10px; font-weight: 800; }
.s01-editor .switch-icon { border: 1px solid var(--s01-border); background: var(--s01-surface-soft); }
.s01-editor .switch-icon.base { color: var(--s01-info); }
.s01-editor .switch-icon.prepared { color: var(--s01-prepared); }
.s01-editor .product-switch-row .form-check-input { background: var(--s01-control); }
.s01-editor .product-switch-row .form-check-input:checked { background: var(--s01-primary); }
.s01-editor .product-switch-row .form-check-input:focus { box-shadow: 0 0 0 3px rgb(88 166 255 / 32%); }

.s01-editor .commercial-fields { border-top-color: var(--s01-border); }
.s01-editor .yield-inline { border-color: var(--s01-info); background: var(--s01-info-soft); color: var(--s01-info); }
.s01-editor .yield-inline small,
.s01-editor .yield-inline label span { color: var(--s01-muted); }
.s01-editor .recipe-compact-help { border-color: var(--s01-info); background: var(--s01-info-soft); color: var(--s01-info); }
.s01-editor .recipe-head { color: var(--s01-muted); }
.s01-editor .recipe-row { border-color: var(--s01-border); }
.s01-editor .recipe-warning { border-color: var(--s01-warning); background: var(--s01-warning-soft); color: var(--s01-warning); }

.s01-editor .s01-photo-panel { padding: 15px; }
.s01-editor .compact-photo-preview { aspect-ratio: 4 / 3; min-height: 0; border-color: var(--s01-border); background: linear-gradient(145deg, var(--s01-surface-soft), var(--s01-field)); color: var(--s01-muted); }
.s01-editor .compact-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.s01-editor .compact-photo-panel h3 { color: var(--s01-ink); }
.s01-editor .compact-photo-panel p,
.s01-editor .compact-photo-panel > small { color: var(--s01-muted); }

.s01-editor .s01-live-preview { padding: 17px; }
.s01-editor .s01-live-preview header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s01-editor .s01-live-preview > p { margin: 16px 0 4px; color: var(--s01-info); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.s01-editor .s01-live-preview h3 { margin: 0; overflow-wrap: anywhere; color: var(--s01-ink); font-size: 20px; }
.s01-editor .s01-live-preview > span:not(.s01-status) { display: block; margin-top: 5px; color: var(--s01-muted); font-size: 12px; }
.s01-editor .s01-live-preview dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.s01-editor .s01-live-preview dl > div { padding: 10px; border-radius: 8px; background: var(--s01-surface-soft); }
.s01-editor .s01-live-preview dt { color: var(--s01-muted); font-size: 10px; }
.s01-editor .s01-live-preview dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--s01-ink); font-size: 12px; font-weight: 900; }

.s01-editor .product-form-footer { position: sticky; z-index: 20; bottom: 0; margin-top: 0; padding: 14px 0 2px; border-top-color: var(--s01-border); background: linear-gradient(to bottom, rgb(15 23 32 / 30%), var(--s01-page) 26%); }
.s01-editor .product-form-footer > span { color: var(--s01-muted); }

.product-mode-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 26px;
  border: 1px solid var(--s01-border);
  border-radius: 16px;
  background: var(--s01-surface);
  color: var(--s01-ink);
  box-shadow: 0 24px 80px rgb(1 4 9 / 60%);
}
.product-mode-dialog h3 { color: var(--s01-ink); }
.product-mode-dialog p { color: var(--s01-muted); }
.product-mode-dialog .mode-dialog-icon { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto; border-radius: 18px; background: var(--s01-warning-soft); color: var(--s01-warning); font-size: 26px; }
.product-mode-dialog .mode-dialog-icon.is-success { background: var(--s01-success-soft); color: var(--s01-success); }
.product-mode-dialog > div:last-child { flex-wrap: wrap; }

@media (max-width: 1320px) {
  .s01-catalog-toolbar { grid-template-columns: minmax(230px, 1fr) repeat(2, minmax(150px, .55fr)) auto; }
  .s01-view-switch { justify-self: end; }
}

@media (max-width: 1180px) {
  .s01-cards-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s01-editor .product-form-layout { grid-template-columns: 1fr; }
  .s01-editor .product-form-side { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
}

@media (max-width: 900px) {
  .s01-catalog-toolbar { grid-template-columns: 1fr 1fr; }
  .s01-search-field { grid-column: 1 / -1; }
  .s01-filter-submit { grid-column: auto; }
  .s01-view-switch { grid-column: auto; grid-row: auto; justify-self: stretch; }
  .s01-view-switch button { flex: 1; justify-content: center; }
  .s01-editor .presentation-fields,
  .s01-editor .compact-product-fields { grid-template-columns: 1fr 1fr; }
  .s01-editor .supplier-combobox-field,
  .s01-editor .compact-product-fields .full-span { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body.products-shell .content { padding-left: 16px; padding-right: 16px; }
  .s01-page-head { align-items: stretch; flex-direction: column; gap: 18px; }
  .s01-page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .s01-page-head h2 { font-size: 34px; }
  .s01-catalog-toolbar { grid-template-columns: 1fr; padding: 12px; }
  .s01-search-field { grid-column: auto; }
  .s01-view-switch { display: none; }
  .s01-filter-submit { width: 100%; }
  .s01-catalog-summary { align-items: flex-start; flex-direction: column; }
  .s01-cards-view,
  .s01-table-view { display: none !important; }
  .s01-compact-view { display: grid; gap: 8px; }
  .s01-compact-product { overflow: hidden; border: 1px solid var(--s01-border); border-radius: 12px; background: var(--s01-surface); }
  .s01-compact-product summary { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding: 11px; cursor: pointer; list-style: none; }
  .s01-compact-product summary::-webkit-details-marker { display: none; }
  .s01-compact-name,
  .s01-compact-price { min-width: 0; }
  .s01-compact-name strong,
  .s01-compact-name small,
  .s01-compact-price strong,
  .s01-compact-price small { display: block; }
  .s01-compact-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--s01-ink); }
  .s01-compact-name small,
  .s01-compact-price small { margin-top: 3px; color: var(--s01-muted); font-size: 10px; }
  .s01-compact-price { text-align: right; }
  .s01-compact-price strong { color: var(--s01-ink); }
  .s01-compact-product[open] summary > i { transform: rotate(180deg); }
  .s01-compact-body { padding: 0 11px 12px; border-top: 1px solid var(--s01-border); }
  .s01-product-actions { grid-template-columns: 1fr; }
  .s01-pagination { gap: 8px; }
  .s01-pagination .s01-button { min-width: 44px; padding: 0 11px; font-size: 0; }
  .s01-pagination .s01-button i { font-size: 14px; }
  .s01-detail-hero { display: block; }
  .s01-detail-image { min-height: 220px; max-height: 260px; }
  .s01-detail-title { padding: 28px 22px 24px; }
  .s01-detail-title h2 { font-size: 29px; }
  .s01-detail-body { padding: 22px; }
  .s01-detail-metrics { grid-template-columns: 1fr 1fr; }
  .s01-detail-recipe li { align-items: flex-start; flex-direction: column; gap: 3px; }
  .s01-detail-actions,
  .s01-detail-actions form,
  .s01-detail-actions .s01-button { width: 100%; }
  .s01-detail-actions { display: grid; }
  .s01-detail-state > div { display: grid; width: 100%; }
  .s01-editor .product-form-heading,
  .s01-editor .product-form-footer { align-items: stretch; flex-direction: column; }
  .s01-editor .product-form-heading > .s01-button { width: 100%; }
  .s01-editor .presentation-fields,
  .s01-editor .compact-product-fields,
  .s01-editor .product-form-side { grid-template-columns: 1fr; }
  .s01-editor .supplier-combobox-field,
  .s01-editor .compact-product-fields .full-span { grid-column: auto; }
  .s01-editor .product-switch-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 10px; }
  .s01-editor .recipe-head { display: none; }
  .s01-editor .recipe-row { grid-template-columns: minmax(0, 1fr) 90px 40px; }
  .s01-editor .product-form-footer > div { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .s01-editor .product-form-footer .s01-button { width: 100%; }
  .s01-confirm-actions { display: grid; }
  .s01-confirm-actions .s01-button { width: 100%; }
}

@media (max-width: 430px) {
  .s01-page-actions { grid-template-columns: 1fr; }
  .s01-empty-state { padding: 28px 16px; }
  .s01-empty-state > div { display: grid; width: 100%; }
  .s01-empty-state .s01-button { width: 100%; }
  .s01-detail-metrics { grid-template-columns: 1fr; }
  .s01-editor .recipe-row { grid-template-columns: minmax(0, 1fr) 72px 38px; gap: 6px; }
  .s01-editor .product-form-footer > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .s01-products *,
  .s01-dialog *,
  .product-mode-dialog * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

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

.supplier-combobox-field {
  grid-column: 2;
  min-width: 0;
}

.supplier-combobox {
  position: relative;
}

.supplier-combobox summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  list-style: none;
  min-height: 38px;
  overflow: hidden;
  padding-right: 38px;
}

.supplier-combobox summary::-webkit-details-marker {
  display: none;
}

.supplier-combobox summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-combobox[open] summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .16);
}

.supplier-combobox-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(16, 32, 51, .16);
  display: grid;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.supplier-combobox-option {
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  margin: 0;
  min-height: 48px;
  padding: 7px 9px;
}

.supplier-combobox-option:hover,
.supplier-combobox-option:has(input:checked) {
  background: var(--accent-soft);
}

.supplier-combobox-option:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.supplier-combobox-option .form-check-input {
  accent-color: var(--accent);
  height: 18px;
  margin: 0;
  width: 18px;
}

.supplier-combobox-option span,
.supplier-combobox-option strong,
.supplier-combobox-option small {
  display: block;
  min-width: 0;
}

.supplier-combobox-option strong {
  color: var(--ink);
  font-size: 12px;
}

.supplier-combobox-option small {
  color: var(--muted);
  margin-top: 2px;
}

.supplier-combobox-empty {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
}

.inactive-supplier-note {
  background: var(--paper);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 2px;
  margin-top: 12px;
  padding: 10px 12px;
}

.product-detail-suppliers {
  display: grid;
  gap: 8px;
}

.product-detail-suppliers article {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.product-detail-suppliers article > i {
  color: var(--accent);
  font-size: 18px;
}

.product-detail-suppliers strong,
.product-detail-suppliers small {
  display: block;
}

.product-detail-suppliers small {
  color: var(--muted);
  margin-top: 2px;
}

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

@media (max-width: 575px) {
  .presentation-fields {
    grid-template-columns: 1fr;
  }

  .product-detail-suppliers article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .product-detail-suppliers .status-badge {
    grid-column: 2;
    justify-self: start;
  }
}

body {
  background:
    linear-gradient(90deg, rgba(16, 32, 51, .035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 32, 51, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: #1f2937;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

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

.sidebar {
  background: linear-gradient(180deg, #0c1f2d 0%, #07131d 100%);
  color: white;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.brand-mark small,
td small {
  display: block;
  color: #8d99ae;
}

.brand-dot {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  box-shadow: inset -8px -8px 0 rgba(0,0,0,.18);
}

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

.sidebar a {
  color: #dbe4ea;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(15, 118, 110, .22);
  border-color: rgba(94, 234, 212, .24);
  color: white;
}

.content {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.topbar h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.date-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
}

.panel,
.metric,
.login-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel-head,
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel h2 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
  border-left: 5px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border: 14px solid rgba(15, 118, 110, .08);
  border-radius: 50%;
}

.metric.warning {
  border-left-color: var(--accent-2);
}

.metric span {
  color: var(--muted);
  display: block;
}

.metric strong {
  color: var(--ink);
  font-size: 30px;
}

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

.filter-row .form-control,
.filter-row .form-select {
  width: 190px;
}

.product-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.product-list-head .filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(145px, .8fr) minmax(130px, .72fr) auto 48px;
  align-items: center;
}

.product-list-head .filter-row .form-control,
.product-list-head .filter-row .form-select {
  width: 100%;
}

.product-list-head .btn-primary {
  white-space: nowrap;
}

.product-table td:last-child {
  min-width: 132px;
  white-space: nowrap;
}

.product-table td:last-child .btn,
.product-table td:last-child form {
  display: inline-flex;
  vertical-align: middle;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table tbody tr {
  border-color: var(--line);
}

.table tbody tr:hover {
  background: #f8fbfd;
}

.btn {
  border-radius: 7px;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .16);
}

.detail-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.detail-head,
.detail-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 48px;
  gap: 8px;
  padding: 10px;
  align-items: center;
}

.detail-head {
  background: #e7eef4;
  color: #5f6368;
  font-size: 12px;
  text-transform: uppercase;
}

.detail-row + .detail-row {
  border-top: 1px solid var(--line);
}

.login-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px),
    #0e171d;
  background-size: 46px 46px;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 440px;
  align-items: center;
  gap: 54px;
  padding: clamp(24px, 5vw, 70px);
  position: relative;
  overflow: hidden;
}

.pam-login::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  pointer-events: none;
}

.login-copy {
  color: white;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.login-copy h1 {
  font-size: clamp(52px, 8vw, 112px);
  line-height: .86;
  font-weight: 900;
  margin: 18px 0 22px;
  letter-spacing: 0;
}

.eyebrow {
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-card-wrap {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.login-card {
  min-width: 0;
  padding: 30px;
  background: #fffdf8;
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
}

.login-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.login-card-head h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.login-card-head > div {
  min-width: 0;
}

.login-card-head p {
  margin: 0;
  color: #69727d;
  overflow-wrap: anywhere;
}

.login-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #101820;
  color: #5eead4;
  font-size: 24px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #69727d;
}

.input-with-icon .form-control {
  padding-left: 40px;
  min-height: 48px;
}

.detail-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  background: #14213d;
  color: white;
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 16px 30px rgba(20, 33, 61, .16);
}

.detail-hero h2 {
  margin: 4px 0;
  font-size: 28px;
  font-weight: 900;
}

.detail-hero p {
  margin: 0;
  color: #dbe4ea;
}

.eyebrow-dark {
  color: #f59e0b;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 800;
}

.detail-total {
  min-width: 220px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: center;
  text-align: right;
}

.detail-total span {
  color: #dbe4ea;
}

.detail-total strong {
  font-size: 30px;
}

.product-finder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fafc;
  margin-bottom: 16px;
  overflow: hidden;
}

.badge.text-bg-danger {
  background: #b42318 !important;
}

.row-highlight {
  animation: rowPulse .8s ease;
}

.price-locked {
  background: #edf2f5 !important;
  color: #334155;
  font-weight: 800;
  cursor: not-allowed;
}

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

.product-form-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-photo-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.product-photo-preview {
  aspect-ratio: 1;
  border: 1px dashed #9fb2c3;
  background: #f7fafc;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
}

.product-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-photo-preview i {
  font-size: 46px;
  color: var(--accent);
}

.product-photo-preview span {
  display: block;
  font-weight: 700;
}

.product-photo-action {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
}

.product-form-panel {
  margin-bottom: 0;
}

.product-form-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.product-form-head h2 {
  margin: 4px 0;
  font-size: 24px;
}

.product-form-head p {
  margin: 0;
  color: var(--muted);
}

.product-status-chip,
.barcode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #f8fbfd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 18px;
}

.field-span-3 { grid-column: span 3; }
.field-span-4 { grid-column: span 4; }
.field-span-6 { grid-column: span 6; }
.field-span-8 { grid-column: span 8; }

.input-with-action {
  position: relative;
}

.input-with-action i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  z-index: 2;
}

.input-with-action .form-control {
  padding-left: 40px;
}

.category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.category-chip {
  border: 1px solid var(--line);
  background: #f8fbfd;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.category-chip:hover,
.category-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--accent);
  flex: 0 0 auto;
}

.product-thumb-upload {
  cursor: pointer;
  margin: 0;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.product-thumb-upload:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 118, 110, .14);
  transform: translateY(-1px);
}

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

.product-thumb i {
  font-size: 24px;
}

.product-thumb.image-ready {
  border-color: var(--accent);
}

.product-table td small {
  margin-top: 2px;
}

@keyframes rowPulse {
  0% { background: #d1fae5; }
  100% { background: transparent; }
}

@media (max-width: 900px) {
  .app-frame,
  .login-panel,
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .detail-head {
    display: none;
  }
  .detail-row {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    flex-direction: column;
  }
  .detail-total {
    text-align: left;
  }
  .product-form-shell,
  .product-form-grid {
    grid-template-columns: 1fr;
  }
  .field-span-3,
  .field-span-4,
  .field-span-6,
  .field-span-8 {
    grid-column: span 1;
  }
  .product-photo-panel {
    position: static;
  }
}

@media print {
  .sidebar,
  .topbar,
  .no-print,
  .alert {
    display: none !important;
  }
  .app-frame {
    display: block;
  }
  .content {
    padding: 0;
  }
}

.supplier-editor,
.supplier-form{
  min-width: 0;
}

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

.supplier-form-head h2{
  margin: 3px 0;
  font-size: 24px;
  font-weight: 900;
}

.supplier-form-head p{
  margin: 0;
  color: var(--muted);
}

.supplier-status-chip{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: #f8fbfd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-type-control{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.supplier-type-option{
  position: relative;
  margin: 0;
  cursor: pointer;
}

.supplier-type-option input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.supplier-type-option > span{
  min-height: 82px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #f8fbfd;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.supplier-type-option i{
  grid-row: 1 / 3;
  align-self: center;
  font-size: 23px;
  color: var(--muted);
}

.supplier-type-option b,
.supplier-type-option small{
  display: block;
}

.supplier-type-option small{
  color: var(--muted);
}

.supplier-type-option input:checked + span{
  border-color: var(--accent);
  background: #eef9f7;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .09);
}

.supplier-type-option input:checked + span i{
  color: var(--accent);
}

.supplier-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 18px;
}

.form-field {
  display: block;
  min-width: 0;
}

.form-label small {
  color: var(--muted);
  font-weight: 500;
}

.supplier-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

.filter-field > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-upload {
  min-height: 68px;
  padding: 10px;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
}

.auth-link-row.centered {
  justify-content: center;
  margin-top: 18px;
}

.auth-link-row a {
  color: #0a756e;
  text-decoration: none;
}

.auth-link-row a:hover {
  text-decoration: underline;
}

.auth-task-panel .login-copy h1 {
  max-width: 760px;
  font-size: clamp(48px, 7vw, 96px);
  line-height: .92;
}

.auth-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.auth-result-card {
  text-align: center;
}

.auth-result-card .login-icon {
  margin: 0 auto 18px;
}

.auth-result-card h2 {
  margin-bottom: 12px;
  font-weight: 900;
}

.auth-result-card p {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.6;
}

.activation-note {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #a7d8ce;
  border-radius: 8px;
  padding: 9px 12px;
  background: #edf9f6;
  color: #0b615a;
}

.activation-note > i {
  font-size: 20px;
}

.activation-note strong,
.activation-note small {
  display: block;
}

.activation-note small {
  color: #53716e;
}

@media (max-width: 760px) {
  .supplier-form-head{
    flex-direction: column;
  }
  .supplier-type-control,
  .supplier-form-grid {
    grid-template-columns: 1fr;
  }
  .field-span-3,
  .field-span-4,
  .field-span-6 {
    grid-column: span 1;
  }
}

.eyebrow {
  color: var(--accent);
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.section-title-row {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-row h2 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.empty-state {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 180px;
  padding: 28px;
  text-align: center;
}

.empty-state i {
  color: var(--accent);
  font-size: 38px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

@keyframes dispatchSpin { to { transform: rotate(360deg); } }

@keyframes serviceBell {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-8deg); }
  82% { transform: rotate(8deg); }
  88% { transform: rotate(-4deg); }
}

@keyframes serviceSpin { to { transform: rotate(360deg); } }

.admin-hero,
.editor-heading{
  background: #0d292b;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(9, 35, 38, .16);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.admin-hero::after,
.editor-heading::after{
  border: 30px solid rgba(255,255,255,.035);
  border-radius: 50%;
  content: "";
  height: 230px;
  position: absolute;
  right: -80px;
  top: -105px;
  width: 230px;
}

.admin-hero > *,
.editor-heading > *{ position: relative; z-index: 1; }
.admin-hero h2,
.editor-heading h2{ color: #fff; font-size: clamp(28px, 3vw, 38px); font-weight: 900; letter-spacing: 0; margin: 4px 0 6px; }
.admin-hero p,
.editor-heading p{ color: #bfd0ce; margin: 0; max-width: 700px; }
.admin-hero .eyebrow,
.editor-heading .eyebrow{ color: #75d8cc; }
.hero-actions,
.editor-heading-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.back-link { align-items: center; color: var(--accent-dark); display: inline-flex; font-size: 13px; font-weight: 800; gap: 7px; margin-bottom: 16px; text-decoration: none; }
.back-link.light { color: #cbe2de; }
.back-link:hover { text-decoration: underline; }
.save-state,
.soft-chip { align-items: center; background: #eef8f6; border: 1px solid #c8e5df; border-radius: 999px; color: #0b5f57; display: inline-flex; font-size: 12px; font-weight: 800; gap: 7px; padding: 8px 11px; }
.editor-heading .save-state { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #d9f2ee; }

.catalog-filter{ align-items: end; display: flex; flex-wrap: wrap; gap: 10px; }
.search-control { display: block; min-width: 260px; position: relative; }
.search-control > i { color: #6b7c85; left: 14px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.search-control input { background: #f8fbfa; border: 1px solid var(--line); border-radius: 11px; min-height: 46px; padding: 10px 14px 10px 42px; width: 100%; }
.search-control input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,118,110,.1); outline: 0; }
.directory-toolbar { align-items: center; border-bottom: 1px solid #e4ebe9; display: flex; gap: 16px; justify-content: space-between; margin: -2px -2px 22px; padding: 0 2px 18px; }
.directory-count { color: var(--muted); font-size: 13px; font-weight: 800; white-space: nowrap; }
.directory-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; justify-content: center; min-height: 260px; text-align: center; }
.directory-empty i { color: #84a39e; font-size: 42px; }
.directory-empty strong { color: var(--ink); font-size: 19px; }

.category-directory,
.product-catalog-panel{ border-radius: 16px; }
.category-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-card { align-items: start; background: #fbfdfc; border: 1px solid #dce6e3; border-radius: 15px; display: grid; gap: 14px; grid-template-columns: 48px minmax(0, 1fr); padding: 18px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.category-card:hover { border-color: #8ebcb5; box-shadow: 0 15px 28px rgba(15,63,59,.09); transform: translateY(-2px); }
.category-card.is-inactive { background: #f5f6f6; opacity: .78; }
.category-card-icon { background: #dff3ef; border-radius: 13px; color: #0d7067; display: grid; font-size: 21px; height: 48px; place-items: center; width: 48px; }
.category-card-title { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.category-card h3 { color: var(--ink); font-size: 18px; font-weight: 900; margin: 0; }
.category-card p { color: var(--muted); margin: 8px 0 10px; min-height: 42px; }
.category-card-copy > strong { color: #51656b; font-size: 12px; }
.category-card-actions { align-items: center; display: flex; gap: 8px; grid-column: 2; }
.category-card-actions form { margin: 0; }
.status-pill { border-radius: 999px; font-size: 10px; font-weight: 900; padding: 5px 8px; text-transform: uppercase; }
.status-pill.active { background: #dcf6e9; color: #147447; }
.status-pill.inactive { background: #e5e7eb; color: #5f6874; }

.compact-form-shell { align-items: start; display: grid; gap: 38px; grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.25fr); margin: 30px auto; max-width: 1050px; }
.compact-form-copy { padding: 24px 8px; }
.compact-form-copy h2 { color: var(--ink); font-size: 34px; font-weight: 900; margin: 5px 0 10px; }
.compact-form-copy p { color: var(--muted); font-size: 16px; }
.form-guidance { align-items: start; background: #e8f5f2; border: 1px solid #cce5df; border-radius: 13px; color: #245d58; display: flex; gap: 10px; margin-top: 24px; padding: 14px; }
.compact-form-card { display: grid; gap: 20px; padding: 28px; }
.form-field { display: grid; gap: 7px; }
.form-field small { color: var(--muted); }
.form-label { color: #26383e; font-weight: 800; }

.product-catalog-filter { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, .65fr)) auto; }
.catalog-summary { align-items: center; color: var(--muted); display: flex; font-size: 13px; justify-content: space-between; margin: 18px 0; }
.catalog-summary a { color: var(--accent); font-weight: 800; }
.product-admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-admin-card { background: #fff; border: 1px solid #dbe5e2; border-radius: 16px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.product-admin-card:hover { box-shadow: 0 18px 36px rgba(17,54,56,.12); transform: translateY(-3px); }
.product-admin-card.is-inactive { filter: grayscale(.35); opacity: .72; }
.product-admin-image { background: #eaf4f1; height: 150px; overflow: hidden; position: relative; }
.product-admin-image img { height: 100%; object-fit: cover; width: 100%; }
.product-admin-image > span { color: #4f8c84; display: grid; font-size: 46px; height: 100%; place-items: center; }
.status-dot { border: 3px solid #fff; border-radius: 50%; bottom: 12px; height: 15px; position: absolute; right: 12px; width: 15px; }
.status-dot.active { background: #18a568; }
.status-dot.inactive { background: #8c959d; }
.product-admin-body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.product-admin-heading { align-items: start; display: flex; gap: 10px; justify-content: space-between; }
.product-admin-heading small { color: #0e756b; font-size: 10px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
.product-admin-heading h3 { color: var(--ink); font-size: 19px; font-weight: 900; margin: 2px 0 0; }
.product-admin-heading > strong { color: #0c6159; font-size: 18px; }
.product-admin-body > p { color: var(--muted); font-size: 13px; margin: 12px 0; min-height: 40px; }
.product-type-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.product-type-pills span { background: #edf1f3; border-radius: 999px; color: #56656e; font-size: 10px; font-weight: 800; padding: 5px 7px; }
.product-type-pills .base { background: #e5f1fb; color: #23618a; }
.product-type-pills .prepared { background: #fff0d9; color: #9a5910; }
.product-stock-strip { border-top: 1px solid #e8edec; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin-top: auto; padding-top: 14px; }
.product-stock-strip span { min-width: 0; }
.product-stock-strip small,
.product-stock-strip b { display: block; }
.product-stock-strip small { color: #7b888e; font-size: 9px; line-height: 1.2; text-transform: uppercase; }
.product-stock-strip b { color: #26383e; font-size: 12px; margin-top: 3px; }
.product-admin-actions { align-items: center; background: #f8faf9; border-top: 1px solid #e7edeb; display: flex; gap: 8px; justify-content: space-between; padding: 11px 15px; }
.product-admin-actions form { margin: 0; }
.catalog-pagination { align-items: center; display: flex; gap: 16px; justify-content: center; margin-top: 22px; }

/* Compact product catalog and editor. These classes deliberately replace the card-heavy catalog. */
.catalog-page-head { align-items: end; display: flex; gap: 20px; justify-content: space-between; margin: 2px 0 18px; }
.catalog-page-head h2 { color: #132f32; font-size: clamp(28px, 3vw, 36px); letter-spacing: 0; margin: 3px 0 5px; }
.catalog-page-head p { color: #64777a; margin: 0; max-width: 620px; }
.catalog-page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.product-table-panel { margin: 0; padding: 16px; }
.product-table-filter { display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(140px, .62fr)) auto; }
.product-table-filter .btn { align-items: center; display: inline-flex; gap: 7px; justify-content: center; }
.catalog-finance-note { color: #637275; font-size: 12px; margin-left: auto; }
.catalog-finance-note i { color: #0d756b; margin-right: 5px; }
.product-table-wrap { border: 1px solid #dce6e4; border-radius: 12px; overflow: auto; }
.product-table { border-collapse: collapse; min-width: 1120px; width: 100%; }
.product-table th { background: #f3f7f6; border-bottom: 1px solid #dce6e4; color: #5e7073; font-size: 11px; font-weight: 800; letter-spacing: .035em; padding: 11px 12px; text-transform: uppercase; white-space: nowrap; }
.product-table td { border-bottom: 1px solid #e7eeec; color: #21383a; font-size: 13px; padding: 10px 12px; vertical-align: middle; }
.product-table tbody tr:last-child td { border-bottom: 0; }
.product-table tbody tr:hover { background: #fbfdfc; }
.product-table tbody tr.is-inactive { background: #fbfbfb; opacity: .72; }
.product-table-identity { align-items: center; display: flex; gap: 11px; max-width: 290px; min-width: 220px; }
.product-table-image { align-items: center; background: #e9f4f1; border: 1px solid #d6e8e3; border-radius: 9px; color: #237e73; display: flex; flex: 0 0 46px; height: 46px; justify-content: center; overflow: hidden; width: 46px; }
.product-table-image img { height: 100%; object-fit: cover; width: 100%; }
.product-table-image i { font-size: 20px; }
.product-table-identity strong { color: #142f31; display: block; font-size: 14px; line-height: 1.22; }
.product-table-identity small { color: #78888a; display: -webkit-box; font-size: 11px; line-height: 1.25; margin-top: 3px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.table-category { color: #4e6265; font-size: 12px; font-weight: 700; }
.table-usage { display: flex; flex-wrap: wrap; gap: 4px; min-width: 92px; }
.table-usage span { border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; padding: 5px 7px; white-space: nowrap; }
.usage-sale { background: #e3f4eb; color: #08744c; }
.usage-base { background: #e7f0fb; color: #27639a; }
.usage-prepared { background: #f4ebfb; color: #7848a3; }
.table-money { white-space: nowrap; }
.table-money > strong { color: #173537; }
.table-money small { color: #758688; display: block; font-size: 10px; margin-top: 2px; } .muted-dash { color: #879597; font-size: 12px; }
.status-badge { border-radius: 999px; display: inline-block; font-size: 10px; font-weight: 800; padding: 5px 8px; }
.status-badge.is-active { background: #dff3e7; color: #08744c; }
.status-badge.is-inactive { background: #eceff0; color: #617174; }
.table-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-row-actions form { margin: 0; }
.icon-action { align-items: center; background: #fff; border: 1px solid #cbd9d7; border-radius: 8px; color: #176f66; display: inline-flex; font-size: 15px; height: 32px; justify-content: center; text-decoration: none; width: 32px; }
.icon-action:hover { background: #edf8f5; border-color: #5ba99d; color: #075e56; }
.icon-action.is-danger { color: #bb3838; }
.icon-action.is-danger:hover { background: #fff2f2; border-color: #e6a0a0; color: #9e2626; }
.icon-action.is-success { color: #08744c; }

.product-form-page { margin-bottom: 18px; }
.product-form-heading { align-items: center; display: flex; justify-content: space-between; margin: 2px 0 18px; }
.product-form-heading h2 { color: #143134; font-size: 29px; letter-spacing: 0; margin: 8px 0 3px; }
.product-form-heading p { color: #66787b; margin: 0; }
.product-form-layout { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 270px; }
.product-form-main { display: grid; gap: 16px; }
.product-form-side { display: grid; gap: 16px; position: sticky; top: 18px; }
.product-form-panel { margin: 0; padding: 20px; }
.panel-section-title { align-items: start; border-bottom: 1px solid #e6ecea; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 17px; padding-bottom: 13px; }
.panel-section-title h3 { color: #173437; font-size: 18px; margin: 3px 0 0; }
.panel-section-hint { color: #7a898c; font-size: 11px; padding-top: 5px; text-align: right; }
.compact-product-fields { display: grid; gap: 14px; grid-template-columns: 1.25fr .75fr; }
.compact-product-fields .full-span, .product-name-field { grid-column: auto; }
.compact-product-fields .full-span { grid-column: 1 / -1; }
.compact-product-fields small { color: #728386; display: block; font-size: 11px; margin-top: 5px; }
.commercial-fields { border-top: 1px solid #e7eeec; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; padding-top: 18px; }
.product-switch-list { border: 1px solid #deebe7; border-radius: 12px; overflow: hidden; }
.product-switch-row { align-items: center; background: #fff; border-bottom: 1px solid #e8efed; cursor: pointer; display: grid; gap: 12px; grid-template-columns: 38px 1fr auto; margin: 0; min-height: 67px; padding: 10px 13px; }
.product-switch-row:last-child { border-bottom: 0; }
.product-switch-row:hover { background: #fbfdfc; }
.product-switch-row.is-priority { background: #fbfdfd; }
.product-switch-row b { color: #203b3e; display: block; font-size: 13px; }
.product-switch-row small { color: #718386; display: block; font-size: 11px; line-height: 1.35; margin-top: 2px; }
.switch-icon { align-items: center; border-radius: 9px; display: flex; font-size: 17px; height: 34px; justify-content: center; width: 34px; }
.switch-icon.base { background: #e6f4f9; color: #23809a; }
.switch-icon.prepared { background: #f3eafb; color: #7650a0; }
.product-switch-row .form-check-input { appearance: none; background: #cbd8d5; border: 0; border-radius: 999px; cursor: pointer; height: 22px; margin: 0; position: relative; transition: background .18s ease; width: 40px; }
.product-switch-row .form-check-input::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); content: ''; height: 16px; left: 3px; position: absolute; top: 3px; transition: transform .18s ease; width: 16px; }
.product-switch-row .form-check-input:checked { background: #10867a; }
.product-switch-row .form-check-input:checked::after { transform: translateX(18px); }
.product-switch-row .form-check-input:disabled { cursor: not-allowed; opacity: .72; }
.yield-inline { align-items: center; background: #eff9f7; border: 1px solid #cde6e0; border-radius: 11px; display: grid; gap: 12px; grid-template-columns: 32px 1fr 210px; margin-top: 16px; padding: 12px; }
.yield-inline > i { color: #0b8174; font-size: 20px; }
.yield-inline b, .yield-inline small { display: block; }
.yield-inline b { color: #1a3a3c; font-size: 13px; }
.yield-inline small { color: #638082; font-size: 11px; margin-top: 2px; }
.yield-inline label { align-items: center; display: flex; gap: 6px; margin: 0; }
.yield-inline input { min-width: 70px; text-align: center; }
.yield-inline label span { color: #547174; font-size: 10px; line-height: 1.15; }
.recipe-compact-help { background: #f5f9f8; border-left: 3px solid #58aa9c; color: #5a7072; font-size: 12px; margin: 0 0 14px; padding: 9px 11px; }
.recipe-compact-help i { color: #0f796e; margin-right: 5px; }
.compact-recipe-table { border: 1px solid #deebe7; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.compact-recipe-table .recipe-head { background: #f4f8f7; font-size: 10px; padding: 9px 12px; }
.compact-recipe-table .recipe-row { padding: 9px 12px; }
.compact-recipe-table .recipe-row label { align-items: center; display: flex; gap: 6px; }
.compact-recipe-table .recipe-row label span { color: #6c7d80; font-size: 11px; white-space: nowrap; }
.compact-photo-panel, .product-behavior-summary { margin: 0; padding: 15px; }
.compact-photo-preview { align-items: center; background: #f1f7f5; border: 1px dashed #bdd7d1; border-radius: 11px; color: #679a92; display: flex; flex-direction: column; gap: 5px; height: 160px; justify-content: center; overflow: hidden; }
.compact-photo-preview i { font-size: 28px; }
.compact-photo-preview span { font-size: 12px; }
.compact-photo-preview img { height: 100%; object-fit: cover; width: 100%; }
.compact-photo-panel h3 { color: #1a3638; font-size: 15px; margin: 13px 0 4px; }
.compact-photo-panel p { color: #6c7d80; font-size: 12px; line-height: 1.4; margin: 0 0 12px; }
.compact-photo-panel .product-photo-upload { display: inline-flex; margin-bottom: 8px; }
.compact-photo-panel .btn-link { font-size: 12px; padding-left: 0; }
.compact-photo-panel > small { color: #809093; display: block; font-size: 10px; }
.product-behavior-summary ul { display: grid; gap: 9px; list-style: none; margin: 9px 0 0; padding: 0; }
.product-behavior-summary li { align-items: start; color: #4d6668; display: flex; font-size: 12px; gap: 7px; }
.product-behavior-summary i { color: #148678; }
.product-form-footer { align-items: center; border-top: 1px solid #dce7e4; display: flex; gap: 14px; justify-content: space-between; margin-top: 18px; padding-top: 15px; }
.product-form-footer > span { color: #637679; font-size: 12px; }
.product-form-footer > span i { color: #0d756b; margin-right: 4px; }
.product-form-footer > div { display: flex; gap: 9px; }
.product-mode-dialog { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(15,47,49,.22); max-width: 410px; padding: 24px; text-align: center; }
.product-mode-dialog::backdrop { background: rgba(19,43,44,.4); }
.mode-dialog-icon { align-items: center; background: #fff4d8; border-radius: 50%; color: #a96d00; display: inline-flex; font-size: 25px; height: 50px; justify-content: center; width: 50px; }
.product-mode-dialog h3 { color: #193437; font-size: 19px; margin: 13px 0 7px; }
.product-mode-dialog p { color: #607578; font-size: 13px; line-height: 1.5; margin: 0 0 18px; }
.product-mode-dialog > div:last-child { display: flex; gap: 9px; justify-content: center; }
.soft-chip.is-ready { background: #e2f5e9; border-color: #bfe2cd; color: #08744c; }

@media (max-width: 980px) {
  .product-table-filter { grid-template-columns: minmax(220px, 1fr) 1fr 1fr; }
  .product-table-filter .search-control { grid-column: 1 / -1; }
  .product-form-layout { grid-template-columns: 1fr; }
  .product-form-side { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
}

@media (max-width: 680px) {
  .catalog-page-head, .product-form-heading, .product-form-footer { align-items: stretch; flex-direction: column; }
  .catalog-page-actions, .product-form-footer > div { width: 100%; }
  .catalog-page-actions .btn, .product-form-footer > div .btn { flex: 1; }
  .product-table-filter, .compact-product-fields, .commercial-fields{ grid-template-columns: 1fr; }
  .supplier-combobox-field { grid-column: auto; }
  .catalog-finance-note { display: none; }
  .catalog-summary { gap: 8px; }
  .product-form-side { grid-template-columns: 1fr; }
  .panel-section-title { align-items: start; flex-direction: column; }
  .panel-section-hint { padding: 0; text-align: left; }
  .yield-inline { grid-template-columns: 28px 1fr; }
  .yield-inline label { grid-column: 1 / -1; }
  .yield-inline input { max-width: 90px; }
  .product-switch-row { grid-template-columns: 34px 1fr auto; padding: 10px; }
}

.product-editor { display: grid; gap: 18px; }
.product-editor-grid { align-items: start; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 300px; }
.product-editor-main { display: grid; gap: 18px; }
.product-editor-side { display: grid; gap: 18px; position: sticky; top: 18px; }
.editor-section { margin: 0; padding: 24px; }
.editor-section > header,
.section-title-row { align-items: start; display: flex; gap: 12px; margin-bottom: 22px; }
.editor-section > header > span,
.section-title-row > div > span { background: #dff3ef; border-radius: 10px; color: #0d6f66; display: grid; flex: 0 0 39px; font-size: 12px; font-weight: 900; height: 39px; place-items: center; }
.editor-section > header h3,
.section-title-row h3 { color: var(--ink); font-size: 19px; font-weight: 900; margin: 0; }
.editor-section > header p,
.section-title-row p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.section-title-row > div { display: flex; gap: 12px; }
.editor-fields { display: grid; gap: 16px; }
.editor-fields.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-fields.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-fields .full-span { grid-column: 1 / -1; }
.product-capability-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.capability-card { cursor: pointer; margin: 0; position: relative; }
.capability-card input { opacity: 0; position: absolute; }
.capability-card > span { background: #f8faf9; border: 1px solid #dfe7e5; border-radius: 13px; display: grid; gap: 4px; min-height: 140px; padding: 15px; transition: all .18s ease; }
.capability-card i { color: #6e8582; font-size: 24px; }
.capability-card b { color: var(--ink); font-size: 13px; }
.capability-card small { color: var(--muted); font-size: 11px; }
.capability-card input:checked + span { background: #e8f6f3; border-color: #5fa89e; box-shadow: inset 0 0 0 1px #5fa89e; }
.capability-card input:checked + span i { color: #0d756b; }
.product-commercial-fields { border-top: 1px solid #e6ecea; margin-top: 20px; padding-top: 20px; }
.money-input { position: relative; }
.money-input > span,
.money-input > b { color: #52646a; font-weight: 900; left: 13px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.money-input input { padding-left: 31px; }
.yield-panel { align-items: center; background: #edf6fb; border: 1px solid #cee1ed; border-radius: 14px; display: grid; gap: 14px; grid-template-columns: 48px minmax(0, 1fr) 210px; margin-top: 18px; padding: 16px; }
.yield-panel-icon { background: #d8ebf6; border-radius: 12px; color: #216786; display: grid; font-size: 21px; height: 48px; place-items: center; }
.yield-panel h4 { color: var(--ink); font-size: 16px; font-weight: 900; margin: 2px 0; }
.yield-panel p { color: var(--muted); font-size: 12px; margin: 0; }
.yield-panel label { position: relative; }
.yield-panel label span { color: var(--muted); display: block; font-size: 10px; margin-top: 4px; text-align: right; }
.recipe-explanation { align-items: start; background: #fff8e8; border: 1px solid #f0ddb4; border-radius: 11px; color: #725116; display: flex; gap: 9px; margin-bottom: 14px; padding: 11px 13px; }
.recipe-head,
.recipe-row { align-items: center; display: grid; gap: 10px; grid-template-columns: minmax(220px, 1fr) 190px 46px; }
.recipe-head { color: var(--muted); font-size: 10px; font-weight: 900; padding: 0 8px 7px; text-transform: uppercase; }
.recipe-row { background: #f8faf9; border: 1px solid #e1e8e6; border-radius: 11px; margin-bottom: 8px; padding: 10px; }
.recipe-row label { margin: 0; position: relative; }
.recipe-row label span { color: var(--muted); font-size: 10px; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.recipe-row label input { padding-right: 70px; }
.recipe-warning { align-items: center; color: #925c11; display: flex; gap: 8px; margin-top: 12px; }
.product-photo-card,
.configuration-summary { margin: 0; padding: 18px; }
.product-photo-card h3,
.configuration-summary h3 { color: var(--ink); font-size: 18px; font-weight: 900; margin: 0 0 5px; }
.product-photo-card p { color: var(--muted); font-size: 12px; }
.product-photo-card .product-photo-preview { aspect-ratio: 4 / 3; border-radius: 13px; }
.product-photo-upload { overflow: hidden; position: relative; }
.product-photo-upload input { inset: 0; opacity: 0; position: absolute; }
.configuration-summary ul { display: grid; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.configuration-summary li { align-items: start; color: #53666a; display: flex; font-size: 12px; gap: 8px; }
.configuration-summary li i { color: #0d766b; }
.editor-submit-bar { align-items: center; background: #fff; border: 1px solid #dbe5e2; border-radius: 14px; bottom: 12px; box-shadow: 0 14px 36px rgba(17,48,50,.15); display: flex; gap: 14px; justify-content: space-between; padding: 12px 15px; position: sticky; z-index: 10; }
.editor-submit-bar > div { align-items: center; display: flex; gap: 9px; }

@media (max-width: 1180px) {
  .product-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-catalog-filter { grid-template-columns: minmax(250px, 1fr) repeat(2, minmax(145px, .55fr)); }
  .product-catalog-filter button { grid-column: auto; }
  .product-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-hero,
  .editor-heading{ align-items: stretch; flex-direction: column; padding: 24px; }
  .category-grid,
  .compact-form-shell,
  .product-editor-grid{ grid-template-columns: 1fr; }
  .product-editor-side { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
  .product-catalog-filter { grid-template-columns: 1fr 1fr; }
  .product-catalog-filter .search-control { grid-column: 1 / -1; }
  .editor-fields.three-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .content { padding: 16px; }
  .category-grid,
  .product-admin-grid,
  .product-editor-side,
  .editor-fields.two-columns,
  .editor-fields.three-columns,
  .product-capability-grid,
  .product-catalog-filter{ grid-template-columns: 1fr; }
  .category-card-actions { grid-column: 1 / -1; }
  .directory-toolbar,
  .editor-submit-bar{ align-items: stretch; flex-direction: column; }
  .catalog-filter { align-items: stretch; display: grid; width: 100%; }
  .search-control { min-width: 0; }
  .yield-panel { grid-template-columns: 42px 1fr; }
  .yield-panel label { grid-column: 1 / -1; }
  .recipe-head { display: none; }
  .recipe-row { grid-template-columns: 1fr 46px; }
  .recipe-row label { grid-column: 1; }
  .recipe-row button { grid-column: 2; grid-row: 1 / 3; }
}
.dialog-icon { background: #e4f2ee; border-radius: 13px; color: #0b7469; display: grid; font-size: 25px; height: 54px; place-items: center; width: 54px; }
.dialog-actions { display: flex; gap: 9px; justify-content: end; margin-top: 6px; }

@media (max-width: 720px) {
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
}
.input-suffix { position: relative; }
.input-suffix input { padding-right: 78px; }
.input-suffix span { color: var(--muted); font-size: 11px; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* Detalle de producto */
.product-detail-dialog { background: #fff; border: 0; border-radius: 22px; box-shadow: 0 34px 100px rgba(5,29,31,.34); max-height: calc(100vh - 36px); max-width: calc(100vw - 36px); overflow: hidden; padding: 0; width: 1120px; }
.product-detail-dialog::backdrop { background: rgba(6,28,30,.68); backdrop-filter: blur(4px); }
.product-detail-dialog-frame { min-height: 550px; position: relative; }
.product-detail-dialog-close { align-items: center; background: rgba(255,255,255,.94); border: 1px solid #d9e3e1; border-radius: 50%; color: #34484c; display: flex; font-size: 18px; height: 42px; justify-content: center; position: absolute; right: 18px; top: 18px; transition: background .18s ease, transform .18s ease; width: 42px; z-index: 5; }
.product-detail-dialog-close:hover { background: #fff; transform: scale(1.05); }
.product-detail-dialog-content { max-height: calc(100vh - 36px); overflow: auto; }
.product-detail-state { align-items: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; justify-content: center; min-height: 550px; padding: 40px; text-align: center; }
.product-detail-state strong { color: var(--ink); font-size: 20px; }
.product-detail-state small { max-width: 430px; }
.product-detail-state > i { color: #ad5d21; font-size: 42px; }
.product-detail-state > div { display: flex; gap: 9px; margin-top: 10px; }
.product-detail-loader { animation: product-detail-spin .8s linear infinite; border: 4px solid #d9e9e5; border-radius: 50%; border-top-color: #0d776d; height: 44px; margin-bottom: 8px; width: 44px; }
@keyframes product-detail-spin { to { transform: rotate(360deg); } }

.product-detail-sheet { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(0, 1.18fr); min-height: 620px; }
.product-detail-media { align-content: center; background: linear-gradient(155deg, #f3f8f6 0%, #e5f1ee 100%); border-right: 1px solid #dce7e4; display: grid; gap: 18px; justify-items: center; min-width: 0; padding: 58px 38px 38px; }
.product-detail-photo { align-items: center; display: flex; height: 390px; justify-content: center; max-width: 390px; width: 100%; }
.product-detail-photo img { filter: drop-shadow(0 22px 24px rgba(14,49,48,.16)); height: 100%; object-fit: contain; width: 100%; }
.product-detail-photo-empty { align-items: center; background: rgba(255,255,255,.58); border: 1px dashed #aac1bc; border-radius: 22px; color: #54857e; display: flex; flex-direction: column; gap: 9px; height: 290px; justify-content: center; width: 290px; }
.product-detail-photo-empty i { font-size: 76px; }
.product-detail-photo-empty small { color: #68827e; font-weight: 800; }
.product-detail-media-caption { align-items: center; display: flex; gap: 10px; }
.product-detail-media-caption > small { color: #526b68; font-size: 12px; font-weight: 800; }

.product-detail-info { display: grid; gap: 22px; padding: 52px 48px 34px; }
.product-detail-heading { align-items: start; display: flex; gap: 22px; justify-content: space-between; padding-right: 42px; }
.product-detail-category { color: #0d8074; display: block; font-size: 11px; font-weight: 900; letter-spacing: .09em; margin-bottom: 6px; text-transform: uppercase; }
.product-detail-heading h3 { color: var(--ink); font-size: clamp(29px, 3vw, 42px); font-weight: 900; line-height: 1.08; margin: 0; }
.product-detail-price { color: #0b615a; font-size: 30px; line-height: 1.15; white-space: nowrap; }
.product-detail-description { color: var(--muted); font-size: 15px; line-height: 1.7; margin: -8px 0 0; }
.product-detail-usage { display: flex; flex-wrap: wrap; gap: 8px; }
.product-detail-usage span { align-items: center; background: #eef6f4; border: 1px solid #d6e7e3; border-radius: 999px; color: #385f5a; display: inline-flex; font-size: 11px; font-weight: 800; gap: 6px; padding: 7px 10px; }
.product-detail-usage i { color: #0c7a6f; }
.product-detail-section { border-top: 1px solid #e2e9e7; padding-top: 18px; }
.product-detail-section-title { align-items: end; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 13px; }
.product-detail-section-title > div > span { color: #0d7b70; display: block; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.product-detail-section-title h4 { color: var(--ink); font-size: 18px; font-weight: 900; margin: 2px 0 0; }
.product-detail-section-title > small { color: var(--muted); font-size: 10px; text-align: right; }
.product-detail-metrics { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-detail-metrics article { background: #f7faf9; border: 1px solid #dfe8e5; border-radius: 13px; display: grid; min-height: 105px; padding: 13px; }
.product-detail-metrics small { color: #697c80; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.product-detail-metrics strong { color: #223b3e; font-size: 18px; line-height: 1.2; margin-top: 5px; }
.product-detail-metrics strong.is-positive { color: #14714a; }
.product-detail-metrics strong.is-negative { color: #a13f36; }
.product-detail-metrics span { align-self: end; color: var(--muted); font-size: 9px; margin-top: 5px; }
.product-detail-stock-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-detail-stock-grid article { align-items: center; background: #edf7f1; border: 1px solid #d2e9dc; border-radius: 13px; display: flex; gap: 11px; min-height: 82px; padding: 13px; }
.product-detail-stock-grid article > i { background: #d9efe2; border-radius: 10px; color: #16764c; display: grid; flex: 0 0 auto; font-size: 18px; height: 40px; place-items: center; width: 40px; }
.product-detail-stock-grid .preparation { background: #edf5fa; border-color: #d6e6ef; }
.product-detail-stock-grid .preparation > i { background: #dbeaf3; color: #286d91; }
.product-detail-stock-grid .yield { background: #fff8e9; border-color: #f0dfba; }
.product-detail-stock-grid .yield > i { background: #f7eacb; color: #9b681b; }
.product-detail-stock-grid small,
.product-detail-stock-grid strong { display: block; }
.product-detail-stock-grid small { color: var(--muted); font-size: 9px; font-weight: 800; }
.product-detail-stock-grid strong { color: var(--ink); font-size: 18px; }
.product-detail-stock-grid strong span { font-size: 10px; font-weight: 700; }
.product-detail-recipe { display: grid; gap: 8px; }
.product-detail-recipe article { align-items: center; background: #f8faf9; border: 1px solid #e0e8e6; border-radius: 12px; display: grid; gap: 10px; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 9px 11px; }
.product-detail-recipe-image { background: #e4f0ed; border-radius: 9px; display: grid; height: 42px; overflow: hidden; place-items: center; width: 42px; }
.product-detail-recipe-image img { height: 100%; object-fit: cover; width: 100%; }
.product-detail-recipe-image i { color: #347b72; }
.product-detail-recipe strong,
.product-detail-recipe small { display: block; }
.product-detail-recipe strong { color: var(--ink); font-size: 13px; }
.product-detail-recipe small { color: var(--muted); font-size: 9px; }
.product-detail-recipe b { background: #e3f2ee; border-radius: 999px; color: #116e64; font-size: 11px; padding: 6px 9px; }
.product-detail-empty-note { align-items: center; background: #fff8e8; border: 1px solid #f0deb9; border-radius: 12px; color: #7e5b20; display: flex; gap: 11px; padding: 13px; }
.product-detail-empty-note i { font-size: 21px; }
.product-detail-empty-note strong,
.product-detail-empty-note span { display: block; }
.product-detail-empty-note span { font-size: 10px; }
.product-detail-actions { align-items: center; border-top: 1px solid #e2e9e7; display: flex; gap: 9px; justify-content: flex-end; margin-top: auto; padding-top: 18px; }

@media (max-width: 900px) {
  .product-detail-dialog { width: 760px; }
  .product-detail-sheet { grid-template-columns: 1fr; }
  .product-detail-media { border-bottom: 1px solid #dce7e4; border-right: 0; min-height: 340px; padding: 48px 24px 28px; }
  .product-detail-photo { height: 250px; }
  .product-detail-info { padding: 46px 30px 28px; }
}

@media (max-width: 680px) {
  .product-detail-dialog { border-radius: 16px; max-height: calc(100vh - 16px); max-width: calc(100vw - 16px); width: 100%; }
  .product-detail-dialog-content { max-height: calc(100vh - 16px); }
  .product-detail-sheet { grid-template-columns: 1fr; }
  .product-detail-media { border-bottom: 1px solid #dce7e4; border-right: 0; min-height: 310px; padding: 50px 24px 24px; }
  .product-detail-photo { height: 230px; }
  .product-detail-info { gap: 18px; padding: 28px 20px 22px; }
  .product-detail-heading { display: grid; padding-right: 0; }
  .product-detail-heading h3 { font-size: 29px; }
  .product-detail-price { font-size: 26px; }
  .product-detail-section-title { align-items: start; flex-direction: column; gap: 5px; }
  .product-detail-section-title > small { text-align: left; }
  .product-detail-metrics,
  .product-detail-stock-grid { grid-template-columns: 1fr; }
  .product-detail-actions { display: grid; grid-template-columns: 1fr; }
  .product-detail-actions .btn { width: 100%; }
}

/* Capa final de consistencia visual y adaptacion movil */
.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop { display: none; }

.app-frame { grid-template-columns: 260px minmax(0, 1fr); }
.content { min-width: 0; }
html,
body { max-width: 100%; overflow-x: hidden; }

.module-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  margin: -2px 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.module-tabs::-webkit-scrollbar { display: none; }
.module-tabs a {
  align-items: center;
  border-bottom: 3px solid transparent;
  color: #66777d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  padding: 11px 14px 12px;
  text-decoration: none;
}
.module-tabs a:hover { color: var(--accent); }
.module-tabs a.active { border-bottom-color: var(--accent); color: #075e57; }

.module-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 0 20px;
}
.module-heading h2 {
  color: var(--ink);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  margin: 3px 0 5px;
}
.module-heading p { color: var(--muted); margin: 0; }
.module-panel { border-radius: 16px; box-shadow: 0 12px 30px rgba(15, 36, 48, .06); }
.module-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(150px, .35fr)) auto;
  margin-bottom: 20px;
}
.module-filters label { display: grid; gap: 5px; }
.module-filters label > span { color: #607079; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.filter-search { position: relative; }
.filter-search > i { color: #607079; left: 14px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.filter-search input { padding-left: 41px; }
.module-table { margin: 0; min-width: 900px; }
.module-table thead th {
  border-bottom-color: #dbe4e7;
  color: #66777d;
  font-size: 10px;
  letter-spacing: .035em;
  padding: 11px 12px;
  text-transform: uppercase;
}
.module-table tbody td { border-bottom-color: #e5ecee; padding: 13px 12px; vertical-align: middle; }
.module-table tbody tr:last-child td { border-bottom: 0; }
.module-table td small { font-size: 10px; margin-top: 3px; }
.module-pagination {
  align-items: center;
  border-top: 1px solid #e2e9eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 16px;
}
.module-pagination span { color: var(--muted); font-size: 12px; font-weight: 800; }
.status-pill.is-table { background: #e9f7ef; color: #176d49; }
.status-pill.is-bar { background: #edf3fa; color: #315f88; }

/* Los encabezados de modulo quedan ligeros, como el catalogo de Productos. */
.admin-hero{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  margin-bottom: 20px;
  min-height: 0;
  overflow: visible;
  padding: 2px 0 17px;
}
.admin-hero::after { display: none; }
.admin-hero h2{
  color: var(--ink);
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: 0;
}
.admin-hero p{ color: var(--muted) !important; }
.admin-hero .eyebrow{ color: #08756b; }
.admin-hero .btn-outline-light {
  background: #fff;
  border-color: #8eb6b0;
  color: #0d6e65;
}
.admin-hero .btn-outline-light:hover { background: #e5f3f0; color: #095d56; }

.table-responsive,
.responsive-table { -webkit-overflow-scrolling: touch; border-radius: 10px; }
.table-responsive > .table { margin-bottom: 0; }
.supplier-table { min-width: 850px; }

@media (max-width: 1100px) {
  body .app-frame { display: block; min-height: 100vh; }
  body .sidebar {
    bottom: 0;
    box-shadow: 20px 0 48px rgba(3, 14, 22, .28);
    left: 0;
    max-width: calc(100vw - 52px);
    overflow-y: auto;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
    width: 290px;
    z-index: 1050;
  }
  body .sidebar.is-open { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar-backdrop {
    background: rgba(5, 21, 28, .52);
    border: 0;
    bottom: 0;
    display: block;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1040;
  }
  body .sidebar-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 23px;
    height: 46px;
    justify-content: center;
    width: 46px;
  }
  body .sidebar-close {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    margin-left: auto;
    width: 38px;
  }
  body .content { padding: 22px; }
  body .topbar { justify-content: flex-start; }
  body .topbar .date-chip { margin-left: auto; }
  .module-filters { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, .45fr)); }
  .module-filters .btn { grid-column: 3; }
}

@media (max-width: 820px) {
  .module-heading { align-items: stretch; flex-direction: column; }
  .module-filters { grid-template-columns: 1fr 1fr; }
  .module-filters .filter-search { grid-column: 1 / -1; }
  .module-filters .btn { grid-column: auto; }
}

@media (max-width: 650px) {
  body .content { overflow-x: hidden; padding: 14px 12px 28px; }
  body .topbar { gap: 10px; margin-bottom: 20px; }
  body .topbar h1 { font-size: 23px; line-height: 1.08; }
  body .topbar > div > span { font-size: 11px; }
  body .topbar .date-chip { display: none; }
  .panel { border-radius: 14px; padding: 15px; }
  .admin-hero{ align-items: stretch; gap: 14px; padding: 0 1px 14px; }
  .admin-hero h2{ font-size: 28px; }
  .admin-hero .hero-actions,
  .admin-hero > .btn{ width: 100%; }
  .admin-hero .hero-actions { display: grid; grid-template-columns: 1fr; }
  .admin-hero .btn { justify-content: center; min-height: 46px; }
  .module-tabs { margin-bottom: 19px; }
  .module-tabs a { min-height: 44px; padding-inline: 11px; }
  .module-heading { gap: 14px; }
  .module-heading h2 { font-size: 29px; }
  .module-filters { grid-template-columns: 1fr; }
  .module-filters .filter-search,
  .module-filters .btn { grid-column: 1; }
  .module-filters .btn { min-height: 46px; }
  .module-pagination { justify-content: space-between; }
  .module-pagination .btn { min-height: 44px; }
  .category-card { grid-template-columns: 42px minmax(0, 1fr); }
  .category-card-actions { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .category-card-actions .btn { width: 100%; }
  .form-control,
  .form-select,
  .btn { min-height: 44px; }
  .table-responsive { margin-inline: -4px; max-width: calc(100% + 8px); }
}

@media (max-width: 390px) {
  body .content { padding-inline: 10px; }
  .category-card-actions { grid-template-columns: 1fr; }
  .module-pagination span { font-size: 10px; }
}

@media (max-width: 650px) {
  .login-panel {
    align-items: start;
    gap: 30px;
    padding: 64px 24px 44px;
  }

  .pam-login::before {
    inset: 12px;
  }

  .login-copy {
    min-width: 0;
    width: 100%;
  }

  .login-copy h1,
  .auth-task-panel .login-copy h1 {
    font-size: clamp(39px, 12vw, 48px);
    line-height: .94;
    overflow-wrap: anywhere;
  }

  .login-card {
    padding: 24px 22px;
    width: 100%;
  }

  .login-card-head {
    align-items: flex-start;
  }
}

.sidebar-account-link {
  margin-top: auto;
}
.compact-page-head {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 1px 18px;
}
.compact-page-head h2 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
  margin: 3px 0 5px;
}
.compact-page-head p{
  color: var(--muted);
  margin: 0;
}

.record-count {
  background: #edf4f5;
  border-radius: 999px;
  color: #53666d;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.table-row-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.table-row-actions form {
  margin: 0;
}

.icon-action {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd9de;
  border-radius: 9px;
  color: #0b6e65;
  display: inline-flex;
  height: 39px;
  justify-content: center;
  text-decoration: none;
  width: 39px;
}

.icon-action:hover {
  background: #edf8f6;
  border-color: #8cc9c0;
  color: #075d56;
}

.icon-action.is-warning {
  color: #a35408;
}

.icon-action.is-danger {
  color: #b42318;
}

.password-change-panel {
  margin-inline: auto;
  max-width: 720px;
}

@media (max-width: 650px) {
  .compact-page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .compact-page-head h2 {
    font-size: 31px;
  }

  .table-row-actions {
    justify-content: flex-end;
    width: 100%;
  }
}

/* Dark Soft Admin UI migration: grafito, superficies escalonadas y estados semanticos. */
:root {
  color-scheme: dark;
  --graphite-950: #0d141c;
  --graphite-900: #161f2a;
  --graphite-800: #202c38;
  --page: #0f1720;
  --surface: #161f2a;
  --surface-soft: #1c2632;
  --surface-raised: #202c38;
  --field-surface: #111923;
  --ink: #f0f6fc;
  --muted: #b1bac4;
  --paper: #0f1720;
  --panel: #161f2a;
  --line: #3d4a57;
  --border: #3d4a57;
  --border-strong: #57606a;
  --control-border: #6e7781;
  --accent: #238636;
  --accent-dark: #56d364;
  --accent-soft: #12261c;
  --accent-2: #e3b341;
  --danger: #ff7b72;
  --danger-soft: #33171b;
  --info: #58a6ff;
  --info-pressed: #79c0ff;
  --info-soft: #10243a;
  --warning: #e3b341;
  --warning-soft: #302513;
  --prepared: #d2a8ff;
  --prepared-soft: #251a35;
  --disabled-bg: #21262d;
  --disabled-text: #8c959f;
  --shadow-sm: 0 1px 2px rgb(1 4 9 / 45%);
  --shadow-lg: 0 10px 30px rgb(1 4 9 / 42%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --sidebar-width: 138px;
  --bs-body-bg: var(--page);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-soft);
  --bs-emphasis-color: var(--ink);
  --bs-primary: var(--info);
  --bs-success: var(--accent-dark);
  --bs-danger: var(--danger);
  --bs-warning: var(--warning);
}

body.dark-soft-admin {
  background: var(--page);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
}

body.dark-soft-admin ::selection {
  background: rgb(88 166 255 / 32%);
  color: var(--ink);
}

body.dark-soft-admin a {
  color: var(--info);
}

body.dark-soft-admin a:hover {
  color: var(--info-pressed);
}

body.dark-soft-admin h1,
body.dark-soft-admin h2,
body.dark-soft-admin h3,
body.dark-soft-admin h4,
body.dark-soft-admin h5,
body.dark-soft-admin h6,
body.dark-soft-admin strong,
body.dark-soft-admin .fw-bold {
  color: var(--ink);
}

body.dark-soft-admin p,
body.dark-soft-admin small,
body.dark-soft-admin .text-muted,
body.dark-soft-admin td small,
body.dark-soft-admin .form-text {
  color: var(--muted) !important;
}

body.dark-soft-admin hr {
  border-color: var(--border);
  opacity: 1;
}

body.dark-soft-admin .app-frame {
  background: var(--page);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

body.dark-soft-admin .sidebar {
  background: var(--graphite-950);
  border-right: 1px solid var(--border);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 13px 18px;
  position: sticky;
  top: 0;
}

body.dark-soft-admin .brand-mark {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 0 0 20px;
}

body.dark-soft-admin .brand-dot {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--control-border);
  border-radius: 12px;
  box-shadow: none;
  color: var(--info);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  height: 42px;
  letter-spacing: 0;
  place-items: center;
  width: 42px;
}

body.dark-soft-admin .brand-copy {
  min-width: 0;
}

body.dark-soft-admin .brand-copy strong,
body.dark-soft-admin .brand-copy small {
  display: block;
}

body.dark-soft-admin .brand-copy small {
  color: var(--muted);
}

body.dark-soft-admin .sidebar nav {
  display: grid;
  gap: 7px;
}

body.dark-soft-admin .sidebar nav a,
body.dark-soft-admin .sidebar-account-link,
body.dark-soft-admin .sidebar form .btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 50px;
  padding: 0 10px;
  position: relative;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

body.dark-soft-admin .sidebar nav a span,
body.dark-soft-admin .sidebar-account-link span,
body.dark-soft-admin .sidebar form .btn span,
body.dark-soft-admin .brand-copy {
  display: none;
}

body.dark-soft-admin .sidebar nav a i,
body.dark-soft-admin .sidebar-account-link i,
body.dark-soft-admin .sidebar form .btn i {
  font-size: 20px;
  line-height: 1;
  margin: 0;
}

body.dark-soft-admin .sidebar nav a:hover,
body.dark-soft-admin .sidebar-account-link:hover,
body.dark-soft-admin .sidebar form .btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

body.dark-soft-admin .sidebar nav a.active {
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  color: var(--info);
}

body.dark-soft-admin .sidebar nav a.active::before {
  background: var(--info);
  border-radius: 0 4px 4px 0;
  content: "";
  height: 26px;
  left: -13px;
  position: absolute;
  width: 4px;
}

body.dark-soft-admin .sidebar-account-link {
  margin-top: auto;
}

body.dark-soft-admin .sidebar form {
  margin: 0;
}

body.dark-soft-admin .content {
  margin: 0 auto;
  max-width: 1580px;
  min-width: 0;
  padding: 34px 38px 56px;
  width: 100%;
}

body.dark-soft-admin .topbar {
  align-items: center;
  background: rgb(13 20 28 / 94%);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: -34px -38px 28px;
  min-height: 68px;
  padding: 0 38px;
  position: sticky;
  top: 0;
  z-index: 30;
}

@supports (backdrop-filter: blur(12px)) {
  body.dark-soft-admin .topbar {
    backdrop-filter: blur(12px);
  }
}

body.dark-soft-admin .topbar h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

body.dark-soft-admin .topbar > div > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

body.dark-soft-admin .date-chip,
body.dark-soft-admin .record-count,
body.dark-soft-admin .directory-count,
body.dark-soft-admin .soft-chip,
body.dark-soft-admin .save-state,
body.dark-soft-admin .product-status-chip,
body.dark-soft-admin .barcode-chip,
body.dark-soft-admin .status-pill,
body.dark-soft-admin .status-badge{
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: none;
}

body.dark-soft-admin .panel,
body.dark-soft-admin .metric,
body.dark-soft-admin .login-card,
body.dark-soft-admin .module-panel,
body.dark-soft-admin .product-table-panel,
body.dark-soft-admin .category-directory,
body.dark-soft-admin .category-card,
body.dark-soft-admin .product-admin-card,
body.dark-soft-admin .product-form-panel,
body.dark-soft-admin .product-photo-panel,
body.dark-soft-admin .product-photo-card,
body.dark-soft-admin .configuration-summary,
body.dark-soft-admin .compact-form-card,
body.dark-soft-admin .supplier-form,
body.dark-soft-admin .product-detail-dialog,
body.dark-soft-admin .modal-content,
body.dark-soft-admin .editor-section {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

body.dark-soft-admin .panel,
body.dark-soft-admin .metric,
body.dark-soft-admin .category-card,
body.dark-soft-admin .product-admin-card{
  border-radius: var(--radius-md);
}

body.dark-soft-admin .panel-head,
body.dark-soft-admin .directory-toolbar,
body.dark-soft-admin .module-tabs,
body.dark-soft-admin .module-pagination,
body.dark-soft-admin .detail-table,
body.dark-soft-admin .detail-row + .detail-row,
body.dark-soft-admin .product-stock-strip,
body.dark-soft-admin .product-admin-actions,
body.dark-soft-admin .category-card-actions,
body.dark-soft-admin .editor-submit-bar,
body.dark-soft-admin .product-commercial-fields,
body.dark-soft-admin .recipe-row{
  border-color: var(--border);
}

body.dark-soft-admin .metric {
  border-left-color: var(--accent);
}

body.dark-soft-admin .metric.warning{
  border-left-color: var(--warning);
}

body.dark-soft-admin .metric::after,
body.dark-soft-admin .admin-hero::after,
body.dark-soft-admin .editor-heading::after{
  display: none;
}

body.dark-soft-admin .metric strong,
body.dark-soft-admin .table-money strong,
body.dark-soft-admin .product-admin-heading > strong{
  color: var(--ink);
}

body.dark-soft-admin .eyebrow,
body.dark-soft-admin .eyebrow-dark,
body.dark-soft-admin .catalog-page-head .eyebrow,
body.dark-soft-admin .module-heading .eyebrow,
body.dark-soft-admin .admin-hero .eyebrow,
body.dark-soft-admin .editor-heading .eyebrow,
body.dark-soft-admin .product-admin-heading small,
body.dark-soft-admin .product-detail-category,
body.dark-soft-admin .product-detail-section-title > div > span{
  color: var(--info) !important;
}

body.dark-soft-admin .catalog-page-head,
body.dark-soft-admin .module-heading,
body.dark-soft-admin .compact-page-head,
body.dark-soft-admin .admin-hero,
body.dark-soft-admin .editor-heading{
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  margin-bottom: 22px;
  overflow: visible;
  padding: 0 1px 18px;
}

body.dark-soft-admin .catalog-page-head h2,
body.dark-soft-admin .module-heading h2,
body.dark-soft-admin .compact-page-head h2,
body.dark-soft-admin .admin-hero h2,
body.dark-soft-admin .editor-heading h2{
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
}

body.dark-soft-admin .catalog-page-head p,
body.dark-soft-admin .module-heading p,
body.dark-soft-admin .compact-page-head p,
body.dark-soft-admin .admin-hero p,
body.dark-soft-admin .editor-heading p{
  color: var(--muted);
}

body.dark-soft-admin .btn {
  border-radius: 10px;
  font-weight: 800;
}

body.dark-soft-admin .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

body.dark-soft-admin .btn-primary,
body.dark-soft-admin .btn-success {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgb(1 4 9 / 36%);
  color: #fff;
}

body.dark-soft-admin .btn-primary:hover,
body.dark-soft-admin .btn-success:hover {
  background: #1a7f37;
  border-color: #1a7f37;
  color: #fff;
}

body.dark-soft-admin .btn-primary:active,
body.dark-soft-admin .btn-success:active {
  background: #116329;
  border-color: #116329;
}

body.dark-soft-admin .btn-dark,
body.dark-soft-admin .btn-secondary {
  background: var(--surface-raised);
  border-color: var(--control-border);
  color: var(--ink);
}

body.dark-soft-admin .btn-dark:hover,
body.dark-soft-admin .btn-secondary:hover {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}

body.dark-soft-admin .btn-outline-primary,
body.dark-soft-admin .btn-outline-info,
body.dark-soft-admin .icon-action {
  background: var(--surface);
  border-color: var(--control-border);
  color: var(--info);
}

body.dark-soft-admin .btn-outline-primary:hover,
body.dark-soft-admin .btn-outline-info:hover,
body.dark-soft-admin .icon-action:hover {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info-pressed);
}

body.dark-soft-admin .btn-outline-secondary,
body.dark-soft-admin .btn-outline-dark,
body.dark-soft-admin .btn-outline-light {
  background: var(--surface);
  border-color: var(--control-border);
  color: var(--ink);
}

body.dark-soft-admin .btn-outline-secondary:hover,
body.dark-soft-admin .btn-outline-dark:hover,
body.dark-soft-admin .btn-outline-light:hover {
  background: var(--surface-raised);
  border-color: var(--info);
  color: var(--info);
}

body.dark-soft-admin .btn-outline-danger,
body.dark-soft-admin .btn-danger,
body.dark-soft-admin .icon-action.is-danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

body.dark-soft-admin .btn-outline-danger:hover,
body.dark-soft-admin .btn-danger:hover,
body.dark-soft-admin .icon-action.is-danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

body.dark-soft-admin .btn-outline-success,
body.dark-soft-admin .icon-action.is-success {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

body.dark-soft-admin .btn-warning,
body.dark-soft-admin .icon-action.is-warning {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

body.dark-soft-admin .btn-link {
  color: var(--info);
}

body.dark-soft-admin .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

body.dark-soft-admin .form-control,
body.dark-soft-admin .form-select,
body.dark-soft-admin .form-check-input,
body.dark-soft-admin .input-group-text,
body.dark-soft-admin textarea,
body.dark-soft-admin input,
body.dark-soft-admin select {
  background-color: var(--field-surface);
  border-color: var(--control-border);
  color: var(--ink);
}

body.dark-soft-admin .form-control::placeholder,
body.dark-soft-admin input::placeholder,
body.dark-soft-admin textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

body.dark-soft-admin .form-control:focus,
body.dark-soft-admin .form-select:focus,
body.dark-soft-admin .form-check-input:focus,
body.dark-soft-admin .search-control input:focus,
body.dark-soft-admin .supplier-combobox[open] summary{
  border-color: var(--info);
  box-shadow: 0 0 0 .2rem rgb(88 166 255 / 32%);
  outline: 0;
}

body.dark-soft-admin .form-control:disabled,
body.dark-soft-admin .form-select:disabled,
body.dark-soft-admin input:disabled,
body.dark-soft-admin select:disabled,
body.dark-soft-admin textarea:disabled,
body.dark-soft-admin .btn:disabled,
body.dark-soft-admin .disabled {
  background-color: var(--disabled-bg);
  border-color: var(--control-border);
  color: var(--disabled-text);
  opacity: 1;
}

body.dark-soft-admin input[type="date"]::-webkit-calendar-picker-indicator,
body.dark-soft-admin input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

body.dark-soft-admin .form-label,
body.dark-soft-admin .form-field label,
body.dark-soft-admin .filter-field > span,
body.dark-soft-admin .module-filters label > span{
  color: var(--muted);
}

body.dark-soft-admin .search-control input,
body.dark-soft-admin .supplier-combobox summary,
body.dark-soft-admin .supplier-combobox-menu{
  background: var(--field-surface);
  border-color: var(--control-border);
  color: var(--ink);
}

body.dark-soft-admin .supplier-combobox-option:hover,
body.dark-soft-admin .supplier-combobox-option:has(input:checked),
body.dark-soft-admin .category-chip:hover,
body.dark-soft-admin .category-chip.active {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}

body.dark-soft-admin .table-responsive,
body.dark-soft-admin .responsive-table,
body.dark-soft-admin .product-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: auto;
}

body.dark-soft-admin .table,
body.dark-soft-admin .module-table,
body.dark-soft-admin .product-table{
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--surface-soft);
  --bs-table-hover-color: var(--ink);
  color: var(--ink);
}

body.dark-soft-admin .table th,
body.dark-soft-admin .module-table thead th,
body.dark-soft-admin .product-table th,
body.dark-soft-admin .detail-head{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--muted);
}

body.dark-soft-admin .table td,
body.dark-soft-admin .table th,
body.dark-soft-admin .module-table tbody td,
body.dark-soft-admin .product-table td{
  border-color: var(--border);
  color: var(--ink);
}

body.dark-soft-admin .table tbody tr:hover,
body.dark-soft-admin .module-table tbody tr:hover,
body.dark-soft-admin .product-table tbody tr:hover{
  background: var(--surface-soft);
}

body.dark-soft-admin .product-table tbody tr.is-inactive,
body.dark-soft-admin .product-admin-card.is-inactive,
body.dark-soft-admin .category-card.is-inactive{
  background: var(--disabled-bg);
  filter: none;
  opacity: .72;
}

body.dark-soft-admin .alert {
  border-radius: var(--radius-sm);
  border-width: 1px;
  color: var(--ink);
}

body.dark-soft-admin .alert-success,
body.dark-soft-admin .status-pill.active,
body.dark-soft-admin .status-badge.is-active,
body.dark-soft-admin .soft-chip.is-ready{
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent-dark) !important;
}

body.dark-soft-admin .alert-info,
body.dark-soft-admin .usage-base,
body.dark-soft-admin .status-pill.is-bar{
  background: var(--info-soft) !important;
  border-color: var(--info) !important;
  color: var(--info) !important;
}

body.dark-soft-admin .alert-warning,
body.dark-soft-admin .status-pill.is-table,
body.dark-soft-admin .recipe-explanation,
body.dark-soft-admin .product-detail-empty-note {
  background: var(--warning-soft) !important;
  border-color: var(--warning) !important;
  color: var(--warning) !important;
}

body.dark-soft-admin .alert-danger,
body.dark-soft-admin .status-pill.inactive,
body.dark-soft-admin .status-badge.is-inactive{
  background: var(--danger-soft) !important;
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

body.dark-soft-admin .usage-sale{
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark) !important;
}

body.dark-soft-admin .usage-prepared,
body.dark-soft-admin .product-type-pills .prepared {
  background: var(--prepared-soft);
  border-color: var(--prepared);
  color: var(--prepared) !important;
}
body.dark-soft-admin .text-danger {
  color: var(--danger) !important;
}

body.dark-soft-admin .text-warning {
  color: var(--warning) !important;
}

body.dark-soft-admin .badge.text-bg-danger,
body.dark-soft-admin .badge.bg-danger {
  background: var(--danger-soft) !important;
  border: 1px solid var(--danger);
  color: var(--danger) !important;
}

body.dark-soft-admin .badge.text-bg-success,
body.dark-soft-admin .badge.bg-success {
  background: var(--accent-soft) !important;
  border: 1px solid var(--accent);
  color: var(--accent-dark) !important;
}

body.dark-soft-admin .category-card-icon,
body.dark-soft-admin .product-table-image,
body.dark-soft-admin .product-admin-image,
body.dark-soft-admin .product-admin-image > span,
body.dark-soft-admin .product-thumb,
body.dark-soft-admin .product-photo-preview,
body.dark-soft-admin .product-detail-media,
body.dark-soft-admin .product-detail-photo-empty,
body.dark-soft-admin .product-detail-metrics article,
body.dark-soft-admin .product-detail-stock-grid article,
body.dark-soft-admin .product-detail-recipe article,
body.dark-soft-admin .dialog-icon{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--info);
}

body.dark-soft-admin .product-admin-actions,
body.dark-soft-admin .category-card-actions,
body.dark-soft-admin .editor-submit-bar{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--ink);
}

body.dark-soft-admin .module-tabs a{
  color: var(--muted);
}

body.dark-soft-admin .module-tabs a:hover{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--ink);
}

body.dark-soft-admin .module-tabs a.active{
  background: var(--surface-raised);
  border-color: var(--info);
  color: var(--info);
}

body.dark-soft-admin .icon-action {
  border-radius: 10px;
}

body.dark-soft-admin .detail-hero{
  background: var(--graphite-900);
  border: 1px solid var(--border);
  color: var(--ink);
}

body.dark-soft-admin .login-shell {
  background: var(--page);
}

body.dark-soft-admin.login-shell {
  background: var(--page);
}

body.dark-soft-admin .login-panel {
  background:
    linear-gradient(90deg, rgb(88 166 255 / 3%) 1px, transparent 1px),
    linear-gradient(0deg, rgb(88 166 255 / 3%) 1px, transparent 1px),
    var(--page);
  background-size: 46px 46px;
}

body.dark-soft-admin .login-copy {
  color: var(--ink);
}

body.dark-soft-admin .login-copy h1 {
  color: var(--ink);
}

body.dark-soft-admin .login-card {
  background: var(--surface);
  border-color: var(--border);
}

body.dark-soft-admin .login-icon {
  background: var(--info-soft);
  color: var(--info);
}

body.dark-soft-admin .product-detail-dialog {
  background: var(--surface);
}

body.dark-soft-admin .product-detail-dialog::backdrop,
body.dark-soft-admin .modal-backdrop.show{
  background: rgb(1 4 9 / 72%);
  backdrop-filter: blur(5px);
}

body.dark-soft-admin .product-detail-dialog-close {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

body.dark-soft-admin .product-detail-sheet {
  background: var(--surface);
}

body.dark-soft-admin .product-detail-media {
  background: linear-gradient(145deg, var(--surface-soft), var(--field-surface));
}

body.dark-soft-admin .product-detail-stock-grid .preparation,
body.dark-soft-admin .yield-panel{
  background: var(--info-soft);
  border-color: var(--info);
}

body.dark-soft-admin .product-detail-stock-grid .yield{
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

body.dark-soft-admin .capability-card > span,
body.dark-soft-admin .supplier-type-option > span,
body.dark-soft-admin .category-chip,
body.dark-soft-admin .product-type-pills span,
body.dark-soft-admin .table-usage span{
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}

body.dark-soft-admin .capability-card input:checked + span,
body.dark-soft-admin .supplier-type-option input:checked + span{
  background: var(--info-soft);
  border-color: var(--info);
  box-shadow: inset 0 0 0 1px var(--info);
  color: var(--info);
}

body.dark-soft-admin .editor-submit-bar{
  bottom: 12px;
  box-shadow: var(--shadow-lg);
}
body.dark-soft-admin .empty-state {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}

@media (max-width: 1100px) {
  body.dark-soft-admin .app-frame {
    display: block;
  }

  body.dark-soft-admin .sidebar {
    box-shadow: 20px 0 48px rgb(3 14 22 / 36%);
    max-width: calc(100vw - 52px);
    position: fixed;
    width: 290px;
  }

  body.dark-soft-admin .brand-mark {
    justify-content: space-between;
  }

  body.dark-soft-admin .brand-copy,
  body.dark-soft-admin .sidebar nav a span,
  body.dark-soft-admin .sidebar-account-link span,
  body.dark-soft-admin .sidebar form .btn span {
    display: inline;
  }

  body.dark-soft-admin .sidebar nav a,
  body.dark-soft-admin .sidebar-account-link,
  body.dark-soft-admin .sidebar form .btn {
    justify-content: flex-start;
  }

  body.dark-soft-admin .sidebar-toggle,
  body.dark-soft-admin .sidebar-close {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
  }

  body.dark-soft-admin.sidebar-open .sidebar-backdrop {
    background: rgb(1 4 9 / 72%);
  }
}

@media (max-width: 650px) {
  body.dark-soft-admin .content {
    padding: 14px 12px 28px;
  }

  body.dark-soft-admin .topbar {
    margin: -14px -12px 20px;
    padding: 0 12px;
  }
}

@media print {
  body.dark-soft-admin{
    background: #fff !important;
    color: #111827 !important;
  }
}

/* Proposal B alignment layer: compact shell, clean headers and card/tool surfaces. */
body.dark-soft-admin .app-frame {
  grid-template-columns: 132px minmax(0, 1fr);
}

body.dark-soft-admin .sidebar {
  gap: 26px;
  padding: 22px 8px 18px;
}

body.dark-soft-admin .brand-mark {
  border-bottom: 0;
  justify-content: center;
  margin-bottom: 18px;
  padding: 0;
}

body.dark-soft-admin .brand-dot {
  box-shadow: none;
  height: 42px;
  width: 42px;
}

body.dark-soft-admin .brand-copy {
  display: none;
}

body.dark-soft-admin .sidebar nav {
  gap: 7px;
}

body.dark-soft-admin .sidebar nav a,
body.dark-soft-admin .sidebar-account-link,
body.dark-soft-admin .sidebar form .btn {
  border-radius: 10px;
  min-height: 50px;
}

body.dark-soft-admin .sidebar nav a.active::before {
  display: none;
}

body.dark-soft-admin .content {
  padding: 34px 38px 46px;
}

body.dark-soft-admin .topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: -34px -38px 42px;
  min-height: 83px;
  padding: 0 34px;
}

body.dark-soft-admin .topbar-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

body.dark-soft-admin .topbar-heading h1 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

body.dark-soft-admin .topbar-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

body.dark-soft-admin .topbar-user {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: auto;
  min-width: 116px;
  padding-left: 16px;
  text-align: right;
}

body.dark-soft-admin .topbar-user strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

body.dark-soft-admin .topbar-user small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

body.dark-soft-admin .date-chip {
  display: none;
}

body.dark-soft-admin .admin-hero,
body.dark-soft-admin .catalog-page-head,
body.dark-soft-admin .module-heading,
body.dark-soft-admin .compact-page-head{
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 24px;
  overflow: visible;
  padding: 0;
}

body.dark-soft-admin .admin-hero::after,
body.dark-soft-admin .catalog-page-head::after,
body.dark-soft-admin .module-heading::after,
body.dark-soft-admin .compact-page-head::after{
  display: none;
}

body.dark-soft-admin .admin-hero h2,
body.dark-soft-admin .catalog-page-title,
body.dark-soft-admin .module-heading h2,
body.dark-soft-admin .compact-page-head h2{
  color: var(--ink);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.03;
  margin: 4px 0 8px;
  text-wrap: balance;
}

body.dark-soft-admin .admin-hero p,
body.dark-soft-admin .catalog-page-lead,
body.dark-soft-admin .module-heading p,
body.dark-soft-admin .compact-page-head p{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  max-width: 760px;
}

body.dark-soft-admin .admin-hero .eyebrow,
body.dark-soft-admin .catalog-page-kicker,
body.dark-soft-admin .module-heading .eyebrow,
body.dark-soft-admin .compact-page-head .eyebrow {
  color: var(--info);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 5px;
  text-transform: uppercase;
}

body.dark-soft-admin .admin-hero > .btn,
body.dark-soft-admin .admin-hero .hero-actions,
body.dark-soft-admin .catalog-page-actions,
body.dark-soft-admin .module-heading > .btn,
body.dark-soft-admin .compact-page-head > .btn {
  align-self: center;
  justify-self: end;
}

body.dark-soft-admin .admin-hero .hero-actions,
body.dark-soft-admin .catalog-page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.dark-soft-admin .btn,
body.dark-soft-admin .btn-lg {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

body.dark-soft-admin .btn-lg,
body.dark-soft-admin .admin-hero > .btn,
body.dark-soft-admin .catalog-page-actions .btn {
  border-radius: 10px;
  font-size: 15px;
  min-height: 44px;
  padding: 0 17px;
  width: auto;
}

body.dark-soft-admin .category-directory,
body.dark-soft-admin .product-table-panel{
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

body.dark-soft-admin .directory-toolbar {
  align-items: center;
  border-bottom: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 22px;
  padding: 0;
}

body.dark-soft-admin .catalog-filter,
body.dark-soft-admin .product-table-filter,
body.dark-soft-admin .module-filters{
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: none;
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  width: 100%;
}

body.dark-soft-admin .directory-toolbar .catalog-filter {
  margin: 0;
}

body.dark-soft-admin .catalog-filter {
  grid-template-columns: minmax(280px, 1fr) minmax(190px, .42fr) auto auto;
}

body.dark-soft-admin .product-table-filter,
body.dark-soft-admin .product-catalog-filter {
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(150px, .58fr)) auto;
}
body.dark-soft-admin .module-filters{
  grid-template-columns: minmax(280px, 1.25fr) repeat(2, minmax(155px, .55fr)) auto;
}

body.dark-soft-admin .catalog-filter .form-label,
body.dark-soft-admin .product-table-filter .form-label,
body.dark-soft-admin .module-filters .form-label{
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

body.dark-soft-admin .catalog-filter .search-control,
body.dark-soft-admin .product-table-filter .search-control,
body.dark-soft-admin .module-filters .search-control{
  min-width: 0;
  width: 100%;
}

body.dark-soft-admin .catalog-filter .form-control,
body.dark-soft-admin .catalog-filter .form-select,
body.dark-soft-admin .product-table-filter .form-control,
body.dark-soft-admin .product-table-filter .form-select,
body.dark-soft-admin .module-filters .form-control,
body.dark-soft-admin .module-filters .form-select{
  min-height: 46px;
}

body.dark-soft-admin .catalog-filter > .btn,
body.dark-soft-admin .product-table-filter > .btn,
body.dark-soft-admin .module-filters > .btn{
  min-height: 40px;
  padding-inline: 13px;
}

body.dark-soft-admin .directory-count,
body.dark-soft-admin .catalog-summary,
body.dark-soft-admin .catalog-finance-note {
  color: var(--muted);
}

body.dark-soft-admin .category-grid {
  gap: 14px;
}

body.dark-soft-admin .category-card {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: none;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 142px;
  overflow: hidden;
  padding: 18px;
  transform: none;
}

body.dark-soft-admin .category-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: none;
}

body.dark-soft-admin .category-card-title {
  align-items: center;
  gap: 12px;
}

body.dark-soft-admin .category-card h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

body.dark-soft-admin .category-card p {
  color: var(--muted);
  margin: 8px 0 10px;
  min-height: 0;
}

body.dark-soft-admin .category-card-copy > strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

body.dark-soft-admin .category-card-actions,
body.dark-soft-admin .product-admin-actions{
  background: transparent;
  border-top: 1px solid var(--border);
  box-shadow: none;
  justify-content: flex-start;
  margin-top: 12px;
  padding: 14px 0 0;
}

body.dark-soft-admin .category-card-actions {
  grid-column: 2;
}

body.dark-soft-admin .category-card-actions .btn,
body.dark-soft-admin .product-admin-actions .btn{
  min-height: 40px;
  padding-inline: 12px;
}

body.dark-soft-admin .product-admin-grid {
  gap: 18px;
}

body.dark-soft-admin .product-admin-card {
  border-radius: 18px;
}

body.dark-soft-admin .product-admin-image {
  background: #f8fafc;
  min-height: 204px;
}

body.dark-soft-admin .product-admin-content {
  padding: 18px;
}

body.dark-soft-admin .product-table-wrap,
body.dark-soft-admin .table-responsive {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: auto;
}

@media (max-width: 1100px) {
  body.dark-soft-admin .brand-mark {
    justify-content: space-between;
  }

  body.dark-soft-admin .brand-copy {
    display: block;
  }
}

@media (max-width: 900px) {
  body.dark-soft-admin .admin-hero,
  body.dark-soft-admin .catalog-page-head,
  body.dark-soft-admin .module-heading,
  body.dark-soft-admin .compact-page-head{
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.dark-soft-admin .admin-hero > .btn,
  body.dark-soft-admin .admin-hero .hero-actions,
  body.dark-soft-admin .catalog-page-actions,
  body.dark-soft-admin .module-heading > .btn,
  body.dark-soft-admin .compact-page-head > .btn {
    justify-self: stretch;
  }

  body.dark-soft-admin .admin-hero .hero-actions,
  body.dark-soft-admin .catalog-page-actions {
    justify-content: stretch;
  }

  body.dark-soft-admin .admin-hero .hero-actions .btn,
  body.dark-soft-admin .catalog-page-actions .btn,
  body.dark-soft-admin .admin-hero > .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.dark-soft-admin .content {
    padding: 18px 14px 30px;
  }

  body.dark-soft-admin .topbar {
    margin: -18px -14px 24px;
    padding: 0 14px;
  }

  body.dark-soft-admin .topbar-user {
    display: none;
  }

  body.dark-soft-admin .admin-hero h2,
  body.dark-soft-admin .catalog-page-title,
  body.dark-soft-admin .module-heading h2,
  body.dark-soft-admin .compact-page-head h2{
    font-size: 34px;
  }

  body.dark-soft-admin .directory-toolbar,
  body.dark-soft-admin .catalog-filter,
  body.dark-soft-admin .product-table-filter,
  body.dark-soft-admin .product-catalog-filter,
  body.dark-soft-admin .module-filters{
    grid-template-columns: 1fr;
  }

  body.dark-soft-admin .directory-count {
    justify-self: start;
  }

  body.dark-soft-admin .category-grid,
  body.dark-soft-admin .product-admin-grid {
    grid-template-columns: 1fr;
  }

  body.dark-soft-admin .category-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body.dark-soft-admin .category-card-actions {
    grid-column: 1 / -1;
  }
}

/* Complete Proposal B component migration: view switch, visual catalog, directories and confirmations. */
body.dark-soft-admin .sidebar-foot {
  align-items: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: auto;
}

body.dark-soft-admin .user-avatar {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

body.dark-soft-admin .sidebar-foot-actions {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

body.dark-soft-admin .sidebar-foot .sidebar-account-link,
body.dark-soft-admin .sidebar-foot form .btn {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 52px;
}

body.dark-soft-admin .sidebar-foot .sidebar-account-link:hover,
body.dark-soft-admin .sidebar-foot form .btn:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--ink);
}

body.dark-soft-admin .sidebar-foot .sidebar-account-link span,
body.dark-soft-admin .sidebar-foot form .btn span {
  display: none;
}

body.dark-soft-admin .catalog-toolbar {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
}

body.dark-soft-admin .product-catalog-toolbar {
  grid-template-columns: minmax(280px, 1.25fr) minmax(150px, .45fr) minmax(150px, .45fr) minmax(135px, .38fr) auto auto;
}

body.dark-soft-admin .category-catalog-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(180px, .42fr) auto auto;
}

body.dark-soft-admin .filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.dark-soft-admin .filter-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

body.dark-soft-admin .view-switch {
  align-items: center;
  align-self: end;
  background: var(--surface-soft);
  border: 1px solid var(--control-border, var(--border-strong));
  border-radius: 11px;
  display: inline-flex;
  height: 46px;
  padding: 4px;
}

body.dark-soft-admin .view-switch button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-weight: 800;
  gap: 7px;
  height: 36px;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

body.dark-soft-admin .view-switch button[aria-pressed="true"] {
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 2px var(--info), var(--shadow-sm);
  color: var(--info);
}

body.dark-soft-admin .product-catalog-shell {
  display: grid;
  gap: 0;
}

body.dark-soft-admin .category-catalog-shell {
  display: grid;
  gap: 0;
}

body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="cards"] .product-table-view,
body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="cards"] .product-compact-view,
body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="table"] .product-cards-view,
body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="table"] .product-compact-view {
  display: none;
}

body.dark-soft-admin .category-catalog-shell[data-catalog-view="cards"] .category-table-view,
body.dark-soft-admin .category-catalog-shell[data-catalog-view="cards"] .category-compact-view,
body.dark-soft-admin .category-catalog-shell[data-catalog-view="table"] .category-cards-view,
body.dark-soft-admin .category-catalog-shell[data-catalog-view="table"] .category-compact-view {
  display: none;
}

body.dark-soft-admin .product-cards-view {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.dark-soft-admin .category-cards-view {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.dark-soft-admin .category-catalog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

body.dark-soft-admin .category-catalog-card.is-inactive {
  background: var(--disabled-bg);
  opacity: .72;
}

body.dark-soft-admin .category-card-main {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
}

body.dark-soft-admin .category-card-kicker {
  color: var(--info);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 7px;
  text-transform: uppercase;
}

body.dark-soft-admin .category-catalog-card .category-card-title {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

body.dark-soft-admin .category-catalog-card h3 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0;
  min-width: 0;
}

body.dark-soft-admin .category-catalog-card .category-card-actions {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: auto;
  justify-content: flex-start;
  padding-top: 14px;
}

body.dark-soft-admin .category-catalog-card .category-card-actions form {
  margin: 0;
}

body.dark-soft-admin .category-catalog-card .category-card-actions .btn {
  min-height: 40px;
  padding-inline: 12px;
}

body.dark-soft-admin .category-table {
  min-width: 760px;
}

body.dark-soft-admin .category-table .product-table-identity {
  max-width: none;
}

body.dark-soft-admin .category-table-icon {
  background: var(--info-soft);
  border-color: var(--border);
  color: var(--info);
}

body.dark-soft-admin .category-compact-view {
  display: none;
  gap: 10px;
}

body.dark-soft-admin .product-catalog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow: hidden;
}

body.dark-soft-admin .product-catalog-card.is-inactive {
  opacity: .72;
}

body.dark-soft-admin .product-card-media {
  aspect-ratio: 16 / 9.6;
  background: #f8fafc;
  display: grid;
  min-height: 198px;
  overflow: hidden;
  place-items: center;
  position: relative;
}

body.dark-soft-admin .product-card-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body.dark-soft-admin .product-card-media .status-badge {
  left: 14px;
  position: absolute;
  top: 14px;
}

body.dark-soft-admin .product-monogram {
  align-items: center;
  background: var(--info-soft);
  border: 1px solid var(--info);
  border-radius: 999px;
  color: var(--info);
  display: inline-flex;
  font-size: 36px;
  font-weight: 900;
  height: 92px;
  justify-content: center;
  width: 92px;
}

body.dark-soft-admin .product-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

body.dark-soft-admin .product-card-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

body.dark-soft-admin .product-card-category {
  color: var(--info);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

body.dark-soft-admin .product-card-body h3 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.18;
  margin: 0;
}

body.dark-soft-admin .product-card-measure {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

body.dark-soft-admin .product-card-price {
  color: var(--ink);
  flex: 0 0 auto;
  text-align: right;
}

body.dark-soft-admin .product-card-price strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

body.dark-soft-admin .product-card-price span,
body.dark-soft-admin .product-card-stock span {
  color: var(--muted);
  font-size: 11px;
}

body.dark-soft-admin .chip-row,
body.dark-soft-admin .table-usage {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.dark-soft-admin .chip {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  min-height: 27px;
  padding: 4px 8px;
}

body.dark-soft-admin .chip--sale {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

body.dark-soft-admin .chip--base {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}

body.dark-soft-admin .chip--prepared {
  background: var(--prepared-soft, #251a35);
  border-color: var(--prepared, #d2a8ff);
  color: var(--prepared, #d2a8ff);
}

body.dark-soft-admin .chip--inventory {
  background: var(--surface-soft);
  color: var(--muted);
}

body.dark-soft-admin .product-card-stock {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 12px;
}

body.dark-soft-admin .product-card-stock b {
  color: var(--ink);
  font-size: 12px;
}

body.dark-soft-admin .product-card-actions,
body.dark-soft-admin .directory-card-actions {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 14px;
}

body.dark-soft-admin .product-card-actions form,
body.dark-soft-admin .directory-card-actions form {
  margin: 0;
}

body.dark-soft-admin .product-card-actions .btn,
body.dark-soft-admin .directory-card-actions .btn {
  min-height: 40px;
  padding-inline: 12px;
}

body.dark-soft-admin .product-compact-view {
  display: grid;
  gap: 10px;
}

body.dark-soft-admin .product-compact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

body.dark-soft-admin .product-compact-item summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  list-style: none;
  padding: 12px;
}

body.dark-soft-admin .product-compact-item summary::-webkit-details-marker {
  display: none;
}

body.dark-soft-admin .product-compact-item b,
body.dark-soft-admin .product-compact-item small {
  display: block;
}

body.dark-soft-admin .product-compact-item small {
  color: var(--muted);
}

body.dark-soft-admin .product-compact-body {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  padding: 12px;
}

body.dark-soft-admin .directory-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.dark-soft-admin .directory-card {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
  padding: 18px;
}

body.dark-soft-admin .directory-card.is-inactive {
  opacity: .72;
}

body.dark-soft-admin .directory-card-icon{
  align-items: center;
  background: var(--info-soft);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--info);
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

body.dark-soft-admin .directory-card-main {
  min-width: 0;
}

body.dark-soft-admin .directory-card-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

body.dark-soft-admin .directory-card-title small {
  color: var(--info);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

body.dark-soft-admin .directory-card-title h3 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

body.dark-soft-admin .directory-card-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

body.dark-soft-admin .directory-card-meta span {
  color: var(--muted);
  font-size: 13px;
}

body.dark-soft-admin .alert-card-list{
  display: grid;
  gap: 10px;
}

body.dark-soft-admin .app-confirm-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-width: min(460px, calc(100vw - 28px));
  padding: 0;
}

body.dark-soft-admin .app-confirm-dialog::backdrop {
  background: rgb(1 4 9 / 72%);
  backdrop-filter: blur(5px);
}

body.dark-soft-admin .app-confirm-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

body.dark-soft-admin .app-confirm-icon {
  align-items: center;
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  border-radius: 999px;
  color: var(--warning);
  display: inline-flex;
  font-size: 25px;
  height: 54px;
  justify-content: center;
  justify-self: center;
  width: 54px;
}

body.dark-soft-admin .app-confirm-surface h2,
body.dark-soft-admin .app-confirm-surface p {
  margin: 0;
}

body.dark-soft-admin .confirm-eyebrow {
  color: var(--warning);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.dark-soft-admin .app-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 1180px) {
  body.dark-soft-admin .product-catalog-toolbar {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(150px, .5fr)) auto;
  }

  body.dark-soft-admin .category-catalog-toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(150px, .55fr) auto auto;
  }

  body.dark-soft-admin .product-catalog-toolbar .filter-field:nth-of-type(3),
  body.dark-soft-admin .product-catalog-toolbar .view-switch {
    grid-column: auto;
  }

  body.dark-soft-admin .product-cards-view,
  body.dark-soft-admin .category-cards-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="table"] .product-table-view {
    display: none;
  }

  body.dark-soft-admin .product-catalog-shell[data-product-catalog-view="table"] .product-compact-view {
    display: grid;
  }

  body.dark-soft-admin .category-catalog-shell[data-catalog-view="table"] .category-table-view {
    display: none;
  }

  body.dark-soft-admin .category-catalog-shell[data-catalog-view="table"] .category-compact-view {
    display: grid;
  }
}

@media (max-width: 760px) {
  body.dark-soft-admin .product-catalog-toolbar,
  body.dark-soft-admin .category-catalog-toolbar,
  body.dark-soft-admin .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  body.dark-soft-admin .view-switch {
    width: 100%;
  }

  body.dark-soft-admin .view-switch button {
    flex: 1;
  }

  body.dark-soft-admin .product-cards-view,
  body.dark-soft-admin .category-cards-view,
  body.dark-soft-admin .directory-card-grid {
    grid-template-columns: 1fr;
  }

  body.dark-soft-admin .product-card-top,
  body.dark-soft-admin .product-card-stock,
  body.dark-soft-admin .category-catalog-card .category-card-title,
  body.dark-soft-admin .directory-card-title {
    align-items: flex-start;
    flex-direction: column;
  }

  body.dark-soft-admin .product-card-price {
    text-align: left;
  }

  body.dark-soft-admin .app-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Centered auth experience */
body.dark-soft-admin.login-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    linear-gradient(180deg, var(--page), #0b1119);
  background-size: 92px 92px, 92px 92px, 100% 100%;
}

body.dark-soft-admin .auth-centered-login {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 42px);
  background:
    linear-gradient(rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    linear-gradient(180deg, var(--page), #0b1119);
  background-size: 92px 92px, 92px 92px, 100% 100%;
}

body.dark-soft-admin .auth-centered-login::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 0;
  border: 1px solid rgb(61 74 87 / 42%);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

body.dark-soft-admin .auth-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(88 166 255 / 3.4%) 1px, transparent 1px),
    rgb(15 23 32 / 98%);
  background-size: 92px 92px, 92px 92px, 100% 100%;
  animation: authBootAway 760ms cubic-bezier(.22, 1, .36, 1) 1500ms forwards;
}

body.dark-soft-admin .auth-boot-content {
  display: grid;
  gap: 22px;
  justify-items: center;
  opacity: 0;
  transform: translateY(16px) scale(.98);
  animation: authBootIn 720ms cubic-bezier(.22, 1, .36, 1) 140ms forwards;
}

body.dark-soft-admin .auth-boot-content h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(54px, 9vw, 118px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: .9;
  text-align: center;
}

body.dark-soft-admin .auth-boot-content span {
  width: min(430px, 52vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #223144;
}

body.dark-soft-admin .auth-boot-content span::after {
  content: "";
  display: block;
  width: 52%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--info), #9fd0ff, transparent);
  transform: translateX(-110%);
  animation: authBootLine 940ms cubic-bezier(.22, 1, .36, 1) 520ms forwards;
}

body.dark-soft-admin .auth-card-wrap {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 36px));
  min-width: 0;
}

body.dark-soft-admin .auth-login-entry:not(.has-auth-feedback) .auth-card-wrap {
  opacity: 0;
  transform: translateY(12px);
  animation: authCardIn 640ms cubic-bezier(.22, 1, .36, 1) 1780ms forwards;
}

html.auth-boot-seen body.dark-soft-admin .auth-boot-screen {
  display: none;
}

html.auth-boot-seen body.dark-soft-admin .auth-login-entry:not(.has-auth-feedback) .auth-card-wrap {
  opacity: 1;
  transform: none;
  animation: none;
}

body.dark-soft-admin .auth-login-card {
  width: 100%;
  min-width: 0;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgb(22 31 42 / 98%), rgb(17 25 35 / 98%));
  box-shadow: var(--shadow-lg);
}

body.dark-soft-admin .auth-login-card.auth-result-card {
  text-align: left;
}

body.dark-soft-admin .auth-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--info);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

body.dark-soft-admin .auth-login-card h1 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 36px);
  font-weight: 920;
  letter-spacing: 0;
  line-height: 1.08;
}

body.dark-soft-admin .auth-card-note {
  margin: -14px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

body.dark-soft-admin .auth-login-card .form-label {
  margin-bottom: 8px;
  color: #d8e3ef;
  font-size: 13px;
  font-weight: 900;
}

body.dark-soft-admin .auth-input {
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid #607087;
  border-radius: var(--radius-sm);
  background: #2d3b4e;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.dark-soft-admin .auth-input:focus-within {
  border-color: var(--info);
  background: #33445b;
  box-shadow: 0 0 0 3px rgb(88 166 255 / 13%);
}

body.dark-soft-admin .auth-input > i {
  position: static;
  transform: none;
  width: 42px;
  flex: 0 0 auto;
  color: #9eadbf;
  font-size: 14px;
  text-align: center;
}

body.dark-soft-admin .auth-input .form-control {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  outline: 0;
  padding: 0 12px 0 0;
}

body.dark-soft-admin .auth-input .form-control:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

body.dark-soft-admin .auth-input .form-control:-webkit-autofill,
body.dark-soft-admin .auth-input .form-control:-webkit-autofill:hover,
body.dark-soft-admin .auth-input .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #2d3b4e inset;
}

body.dark-soft-admin .password-visibility-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-right: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #d4deea;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.dark-soft-admin .password-visibility-toggle:hover,
body.dark-soft-admin .password-visibility-toggle:focus-visible {
  border-color: rgb(88 166 255 / 35%);
  background: rgb(88 166 255 / 8%);
  color: var(--info);
  outline: 0;
}

body.dark-soft-admin .password-visibility-toggle i {
  position: static;
  width: auto;
  color: currentColor;
  font-size: 16px;
  pointer-events: none;
  transform: none;
}

body.dark-soft-admin .auth-alert {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 42px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

body.dark-soft-admin .auth-alert i {
  font-size: 16px;
}

body.dark-soft-admin .auth-alert span {
  min-width: 0;
}

body.dark-soft-admin .auth-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: 16px 0 22px;
}

body.dark-soft-admin .auth-inline-actions.single {
  justify-content: flex-end;
}

body.dark-soft-admin .auth-inline-actions.with-remember {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

body.dark-soft-admin .auth-remember-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

body.dark-soft-admin .auth-remember-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.dark-soft-admin .auth-remember-box {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #607087;
  border-radius: 4px;
  background: rgb(88 166 255 / 8%);
  color: #06121f;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

body.dark-soft-admin .auth-remember-box i {
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transition: opacity .16s ease;
}

body.dark-soft-admin .auth-remember-option input:checked + .auth-remember-box {
  border-color: var(--info);
  background: var(--info);
  box-shadow: 0 0 0 3px rgb(88 166 255 / 14%);
}

body.dark-soft-admin .auth-remember-option input:checked + .auth-remember-box i {
  opacity: 1;
}

body.dark-soft-admin .auth-remember-option input:focus-visible + .auth-remember-box {
  border-color: #79bbff;
  box-shadow: 0 0 0 3px rgb(88 166 255 / 22%);
}

body.dark-soft-admin .auth-remember-option:hover {
  color: var(--text);
}

body.dark-soft-admin .auth-inline-actions a {
  color: var(--info);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

body.dark-soft-admin .auth-inline-actions a:hover,
body.dark-soft-admin .auth-inline-actions a:focus-visible {
  color: #79bbff;
  text-decoration: none;
}

body.dark-soft-admin .auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  border: 1px solid rgb(126 231 135 / 55%);
  border-radius: var(--radius-sm);
  background: #238636;
  box-shadow: 0 16px 34px rgb(35 134 54 / 22%);
  color: #fff;
  font-weight: 900;
}

body.dark-soft-admin .auth-login-card .auth-submit {
  margin-top: 24px;
}

body.dark-soft-admin .auth-submit:hover,
body.dark-soft-admin .auth-submit:focus-visible {
  border-color: rgb(126 231 135 / 70%);
  background: #2ea043;
  box-shadow: 0 18px 38px rgb(35 134 54 / 30%);
  color: #fff;
}

body.dark-soft-admin .auth-result-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: var(--info);
  font-size: 24px;
}

@keyframes authBootIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authBootLine {
  to {
    transform: translateX(220%);
  }
}

@keyframes authBootAway {
  to {
    opacity: 0;
    visibility: hidden;
    transform: scale(.985);
  }
}

@keyframes authCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 650px) {
  body.dark-soft-admin .auth-centered-login {
    align-items: center;
    padding: 20px;
  }

  body.dark-soft-admin .auth-centered-login::before {
    inset: 10px;
  }

  body.dark-soft-admin .auth-card-wrap {
    width: 100%;
  }

  body.dark-soft-admin .auth-login-card {
    padding: 30px 24px;
  }

  body.dark-soft-admin .auth-inline-actions.with-remember {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  body.dark-soft-admin .auth-boot-content h1 {
    font-size: clamp(46px, 16vw, 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.dark-soft-admin .auth-boot-screen,
  body.dark-soft-admin .auth-boot-content,
  body.dark-soft-admin .auth-boot-content span::after,
  body.dark-soft-admin .auth-login-entry:not(.has-auth-feedback) .auth-card-wrap {
    animation-delay: 0ms !important;
    animation-duration: 1ms !important;
  }
}

/* Desktop collapsible sidebar: the LJ mark is the expand/compact control. */
body.dark-soft-admin .brand-dot {
  border: 1px solid var(--control-border);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

body.dark-soft-admin .brand-dot:hover,
body.dark-soft-admin .brand-dot:focus-visible {
  background: var(--info-soft);
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgb(88 166 255 / 14%);
  color: var(--info-pressed);
  outline: 0;
  transform: translateY(-1px);
}

@media (min-width: 1101px) {
  body.dark-soft-admin .app-frame {
    grid-template-columns: 132px minmax(0, 1fr);
    transition: grid-template-columns .22s ease;
  }

  body.dark-soft-admin.sidebar-expanded .app-frame {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  body.dark-soft-admin .sidebar {
    overflow-x: hidden;
    transition: gap .22s ease, padding .22s ease;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar {
    gap: 18px;
    padding: 22px 14px 18px;
  }

  body.dark-soft-admin.sidebar-expanded .brand-mark {
    border-bottom: 1px solid var(--border);
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 8px;
    padding-bottom: 16px;
  }

  body.dark-soft-admin.sidebar-expanded .brand-copy {
    display: block;
  }

  body.dark-soft-admin.sidebar-expanded .brand-copy strong {
    color: var(--ink);
    display: block;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.dark-soft-admin.sidebar-expanded .brand-copy small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    line-height: 1.2;
    margin-top: 2px;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar nav a,
  body.dark-soft-admin.sidebar-expanded .sidebar-account-link,
  body.dark-soft-admin.sidebar-expanded .sidebar form .btn {
    gap: 11px;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    width: 100%;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar nav a span,
  body.dark-soft-admin.sidebar-expanded .sidebar-account-link span,
  body.dark-soft-admin.sidebar-expanded .sidebar form .btn span {
    display: inline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar nav a i,
  body.dark-soft-admin.sidebar-expanded .sidebar-account-link i,
  body.dark-soft-admin.sidebar-expanded .sidebar form .btn i {
    flex: 0 0 22px;
    font-size: 17px;
    text-align: center;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar-foot {
    align-items: stretch;
    justify-items: stretch;
  }

  body.dark-soft-admin.sidebar-expanded .user-avatar {
    justify-self: start;
  }

  body.dark-soft-admin.sidebar-expanded .sidebar-foot-actions {
    justify-items: stretch;
  }
}

/* Shell autenticado: la navegación permanece estable y solo se desplaza el módulo. */
@media (min-width: 1101px) {
  body.dark-soft-admin:not(.login-shell) {
    height: 100dvh;
    overflow: hidden;
  }

  body.dark-soft-admin:not(.login-shell) .app-frame {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.dark-soft-admin:not(.login-shell) .sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    top: auto;
  }

  body.dark-soft-admin:not(.login-shell) .brand-mark,
  body.dark-soft-admin:not(.login-shell) .sidebar-foot {
    flex: 0 0 auto;
  }

  body.dark-soft-admin:not(.login-shell) .sidebar nav {
    flex: 1 1 auto;
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  body.dark-soft-admin:not(.login-shell) .content {
    height: 100%;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 0;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.dark-soft-admin:not(.login-shell) .topbar {
    background: var(--graphite-950);
    backdrop-filter: none;
    margin: 0 -38px 42px;
  }
}

/* El scroll principal vive en .content; los estados modales también deben bloquearlo. */
body.product-editor-shell .content,
body.catalog-editor-shell .content,
body.modal-open .content,
body.app-dialog-open .content {
  overflow-y: hidden !important;
}

body.app-dialog-open,
body.unsaved-dialog-open {
  overflow: hidden;
}

body.unsaved-dialog-open .s01-editor-scroll,
body.unsaved-dialog-open .catalog-editor-body {
  overflow-y: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

/* Advertencia compartida para abandonar formularios con cambios pendientes. */
body.dark-soft-admin .app-unsaved-dialog {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
}

body.dark-soft-admin .app-unsaved-dialog:not([open]) {
  display: none;
}

body.dark-soft-admin .app-unsaved-dialog::backdrop {
  background: rgb(1 4 9 / 80%);
  backdrop-filter: blur(5px);
}

body.dark-soft-admin .app-unsaved-dialog.is-fallback {
  position: fixed;
  inset: 0;
  z-index: 1200;
  height: fit-content;
  margin: auto;
  box-shadow: 0 0 0 100vmax rgb(1 4 9 / 80%);
}

body.dark-soft-admin .app-unsaved-dialog .app-confirm-icon {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

body.dark-soft-admin .app-unsaved-dialog .confirm-eyebrow {
  color: var(--danger);
}

body.dark-soft-admin .app-unsaved-discard {
  min-height: 44px;
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
}

body.dark-soft-admin .app-unsaved-discard:hover,
body.dark-soft-admin .app-unsaved-discard:focus-visible {
  border-color: var(--danger);
  background: #421c21;
  color: var(--danger);
}
