/* TallerByteFix · hoja de estilos.
   Mismos tokens y lenguaje visual que el panel de ByteFix (admin.css) y la web de Alex (tokens.css):
   fondo oscuro con manchas de color, superficies de cristal, acento azul hsl(203,88%,47%), fuente Nunito. */

:root {
  --ff: gotham, 'Nunito', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --line: hsla(0, 0%, 100%, .09);
  --line-2: hsla(0, 0%, 100%, .14);
  --field: rgba(0, 0, 0, .35);
  --accent-soft: hsla(203, 88%, 47%, .14);
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark; accent-color: var(--accent);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--ff); scrollbar-color: var(--jet) transparent; }
body { background: var(--smoky-black); color: var(--light-gray); min-height: 100vh; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; text-align: left; }
::selection { background: var(--accent); color: var(--smoky-black); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--white-2); font-weight: 600; line-height: 1.2; }
h1 { font-size: 30px; }
.h2 { font-size: 22px; font-weight: 600; color: var(--white-2); }
.h3 { font-size: 18px; font-weight: 600; color: var(--white-2); }
.ico { font-size: 17px; line-height: 1; flex: none; --fa-secondary-opacity: .4; }

/* ── fondo: bg.png con blur, como la app y la web de ByteFix ── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--smoky-black); }
.bg::before { content: ''; position: absolute; inset: -40px; background: url('../img/bg.png') center / cover no-repeat; filter: blur(14px) brightness(.55) saturate(1.1); transform: scale(1.05); }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, hsla(203, 88%, 47%, .10), transparent 60%), rgba(0, 0, 0, .35); }

.glass { background: rgba(30, 30, 30, .6); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* ── estructura ── */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; max-width: 1560px; margin: 0 auto; padding: 24px; min-height: 100vh; }
.side { padding: 20px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 24px; height: calc(100vh - 48px); overflow-y: auto; }
.mobile-bar { display: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 16px; }
.brand b { color: var(--white-2); font-size: 18px; font-weight: 600; display: block; line-height: 1.2; }
.accent { color: var(--accent); }
.logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, hsl(203, 88%, 55%), hsl(203, 88%, 38%)); box-shadow: 0 8px 24px hsla(203, 88%, 47%, .45); }
.logo .ico { font-size: 22px; }
.chip { color: var(--white-1); background: var(--onyx); font-size: 12px; font-weight: 400; padding: 2px 10px; border-radius: 8px; display: inline-block; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; width: 100%; color: var(--light-gray); font-weight: 500;
  transition: color .25s, transform .25s, background .25s; }
