/* ==========================================================================
   LavaPro · Sistema de diseño
   Todo el aspecto se controla con variables CSS (ver ThemeService) para que
   cada lavadero pueda personalizar colores, bordes y modo claro/oscuro.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../vendor/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand: #f05a28; --brand-rgb: 240,90,40; --brand-dark: #c9481d; --brand-light: #f59a7a;
  --brand-soft: rgba(240,90,40,.12); --brand-softer: rgba(240,90,40,.07); --brand-contrast: #fff;
  --radius: 16px; --radius-sm: 10px; --radius-lg: 24px;

  --bg: #eceef1; --surface: #ffffff; --surface-2: #f5f6f8; --surface-3: #eceef2;
  --text: #14161a; --text-2: #434a56; --muted: #7a828f; --border: #e4e7ec; --border-strong: #d3d8df;
  --ink: #14161a; --ink-contrast: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.04), 0 12px 32px -10px rgba(16,24,40,.10);
  --shadow-lg: 0 24px 60px -16px rgba(16,24,40,.28);

  --ok: #15803d; --ok-soft: #e6f5ec;
  --warn: #b45309; --warn-soft: #fdf1dc;
  --danger: #c81e1e; --danger-soft: #fde9e9;
  --info: #1d4ed8; --info-soft: #e7eefc;
  --purple: #6d28d9; --purple-soft: #efe8fd;
  --teal: #0f766e; --teal-soft: #dff4f1;
  --slate: #475569; --slate-soft: #eaedf1;

  --sidebar-w: 256px; --sidebar-w-collapsed: 78px;
  --sidebar-bg: var(--surface); --sidebar-text: var(--text-2); --sidebar-muted: var(--muted);
  --sidebar-hover: var(--surface-2); --sidebar-active-bg: var(--ink); --sidebar-active-text: var(--ink-contrast);
  --sidebar-border: var(--border);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --pad: 1.25rem;
}

[data-bs-theme='dark'] {
  --bg: #0e1013; --surface: #171a20; --surface-2: #1e222a; --surface-3: #262b35;
  --text: #eef0f3; --text-2: #c3c8d1; --muted: #8b93a2; --border: #2a2f3a; --border-strong: #3a4150;
  --ink: #f2f4f7; --ink-contrast: #12141a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 12px 32px -10px rgba(0,0,0,.5);
  --ok: #4ade80; --ok-soft: rgba(34,197,94,.14);
  --warn: #fbbf24; --warn-soft: rgba(245,158,11,.15);
  --danger: #f87171; --danger-soft: rgba(239,68,68,.16);
  --info: #7aa7ff; --info-soft: rgba(59,130,246,.17);
  --purple: #b79bff; --purple-soft: rgba(139,92,246,.18);
  --teal: #5eead4; --teal-soft: rgba(20,184,166,.16);
  --slate: #a9b4c4; --slate-soft: rgba(148,163,184,.14);
  --bs-body-bg: var(--bg); --bs-body-color: var(--text); --bs-border-color: var(--border);
  --bs-emphasis-color: var(--text); --bs-secondary-color: var(--muted); --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-bg: var(--surface-3);
}

/* ── Gráficas: paleta categórica validada (orden fijo, no se cicla) ───── */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; --s-other: #898781; --grid: #e1e0d9; --axis: #c3c2b7; }
[data-bs-theme='dark'] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767; --grid: #2c2c2a; --axis: #383835; }
.legend-inline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--text-2); }
.legend-inline .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: .4rem; vertical-align: -1px; }
.chart-table { font-size: .78rem; }

