/* =====================================================================
   VIZAM · Panel de gestión — identidad "taller premium"
   Concreto cálido, carbón, azul VIZAM y acentos ámbar finos.
   ===================================================================== */
:root {
  --ink: #0c1724;
  --ink-2: #13233a;
  --navy: #10345a;
  --navy-700: #1d4b78;
  --amber: #e09e00;
  --amber-600: #c48a00;
  --amber-ink: #8a5f00;
  --bg: #f1f0ec;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --line: #e4e1d9;
  --line-strong: #cfcabd;
  --text: #17202b;
  --muted: #6e737b;
  --ok: #2f7d5b;  --ok-bg: #e7f1ec;
  --warn: #a8701a; --warn-bg: #f8efdf;
  --bad: #b4432f; --bad-bg: #f7e6e2;
  --info: #2d6a9f; --info-bg: #e5eef6;
  --neutral: #5f6672; --neutral-bg: #eceae4;
  --display: 'Barlow Condensed', 'Montserrat', sans-serif;
  --sidebar-w: 248px;
  --bs-primary: #10345a;
  --bs-primary-rgb: 16, 52, 90;
  --bs-link-color: #1d4b78;
  --bs-link-color-rgb: 29, 75, 120;
  --bs-body-font-family: 'Montserrat', system-ui, sans-serif;
  --bs-body-color: #17202b;
  --bs-border-color: #e4e1d9;
  --bs-border-radius: .5rem;
}