.nav:hover { color: var(--accent); transform: translateX(3px); background: rgba(255, 255, 255, .03); }
.nav.active { color: var(--accent); font-weight: 700; background: rgba(255, 255, 255, .05); }
.nav.active::after { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 2px; background: var(--accent); }
.grow { flex: 1 1 0; min-width: 0; }
.sep { height: 1px; background: var(--jet); margin: 12px 0; }
.who { padding: 10px 12px 0; font-size: 13px; color: var(--light-gray-70); }
.main { min-width: 0; padding: 4px 4px 60px; }
.page { animation: up .45s var(--ease) both; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.sub { color: var(--light-gray); font-weight: 300; line-height: 1.6; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--light-gray-70); }
.eyebrow.gap { margin-top: 22px; }
.eyebrow.day { margin: 22px 0 8px; }
.muted { color: var(--light-gray-70); font-weight: 300; }
.small { font-size: 13px; } .tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); letter-spacing: .3px; }
.block { display: block; } .right { text-align: right; } .right-auto { margin-left: auto; }
.center { text-align: center; justify-content: center; }
.card { background: rgba(30, 30, 30, .6); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 22px; margin-bottom: 18px; }
.card.flush { padding: 6px 8px; overflow-x: auto; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.card p + p { margin-top: 8px; }
.card .field + .field, .card .hours + .field { margin-top: 16px; }
.card .grid2 > .field + .field, .card .grid3 > .field + .field { margin-top: 0; }
.card .btn-row { margin-top: 14px; }

/* ── botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, .05);
  color: var(--accent); border: 1px solid rgba(255, 255, 255, .15); transition: all .25s; white-space: nowrap; text-align: center; }
.btn:hover:not(:disabled) { background: var(--accent); color: var(--smoky-black); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.on { background: var(--accent-soft); border-color: hsla(203, 88%, 47%, .5); color: var(--white-1); }
.btn.primary { background: linear-gradient(135deg, hsl(203, 88%, 52%), hsl(203, 88%, 40%)); color: #fff; border-color: transparent; box-shadow: 0 8px 22px hsla(203, 88%, 47%, .3); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, hsl(203, 88%, 58%), hsl(203, 88%, 44%)); color: #fff; }
.btn.danger { color: var(--danger); border-color: hsla(0, 43%, 51%, .4); }
.btn.danger:hover:not(:disabled) { background: var(--danger); color: var(--white-1); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 10px; }
.btn.left { margin-right: auto; }
.btn.rec { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.wide-btn { width: 100%; margin-top: 14px; padding: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; margin-top: 14px; }
.btn-row.center { justify-content: center; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--light-gray); transition: all .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--accent); }
.icon-btn.boxed { border: 1px solid var(--line-2); }
.link { color: var(--accent); font-weight: 600; font-size: 13px; }
.link:hover { color: var(--white-1); text-decoration: underline; }
@keyframes pulse { 50% { opacity: .65; } }

/* ── formularios ── */
.form { display: grid; gap: 14px; }
.field { display: block; }
.field-label { display: block; font-size: 13px; color: var(--light-gray-70); margin-bottom: 5px; }
.hint { display: block; color: var(--light-gray-70); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.input, select.input, textarea.input { width: 100%; font: inherit; color: var(--white-2); background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; transition: border-color .2s, box-shadow .2s; }
.input:hover:not(:disabled) { border-color: hsl(0, 0%, 32%); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px hsla(203, 88%, 47%, .18); }
.input:disabled { opacity: .55; cursor: not-allowed; }
.input::placeholder { color: var(--light-gray-70); opacity: .75; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.err { color: hsl(0, 70%, 70%); min-height: 20px; margin: 4px 0 10px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 9px; color: var(--light-gray); font-size: 14px; cursor: pointer; white-space: nowrap; }
input[type='checkbox'] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; cursor: pointer; display: inline-grid; place-content: center; background: rgba(0, 0, 0, .3);
  border: 1.5px solid hsl(0, 0%, 36%); border-radius: 5px; transition: background .15s, border-color .15s; }
input[type='checkbox']::after { content: ''; width: 10px; height: 10px; background: var(--smoky-black); transform: scale(0); transition: transform .12s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type='checkbox']:hover { border-color: var(--accent); }
input[type='checkbox']:checked { background: var(--accent); border-color: var(--accent); }
input[type='checkbox']:checked::after { transform: scale(1); }
.form-lead { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.info-rows { display: grid; }
.info-rows > div { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.info-rows > div:first-child { border-top: 0; }
.info-rows span { width: 110px; flex: none; color: var(--light-gray-70); font-size: 13.5px; }
.info-rows strong { font-weight: 600; color: var(--white-2); min-width: 0; overflow-wrap: anywhere; }
.sub-block { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.line:first-of-type { border-top: 0; }

/* ── modales y avisos ── */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: rgba(28, 28, 30, .97); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-5); animation: up .3s var(--ease) both; display: flex; flex-direction: column; }
.modal.wide { width: min(700px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px 10px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 8px 24px 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: rgba(28, 28, 30, .97); }
.confirm-text { font-size: 15.5px; line-height: 1.6; color: var(--white-2); }
.code { font-size: 26px; text-align: center; color: var(--white-1); background: rgba(0, 0, 0, .4); border: 1px dashed var(--accent); border-radius: 14px; padding: 18px; margin: 16px 0; user-select: all; overflow-wrap: anywhere; }
#toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 12px; background: rgba(30, 30, 30, .96); border: 1px solid var(--line-2); border-left: 3px solid var(--ok); color: var(--white-2); animation: up .3s both; max-width: 420px; box-shadow: var(--shadow-2); pointer-events: auto; transition: opacity .3s; }
.toast.error { border-left-color: var(--danger); }
.toast.out { opacity: 0; }

/* ── piezas comunes ── */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--light-gray-70); flex: none; }
.dot.neutral { background: hsl(0, 0%, 55%); } .dot.info { background: var(--accent); } .dot.warn { background: var(--warn); } .dot.ok { background: var(--ok); } .dot.done { background: hsl(0, 0%, 40%); } .dot.bad { background: var(--danger); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--light-gray); }
.status.sm { font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.status.critico { color: hsl(0, 70%, 72%); } .status.atencion { color: var(--warn); }
.plate { font-family: var(--mono); font-weight: 700; color: var(--white-1); letter-spacing: 1px; }
.plate.lg { font-size: 20px; } .plate.xl { font-size: 28px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; background: var(--onyx); color: var(--light-gray); }
.pill.atendida, .pill.confirmada { color: var(--ok); background: hsla(152, 62%, 44%, .14); }
.pill.cancelada { color: hsl(0, 70%, 72%); background: hsla(0, 43%, 51%, .16); }
.pill.pendiente { color: var(--warn); background: hsla(38, 90%, 55%, .14); }
.badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; }
.empty { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 30px 10px; color: var(--light-gray-70); }
.empty strong { color: var(--light-gray); font-weight: 600; }
.alert { padding: 14px 16px; border-radius: 14px; margin: 10px 0; }
.alert.bad { background: hsla(0, 43%, 51%, .13); border: 1px solid hsla(0, 43%, 51%, .4); }
.alert.bad strong { color: hsl(0, 70%, 72%); }
.alert p { font-size: 13.5px; margin-top: 6px; color: var(--light-gray); line-height: 1.5; }
.avatar { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--onyx); color: var(--light-gray); font-size: 12px; font-weight: 700; flex: none; border: 1px solid var(--line); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.avatar .badge { position: absolute; right: -4px; bottom: -4px; }

/* ── barra de herramientas, buscador, pestañas ── */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.toolbar.tight { margin: 12px 0; }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; padding: 0 14px; background: var(--field); border: 1px solid var(--line-2); border-radius: 12px; color: var(--light-gray-70); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px hsla(203, 88%, 47%, .18); }
.search-input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--white-2); font: inherit; padding: 11px 0; }
.search-input::placeholder { color: var(--light-gray-70); opacity: .75; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; background: var(--light-gray); opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.page > .search { margin-bottom: 4px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--light-gray); transition: all .2s; }
.seg-btn:hover { color: var(--white-1); }
.seg.equal { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg.equal .seg-btn { justify-content: center; }
.seg-btn.on { background: var(--white-2); color: var(--smoky-black); }
.seg-count { font-family: var(--mono); font-size: 11px; opacity: .7; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chipbtn.on { background: var(--white-2); color: var(--smoky-black); border-color: transparent; }

/* ── tablas por filas ── */
.thead, .trow { display: grid; align-items: center; gap: 14px; padding: 11px 12px; }
.thead { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--light-gray-70); border-bottom: 1px solid var(--line-2); padding-block: 8px; }
.trow { border-bottom: 1px solid var(--line); width: 100%; text-align: left; transition: background .2s; cursor: pointer; border-radius: 10px; }
.trow:hover:not(.static) { background: rgba(255, 255, 255, .04); }
.trow.static { cursor: default; }
.trow.off { opacity: .5; }
.dash-row { grid-template-columns: minmax(120px, 1fr) minmax(200px, 2fr) 170px 120px; }
.inv-row { grid-template-columns: minmax(200px, 2.4fr) 90px 80px 90px 120px minmax(120px, 1.2fr) 40px; }
.fc-row { grid-template-columns: minmax(200px, 2fr) minmax(120px, 1.2fr) 100px 80px 90px 110px; }
.urow { grid-template-columns: minmax(150px, 1.4fr) 130px 110px 120px minmax(240px, 2.2fr); }
.table { min-width: 640px; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 12px; font-size: 16px; color: var(--white-2); }
.total-row strong { font-size: 22px; }
.rows { display: grid; }

/* ── dashboard ── */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.dash-main, .dash-side, .agenda-main, .agenda-side, .diag-left, .diag-right, .detail, .list { min-width: 0; }
.scroll-x { overflow-x: auto; }
.kpi { min-width: 0; position: relative; padding: 18px 20px; border-radius: var(--r-md); background: var(--border-gradient-onyx); box-shadow: var(--shadow-2); z-index: 1; min-height: 130px; }
.kpi::before { content: ''; position: absolute; inset: 1px; background: var(--bg-gradient-jet); border-radius: inherit; z-index: -1; }
.kpi .big { color: var(--white-2); font-size: 32px; font-weight: 700; margin: 10px 0 4px; line-height: 1.1; }
.kpi .big small { font-size: 14px; font-weight: 400; color: var(--light-gray-70); }
.kpi .big.mono { font-size: 28px; }
.big.bad { color: hsl(0, 70%, 70%); }
.gauge { position: relative; width: min(190px, 100%); margin: 6px auto 0; }
.gauge-svg { width: 100%; display: block; }
.g-track, .g-fill { fill: none; stroke-width: 14; stroke-linecap: round; }
.g-track { stroke: var(--jet); } .g-fill { stroke: var(--accent); transition: stroke-dasharray .8s var(--ease); }
.gauge-num { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; display: grid; line-height: 1.1; }
.gauge-num strong { font-size: 32px; color: var(--white-2); } .gauge-num span { font-size: 11.5px; color: var(--light-gray-70); }
.range { margin-top: 14px; }
.range-bar { display: block; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--jet)); }
.range-lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--light-gray-70); margin-top: 6px; }
.side-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 20px 0 8px; }
.dash-side .side-head:first-child { margin-top: 0; }
.dash-side section + section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.appt-mini { display: flex; gap: 14px; align-items: center; width: 100%; padding: 11px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .2s; }
.appt-mini:hover { background: rgba(255, 255, 255, .04); }
.appt-mini .time { color: var(--light-gray); font-size: 13.5px; }
.aviso { display: grid; gap: 2px; padding: 12px 6px; border-bottom: 1px solid var(--line); transition: background .2s; border-radius: 8px; }
.aviso:hover { background: rgba(255, 255, 255, .04); }
.aviso strong { color: var(--white-2); font-weight: 600; font-size: 14px; }