body.sidebar-style-dark { --sidebar-bg: #14161b; --sidebar-text: #c7ccd6; --sidebar-muted: #7d8695; --sidebar-hover: rgba(255,255,255,.07); --sidebar-active-bg: var(--brand); --sidebar-active-text: var(--brand-contrast); --sidebar-border: rgba(255,255,255,.08); }
body.sidebar-style-brand { --sidebar-bg: var(--brand); --sidebar-text: rgba(255,255,255,.88); --sidebar-muted: rgba(255,255,255,.62); --sidebar-hover: rgba(255,255,255,.14); --sidebar-active-bg: #fff; --sidebar-active-text: var(--brand-dark); --sidebar-border: rgba(255,255,255,.18); }
body.sidebar-style-brand[data-brand-light='1'] { --sidebar-text: rgba(0,0,0,.78); --sidebar-muted: rgba(0,0,0,.5); --sidebar-hover: rgba(0,0,0,.08); --sidebar-border: rgba(0,0,0,.12); }
body.density-compact { --pad: .9rem; }

/* ── Bootstrap: ajustes de marca ─────────────────────────────────────── */
:root, [data-bs-theme] {
  --bs-primary: var(--brand); --bs-primary-rgb: var(--brand-rgb);
  --bs-link-color: var(--brand); --bs-link-hover-color: var(--brand-dark);
  --bs-link-color-rgb: var(--brand-rgb); --bs-link-hover-color-rgb: var(--brand-rgb);
  --bs-font-sans-serif: var(--font); --bs-body-font-family: var(--font);
  --bs-border-radius: var(--radius-sm); --bs-border-radius-lg: var(--radius); --bs-border-radius-xl: var(--radius-lg);
  --bs-focus-ring-color: rgba(var(--brand-rgb), .25);
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: .9rem; line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; margin: 0;
}
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 650; letter-spacing: -.015em; }
a { text-decoration: none; }
.text-muted, .text-body-secondary { color: var(--muted) !important; }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }
.fw-650 { font-weight: 650; }
.tabular, .money { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.small, small { font-size: .8rem; }
.hr-soft { border: 0; border-top: 1px solid var(--border); opacity: 1; margin: 1rem 0; }

.form-control, .form-select, .input-group-text {
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background-color: var(--surface);
  color: var(--text); padding: .55rem .8rem; font-size: .9rem; box-shadow: none !important;
}
.form-control-sm, .form-select-sm { padding: .35rem .6rem; font-size: .82rem; border-radius: calc(var(--radius-sm) - 2px); }
.form-control::placeholder { color: var(--muted); opacity: .75; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .16) !important; background-color: var(--surface); color: var(--text); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background: var(--surface-2); }
.form-label { font-weight: 600; font-size: .8rem; color: var(--text-2); margin-bottom: .3rem; }
.form-text { color: var(--muted); font-size: .76rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18); }
.form-switch .form-check-input { cursor: pointer; }
.input-group-text { background: var(--surface-2); color: var(--muted); }
.is-invalid { border-color: var(--danger) !important; }
.invalid-feedback { color: var(--danger); }

.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: .87rem; padding: .5rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; transition: all .15s ease; }
.btn-sm { font-size: .8rem; padding: .32rem .7rem; border-radius: calc(var(--radius-sm) - 2px); }
.btn-lg { font-size: 1rem; padding: .75rem 1.4rem; }
.btn-pill { border-radius: 999px; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: var(--brand-contrast); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: var(--brand-contrast); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-active-color: var(--brand-contrast); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-disabled-color: var(--brand-contrast); --bs-btn-focus-shadow-rgb: var(--brand-rgb); box-shadow: 0 6px 16px -6px rgba(var(--brand-rgb), .55); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand-contrast); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-active-color: var(--brand-contrast); --bs-btn-focus-shadow-rgb: var(--brand-rgb); }
.btn-ink { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-color: var(--ink-contrast); --bs-btn-hover-bg: var(--text-2); --bs-btn-hover-border-color: var(--text-2); --bs-btn-hover-color: var(--ink-contrast); --bs-btn-active-bg: var(--text-2); --bs-btn-active-color: var(--ink-contrast); --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-color: var(--ink-contrast); }
.btn-soft { --bs-btn-bg: var(--surface-2); --bs-btn-border-color: var(--border); --bs-btn-color: var(--text); --bs-btn-hover-bg: var(--surface-3); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--text); --bs-btn-active-bg: var(--surface-3); --bs-btn-active-color: var(--text); }
.btn-brand-soft { --bs-btn-bg: var(--brand-soft); --bs-btn-border-color: transparent; --bs-btn-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-color: var(--brand-contrast); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: var(--brand-contrast); }
.btn-outline-secondary { --bs-btn-color: var(--text-2); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--surface-3); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-active-bg: var(--surface-3); --bs-btn-active-color: var(--text); }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); --bs-btn-hover-color: #fff; }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 1.9rem; height: 1.9rem; }
.btn-light { --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--border); --bs-btn-color: var(--text); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--text); }

.dropdown-menu { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: var(--surface); padding: .35rem; font-size: .88rem; --bs-dropdown-link-hover-bg: var(--surface-2); --bs-dropdown-link-active-bg: var(--brand); --bs-dropdown-bg: var(--surface); --bs-dropdown-color: var(--text); --bs-dropdown-link-color: var(--text); --bs-dropdown-divider-bg: var(--border); }
.dropdown-item { border-radius: calc(var(--radius-sm) - 3px); padding: .45rem .7rem; display: flex; align-items: center; gap: .55rem; color: var(--text); }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.text-danger:hover { background: var(--danger-soft); }

