/* =========================================================================
   Depot ERP · Sistema de diseño (basado en DESIGN.md "Depot Turbo POS & ERP")
   Sin atajos de teclado F1–F12: todas las acciones son botones visibles.
   ========================================================================= */

:root {
  --asphalt-900: #111418;
  --asphalt-800: #1E232A;
  --asphalt-700: #2B303A;
  --asphalt-600: #3A404B;

  --brand: #8CB82B;
  --brand-hover: #7DA625;
  --brand-ink: #111418;
  --brand-tint: #F1F7E3;
  --brand-text: #4A6700;

  --canvas: #F4F5F7;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --row-hover: #F8FAF3;

  --text: #151C27;
  --text-2: #4B5563;
  --text-3: #6B7280;

  --ok: #15803D;      --ok-bg: #E8F5EC;
  --warn: #B45309;    --warn-bg: #FEF3E2;
  --danger: #DC2626;  --danger-bg: #FDECEC;
  --info: #0369A1;    --info-bg: #E6F3FA;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --shadow-1: 0 1px 2px rgba(17, 20, 24, .06);
  --shadow-2: 0 4px 16px rgba(17, 20, 24, .12);
  --shadow-3: 0 12px 32px rgba(17, 20, 24, .24);

  --sidebar-w: 64px;
  --topbar-h: 56px;
  --font: "Roboto Flex", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; line-height: 28px; }