/* ── tablero de reparaciones ── */
.board.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board.closed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.col { border-radius: var(--r-md); padding: 4px; transition: background .2s, outline-color .2s; outline: 2px dashed transparent; }
.col.over { background: var(--accent-soft); outline-color: hsla(203, 88%, 47%, .5); }
.col-head { display: flex; align-items: center; gap: 10px; padding: 10px 6px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
.col-head h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--light-gray); font-weight: 700; }
.col-body { display: grid; gap: 10px; min-height: 80px; }
.col-empty { padding: 22px 10px; text-align: center; color: var(--light-gray-70); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 12px; }
.rcard { display: grid; gap: 8px; width: 100%; padding: 13px 14px; border-radius: 12px; background: rgba(30, 30, 30, .7); border: 1px solid var(--line); border-left: 3px solid var(--light-gray-70); transition: transform .2s, border-color .2s, box-shadow .2s; }
.rcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.rcard.info { border-left-color: var(--accent); } .rcard.warn { border-left-color: var(--warn); } .rcard.ok { border-left-color: var(--ok); } .rcard.neutral { border-left-color: hsl(0, 0%, 55%); } .rcard.done { border-left-color: hsl(0, 0%, 35%); opacity: .8; }
.rcard.drag { opacity: .4; }
.rcard[draggable='true'] { cursor: grab; }
.rcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rcard-desc { color: var(--white-2); font-size: 14.5px; line-height: 1.35; }
.rcard-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rcard .chip { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* ── taller (espacios) ── */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding: 16px; border-radius: var(--r-lg); background: rgba(0, 0, 0, .25); border: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; margin-top: 12px; }
.ws { display: flex; flex-direction: column; min-height: 250px; border-radius: 14px; background: rgba(24, 24, 26, .88); border: 1px solid var(--line-2); overflow: hidden; transition: border-color .2s, transform .2s; }
.ws:hover { transform: translateY(-2px); }
.ws.busy.info { border-color: hsla(203, 88%, 47%, .55); } .ws.busy.warn { border-color: hsla(38, 90%, 55%, .55); } .ws.busy.ok { border-color: hsla(152, 62%, 44%, .55); } .ws.busy.neutral { border-color: var(--line-2); }
.ws header { display: flex; align-items: center; gap: 10px; padding: 10px 10px 4px 12px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--light-gray); }
.ws header strong { font-weight: 700; flex: 1; min-width: 0; line-height: 1.2; }
.ws-kind { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--onyx); color: var(--light-gray); }
.ws-kind .ico { font-size: 14px; }
.ws-tools { display: flex; }
.ws-tools .icon-btn { width: 28px; height: 28px; }
.ws-car, .ws-free { flex: 1; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 6px 12px 14px; text-align: center; width: 100%; }
.ws-car:hover .car-svg { transform: scale(1.04); }
.car-svg { width: 62px; height: 110px; transition: transform .25s var(--ease); }
.car-body { fill: var(--accent-bold); stroke: var(--accent); stroke-width: 2; } .car-glass { fill: hsla(203, 88%, 85%, .8); } .car-glass2 { fill: hsla(203, 88%, 70%, .55); } .car-wheel { fill: hsl(0, 0%, 12%); }
.ws.busy.warn .car-body { fill: hsl(32, 70%, 36%); stroke: var(--warn); } .ws.busy.ok .car-body { fill: hsl(152, 50%, 30%); stroke: var(--ok); } .ws.busy.neutral .car-body { fill: hsl(0, 0%, 36%); stroke: hsl(0, 0%, 60%); }
.ws-free { color: var(--light-gray-70); }
.ws-plus { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px dashed var(--line-2); border-radius: 50%; transition: all .2s; }
.ws-free:hover .ws-plus { border-color: var(--accent); color: var(--accent); }