.modal-content { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--border); padding: 1rem 1.35rem; }
.modal-body { padding: 1.25rem 1.35rem; }
.modal-title { font-size: 1.05rem; }
.btn-close { filter: none; }
[data-bs-theme='dark'] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.nav-tabs { border-bottom: 1px solid var(--border); gap: .25rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; padding: .6rem .9rem; border-radius: 0; margin-bottom: -1px; }
.nav-tabs .nav-link:hover { color: var(--text); border-color: var(--border-strong); }
.nav-tabs .nav-link.active { color: var(--brand); background: transparent; border-color: var(--brand); }
.nav-pills .nav-link { color: var(--text-2); font-weight: 600; border-radius: 999px; padding: .4rem .95rem; }
.nav-pills .nav-link.active { background: var(--ink); color: var(--ink-contrast); }

.progress { background: var(--surface-3); border-radius: 999px; height: .55rem; }
.progress-bar { background: var(--brand); border-radius: 999px; }
.badge { font-weight: 600; border-radius: 999px; }
.alert { border-radius: var(--radius-sm); border: 0; font-size: .88rem; }
.tooltip { --bs-tooltip-bg: var(--ink); --bs-tooltip-color: var(--ink-contrast); }
.page-link { border: 0; background: transparent; color: var(--text-2); border-radius: 8px !important; margin: 0 2px; font-weight: 600; }
.page-item.active .page-link { background: var(--ink); color: var(--ink-contrast); }
.page-link:hover { background: var(--surface-3); color: var(--text); }
.page-item.disabled .page-link { background: transparent; color: var(--muted); }
.pagination { --bs-pagination-focus-box-shadow: none; }
.list-group-item { background: transparent; border-color: var(--border); color: var(--text); }
.accordion { --bs-accordion-bg: transparent; --bs-accordion-border-color: var(--border); --bs-accordion-btn-bg: transparent; --bs-accordion-active-bg: var(--brand-softer); --bs-accordion-active-color: var(--brand); --bs-accordion-color: var(--text); --bs-accordion-btn-color: var(--text); --bs-accordion-btn-focus-box-shadow: none; }
.offcanvas { background: var(--surface); color: var(--text); }
code { color: var(--brand-dark); background: var(--brand-softer); padding: .1rem .35rem; border-radius: 5px; font-size: .85em; }
[data-bs-theme='dark'] code { color: var(--brand-light); }

