/* ERP MLC · interfaz profesional unificada v39 */
:root {
  --navy: #0c2742;
  --navy-2: #153c60;
  --blue: #1976c9;
  --blue-bright: #3a9ae7;
  --violet: #6558c7;
  --ink: #172d43;
  --muted: #64788d;
  --page: #f2f6fa;
  --panel: #fff;
  --line: #dce6ef;
  --line-strong: #c6d5e3;
  --green: #15815f;
  --red: #c83f54;
  --amber: #b67118;
  --shadow: 0 10px 30px rgba(15, 45, 72, .075);
  --shadow-raised: 0 20px 54px rgba(10, 36, 59, .14);
}

html { background: var(--page); }
body {
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 76% -12%, rgba(62, 151, 228, .1), transparent 32%),
    linear-gradient(180deg, #f5f8fb 0, #f1f5f9 100%);
}

button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(38, 132, 213, .22);
  outline-offset: 2px;
}

/* Estructura y navegación */
.app-shell { grid-template-columns: 246px minmax(0, 1fr); }
.app-main { margin-left: 246px; }
.sidebar {
  width: 246px;
  padding: 17px 14px;
  background:
    radial-gradient(circle at 12% 0, rgba(58, 154, 231, .2), transparent 28%),
    linear-gradient(180deg, #153956 0%, #102d49 54%, #0a2138 100%);
  box-shadow: 12px 0 36px rgba(9, 31, 51, .1);
}
.app-brand {
  min-height: 67px;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
}
.app-brand:hover { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .075); }
.app-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 9px 20px rgba(3, 20, 34, .22); }
.app-brand > span:nth-child(2) strong { font-size: 14px; }
.app-brand > span:nth-child(2) small { color: #abc2d6; font-size: 11px; }
.app-brand > b { color: #d5e7f7; background: rgba(255, 255, 255, .07); }
.app-brand > b svg { width: 17px; height: 17px; }
.side-nav { gap: 5px; padding: 22px 1px; }
.side-nav button {
  min-height: 50px;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #c9d8e6;
  font-size: 13px;
  font-weight: 750;
}
.side-nav button .nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 10px;
  color: #bdd2e4;
  background: rgba(255, 255, 255, .07);
}
.nav-icon svg { width: 19px; height: 19px; display: block; }
.side-nav button:hover { border-color: rgba(255, 255, 255, .08); color: #fff; background: rgba(255, 255, 255, .06); }
.side-nav button.active {
  border-color: rgba(103, 183, 248, .25);
  color: #fff;
  background: linear-gradient(105deg, rgba(43, 140, 221, .34), rgba(101, 88, 199, .17));
  box-shadow: inset 3px 0 #62b6fa, 0 8px 20px rgba(4, 22, 38, .13);
}
.side-nav button.active .nav-icon { color: #fff; background: linear-gradient(145deg, #2a8bd8, #6558c7); }
.install-button { display: none; }
.sync-note { padding: 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 13px; background: rgba(3, 18, 32, .2); }
.sync-note strong { font-size: 12px; }
.sync-note small { color: #abc1d4; }
.account-button { min-height: 58px; padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 13px; background: rgba(255, 255, 255, .05); }
.account-button:hover { background: rgba(255, 255, 255, .085); }
.page-content { width: min(100%, 1520px); padding: 28px clamp(24px, 3vw, 46px) 82px; }

/* Sistema visual común */
.page-header, .inventory-minimal-header {
  position: relative;
  min-height: 108px;
  margin: 0 0 18px;
  padding: 21px 24px;
  align-items: center;
  border: 1px solid rgba(202, 217, 231, .9);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 8%, rgba(59, 153, 231, .12), transparent 29%),
    linear-gradient(130deg, #fff, #f8fbfe);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.page-header::before, .inventory-minimal-header::before {
  content: "";
  position: absolute;
  right: 4%;
  bottom: -94px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(56, 147, 222, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(60, 153, 229, .028), 0 0 0 62px rgba(101, 88, 199, .02);
  pointer-events: none;
}
.page-header > *, .inventory-minimal-header > * { position: relative; z-index: 1; }
.eyebrow, .inventory-minimal-header > div > span { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.page-header h1, .inventory-minimal-header h1 { margin: 2px 0 0; color: var(--navy); font-size: clamp(28px, 2.7vw, 38px); letter-spacing: -.045em; }
.page-header p { max-width: 720px; margin-top: 5px; color: #60758a; font-size: 14px; line-height: 1.5; }
.header-actions { gap: 8px; }
.button {
  min-height: 43px;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.button.primary { border-color: #176bb6; background: linear-gradient(145deg, #298bdc, #1769b3 76%); box-shadow: 0 8px 20px rgba(31, 120, 200, .2); }
.button.primary:hover { background: linear-gradient(145deg, #3598e8, #1769b3 76%); box-shadow: 0 11px 25px rgba(31, 120, 200, .27); transform: translateY(-1px); }
.button.secondary, .mini-button, .tool-reset { border-color: var(--line-strong); background: linear-gradient(180deg, #fff, #f8fafc); box-shadow: none; }
.button.secondary:hover, .mini-button:hover, .tool-reset:hover { border-color: #9dbbd5; background: #f4f9fd; transform: translateY(-1px); }
.panel, .work-panel { border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 255, 255, .98); box-shadow: var(--shadow); }
.work-panel { overflow: hidden; }
.tools, .tools:has(.compact-select) { padding: 15px 18px; border-bottom-color: var(--line); background: #fbfcfe; }
.tools input, .tools select, .inventory-toolbar input, .inventory-toolbar select, .form-field input, .form-field select, .form-field textarea {
  border-color: #cedce8;
  border-radius: 10px;
  background: #fff;
}
.tools input:focus, .tools select:focus, .inventory-toolbar input:focus, .inventory-toolbar select:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: #5d9ed4;
  box-shadow: 0 0 0 4px rgba(31, 120, 200, .09);
}
table thead { background: #f5f8fb; }
table th { color: #71859a; font-size: 11px; letter-spacing: .055em; }
table tbody tr:hover { background: #f8fbfe; }
.directory-row:hover, .document-card:hover, .mobile-card:hover { background: #f8fbfe; }

/* Inicio: presencia visual y datos operativos útiles */
.home-heading {
  position: relative;
  min-height: 160px;
  margin-bottom: 17px;
  padding: 27px 29px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(101, 190, 255, .3), transparent 27%),
    radial-gradient(circle at 67% 118%, rgba(139, 112, 230, .34), transparent 36%),
    linear-gradient(125deg, #0e2a46 0%, #174d76 62%, #246fa8 100%);
  box-shadow: 0 20px 52px rgba(12, 47, 78, .2);
  overflow: hidden;
}
.home-heading::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -115px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, .026), 0 0 0 74px rgba(255, 255, 255, .018);
}
.home-heading > *, .home-account { position: relative; z-index: 1; }
.home-heading > div { display: grid; gap: 2px; }
.home-heading > div > span { color: #a5d8ff; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.home-heading h1 { margin: 0; color: #fff; font-size: clamp(34px, 4vw, 47px); letter-spacing: -.05em; }
.home-heading p { margin: 4px 0 0; color: #d6e9f7; font-size: 14px; }
.home-account { padding: 9px 11px; border-color: rgba(255, 255, 255, .18); color: #fff; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); }
.home-account:hover { border-color: rgba(255, 255, 255, .29); background: rgba(255, 255, 255, .15); }
.home-account > span { background: rgba(8, 35, 58, .58); }
.home-account strong { color: #fff; }
.home-account small { color: #d4e7f5; }
.home-dashboard-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 15px; margin-bottom: 20px; }
.home-operation, .home-stock-panel { min-width: 0; margin: 0; padding: 19px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.home-operation { background: rgba(255, 255, 255, .98); }
.home-operation > header, .home-areas > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.home-operation > header > div, .home-areas > header > div { display: grid; gap: 3px; }
.home-operation > header span, .home-areas > header span { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.home-operation h2, .home-areas h2, .home-insight-panel h2 { margin: 0; color: var(--navy); font-size: 18px; letter-spacing: -.025em; }
.home-operation > header p, .home-areas > header p { margin: 0; color: var(--muted); font-size: 13px; }
.minimal-fast-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.minimal-fast-actions button, .minimal-count-action {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid #d8e3ec;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f8fbfd);
  box-shadow: 0 7px 18px rgba(19, 50, 79, .045);
}
.minimal-fast-actions button:hover, .minimal-count-action:hover { border-color: #a9c4db; box-shadow: 0 12px 27px rgba(18, 50, 79, .09); transform: translateY(-2px); }
.minimal-fast-actions button > span, .minimal-count-action > span { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 7px 16px rgba(18, 52, 80, .12); }
.minimal-fast-actions button.entry > span { color: #fff; background: linear-gradient(145deg, #1e9a72, #13775a); }
.minimal-fast-actions button.exit > span { color: #fff; background: linear-gradient(145deg, #da5366, #bd354a); }
.minimal-fast-actions strong, .minimal-count-action strong { font-size: 14px; }
.minimal-fast-actions small, .minimal-count-action small { font-size: 12px; }
.minimal-count-action { width: 100%; margin-top: 9px; border-color: #cfcbed; background: linear-gradient(145deg, #fbfaff, #f2f0fc); }
.minimal-count-action > span { color: #fff; background: linear-gradient(145deg, #7768d3, #5549ad); }
.minimal-count-action > b { color: var(--violet); font-size: 12px; }
.home-readonly-note { margin: 0; padding: 17px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); background: #f8fafc; }
.home-stock-panel { color: #fff; background: radial-gradient(circle at 100% 0, rgba(81, 177, 246, .2), transparent 36%), linear-gradient(150deg, #173d60, #0d2944); }
.home-stock-panel > header { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.home-stock-panel > header > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #3190dc, #6b5bcb); }
.home-stock-panel svg { width: 21px; height: 21px; }
.home-stock-panel > header > div { display: grid; gap: 2px; }
.home-stock-panel > header small { color: #a9c7dc; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.home-stock-panel > header strong { font-size: 14px; }
.home-stock-panel > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 14px 0; }
.home-stock-panel > div > span { display: grid; gap: 3px; }
.home-stock-panel > div b { color: #fff; font-size: 22px; letter-spacing: -.04em; }
.home-stock-panel > div small { color: #afc5d5; font-size: 11px; }
.home-stock-panel > button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; color: #e7f2fa; background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 800; cursor: pointer; }
.home-stock-panel > button:hover { background: rgba(255, 255, 255, .12); }
.home-section { margin-bottom: 20px; }
.home-areas { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); }
.home-area-list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; overflow: visible; border: 0; background: transparent; }
.home-area-list button,
.home-area-list button:nth-child(2n),
.home-area-list button:nth-last-child(-n+2) {
  grid-column: span 4;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #fafcff);
  text-align: left;
  box-shadow: 0 5px 15px rgba(20, 49, 76, .035);
}
.home-area-list button:nth-last-child(-n+2) { grid-column: span 6; }
.home-area-list button:hover { border-color: #a8c3da; background: #f7fbff; box-shadow: 0 10px 24px rgba(19, 51, 80, .08); transform: translateY(-2px); }
.home-area-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; box-shadow: 0 7px 16px rgba(24, 62, 95, .13); }
.home-area-icon svg { width: 22px; height: 22px; }
.home-area-list button > div { min-width: 0; display: grid; gap: 4px; }
.home-area-list strong { color: var(--navy); font-size: 14px; }
.home-area-list button > div > span { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.home-area-list button > b { margin-left: auto; color: var(--blue); font-size: 11px; white-space: nowrap; }
.home-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.home-insight-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.home-insight-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px 13px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.home-insight-panel > header > div { display: flex; align-items: center; gap: 10px; }
.home-insight-panel > header > div > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf5fd; }
.home-insight-panel.urgent > header > div > span { color: var(--amber); background: #fff4e2; }
.home-insight-panel svg { width: 19px; height: 19px; }
.home-insight-panel header small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.home-insight-panel h2 { font-size: 14px; }
.home-insight-panel header button { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--blue); background: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.home-insight-panel > div > button, .home-insight-panel.activity > div > div { width: 100%; min-height: 52px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 17px; border: 0; border-bottom: 1px solid #edf1f5; color: var(--ink); background: #fff; text-align: left; }
.home-insight-panel > div > :last-child { border-bottom: 0; }
.home-insight-panel > div > button:hover { background: #f8fbfe; }
.home-insight-panel > div > button > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #eef6fc; font-size: 9px; font-weight: 900; }
.home-insight-panel > div > * > div { min-width: 0; display: grid; gap: 2px; }
.home-insight-panel > div strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.home-insight-panel > div small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-insight-panel > div > * > b { color: var(--navy); font-size: 14px; }
.home-insight-panel.activity > div > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; font-weight: 900; }
.home-insight-panel.activity > div > div > span.entry { color: var(--green); background: #ebf8f3; }
.home-insight-panel.activity > div > div > span.exit { color: var(--red); background: #fff0f2; }
.home-insight-empty { margin: 0; padding: 28px 18px; color: var(--muted); font-size: 12px; text-align: center; }

/* Inventario compacto y legible */
.inventory-workspace { border-radius: 17px; }
.inventory-toolbar { min-height: 76px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.inventory-search > div { border-color: #cedce8; border-radius: 11px; box-shadow: inset 0 1px 2px rgba(18, 48, 75, .025); }
.inventory-filters > summary { border-color: var(--line-strong); border-radius: 10px; }
.inventory-count-label { color: #52697f; font-size: 12px; }
.inventory-list-heading { grid-template-columns: minmax(0, 1fr) 150px 116px; padding: 10px 20px; background: #f5f8fb; }
.inventory-row { grid-template-columns: minmax(0, 1fr) 150px 116px; min-height: 78px; padding: 12px 20px; border-bottom-color: #e8eef4; }
.inventory-row:hover { background: #f9fbfd; }
.inventory-product { gap: 4px; }
.inventory-product strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.inventory-product small { color: #72869a; font-size: 11px; }
.inventory-row-stock strong { font-size: 22px; }
.inventory-row-status { font-size: 11px; }
.inventory-row-menu > summary { min-height: 36px; border-color: var(--line-strong); border-radius: 9px; background: #fff; }
.inventory-row.count-protected { border-left: 3px solid var(--violet); background: #fbfaff; }
.inventory-row.count-protected .inventory-row-status { color: var(--violet); }
.inventory-row.count-protected .inventory-row-status i { background: var(--violet); }
.inventory-lock-banner { border-color: #d3cff0; background: linear-gradient(135deg, #fbfaff, #f3f1fc); }
.inventory-lock-banner > span { color: #fff; background: linear-gradient(145deg, #796ad5, #5548ad); }

/* Constructor de inventariado libre */
.inventory-count-builder { overflow: hidden; margin-bottom: 18px; border-top: 4px solid var(--blue); }
.inventory-count-builder > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #fff, #f6faff); }
.inventory-count-builder > header > div:first-child { display: grid; gap: 3px; }
.inventory-count-builder > header span { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.inventory-count-builder h2 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.025em; }
.inventory-count-builder header p { margin: 0; color: var(--muted); font-size: 13px; }
.inventory-count-selected { min-width: 94px; display: grid; place-items: center; gap: 1px; padding: 10px 14px; border: 1px solid #d3cff0; border-radius: 12px; color: var(--violet); background: #f5f3fd; }
.inventory-count-selected strong { font-size: 25px; line-height: 1; }
.inventory-count-selected small { font-size: 11px; font-weight: 800; }
.inventory-count-picker-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.inventory-count-picker-tools > label { min-width: 260px; max-width: 580px; flex: 1; display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 0 13px; border: 1px solid #cddbe7; border-radius: 10px; background: #fff; }
.inventory-count-picker-tools i { color: var(--blue); font-size: 18px; font-style: normal; }
.inventory-count-picker-tools input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.inventory-count-picker-tools > div { display: flex; gap: 7px; }
.inventory-count-picker-tools button { min-height: 35px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--navy); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.inventory-count-picker-tools button:hover { border-color: #99b8d2; background: #f4f9fd; }
.inventory-count-choices { max-height: 430px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 13px 18px; overflow: auto; background: #f6f8fb; }
.inventory-count-choice { min-width: 0; min-height: 66px; display: grid; grid-template-columns: 18px 39px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #dde6ee; border-radius: 11px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.inventory-count-choice:hover { border-color: #aac4db; box-shadow: 0 6px 15px rgba(17, 51, 79, .055); }
.inventory-count-choice.selected { border-color: #6da9d8; background: #f0f8fe; box-shadow: inset 3px 0 var(--blue); }
.inventory-count-choice input { width: 17px; height: 17px; accent-color: var(--blue); }
.inventory-count-choice > span.product-thumb { width: 39px; height: 39px; border-radius: 10px; }
.inventory-count-choice > div { min-width: 0; display: grid; gap: 3px; }
.inventory-count-choice > div strong { overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-count-choice > div small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-count-choice > b { color: var(--navy); font-size: 15px; white-space: nowrap; }
.inventory-count-choice > b small { color: var(--muted); font-size: 10px; font-weight: 700; }
.inventory-count-choice-empty { margin: 0; padding: 34px; color: var(--muted); text-align: center; }
.inventory-count-builder form > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--line); background: #fff; }
.inventory-count-builder form > footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inventory-count-builder form > footer strong { color: var(--navy); }
.inventory-count-progress, .inventory-count-workspace, .inventory-count-archive { border-radius: 17px; box-shadow: var(--shadow); }
.inventory-count-product h2 { color: var(--navy); }
.inventory-count-comparison { background: #f5f8fb; }
.inventory-count-help { display: block; border-color: #d3cff0; background: #f7f5fd; }

/* Módulos, formularios y ventanas */
.inline-summary { margin: -3px 0 13px; padding: 0 2px; }
.directory-row, .document-card { min-height: 78px; padding: 14px 17px; }
.directory-row .client-mark, .document-icon { border-radius: 11px; box-shadow: 0 7px 15px rgba(24, 65, 99, .11); }
.directory-row strong, .document-card header strong { color: var(--navy); font-size: 12px; }
.sat-inline-form input { height: 42px; border-color: #d8b36d; border-radius: 10px; background: #fffdf8; }
.sat-code { border-radius: 9px; background: #edf7ff; }
.quote-tabs { padding: 4px; border-radius: 11px; }
.quote-tabs button.active { color: #fff; background: linear-gradient(145deg, #2882cc, #6255bd); box-shadow: 0 6px 15px rgba(38, 101, 162, .18); }
.quote-customer-card, .quote-lines-card, .quote-finish-card { border-radius: 17px; box-shadow: var(--shadow); }
.quote-customer-card { border-top: 3px solid var(--violet); }
.quote-lines-card { border-top: 3px solid var(--blue); }
.quote-finish-card { border-top: 3px solid var(--green); }
.quote-line { border-radius: 13px; background: linear-gradient(145deg, #fff, #fafcff); }
.quote-totals .grand { border-radius: 13px; background: linear-gradient(135deg, #153b5e, #235f90 65%, #6558c7); }
.simple-form-step, .optional-fields { border-radius: 14px; }
.modal { border-radius: 22px; box-shadow: 0 34px 90px rgba(5, 25, 43, .3); }
.modal > header { background: linear-gradient(145deg, #fff, #f5f9fd); }
.modal-footer { background: #fbfcfe; }
.notification-bubble { background: linear-gradient(145deg, #db4c61, #bf3047); box-shadow: 0 14px 32px rgba(181, 42, 64, .28); }
.notification-bubble span svg { width: 21px; height: 21px; }

@media (max-width: 1180px) {
  .home-dashboard-row { grid-template-columns: 1fr; }
  .home-stock-panel > div { max-width: 520px; }
  .home-area-list button, .home-area-list button:nth-last-child(-n+2) { grid-column: span 6; }
  .home-area-list button:last-child:nth-child(odd) { grid-column: span 12; }
  .inventory-count-choices { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-main { margin-left: 0; }
  .page-content { padding: 18px 15px calc(94px + env(safe-area-inset-bottom)); }
  .mobile-header { min-height: 61px; padding: calc(9px + env(safe-area-inset-top)) 13px 9px; background: linear-gradient(120deg, #163d5e, #0e2944); box-shadow: 0 5px 18px rgba(10, 35, 57, .15); }
  .mobile-header button { border-radius: 9px; }
  .mobile-header button svg { width: 19px; height: 19px; }
  .mobile-nav { gap: 3px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -7px 24px rgba(22, 44, 66, .09); }
  .mobile-nav button { min-height: 51px; gap: 4px; border-radius: 9px; }
  .mobile-nav button .nav-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #71869a; }
  .mobile-nav button .nav-icon svg { width: 18px; height: 18px; }
  .mobile-nav button.active { color: var(--blue); background: #edf6fd; }
  .mobile-nav button.active .nav-icon { color: var(--blue); }
  .page-header, .inventory-minimal-header { min-height: 102px; padding: 18px 19px; border-radius: 16px; }
  .page-header h1, .inventory-minimal-header h1 { font-size: 28px; }
  .header-actions { width: 100%; }
  .home-heading { min-height: 150px; padding: 24px; }
  .home-heading h1 { font-size: 35px; }
  .home-insights { grid-template-columns: 1fr; }
  .home-area-list button, .home-area-list button:nth-last-child(-n+2), .home-area-list button:last-child:nth-child(odd) { grid-column: span 12; }
  .inventory-list-heading { display: none; }
  .inventory-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .inventory-row-menu { grid-column: 1 / -1; }
  .inventory-row-menu > summary { width: 100%; justify-content: center; }
  .inventory-row-menu > div { position: static; width: 100%; margin-top: 7px; box-shadow: none; }
}

@media (max-width: 620px) {
  body { background: #f3f6f9; }
  .page-content { padding-top: 13px; padding-left: 11px; padding-right: 11px; }
  .page-header, .inventory-minimal-header { min-height: auto; padding: 16px; border-radius: 15px; }
  .page-header h1, .inventory-minimal-header h1 { font-size: 26px; }
  .page-header p { max-width: 94%; font-size: 11px; }
  .home-heading { min-height: 143px; align-items: flex-start; padding: 21px 19px; border-radius: 18px; }
  .home-heading h1 { font-size: 30px; }
  .home-heading p { max-width: 78%; font-size: 11px; }
  .home-account { padding: 7px; }
  .home-account > div { display: none; }
  .home-operation, .home-stock-panel, .home-areas { padding: 14px; border-radius: 15px; }
  .home-operation > header, .home-areas > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .home-operation > header p, .home-areas > header p { display: none; }
  .minimal-fast-actions { grid-template-columns: 1fr 1fr; }
  .minimal-fast-actions button { min-height: 68px; padding: 10px; }
  .minimal-fast-actions button > span { width: 35px; height: 35px; }
  .minimal-fast-actions small { display: none; }
  .home-stock-panel > div b { font-size: 20px; }
  .home-area-list { gap: 8px; }
  .home-area-list button, .home-area-list button:nth-child(2n), .home-area-list button:nth-last-child(-n+2), .home-area-list button:last-child:nth-child(odd) { min-height: 77px; padding: 12px; border-radius: 12px; }
  .home-area-icon { width: 40px; height: 40px; }
  .home-area-list button > div > span { white-space: normal; }
  .home-area-list button > b { font-size: 0; }
  .home-area-list button > b::after { content: "›"; font-size: 17px; }
  .home-insight-panel { border-radius: 15px; }
  .home-insight-panel > header { padding: 13px; }
  .home-insight-panel > div > button, .home-insight-panel.activity > div > div { padding: 9px 13px; }
  .inventory-toolbar { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .inventory-count-label { grid-column: 1 / -1; justify-self: start; }
  .inventory-row { grid-template-columns: minmax(0, 1fr) 80px; min-height: 70px; padding: 10px 12px; }
  .inventory-row-stock strong { font-size: 19px; }
  .inventory-count-builder > header { align-items: flex-start; padding: 17px; }
  .inventory-count-builder h2 { font-size: 18px; }
  .inventory-count-builder header p { max-width: 230px; }
  .inventory-count-selected { min-width: 70px; padding: 9px; }
  .inventory-count-picker-tools { align-items: stretch; flex-direction: column; padding: 12px; }
  .inventory-count-picker-tools > label { min-width: 0; width: 100%; }
  .inventory-count-picker-tools > div { display: grid; grid-template-columns: 1fr 1fr; }
  .inventory-count-picker-tools button { width: 100%; }
  .inventory-count-choices { max-height: 390px; padding: 9px; }
  .inventory-count-choice { grid-template-columns: 18px 36px minmax(0, 1fr) auto; padding: 9px; }
  .inventory-count-choice > span.product-thumb { width: 36px; height: 36px; }
  .inventory-count-builder form > footer { align-items: stretch; flex-direction: column; padding: 13px; }
  .inventory-count-builder form > footer .button { width: 100%; }
  .tools, .tools:has(.compact-select) { padding: 12px; }
  .modal { border-radius: 21px 21px 0 0; }
  .notification-bubble { right: 13px; bottom: calc(69px + env(safe-area-inset-bottom)); }
}

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