/* ── agenda ── */
.agenda { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.cal-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: rgba(24, 24, 26, .6); }
.cal-day { min-height: 330px; border-left: 1px solid var(--line); cursor: pointer; transition: background .2s; padding-bottom: 8px; }
.cal-day:first-child { border-left: 0; }
.cal.month .cal-day { min-height: 118px; border-top: 1px solid var(--line); }
.cal.month .cal-day:nth-child(-n+7) { border-top: 0; }
.cal.month .cal-day:nth-child(7n+1) { border-left: 0; }
.cal-day:hover { background: rgba(255, 255, 255, .025); }
.cal-day.dim { opacity: .45; }
.cal-day header { display: flex; gap: 8px; align-items: baseline; justify-content: center; padding: 10px 6px; border-bottom: 1px solid var(--line); border-top: 2px solid transparent; }
.cal.month .cal-day header { justify-content: flex-start; border-bottom: 0; padding: 6px 8px 2px; }
.cal-day header strong { color: var(--white-2); font-size: 15px; }
.cal-day.today header { border-top-color: var(--accent); }
.cal-day.today header strong { color: var(--accent); }
.cal-day.sel { background: var(--accent-soft); }
.cal-list { display: grid; gap: 6px; padding: 8px 6px; align-content: start; }
.ap { display: grid; gap: 1px; width: 100%; padding: 6px 8px; border-radius: 8px; border-left: 3px solid var(--accent); background: hsla(203, 88%, 47%, .12); font-size: 12px; line-height: 1.3; color: var(--white-2); transition: background .2s; }
.ap:hover { background: hsla(203, 88%, 47%, .24); }
.ap.done { border-left-color: var(--ok); background: hsla(152, 62%, 44%, .1); }
.ap.cancel { border-left-color: var(--danger); background: hsla(0, 43%, 51%, .1); text-decoration: line-through; opacity: .6; }
.cal.month .ap { grid-auto-flow: column; justify-content: start; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 6px; }
.agenda-side .side-head { margin-top: 0; }
.appt-card { display: flex; gap: 14px; align-items: center; width: 100%; padding: 14px; margin-bottom: 10px; border-radius: 12px; background: rgba(30, 30, 30, .7); border: 1px solid var(--line); border-left: 3px solid var(--accent); transition: all .2s; }
.appt-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.appt-card .time { display: grid; font-size: 17px; color: var(--white-1); font-weight: 600; min-width: 52px; }
.appt-card .time small { font-size: 12px; color: var(--light-gray-70); font-weight: 400; }