/* ── Estructura de la aplicación ─────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; padding: 14px; gap: 14px; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--sidebar-bg); color: var(--sidebar-text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.1rem .8rem; display: flex; flex-direction: column;
  position: sticky; top: 14px; height: calc(100vh - 28px); overflow: hidden; transition: width .2s ease, flex-basis .2s ease;
  border: 1px solid var(--sidebar-border);
}
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: .3rem .55rem 1rem; color: var(--text); text-decoration: none; min-height: 3.2rem; }
body.sidebar-style-dark .sidebar-brand, body.sidebar-style-brand .sidebar-brand { color: #fff; }
body.sidebar-style-brand[data-brand-light='1'] .sidebar-brand { color: #1a1a1a; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; font-size: 1.25rem; flex: 0 0 38px; overflow: hidden; }
body.sidebar-style-brand .brand-logo { background: rgba(255,255,255,.95); color: var(--brand-dark); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 700; font-size: 1rem; line-height: 1.15; letter-spacing: -.02em; overflow: hidden; }
.brand-name small { display: block; font-weight: 500; font-size: .68rem; color: var(--sidebar-muted); letter-spacing: 0; }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -.3rem; padding: 0 .3rem; scrollbar-width: thin; }
.nav-ui { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--sidebar-muted); padding: .9rem .75rem .3rem; }
.nav-link-ui {
  display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; border-radius: var(--radius-sm); color: var(--sidebar-text);
  font-weight: 560; font-size: .88rem; transition: background .15s, color .15s; white-space: nowrap; position: relative;
}
.nav-link-ui i { font-size: 1.12rem; width: 1.25rem; text-align: center; flex: 0 0 1.25rem; }
.nav-link-ui:hover { background: var(--sidebar-hover); color: var(--text); }
body.sidebar-style-dark .nav-link-ui:hover, body.sidebar-style-brand .nav-link-ui:hover { color: #fff; }
body.sidebar-style-brand[data-brand-light='1'] .nav-link-ui:hover { color: #000; }
.nav-link-ui.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text) !important; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }
.nav-link-ui .nav-badge { margin-left: auto; font-size: .68rem; background: var(--brand); color: var(--brand-contrast); border-radius: 999px; padding: .05rem .45rem; font-weight: 700; }
.sidebar-footer { padding-top: .8rem; border-top: 1px solid var(--sidebar-border); margin-top: .6rem; }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .45rem .5rem; border-radius: var(--radius-sm); color: var(--sidebar-text); }
.user-chip .u-name { font-weight: 650; font-size: .85rem; color: var(--text); line-height: 1.2; }
.user-chip .u-role { font-size: .72rem; color: var(--sidebar-muted); }
body.sidebar-style-dark .user-chip .u-name, body.sidebar-style-brand .user-chip .u-name { color: #fff; }
body.sidebar-style-brand[data-brand-light='1'] .user-chip .u-name { color: #111; }
.sidebar-collapse-btn { background: transparent; border: 0; color: var(--sidebar-muted); width: 100%; text-align: left; padding: .5rem .8rem; border-radius: var(--radius-sm); font-size: .8rem; display: flex; gap: .7rem; align-items: center; }
.sidebar-collapse-btn:hover { background: var(--sidebar-hover); color: var(--text); }

body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .brand-name, body.sidebar-collapsed .nav-link-ui span, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .user-chip .u-text, body.sidebar-collapsed .sidebar-collapse-btn span, body.sidebar-collapsed .nav-badge { display: none; }
body.sidebar-collapsed .nav-link-ui { justify-content: center; padding: .7rem; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .user-chip { justify-content: center; }
body.sidebar-collapsed .sidebar-collapse-btn { justify-content: center; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.topbar {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: .65rem 1rem; display: flex; align-items: center; gap: .9rem;
  position: sticky; top: 14px; z-index: 30; border: 1px solid var(--border);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 1.08rem; margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .sub { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { flex: 1; max-width: 420px; margin-inline: auto; position: relative; }
.topbar-search input { background: var(--surface-2); border-color: transparent; padding-left: 2.4rem; border-radius: 999px; }
.topbar-search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.topbar-actions .btn-icon { background: var(--surface-2); border: 1px solid transparent; color: var(--text-2); position: relative; }
.topbar-actions .btn-icon:hover { background: var(--surface-3); color: var(--text); }
.bell-dot { position: absolute; top: 4px; right: 5px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--brand); color: var(--brand-contrast); font-size: .62rem; font-weight: 700; display: grid; place-items: center; padding: 0 3px; border: 2px solid var(--surface); }
.page { flex: 1; min-width: 0; padding-bottom: 1.5rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-bottom: 1.1rem; }
.page-head h2 { font-size: 1.55rem; margin: 0; font-weight: 750; letter-spacing: -.03em; }
.page-head .lead-sub { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ── Tarjetas ────────────────────────────────────────────────────────── */
.card-ui { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-ui + .card-ui { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem var(--pad) .35rem; }
.card-head h3, .card-head h5 { font-size: 1rem; margin: 0; font-weight: 700; }
.card-head .sub { color: var(--muted); font-size: .78rem; font-weight: 400; }
.card-pad { padding: var(--pad); }
.card-body-ui { padding: .6rem var(--pad) var(--pad); }
.card-soft { background: var(--surface-2); border-radius: var(--radius-sm); padding: .85rem 1rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 1.05rem 1.2rem; box-shadow: var(--shadow); border: 1px solid var(--border); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .15rem; min-height: 112px; }
.kpi .kpi-label { color: var(--muted); font-size: .8rem; font-weight: 560; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi .kpi-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 1rem; flex: 0 0 34px; }
.kpi .kpi-value { font-size: 1.75rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: .35rem; }
.kpi .kpi-foot { margin-top: auto; font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.kpi.kpi-accent { background: linear-gradient(140deg, var(--brand-light) -30%, var(--brand) 38%, var(--brand-dark) 120%); color: var(--brand-contrast); border-color: transparent; box-shadow: 0 18px 36px -16px rgba(var(--brand-rgb), .6); }
.kpi.kpi-accent .kpi-label, .kpi.kpi-accent .kpi-foot { color: color-mix(in srgb, var(--brand-contrast) 78%, transparent); }
.kpi.kpi-accent .kpi-icon { background: rgba(255,255,255,.22); color: var(--brand-contrast); }
.kpi.kpi-accent::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.kpi.kpi-dark { background: var(--ink); color: var(--ink-contrast); border-color: transparent; }
.kpi.kpi-dark .kpi-label, .kpi.kpi-dark .kpi-foot { color: color-mix(in srgb, var(--ink-contrast) 65%, transparent); }
.kpi.kpi-dark .kpi-icon { background: rgba(255,255,255,.14); color: var(--ink-contrast); }
[data-bs-theme='dark'] .kpi.kpi-dark .kpi-icon { background: rgba(0,0,0,.12); }
.kpi.kpi-ok .kpi-icon { background: var(--ok-soft); color: var(--ok); }
.kpi.kpi-warn .kpi-icon { background: var(--warn-soft); color: var(--warn); }
.kpi.kpi-danger .kpi-icon { background: var(--danger-soft); color: var(--danger); }
.kpi.kpi-info .kpi-icon { background: var(--info-soft); color: var(--info); }
.kpi.kpi-brand .kpi-icon { background: var(--brand-soft); color: var(--brand); }
.kpi-sm { min-height: 0; padding: .85rem 1rem; }
.kpi-sm .kpi-value { font-size: 1.3rem; }

.trend { display: inline-flex; align-items: center; gap: .15rem; font-weight: 700; font-size: .72rem; padding: .08rem .45rem; border-radius: 999px; }
.trend.up { background: var(--ok-soft); color: var(--ok); }
.trend.down { background: var(--danger-soft); color: var(--danger); }
.kpi-accent .trend { background: rgba(255,255,255,.22); color: inherit; }

/* ── Estados / etiquetas ─────────────────────────────────────────────── */
.status, .pill { display: inline-flex; align-items: center; gap: .32rem; padding: .22rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--cs, var(--slate-soft)); color: var(--c, var(--slate)); white-space: nowrap; line-height: 1.35; }
.st-received { --c: var(--slate); --cs: var(--slate-soft); }
.st-pending { --c: var(--warn); --cs: var(--warn-soft); }
.st-in_progress { --c: var(--info); --cs: var(--info-soft); }
.st-on_hold { --c: var(--purple); --cs: var(--purple-soft); }
.st-finished { --c: var(--ok); --cs: var(--ok-soft); }
.st-delivered { --c: var(--teal); --cs: var(--teal-soft); }
.st-cancelled { --c: var(--danger); --cs: var(--danger-soft); }
.pill-success { --c: var(--ok); --cs: var(--ok-soft); }
.pill-warning { --c: var(--warn); --cs: var(--warn-soft); }
.pill-danger { --c: var(--danger); --cs: var(--danger-soft); }
.pill-info { --c: var(--info); --cs: var(--info-soft); }
.pill-secondary { --c: var(--slate); --cs: var(--slate-soft); }
.pill-brand { --c: var(--brand); --cs: var(--brand-soft); }
.pill-purple { --c: var(--purple); --cs: var(--purple-soft); }
.tag { display: inline-block; background: var(--surface-3); color: var(--text-2); padding: .12rem .5rem; border-radius: 6px; font-size: .74rem; font-weight: 600; }

.avatar { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: 0 0 auto; }
.avatar-text { background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 32%); font-weight: 700; }
[data-bs-theme='dark'] .avatar-text { background: hsl(var(--h) 40% 24%); color: hsl(var(--h) 80% 82%); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -9px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ── Tablas ──────────────────────────────────────────────────────────── */
.table-ui { width: 100%; margin: 0; color: var(--text); border-collapse: separate; border-spacing: 0; --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-hover-bg: var(--surface-2); --bs-table-hover-color: var(--text); }
.table-ui thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--surface-2); padding: .65rem .9rem; border: 0; white-space: nowrap; }
.table-ui thead th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.table-ui thead th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.table-ui tbody td { padding: .72rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-ui tbody tr:last-child td { border-bottom: 0; }
.table-ui tbody tr:hover td { background: var(--surface-2); }
.table-ui tfoot td { padding: .7rem .9rem; font-weight: 700; border-top: 2px solid var(--border-strong); }
.table-ui .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-ui tr.row-void td { opacity: .5; text-decoration: line-through; }
.table-ui tr.row-void td:last-child, .table-ui tr.row-void td .pill { text-decoration: none; }
.table-responsive { scrollbar-width: thin; }
.row-link { cursor: pointer; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: .9rem var(--pad); border-bottom: 1px solid var(--border); }
.filter-bar .form-control, .filter-bar .form-select { min-width: 0; }
.filter-bar > div { min-width: 140px; }
.filter-bar .grow { flex: 1 1 220px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .8rem; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: .78rem; border: 1px solid transparent; transition: all .15s; }
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.active { background: var(--ink); color: var(--ink-contrast); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a, .segmented button { border: 0; background: transparent; padding: .3rem .85rem; border-radius: 999px; font-size: .78rem; font-weight: 650; color: var(--text-2); }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem var(--pad); flex-wrap: wrap; }
.pager-info { padding: .85rem var(--pad); }

.empty-state { text-align: center; padding: 2.8rem 1rem; color: var(--muted); }
.empty-state .empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.7rem; margin: 0 auto .9rem; }
.empty-state h6 { color: var(--text); font-weight: 700; margin-bottom: .25rem; }
.empty-state p { margin: 0 auto .9rem; max-width: 380px; font-size: .86rem; }