h2 { font-size: 18px; line-height: 24px; }
h3 { font-size: 15px; line-height: 20px; }
p { margin: 0 0 8px; }
.num, .tnum, td.num, .money { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; line-height: 16px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ---------- Shell ---------- */
.app {
  display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--asphalt-900) var(--sidebar-w), var(--canvas) var(--sidebar-w));
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--asphalt-900);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 4px; z-index: 30;
}
.sidebar .brand-mark {
  width: 44px; height: 44px; border-radius: var(--r-lg);
  display: grid; place-items: center; margin-bottom: 12px;
  background: var(--asphalt-800);
}
.sidebar .brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link {
  position: relative; width: 44px; height: 44px; border-radius: var(--r-lg);
  display: grid; place-items: center; color: #AEB4BF;
  transition: background .15s, color .15s;
}
.side-link:hover { background: var(--asphalt-700); color: #fff; text-decoration: none; }
.side-link.is-active { background: var(--brand); color: var(--brand-ink); }
.side-link.is-soon { color: #5B6270; cursor: default; }
.side-link.is-soon:hover { background: transparent; color: #6E7684; }
.side-link[data-label]:hover::after {
  content: attr(data-label);
  position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
  background: var(--asphalt-800); color: #fff; font-size: 12px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--r-md); white-space: nowrap;
  box-shadow: var(--shadow-2); pointer-events: none;
}
.sidebar .side-bottom { display: flex; flex-direction: column; gap: 4px; }
.sidebar form { margin: 0; }
.sidebar button.side-link { border: 0; background: none; cursor: pointer; }
.sidebar button.side-link:hover { background: var(--asphalt-700); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; min-width: 0; }
.topbar .crumbs strong { color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.context-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text-2); font-size: 13px;
  background: var(--canvas);
}
.context-pill:hover { border-color: var(--brand); text-decoration: none; }
.context-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--asphalt-800); color: var(--brand); font-weight: 700; font-size: 13px;
}
.user-chip .who { line-height: 16px; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who span { font-size: 12px; color: var(--text-3); }

.content { padding: 20px; max-width: 1600px; width: 100%; }

/* ---------- Encabezado de página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { color: var(--text-3); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  font: 600 13px/1 var(--font); letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn-dark { background: var(--asphalt-800); color: #fff; }
.btn-dark:hover { background: var(--asphalt-700); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--canvas); color: var(--text); }
.btn-danger { background: var(--card); color: var(--danger); border-color: #F3C4C4; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 30px; height: 30px; padding: 0; }
.inline-form { display: inline; margin: 0; }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-body { padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }

/* ---------- KPIs ---------- */
.kpi { padding: 16px; }
.kpi .label { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
.kpi .value { font-size: 28px; line-height: 36px; font-weight: 700; margin-top: 4px; font-feature-settings: "tnum" 1; }
.kpi .hint { font-size: 12px; color: var(--text-3); }
.kpi.is-warn .value { color: var(--warn); }

/* ---------- Barra de herramientas / filtros ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.search {
  position: relative; flex: 1; min-width: 240px; max-width: 520px;
}
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { padding-left: 34px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text-2); font-size: 13px;
}
.chip:hover { border-color: var(--text-3); text-decoration: none; }
.chip.is-active { background: var(--asphalt-800); border-color: var(--asphalt-800); color: #fff; }

/* ---------- Tablas densas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); background: #FAFAFB; white-space: nowrap;
}
.table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--row-hover); }
.table tbody tr.is-inactive td { color: var(--text-3); }
.table td.num, .table th.num { text-align: right; }
.table .row-link { color: var(--text); font-weight: 500; }
.table .one-line { display: block; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .row-link:hover { color: var(--brand-text); }
.table .sub { display: block; font-size: 12px; color: var(--text-3); }
.thumb {
  width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--border);
  object-fit: contain; background: #fff; display: block;
}
.thumb-empty { display: grid; place-items: center; color: var(--border-strong); }
.spec { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; color: var(--text-3); font-size: 13px; }

.pagination { display: flex; gap: 4px; }
.pagination a, .pagination span {
  min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-2); font-size: 13px;
}
.pagination .is-current { background: var(--asphalt-800); color: #fff; border-color: var(--asphalt-800); }
.pagination a:hover { border-color: var(--text-3); text-decoration: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--canvas); color: var(--text-2);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-tint); color: var(--brand-text); }
.badge-dark { background: var(--asphalt-800); color: #fff; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-4 { grid-column: 1 / -1; }
.field label, .label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); margin-bottom: 6px;
}
.field .req { color: var(--danger); }
.input, .select, .textarea,
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=search], .field select, .field textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--text); font: 400 14px/20px var(--font);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea, .textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field select, .select { padding-right: 32px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(140, 184, 43, .22);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12px; margin: 4px 0 0; }
.field-hint { color: var(--text-3); font-size: 12px; margin: 4px 0 0; }
.input-group { display: flex; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border-strong); background: var(--canvas);
  color: var(--text-3); font-size: 13px;
}
.input-group .addon:first-child { border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .addon:last-child { border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group input { border-radius: 0 !important; }
.input-group input:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm) !important; }
.input-group input:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0 !important; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-text); }
.form-section-title {
  grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px;
}
.form-section-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border); background: #FAFAFB; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.form-actions.sticky { position: sticky; bottom: 0; z-index: 5; }
.perm-group { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; }
.perm-group h4 { font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.perm-group .check { display: flex; padding: 4px 0; font-size: 13px; }

/* ---------- Alertas ---------- */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-lg);
  border: 1px solid transparent; font-size: 14px;
}
.alert-success { background: var(--ok-bg); color: #14532D; border-color: #BFE3CB; }
.alert-error { background: var(--danger-bg); color: #7F1D1D; border-color: #F3C4C4; }
.alert-info { background: var(--info-bg); color: #0C4A6E; border-color: #BCDDEF; }
.alert-warning { background: var(--warn-bg); color: #78350F; border-color: #F5D7A8; }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; }

/* ---------- Estados vacíos ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--text-3); }
.empty .icon { color: var(--border-strong); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- Galería e imágenes de producto ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gallery-item { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: #fff; position: relative; }
.gallery-item.is-primary { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(140, 184, 43, .35); }
.gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; background: #fff; }
.gallery-item .tag { position: absolute; top: 6px; left: 6px; }
.gallery-item .actions { display: flex; justify-content: space-between; padding: 4px; border-top: 1px solid var(--border); background: #FAFAFB; }
.gallery-item .actions form { margin: 0; }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: #FAFAFB;
  padding: 20px; text-align: center; color: var(--text-3); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-text); }
.dropzone input[type=file] { display: none; }
.dropzone strong { color: var(--text); display: block; margin: 6px 0 2px; }
.hero-image { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; aspect-ratio: 4 / 3; overflow: hidden; }
.hero-image img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 12px 14px; color: var(--text-3); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; flex-shrink: 0;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { color: var(--text); border-bottom-color: var(--brand); }

/* ---------- Drawer lateral derecho ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17, 20, 24, .45); z-index: 40; display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%;
  background: var(--card); box-shadow: var(--shadow-3); z-index: 50; display: none; flex-direction: column;
}
.drawer.is-open, .drawer-backdrop.is-open { display: flex; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 16px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.drawer .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Lista de definiciones ---------- */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; }

/* ---------- Login ---------- */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-brand {
  background: radial-gradient(ellipse at 30% 40%, rgba(140, 184, 43, .14), transparent 60%), var(--canvas);
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; gap: 24px;
  border-right: 1px solid var(--border);
}
.auth-brand img { width: min(440px, 80%); height: auto; }
.auth-brand p { color: var(--text-3); text-align: center; max-width: 380px; font-size: 15px; line-height: 22px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 26px; line-height: 32px; margin-bottom: 6px; }
.auth-card .lead { color: var(--text-3); margin-bottom: 28px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .field input { height: 44px; font-size: 15px; }
.password-wrap { position: relative; }
.password-wrap button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  color: var(--text-3); cursor: pointer; padding: 6px;
}
.auth-foot { margin-top: 28px; color: var(--text-3); font-size: 12px; text-align: center; }
.branch-list { display: grid; gap: 8px; }
.branch-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); cursor: pointer; background: #fff;
}
.branch-option:hover { border-color: var(--brand); }
.branch-option input { accent-color: var(--brand-text); }

/* ---------- Instalador ---------- */
.install-wrap { max-width: 920px; margin: 32px auto; padding: 0 16px; }
.install-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.install-head img { height: 56px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .layout-side { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .span-3 { grid-column: 1 / -1; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-brand img { width: 240px; }
  .auth-brand p { display: none; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .user-chip .who { display: none; }
}
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: 56px; width: 100%;
    flex-direction: row; padding: 0 8px; justify-content: space-between; overflow-x: auto;
  }
  .sidebar .brand-mark, .sidebar .side-bottom { display: none; }
  .sidebar nav { flex-direction: row; }
  .side-link[data-label]:hover::after { display: none; }
  .content { padding: 16px 16px 72px; }
  .topbar { padding: 0 16px; }
  .context-pill span.long { display: none; }
  .form-grid, .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: 1 / -1; }
}

.stat-value { font-size: 24px; line-height: 32px; font-weight: 700; font-feature-settings: "tnum" 1; margin-top: 2px; }

/* =========================================================================
   Punto de venta (Fase 2)
   ========================================================================= */
.content.content-full { padding: 0; max-width: none; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--topbar-h)); overflow: hidden; }
.pos-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--border); }
.pos-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pos-bar .shift { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-right: auto; }
.pos-bar .shift .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pos-search { padding: 12px 16px 8px; background: var(--card); }
.pos-search .search { max-width: none; }
.pos-search input { height: 44px; font-size: 15px; }
.pos-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 16px 12px; background: var(--card); border-bottom: 1px solid var(--border); }
.pos-filters .select, .pos-filters .input { height: 32px; font-size: 13px; width: auto; }
.pos-results { flex: 1; min-height: 0; overflow: auto; background: var(--card); }
.pos-results .table th { position: sticky; top: 0; z-index: 2; }
.pos-results .table td { padding: 6px 10px; }
.pos-results .table th { padding: 8px 10px; }
.pos-results tr { cursor: pointer; }
.pos-results tr.is-selected td { background: var(--brand-tint); }
.pos-results tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.pos-results .thumb { width: 36px; height: 36px; }
.pos-results .name { display: block; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.stockline { font-family: var(--mono); font-size: 12px; white-space: nowrap; color: var(--text-2); }
.stockline b { font-weight: 600; color: var(--text); }
.stockline .here { color: var(--text); font-weight: 600; }
.pos-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-top: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--text-3); }
.btn-add { width: 30px; height: 30px; padding: 0; border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink); border: 0; cursor: pointer; display: inline-grid; place-items: center; }
.btn-add:hover { background: var(--brand-hover); }