/* ── listas con ficha (vehículos y clientes) ── */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 14px; }
.split.has-sel { grid-template-columns: 340px minmax(0, 1fr); }
.list { display: grid; align-content: start; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 6px; }
.split:not(.has-sel) .list { max-height: none; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border-bottom: 1px solid var(--line); border-radius: 10px; transition: background .2s; border-left: 3px solid transparent; }
.lrow:hover { background: rgba(255, 255, 255, .04); }
.lrow.on { background: var(--accent-soft); border-left-color: var(--accent); }
.split.has-sel .lrow > :last-child:not(.grow) { display: none; }
.detail { display: none; padding: 4px 4px 40px; }
.has-sel .detail { display: block; }
.back-btn { display: none; margin-bottom: 14px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rline { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .2s; }
.rline:hover { background: rgba(255, 255, 255, .04); }
.rline.done strong { color: var(--light-gray-70); font-weight: 500; }
.detail .btn-row { margin: 16px 0; }

/* ── diagnóstico ── */
.diag { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.diag-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.diag-right { display: flex; flex-direction: column; min-height: 520px; border-left: 1px solid var(--line); padding-left: 28px; }
.chat-title { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.acc { border-top: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; gap: 10px; padding: 14px 4px; cursor: pointer; list-style: none; font-weight: 600; color: var(--white-2); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary span:first-child { flex: 1; }
.acc summary .ico { transition: transform .2s; }
.acc[open] summary .ico { transform: rotate(180deg); }
.acc-body { padding: 0 4px 14px; }

/* ── chat ── */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.chat-log .empty.center { margin: auto; max-width: 440px; }
.bubble { display: flex; } .bubble.user { justify-content: flex-end; }
.bubble-txt { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--white-2); }
.bubble.user .bubble-txt { background: hsla(203, 88%, 47%, .2); }
.bubble-txt.typing { color: var(--light-gray-70); animation: pulse 1.2s infinite; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.chat-bar { display: flex; gap: 10px; align-items: flex-end; padding: 10px; background: var(--field); border: 1px solid var(--line-2); border-radius: 14px; }
.chat-bar:focus-within { border-color: var(--accent); }
.chat-input { flex: 1; background: none; border: 0; outline: none; resize: none; color: var(--white-2); font: inherit; max-height: 140px; padding: 6px 4px; }
.chat-input::placeholder { color: var(--light-gray-70); }
.drawer-back { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); animation: fade .2s both; }
.drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); z-index: 56; display: flex; flex-direction: column; padding: 20px; background: rgba(24, 24, 26, .96); animation: slide .3s var(--ease) both; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ── horario, usuarios, auditoría ── */
.hours { display: grid; gap: 8px; margin-bottom: 16px; }
.hours-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; }
.hours-row span { color: var(--light-gray); font-weight: 600; }
.newuser { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 150px auto; gap: 12px; margin-top: 10px; }
.audit { margin-top: 6px; }
.arow { display: flex; gap: 14px; align-items: flex-start; padding: 12px 6px; border-top: 1px solid var(--line); }
.arow > .mono { min-width: 46px; padding-top: 5px; }
.arow.fail { background: hsla(0, 43%, 51%, .06); }
.arow strong { color: var(--white-2); }
.arow-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.arow-meta .chip { font-size: 11px; border: 1px solid var(--line); }

/* ── acceso ── */
html:has(body.login-page), body.login-page { height: 100%; overflow: hidden; }
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .box { width: min(420px, 100%); padding: 32px 30px 24px; text-align: center; max-height: 100%; overflow: auto; }
.login .logo { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; animation: bob 3.6s ease-in-out infinite; box-shadow: 0 10px 34px hsla(203, 88%, 47%, .55); }
.login .logo .ico { font-size: 30px; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.login h1 { font-size: 26px; margin-bottom: 4px; }
.login .sub { margin: 4px auto 20px; font-size: 14px; }
.login form { text-align: left; }
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; color: var(--light-gray-70); margin-bottom: 5px; }
.login-field { position: relative; display: block; }
.login-field > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--light-gray-70); pointer-events: none; }
.login-field .input { padding: 11px 52px 11px 40px; border-radius: 12px; font-size: 15px; }
.login-field .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 6px 10px; color: var(--light-gray); border-radius: 8px; font-size: 12px; font-weight: 600; }
.login-field .eye:hover { color: var(--white-1); }
.login .btn.primary { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.login .foot { margin-top: 18px; font-size: 12px; color: var(--light-gray-70); }

/* ── adaptable ── */
@media (max-width: 1200px) {
  .dash-grid, .agenda { grid-template-columns: 1fr; }
  .diag { grid-template-columns: minmax(0, 1fr); } .diag-right { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .board.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newuser { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; position: sticky; top: 8px; z-index: 30; }
  .mobile-bar b { font-size: 17px; color: var(--white-2); }
  .side { position: fixed; left: 12px; top: 12px; bottom: 12px; width: min(290px, 86vw); height: auto; z-index: 60; transform: translateX(-120%); transition: transform .3s var(--ease); background: rgba(24, 24, 26, .98); }
  .side.open { transform: none; }
  .kpis, .kpis.four { grid-template-columns: 1fr 1fr; }
  .split.has-sel { grid-template-columns: 1fr; }
  .split.has-sel .list { display: none; } .back-btn { display: inline-flex; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .dash-row, .inv-row, .fc-row, .urow { gap: 10px; }
  .page-head h1 { font-size: 26px; }
  #toasts { left: 12px; right: 12px; justify-items: stretch; }
}
@media (max-width: 640px) {
  .thead.dash-row { display: none; }
  .trow.dash-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .trow.dash-row > :nth-child(3), .trow.dash-row > :nth-child(2) { grid-column: 1 / -1; }
  .trow.dash-row > :nth-child(4) { grid-row: 1; grid-column: 2; }
  .board.cols, .kpis, .kpis.four, .grid2, .grid3, .newuser { grid-template-columns: 1fr; }
  .cal.week { grid-template-columns: 1fr; } .cal.week .cal-day { min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .cal.month .cal-day { min-height: 70px; } .cal.month .ap span:last-child { display: none; }
  .hours-row { grid-template-columns: 90px 1fr; }
  .card.flush { padding: 4px; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 16px; }
  .info-rows span { width: 90px; }
  .drawer { top: 8px; right: 8px; bottom: 8px; left: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .login .logo, .btn.rec, .bubble-txt.typing, .page, .modal, .drawer { animation: none !important; } *, *::before, *::after { transition: none !important; } }

/* ── fila de campos: etiquetas en una línea y ayuda debajo, así los inputs quedan a la misma altura ── */
.grid2 > .field, .grid3 > .field { min-width: 0; }
.grid2 .field-label, .grid3 .field-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.grid2 .hint, .grid3 .hint { min-height: 0; }
.tsel:has(> select.compact) { display: inline-block; width: auto; min-width: 190px; }

/* ── desplegable temático (themed.js) ── */
.tsel { position: relative; display: block; width: 100%; }
td .tsel, .filters .tsel, .bar .tsel, .row .tsel, .toolbar .tsel, .tsel.compact { display: inline-block; width: auto; min-width: 170px; }
.tsel-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.tsel-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--white-2); background: var(--field); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.tsel-btn:hover, .tsel-btn[aria-expanded='true'] { border-color: var(--accent); }
.tsel-btn[aria-expanded='true'], .tsel-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px hsla(203, 88%, 47%, .18); }
.tsel-btn:disabled { opacity: .55; cursor: not-allowed; }
.tsel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsel-btn i { font-size: 12px; transition: transform .2s; }
.tsel-btn[aria-expanded='true'] i { transform: rotate(180deg); color: var(--accent); }
.tsel-list { position: fixed; z-index: 1000; min-width: 160px; overflow-y: auto; margin: 0; list-style: none; padding: 5px; background: hsl(240, 2%, 14%); border: 1px solid var(--jet); border-radius: 12px; box-shadow: 0 16px 30px hsla(0, 0%, 0%, .45); animation: tpop .12s ease; }
.tsel-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--light-gray); font-size: 14px; }
.tsel-list li.active { background: hsla(203, 88%, 47%, .16); color: var(--white-1); }
.tsel-list li[aria-selected='true'] { color: var(--accent); }
.tsel-list li.dis { opacity: .4; cursor: not-allowed; }
@keyframes tpop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── taller: barra de pestañas + modo, y vista en vivo ── */
.ws-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ws-mode { margin-left: auto; }
.live { container-type: inline-size; margin-top: 12px; border-radius: var(--r-lg); background: radial-gradient(ellipse at 50% 0%, hsla(203, 88%, 47%, .09), transparent 60%), rgba(14, 16, 21, .88); border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.live-stage { position: relative; margin: 0 auto; --dx: 312px; --dy: 180px; --lift: 34px; --wx: 29px; --wy: 17px; }
.live-svg { display: block; width: 100%; height: auto; }
.live-note { color: var(--light-gray); font-size: 13px; margin-top: 10px; }
.car-slot.has-car { cursor: pointer; } .car-slot.has-car:hover { filter: drop-shadow(0 0 7px hsla(203, 88%, 47%, .7)); }
.live-tag { position: absolute; transform: translate(-50%, -100%); display: grid; gap: 1px; justify-items: center; min-width: 6.4em; padding: .45em .8em .5em; border-radius: .6em; text-align: center; cursor: pointer;
  font-size: clamp(8px, 1.05cqw, 14px); color: var(--light-gray); background: rgba(20, 22, 28, .92); border: 1.5px dashed rgba(255, 255, 255, .4); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); transition: transform .2s, box-shadow .2s, border-color .2s; }
.live-tag:hover { transform: translate(-50%, -104%); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .55), 0 0 0 3px hsla(203, 88%, 47%, .15); }
.live-tag .lt-name { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85em; color: var(--light-gray-70); white-space: nowrap; }
.live-tag .lt-free { font-weight: 800; letter-spacing: .14em; font-size: 1.1em; color: var(--light-gray); }
.live-tag.busy { border-style: solid; border-color: rgba(255, 255, 255, .3); }
.live-tag .lt-plate { font-family: var(--mono); font-weight: 800; font-size: 1.2em; color: var(--white-1); letter-spacing: .04em; white-space: nowrap; }
.live-tag .lt-status { display: inline-flex; align-items: center; gap: .5em; font-size: .85em; color: var(--light-gray); white-space: nowrap; }
.live-tag .lt-status i { font-size: .8em; }
.live-tag.free { background: rgba(20, 22, 28, .8); }