.flash-stack { position: fixed; top: 22px; right: 22px; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 32px)); }
.flash { background: var(--surface); border-radius: var(--radius-sm); padding: .75rem 1rem; box-shadow: var(--shadow-lg); border: 1px solid var(--border); border-left: 4px solid var(--c, var(--info)); display: flex; gap: .6rem; align-items: flex-start; animation: flashIn .25s ease; font-size: .87rem; }
.flash i { color: var(--c); font-size: 1.1rem; margin-top: 1px; }
.flash-success { --c: var(--ok); } .flash-danger { --c: var(--danger); } .flash-warning { --c: var(--warn); } .flash-info { --c: var(--info); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Tablero de órdenes (kanban) ─────────────────────────────────────── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: .6rem; scroll-snap-type: x proximity; align-items: start; }
.board-col { background: var(--surface-2); border-radius: var(--radius); padding: .7rem; min-width: 0; scroll-snap-align: start; border: 1px solid var(--border); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; padding: .25rem .4rem .6rem; font-weight: 700; font-size: .85rem; }
.board-col-head .count { background: var(--surface); border-radius: 999px; padding: .05rem .55rem; font-size: .74rem; color: var(--text-2); border: 1px solid var(--border); }
.board-col-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: .45rem; }
.order-card { background: var(--surface); border-radius: calc(var(--radius) - 3px); padding: .85rem; margin-bottom: .6rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); display: block; color: inherit; }
.order-card:hover { border-color: var(--brand); color: inherit; box-shadow: 0 8px 22px -12px rgba(var(--brand-rgb), .5); }
.order-card .plate { font-weight: 800; letter-spacing: .05em; font-size: 1.02rem; background: var(--surface-2); border: 1.5px solid var(--border-strong); border-radius: 7px; padding: .05rem .5rem; display: inline-block; font-variant-numeric: tabular-nums; }
.order-card .oc-services { font-size: .78rem; color: var(--muted); margin: .5rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-card .oc-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .76rem; }
.order-card .oc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .65rem; }
.plate-tag { font-weight: 800; letter-spacing: .05em; background: var(--surface-2); border: 1.5px solid var(--border-strong); border-radius: 7px; padding: .05rem .5rem; display: inline-block; font-variant-numeric: tabular-nums; }