/* Tipografía 10% más pequeña en todo el panel */
html { font-size: 90%; }
body { background: var(--bg); font-size: .9rem; color: var(--text); -webkit-font-smoothing: antialiased; }
.app { display: flex; min-height: 100vh; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.text-accent { color: var(--amber-ink) !important; }
.text-muted { color: var(--muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.eyebrow { font-family: var(--display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Íconos Phosphor */
i[class^="ph"], i[class*=" ph-"] { line-height: 1; vertical-align: -0.14em; }
.ph-duotone { font-size: 1.15em; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: fixed; inset: 0 auto 0 0; z-index: 1040;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #b9c4d2; display: flex; flex-direction: column; transition: transform .25s ease;
  border-right: 1px solid #000;
}
.sidebar-brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px; }
.sidebar-brand img { max-height: 34px; max-width: 150px; }
.sidebar-brand .brand-ico { display: none; width: 34px; height: 34px; border-radius: 8px; }
.btn-menu { display: none !important; }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.7rem; color: #fff; letter-spacing: .12em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px 20px; counter-reset: sec; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.nav-section {
  font-family: var(--display); font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: #6f8098;
  margin: 18px 10px 6px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.nav-section::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); color: var(--amber); font-weight: 700; }
.nav-section::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.07); }
.nav-link-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 6px;
  color: #b9c4d2; text-decoration: none; font-weight: 500; font-size: .88rem; margin-bottom: 1px; transition: background .15s, color .15s;
}
.nav-link-item i { font-size: 1.25rem; width: 22px; text-align: center; color: #8597ad; transition: color .15s; }
.nav-link-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link-item:hover i { color: #fff; }
.nav-link-item.active { background: linear-gradient(90deg, rgba(224,158,0,.16), rgba(224,158,0,0) 85%); color: #fff; font-weight: 600; }
.nav-link-item.active::before { content: ''; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--amber); }
.nav-link-item.active i { color: var(--amber); }
.nav-link-item .badge { font-family: var(--display); font-size: .78rem; padding: .2em .55em; }
.sidebar-footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.06); font-size: .78rem; display: flex; justify-content: space-between; align-items: center; }
.sidebar-footer a { color: #8597ad; text-decoration: none; white-space: nowrap; }
.sidebar-footer a:hover { color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1030; height: 60px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 26px;
}
.topbar-search { position: relative; flex: 1; max-width: 440px; min-width: 0; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.topbar-search input {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px;
  padding: 8px 40px 8px 38px; font-size: .86rem; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.topbar-search input:focus { background: #fff; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,158,0,.15); }
.topbar-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #fff; color: var(--muted); border: 1px solid var(--line-strong); font-size: .7rem; padding: 1px 6px; border-radius: 4px; box-shadow: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.btn-icon { border: 0; background: transparent; width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 1.3rem; }
.btn-icon:hover { background: var(--surface-2); }
.dot-badge { position: absolute; top: 4px; right: 3px; background: var(--bad); color: #fff; font-size: .62rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 0; padding: 4px 8px; border-radius: 8px; }
.user-chip:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 8px; background: var(--navy); color: #fff; font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .04em;
  display: inline-flex; align-items: center; justify-content: center; object-fit: cover; flex-shrink: 0;
}
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; border-radius: 12px; }

.content { padding: 26px 28px 40px; flex: 1; }

/* ---------- Encabezado de página ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.page-header h1 { font-family: var(--display); font-size: 2.05rem; font-weight: 600; margin: 0; letter-spacing: .01em; line-height: 1.05; text-transform: uppercase; }
.page-header h1 .badge { font-family: 'Montserrat', sans-serif; text-transform: none; vertical-align: middle; font-size: .78rem; }
.page-header .sub { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.page-header .sub::before { content: ''; display: inline-block; width: 18px; height: 2px; background: var(--amber); vertical-align: middle; margin-right: 8px; }
.page-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-header > .btn-light:first-child { align-self: center; }

/* ---------- Tarjetas ---------- */
.card { border: 1px solid var(--line); border-radius: 10px; box-shadow: none; background: var(--surface); }
.card-header {
  background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 11px 16px; border-radius: 10px 10px 0 0 !important;
  font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: #2a3340;
}
.card-header a, .card-header .btn, .card-header .nav-link { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.card-header .nav-link { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; }
.card-body { padding: 16px; }
.card-footer { border-top: 1px solid var(--line); }

/* KPIs */
.kpi { position: relative; overflow: hidden; }
.kpi .card-body { gap: 14px !important; }
.kpi .kpi-ico { order: 2; margin-left: auto; align-self: flex-start; width: auto; height: auto; border: 0; box-shadow: none; border-radius: 0; background: none !important; font-size: 1.9rem; color: var(--line-strong) !important; }
.kpi .kpi-label { color: var(--muted); font-family: var(--display); font-size: .86rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.kpi .kpi-value { font-family: var(--display); font-size: 2.15rem; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.kpi .kpi-foot { font-size: .76rem; color: var(--muted); margin-top: 2px; }
a:hover .kpi { border-color: var(--line-strong); }
/* Ícono en placa: cuadro fijo con el ícono centrado (perfiles, configuración SRI, avisos) */
.kpi-ico {
  flex: 0 0 auto; align-self: flex-start; width: 46px; height: 46px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.55rem;
  border: 1px solid var(--line); box-shadow: inset 0 -2px 0 rgba(12,23,36,.05);
}
.kpi-ico i { font-size: inherit; vertical-align: 0; }
.ico-navy  { background: #e8edf3; color: var(--navy); }
.ico-amber { background: #f8efdc; color: var(--amber-ink); }
.ico-green { background: var(--ok-bg); color: var(--ok); }
.ico-red   { background: var(--bad-bg); color: var(--bad); }
.ico-cyan  { background: var(--info-bg); color: var(--info); }

/* Botones */
.btn { font-weight: 600; border-radius: 8px; font-size: .85rem; padding: .45rem .9rem; letter-spacing: .01em; }
.btn-sm { font-size: .78rem; padding: .3rem .6rem; border-radius: 6px; }
.btn i { font-size: 1.1em; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--ink-2); --bs-btn-hover-border-color: var(--ink-2); --bs-btn-active-bg: var(--ink); --bs-btn-disabled-bg: var(--navy); --bs-btn-disabled-border-color: var(--navy); }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--ink); background: #fff; }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--line-strong); --bs-btn-color: var(--text); }
.btn-accent { background: var(--amber); border: 1px solid var(--amber-600); color: #1b1300; display: inline-flex; align-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.btn-accent:hover, .btn-accent:focus { background: #eaa900; border-color: var(--amber-600); color: #000; }
.btn-link { text-decoration: none; font-weight: 600; }
.bg-navy { background: var(--navy) !important; color: #fff; }

/* Formularios */
.form-control, .form-select { border-radius: 8px; border-color: var(--line-strong); background-color: #fdfdfb; font-size: .88rem; padding: .48rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,158,0,.15); background-color: #fff; }
.form-control:disabled, .form-select:disabled { background-color: var(--surface-2); }
.form-label { font-family: var(--display); font-weight: 600; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; color: #46505e; margin-bottom: 4px; }
.form-text { font-size: .76rem; }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-switch .form-check-input:checked { background-color: var(--amber); border-color: var(--amber-600); }
.input-group-text { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.btn-check:checked + .btn-outline-secondary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-outline-secondary { --bs-btn-color: #46505e; --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--line-strong); background: #fff; }
.ts-wrapper .ts-control { border-radius: 8px; border-color: var(--line-strong); min-height: 36px; background: #fdfdfb; font-size: .88rem; }
.ts-wrapper.focus .ts-control { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,158,0,.15); }
/* Las listas de búsqueda se dibujan en <body>: deben quedar sobre los modales */
.ts-dropdown { z-index: 2100 !important; border-color: var(--line-strong); border-radius: 8px; box-shadow: 0 12px 28px -12px rgba(12,23,36,.35); font-size: .86rem; }
.ts-dropdown .active { background: var(--surface-2); color: var(--text); }

/* Tablas */
.table { font-size: .86rem; --bs-table-hover-bg: #faf9f5; --bs-table-border-color: var(--line); margin-bottom: 0; }
.table > thead th { font-family: var(--display); font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
.table > :not(caption) > * > * { padding: .65rem .8rem; vertical-align: middle; }
.table tfoot td { background: var(--surface-2); }
.table-light { --bs-table-bg: var(--surface-2); }

/* Etiquetas de estado sobrias */
.badge { font-weight: 600; padding: .38em .6em; border-radius: 5px; font-size: .74em; letter-spacing: .01em; }
.badge.text-bg-success { background: var(--ok-bg) !important; color: var(--ok) !important; }
.badge.text-bg-warning { background: var(--warn-bg) !important; color: var(--warn) !important; }
.badge.text-bg-danger { background: var(--bad-bg) !important; color: var(--bad) !important; }
.badge.text-bg-info, .badge.text-bg-primary { background: var(--info-bg) !important; color: var(--info) !important; }
.badge.text-bg-secondary, .badge.text-bg-light { background: var(--neutral-bg) !important; color: var(--neutral) !important; }
.badge.text-bg-dark { background: var(--ink) !important; color: #fff !important; }
.badge.border { border-color: var(--line-strong) !important; }
.nav-link-item .badge.text-bg-warning { background: var(--amber) !important; color: #1b1300 !important; }
.nav-link-item .badge.text-bg-danger { background: var(--bad) !important; color: #fff !important; }
.text-success { color: var(--ok) !important; } .text-danger { color: var(--bad) !important; } .text-warning { color: var(--warn) !important; } .text-info, .text-primary { color: var(--info) !important; }

/* Alertas */
.alert { border-radius: 8px; border-width: 0 0 0 3px; font-size: .86rem; }
.alert-success { background: var(--ok-bg); border-color: var(--ok); color: #1f5a40; }
.alert-warning { background: var(--warn-bg); border-color: var(--amber); color: #6b4a10; }
.alert-danger { background: var(--bad-bg); border-color: var(--bad); color: #7d2c1e; }
.alert-info { background: var(--info-bg); border-color: var(--info); color: #1f4a70; }
.alert-light { background: var(--surface-2); border-color: var(--line-strong); }

/* Pestañas */
.nav-tabs { border-bottom-color: var(--line); }
.nav-tabs .nav-link { font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--text); background: transparent; border-bottom-color: var(--amber); }
.nav-pills .nav-link { border-radius: 8px; font-weight: 600; font-size: .84rem; color: var(--text); }
.nav-pills .nav-link.active { background: var(--navy); }
.pagination { --bs-pagination-active-bg: var(--navy); --bs-pagination-active-border-color: var(--navy); --bs-pagination-color: var(--text); --bs-pagination-border-color: var(--line); }

/* Modales: centrados, cabecera carbón */
.modal-dialog { display: flex; align-items: center; min-height: calc(100% - var(--bs-modal-margin) * 2); }
.modal-dialog-scrollable { height: calc(100% - var(--bs-modal-margin) * 2); }
.modal-content { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(12,23,36,.5); }
.modal-fullscreen-lg-down .modal-content { border-radius: 12px; }
.modal-header { background: var(--ink); color: #fff; border-bottom: 3px solid var(--amber); padding: 14px 20px; }
.modal-header .modal-title { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: .05em; text-transform: uppercase; }
.modal-header .modal-title i { color: var(--amber); }
.modal-header .text-muted, .modal-header .small { color: #93a3b8 !important; }
.modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: .7; }
.modal-footer { background: var(--surface-2); border-top: 1px solid var(--line); }
.modal-backdrop.show { opacity: .62; background: var(--ink); }
@media (max-width: 991.98px) { .modal-fullscreen-lg-down .modal-content { border-radius: 0; } .modal-fullscreen-lg-down.modal-dialog { min-height: 100%; } }

/* Placa ecuatoriana */
.placa {
  display: inline-block; white-space: nowrap; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; letter-spacing: .12em;
  background: #fff; border: 2px solid #1c2533; border-radius: 5px; padding: 0 8px; font-size: .95rem; color: #111; line-height: 1.5;
  box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 2.5px #c9c3b5;
}
.placa-lg { font-size: 1.6rem; padding: 2px 14px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px #c9c3b5; }
/* Campo de placa: marco estampado como la placa real, sin franjas de color */
.placa-input { font-family: var(--display) !important; font-weight: 700 !important; letter-spacing: .18em; font-size: 1.9rem !important; color: var(--ink) !important; background: #fff !important; border: 2px solid #2a3442 !important; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #d3cdbf !important; }
.placa-input::placeholder { color: #c3bdb0; }
.placa-input:focus { border-color: var(--navy) !important; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #d3cdbf, 0 0 0 4px rgba(16,52,90,.12) !important; }

.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state i { font-size: 3rem; opacity: .35; display: block; margin-bottom: 10px; }
.empty-state h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; }
.divider-o { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .8rem; }
.divider-o::before, .divider-o::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Kanban de ingresos ---------- */
.kanban { display: flex; gap: 0; overflow-x: auto; padding-bottom: 10px; align-items: stretch; counter-reset: etapa; }
/* Cada columna es una "bahía" del taller; entre bahías, una flecha de flujo */
.kanban-col { flex: 0 0 272px; display: flex; flex-direction: column; padding: 0 14px; position: relative; }
.kanban-col:first-child { padding-left: 0; }
.kanban-col:last-child { padding-right: 0; }
.kanban-col + .kanban-col::before {
  content: ''; position: absolute; left: -1px; top: 64px; bottom: 6px; width: 0;
  border-left: 1px dashed var(--line-strong);
}
.kanban-col + .kanban-col::after {
  content: ''; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px;
  border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); transform: rotate(45deg);
}
.kanban-col-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 12px; margin-bottom: 10px; border-bottom: 2px solid var(--ink); }
.k-etapa {
  font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: .8; letter-spacing: -.01em;
  color: transparent; -webkit-text-stroke: 1.2px #9aa3ae;
}
.k-tit { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.k-tit span { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.k-tit small { font-size: .74rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.k-ico { margin-left: auto; font-size: 1.5rem; color: #b8b2a4; }
.kanban-list { flex: 1; min-height: 160px; display: flex; flex-direction: column; gap: 8px; border-radius: 10px; padding: 2px; transition: background .15s; }
/* Bahía libre: marcas de piso de taller */
.kanban-list.vacia {
  border: 1.5px dashed #d6d1c4; padding: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(207,202,189,.22) 10px 12px);
  display: flex; align-items: center; justify-content: center;
}
.kanban-list.vacia::before { content: 'Bahía libre'; font-family: var(--display); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: #aaa394; background: var(--bg); padding: 2px 10px; border-radius: 4px; }
.kanban-list.vacia:has(.kcard)::before { display: none; }
.kanban-list.drag-over { background: rgba(16,52,90,.06); outline: 2px dashed var(--navy); outline-offset: 2px; }
.kcard { background: #fff; border-radius: 8px; padding: 11px 12px 11px 14px; border: 1px solid var(--line); cursor: grab; transition: box-shadow .15s, transform .15s; position: relative; }
.kcard:hover { box-shadow: 0 10px 22px -14px rgba(12,23,36,.45); transform: translateY(-1px); }
.kcard.dragging { opacity: .5; }
.kcard .k-veh { font-weight: 700; font-size: .88rem; }
.kcard .k-meta { font-size: .75rem; color: var(--muted); }
.kcard .prio { position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; }
.prio-urgente { background: var(--bad); } .prio-alta { background: var(--amber); } .prio-normal { background: transparent; } .prio-baja { background: var(--line-strong); }

/* ---------- Ingreso: pasos, combustible, checklist ---------- */
.step-pills { display: flex; gap: 0; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.step-pill { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-weight: 600; font-size: .8rem; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); position: relative; white-space: nowrap; }
.step-pill:last-child { border-right: 0; }
.step-pill .n { width: 22px; height: 22px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: .9rem; }
.step-pill.active { color: var(--text); background: var(--surface-2); }
.step-pill.active .n { background: var(--navy); border-color: var(--navy); color: #fff; }
.step-pill.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }

.veh-card { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: linear-gradient(180deg, #fff, var(--surface-2)); }
.veh-nombre { font-family: var(--display); font-size: 1.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.owner-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }

.fuel-gauge { display: flex; gap: 3px; }
.fuel-gauge button { flex: 1; height: 32px; border: 1px solid var(--line-strong); background: #fff; border-radius: 4px; font-family: var(--display); font-size: .9rem; font-weight: 700; color: var(--muted); }
.fuel-gauge button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.fuel-gauge button.on.low { background: var(--bad); border-color: var(--bad); }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.check-tile { position: relative; }
.check-tile input { position: absolute; opacity: 0; }
.check-tile label { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 6px; cursor: pointer; font-size: .82rem; font-weight: 500; color: #46505e; transition: background .12s, color .12s; }
.check-tile label:hover { background: var(--surface-2); }
.check-tile label i { color: #c7c2b6; font-size: 1.15rem; transition: color .12s; }
.check-tile input:checked + label { color: var(--text); font-weight: 600; }
.check-tile input:checked + label i { color: var(--ok); }

.signature-pad { border: 1px dashed var(--line-strong); border-radius: 10px; background: repeating-linear-gradient(0deg, #fff 0 34px, #f3f1ea 34px 35px); width: 100%; height: 170px; touch-action: none; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.photo-grid .ph-item, .photo-grid .ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #e9e7e0; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .rm { position: absolute; top: 4px; right: 4px; padding: 2px 6px; }

/* ---------- Bocetos y novedades ---------- */
.boceto-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.boceto-tabs button { border: 1px solid var(--line-strong); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.boceto-tabs button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.boceto-tabs button .cnt { background: var(--amber); color: #1b1300; border-radius: 4px; padding: 0 5px; margin-left: 4px; font-size: .72rem; }
.car-diagram { position: relative; margin: 0 auto; cursor: crosshair; user-select: none; background: radial-gradient(ellipse at center, #fff 40%, var(--surface-2) 100%); border: 1px solid var(--line); border-radius: 10px; }
.car-diagram.solo-lectura { cursor: default; }
.car-diagram svg { width: 100%; height: auto; display: block; }
.bz-lbl { font: 700 10px 'Barlow Condensed', sans-serif; letter-spacing: .14em; fill: #9aa3ae; }
.dano-pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; font-family: var(--display); }
.dano-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dano-rayon { background: #e09e00; } .dano-golpe { background: #b4432f; } .dano-abolladura { background: #6d4aa8; } .dano-roto { background: #17202b; }
.dano-pintura { background: #c26a1b; } .dano-oxido { background: #8a4b23; } .dano-faltante { background: #2d6a9f; } .dano-otro { background: #5f6672; }
.vistas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.vista-lbl { font-family: var(--display); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }

/* Selector de tipo y marca */
.tipo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.tipo-tile { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 6px 5px; text-align: center; cursor: pointer; transition: all .12s; font-size: .74rem; font-weight: 600; color: #46505e; }
.tipo-tile .sil { height: 40px; display: flex; align-items: center; justify-content: center; }
.tipo-tile svg { width: 100%; max-height: 40px; display: block; }
.tipo-tile:hover { border-color: var(--line-strong); }
.tipo-tile.active { background: #f6efe0; color: var(--text); }
.marca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.marca-tile { border-radius: 8px; padding: 9px 4px 7px; text-align: center; cursor: pointer; font-size: .7rem; font-weight: 600; color: var(--muted); transition: background .12s, color .12s; }
.marca-tile img { height: 30px; max-width: 60px; object-fit: contain; display: block; margin: 0 auto 4px; }
.marca-tile img { opacity: .85; transition: opacity .12s, transform .12s; }
.marca-tile:hover { background: var(--surface-2); color: var(--text); }
.marca-tile:hover img { opacity: 1; }
.marca-tile.active { background: #f6efe0; color: var(--text); }
.marca-tile.active img { opacity: 1; transform: scale(1.06); }
.marca-ini { width: 30px; height: 30px; border-radius: 6px; background: var(--neutral-bg); color: var(--neutral); font-family: var(--display); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; margin: 0 auto 4px; }
.ts-logo { width: 26px; height: 20px; object-fit: contain; margin-right: 8px; vertical-align: middle; }
.ts-logo.marca-ini { width: 22px; height: 22px; font-size: .7rem; margin: 0 8px 0 0; }
.marca-logo-sm { height: 22px; max-width: 44px; object-fit: contain; vertical-align: middle; }
.ficha { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 12px 14px; }
.ficha dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 14px; margin: 0; }
.ficha dt { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ficha dd { margin: 0; font-weight: 600; font-size: .86rem; }
.colores { display: flex; gap: 6px; flex-wrap: wrap; }
.colores button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.colores button.active { box-shadow: 0 0 0 2px var(--amber); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 26px; margin-bottom: 14px; }
.timeline li .tl-dot { position: absolute; left: 1px; top: 3px; width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 3px solid var(--navy); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(135deg, rgba(12,23,36,.93), rgba(16,52,90,.8)), url('../../../images/background/1.webp') center/cover; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero h2 { font-family: var(--display); font-weight: 600; font-size: 3.2rem; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.login-hero .accent { color: var(--amber); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.login-form .box { width: 100%; max-width: 360px; }
.login-form h3 { font-family: var(--display); text-transform: uppercase; font-size: 2.1rem; letter-spacing: .03em; }

/* Calendario */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: rgba(224,158,0,.07); --fc-button-bg-color: #fff; --fc-button-border-color: var(--line-strong); --fc-button-text-color: var(--text); --fc-button-hover-bg-color: var(--surface-2); --fc-button-hover-border-color: var(--line-strong); --fc-button-active-bg-color: var(--navy); --fc-button-active-border-color: var(--navy); font-size: .82rem; }
.fc .fc-button { color: var(--text); font-weight: 600; box-shadow: none !important; }
.fc .fc-button-active { color: #fff !important; }
.fc .fc-toolbar-title { font-family: var(--display); font-size: 1.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fc .fc-col-header-cell-cushion { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.fc-event { cursor: pointer; border-radius: 5px; padding: 1px 3px; border: 0; }
.fc a { text-decoration: none; color: inherit; }

/* POS factura */
.lineas-table input { min-width: 70px; }
.totales-box { background: var(--ink); color: #fff; border-radius: 10px; padding: 16px 18px; }
.totales-box .row-t { display: flex; justify-content: space-between; padding: 4px 0; font-size: .86rem; color: #a9b6c6; }
.totales-box .row-t.total { border-top: 1px solid rgba(255,255,255,.12); margin-top: 8px; padding-top: 12px; font-family: var(--display); font-size: 2rem; font-weight: 600; color: #fff; }

.toast { border-radius: 8px; font-size: .86rem; }
.toast.text-bg-success { background: var(--ink) !important; border-left: 3px solid var(--ok) !important; }
.toast.text-bg-danger { background: var(--bad) !important; }
.toast.text-bg-info { background: var(--navy) !important; }
.toast.text-bg-warning { background: var(--amber) !important; color: #1b1300 !important; }

/* ---------- Responsive ---------- */
/* Tablet (768–1199): barra lateral angosta solo con íconos; el botón de menú la despliega encima */
@media (min-width: 768px) and (max-width: 1199.98px) {
  :root { --rail-w: 74px; }
  .btn-menu { display: inline-flex !important; }
  .main { margin-left: var(--rail-w); }
  .sidebar { width: var(--rail-w); transition: width .22s ease, box-shadow .22s ease; overflow: hidden; }
  .sidebar-brand { justify-content: center; padding: 16px 0 10px; }
  .sidebar-brand .brand-logo { display: none; }
  .sidebar-brand .brand-ico { display: block; }
  .sidebar-nav { padding: 4px 10px 16px; overflow-x: hidden; }
  .nav-section { margin: 12px 4px 6px; font-size: 0; gap: 0; }
  .nav-section::before { display: none; }
  .nav-link-item { justify-content: center; padding: 12px 0; gap: 0; }
  .nav-link-item span:not(.badge) { display: none; }
  .nav-link-item i { font-size: 1.45rem; width: auto; }
  .nav-link-item .badge { position: absolute; top: 4px; right: 4px; font-size: .64rem; padding: .1em .4em; }
  .sidebar-footer { justify-content: center; padding: 12px 0; }
  .sidebar-footer a span { display: none; }
  .sidebar-footer a i { font-size: 1.3rem; }
  /* Desplegada */
  body.sidebar-open .sidebar { width: var(--sidebar-w); box-shadow: 18px 0 40px -12px rgba(0,0,0,.45); }
  body.sidebar-open .sidebar-brand { justify-content: flex-start; padding: 20px 20px 16px; }
  body.sidebar-open .sidebar-brand .brand-logo { display: block; }
  body.sidebar-open .sidebar-brand .brand-ico { display: none; }
  body.sidebar-open .nav-section { margin: 18px 10px 6px; font-size: .78rem; gap: 8px; }
  body.sidebar-open .nav-section::before { display: inline; }
  body.sidebar-open .nav-link-item { justify-content: flex-start; padding: 11px 12px; gap: 11px; }
  body.sidebar-open .nav-link-item span:not(.badge) { display: inline; white-space: nowrap; }
  body.sidebar-open .nav-link-item .badge { position: static; margin-left: auto; font-size: .78rem; }
  body.sidebar-open .sidebar-footer { justify-content: flex-start; padding: 12px 20px; }
  body.sidebar-open .sidebar-footer a span { display: inline; }
  body.sidebar-open .sidebar-backdrop { position: fixed; inset: 0; background: rgba(12,23,36,.45); z-index: 1035; }
  .content { padding: 20px 22px 32px; }
  .topbar { padding-left: 14px; padding-right: 18px; }
}
/* Teléfono: menú lateral oculto */
@media (max-width: 767.98px) {
  .btn-menu { display: inline-flex !important; }
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { position: fixed; inset: 0; background: rgba(12,23,36,.55); z-index: 1035; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
}
@media (max-width: 991.98px) {
  .topbar { padding: 0 12px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .step-pill { padding: 8px 10px; }
}
@media (max-width: 575.98px) {
  .topbar { gap: 6px; }
  .topbar-search input { padding-left: 34px; font-size: .8rem; }
  .topbar-search kbd { display: none; }
  .page-header h1 { font-size: 1.6rem; }
  .page-header .actions { margin-left: 0; width: 100%; }
  .step-pill { font-size: 0; gap: 0; justify-content: center; }
  .step-pill .n { font-size: .9rem; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { border: 0; }
}

/* Tipo de vehículo deducido del modelo */
.tipo-detectado { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tipo-detectado .form-select { width: auto; min-width: 180px; font-weight: 600; }

/* Menú para elegir el tipo de novedad sobre el boceto */
.diag-wrap { position: relative; }
.dano-pop { position: absolute; z-index: 20; width: 300px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 16px 34px -14px rgba(12,23,36,.45); padding: 10px; }
.dano-pop-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.dano-pop-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 8px; }
.dano-pop-tipos button { display: flex; align-items: center; gap: 2px; white-space: nowrap; border: 0; background: transparent; border-radius: 6px; padding: 6px 7px; font-size: .78rem; font-weight: 500; color: var(--text); text-align: left; }
.dano-pop-tipos button:hover, .dano-pop-tipos button:focus-visible { background: var(--surface-2); outline: none; }
.dano-pop-tipos button.active { background: #f6efe0; font-weight: 700; }
.dano-pop-pie { display: flex; align-items: center; margin-top: 8px; }
.dano-fantasma { background: #fff; border: 2px dashed var(--navy); box-shadow: none; animation: pulso 1.2s ease-in-out infinite; }
@keyframes pulso { 50% { transform: scale(1.25); } }

/* Modal de vehículo compacto */
.veh-body { padding-top: 14px; padding-bottom: 14px; }
.veh-body .form-label { margin-bottom: 2px; }
.veh-preview { padding: 10px 12px; }
.veh-preview #vehSilueta { max-width: 250px; margin: 0 auto; }
.veh-preview .veh-nombre { font-size: 1.3rem; margin-top: 2px; }
.veh-body .placa-input { font-size: 1.5rem !important; padding: .35rem; }
.marca-fila { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.marca-fila .marca-tile { flex: 0 0 auto; width: 64px; padding: 6px 2px 4px; font-size: .64rem; }
.marca-fila .marca-tile img, .marca-fila .marca-ini { height: 22px; max-width: 46px; }
.veh-body .colores button { width: 22px; height: 22px; }
.veh-body .ficha { padding: 8px 12px; }
.veh-body .ficha dl { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 12px; }

/* Selector de kilometraje */
.km-picker { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.km-top { display: flex; align-items: center; gap: 6px; }
.km-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 1.2rem; font-weight: 700; line-height: 1; color: var(--text); }
.km-btn:hover { background: #fff; border-color: var(--navy); }
.km-val { flex: 1; }
.km-input { width: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: right; font-family: var(--display); font-size: 1.6rem !important; font-weight: 600; padding: 0 !important; -moz-appearance: textfield; }
.km-input::-webkit-outer-spin-button, .km-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.km-uni { font-family: var(--display); font-weight: 600; color: var(--muted); margin-right: 4px; }
.km-range { margin: 6px 0 4px; height: 1.2rem; }
.km-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--navy) var(--p, 0%), var(--line) var(--p, 0%)); height: 6px; border-radius: 3px; }
.km-range::-webkit-slider-thumb { background: var(--amber); margin-top: -5px; }
.km-range::-moz-range-thumb { background: var(--amber); }
.km-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.km-chips button { border: 0; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: .74rem; font-weight: 600; color: #46505e; }
.km-chips button:hover { background: #ece8de; }
.km-chips button.active { background: var(--navy); color: #fff; }
.km-hint { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.km-hint:empty { display: none; }

/* Medidor de combustible */
.fuel-dial { position: relative; max-width: 300px; margin: 0 auto; text-align: center; user-select: none; }
.medidor-comb { width: 100%; display: block; cursor: pointer; touch-action: none; filter: drop-shadow(0 8px 14px rgba(12,23,36,.25)); border-radius: 10px 10px 4px 4px; }
.medidor-comb, .medidor-comb:focus { outline: none; }
.medidor-comb:focus-visible { outline: none; filter: drop-shadow(0 0 0 transparent) drop-shadow(0 8px 14px rgba(12,23,36,.25)) brightness(1.08); }
.fuel-read { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 6px; }
.fuel-read span { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.fuel-read small { color: var(--muted); font-weight: 600; }
.fuel-dial.reserva .fuel-read span { color: var(--bad); }
.fuel-hint { font-size: .72rem; color: var(--muted); }
.medidor-mini { max-width: 150px; }

/* Enlace con el teléfono */
.mv-qr-wrap { display: flex; gap: 18px; align-items: center; justify-content: center; margin-bottom: 12px; }
.mv-qr { width: 216px; height: 216px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.mv-qr img, .mv-qr canvas { display: block; }
.mv-pin-box { text-align: center; }
.mv-pin { font-family: var(--display); font-weight: 700; font-size: 3rem; letter-spacing: .28em; line-height: 1.1; color: var(--ink); padding-left: .28em; }
.mv-pasos { color: #46505e; padding-left: 1.2rem; margin-bottom: 10px; }
.mv-estado { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 8px; padding: 9px 12px; font-size: .84rem; font-weight: 600; margin-top: 10px; }
.mv-punto { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: pulso 1.2s ease-in-out infinite; flex-shrink: 0; }
.mv-estado.ok { background: var(--ok-bg); color: #1f5a40; } .mv-estado.ok .mv-punto { background: var(--ok); animation: none; }
.mv-estado.mal { background: var(--bad-bg); color: #7d2c1e; } .mv-estado.mal .mv-punto { background: var(--bad); animation: none; }
.ph-item .badge-movil { position: absolute; left: 4px; top: 4px; background: rgba(12,23,36,.75); color: #fff; border-radius: 5px; font-size: .68rem; padding: 1px 5px; }
@media (max-width: 575.98px) { .mv-qr-wrap { flex-direction: column; } }

/* Recepción compacta */
.recep .fuel-dial { max-width: 230px; }
.recep .fuel-read { margin-top: 2px; }
.recep .fuel-read span { font-size: 1.35rem; }
.recep .km-picker { padding: 8px 10px 6px; }

/* =====================================================================
   Modo tablet
   ===================================================================== */
/* Modales grandes: aprovechan el ancho de la tablet en vez de quedarse en 500/800 px */
@media (min-width: 576px) and (max-width: 1199.98px) {
  .modal-lg, .modal-xl { --bs-modal-width: calc(100vw - 2.5rem); }
  .modal-lg { max-width: 860px; }
}
/* El asistente de ingreso ocupa toda la pantalla en tablet */
@media (max-width: 1199.98px) {
  #modalIngreso .modal-dialog { max-width: none; width: 100%; height: 100%; margin: 0; min-height: 100%; }
  #modalIngreso .modal-content { height: 100%; border-radius: 0; }
  .modal-footer { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}
/* Barra superior y menú respetan el notch / barras del sistema en modo app */
.topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
.sidebar { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }

/* Pantallas táctiles: objetivos de toque cómodos (≥ 40 px) */
@media (pointer: coarse) {
  html { -webkit-tap-highlight-color: transparent; }
  body { -webkit-text-size-adjust: 100%; }
  .btn { min-height: 40px; padding: .55rem 1rem; display: inline-flex; align-items: center; justify-content: center; }
  .btn.w-100, .btn.d-block { display: flex; }
  .btn-sm { min-height: 34px; padding: .38rem .75rem; }
  .btn-icon { width: 44px; height: 44px; }
  .btn-close { padding: .75em; }
  .form-control, .form-select { min-height: 42px; font-size: .95rem; }
  .form-control-sm, .form-select-sm { min-height: 36px; }
  .form-control-lg { min-height: 52px; }
  .form-check-input { width: 1.3em; height: 1.3em; margin-top: .1em; }
  .form-switch .form-check-input { width: 2.4em; }
  .form-check-label { padding-left: .2rem; padding-top: .1rem; }
  .ts-wrapper .ts-control { min-height: 42px; font-size: .95rem; }
  .ts-dropdown .option, .ts-dropdown .create { padding: 10px 12px; }
  .dropdown-item { padding: .65rem 1rem; }
  .nav-link-item { padding-top: 11px; padding-bottom: 11px; }
  .table > :not(caption) > * > * { padding: .8rem .8rem; }
  .table-sm > :not(caption) > * > * { padding: .55rem .6rem; }
  .page-link { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
  .nav-tabs .nav-link, .nav-pills .nav-link { padding: .7rem 1rem; }
  .topbar-search input { padding-top: 10px; padding-bottom: 10px; }
  .topbar-search kbd { display: none; }
  .user-chip { min-height: 44px; }
  .step-pill { padding: 12px 14px; }
  .step-pill .n { width: 26px; height: 26px; }

  /* Ingreso */
  .km-btn { width: 46px; height: 46px; font-size: 1.4rem; }
  .km-chips { gap: 6px; }
  .km-chips button { padding: 7px 14px; font-size: .8rem; }
  .km-range { height: 2rem; }
  .km-range::-webkit-slider-runnable-track { height: 8px; }
  .km-range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -9px; }
  .km-range::-moz-range-thumb { width: 26px; height: 26px; }
  .check-tile label { padding: 11px 8px; font-size: .86rem; }
  .check-tile label i { font-size: 1.35rem; }
  .boceto-tabs { gap: 6px; }
  .boceto-tabs button { padding: 8px 14px; font-size: .82rem; }
  .dano-pin { width: 30px; height: 30px; margin: -15px 0 0 -15px; font-size: .82rem; }
  .dano-pop { width: 340px; max-width: calc(100% - 8px); }
  .dano-pop-tipos button { padding: 10px 9px; font-size: .84rem; }
  .signature-pad { height: 240px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .photo-grid .rm { padding: 6px 9px; }
  .colores { gap: 8px; }
  .colores button, .veh-body .colores button { width: 32px; height: 32px; }
  .marca-fila .marca-tile { width: 74px; padding: 8px 2px 6px; }
  .tipo-tile { padding: 9px 6px 8px; }
  .lineas-table input { min-height: 38px; }
  .fc .fc-button { padding: .5em .8em; }
  .fc .fc-timegrid-slot { height: 2.6em; }
  .kanban-col { flex-basis: 290px; }
}

/* Sin mouse no hay hover: evita estados "pegados" tras tocar */
@media (hover: none) {
  .kcard:hover { box-shadow: none; transform: none; }
  .nav-link-item:not(.active):hover { background: transparent; color: #b9c4d2; }
  .nav-link-item:not(.active):hover i { color: #8597ad; }
}

/* Kanban con arrastre táctil */
.kcard { touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kcard.presionada { transform: scale(.98); box-shadow: 0 0 0 2px var(--amber); transition: transform .28s ease, box-shadow .28s ease; }
.kcard.dragging { opacity: .35; }
.kcard-fantasma { position: fixed; z-index: 3000; pointer-events: none; margin: 0; transform: rotate(2deg) scale(1.03); box-shadow: 0 24px 40px -14px rgba(12,23,36,.55); opacity: .96; }
body.arrastrando { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.txt-tactil { display: none; }
@media (pointer: coarse) { .txt-mouse { display: none; } .txt-tactil { display: inline; } }

/* Marcas populares: cuadrícula sin desplazamiento, logos grandes y nítidos */
.marca-fila { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px; overflow: visible !important; padding: 0 !important; }
.marca-fila .marca-tile { width: auto !important; padding: 8px 2px 6px !important; font-size: .68rem !important; border-radius: 8px; border: 1px solid transparent; }
.marca-fila .marca-tile img { height: 34px !important; max-width: 62px !important; opacity: 1; filter: saturate(.92); margin-bottom: 5px; }
.marca-fila .marca-ini { width: 34px; height: 34px !important; max-width: none !important; font-size: .95rem; margin-bottom: 5px; }
.marca-fila .marca-tile:hover { background: #fff; border-color: var(--line); }
.marca-fila .marca-tile:hover img { transform: translateY(-1px); }
.marca-fila .marca-tile.active { background: #fff; border-color: var(--navy); color: var(--ink); box-shadow: 0 6px 14px -10px rgba(16,52,90,.6); }
.marca-fila .marca-tile.active img { transform: none; filter: none; }

/* Selector de pintura: muestras con brillo de carrocería y nombre */
.pintura { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pintura button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid transparent; background: transparent;
  border-radius: 8px; padding: 6px 2px 5px; font-size: .68rem; font-weight: 600; color: var(--muted); transition: background .12s, border-color .12s, color .12s;
}
.pintura .gota {
  position: relative; width: 28px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 9%, rgba(255,255,255,0) 32%),
    linear-gradient(160deg, rgba(255,255,255,.28), rgba(0,0,0,.22)),
    var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 2px 5px -2px rgba(12,23,36,.45);
  transition: transform .12s;
}
.pintura button:hover { background: #fff; border-color: var(--line); color: var(--text); }
.pintura button:hover .gota { transform: scale(1.08); }
.pintura button.active { background: #fff; border-color: var(--navy); color: var(--ink); }
.pintura button.active .gota::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 12px; margin: -8px 0 0 -3.5px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); filter: drop-shadow(0 0 1.5px rgba(0,0,0,.7));
}
.pintura-otro { position: relative; margin-top: 6px; }
.pintura-otro i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.05rem; pointer-events: none; }
.pintura-otro .form-control { padding-left: 34px; }
@media (pointer: coarse) { .pintura .gota { width: 34px; height: 34px; } .pintura button { padding: 8px 2px 7px; } }
.pintura button.claro.active .gota::after { border-color: var(--ink); filter: none; }
/* 18 marcas = 2 filas de 9 cuando hay espacio; 3 filas de 6 en columnas angostas (tablet vertical) */
:has(> .marca-fila) { container-type: inline-size; }
.marca-fila { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@container (min-width: 560px) { .marca-fila { grid-template-columns: repeat(9, minmax(0, 1fr)) !important; } }

/* Accesos rápidos de kilometraje: siempre en una sola fila, mismo ancho cada uno */
.km-chips { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px !important; flex-wrap: nowrap; }
.km-chips button { padding: 4px 2px !important; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem !important; }
@media (pointer: coarse) { .km-chips button { padding: 7px 2px !important; } }

/* ---------- Ingreso · paso 1: búsqueda simétrica ---------- */
.p1-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.p1-top .btn { margin-left: auto; }
.p1-titulo { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; color: var(--ink); }
.p1-busca { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 14px; align-items: start; }
.p1-campo { position: relative; min-width: 0; }
.p1-o { align-self: stretch; display: flex; flex-direction: column; align-items: center; padding-top: 22px; }
.p1-o::before, .p1-o::after { content: ''; flex: 1; width: 1px; background: var(--line); }
.p1-o span { font-family: var(--display); font-weight: 600; font-size: .85rem; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.p1-busca .placa-input { height: 48px; font-size: 1.55rem !important; padding: 0 44px 0 14px; }
.p1-busca .ts-wrapper .ts-control { min-height: 48px; display: flex; align-items: center; font-size: .92rem; }
.p1-lupa { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.3rem; pointer-events: none; }
.p1-res { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; box-shadow: 0 16px 30px -16px rgba(12,23,36,.4); border-radius: 8px; }
.p1-res:empty { display: none; }
.p1-sec { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.p1-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Vehículos del cliente: fichas iguales en cuadrícula */
.veh-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.veh-opciones-guia { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .84rem; }
.veh-opciones-guia i { font-size: 1.5rem; opacity: .6; }
.veh-opc { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 60px; transition: border-color .12s, box-shadow .12s; }
.veh-opc:hover { border-color: var(--line-strong); }
.veh-opc.active { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.veh-opc-logo { flex: 0 0 40px; height: 40px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--muted); }
.veh-opc-logo img { max-width: 32px; max-height: 26px; object-fit: contain; }
.veh-opc-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.veh-opc-mod { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.veh-opc-ok { position: absolute; top: 8px; right: 8px; color: var(--navy); font-size: 1.1rem; opacity: 0; transition: opacity .12s; }
.veh-opc.active .veh-opc-ok { opacity: 1; }
.veh-opc-add { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.veh-opc-add .veh-opc-logo { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--navy); }
.veh-opc-add b { font-size: .84rem; color: var(--navy); }

/* Vehículo seleccionado: franja horizontal de resumen */
.veh-sel { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #fff, var(--surface-2)); }
.veh-sel-vacio { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--muted); font-size: .84rem; }
.veh-sel-vacio i { font-size: 1.8rem; opacity: .45; }
.veh-sel-lleno { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: center; padding: 14px 16px; }
.veh-sel-id { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.veh-sel-logo img { height: 30px; max-width: 70px; object-fit: contain; }
.veh-sel-logo:empty { display: none; }
.veh-sel-datos .veh-nombre { font-size: 1.5rem; line-height: 1.05; }
.veh-sel-aviso { grid-column: 1 / -1; }
@media (max-width: 767.98px) {
  .p1-busca { grid-template-columns: 1fr; gap: 6px; }
  .p1-o { flex-direction: row; padding-top: 0; }
  .p1-o::before, .p1-o::after { height: 1px; width: auto; }
  .p1-o span { padding: 0 10px; }
  .veh-sel-lleno { grid-template-columns: auto 1fr; }
  .veh-sel-lleno .owner-box { grid-column: 1 / -1; }
}

/* Texto largo: sin tirador para agrandar; crece solo al escribir */
textarea.form-control { resize: none; field-sizing: content; min-height: 4.2em; max-height: 220px; overflow-y: auto; }

/* ---------- Selector de fecha y hora ---------- */
.fp-nativo { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; }
.fp-campo { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.fp-campo i { color: var(--navy); font-size: 1.1rem; flex-shrink: 0; }
.fp-campo .fp-txt { overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fp-campo.vacio .fp-txt { color: #9aa0a8; }
.fp-campo.abierto { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,158,0,.15); background-color: #fff; }
.fp-campo.disabled { pointer-events: none; background-color: var(--surface-2); opacity: .75; }
.fp-campo.is-invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180,67,47,.15); }
.fp-panel { position: fixed; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 24px 48px -20px rgba(12,23,36,.5); padding: 10px; font-size: .84rem; width: max-content; max-width: calc(100vw - 16px); }
.fp-atajos { display: flex; gap: 4px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.fp-atajos button { border: 0; background: var(--surface-2); border-radius: 999px; padding: 4px 11px; font-size: .76rem; font-weight: 600; color: #46505e; }
.fp-atajos button:hover { background: #ece8de; color: var(--ink); }
.fp-cuerpo { display: flex; gap: 12px; }
.fp-cal { width: 252px; }
.fp-cab { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.fp-cab .form-select { min-height: 32px; padding-top: .2rem; padding-bottom: .2rem; font-weight: 600; font-size: .82rem; }
.fp-cab [data-fp-mes] { flex: 1.4; } .fp-cab [data-fp-anio] { flex: 1; }
.fp-nav { flex: 0 0 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; color: var(--navy); font-size: 1rem; }
.fp-nav:hover { background: var(--surface-2); }
.fp-sem, .fp-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.fp-sem span { font-family: var(--display); font-weight: 600; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 0 4px; }
.fp-dias button { height: 34px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.fp-dias button:hover { background: var(--surface-2); }
.fp-dias button.dom { color: var(--bad); }
.fp-dias button.hoy { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.fp-dias button.sel { background: var(--navy); color: #fff; box-shadow: none; }
.fp-dias button:disabled { color: #cfcabd; background: transparent; }
.fp-horas { width: 196px; max-height: 300px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.fp-time .fp-horas { width: 228px; }
.fp-datetime .fp-horas { border-left: 1px solid var(--line); padding-left: 12px; }
.fp-grupo { font-family: var(--display); font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2px 0 4px; }
.fp-grupo:not(:first-child) { margin-top: 10px; }
.fp-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fp-slots button { height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-weight: 600; font-size: .8rem; color: var(--text); font-variant-numeric: tabular-nums; }
.fp-slots button.media { color: var(--muted); }
.fp-slots button:hover { border-color: var(--navy); color: var(--navy); }
.fp-slots button.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.fp-pie { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; }
.fp-pie .btn { margin-left: auto; }
@media (max-width: 575.98px) { .fp-cuerpo { flex-direction: column; } .fp-datetime .fp-horas { border-left: 0; padding-left: 0; width: auto; max-height: 180px; } }
@media (pointer: coarse) { .fp-dias button { height: 40px; } .fp-slots button { height: 40px; } .fp-atajos button { padding: 7px 13px; } }
.p1-o span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; display: flex; align-items: center; justify-content: center; padding: 0 !important; font-size: .78rem; margin: 4px 0; }

/* Logo del menú lateral: ocupa todo el ancho del menú */
.sidebar-brand { padding: 22px 18px 18px; }
.sidebar-brand .brand-logo { width: 100%; max-width: none; max-height: none; height: auto; display: block; }
@media (min-width: 768px) and (max-width: 1199.98px) {
  .sidebar-brand { padding: 16px 0 10px; }
  .sidebar-brand .brand-logo { display: none; }
  body.sidebar-open .sidebar-brand { padding: 22px 18px 18px; }
  body.sidebar-open .sidebar-brand .brand-logo { display: block; }
}

/* Confirmación de eliminación */
.modal-header-peligro { border-bottom-color: var(--bad); }
.modal-header-peligro .modal-title i { color: #ff8a73; }
.elim-lista { list-style: none; padding: 10px 12px; margin: 0 0 12px; background: var(--surface-2); border-radius: 8px; }
.elim-lista li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .86rem; }
.elim-lista i { color: var(--muted); }
.elim-clave { font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: none; color: var(--bad); background: var(--bad-bg); padding: 1px 7px; border-radius: 4px; user-select: all; }

/* Signo "+" en botones: trazo firme y centrado con el texto */
.btn .ph-bold.ph-plus { font-size: .95em; vertical-align: -0.1em; }

/* Foto por novedad (inspección) */
.dano-pop-nota { display: flex; gap: 6px; }
.dano-pop-nota .form-control { flex: 1; }
.dano-cam { flex: 0 0 auto; width: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ink); color: var(--amber); font-size: 1.2rem; cursor: pointer; margin: 0; }
.dano-cam:hover { background: var(--ink-2); }
.dano-pop-thumb { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .78rem; font-weight: 600; color: var(--ok); }
.dano-pop-thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.dano-mini img { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; display: block; }
.dano-cam-fila { display: inline-flex; align-items: center; border-color: var(--line-strong) !important; color: var(--navy); }
.dano-foto-link img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-left: 6px; border: 1px solid var(--line); }
@media (pointer: coarse) { .dano-cam { width: 46px; font-size: 1.4rem; } }

/* ---------- Detalle de la orden (ingreso_ver) ---------- */
.min-w-0 { min-width: 0; }
.ov-et { display: block; font-family: var(--display); font-weight: 600; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ov-ficha { display: grid; grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1fr) minmax(0, 1.6fr); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ov-bloque { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 0; }
.ov-bloque + .ov-bloque { border-left: 1px solid var(--line); }
.ov-tit { font-weight: 700; color: var(--ink); text-decoration: none; }
.ov-sub { font-size: .78rem; color: var(--muted); }
.ov-veh .placa-lg { font-size: 1.35rem; flex-shrink: 0; }
.ov-medidas { gap: 18px; }
.ov-medidas b { font-size: .95rem; }
.ov-comb { display: flex; align-items: center; gap: 8px; }
.ov-comb .medidor-comb { width: 74px; filter: none; cursor: default; }
.ov-comb > span { display: flex; flex-direction: column; line-height: 1.1; }
.ov-cli > i { font-size: 1.9rem; color: var(--navy); flex-shrink: 0; }
.ov-asig { display: grid; grid-template-columns: 1fr 1.25fr .8fr; gap: 8px; align-items: end; }
.ov-asig label { margin: 0; min-width: 0; }
.ov-asig .form-select, .ov-asig .form-control { margin-top: 3px; }

.ov-flujo { display: flex; align-items: center; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; overflow-x: auto; }
.ov-paso { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .8rem; white-space: nowrap; position: relative; min-width: max-content; }
.ov-paso:not(:last-of-type)::after { content: ''; flex: 1; height: 2px; background: var(--line); margin-left: 6px; min-width: 14px; }
.ov-paso.hecho::after { background: var(--amber); }
.ov-paso:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.ov-paso-n { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; background: #fff; }
.ov-paso.hecho .ov-paso-n { background: var(--amber); border-color: var(--amber); color: #1b1300; }
.ov-paso.hecho { color: var(--text); }
.ov-paso.actual { color: var(--ink); }
.ov-paso.actual .ov-paso-n { background: var(--ink); border-color: var(--ink); color: var(--amber); box-shadow: 0 0 0 3px rgba(224,158,0,.28); }
.ov-paso:disabled { opacity: 1; cursor: default; }
.ov-cancelar { flex-shrink: 0; margin-left: 6px; }

.ov-total-cab { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }
.ov-agregar { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ov-agregar-fila { display: flex; gap: 8px; align-items: center; }
.ov-agregar-fila #itCant { width: 74px; flex-shrink: 0; }
.ov-agregar-fila #itPrecio, .ov-agregar-fila .ov-num { width: 100px; flex-shrink: 0; }
.ov-agregar-fila #itTecnico { width: 220px; flex-shrink: 0; }
.ov-agregar-fila .btn { flex-shrink: 0; }
.ov-mas { margin-top: 6px; }
.ov-mas summary { font-size: .76rem; color: var(--navy); font-weight: 600; cursor: pointer; list-style: none; }
.ov-mas summary::before { content: '+ '; }
.ov-mas[open] summary::before { content: '− '; }
.ov-items td { vertical-align: middle; }
.ov-totales { display: flex; justify-content: flex-end; align-items: baseline; gap: 22px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .84rem; color: var(--muted); border-radius: 0 0 10px 10px; }
.ov-totales b { color: var(--text); margin-left: 4px; }
.ov-total { font-family: var(--display); font-size: 1.05rem; text-transform: uppercase; color: var(--ink); }
.ov-total b { font-size: 1.45rem; color: var(--ink); }
.ov-notas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ov-notas label { margin: 0; display: flex; flex-direction: column; }
.ov-notas textarea.form-control { min-height: 92px; }
.text-none { text-transform: none !important; letter-spacing: 0 !important; font-family: inherit !important; }

.ov-tabs .card-header { background: var(--surface-2); }
.ov-nav { border-bottom: 0; flex-wrap: nowrap; }
.ov-nav .nav-item { flex: 1; }
.ov-nav .nav-link { width: 100%; border-radius: 0; padding: .75rem .5rem; font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: 2px; }
.ov-cnt { background: var(--line); color: var(--text); border-radius: 999px; font-size: .72rem; padding: 0 7px; margin-left: 4px; font-family: 'Montserrat', sans-serif; letter-spacing: 0; }
.ov-nav .nav-link.active .ov-cnt { background: var(--amber); color: #1b1300; }
.ov-check summary { font-size: .84rem; cursor: pointer; color: var(--text); }
.ov-check summary b { color: var(--ok); margin-left: 4px; }
.ov-firma { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ov-firma img { max-height: 54px; max-width: 70%; }
.ov-fotos-acc { display: flex; gap: 6px; margin-bottom: 12px; }
.ov-fotos-acc .form-select { width: auto; }
.ov-vacio { text-align: center; color: var(--muted); padding: 24px 0; font-size: .86rem; }
.ov-vacio i { display: block; font-size: 2rem; opacity: .45; margin-bottom: 6px; }
.ov-msg { display: flex; gap: 6px; align-items: stretch; }
.ov-msg textarea.form-control { min-height: 42px; }
.ov-msg .btn { padding-left: 14px; padding-right: 14px; font-size: 1.1rem; }

@media (max-width: 1399.98px) {
  .ov-ficha { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .ov-asig { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line); }
}
@media (max-width: 767.98px) {
  .ov-ficha { grid-template-columns: 1fr; }
  .ov-bloque + .ov-bloque { border-left: 0; border-top: 1px solid var(--line); }
  .ov-asig { grid-template-columns: 1fr 1fr; }
  .ov-notas { grid-template-columns: 1fr; }
  .ov-agregar-fila { flex-wrap: wrap; }
  .ov-agregar-fila #itTecnico { width: 100%; }
}
.fp-ayuda { font-size: .74rem; color: var(--muted); align-self: center; }
.fp-cab .form-select { cursor: pointer; }

/* Proveedores */
.pv-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.pv-datos > div { display: flex; flex-direction: column; min-width: 0; }
.pv-datos b { font-weight: 600; font-size: .88rem; }
.pv-notas { grid-column: 1 / -1; }
.cp-tabla input.form-control-sm { min-width: 0; }
.cv-resumen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.cv-resumen > div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.cv-resumen span { font-family: var(--display); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pg-saldo { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.pg-saldo > div { display: flex; flex-direction: column; }
.pg-saldo span { font-size: .78rem; color: var(--muted); }
.pg-saldo b { font-size: 1.05rem; }
.pg-saldo .text-end b { font-family: var(--display); font-size: 1.6rem; color: var(--bad); }
@media (max-width: 767.98px) { .cv-resumen { grid-template-columns: repeat(2, 1fr); } .pv-datos { grid-template-columns: 1fr; } }

/* Videos del servicio */
.vd-subir { background: var(--surface-2); border-radius: 10px; padding: 10px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.vd-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vd-fila .form-select { width: auto; }
.vd-fila .form-control { flex: 1; min-width: 160px; }
.vd-progreso { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.vd-lista { display: grid; gap: 10px; }
.vd-item { display: flex; gap: 12px; align-items: center; }
.vd-poster { position: relative; flex: 0 0 150px; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--ink), var(--ink-2)); cursor: pointer; }
.vd-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-play { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(12,23,36,.7); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform .15s, background .15s; }
.vd-poster:hover .vd-play { transform: scale(1.1); background: var(--amber); color: #1b1300; }
.vd-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.vd-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#modalVideo .modal-content { overflow: hidden; }