.car-in { animation: carIn 1s cubic-bezier(.2, .7, .3, 1) both; }
.car-out { animation: carOut .95s cubic-bezier(.6, 0, .8, .4) both; }
@keyframes carIn { 0% { transform: translate(var(--dx), var(--dy)); opacity: 0; } 35% { opacity: 1; } 100% { transform: translate(0, 0); opacity: 1; } }
@keyframes carOut { 0% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.lift { transition: transform .7s ease; } .lift.raised { transform: translateY(calc(var(--lift) * -1)); }
.worker.fade-in { animation: wfade .5s 1.1s both; }
@keyframes wfade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .car-in, .car-out, .worker.fade-in { animation-duration: .01s !important; animation-delay: 0s !important; } .lift { transition: none; } }
[hidden]{display:none!important}
.tsel-list li i { color: var(--accent); font-size: 12px; }
.live-tag .lt-status i { color: var(--accent); }

/* operarios trabajando */
.arm { transform-box: fill-box; transform-origin: 0 0; animation: armSwing .55s ease-in-out infinite alternate; }
@keyframes armSwing { from { transform: rotate(-45deg); } to { transform: rotate(32deg); } }
.bob { animation: workBob .6s ease-in-out infinite alternate; }
@keyframes workBob { from { transform: translateY(0); } to { transform: translateY(-1.8px); } }
.walk { animation: walkAlong 9s ease-in-out infinite; }
@keyframes walkAlong { 0%, 8% { transform: translate(calc(var(--wx) * -1), calc(var(--wy) * -1)); } 42%, 58% { transform: translate(var(--wx), var(--wy)); } 92%, 100% { transform: translate(calc(var(--wx) * -1), calc(var(--wy) * -1)); } }
.peek { animation: peek 3.2s ease-in-out infinite; }
@keyframes peek { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.fx.puff { animation: puff 1s ease-out infinite; } .fx.drop { animation: drop .7s ease-in infinite; }
@keyframes puff { from { opacity: .7; transform: translateX(0); } to { opacity: 0; transform: translateX(10px); } }
@keyframes drop { from { opacity: 1; transform: translateY(-3px); } to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .arm, .bob, .walk, .peek, .fx { animation: none !important; } }

/* números sin las flechitas del navegador */
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-outer-spin-button, input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* selector de fecha y hora (datepicker.js) */
.dsel .tsel-btn .tsel-label.empty { color: var(--light-gray-70); }
.dsel .tsel-btn i { font-size: 14px; color: var(--accent); }
.dpop { position: fixed; z-index: 1000; display: flex; flex-wrap: wrap; gap: 12px; width: max-content; max-width: calc(100vw - 16px); padding: 12px; background: hsl(240, 2%, 14%); border: 1px solid var(--jet); border-radius: 14px; box-shadow: 0 16px 30px hsla(0, 0%, 0%, .45); animation: tpop .12s ease; color: var(--light-gray); user-select: none; }
.dp-cal { width: 252px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-weight: 700; color: var(--white-1); text-transform: capitalize; }
.dp-nav { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--light-gray); }
.dp-nav:hover { background: hsla(203, 88%, 47%, .16); color: var(--accent); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-grid .dow { font-size: 11px; color: var(--light-gray-70); padding: 4px 0; text-transform: uppercase; }
.dp-day { height: 32px; border-radius: 8px; font-size: 13.5px; color: var(--light-gray); }
.dp-day:hover { background: hsla(203, 88%, 47%, .16); color: var(--white-1); }
.dp-day.other { color: var(--light-gray-70); opacity: .5; }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.dp-day.on { background: var(--accent); color: #fff; font-weight: 700; opacity: 1; }
.dp-time { display: flex; gap: 6px; }
.dp-col { display: flex; flex-direction: column; gap: 2px; width: 54px; max-height: 268px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.dp-col .dp-t { height: 30px; flex: none; border-radius: 8px; font-size: 13.5px; color: var(--light-gray); font-family: var(--mono); }
.dp-col .dp-t:hover { background: hsla(203, 88%, 47%, .16); color: var(--white-1); }
.dp-col .dp-t.on { background: var(--accent); color: #fff; font-weight: 700; }
.dp-foot { flex-basis: 100%; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.dp-foot button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.dp-foot button:hover { background: hsla(203, 88%, 47%, .16); }

/* logo de ByteFix */
.logo { background: none !important; box-shadow: none !important; border-radius: 50%; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.brand .logo { width: 48px; height: 48px; filter: drop-shadow(0 0 10px hsla(203, 88%, 47%, .45)); }
.mobile-bar { gap: 10px; } .logo.sm { width: 30px; height: 30px; }
.login .logo { width: 128px; height: 128px; margin: 0 auto 10px; border-radius: 50%; filter: drop-shadow(0 0 26px hsla(203, 88%, 47%, .6)); }

/* acceso */
.login-field .eye { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; font-size: 15px; }
.login-field .eye:hover { background: hsla(203, 88%, 47%, .14); color: var(--accent); }
.login .btn.login-btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; margin-top: 8px; padding: 0 18px; border-radius: 14px; font-size: 16px; font-weight: 700; letter-spacing: .04em; color: #fff;
  background: linear-gradient(135deg, hsl(203, 92%, 58%), hsl(212, 88%, 42%)); border: 1px solid hsla(203, 100%, 78%, .45); box-shadow: 0 10px 28px hsla(203, 88%, 47%, .45), inset 0 1px 0 hsla(0, 0%, 100%, .35); transition: transform .2s, box-shadow .2s, filter .2s; }
.login .btn.login-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, hsla(0, 0%, 100%, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.login .btn.login-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 36px hsla(203, 88%, 47%, .6), inset 0 1px 0 hsla(0, 0%, 100%, .4); filter: brightness(1.06); }
.login .btn.login-btn:hover:not(:disabled)::after { transform: translateX(120%); }
.login .btn.login-btn:active:not(:disabled) { transform: translateY(0); }
.login .btn.login-btn .ico { font-size: 17px; transition: transform .25s; --fa-secondary-opacity: .55; }
.login .btn.login-btn:hover:not(:disabled) .ico { transform: translateX(4px); }
.login .btn.login-btn:disabled { opacity: .7; cursor: progress; }

/* mantenimientos, acceso al portal y solicitudes */
.maint { margin-top: 6px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mrow:first-of-type { border-top: 0; }
.chip.m-vencido { color: hsl(0, 78%, 72%); background: hsla(0, 70%, 50%, .15); } .chip.m-pronto { color: var(--warn); background: hsla(38, 90%, 55%, .14); }
.chip.m-ok { color: hsl(152, 62%, 62%); background: hsla(152, 62%, 44%, .14); } .chip.m-sin_datos { color: var(--light-gray-70); }
.portal-box .copy-row { display: flex; gap: 8px; margin: 8px 0 12px; } .portal-box .copy-row .input { flex: 1; min-width: 0; font-size: 13px; }
.lead { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lead.done { opacity: .55; } .lead-msg { margin: 6px 0; color: var(--light-gray); line-height: 1.5; white-space: pre-wrap; }

/* v2: calendario sin hueco negro (el pie ocupaba una columna extra) + animación de apertura */
@keyframes tpop-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
.tsel-list, .dpop { transform-origin: top center; animation: tpop-in .18s cubic-bezier(.2, .7, .2, 1) both; }
.dpop { display: grid; grid-template-columns: max-content; width: fit-content; gap: 12px 14px; max-width: calc(100vw - 16px); }
.dpop:has(.dp-time):not(.only-time) { grid-template-columns: max-content max-content; }
.dpop .dp-foot { grid-column: 1 / -1; flex-basis: auto; }
.dpop.only-time { display: flex; width: fit-content; }
.dp-cal { width: 272px; max-width: calc(100vw - 42px); }
@media (max-width: 420px) { .dpop:has(.dp-time):not(.only-time) { grid-template-columns: max-content; } .dpop { max-height: calc(100vh - 16px); overflow-y: auto; } }
@media (prefers-reduced-motion: reduce) { .tsel-list, .dpop { animation: none; } }

/* v3: iconos blancos sobre fondos azules (antes azul sobre azul = invisible) */
.btn.primary .fa-duotone, .btn-pub .fa-duotone, .logo .fa-duotone, .login-btn .fa-duotone,
.btn.primary i, .btn-pub i, .logo i, .login-btn i { --fa-primary-color: #fff; --fa-secondary-color: #fff; --fa-secondary-opacity: .7; color: #fff; }
.btn.ghost .fa-duotone, .btn.sm:not(.primary) .fa-duotone { --fa-primary-color: var(--accent); --fa-secondary-color: var(--accent); }
.btn:not(.primary):not(.btn-pub):not(.wa):hover:not(:disabled) .fa-duotone { --fa-primary-color: var(--smoky-black); --fa-secondary-color: var(--smoky-black); }