/* ── Formulario de orden (registro rápido) ───────────────────────────── */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.cart { position: sticky; top: 92px; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.type-pick input { display: none; }
.type-pick label { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .4rem; text-align: center; cursor: pointer; font-size: .78rem; font-weight: 650; color: var(--text-2); background: var(--surface); transition: all .12s; line-height: 1.2; }
.type-pick label i { display: block; font-size: 1.4rem; margin-bottom: .2rem; color: var(--muted); }
.type-pick input:checked + label { border-color: var(--brand); background: var(--brand-softer); color: var(--brand); }
.type-pick input:checked + label i { color: var(--brand); }
.catalog-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.catalog-tabs::-webkit-scrollbar { display: none; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .65rem; }
.svc-tile { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .8rem; background: var(--surface); cursor: pointer; text-align: left; transition: all .12s; display: flex; flex-direction: column; gap: .25rem; position: relative; color: var(--text); width: 100%; }
.svc-tile:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(var(--brand-rgb), .6); }
.svc-tile.in-cart { border-color: var(--brand); background: var(--brand-softer); }
.svc-tile .svc-name { font-weight: 650; font-size: .86rem; line-height: 1.25; padding-right: 1.6rem; }
.svc-tile .svc-desc { font-size: .72rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.9em; }
.svc-tile .svc-price { font-weight: 750; font-size: .95rem; font-variant-numeric: tabular-nums; }
.svc-tile .svc-meta { font-size: .7rem; color: var(--muted); display: flex; gap: .5rem; }
.svc-tile .svc-add { position: absolute; top: .6rem; right: .6rem; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; font-size: .8rem; }
.svc-tile .svc-count { position: absolute; top: .5rem; right: .5rem; min-width: 24px; height: 24px; border-radius: 12px; background: var(--brand); color: var(--brand-contrast); font-weight: 700; font-size: .75rem; display: grid; place-items: center; padding: 0 .35rem; }
.cart-line { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .65rem .75rem; margin-bottom: .55rem; background: var(--surface); }
.cart-line.is-extra { margin-left: 1rem; border-style: dashed; }
.cart-line .cl-name { font-weight: 650; font-size: .85rem; line-height: 1.25; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: transparent; width: 26px; height: 26px; font-weight: 700; color: var(--text-2); }
.qty button:hover { background: var(--surface-3); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: .82rem; }
.worker-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .12rem .35rem .12rem .15rem; font-size: .72rem; font-weight: 600; }
.cart-totals .row-t { display: flex; justify-content: space-between; padding: .22rem 0; font-size: .86rem; color: var(--text-2); }
.cart-totals .row-t.grand { font-size: 1.25rem; font-weight: 800; color: var(--text); border-top: 1px dashed var(--border-strong); margin-top: .35rem; padding-top: .65rem; letter-spacing: -.02em; }
.split-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-3); margin: .5rem 0 .3rem; }
.split-bar .sb-w { background: var(--brand); } .split-bar .sb-o { background: var(--ink); }
.plate-input { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 1.15rem; text-align: center; }
.lookup-card { background: var(--ok-soft); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .8rem; color: var(--text); border: 1px solid transparent; }

