/* =====================================================================
   Berry · Estilos
   Diseño editorial, claro y de alto contraste. Sin dependencias.
   ===================================================================== */

:root {
  --ink: #14110f;
  --ink-2: #3d3833;
  --muted: #6f675f;
  --line: #e4ded6;
  --line-strong: #cfc7bc;
  --paper: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3efe9;
  --berry: #a3123f;
  --berry-ink: #ffffff;
  --berry-soft: #fbe9ef;
  --ok: #157347;     --ok-soft: #e3f3ea;
  --warn: #9a5b00;   --warn-soft: #fdf1dc;
  --bad: #b42318;    --bad-soft: #fde8e6;
  --info: #1d4ed8;   --info-soft: #e5edfd;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 17, 15, .06), 0 4px 16px rgba(20, 17, 15, .06);
  --shadow-lg: 0 20px 60px rgba(20, 17, 15, .22);
  --sidebar: 236px;
  --sidebar-mini: 68px;
  --topbar: 60px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--berry) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; transition: grid-template-columns .2s; }
.app.mini { grid-template-columns: var(--sidebar-mini) 1fr; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; overflow-x: hidden;
  background: var(--ink); color: #efe9e1; display: flex; flex-direction: column; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--berry); flex: none;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff;
}
.brand-name { font-family: var(--font-display); font-size: 22px; letter-spacing: .01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #9a9187; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: #d8d1c7; white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: #fff; color: var(--ink); font-weight: 600; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta { min-width: 0; overflow: hidden; }
.user-chip .meta b, .user-chip .meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.app.mini .brand-name, .app.mini .nav-section, .app.mini .nav a span, .app.mini .user-chip .meta { display: none; }
.app.mini .nav a { justify-content: center; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; background: none; border: 0; width: 100%; text-align: left; color: inherit; }
.user-chip:hover { background: rgba(255,255,255,.07); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #3a332d; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; color: #fff; }
.user-chip .meta { min-width: 0; }
.user-chip .meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta small { color: #a79e93; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.content { padding: 24px; max-width: 1360px; width: 100%; margin: 0 auto; }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .app, .app.mini { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .app.drawer-open .sidebar { transform: none; }
  .app.drawer-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .app.mini .brand-name, .app.mini .nav-section, .app.mini .nav a span, .app.mini .user-chip .meta { display: initial; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
    font-size: 11px; text-decoration: none; color: var(--muted); background: none; border: 0; border-radius: 8px;
  }
  .bottom-nav a.active { color: var(--berry); font-weight: 600; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) { .show-mobile { display: none !important; } }

/* ---------- Tipografía y utilidades ---------- */
h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: .93em; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 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)); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 18px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .value { font-family: var(--font-display); font-size: 32px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 13px; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2b2622; }
.btn.accent { background: var(--berry); color: var(--berry-ink); border-color: var(--berry); }
.btn.accent:hover { background: #8a0f35; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.block { width: 100%; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--bad); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,17,15,.08); outline: none; }
.input.invalid { border-color: var(--bad); background: var(--bad-soft); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; height: 42px; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-prefix .input { padding-left: 28px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 38px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.table th.num { text-align: right; }
.table tfoot th { position: static; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }

/* Listas tipo tarjeta (móvil) */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.berry { background: var(--berry-soft); color: var(--berry); }
.badge.outline { background: transparent; border-color: var(--line-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.stock-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-pill b { font-weight: 700; }
.stock-pill.neg { background: var(--bad-soft); color: var(--bad); }
.stock-pill.low { background: var(--warn-soft); color: var(--warn); }
.stock-pill.zero { color: var(--muted); }

/* ---------- Productos ---------- */
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--surface-2); object-fit: cover; flex: none; display: grid; place-items: center; color: var(--line-strong); overflow: hidden; }
.thumb svg { width: 22px; height: 22px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 280px; }
.toolbar select.input { width: auto; min-width: 150px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .form-layout { grid-template-columns: 1fr; } }
.sticky-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 18px; z-index: 5; }
@media (max-width: 900px) { .sticky-actions { bottom: calc(64px + env(safe-area-inset-bottom)); } }

.barcode-row { display: grid; grid-template-columns: minmax(0,1fr) 130px 80px auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.barcode-row:last-child { border-bottom: 0; }
@media (max-width: 640px) { .barcode-row { grid-template-columns: 1fr 1fr; } .barcode-row .input-group { grid-column: 1 / -1; } }
.barcode-preview { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; display: flex; justify-content: center; }
.barcode-preview svg { max-width: 100%; height: auto; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gallery-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item.primary { border-color: var(--berry); }
.gallery-item .tag { position: absolute; left: 6px; top: 6px; }
.gallery-item .ops { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .15s; }
.gallery-item:hover .ops, .gallery-item:focus-within .ops { opacity: 1; }
@media (hover: none) { .gallery-item .ops { opacity: 1; } }
.gallery-item .ops button { background: rgba(255,255,255,.92); border: 0; border-radius: 6px; padding: 4px 6px; cursor: pointer; font-size: 12px; font-weight: 600; }
.image-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.image-actions .btn { height: auto; padding: 10px 6px; flex-direction: column; gap: 4px; font-size: 12px; white-space: normal; text-align: center; }
.image-actions .btn svg { width: 22px; height: 22px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pick-grid button { border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0; cursor: pointer; overflow: hidden; aspect-ratio: 1; position: relative; }
.pick-grid button:hover { border-color: var(--ink); }
.pick-grid img { width: 100%; height: 100%; object-fit: contain; }
.pick-grid small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.9); font-size: 11px; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Árbol de categorías ---------- */
.tree-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tree-item.child { padding-left: 42px; background: #fdfcfa; }
.tree-item.child::before { content: "└"; color: var(--line-strong); margin-left: -20px; }

/* ---------- Modal, toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,17,15,.45); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-backdrop { place-items: end stretch; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 16px 16px 0 0; max-height: 92dvh; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 900px) { .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); left: 16px; right: 16px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); animation: rise .2s; font-weight: 500; }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 10px; color: var(--line-strong); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), #fff, var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-weight: 500; font-size: 14px; }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--ink); color: #f5efe7; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--berry); right: -160px; bottom: -200px; opacity: .9; }
.login-art h1 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 54px); line-height: 1.05; margin: 0; max-width: 12ch; position: relative; z-index: 1; font-weight: 600; }
.login-art p { color: #bdb3a8; max-width: 38ch; position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-form form { width: min(380px, 100%); }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Escáner ---------- */
.scanner { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 28% 10%; border: 3px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scanner .laser { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--berry); box-shadow: 0 0 12px var(--berry); animation: laser 1.6s ease-in-out infinite alternate; }
@keyframes laser { from { top: 32%; } to { top: 68%; } }

/* ---------- Etiquetas (impresión) ---------- */
.labels-sheet { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 4mm; }
.lbl-card { border: 1px dashed #bbb; padding: 3mm; text-align: center; break-inside: avoid; background: #fff; display: flex; flex-direction: column; gap: 1mm; justify-content: center; }
.lbl-card .lname { font-size: 10pt; font-weight: 600; line-height: 1.15; max-height: 2.4em; overflow: hidden; }
.lbl-card .lprice { font-family: var(--font-display); font-size: 16pt; font-weight: 700; }
.lbl-card svg { width: 100%; height: auto; max-height: 22mm; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .lbl-card { border-color: transparent; }
  @page { margin: 8mm; }
}

/* ---------- Ajustes de grilla en pantallas chicas ---------- */
.form-layout > *, .grid > * { min-width: 0; }
#page-actions { flex-wrap: nowrap; }
@media (max-width: 900px) {
  .toolbar .spacer { display: none; }
  .toolbar select.input { flex: 1 1 140px; min-width: 0; }
  .topbar h1 { font-size: 19px; min-width: 0; }
  .card { padding: 14px; }
  .card.flush { padding: 0; }
}

/* =====================================================================
   Etapa 3 · POS, caja, cuentas corrientes, stock
   ===================================================================== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.pos-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.pos-search { display: flex; gap: 8px; }
.pos-search .input { height: 54px; font-size: 18px; }
.pos-search .btn { height: 54px; width: 54px; padding: 0; }
.pos-results { position: absolute; top: 62px; left: 0; right: 0; z-index: 15; max-height: 420px; overflow-y: auto; box-shadow: var(--shadow-lg); }
.pos-hit { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; }
.pos-hit:focus { background: var(--surface-2); outline: none; }
.pos-cart .table td { padding: 8px 10px; }
.pos-cart tr.sel td { background: #fff8e8; }
.pos-cart .qty { display: inline-flex; align-items: center; gap: 2px; }
.pos-cart .qty .input { width: 58px; height: 34px; text-align: center; padding: 0 4px; }
.pos-cart .pos-price, .pos-cart .pos-disc { height: 34px; text-align: right; width: 100px; padding: 0 6px; }
.pos-cart .pos-disc { width: 64px; }
.pos-side { position: sticky; top: calc(var(--topbar) + 16px); }
.pos-side .field > label { font-size: 12px; }
.pos-cust { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface-2); }
.pos-totals { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pos-total { font-family: var(--font-display); font-size: 30px; align-items: baseline; }
.pos-total b { font-variant-numeric: tabular-nums; }
.pos-pay { height: 58px; font-size: 19px; margin-top: 14px; }
.pos-mobilebar { display: none; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; }
  .pos-side { position: static; }
  .pos-side .pos-pay { display: none; }
  .pos-mobilebar { display: flex; position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 30; background: var(--ink); color: #fff; padding: 10px 14px; align-items: center; justify-content: space-between; }
  .pos-mobilebar b { display: block; font-family: var(--font-display); font-size: 24px; }
  .pos-mobilebar small { color: #bdb3a8; }
  .pos-mobilebar .btn { height: 46px; }
  .content:has(.pos) { padding-bottom: 170px; }
}
@media (min-width: 901px) and (max-width: 1000px) { .pos-mobilebar { display: flex !important; bottom: 0; } }

.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pay-method { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; text-align: left; min-height: 64px; }
.pay-method:hover { border-color: var(--ink); }
.pay-row.card { padding: 12px; background: var(--surface-2); }
.pay-amount { height: 42px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pay-summary { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.picker { position: relative; }
.picker-results { position: absolute; z-index: 30; left: 0; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 12px; cursor: pointer; text-align: left; font: inherit; border-bottom: 1px solid var(--line); }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover, .picker-item.active { background: var(--surface-2); }
.lines-table .input { height: 36px; width: 110px; text-align: right; }

.money-pos { color: var(--bad); }
.money-neg { color: var(--ok); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpis .card { padding: 14px 16px; }
.kpis .stat .value { font-size: 26px; }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.collect-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.collect-card:last-child { border-bottom: 0; }
.collect-card .amount { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--bad); white-space: nowrap; }
tr.done td { opacity: .55; }

/* ---------- Etapa 5: asistente de facturación ARCA ---------- */
.arca { max-width: 920px; }
.arca-step { padding: 0; }
.arca-step > details > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.arca-step > details > summary::-webkit-details-marker { display: none; }
.arca-step > details > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.arca-step > details[open] > summary::after { transform: rotate(-135deg); }
.arca-step > details > summary h2 { margin: 0; font-size: 17px; }
.arca-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--berry-soft); color: var(--berry-ink); border: 2px solid var(--berry); }
.arca-num svg { width: 18px; height: 18px; }
.arca-step.done .arca-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.arca-body { padding: 0 18px 18px 62px; min-width: 0; }
.arca-body > p:first-child { margin-top: 0; }
.arca-sub { margin: 14px 0 8px; font-weight: 600; }
.arca-sub:first-child { margin-top: 0; }
.arca-guide { margin: 8px 0 12px; padding: 12px 14px 12px 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.arca-guide li { margin: 4px 0; line-height: 1.5; }
.arca-test { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.arca-test li { padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.arca-test li > svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.arca-test li.ok { background: var(--ok-soft, #e8f5ee); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.arca-test li.ok > svg { color: var(--ok); }
.arca-test li.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.arca-test li.bad > svg { color: var(--bad); }
.arca textarea.mono { width: 100%; font-family: var(--mono); font-size: 12px; }
@media (max-width: 640px) {
  .arca-step > details > summary { padding: 12px 14px; }
  .arca-body { padding: 0 14px 14px; }
}
.arca .alert svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* ---------- Etapa 6: ítem varios y devoluciones en el POS ---------- */
.pos-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.pos-cart tr.pos-ret-head td { background: var(--bad-soft); color: var(--bad); }
.pos-cart tr.pos-ret-head svg { width: 16px; height: 16px; vertical-align: -3px; }
.pos-cart tr.pos-ret td { color: var(--bad); background: color-mix(in srgb, var(--bad-soft) 45%, transparent); }
.pos-ret-sum { color: var(--bad); font-weight: 600; }
.modal-body { min-width: 0; }
.modal-body .table-wrap { max-width: 100%; overflow-x: auto; }

/* Reportes del dueño */
.profit-bar { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 5px; max-width: 220px; overflow: hidden; }
.profit-bar span { display: block; height: 100%; border-radius: 2px; }
.today .list-item .num { text-align: right; }
@media (max-width: 760px) { .today .kpis { grid-template-columns: 1fr 1fr; } .today .kpis .stat .value { font-size: 21px; } }

/* Sin conexión */
.netbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 20px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.netbar.off { background: var(--bad-soft); color: var(--bad); }
.netbar svg { width: 16px; height: 16px; }
.pos-tools .btn.danger { border-color: var(--bad); color: var(--bad); }

/* Mercado Pago QR */
.mp-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mp-qr-code { background: #fff; padding: 14px; border-radius: 14px; border: 1px solid var(--line); line-height: 0; }
.mp-qr-code svg { width: min(260px, 70vw); height: auto; }
.mp-qr-amount { font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.mp-status { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); max-width: 340px; }

/* Conteo de inventario */
.count-head { padding: 12px 16px; }
.count-last { border: 2px solid var(--ok); }
.count-big { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; min-width: 70px; text-align: right; }
#off-warn .alert svg { width: 16px; height: 16px; vertical-align: -3px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.card.dropping{outline:2px dashed var(--berry, #c2185b);outline-offset:-6px;background:var(--surface-2)}
.paste-zone:focus{outline:2px solid var(--berry, #c2185b);outline-offset:2px}

/* ---------- Promociones, vendedores y hoja de preparación ---------- */
.pos-promo { color: var(--ok); }
.pos-promo svg { width: 13px; height: 13px; vertical-align: -2px; }
.pick-bar { position: sticky; top: 8px; z-index: 4; display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--berry, #c2185b); border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.pick-bar #pickn { flex: 1; font-weight: 600; }
.seller-days { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.seller-day { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.seller-day span { width: 100%; max-width: 22px; background: var(--berry, #c2185b); border-radius: 4px 4px 0 0; }
.seller-day small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.picking { display: flex; flex-direction: column; gap: 16px; max-width: 1000px; margin: 0 auto; }
.pick-page { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.pick-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 8px; }
.pick-head h2 { margin: 0 0 4px; font-size: 20px; }
.pick-note { margin-top: 6px; padding: 6px 8px; background: #fff7d6; border-radius: 6px; font-size: 13px; }
.pick-code svg { max-width: 180px; height: auto; }
.pick-table td, .pick-table th { color: #111; }
.pick-table td { vertical-align: top; }
.pick-qty { font-size: 18px; font-weight: 800; white-space: nowrap; }
.pick-qty small { font-size: 11px; font-weight: 400; }
.pick-box { display: inline-block; width: 18px; height: 18px; border: 2px solid #111; border-radius: 4px; }
.pick-chip { display: inline-block; margin: 0 6px 2px 0; padding: 1px 6px; border: 1px solid #bbb; border-radius: 10px; white-space: nowrap; }
.pick-table tr.short td { background: #fff1f1; }
.pick-warn { color: #c62828; font-weight: 700; }
.pick-foot { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
@media print {
  .picking { max-width: none; gap: 0; }
  .pick-page { border: 0; border-radius: 0; padding: 0; page-break-after: always; break-after: page; }
  .pick-page:last-child { page-break-after: auto; break-after: auto; }
  .pick-table th, .pick-table td { padding: 5px 6px; font-size: 12px; }
  .pick-table tr { break-inside: avoid; }
}

/* Créditos personales */
.credit-sim { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: var(--bg-soft, rgba(0,0,0,.03)); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.credit-sim > div { display: flex; flex-direction: column; gap: 2px; }
.credit-sim .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.credit-sim b { font-size: 20px; font-family: var(--font-display); }
.list-pop { margin-top: 6px; }
.pos-credit { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) { .credit-sim { grid-template-columns: 1fr; } }

/* ---------- Tienda online · Diseño ---------- */
.design { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 44%); gap: 18px; align-items: start; }
.design-edit { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.design-edit .card h2 { margin: 0 0 4px; font-size: 18px; }
.design-edit .card > p.muted { margin: 0 0 12px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.preset { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, transform .15s; }
.preset:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.preset.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.pr-mock { position: relative; display: block; height: 74px; border-radius: 8px; background: var(--b); overflow: hidden; border: 1px solid rgba(0,0,0,.06); }
.pr-mock i { position: absolute; display: block; font-style: normal; }
.pr-head { left: 0; right: 0; top: 0; height: 12px; background: var(--h); border-bottom: 1px solid rgba(0,0,0,.06); }
.pr-hero { left: 6px; right: 6px; top: 17px; height: 24px; border-radius: var(--r); background: linear-gradient(120deg, var(--p), var(--a)); font-size: 12px; font-weight: 700; padding: 4px 7px; line-height: 1.2; }
.pr-cards { left: 6px; right: 6px; top: 46px; height: 22px; display: flex !important; gap: 4px; position: absolute; }
.pr-cards i { position: static; flex: 1; border-radius: calc(var(--r) / 1.5); background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.07); }
.pr-btn { right: 9px; bottom: 9px; width: 18px; height: 8px; border-radius: 99px; background: var(--p); }
.pr-name { font-size: 14px; font-weight: 700; text-align: center; }
.colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.color-pick { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.color-pick:hover { border-color: var(--line-strong); }
.color-pick input { width: 46px; height: 46px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 8px; }
.color-pick input::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.12); border-radius: 8px; }
.color-pick span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.color-pick small { color: var(--muted); font-size: 12px; }
.color-pick code { font-size: 12px; color: var(--ink-2); }
.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 8px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--surface-2); }
.seg button.on { background: var(--ink); color: #fff; font-weight: 600; }
.seg.sm button { padding: 6px 10px; font-size: 13px; }
.seg svg { width: 16px; height: 16px; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.logo-box { width: 220px; height: 110px; border-radius: var(--radius-sm); display: grid; place-items: center; padding: 12px; text-align: center;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px dashed var(--line-strong); }
.logo-box img { max-width: 100%; max-height: 86px; object-fit: contain; }
label.btn.loading { opacity: .55; pointer-events: none; }
.sl-item { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sl-img { position: relative; height: 92px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--surface-2); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; border: 1px dashed transparent; }
.sl-img.empty { border-color: var(--line-strong); }
.sl-img:hover { color: var(--ink); }
.sl-img img { width: 100%; height: 100%; object-fit: cover; }
.sl-img svg { width: 24px; height: 24px; }
.sl-img.loading { opacity: .5; pointer-events: none; }
.sl-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sl-fields .grid { gap: 8px; }
.sl-fields .input { height: 38px; }
.sl-acts { display: flex; flex-direction: column; gap: 2px; }
.sl-none { display: flex; gap: 8px; align-items: center; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.sl-none svg { width: 20px; height: 20px; }
.sec-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sec-t { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.sec-t:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.sec-t input { width: 18px; height: 18px; accent-color: var(--ink); margin-top: 1px; flex: none; }
.sec-t span { display: flex; flex-direction: column; line-height: 1.3; }
.sec-t small { color: var(--muted); }
.design-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.design-save #dirty { margin-right: auto; }
.warn-txt { color: var(--warn) !important; font-weight: 600; }
.design-preview { position: sticky; top: calc(var(--topbar) + 12px); display: flex; flex-direction: column; gap: 8px; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pv-box { position: relative; height: calc(100dvh - var(--topbar) - 120px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface-2); box-shadow: var(--shadow); }
.pv-box iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.pv-box.phone { display: grid; justify-items: center; background: linear-gradient(160deg, var(--surface-2), var(--line)); }
.pv-box.phone iframe { position: relative; top: 10px; left: auto; transform-origin: top center; border-radius: 26px; box-shadow: 0 0 0 8px #14110f, var(--shadow-lg); }
@media (max-width: 1150px) {
  .design { grid-template-columns: 1fr; }
  .design-preview { position: static; order: -1; }
  .pv-box { height: 460px; }
}
@media (max-width: 620px) {
  .colors, .sec-toggles { grid-template-columns: 1fr; }
  .sl-item { grid-template-columns: 1fr auto; }
  .sl-img { grid-column: 1 / -1; height: 120px; }
  .sl-acts { flex-direction: row; grid-column: 1 / -1; justify-content: flex-end; }
  .sl-fields { grid-column: 1 / -1; }
}

.fav-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow-y: auto; }
.fav-list .chip { text-decoration: none; font-weight: 500; }

/* Contabilidad */
.nowrap { white-space: nowrap; }
.alert > svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.card-title { margin: 0 0 10px; }
.acc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.acc-period { display: flex; align-items: center; gap: 4px; }
.acc-period .input { width: auto; min-width: 150px; }
.acc-alerts { display: flex; flex-direction: column; gap: 0; padding: 4px 0; }
.acc-alert { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; }
.acc-alert + .acc-alert { border-top: 1px solid var(--line); }
.acc-alert > svg { width: 20px; height: 20px; }
.acc-alert.bad > svg { color: var(--bad); }
.acc-alert.warn > svg { color: var(--warn); }
.acc-alert.info > svg { color: var(--info); }
.acc-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.acc-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-line.total { border-bottom: 0; border-top: 2px solid var(--line-strong); margin-top: 4px; padding-top: 10px; font-size: 15px; }
.acc-help summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.acc-help ol { margin: 12px 0 0; padding-left: 22px; line-height: 1.7; font-size: 14px; }
.acc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; cursor: default; }
summary.acc-sec-head { cursor: pointer; }
.acc-sec-head h3 { margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.acc-note { margin: 0; padding: 10px 16px 14px; }
.acc-pvnum { display: grid; grid-template-columns: 5fr auto 8fr; align-items: center; gap: 4px; }
.acc-party { position: relative; }
.acc-sugg { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.acc-sugg button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 8px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.acc-sugg button:hover { background: var(--surface-2); }
.acc-rates { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 14px; }
.acc-rates-head, .acc-rate { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 10px; align-items: center; }
.acc-rates-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: 4px; }
.acc-rate { padding: 4px 0; }
.acc-rate > span:first-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; margin: 4px 0 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.acc-total b { font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.acc-pay { align-items: end; }
.acc-pay .check { padding-bottom: 10px; }
.acc-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acc-book td { vertical-align: top; }
@media (max-width: 700px) {
  .acc-top { flex-direction: column; align-items: stretch; }
  .acc-top { min-width: 0; max-width: 100%; }
  .acc-top .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; min-width: 0; max-width: 100%; }
  .acc-top .chip { white-space: nowrap; }
  .acc-period { justify-content: center; }
  .acc-alert { grid-template-columns: 22px 1fr; }
  .acc-alert .btn { grid-column: 2; justify-self: start; }
}