.pos-panel { display: flex; flex-direction: column; background: var(--card); min-height: 0; overflow: hidden; }
.pos-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); background: var(--canvas); }
.pos-tabs button { height: 38px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--card); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pos-tabs button.is-active { background: var(--asphalt-800); color: #fff; border-color: var(--asphalt-800); }
.pos-tabs .count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.pos-pane { flex: 1; overflow-y: auto; padding: 14px; min-height: 0; }
.pos-pane[hidden] { display: none; }
.pos-pane-foot { border-top: 1px solid var(--border); padding: 12px 14px; background: var(--card); }

.ficha-img { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.ficha-img img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.ficha-img .tag { position: absolute; left: 8px; bottom: 8px; }
.ficha-thumbs { display: flex; gap: 6px; margin-top: 6px; }
.ficha-thumbs img { width: 46px; height: 46px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; background: #fff; }
.ficha-thumbs img.is-active { border-color: var(--brand); }
.ficha h2 { font-size: 16px; line-height: 22px; margin: 12px 0 2px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.specs div { border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 10px; }
.specs span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.specs b { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 6px; }
.wh-list { display: grid; gap: 4px; }
.wh { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: 13px; }
.wh.is-other { color: var(--text-3); background: #FAFAFB; }
.wh.is-source { border-color: var(--brand); background: var(--brand-tint); }
.wh .qty { margin-left: auto; font-family: var(--mono); font-weight: 600; }
.wh .sub { display: block; font-size: 11.5px; color: var(--text-3); }
.pos-results td.stock-cell { white-space: nowrap; }
.qty-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.qty-pick button, .qty-pick input { height: 34px; min-width: 44px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: #fff; font: 600 13px var(--font); cursor: pointer; padding: 0 10px; }
.qty-pick button.is-active { background: var(--asphalt-800); color: #fff; border-color: var(--asphalt-800); }
.qty-pick input { width: 70px; cursor: text; font-weight: 400; }
.price-big { font-size: 24px; font-weight: 700; font-feature-settings: "tnum" 1; }

.ticket-client { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 8px; }
.ticket-client .who { flex: 1; min-width: 0; }
.ticket-client .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-extra { display: grid; grid-template-columns: 1fr 110px; gap: 6px; margin-bottom: 10px; }
.ticket-extra input { height: 32px; font-size: 13px; }
.tline { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tline .nm { font-size: 13px; font-weight: 500; line-height: 18px; }
.tline .meta { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.tline .amt { text-align: right; font-weight: 600; font-feature-settings: "tnum" 1; }
.tline .amt s { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.tline .ctrls { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.stepper { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 28px; height: 28px; border: 0; background: #FAFAFB; cursor: pointer; font-size: 16px; line-height: 1; }
.stepper input { width: 46px; height: 28px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font: 600 13px var(--font); }
.disc-input { width: 64px; height: 28px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0 6px; font-size: 12px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; margin-bottom: 10px; }
.totals .tnum, .totals span:nth-child(even) { text-align: right; font-feature-settings: "tnum" 1; }
.totals .grand { font-size: 20px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--border); }
.btn-cobrar { height: 52px; font-size: 16px; width: 100%; }
.warn-line { font-size: 12px; color: var(--warn); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }

/* Modales */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17, 20, 24, .65); z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.is-open { display: flex; }
.modal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-3); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal.modal-lg { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.pay-total { text-align: center; margin-bottom: 14px; }
.pay-total .label { margin: 0; }
.pay-total .v { font-size: 36px; font-weight: 700; font-feature-settings: "tnum" 1; line-height: 44px; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.pay-methods button { height: 64px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 600 12px var(--font); color: var(--text-2); }
.pay-methods button:hover { border-color: var(--brand); color: var(--text); }
.pay-row { display: grid; grid-template-columns: 140px 1fr 1fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.pay-row .input { height: 36px; }
.pay-quick { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.pay-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pay-summary div { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px; }
.pay-summary b { display: block; font-size: 20px; font-feature-settings: "tnum" 1; }
.pay-summary .change b { color: var(--ok); }
.pay-summary .pending b { color: var(--danger); }
.pay-done { text-align: center; padding: 12px 0; }
.pay-done .icon-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: inline-grid; place-items: center; margin-bottom: 8px; }
.pay-done .change { font-size: 40px; font-weight: 700; color: var(--ok); font-feature-settings: "tnum" 1; }
.list-select { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; margin-top: 10px; }
.list-select button { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: var(--r-md); padding: 8px 10px; cursor: pointer; font: 14px var(--font); }
.list-select button:hover { border-color: var(--brand); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--asphalt-800); color: #fff; padding: 10px 16px; border-radius: var(--r-lg); box-shadow: var(--shadow-2); z-index: 80; font-size: 14px; display: none; max-width: 90vw; }
.toast.is-error { background: var(--danger); }
.toast.is-open { display: block; }

/* Caja y corte */
.denoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.denom { display: grid; grid-template-columns: 84px 90px 96px; align-items: center; gap: 8px; font-size: 13px; }
.denom input { height: 32px; }
.denom .sub { text-align: right; font-family: var(--mono); color: var(--text-2); }

@media (max-width: 1520px) {
  .pos-results .col-cat { display: none; }
  .pos-results .name { max-width: 260px; }
}
@media (max-width: 1280px) {
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
  .pos-results .col-x4 { display: none; }
}
@media (max-width: 1024px) {
  .pos { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; overflow: visible; }
  .pos-main, .pos-panel { overflow: visible; }
  .pos-results { max-height: 60vh; }
  .pos-panel { border-top: 1px solid var(--border); }
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
  .pay-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Fase 4: capturadores de inventario y compras ---------- */
.picker { position: relative; }
.picker-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff;
  border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  max-height: 320px; overflow-y: auto; min-width: 320px;
}
.picker-results button {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border);
  background: #fff; padding: 8px 12px; cursor: pointer; font: 13.5px var(--font); color: var(--text);
}
.picker-results button:last-child { border-bottom: 0; }
.picker-results button:hover, .picker-results button.is-active { background: var(--brand-tint); }
.picker-empty { padding: 10px 12px; color: var(--text-3); font-size: 13px; }
.table tr.is-pending td { background: #FFF8EB; }
.table tr.is-pending td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table tr.is-flash td { background: var(--brand-tint); transition: background .2s; }
.table input.num::-webkit-inner-spin-button { opacity: .5; }
.req-list.plain li { display: list-item; }
.form-actions form { display: inline; }
.page-actions form { display: inline-flex; }

/* ---------- Fase 5: Caja y bancos ---------- */
.kpi.is-info .value { color: var(--info); }
.text-warn { color: var(--warn); }
.dl-tight { grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 12.5px; }
.bank-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.bank-cards > .card + .card, .rec-kpis > .card + .card, .dash-grid > .card + .card, .dash-kpis > .card + .card { margin-top: 0; }
.bank-card { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.bank-card-head { display: flex; gap: 6px; flex-wrap: wrap; }
.bank-card-name { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 4px; }
.bank-card-balance { font-size: 26px; line-height: 34px; font-weight: 700; font-feature-settings: "tnum" 1; margin: 6px 0 4px; }
.bank-card-balance.is-neg { color: var(--danger); }
.bank-card-actions { display: flex; gap: 4px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.bank-card-new { align-items: center; justify-content: center; color: var(--text-3); border: 1px dashed var(--border-strong); background: transparent; box-shadow: none; min-height: 160px; text-decoration: none; }
.bank-card-new:hover { color: var(--brand-text); border-color: var(--brand); background: var(--brand-tint); text-decoration: none; }
.flow-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.flow-title { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); margin-bottom: 10px; }
.flow-title strong { color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; }
.flow-row { margin-bottom: 10px; }
.flow-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.flow-bar, .progress { height: 6px; border-radius: 3px; background: var(--canvas); overflow: hidden; }
.flow-bar span, .progress span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.flow-bar .is-out { background: var(--asphalt-700, #374151); }
.row-muted td { background: var(--canvas); }
.chip-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--canvas); color: var(--text-2, #4B5563); font-size: 11px; text-align: center; }
.chip.is-active .chip-n { background: rgba(255, 255, 255, .18); color: #fff; }

/* Conciliación */
.rec-kpis { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.rec-kpi { padding: 14px 16px; }
.rec-kpi .label { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.rec-kpi .value { font-size: 22px; line-height: 30px; font-weight: 700; margin-top: 4px; font-feature-settings: "tnum" 1; }
.rec-kpi .hint { font-size: 12px; color: var(--text-3); }
.rec-kpi.is-warn .value { color: var(--danger); }
.rec-progress { display: flex; gap: 14px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.dot.is-ok { background: var(--ok); } .dot.is-info { background: var(--info); } .dot.is-warn { background: var(--danger); }
.rec-head, .rec-row { display: grid; grid-template-columns: minmax(0, 1.25fr) 130px 190px minmax(0, 1.5fr); gap: 16px; padding: 12px 16px; }
.rec-head { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); border-bottom: 1px solid var(--border); background: var(--canvas); }
.rec-head > div:first-child { grid-column: 1 / 3; } .rec-head > div { display: flex; align-items: center; gap: 6px; }
.rec-row { border-bottom: 1px solid var(--border); align-items: start; }
.rec-row:target { box-shadow: inset 3px 0 0 var(--brand); background: var(--brand-tint); }
.rec-row.is-orphan { background: #FFF8F8; box-shadow: inset 3px 0 0 var(--danger); }
.rec-row.is-ignorado { opacity: .7; }
.rec-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.rec-desc { margin-top: 4px; font-size: 13.5px; }
.rec-sub { margin-top: 2px; }
.rec-amount { text-align: right; font-size: 17px; font-weight: 700; font-feature-settings: "tnum" 1; display: flex; flex-direction: column; align-items: flex-end; }
.rec-amount.is-in { color: var(--ok); }
.rec-match { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.match-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; background: #fff; }
.match-badge.is-ok { border-color: #BFE3CB; background: var(--ok-bg); color: var(--ok); }
.match-badge.is-info { border-color: #BCDDEF; background: var(--info-bg); color: var(--info); }
.match-badge.is-danger { border-color: #F3C4C4; background: var(--danger-bg); color: var(--danger); }
.rec-doc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 2px 0; }
.rec-doc-line .sub { display: block; }
.rec-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.rec-actions form { display: inline; }
.rec-close { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; margin-top: 16px; border-color: #BFE3CB; background: var(--ok-bg); }
.drawer-wide { width: 560px; }
.rec-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rec-pane[hidden] { display: none !important; }
.rec-cands { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rec-cand { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; font-size: 13px; }
.rec-cand:hover { border-color: var(--text-3); }
.rec-cand:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.rec-cand input { width: 16px; height: 16px; accent-color: var(--brand-text); }
.rec-cand .sub { display: block; }
.rec-cand-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 600; }
.rec-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--canvas); font-size: 12px; }
.rec-sum > div { display: flex; flex-direction: column; } .rec-sum strong { font-size: 15px; }
.rec-sum .check { grid-column: 1 / -1; }
@media (max-width: 1280px) {
  .rec-kpis { grid-template-columns: repeat(3, 1fr); }
  .rec-head, .rec-row { grid-template-columns: minmax(0, 1fr) 120px 170px minmax(0, 1.2fr); }
}
@media (max-width: 900px) {
  .rec-kpis { grid-template-columns: 1fr 1fr; }
  .rec-head { display: none; }
  .rec-row { grid-template-columns: 1fr auto; }
  .rec-match, .rec-doc { grid-column: 1 / -1; }
  .flow-cols { grid-template-columns: 1fr; }
  .drawer-wide { width: 100%; }
}

/* ---------- Fase 5: tablero ---------- */
.dash-filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; }
.dash-filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-filter-form .input, .dash-filter-form .select { width: auto; height: 34px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text-3); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 10px; }
.trend.is-up { color: var(--ok); background: var(--ok-bg); }
.trend.is-down { color: var(--danger); background: var(--danger-bg); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.dash-chart { width: 100%; height: auto; display: block; }
.dash-chart .grid { stroke: var(--border); stroke-width: 1; }
.dash-chart .grid.base { stroke: var(--border-strong); }
.dash-chart .axis { font-size: 11px; fill: var(--text-3); font-feature-settings: "tnum" 1; }
.dash-chart .bar { fill: var(--brand); }
.dash-chart .bar.is-goal { fill: var(--brand-text); }
.dash-chart .hit { fill: transparent; }
.dash-chart .col:hover .hit { fill: rgba(17, 20, 24, .04); }
.dash-chart .col:hover .bar { fill: var(--brand-text); }
.dash-chart .goal { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-dasharray: 5 4; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 10px; height: 10px; border-radius: 2px; background: var(--brand); display: inline-block; }
.lg-line { width: 16px; border-top: 2px dashed var(--text-2); display: inline-block; }
.chart-table { margin-top: 8px; } .chart-table summary { cursor: pointer; color: var(--text-3); }
.chart-table table { margin-top: 8px; }
.branch-row { margin-bottom: 14px; }
.branch-bar { position: relative; height: 8px; overflow: visible; }
.branch-bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); border-radius: 1px; }
.dash-actions { display: flex; flex-direction: column; gap: 8px; }
.dash-action { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); text-decoration: none; font-size: 13px; }
.dash-action:hover { border-color: var(--text-3); text-decoration: none; }
.dash-action .sub { display: block; }
.dash-action-icon { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--canvas); color: var(--text-2); }
.dash-action.is-warn .dash-action-icon { background: var(--warn-bg); color: var(--warn); }
.dash-action.is-danger .dash-action-icon { background: var(--danger-bg); color: var(--danger); }
.dash-action.is-info .dash-action-icon { background: var(--info-bg); color: var(--info); }
.dash-action-cta { font-size: 12px; font-weight: 600; color: var(--brand-text); white-space: nowrap; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-col > .card + .card { margin-top: 0; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.report-grid > .card + .card { margin-top: 0; }
.report-card { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px 16px; color: var(--text); text-decoration: none; align-items: start; }
.report-card:hover { border-color: var(--brand); text-decoration: none; }
.report-card .sub { display: block; margin-top: 2px; }

/* ---------- Fase 6: tienda en línea ---------- */
.order-steps { display: flex; gap: 0; padding: 14px 16px; margin-bottom: 16px; overflow-x: auto; }
.order-step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; position: relative; }
.order-step + .order-step::before { content: ""; flex: 0 0 24px; height: 2px; background: var(--border); margin-right: 8px; }
.order-step.is-done { color: var(--text); }
.order-step.is-done + .order-step.is-done::before { background: var(--brand); }
.dot-step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--canvas); border: 1px solid var(--border); flex: none; }
.order-step.is-done .dot-step { background: var(--brand); border-color: var(--brand); color: var(--asphalt-900, #111418); }
.order-step.is-current { font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.timeline li { position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline .sub { display: block; }
.secret-box { display: grid; gap: 6px; margin-top: 10px; }
.secret-box > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: center; }
.secret-box code { font-family: var(--mono); font-size: 12.5px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px 8px; word-break: break-all; user-select: all; }
.api-client + .api-client { border-top: 1px solid var(--border); }
.api-doc pre { background: var(--canvas); border-radius: var(--r-sm); padding: 8px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; margin: 6px 0 10px; }
.api-doc .table td { padding: 6px 4px; font-size: 12px; }
.dl dd .sub { display: block; }
.config-snippet { background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; font-family: var(--mono); font-size: 12px; white-space: pre; overflow-x: auto; user-select: all; margin: 0; }