/* ── Gráficas y listas de resumen ────────────────────────────────────── */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.rank-row { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rank-n { width: 24px; font-weight: 800; color: var(--muted); text-align: center; }
.rank-row .rank-main { flex: 1; min-width: 0; }
.rank-row .rank-bar { height: 5px; background: var(--surface-3); border-radius: 99px; margin-top: .3rem; overflow: hidden; }
.rank-row .rank-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.stat-line { display: flex; justify-content: space-between; align-items: baseline; padding: .42rem 0; border-bottom: 1px dashed var(--border); gap: 1rem; }
.stat-line:last-child { border-bottom: 0; }
.stat-line .k { color: var(--text-2); } .stat-line .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.stat-line.total { border-top: 2px solid var(--border-strong); border-bottom: 0; margin-top: .3rem; padding-top: .7rem; font-size: 1.05rem; }
.stat-line.total .v { font-weight: 800; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.text-pos { color: var(--ok) !important; } .text-neg { color: var(--danger) !important; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; font-size: .84rem; }
.timeline li::before { content: ''; position: absolute; left: .32rem; top: .35rem; bottom: -.2rem; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ── Configuración / apariencia ──────────────────────────────────────── */
.swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--sw); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--border-strong); cursor: pointer; transition: transform .12s; }
.swatch input:checked + span { box-shadow: 0 0 0 2.5px var(--sw); transform: scale(1.08); }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.opt-cards input { display: none; }
.opt-cards label { display: block; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; text-align: center; cursor: pointer; font-weight: 650; font-size: .8rem; background: var(--surface); }
.opt-cards input:checked + label { border-color: var(--brand); background: var(--brand-softer); color: var(--brand); }
.theme-preview { border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); padding: .8rem; display: flex; gap: .6rem; min-height: 180px; }
.theme-preview .tp-side { width: 62px; background: var(--surface); border-radius: calc(var(--radius) - 4px); padding: .5rem; display: flex; flex-direction: column; gap: .4rem; border: 1px solid var(--border); }
.theme-preview .tp-side i { display: block; height: 10px; border-radius: 4px; background: var(--surface-3); }
.theme-preview .tp-side i.on { background: var(--brand); }
.theme-preview .tp-main { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.theme-preview .tp-card { background: var(--surface); border-radius: calc(var(--radius) - 4px); padding: .6rem; border: 1px solid var(--border); font-size: .72rem; }
.theme-preview .tp-accent { background: linear-gradient(140deg, var(--brand-light) -30%, var(--brand) 38%, var(--brand-dark) 120%); color: var(--brand-contrast); border: 0; }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: .7rem; }
.perm-group h6 { font-size: .82rem; margin-bottom: .5rem; }

/* ── Pantallas de acceso e instalador ────────────────────────────────── */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); background: var(--bg); }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(1200px 600px at 10% -10%, var(--brand-light), transparent 60%), linear-gradient(155deg, #15181f 0%, #0c0e12 55%, #1b1f27 100%); }
.auth-hero.has-bg { background-size: cover; background-position: center; }
.auth-hero.has-bg::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10,12,16,.82), rgba(10,12,16,.45) 55%, rgba(var(--brand-rgb), .55)); }
.auth-hero > * { position: relative; z-index: 2; }
.auth-hero .bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.auth-hero .bubbles i { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), rgba(255,255,255,.05) 60%); animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
.auth-hero h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; color: #fff; max-width: 14ch; }
.auth-hero h1 em { font-style: normal; color: var(--brand-light); }
.auth-hero p.lead { color: rgba(255,255,255,.78); max-width: 46ch; font-size: 1.02rem; }
.hero-features { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-feature { width: 92px; text-align: center; font-size: .72rem; color: rgba(255,255,255,.85); line-height: 1.25; }
.hero-feature i { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); margin: 0 auto .5rem; font-size: 1.3rem; background: rgba(255,255,255,.07); backdrop-filter: blur(6px); }
.auth-brand { display: flex; align-items: center; gap: .7rem; font-weight: 750; font-size: 1.15rem; letter-spacing: -.02em; }
.auth-panel { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 430px; background: var(--surface); border-radius: var(--radius-lg); padding: 2.2rem 2rem; box-shadow: var(--shadow-lg); border: 1px solid var(--border); position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.auth-card h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; } .auth-card h2 em { font-style: normal; color: var(--brand); }
.input-icon { position: relative; }
.input-icon > i.lead-i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-icon > .eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: .35rem .5rem; }
.auth-footer-feats { display: flex; justify-content: space-around; gap: .5rem; margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--border); font-size: .72rem; color: var(--muted); text-align: center; }
.auth-footer-feats i { display: block; font-size: 1.15rem; color: var(--text-2); margin-bottom: .15rem; }

