:root {
  --bg: #f3f6f8; --panel: #ffffff; --panel2: #f8fafc; --line: #d9e2ea;
  --text: #173042; --muted: #65798b; --accent: #0b7285; --accent-2: #e97845;
  --danger: #bf3f4e; --warn: #a96705; --ok: #16855b;
  --shadow: 0 5px 18px rgba(29, 56, 72, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
#app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }

/* Sidebar */
.sidebar { background: #ffffff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 17px 18px 15px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; cursor: pointer; }
.brand:hover { background: #f6faf9; }
.brand-logo { width: 164px; height: 84px; object-fit: contain; object-position: center; }
.brand-name { font-weight: 750; font-size: 14px; color: #1b3e57; }
.brand-sub { color: var(--muted); font-size: 11.5px; }
#nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 7px; color: #516779; cursor: pointer; text-decoration: none; font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.nav-item:hover { background: #eef7f7; color: #0c5968; }
.nav-item.active { background: #e2f2f1; color: #075b6a; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.db-status { padding: 8px 10px; background: var(--panel2); border-radius: 8px; margin-bottom: 8px; }
.db-status.ready { color: var(--ok); }
.sidebar-note code { color: #31536b; }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: #ffffff; }
.crumb { font-weight: 600; font-size: 15px; flex: 1; }
.crumb small { color: var(--muted); font-weight: 400; }
.topbar-search { width: 420px; max-width: 42vw; }
.topbar-search input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
.view { padding: 22px; overflow: auto; flex: 1; }
.loading { color: var(--muted); padding: 40px; text-align: center; }

/* Catálogo público: la ruta Inicio no expone código ni navegación interna. */
.home-mode #app { display:block; min-height:100vh; height:auto; }
.home-mode .sidebar, .home-mode .topbar { display:none; }
.home-mode .main { display:block; }
.home-mode .view { padding:0; overflow:visible; background:#fff; }
.catalog-home { min-height:0; padding:14px clamp(20px, 5vw, 78px) 34px; border-top:3px solid #173f56; border-bottom:1px solid #cfdde0; background:#eef5f3; }
.catalog-home > *, .catalog-results > * { width:min(1400px, 100%); margin-left:auto; margin-right:auto; }
.catalog-home-head { display:grid; grid-template-columns:330px minmax(0,1fr); gap:34px; align-items:center; padding:0 0 14px; border-bottom:1px solid #d4e0e2; }
.catalog-home-brand { display:flex; flex-direction:column; align-items:flex-start; min-width:0; gap:3px; }
.catalog-home-logo { width:318px; height:128px; flex:0 0 auto; object-fit:contain; object-position:left center; filter:drop-shadow(0 6px 8px rgba(20,57,76,.12)); }
.catalog-home-copy { margin:0; }
.catalog-eyebrow { display:none; }
.catalog-home-copy h1 { margin:0; font-size:17px; line-height:1.2; color:#456674; letter-spacing:0; }
.catalog-header-tools { display:grid; gap:19px; min-width:0; }
.catalog-header-nav { display:flex; justify-content:flex-end; align-items:center; gap:24px; min-height:30px; }
.catalog-header-nav a { color:#294e63; text-decoration:none; font-weight:700; font-size:13px; }
.catalog-header-nav a:hover { color:#d85b32; }
.catalog-home-head .btn { border-color:#173f56; color:#173f56; background:#fff; box-shadow:0 2px 0 rgba(23,63,86,.12); }
.catalog-home-head .btn:hover { background:#173f56; color:#fff; }
.catalog-inventory-snapshot { display:flex; align-items:center; gap:0; margin-top:12px; border:1px solid #cfdddf; background:#fff; color:#59717c; overflow:hidden; font-size:12px; }
.catalog-inventory-snapshot span { padding:9px 15px; border-right:1px solid #dce7e7; }
.catalog-inventory-snapshot span:last-child { border-right:0; color:#7b5c3f; }
.catalog-inventory-snapshot b { color:#173f56; font-size:14px; }
.catalog-public-search { position:relative; display:flex; min-width:0; margin:0; }
.catalog-vehicle-trigger { width:230px; flex:0 0 auto; min-height:46px; padding:10px 14px; border:1px solid #173f56; border-radius:6px 0 0 6px; background:#173f56; color:#fff; font:inherit; font-weight:750; text-align:left; cursor:pointer; }
.catalog-vehicle-trigger::after { content:'⌄'; float:right; font-size:17px; line-height:.8; }
.catalog-vehicle-trigger:hover, .catalog-vehicle-trigger:focus-visible { background:#d85b32; border-color:#d85b32; outline:0; }
.catalog-public-search input { width:100%; min-width:0; min-height:46px; padding:10px 15px; border:1px solid #a9c2c5; border-left:0; border-radius:0 6px 6px 0; background:#fff; color:var(--text); font:inherit; box-shadow:0 3px 10px rgba(29,56,72,.06); }
.catalog-public-search input:focus { outline:3px solid rgba(11,114,133,.2); border-color:var(--accent); }
.catalog-autocomplete { position:absolute; z-index:8; top:calc(100% + 4px); right:0; width:calc(100% - 230px); overflow:hidden; border:1px solid var(--line); border-radius:6px; background:#fff; box-shadow:var(--shadow); }
.catalog-suggestion { width:100%; display:grid; grid-template-columns:68px 140px minmax(0, 1fr); gap:10px; align-items:center; padding:10px 14px; border:0; border-bottom:1px solid #edf1f4; background:#fff; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.catalog-suggestion:last-child { border-bottom:0; }
.catalog-suggestion:hover, .catalog-suggestion:focus-visible { background:#eef7f7; outline:0; }
.catalog-suggestion strong { color:#1b3e57; font-size:13px; }
.catalog-suggestion span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.catalog-vehicle-banner { position:relative; height:246px; margin:0 auto 22px; overflow:hidden; border-top:3px solid #d85b32; border-bottom:1px solid #bed0d4; background:#dce8e9; }
.catalog-vehicle-banner img { width:100%; height:100%; display:block; object-fit:cover; object-position:center 52%; }
.catalog-vehicle-banner img.is-changing { animation:catalog-story-fade .38s ease; }
.catalog-story-dots { position:absolute; left:50%; bottom:9px; z-index:2; display:flex; gap:7px; transform:translateX(-50%); }
.catalog-story-dots button { width:9px; height:9px; padding:0; border:1px solid #fff; border-radius:50%; background:rgba(23,63,86,.55); cursor:pointer; }
.catalog-story-dots button.active { background:#fff; transform:scale(1.18); }
@keyframes catalog-story-fade { from { opacity:.45; } to { opacity:1; } }
.catalog-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:7px; min-height:30px; margin:0 0 16px; color:var(--muted); font-size:12px; }
.catalog-crumb { appearance:none; border:0; background:transparent; padding:3px 0; color:var(--accent); cursor:pointer; font:inherit; font-weight:700; }
.catalog-crumb:hover { text-decoration:underline; }
.catalog-crumb.current { color:var(--text); cursor:default; text-decoration:none; }
.catalog-stage-title { display:flex; justify-content:space-between; gap:16px; align-items:baseline; margin:0 0 13px; }
.catalog-stage-title span { font-size:15px; font-weight:800; color:#1b3e57; }
.catalog-stage-title small { color:var(--muted); font-size:12px; text-align:right; }
.make-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(215px, 1fr)); gap:10px; max-width:none; }
.make-card { min-height:100px; display:grid; grid-template-columns:78px minmax(0,1fr); align-items:center; justify-items:center; gap:12px; padding:11px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; text-align:left; color:var(--text); box-shadow:0 1px 0 rgba(29,56,72,.02); transition:border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.make-card:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow:var(--shadow); }
.make-card:focus-visible, .choice-card:focus-visible { outline:3px solid rgba(11,114,133,.28); outline-offset:2px; }
.make-card.unavailable { cursor:not-allowed; opacity:.57; filter:grayscale(1); }
.make-card > img, .make-card .make-logo, .make-card .make-monogram { width:78px; height:64px; object-fit:contain; display:grid; place-items:center; padding:4px; background:#f5f8fa; border:1px solid #e5ecf1; color:#426176; font-weight:800; font-size:18px; }
.make-card .make-logo { display:flex; align-items:center; justify-content:center; padding:4px; overflow:hidden; }
.make-card .make-logo img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; }
.make-card .make-logo .make-monogram { display:none; width:100%; height:100%; border:0; background:transparent; }
.make-card .make-logo.image-missing .make-monogram { display:grid; }
.make-card .make-wordmark { font-size:12px; text-align:center; line-height:1.15; overflow-wrap:anywhere; }
.make-card-copy { width:100%; min-width:0; display:flex; flex-direction:column; gap:6px; }
.make-card-copy b { font-size:14px; letter-spacing:0; }
.make-card-copy small { color:var(--muted); font-size:11.5px; line-height:1.3; }
.choice-grid { display:grid; gap:10px; max-width:1400px; }
.year-grid { grid-template-columns:repeat(auto-fill, minmax(116px,1fr)); }
.model-grid { grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); }
.section-grid { grid-template-columns:repeat(auto-fill, minmax(250px,1fr)); }
.category-grid { grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); }
.choice-card { min-height:75px; border:1px solid var(--line); border-radius:8px; padding:12px; background:#fff; color:var(--text); cursor:pointer; text-align:left; display:flex; flex-direction:column; justify-content:center; gap:6px; transition:border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.choice-card:hover { border-color:var(--accent); transform:translateY(-1px); box-shadow:var(--shadow); }
.choice-card b { font-size:14px; line-height:1.3; letter-spacing:0; }
.choice-card small { color:var(--muted); font-size:11.5px; }
.year-grid .choice-card { align-items:center; text-align:center; }
.year-grid .choice-card b { color:var(--accent); font-size:18px; }
.section-card { min-height:96px; border-left:4px solid #1b3e57; }
.section-card small { color:#49677c; }
.section-grid .section-card:nth-child(6n+1) { border-left-color:#0b7285; background:#f8fcfc; }
.section-grid .section-card:nth-child(6n+2) { border-left-color:#d85b32; background:#fffaf7; }
.section-grid .section-card:nth-child(6n+3) { border-left-color:#5d7a31; background:#fbfdf7; }
.section-grid .section-card:nth-child(6n+4) { border-left-color:#6b5c99; background:#fbfaff; }
.section-grid .section-card:nth-child(6n+5) { border-left-color:#b07918; background:#fffdf7; }
.section-grid .section-card:nth-child(6n) { border-left-color:#a13d53; background:#fff9fa; }
.category-card { min-height:90px; border-left:4px solid var(--accent); }
.catalog-results { padding:24px clamp(20px, 5vw, 78px) 40px; }
.catalog-results-head { margin-bottom:7px; font-size:16px; }
.catalog-category-summary { color:var(--muted); font-size:12.5px; margin-bottom:14px; }
.catalog-empty { padding:24px 0; color:var(--muted); }
.catalog-product-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:10px; }
.catalog-product { display:grid; grid-template-columns:104px minmax(0, 1fr); gap:13px; border:1px solid var(--line); border-radius:8px; padding:12px; background:#fff; min-height:142px; }
.catalog-product-image { width:104px; height:104px; display:grid; place-items:center; overflow:hidden; background:#f4f7f8; border:1px solid var(--line); color:var(--muted); font-size:11px; text-align:center; }
.catalog-product-image img { width:100%; height:100%; object-fit:contain; display:block; }
.catalog-product-image.empty-image { border-style:dashed; }
.catalog-product-body { min-width:0; display:flex; flex-direction:column; }
.catalog-product-category { color:var(--accent); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; }
.catalog-product h2 { margin:7px 0; font-size:14px; line-height:1.35; letter-spacing:0; }
.catalog-product-brand { color:var(--muted); font-size:12px; }
.catalog-product-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:10px; white-space:nowrap; }
.catalog-product-meta b { font-size:14px; }
@media (max-width:800px) { .catalog-home-head { grid-template-columns:1fr; align-items:stretch; gap:14px; } .catalog-home-brand { flex-direction:row; align-items:center; gap:16px; } .catalog-home-logo { width:220px; height:100px; } .catalog-home-copy h1 { font-size:24px; } .catalog-header-nav { justify-content:flex-end; } }
@media (max-width:560px) { .catalog-home { padding:18px; } .catalog-results { padding:18px; } .catalog-home-head { gap:10px; } .catalog-home-brand { gap:12px; } .catalog-home-logo { width:140px; height:66px; } .catalog-home-copy h1 { font-size:17px; } .catalog-eyebrow { display:none; } .catalog-inventory-snapshot { align-items:stretch; flex-wrap:wrap; } .catalog-inventory-snapshot span { flex:1 1 auto; padding:8px 10px; } .catalog-header-nav { justify-content:space-between; gap:10px; } .catalog-public-search { flex-direction:column; } .catalog-vehicle-trigger { width:100%; border-radius:6px 6px 0 0; } .catalog-public-search input { border-left:1px solid #a9c2c5; border-radius:0 0 6px 6px; } .catalog-autocomplete { left:0; width:100%; } .catalog-suggestion { grid-template-columns:54px 86px minmax(0, 1fr); gap:7px; padding:10px; } .catalog-vehicle-banner { height:160px; margin-bottom:18px; } .catalog-stage-title { display:block; } .catalog-stage-title small { display:block; text-align:left; margin-top:5px; } .make-grid { grid-template-columns:1fr; } .catalog-product-grid { grid-template-columns:1fr; } .catalog-product { grid-template-columns:82px minmax(0, 1fr); } .catalog-product-image { width:82px; height:82px; } }

/* Cards / KPIs */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }
.kpi .kpi-label { color: var(--muted); font-size: 12.5px; }
.kpi .kpi-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.kpi .kpi-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 6px 0 12px; }

/* Tables */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
.toolbar .grow { flex: 1; min-width: 220px; }
.count-badge { color: var(--muted); font-size: 12.5px; }
.pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:12px 0 4px; color:var(--muted); font-size:12.5px; }
.pagination-controls { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.pagination-controls label { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.pagination .pagination-size { width:72px; padding:5px 7px; }
.pagination .pagination-page { width:58px; padding:5px 7px; text-align:center; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: var(--panel); max-height: calc(100vh - 230px); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 11px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: #edf3f6; z-index: 1; font-size: 12px; color: #526b7d; text-transform: uppercase; letter-spacing: .4px; }
/* Bandas de lectura tipo Excel: aplican a inventario, buscadores y movimientos. */
.table-wrap tbody tr:nth-child(odd) { background: #ffffff; }
.table-wrap tbody tr:nth-child(even) { background: #edf4fb; }
.table-wrap tbody tr:hover { background: #dff1ef; }
tbody tr:hover { background: #f0f8f8; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.ok { background: rgba(53,208,165,.15); color: var(--ok); }
.pill.zero { background: rgba(255,93,108,.15); color: var(--danger); }
.pill.low { background: rgba(255,176,32,.16); color: var(--warn); }
.muted { color: var(--muted); }
.right { text-align: right; }

/* Buttons */
.btn { padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn.primary:hover { background: #075f70; border-color: #075f70; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 9px; font-size: 12px; }

/* Detail */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-title { font-size: 20px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 12px; }
.field { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.field .k { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.field .v { margin-top: 3px; font-weight: 600; word-break: break-word; white-space: normal; }
.back { color: var(--muted); cursor: pointer; margin-bottom: 10px; display: inline-block; }
.back:hover { color: var(--text); }
.compat-block { display: grid; gap: 12px; }
.compat-block b { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.code-list { display: flex; flex-wrap: wrap; gap: 6px; }
.code-token { display: inline-block; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 12px; text-decoration: none; }
.code-token.linked { border-color: rgba(11,114,133,.38); color: #0b6475; }
.code-token.linked:hover { background: #e8f5f5; color: #064b59; }

/* Forms */
.form-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin-bottom: 12px; }
label.lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
input.inp, select.inp, textarea.inp { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
textarea.inp { min-height: 62px; resize: vertical; }
.sale-totals { display: flex; justify-content: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); }
.sale-totals b { color: var(--text); }
.sale-totals .sale-grand { background: #e7f5f4; border: 1px solid #aadbd4; border-radius: 7px; color: var(--text); font-weight: 700; padding: 7px 10px; }
.sale-negative { color: var(--danger); font-weight: 700; }
.payment-help { color: var(--muted); font-size: 12px; margin-top: -3px; }
.sale-debt { color: var(--danger); font-weight: 700; white-space: nowrap; }
.sale-debt small { color: var(--muted); font-weight: 600; }

/* Empty / error */
.empty { text-align: center; color: var(--muted); padding: 40px; }
.error { color: var(--danger); padding: 16px; border: 1px solid var(--danger); border-radius: 10px; background: rgba(255,93,108,.08); }

/* Modal / picker */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 50; }
.modal { width: min(920px, 92vw); max-height: 86vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 12px; }

/* Invoice / printable document (light "paper" look, matches the Excel form) */
.invoice { background:#fff; color:#111; padding:22px 26px; border-radius:6px; font-family:"Segoe UI",Arial,sans-serif; }
.invoice .inv-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.invoice .inv-logo { height:96px; width:auto; }
.invoice .inv-contact { text-align:right; font-size:12.5px; line-height:1.4; font-weight:700; color:#1f3864; }
.invoice .inv-titlebar { display:flex; justify-content:space-between; align-items:flex-end; margin:6px 0 10px; }
.invoice h1.inv-title { font-size:30px; margin:0; color:#111; letter-spacing:1px; }
.invoice .inv-meta { text-align:right; font-size:13px; line-height:1.5; }
.invoice .inv-meta .nro { display:inline-block; border:1px solid #999; padding:1px 16px; font-size:20px; font-weight:800; margin-left:6px; }
.invoice .inv-cli { border:1px solid #cbd5e8; border-radius:4px; padding:8px 12px; margin:8px 0 12px; font-size:13px; display:grid; grid-template-columns:1fr 1fr; gap:2px 18px; }
.invoice .inv-cli .full { grid-column:1 / -1; }
.invoice .inv-cli b { color:#1f3864; }
.invoice .inv-sech { color:#1f3864; font-weight:800; font-size:12px; letter-spacing:.5px; margin-bottom:4px; }
.invoice table.inv { width:100%; border-collapse:collapse; font-size:12.5px; }
.invoice table.inv th { background:#1f3864; color:#fff; padding:6px 8px; border:1px solid #274a86; text-align:center; font-size:11.5px; }
.invoice table.inv td { padding:5px 8px; border:1px solid #cbd5e8; vertical-align:top; }
.invoice table.inv td.num, .invoice table.inv th.num { text-align:right; }
.invoice table.inv td.c, .invoice table.inv th.c { text-align:center; }
.invoice tr.inv-total td { background:#1f3864; color:#fff; font-weight:800; border-color:#274a86; }
.invoice tr.inv-sub td { font-weight:700; }
.invoice .inv-son { font-style:italic; font-weight:700; margin:10px 2px; }
.invoice .inv-note { margin-top:10px; font-size:12px; color:#222; }
.invoice .inv-note .nt { font-weight:800; color:#1f3864; }
.invoice .inv-foot { margin-top:8px; font-size:12px; }
.invoice .inv-foot .fname { font-weight:800; color:#1f3864; }
.invoice .inv-thanks { text-align:center; font-weight:800; margin-top:12px; color:#1f3864; }

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  #app { display: block; height: auto; }
  .view { padding: 0; overflow: visible; }
  body { background: #fff; color: #000; }
  .card, .field { box-shadow: none; }
  .invoice, .invoice * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .invoice { border: none; padding: 0; }
  /* Any printable doc (#doc) renders on white paper */
  #doc, #doc .card { background: #fff !important; color: #111 !important; box-shadow: none !important; }
  #doc .muted { color: #444 !important; }
  #doc table th { background: #1f3864 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #doc table td, #doc table th { border: 1px solid #999 !important; }
  #doc .field { background: #fff !important; border-color: #bbb !important; }
  #doc .pill { border: 1px solid #999; color: #111 !important; }
}
.doc-logo { height: 60px; width: auto; }

/* Panel de item seleccionado en Inventario (estilo Excel) */
.sel-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); min-height: 150px; }
.sp-empty { min-height: 120px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 0 24px; }
.sp-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sp-totals { min-height: 52px; }
.sp-grid { display: grid; grid-template-columns: 110px 1.5fr 1.1fr; gap: 16px; align-items: start; }
.sp-photo { height: 150px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; line-height: 1.4; }
.sp-main, .sp-side { font-size: 13px; }
.sp-main .sp-line { margin: 2px 0; white-space: normal; }
.sp-side > div { margin: 3px 0; white-space: normal; }
.sp-lbl { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.sp-cod { font-size: 18px; color: var(--accent); font-family: ui-monospace, Consolas, monospace; }
.sp-price { display: inline-flex; gap: 14px; align-items: center; background: #ffe24d; color: #14161f; padding: 6px 12px; border-radius: 8px; margin: 6px 0; font-size: 15px; }
.sp-price span { font-size: 12.5px; font-weight: 700; }
.sp-stock { margin: 3px 0; }
.sp-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
tr.selected { background: #e5f4f2 !important; box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 900px) { .sp-grid { grid-template-columns: 1fr; } }

/* Columna Marca (ancho lo controla el redimensionado) */
.marca-col { white-space: nowrap; }
/* Columnas redimensionables estilo Excel */
table.resizable { table-layout: fixed; }
table.resizable th, table.resizable td { overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #d9e2ea; }
table.resizable th { border-right-color: #cedce4; }
table.resizable th:last-child, table.resizable td:last-child { border-right: none; }
.col-resize { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; z-index: 3; }
.col-resize:hover { background: rgba(11,114,133,.28); }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* Galería de imágenes del catálogo (panel) + visor ampliado */
.sp-photo.has-img { border-style: solid; border-color: var(--line); padding: 0; overflow: hidden; position: relative; background: #0b0d17; }
.sp-photo .sp-img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; display: block; }
.sp-img-nav { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 8px; background: rgba(0,0,0,.6); font-size: 11px; color: #fff; }
.sp-img-nav button { background: none; border: none; color: #fff; cursor: pointer; font-size: 15px; line-height: 1; padding: 1px 6px; }
.sp-img-nav button:hover { color: var(--accent); }
.img-view-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.82); display: grid; place-items: center; }
.img-view { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.img-view img { max-width: 90vw; max-height: 80vh; object-fit: contain; background: #fff; border-radius: 6px; }
.img-view-nav { display: flex; gap: 12px; align-items: center; color: #fff; }
.img-view-nav button { background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.img-view-nav button:hover { border-color: var(--accent); }
/* Aplicaciones clickeable + ventana flotante (estilo RockAuto) */
.apps-cell { cursor: pointer; white-space: normal; max-width: 300px; }
.apps-cell:hover { color: var(--text); }
.apps-more { color: var(--accent); font-weight: 700; margin-left: 2px; }
.apps-pop-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.22); }
.apps-pop { position: fixed; width: 480px; max-width: 92vw; max-height: 72vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.apps-pop-head { cursor: move; user-select: none; padding: 10px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.apps-pop-x { cursor: pointer; color: var(--muted); font-weight: 700; }
.apps-pop-x:hover { color: var(--danger); }
.apps-pop-body { overflow: auto; }
.apps-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.apps-tbl th { position: sticky; top: 0; background: var(--panel2); color: var(--muted); text-align: left; padding: 7px 12px; font-size: 12px; }
.apps-tbl td { padding: 6px 12px; border-bottom: 1px solid var(--line); white-space: normal; vertical-align: top; }
.apps-tbl tbody tr:nth-child(odd) { background: #ffffff; }
.apps-tbl tbody tr:nth-child(even) { background: #edf4fb; }
.apps-tbl tr:hover { background: #dff1ef; }

/* --- usuarios y sesión (2026-10-11) --- */
.user-box { display:flex; align-items:center; gap:8px; margin-left:12px; white-space:nowrap; }
.user-box .user-name { font-weight:700; font-size:13px; }
.nav-item.admin-only { display:none; }
body.is-admin .nav-item.admin-only { display:flex; }

/* --- panel BI (2026-10-11) --- */
.bi-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.kpi.bi-accent { background:linear-gradient(135deg,#0b7285,#1a8ea3); color:#fff; border-color:transparent; } .kpi.bi-accent .kpi-label, .kpi.bi-accent .kpi-sub { color:rgba(255,255,255,.85); }
.kpi.bi-warn { border-color:#ffd8a8; background:#fff8ee; }
.bi-up { color:var(--ok); font-weight:700; } .bi-down { color:var(--danger); font-weight:700; }
.bi-grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:16px; margin-bottom:16px; }
.bi-grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; margin-bottom:16px; }
.bi-chart { width:100%; height:auto; display:block; }
.bi-legend { display:flex; gap:14px; margin-top:6px; font-size:12px; color:var(--muted); } .bi-legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px; }
.bi-hbars { display:flex; flex-direction:column; gap:9px; }
.bi-hbar[data-href] { cursor:pointer; } .bi-hbar[data-href]:hover .bi-hbar-label { color:var(--accent); }
.bi-hbar-top { display:flex; justify-content:space-between; gap:10px; font-size:13px; } .bi-hbar-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bi-hbar-track { height:8px; background:#edf3f6; border-radius:4px; overflow:hidden; margin-top:3px; } .bi-hbar-track i { display:block; height:100%; border-radius:4px; }
.bi-hbar small { font-size:11.5px; }
.card table { font-size:12.5px; } .card table th { position:static; }

/* --- ingreso (login) --- */
.login-wrap { min-height:calc(100vh - 120px); display:grid; place-items:center; padding:20px; background:radial-gradient(1200px 500px at 20% -10%, #d8ecef 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #fde7db 0%, transparent 55%); border-radius:14px; }
.login-card { width:min(520px,100%); background:#fff; border:1px solid var(--line); border-radius:16px; padding:26px 28px; box-shadow:0 18px 50px rgba(23,48,66,.12); }
.login-brand { display:flex; align-items:center; gap:14px; padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:16px; } .login-brand img { height:64px; width:auto; } .login-brand b { display:block; font-size:16px; color:#1b3e57; } .login-brand small { color:var(--muted); }
.login-title { font-weight:800; font-size:14px; margin-bottom:10px; color:#1b3e57; }
.login-users { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:8px; }
.login-user { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1.5px solid var(--line); border-radius:12px; background:#fafcfd; font:inherit; text-align:left; cursor:pointer; color:var(--text); }
.login-user.on { border-color:var(--accent); background:#e8f4f6; box-shadow:0 0 0 3px rgba(11,114,133,.12); } .login-user b { display:block; } .login-user small { color:var(--muted); }
.login-avatar { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:var(--accent); color:#fff; font-weight:800; font-size:17px; flex:0 0 auto; }
.login-pin { display:flex; gap:8px; } .login-pin input { font-size:18px; letter-spacing:4px; }
.login-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:16px; font-size:12.5px; flex-wrap:wrap; } .login-foot a { color:var(--accent); text-decoration:none; font-weight:700; }
.login-hint { margin-top:12px; padding:8px 12px; border-radius:10px; background:#fff4e5; border:1px solid #ffd8a8; color:#7a4b00; font-size:12.5px; }
.modal.picker { width:min(1040px,94vw); }

/* nota del buscador de Inventario (vehículo entendido, correcciones, respaldo) */
.inv-qnote { margin:-6px 0 10px; padding:7px 11px; border-radius:8px; background:#fff4e5; border:1px solid #ffd8a8; color:#7a4b00; font-size:12.5px; }
.inv-qnote b { color:#5c3a00; }
table mark { background:#fff1b8; color:inherit; padding:0 1px; border-radius:2px; font-weight:700; }

/* --- códigos y marca resaltados (2026-10-12) --- */
.code-badge { display:inline-block; font-weight:800; font-style:italic; color:#0f3d4c; background:#fff3c4; border:1px solid #f1d98a; border-radius:5px; padding:0 6px; letter-spacing:.2px; font-size:13px; }
.code-badge mark { background:#ffd166; }
.pc-brand { display:inline-block; font-weight:800; font-size:12px; color:#0f3d4c; background:#e3f1f4; border:1px solid #bcd9e0; border-radius:6px; padding:1px 7px; letter-spacing:.2px; } .pc-brand mark { background:#ffe58a; }
.sp-cod.code-badge { font-size:17px; padding:1px 8px; }

/* --- carrito de cotización --- */
.cart-box { margin-left:8px; }
.cart-btn { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; } .cart-btn.has { border-color:var(--accent); background:#e8f4f6; color:#075b6a; }
.cart-badge { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:#c8d3da; color:#173042; font-size:11.5px; font-weight:800; } .cart-btn.has .cart-badge { background:var(--accent-2); color:#fff; }
.cart-total { font-weight:700; font-size:12.5px; }
.cart-bg { position:fixed; inset:0; background:rgba(23,48,66,.35); z-index:58; opacity:0; pointer-events:none; transition:opacity .18s; } .cart-bg.open { opacity:1; pointer-events:auto; }
.cart-drawer { position:fixed; top:0; right:0; height:100vh; width:min(560px,96vw); background:#fff; box-shadow:-12px 0 40px rgba(23,48,66,.18); z-index:59; display:flex; flex-direction:column; transform:translateX(102%); transition:transform .2s ease; }
.cart-drawer.open { transform:none; }
.cart-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); } .cart-head b { font-size:16px; }
.cart-list { flex:1; overflow:auto; padding:10px 16px; display:flex; flex-direction:column; gap:8px; }
.cart-item { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fafcfd; }
.cart-item-main { display:flex; flex-wrap:wrap; align-items:center; gap:6px; } .cart-item-name { flex-basis:100%; font-weight:600; white-space:normal; }
.cart-item-ctl { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:8px; } .cart-item-ctl label { font-size:12px; color:var(--muted); display:flex; align-items:center; gap:5px; }
.cart-item-ctl input { width:86px; padding:5px 7px; border:1px solid var(--line); border-radius:7px; background:#fff; } .cart-item-total { margin-left:auto; }
.cart-foot { border-top:1px solid var(--line); padding:12px 16px; background:#fff; } .cart-sum { font-size:16px; margin-bottom:10px; } .cart-sum b { font-size:20px; }
.cart-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.cart-add { min-width:44px; font-weight:800; } .cart-add.in { background:#dff5ea; border-color:#16855b; color:#16855b; }

/* --- aviso flotante --- */
.toast { position:fixed; right:18px; bottom:18px; z-index:80; max-width:min(420px,90vw); padding:10px 14px; border-radius:10px; background:#173042; color:#fff; box-shadow:0 10px 30px rgba(0,0,0,.25); font-size:13.5px; opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .18s, transform .18s; }
.toast.show { opacity:1; transform:none; } .toast b { color:#ffd166; }

/* --- última columna separada de la barra de desplazamiento; cambios en cotizaciones --- */
.table-wrap th:last-child, .table-wrap td:last-child { padding-right:22px; }
.table-wrap { scrollbar-gutter:stable; }
tr.qt-changed td { background:#fff8d6 !important; box-shadow:inset 4px 0 0 #f0b429; }
.qt-now { white-space:normal; min-width:200px; font-size:12.5px; } .qt-up { color:#9a6700; font-weight:700; } .qt-down { color:#16855b; font-weight:700; }

/* --- panel de pieza seleccionada en Inventario (rediseño 2026-10-13) --- */
.sp2 { display:grid; grid-template-columns:150px minmax(0,1fr) 340px; grid-template-areas:"photo main side" "actions actions actions"; gap:12px 18px; align-items:start; }
.sp2-photo { grid-area:photo; width:150px; }
.sp2-main { grid-area:main; min-width:0; display:flex; flex-direction:column; gap:7px; font-size:13px; }
.sp2-side { grid-area:side; display:flex; flex-direction:column; gap:10px; }
.sp2-actions { grid-area:actions; display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-top:10px; border-top:1px solid var(--line); }
.sp2-hint { margin-left:auto; font-size:12px; }
.sp2-top { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.sp2-top .sp-cod { font-size:18px; padding:1px 9px; }
.sp2-meta { color:var(--muted); font-size:12px; } .sp2-meta i { color:var(--text); font-weight:700; }
.sp2-name { font-size:16px; font-weight:800; color:#1b3e57; line-height:1.3; white-space:normal; } .sp2-desc { font-weight:600; color:#456674; }
.sp2-row { display:grid; grid-template-columns:86px minmax(0,1fr) auto; gap:8px; align-items:start; white-space:normal; line-height:1.45; }
.sp2-row .sp-lbl { padding-top:2px; } .sp2-inter { font-family:ui-monospace, Consolas, monospace; font-size:12.5px; color:#31536b; word-break:break-word; }
.sp2-apps-text { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; color:#3e5566; }
.sp2-apps .btn { white-space:nowrap; }
.sp2-price { display:flex; flex-wrap:wrap; align-items:stretch; gap:0; background:#fff3c4; border:1px solid #f1d98a; border-radius:10px; overflow:hidden; }
.sp2-price > div { display:flex; flex-direction:column; gap:1px; padding:8px 12px; border-right:1px solid #f1d98a; min-width:72px; } .sp2-price > div:last-child { border-right:0; }
.sp2-price small { font-size:10.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:#7a5c00; } .sp2-price span { font-weight:700; font-size:14px; color:#14161f; }
.sp2-price-main b { font-size:22px; color:#14161f; line-height:1.1; }
.sp2-stock { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; }
.sp2-stock-pill { font-size:14px; padding:5px 12px; }
.sp2-alms { display:inline-flex; gap:6px; flex-wrap:wrap; }
.sp2-alm { display:inline-block; padding:3px 8px; border-radius:7px; border:1px solid var(--line); background:var(--panel2); font-size:12px; color:var(--muted); } .sp2-alm.has { border-color:#aadbd4; background:#e7f5f4; color:#075b6a; } .sp2-alm b { font-size:13px; }
.sp2-moves { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.sp2-move { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--panel2); font-size:12.5px; color:var(--text); }
.sp2-move b { font-size:15px; } .sp2-move small { color:var(--muted); font-size:11.5px; white-space:normal; }
@media (max-width:1100px) { .sp2 { grid-template-columns:120px minmax(0,1fr); grid-template-areas:"photo main" "side side" "actions actions"; } .sp2-photo { width:120px; } .sp-photo.sp2-photo { height:120px; } }

/* ---- Microcat (catálogo Ford en vivo): pantalla de tres paneles con desplazamiento independiente ---- */
body.mc-mode .view { overflow: hidden; padding: 10px 14px 12px; display: flex; flex-direction: column; }
.mc-app { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-top { padding: 8px 12px; flex: none; }
.mc-top-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-top-row .mc-title { white-space: nowrap; }
.mc-top-row input.inp { flex: 1; min-width: 240px; padding: 7px 10px; }
.mc-estado { font-size: 11.5px; white-space: nowrap; }
.mc-chk-top { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; white-space: nowrap; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); }
.mc-chk-top:has(input:checked) { background: #e3f6ea; border-color: #2e9e5b; color: #176a35; }
.mc-base-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #e3f6ea; color: #176a35; font-size: 10.5px; font-weight: 700; text-align: center; vertical-align: middle; }
.mc-hot.off { opacity: .2; }
.mc-ayuda { position: relative; }
.mc-ayuda summary { cursor: pointer; font-size: 12px; list-style: none; }
.mc-ayuda summary::-webkit-details-marker { display: none; }
.mc-ayuda-box { position: absolute; right: 0; top: 24px; z-index: 20; width: min(820px, 80vw); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: var(--shadow); font-size: 12.5px; }
.mc-res { position: relative; margin-top: 8px; padding: 8px 32px 8px 2px; border-top: 1px solid var(--line); max-height: 38vh; overflow: auto; font-size: 12.5px; }
.mc-res-close { position: absolute; right: 4px; top: 6px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 14px; }
.mc-vin-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mc-vin-body { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; margin-top: 6px; }
.mc-vin-tab { width: auto; font-size: 12.5px; }
.mc-vin-tab th { text-align: left; white-space: nowrap; padding: 2px 10px 2px 0; font-weight: 600; color: var(--muted); }
.mc-vin-tab td { padding: 2px 0; }
.mc-vin-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.mc-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px 330px minmax(0, 1fr); gap: 10px; }
.mc-col { min-height: 0; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: var(--shadow); }
.mc-col-head { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); flex: none; }
.mc-col-head span { text-transform: none; letter-spacing: 0; }
.mc-col input.inp { padding: 6px 9px; font-size: 12.5px; flex: none; }
.mc-select { flex: 1; min-height: 120px; padding: 4px; font-size: 12.5px; overflow: auto; }
.mc-select option { padding: 3px 6px; }
.mc-vehiculo { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; text-align: center; }
.mc-vehiculo img { max-width: 100%; height: auto; }
.mc-filters { display: flex; gap: 6px; flex: none; }
.mc-filters #mc-anio { width: 74px; flex: none; }
.mc-groups { flex: 1; min-height: 0; overflow: auto; font-size: 12.5px; }
.mc-group { border-top: 1px solid var(--line); padding: 4px 0; }
.mc-group summary { cursor: pointer; padding: 5px 2px; list-style: none; display: flex; gap: 6px; align-items: baseline; }
.mc-group summary::-webkit-details-marker { display: none; }
.mc-group summary::before { content: '▸'; color: var(--muted); font-size: 11px; }
.mc-group[open] > summary::before { content: '▾'; }
.mc-sec { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 5px 6px 5px 14px; border-radius: 6px; cursor: pointer; color: var(--text); text-decoration: none; }
.mc-sec:hover { background: var(--panel2); }
.mc-sec.active { background: #e2f2f1; box-shadow: inset 3px 0 0 var(--accent); }
.mc-sec.nolink { opacity: .55; cursor: default; }
.mc-sec-code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--accent); padding-top: 2px; }
.mc-sec-title { font-weight: 600; line-height: 1.3; }
.mc-sec small { grid-column: 2; font-size: 11px; }
.mc-main { gap: 0; }
.mc-vacio { padding: 24px; text-align: center; }
.mc-sec-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; flex: none; padding-bottom: 6px; font-size: 13px; }
.mc-sec-head-txt .muted { font-size: 11.5px; }
.mc-zoom { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-img-pane { flex: 0 0 52%; min-height: 90px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: center; position: relative; }
.mc-img-box { position: relative; display: inline-block; line-height: 0; }
.mc-img-box img { display: block; cursor: zoom-in; }
.mc-img-box.fit { max-width: 100%; }
.mc-img-box.fit img { max-width: 100%; height: auto; }
.mc-img-box:not(.fit) img { width: 100%; height: auto; cursor: zoom-out; }
.mc-hot { position: absolute; border: 1.5px solid transparent; border-radius: 3px; cursor: pointer; box-sizing: border-box; }
.mc-hot:hover { border-color: rgba(11,114,133,.9); background: rgba(11,114,133,.12); }
.mc-hot.on { border-color: #e97845; background: rgba(233,120,69,.22); box-shadow: 0 0 0 3px rgba(233,120,69,.35); }
.mc-hot-ref { cursor: default; }
.mc-splitter { flex: none; height: 9px; cursor: row-resize; position: relative; }
.mc-splitter::after { content: ''; position: absolute; left: 50%; top: 3px; width: 46px; height: 3px; margin-left: -23px; border-radius: 2px; background: var(--line); }
.mc-splitter:hover::after { background: var(--accent); }
.mc-parts-pane { flex: 1; min-height: 80px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.mc-parts-head { position: sticky; top: 0; z-index: 2; background: var(--panel2); padding: 6px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.mc-parts-head span { text-transform: none; letter-spacing: 0; }
.mc-chk { text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer; margin-left: auto; }
.mc-inv-cnt { color: #1b7f3b; font-weight: 700; }
table.mc-parts { font-size: 12.5px; }
table.mc-parts th { position: sticky; top: 31px; z-index: 1; }
table.mc-parts td { vertical-align: top; white-space: normal; }
table.mc-parts .mc-globo { font-weight: 700; color: var(--accent); white-space: nowrap; }
table.mc-parts .mc-num { white-space: nowrap; }
table.mc-parts .mc-desc { min-width: 150px; width: 36%; }
table.mc-parts .mc-notas { min-width: 150px; width: 40%; font-size: 12px; }
table.mc-parts tr.mc-hl td { background: #fff7d6; }
table.mc-parts tr.mc-inv td:first-child { box-shadow: inset 4px 0 0 #2e9e5b; }
table.mc-parts tr.mc-row-sel td { background: #fde8dc; }
table.mc-parts tbody tr { cursor: pointer; }
.mc-badge-inv { background: #e3f6ea; border-color: #2e9e5b; color: #176a35; }
.mc-inv-info { font-size: 11.5px; margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mc-ver { border: 0; background: transparent; cursor: pointer; font-size: 12px; margin-left: 4px; padding: 0; }
.mc-acts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 11.5px; max-width: 170px; }
.mc-acts a { color: var(--accent); cursor: pointer; text-decoration: none; }
.mc-acts a:hover { text-decoration: underline; }
.mc-results { margin-top: 8px; font-size: 12.5px; }
.mc-results .mc-sec { padding-left: 10px; }
@media (max-width: 1150px) { .mc-cols { grid-template-columns: 200px 280px minmax(0, 1fr); } }
@media (max-width: 900px) { body.mc-mode .view { overflow: auto; } .mc-cols { grid-template-columns: 1fr; } .mc-col { max-height: 60vh; } }

/* ---- Pedidos web: chip de estado (cliente y vendedores) y sección de vendedores ---- */
.pw-chip { display:inline-flex; align-items:center; gap:5px; padding:2px 10px; border-radius:999px; background:var(--pwb); color:var(--pw); border:1px solid var(--pw); font-size:11.5px; font-weight:800; white-space:nowrap; }
.pw-chip::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--pw); }
.nav-badge { margin-left:auto; display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:#e8a400; color:#fff; font-size:11px; font-weight:800; }
.nav-badge.pulse { animation:pwpulse 1.4s ease-in-out infinite; }
@keyframes pwpulse { 50% { box-shadow:0 0 0 5px rgba(232,164,0,.25); } }
.pw-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr); gap:14px; align-items:start; }
.pw-filtros { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:10px; }
.pw-filtro { border:1px solid var(--line); background:var(--panel); border-radius:999px; padding:5px 12px; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; color:var(--text); display:inline-flex; gap:6px; align-items:center; }
.pw-filtro.on { border-color:var(--pw, var(--accent)); background:var(--pwb, #e2f2f1); color:var(--pw, #075b6a); }
.pw-filtro b { font-size:11px; background:rgba(0,0,0,.07); border-radius:999px; padding:0 6px; }
.pw-lista { display:flex; flex-direction:column; gap:8px; }
.pw-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:10px 12px; border:1px solid var(--line); border-left:6px solid var(--pw); border-radius:10px; background:var(--panel); cursor:pointer; box-shadow:var(--shadow); }
.pw-row:hover { border-color:var(--pw); } .pw-row.sel { outline:2px solid var(--pw); }
.pw-row .pw-cli { font-weight:700; } .pw-row .muted { font-size:12px; }
.pw-row .pw-der { text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:4px; font-size:12px; }
.pw-tipo { display:inline-block; padding:0 7px; border-radius:6px; background:#eef2f5; font-size:11px; font-weight:700; color:#4a6070; margin-left:6px; } .pw-tipo.taller { background:#fff0e6; color:#b8541b; }
.pw-det { position:sticky; top:12px; max-height:calc(100vh - 110px); overflow:auto; }
.pw-det-head { border-left:6px solid var(--pw); background:var(--pwb); border-radius:10px; padding:10px 12px; margin-bottom:10px; }
.pw-det-head .pw-num { font-size:18px; font-weight:800; }
.pw-kv { display:grid; grid-template-columns:110px 1fr; gap:4px 10px; font-size:13px; margin:8px 0; } .pw-kv b { color:var(--muted); font-weight:600; }
.pw-items td { vertical-align:top; } .pw-items .ok { color:#2f9e44; font-weight:700; } .pw-items .no { color:#c92a2a; font-weight:700; }
.pw-acts { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.pw-hist { border-left:2px solid var(--line); padding-left:12px; display:flex; flex-direction:column; gap:4px; font-size:12.5px; } .pw-hist span { color:var(--muted); margin-right:8px; font-size:11.5px; }
.pw-aviso { padding:10px 12px; border-radius:10px; background:#fff4d6; font-size:13px; margin:8px 0; }
.pw-banner { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:9px 12px; margin-bottom:12px; border-radius:10px; border-left:6px solid var(--pw); background:var(--pwb); font-size:13px; }
@media (max-width:1100px) { .pw-layout { grid-template-columns:1fr; } .pw-det { position:static; max-height:none; } }

.pw-tipo.wa { background:#e6f7ec; color:#178a35; }
