:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e6e9f0;
  /* Colores de la marca DantexCorp (tomados del logo): azul petróleo, verde y gris plata */
  --side: #0e1218;
  --side-2: #1a212b;
  --side-text: #a9b4c0;
  --brand: #1d6a80;
  --brand-2: #2a8a6c;
  --brand-rgb: 29, 106, 128;
  --brand-soft: #e2f0f2;
  --plata: #cccecd;
  --ok: #12a150;
  --ok-soft: #e3f6eb;
  --info: #2a7de1;
  --info-soft: #e3effc;
  --warn: #b7791f;
  --warn-soft: #fff4dc;
  --bad: #d64545;
  --bad-soft: #fde8e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.icon { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------ layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 40; transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; color: #fff; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(204, 206, 205, .18), 0 6px 18px rgba(var(--brand-rgb), .45);
}
.brand b { display: block; font-size: 15px; letter-spacing: .12em; }
.brand small { color: var(--side-text); font-size: 12px; }
.nav { padding: 8px 12px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #66728c; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text);
  font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(var(--brand-rgb), .45), rgba(42, 138, 108, .18)); color: #fff; }
.nav a.active .icon { color: #7fd1c0; }
.nav a .count { margin-left: auto; font-size: 11px; background: var(--side-2); padding: 1px 8px; border-radius: 99px; }
.nav a.sub { padding: 7px 12px 7px 42px; font-size: 13px; font-weight: 400; }
.side-foot { margin-top: auto; padding: 16px 22px; font-size: 12px; border-top: 1px solid var(--side-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(244,246,251,.85);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
}
.topbar form { flex: 1; max-width: 460px; position: relative; }
.topbar input {
  width: 100%; padding: 10px 14px 10px 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font: inherit;
}
.topbar form .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.content { padding: 28px; max-width: 1440px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumbs a:hover { color: var(--brand); }

/* ------------------------------------------------ componentes */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #cfd5e1; box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(var(--brand-rgb),.35); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad-soft); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-ghost { border-color: transparent; background: transparent; }

.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head a { color: var(--brand); font-size: 13px; font-weight: 600; }

.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.kpi { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -.3px; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.t-brand { background: var(--brand-soft); color: var(--brand); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-info { background: var(--info-soft); color: var(--info); }
.t-bad { background: var(--bad-soft); color: var(--bad); }

.two { grid-template-columns: 2fr 1fr; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-VENDER, .b-disponible { background: var(--ok-soft); color: var(--ok); }
.b-MEJORAR, .b-reservado { background: var(--info-soft); color: var(--info); }
.b-VERIFICAR { background: var(--warn-soft); color: var(--warn); }
.b-OBSOLETO, .b-vendido { background: var(--bad-soft); color: var(--bad); }
.b-vendido { background: #eef0f4; color: #4b5565; }

/* barras por categoría */
.bars { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 140px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row:hover .name { color: var(--brand); }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .name small { color: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: #eef1f6; overflow: hidden; position: relative; }
.bar span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar span.min { background: rgba(var(--brand-rgb),.35); }
.bar-row .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* dona de estados */
.donut-wrap { display: flex; gap: 22px; align-items: center; padding: 18px 20px 22px; flex-wrap: wrap; }
.donut { width: 140px; height: 140px; border-radius: 50%; position: relative; flex: none; }
.donut::after { content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%; }
.donut b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-size: 22px; }
.donut b small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; text-align: center; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; flex: 1; min-width: 150px; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; }
.legend a:hover { background: #f6f8fc; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend span { margin-left: auto; font-weight: 600; }

/* lista compacta */
.list { padding: 8px 8px 12px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.list-item:hover { background: #f6f8fc; }
.list-item .thumb { width: 46px; height: 46px; border-radius: 10px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow small { color: var(--muted); }
.list-item .price { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; }

/* ------------------------------------------------ inventario */
.filters { padding: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters input, .filters select, .form input, .form select, .form textarea {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--text);
}
.filters input[type=search] { flex: 1; min-width: 200px; }
.filters select { min-width: 150px; max-width: 100%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-toggle button { border: 0; background: #fff; padding: 8px 10px; cursor: pointer; color: var(--muted); }
.view-toggle button.on { background: var(--brand-soft); color: var(--brand); }
.summary-line { color: var(--muted); margin: -6px 0 14px; font-size: 13px; }
.summary-line b { color: var(--text); }

.cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.item { overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.item .media { aspect-ratio: 4 / 3; position: relative; background: #f1f4f9; }
.item .media img { width: 100%; height: 100%; object-fit: cover; }
.item .media .badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.item .media .code { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 600; background: rgba(15,23,41,.7); color: #fff; padding: 2px 8px; border-radius: 6px; }
.item .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item .brand-tag { font-size: 11.5px; color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.item h3 { font-size: 15px; font-weight: 650; }
.item .specs { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.item .specs span { display: inline-flex; align-items: center; gap: 4px; }
.item .specs .icon { width: 13px; height: 13px; }
.item .foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.item .price { font-size: 17px; font-weight: 750; letter-spacing: -.2px; }
.item .price small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

.placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: #9aa6bd;
  background: linear-gradient(135deg, #eef2f9, #e4e9f3);
}
.placeholder .icon { width: 42%; height: 42%; stroke-width: 1.1; }
.thumb .placeholder .icon { width: 60%; height: 60%; }
.thumb { overflow: hidden; background: #eef2f9; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* tabla */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #f7f9fd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cell-model { display: flex; align-items: center; gap: 12px; }
.table .cell-model .thumb { width: 42px; height: 42px; border-radius: 9px; }
.table .cell-model small { display: block; color: var(--muted); }
.table tfoot td { font-weight: 700; background: #fafbfd; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

/* ------------------------------------------------ detalle */
.detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.gallery .main-photo { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #f1f4f9; position: relative; cursor: zoom-in; }
.gallery .main-photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs .t { width: 78px; height: 62px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; position: relative; background: #eef2f9; }
.thumbs .t.on { border-color: var(--brand); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t .star { position: absolute; top: 3px; left: 3px; background: rgba(0,0,0,.55); color: #ffd25e; border-radius: 6px; padding: 0 4px; font-size: 10px; }
.photo-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.upload {
  display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px dashed #cdd5e3; border-radius: 12px;
  padding: 16px; color: var(--muted); cursor: pointer; transition: all .15s; text-align: center; margin-top: 12px;
}
.upload:hover, .upload.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.upload input { display: none; }
.preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview img { width: 70px; height: 56px; object-fit: cover; border-radius: 8px; }

.info h1 { font-size: 26px; font-weight: 750; letter-spacing: -.4px; }
.info .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 16px; }
.info .meta .code { color: var(--muted); font-size: 13px; }
.price-box { padding: 18px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.price-box div small { display: block; color: var(--muted); font-size: 12px; }
.price-box div b { font-size: 20px; letter-spacing: -.3px; }
.price-box .full { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.spec { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.spec:nth-child(odd) { border-right: 1px solid var(--line); }
.spec .icon { color: var(--brand); margin-top: 2px; }
.spec small { display: block; color: var(--muted); font-size: 12px; }
.spec b { font-weight: 600; }
.note { padding: 14px 18px; background: var(--warn-soft); color: #7a5413; border-radius: 12px; display: flex; gap: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sold-box { padding: 16px 20px; background: #f6f7fa; border-radius: 12px; }

/* ------------------------------------------------ formularios */
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; padding: 22px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.form label span.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.form input, .form select, .form textarea { width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus, .filters select:focus, .topbar input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.18);
}
.form-section { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 16px; }
.form-section:first-child { border: 0; margin: 0; padding: 0; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }

/* modal */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 41, .45); backdrop-filter: blur(2px); }
dialog .dlg-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
dialog .dlg-head h2 { font-size: 17px; }
dialog .form { grid-template-columns: 1fr 1fr; }

.lightbox { position: fixed; inset: 0; background: rgba(8, 12, 22, .9); display: none; place-items: center; z-index: 100; cursor: zoom-out; padding: 24px; }
.lightbox.on { display: grid; }
.lightbox img { max-height: 92vh; max-width: 92vw; border-radius: 10px; }

/* lotes */
.lot { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.lot h3 { font-size: 17px; }
.lot .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lot .stats div { background: #f7f9fc; border-radius: 10px; padding: 10px 12px; }
.lot .stats small { display: block; color: var(--muted); font-size: 11.5px; }
.lot .stats b { font-size: 15px; }
.progress { height: 8px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #3cc97a); border-radius: 99px; }
.explain { padding: 16px 20px; background: var(--brand-soft); border-radius: 12px; color: #14485a; font-size: 13.5px; }

/* barra de compra en ofertas */
.buybar {
  position: sticky; bottom: 16px; margin-top: 16px; padding: 14px 18px; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; box-shadow: var(--shadow-lg); border-color: #b9dbe0;
}
.buybar > div { flex: 1; min-width: 200px; }
.buybar select, .buybar input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }
.buybar[hidden] { display: none; }

/* usuario en la barra lateral */
.side-foot { display: flex; align-items: center; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: #fff; }
.side-user small { display: block; color: var(--side-text); font-size: 11.5px; }
.side-user b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 13px; }
.avatar-lg { width: 38px; height: 38px; }
.btn-side { background: var(--side-2); border-color: var(--side-2); color: var(--side-text); }
.btn-side:hover { color: #fff; }

/* login */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #d6ecef, transparent), radial-gradient(900px 500px at 110% 110%, #dcefe7, transparent), var(--bg); }
.auth-card { width: min(420px, 100%); padding: 30px 28px; }
.auth-card { overflow: hidden; }
.auth-card h1 { font-size: 22px; margin: 18px 0 4px; }
.auth-logo { width: calc(100% + 56px); max-width: none; margin: -30px -28px 0; aspect-ratio: 779 / 380; object-fit: cover; }
.auth-brand-text { margin-top: 16px; }
.auth-brand-text b { display: block; letter-spacing: .14em; font-size: 15px; }
.auth-brand-text small { color: var(--muted); }
.auth-msg { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 13.5px; }
.auth-msg.error { background: var(--bad-soft); color: var(--bad); }
.form-1 { grid-template-columns: 1fr; padding: 18px 0 0; }
.card > .form-1 { padding: 20px 22px; }
.auth-card > .form-1 { padding: 18px 0 0; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }
.muted { color: var(--muted); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }

/* tablas sin clic de fila y formularios en línea */
.table-static tbody tr { cursor: default; }
.inline-form { display: inline; }
.inline-form select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
.inline-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.two-eq { grid-template-columns: 1fr 1fr; }
.pasos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: #33415c; }
code { background: #eef1f6; padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.link-fuente { color: var(--brand); font-size: 12px; }
.link-fuente:hover { text-decoration: underline; }

/* revisión de importación */
.rev td { vertical-align: top; padding: 8px 10px; }
.rev small { display: block; font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.rev input, .rev select { font: inherit; font-size: 13px; border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; background: transparent; }
.rev input:hover, .rev select:hover, .rev input:focus, .rev select:focus { border-color: var(--line); background: #fff; outline: none; }
.in-model { width: 100%; font-weight: 600; }
.in-num { width: 78px; text-align: right; }
.in-cant { width: 56px; }
.in-sel { max-width: 190px; }
.est { font-weight: 600; }
.est-VENDER { background: var(--ok-soft) !important; color: var(--ok); }
.est-MEJORAR { background: var(--info-soft) !important; color: var(--info); }
.est-VERIFICAR { background: var(--warn-soft) !important; color: var(--warn); }
.est-OBSOLETO { background: var(--bad-soft) !important; color: var(--bad); }
.nota-cell { font-size: 12px; color: #4b5565; max-width: 320px; }
tr.excluido td { opacity: .45; }
tr.excluido td:first-child { opacity: 1; }
.progreso-box { margin-bottom: 16px; border-color: #b9dbe0; }

/* selector de idioma */
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; flex: none; }
.lang a { padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lang a.on { background: var(--brand); color: #fff; }
.lang-lg a { padding: 8px 16px; font-size: 13.5px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* seguridad */
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: inline-block; }
.qr svg { display: block; width: 260px; height: 260px; max-width: 100%; }
.clave-totp { display: block; margin-top: 8px; font-size: 14px; letter-spacing: .08em; word-break: break-all; }
.input-codigo { font-size: 22px !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.codigos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.codigos code { font-size: 15px; padding: 8px 10px; text-align: center; letter-spacing: .06em; }
.respaldo { margin-top: 14px; font-size: 13px; color: var(--muted); }
.respaldo summary { cursor: pointer; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; }
label.check input { width: auto; }

/* publicado en la web */
.item .media .web-tag { position: absolute; bottom: 10px; right: 10px; background: var(--brand); color: #fff; border-radius: 8px; padding: 4px; display: grid; }
.item .media .web-tag .icon { width: 15px; height: 15px; }

/* catálogo público */
.pub { background: var(--bg); }
.pub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 28px; background: var(--side); position: sticky; top: 0; z-index: 30; }
.pub-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.pub-brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.pub-brand b { display: block; letter-spacing: .14em; font-size: 15px; }
.pub-brand small { color: var(--side-text); font-size: 12px; }
.pub-head nav { display: flex; align-items: center; gap: 16px; }
.pub-head nav > a { color: var(--side-text); font-weight: 500; }
.pub-head nav > a:hover { color: #fff; }
.pub-main { max-width: 1240px; margin: 0 auto; padding: 28px; }
.pub-hero { padding: 28px; border-radius: var(--radius); margin-bottom: 20px; color: #fff;
  background: linear-gradient(120deg, rgba(14,18,24,.92), rgba(20,72,90,.85)), url("../img/logo-ancho.jpg") center/cover; }
.pub-hero h1 { font-size: 28px; margin-bottom: 6px; }
.pub-hero p { margin: 0; color: #cfe3e6; max-width: 640px; }
.pub-chips { margin-bottom: 18px; }
.pub-precio { font-size: 30px; font-weight: 800; color: var(--ok); margin: 10px 0 6px; }
.pub-precio small { font-size: 14px; color: var(--muted); font-weight: 600; }
.pub-desc { color: #33415c; font-size: 15px; }
.pub-foot { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding: 24px; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .pub-head, .pub-main { padding: 14px 16px; } .pub-hero h1 { font-size: 22px; } }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: in .25s ease; }
.toast.error { background: var(--bad); }
@keyframes in { from { transform: translateY(10px); opacity: 0; } }

.overlay { display: none; }

/* ------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .two, .detail, .two-eq { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .overlay.on { display: block; position: fixed; inset: 0; background: rgba(15,23,41,.4); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
  .bar-row { grid-template-columns: 1fr 90px; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .form, dialog .form { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr; }
  .spec:nth-child(odd) { border-right: 0; }
  .price-box { grid-template-columns: 1fr 1fr; }
  .lot .stats { grid-template-columns: 1fr 1fr; }
  .topbar .btn-label { display: none; }
  .topbar form { min-width: 0; }
  .topbar input { min-width: 0; }
  .filters input[type=search], .filters select { flex: 1 1 100%; min-width: 0; width: 100%; }
  .filters select { flex-basis: calc(50% - 5px); }
  .page-head .btn { width: 100%; justify-content: center; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; width: auto; }
}