.install-wrap { max-width: 880px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.stepper { display: flex; gap: .35rem; margin: 1.2rem 0 1.6rem; flex-wrap: wrap; }
.stepper .st { flex: 1 1 90px; text-align: center; font-size: .7rem; font-weight: 650; color: var(--muted); position: relative; padding-top: 34px; min-width: 70px; }
.stepper .st::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: .78rem; }
.stepper .st::after { content: ''; position: absolute; top: 12px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--border); }
.stepper .st:last-child::after { display: none; }
.stepper .st.done::before { background: var(--ok); color: #fff; content: '✓'; } .stepper .st.done::after { background: var(--ok); }
.stepper .st.current { color: var(--text); } .stepper .st.current::before { background: var(--brand); color: var(--brand-contrast); }
.check-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.check-row:last-child { border-bottom: 0; }
.check-row .ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; flex: 0 0 26px; }
.check-row .ico.ok { background: var(--ok-soft); color: var(--ok); } .check-row .ico.bad { background: var(--danger-soft); color: var(--danger); } .check-row .ico.warn { background: var(--warn-soft); color: var(--warn); }

/* ── Recibos / impresión ─────────────────────────────────────────────── */
.receipt { background: #fff; color: #111; max-width: 340px; margin: 0 auto; padding: 1.1rem; font-family: 'Courier New', ui-monospace, monospace; font-size: 12px; line-height: 1.45; box-shadow: var(--shadow); border-radius: 6px; }
.receipt h4 { font-family: var(--font); font-size: 15px; text-align: center; margin: 0; color: #111; }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #666; margin: .5rem 0; }
.receipt table { width: 100%; } .receipt td { padding: 1px 0; vertical-align: top; } .receipt td.r { text-align: right; white-space: nowrap; }
.receipt .big { font-size: 14px; font-weight: 700; }
.print-doc { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.print-doc h1, .print-doc h2, .print-doc h3, .print-doc h4, .print-doc h5, .print-doc h6 { color: #111; }

.mobile-bar { display: none; }
.sidebar-backdrop { display: none; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .order-layout { grid-template-columns: 1fr; }
  .cart { position: static; }
  .topbar-search { display: none; }
}
@media (max-width: 991.98px) {
  .app-shell { padding: 10px; gap: 10px; display: block; }
  .sidebar { position: fixed; left: 10px; top: 10px; bottom: 10px; height: auto; z-index: 1050; transform: translateX(-120%); transition: transform .25s ease; width: min(300px, calc(100vw - 20px)); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(8,10,14,.5); z-index: 1040; backdrop-filter: blur(2px); }
  body.sidebar-collapsed .sidebar { width: min(300px, calc(100vw - 20px)); }
  body.sidebar-collapsed .brand-name, body.sidebar-collapsed .nav-link-ui span, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .user-chip .u-text, body.sidebar-collapsed .sidebar-collapse-btn span { display: initial; }
  body.sidebar-collapsed .nav-link-ui { justify-content: flex-start; padding: .62rem .8rem; }
  .sidebar-collapse-btn { display: none; }
  .mobile-bar { display: inline-grid; }
  .topbar { top: 10px; padding: .55rem .75rem; }
  .app-main { gap: 10px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 280px; padding-bottom: 1.5rem; }
  .auth-hero h1 { font-size: 2rem; }
  .hero-features { display: none; }
}
@media (max-width: 575.98px) {
  .page-head h2 { font-size: 1.3rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: .85rem; min-height: 98px; } .kpi .kpi-value { font-size: 1.3rem; }
  .topbar-title .sub { display: none; }
  .btn-label-hide { display: none; }
  .auth-card { padding: 1.6rem 1.25rem; }
  .board { grid-auto-columns: 86%; }
  .flash-stack { right: 12px; left: 12px; top: 12px; max-width: none; }
}

@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .page-actions, .no-print, .flash-stack, .btn, .sidebar-backdrop { display: none !important; }
  .app-shell { display: block; padding: 0; } .page { padding: 0; }
  .card-ui, .print-doc, .receipt { box-shadow: none !important; border: 0 !important; }
  .print-doc { max-width: none; padding: 0; }
  .receipt { max-width: 80mm; }
  @page { margin: 12mm; }
}

/* Barra inferior del carrito (móvil/tablet) */
.cart-bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1030; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .65rem .9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cart-bar[hidden] { display: none !important; }
@media (min-width: 1200px) { .cart-bar { display: none !important; } }
@media (max-width: 1199.98px) { .order-layout { padding-bottom: 5rem; } }
