/* Alfa Car — pensado para el móvil, con manos sucias o guantes */
:root {
  --bg: #eef1f4; --card: #ffffff; --text: #18202a; --muted: #5d6875; --line: #d5dbe2;
  --primary: #c8102e; --primary-text: #fff; --top: #1b2430; --top-text: #fff;
  --btn: #e3e8ee; --btn-text: #18202a;
  --ok: #1e7d3a; --ok-bg: #e2f4e7; --warn: #8a5a00; --warn-bg: #fff3d6; --danger: #b3261e; --danger-bg: #fde4e1;
  --info-bg: #e3eefc; --plate-bg: #fff; --plate-border: #1b2430; --plate-strip: #1f4fbf;
  --radius: 14px; --tap: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --card: #1a222c; --text: #e9eef4; --muted: #9aa7b5; --line: #2c3743;
    --top: #0a0e13; --btn: #2a3542; --btn-text: #e9eef4;
    --ok-bg: #143322; --ok: #7fdc9a; --warn-bg: #3a2c0b; --warn: #ffd27a; --danger-bg: #3d1614; --danger: #ff8a80;
    --info-bg: #15273f; --plate-bg: #f3f3f3; --plate-border: #000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --card: #1a222c; --text: #e9eef4; --muted: #9aa7b5; --line: #2c3743;
  --top: #0a0e13; --btn: #2a3542; --btn-text: #e9eef4;
  --ok-bg: #143322; --ok: #7fdc9a; --warn-bg: #3a2c0b; --warn: #ffd27a; --danger-bg: #3d1614; --danger: #ff8a80;
  --info-bg: #15273f; --plate-bg: #f3f3f3; --plate-border: #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1 { font-size: 1.5rem; margin: .4rem 0 .8rem; }
h2 { font-size: 1.2rem; margin: 0 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .3rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

/* Cabecera fija con buscador */
.top { position: sticky; top: 0; z-index: 20; background: var(--top); color: var(--top-text); padding: 8px 12px 0; padding-top: max(8px, env(safe-area-inset-top)); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.top-row { display: flex; gap: 10px; align-items: center; max-width: 960px; margin: 0 auto; }
.logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; white-space: nowrap; letter-spacing: .5px; }
.logo::before { content: "▲"; color: var(--primary); margin-right: 4px; }
.search { flex: 1; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; height: 50px; border: 0; border-radius: 12px 0 0 12px; padding: 0 14px; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: #fff; color: #111; }
.search input::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.search button { width: 58px; height: 50px; border: 0; border-radius: 0 12px 12px 0; background: var(--primary); color: #fff; font-size: 1.3rem; }
.nav { display: flex; gap: 4px; overflow-x: auto; max-width: 960px; margin: 6px auto 0; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; padding: 10px 12px; text-decoration: none; font-size: .95rem; white-space: nowrap; border-radius: 10px 10px 0 0; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.1); }

.wrap { max-width: 960px; margin: 0 auto; padding: 12px 12px 80px; }
.hello { color: var(--muted); margin-bottom: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px; border-radius: 12px; border: 2px solid transparent; background: var(--btn); color: var(--btn-text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-big { min-height: 68px; font-size: 1.1rem; width: 100%; }
.btn-huge { min-height: 88px; font-size: 1.4rem; width: 100%; }
.btn-small { min-height: 44px; padding: 6px 12px; font-size: .95rem; }
.btn-go { background: #1e8e3e; color: #fff; }
.btn-warn { background: #f2a900; color: #111; }
.btn-stop { background: #b3261e; color: #fff; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-wa { background: #25d366; color: #0b2e17; }
.link-danger { background: none; border: 0; color: var(--danger); font: inherit; font-size: .85rem; padding: 6px 0; cursor: pointer; text-decoration: underline; }
form.inline { display: contents; }
.grid-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.grid-buttons.two { grid-template-columns: 1fr 1fr; }
.grid-buttons.three { grid-template-columns: repeat(3, 1fr); }
.grid-buttons > form:not(.inline) { margin: 0; }
.grid-buttons .btn { width: 100%; }
.btn-foto { width: 100%; }
.foto-form { margin: 0; }
.foto-form.btn-big .btn { min-height: 68px; font-size: 1.1rem; }
.foto-form.uploading .btn { opacity: .6; pointer-events: none; }

/* Formularios */
.form label { display: block; margin: 10px 0; font-weight: 600; font-size: .95rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filter, .inline-search input {
  display: block; width: 100%; margin-top: 4px; min-height: 52px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); }
.form .check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.form .check input { width: 28px; height: 28px; flex: 0 0 auto; }
.big-check { background: var(--bg); padding: 10px; border-radius: 10px; }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 8px; margin: 12px 0; }
.form legend { font-weight: 700; padding: 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.quick { display: flex; gap: 8px; margin: 10px 0; }
.input-plate { text-transform: uppercase; font-weight: 800 !important; letter-spacing: 2px; font-size: 1.3rem !important; }
.inline-search { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.inline-search input { margin: 0; }
.inline-form label { margin: 0; }
.filter { margin: 12px 0; }
.radio-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.radio-btn { display: flex !important; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; margin: 0 !important; cursor: pointer; }
.radio-btn input { width: 24px; height: 24px; }
.radio-btn:has(input:checked) { border-color: var(--text); background: var(--bg); }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; min-height: 64px; text-decoration: none; }
.item:active { background: var(--bg); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-main small, .item-col small { color: var(--muted); }
.item-col { flex-direction: column; align-items: flex-start; gap: 2px; }
.item-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-title { font-weight: 600; }
.item-alert { border-left: 4px solid var(--danger); padding-left: 10px; }
.plain { padding-left: 1.2rem; }
.block-link { display: block; text-decoration: none; font-weight: 700; }

/* Matrícula con aspecto de placa */
.plate { display: inline-block; flex: 0 0 auto; background: var(--plate-bg); color: #111; border: 2px solid var(--plate-border); border-left: 10px solid var(--plate-strip); border-radius: 6px; padding: 2px 8px; font-weight: 800; letter-spacing: 1.5px; font-family: ui-monospace, Menlo, Consolas, monospace; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.plate-big { font-size: 1.6rem; padding: 6px 14px; }
.car-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.car-head h1 { margin: 0; }
@media (max-width: 560px) { .car-head { grid-template-columns: 1fr auto; } .car-head > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }

/* Etiquetas */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--btn); color: var(--btn-text); white-space: nowrap; }
.est-pendiente { background: #e4e7eb; color: #333; }
.est-en_curso { background: #cfe3ff; color: #0b3c86; }
.est-esperando_pieza { background: #ffe7b3; color: #6b4500; }
.est-listo { background: #c9f0d4; color: #0f5a26; }
.est-entregado { background: #e9e2f7; color: #4a2d86; }
.urg-urgente { background: #ffd5d1; color: #8f1d15; }
.urg-proxima { background: #ffe7b3; color: #6b4500; }
.urg-vigilar { background: #d9ecff; color: #0b3c86; }
.av-pendiente { background: #ffd5d1; color: #8f1d15; }
.av-avisado { background: #ffe7b3; color: #6b4500; }
.av-aceptado { background: #cfe3ff; color: #0b3c86; }
.av-rechazado { background: #e4e7eb; color: #333; }
.av-resuelto { background: #c9f0d4; color: #0f5a26; }

/* Avisos de la página */
.flash { padding: 12px 14px; border-radius: 12px; margin: 10px 0; font-weight: 600; }
.flash ul { margin: 6px 0 0; padding-left: 1.2rem; font-weight: 400; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-info { background: var(--info-bg); }

/* Cronómetro */
.timer-card { text-align: center; }
.timer-card.running { border-color: #1e8e3e; box-shadow: 0 0 0 3px rgba(30,142,62,.25); }
.timer-card.paused { border-color: #f2a900; box-shadow: 0 0 0 3px rgba(242,169,0,.25); }
.timer { font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-sub { color: var(--muted); }
.timer-card .form { text-align: left; }
details { margin-top: 10px; text-align: left; }
summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 44px; }

/* Fotos */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--bg); }
.gallery figcaption { font-size: .75rem; color: var(--muted); }

.details dt { font-weight: 700; color: var(--muted); font-size: .85rem; margin-top: 10px; }
.details dd { margin: 2px 0 0; }
.calc { border-top: 1px solid var(--line); padding: 10px 0; }
.extra { border-top: 1px solid var(--line); padding: 10px 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.tabs a { padding: 10px 14px; border-radius: 999px; background: var(--btn); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.tabs a.active { background: var(--text); color: var(--bg); }
.rev-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rev-vencida { border-left: 6px solid var(--danger); }
.rev-hecha { opacity: .7; }
blockquote { margin: 0; padding: 12px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 8px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }

.login { max-width: 420px; margin: 8vh auto; }
.login h1 { font-size: 2rem; }
.login h1::before { content: "▲ "; color: var(--primary); }

@media (max-width: 420px) {
  body { font-size: 17px; }
  .logo { font-size: 0; } .logo::before { font-size: 1.6rem; margin: 0; }
  .grid-buttons.three { grid-template-columns: 1fr 1fr 1fr; }
  .grid-buttons.three .btn { padding: 8px 4px; font-size: .95rem; }
  .row2 { grid-template-columns: 1fr; }
  .timer { font-size: 2.3rem; }
}
@media print { .top, .btn, form { display: none !important; } body { background: #fff; } .card { border: 0; } }

/* ===== Modo taller (sencillo): manos sucias, móvil ===== */
.bottombar { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip { min-height: 48px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; }
.chip:active { background: var(--btn); }
.stack { display: grid; gap: 14px; margin: 14px 0; }
.section-title { margin: 22px 4px 10px; }
.big-card { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 14px 16px; margin: 12px 0; background: var(--card); border: 2px solid var(--line); border-radius: 18px; text-decoration: none; }
.big-card:active { background: var(--btn); }
.big-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 1.15rem; font-weight: 700; }
.big-card-main small { font-weight: 400; color: var(--muted); font-size: .9rem; }
.job-link { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.job-title { font-size: 1.25rem; font-weight: 700; }
.input-huge { min-height: 76px !important; font-size: 2rem !important; text-align: center; }
details.more { margin: 12px 0; }
details.more > summary { background: var(--btn); border-radius: 12px; padding: 14px 16px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }
.more-big > summary { min-height: 72px; display: flex; align-items: center; font-size: 1.1rem; }

body.simple { font-size: 20px; padding-bottom: 96px; }
body.simple .wrap { padding: 14px 14px 110px; }
body.simple .top { padding-bottom: 8px; }
body.simple .home-btn { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 1.7rem; text-decoration: none; flex: 0 0 auto; }
body.simple .search input { height: 58px; font-size: 1.5rem; }
body.simple .search button { height: 58px; width: 66px; }
body.simple .btn { min-height: 72px; font-size: 1.15rem; border-radius: 16px; }
body.simple .btn-huge { min-height: 100px; font-size: 1.5rem; }
body.simple .btn-small { min-height: 60px; }
body.simple .grid-buttons { gap: 14px; }
body.simple .grid-buttons.two { grid-template-columns: 1fr 1fr; }
body.simple .grid-buttons.three { grid-template-columns: 1fr; }
body.simple .item { min-height: 80px; }
body.simple .plate { font-size: 1.15rem; padding: 4px 10px; }
body.simple .plate-big { font-size: 1.8rem; }
body.simple .badge { font-size: .95rem; padding: 5px 12px; }
body.simple .form input:not([type=checkbox]):not([type=radio]), body.simple .form select, body.simple .form textarea { min-height: 64px; font-size: 1.15rem; }
body.simple .form .check input { width: 36px; height: 36px; }
body.simple .radio-btn { min-height: 72px; }
body.simple .timer { font-size: 3.2rem; }
body.simple .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
body.simple .tabs a { padding: 14px 18px; }
body.simple a.small, body.simple .link-danger { display: inline-block; padding: 10px 0; }
body.simple .bottombar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--top); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.3); }
body.simple .bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 78px; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; }
body.simple .bottombar a span { font-size: 1.8rem; line-height: 1.1; }
body.simple .bottombar a:active { background: rgba(255,255,255,.12); }

.big-card-col { flex-direction: column; align-items: stretch; gap: 8px; }
.big-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Un único botón en una fila de dos: ocupa todo el ancho */
.grid-buttons > form.inline:only-child > .btn, .grid-buttons > a:only-child { grid-column: 1 / -1; }

/* Lista de la revisión: casillas grandes */
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.form .check-item { display: flex; align-items: center; gap: 14px; min-height: 64px; margin: 0; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.form .check-item input { width: 32px; height: 32px; flex: 0 0 auto; accent-color: #1e8e3e; }
.form .check-item:has(input:checked) { border-color: #1e8e3e; background: var(--ok-bg); }
body.simple .form .check-item { min-height: 76px; font-size: 1.15rem; }
body.simple .form .check-item input { width: 40px; height: 40px; }

/* Submenú del cambio de aceite */
.sub-aceite { display: none; grid-column: 1 / -1; margin: -2px 0 6px; padding: 12px; border: 2px solid #1e8e3e; border-radius: 14px; background: var(--card); }
.checklist:has(input[data-aceite]:checked) .sub-aceite:not(.sub-bombillas), .checklist:has(input[data-bombillas]:checked) .sub-bombillas, .sub-aceite.open { display: block; }
.sub-title { font-weight: 700; margin: 4px 0 8px; }
.aceite-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
.form .opt { display: block; margin: 0; }
.form .opt input { position: absolute; opacity: 0; pointer-events: none; }
.form .opt span, .opt-btn { display: flex; align-items: center; justify-content: center; min-height: 60px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.form .opt input:checked + span { border-color: #1e8e3e; background: #1e8e3e; color: #fff; }
.form .opt input:focus-visible + span { outline: 3px solid var(--primary); }
.aceite-otro { display: none !important; }
.sub-aceite:has(input[value=otro]:checked) .aceite-otro { display: block !important; }
body.simple .form .opt span, body.simple .opt-btn { min-height: 68px; font-size: 1.2rem; }
.opt-btn.sel { border-color: #1e8e3e; background: #1e8e3e; color: #fff; }
.chip.sel { border-color: #1e8e3e; background: #1e8e3e; color: #fff; }
body.simple .chip { min-height: 56px; font-size: 1.05rem; }
.form .opt span, .opt-btn { padding: 4px 6px; text-align: center; line-height: 1.15; }

/* =====================================================================
   DISEÑO 2 — aspecto más profesional (solo estilo, no cambia funciones)
   ===================================================================== */
:root {
  --bg: #f1f4f8; --card: #ffffff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --primary: #d01c3c; --primary-2: #a3122c; --primary-soft: #fde8ec; --primary-text: #fff;
  --top: #0f172a; --top-2: #1e293b; --top-text: #f8fafc;
  --btn: #ffffff; --btn-text: #0f172a; --btn-line: #dbe2ea;
  --ok: #15803d; --ok-bg: #e8f7ee; --warn: #92400e; --warn-bg: #fff7e6; --danger: #b91c1c; --danger-bg: #fdecec;
  --info-bg: #eaf2ff; --accent: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .06);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --card: #131c2e; --text: #e6ebf3; --muted: #93a3b8; --line: #23304a;
    --primary-soft: #3a1520; --top: #060b16; --top-2: #0f172a;
    --btn: #1a2438; --btn-text: #e6ebf3; --btn-line: #2a3852;
    --ok: #6ee7a0; --ok-bg: #10291c; --warn: #fcd27a; --warn-bg: #2e2410; --danger: #fca5a5; --danger-bg: #331617;
    --info-bg: #13233d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --card: #131c2e; --text: #e6ebf3; --muted: #93a3b8; --line: #23304a;
  --primary-soft: #3a1520; --top: #060b16; --top-2: #0f172a;
  --btn: #1a2438; --btn-text: #e6ebf3; --btn-line: #2a3852;
  --ok: #6ee7a0; --ok-bg: #10291c; --warn: #fcd27a; --warn-bg: #2e2410; --danger: #fca5a5; --danger-bg: #331617;
  --info-bg: #13233d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
}

body { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { font-weight: 650; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--primary-soft); }

/* Iconos */
.ic { width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: -.22em; }
h1 > .ic:first-child { width: 1.15em; height: 1.15em; color: var(--primary); }
.card h2 > .ic:first-child, .section-title > .ic:first-child {
  width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: gira .7s linear infinite; vertical-align: -.15em; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Cabecera */
.top { background: linear-gradient(180deg, var(--top), var(--top-2)); box-shadow: 0 4px 18px rgba(2, 6, 23, .25); padding: 10px 14px 0;
  padding-top: max(10px, env(safe-area-inset-top)); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.logo::before { content: none; }
.logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(208, 28, 60, .35); }
.search { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; overflow: hidden; }
.search:focus-within { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(208, 28, 60, .35); }
.search input { background: transparent; color: #fff; border-radius: 0; height: 48px; font-size: 1.1rem; letter-spacing: 1.5px; }
.search:focus-within input { color: #0f172a; }
.search input::placeholder { color: rgba(255, 255, 255, .6); }
.search:focus-within input::placeholder { color: #94a3b8; }
.search button { background: var(--primary); height: 48px; width: 56px; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.search button .ic { width: 22px; height: 22px; }
.nav { gap: 2px; margin-top: 10px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border-radius: 12px 12px 0 0; font-weight: 600; font-size: .92rem;
  color: rgba(248, 250, 252, .72); opacity: 1; position: relative; }
.nav a .ic { width: 18px; height: 18px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }

.wrap { padding-top: 18px; }
.hello { font-size: .95rem; font-weight: 500; }

/* Tarjetas */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }

/* Botones */
.btn { background: var(--btn); color: var(--btn-text); border: 1px solid var(--btn-line); box-shadow: var(--shadow-sm);
  border-radius: 14px; font-weight: 650; letter-spacing: -.005em; gap: 8px; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { box-shadow: var(--shadow); }
.btn .ic { width: 1.25em; height: 1.25em; }
.btn-primary { background: linear-gradient(180deg, #e0284a, var(--primary-2)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(208, 28, 60, .28); }
.btn-go { background: linear-gradient(180deg, #22a55a, #15803d); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(21, 128, 61, .25); }
.btn-warn { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1f1300; border-color: transparent; box-shadow: 0 6px 16px rgba(245, 158, 11, .25); }
.btn-stop { background: linear-gradient(180deg, #ef4444, #b91c1c); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(185, 28, 28, .25); }
.btn-danger { background: var(--card); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); box-shadow: none; }
.btn-wa { background: linear-gradient(180deg, #2bd46e, #1fae55); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(31, 174, 85, .25); }
.btn-big { min-height: 64px; font-size: 1.05rem; }
.btn-huge { min-height: 84px; font-size: 1.3rem; border-radius: 18px; }
.btn-huge .ic { width: 1.35em; height: 1.35em; }
.grid-buttons { gap: 12px; }
/* Accesos grandes del inicio y la ficha: icono encima del texto */
.grid-buttons:not(.two):not(.three) > .btn-big, .grid-buttons:not(.two):not(.three) > .foto-form .btn { flex-direction: column; gap: 6px; padding: 14px 10px; }
.grid-buttons:not(.two):not(.three) > .btn-big .ic { width: 28px; height: 28px; }
.foto-form .btn .lbl { display: inline-flex; align-items: center; gap: 8px; }

/* Formularios */
.form label { font-weight: 600; color: var(--text); font-size: .92rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filter, .inline-search input {
  border: 1px solid var(--btn-line); background: var(--card); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04); }
.form input:focus, .form select:focus, .form textarea:focus, .filter:focus, .inline-search input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form fieldset { border-color: var(--line); border-radius: 14px; background: color-mix(in srgb, var(--bg) 50%, var(--card)); }
.form .check input, .form .check-item input, .radio-btn input { accent-color: var(--primary); }
.radio-btn { border: 1px solid var(--btn-line); background: var(--card); }
.radio-btn:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.big-check { border: 1px solid var(--line); }

/* Listas */
.list li + li { border-top-color: var(--line); }
.item { border-radius: 12px; padding: 12px 8px; transition: background .12s; }
.item:hover { background: color-mix(in srgb, var(--bg) 70%, transparent); }
.list a.item:not(.item-col)::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-left: 4px;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); opacity: .45; }
.item-title { font-weight: 650; }
.item-main { font-weight: 600; }

/* Matrícula europea */
.plate { position: relative; padding: 3px 9px 3px 24px; border: 2px solid #111827; border-left: 0; border-radius: 7px; background: #fff;
  color: #111827; box-shadow: var(--shadow-sm); font-family: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace; }
.plate::before { content: "E"; position: absolute; left: 0; top: -2px; bottom: -2px; width: 16px; border-radius: 6px 0 0 6px;
  background: #1d4ed8; color: #fff; font-size: .62em; font-weight: 700; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 3px; letter-spacing: 0; }
.plate-big { padding: 6px 14px 6px 32px; font-size: 1.6rem; }
.plate-big::before { width: 22px; font-size: .45em; }

/* Etiquetas de estado */
.badge { font-weight: 650; font-size: .76rem; padding: 4px 10px; border-radius: 999px; letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 6px; }
.badge[class*="est-"]::before, .badge[class*="urg-"]::before, .badge[class*="av-"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.est-pendiente { background: #eef2f6; color: #475569; }
.est-en_curso { background: #e3edff; color: #1d4ed8; }
.est-esperando_pieza { background: #fff3d6; color: #a16207; }
.est-listo { background: #dcf7e6; color: #15803d; }
.est-entregado { background: #efe9fb; color: #6d28d9; }
.urg-urgente { background: #fde4e7; color: #be123c; }
.urg-proxima { background: #fff3d6; color: #a16207; }
.urg-vigilar { background: #e3edff; color: #1d4ed8; }

/* Avisos de la página */
.flash { border-radius: 14px; border: 1px solid transparent; font-weight: 600; box-shadow: var(--shadow-sm); }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.flash-warn { border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Cronómetro */
.timer-card { padding: 22px 18px; }
.timer { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; }
.timer-card.running { border-color: #22a55a; box-shadow: 0 0 0 4px rgba(34, 165, 90, .15), var(--shadow); }
.timer-card.paused { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .15), var(--shadow); }
.timer-card.running .timer { color: #15803d; }

/* Ficha del coche */
.car-head { gap: 16px; }
.car-head h1 { font-size: 1.4rem; }

/* Pestañas */
.tabs { gap: 8px; padding-bottom: 2px; }
.tabs a { background: var(--card); border: 1px solid var(--btn-line); box-shadow: var(--shadow-sm); font-size: .9rem; }
.tabs a.active { background: var(--text); color: var(--card); border-color: var(--text); }

/* Tarjetas grandes del modo taller */
.big-card { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 18px; }
.big-card:hover { border-color: var(--btn-line); }
.section-title { font-size: 1.1rem; }

/* Galería */
.gallery { gap: 10px; }
.gallery img { border-radius: 12px; box-shadow: var(--shadow-sm); }

/* Plegables */
details.more > summary { background: var(--card); border: 1px solid var(--btn-line); box-shadow: var(--shadow-sm); border-radius: 14px;
  display: flex; align-items: center; gap: 8px; }
details.more > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
details.more[open] > summary::before { content: ""; transform: rotate(45deg); }

/* Chips y opciones */
.chip { border: 1px solid var(--btn-line); background: var(--card); box-shadow: var(--shadow-sm); }
.chip.sel, .opt-btn.sel, .form .opt input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.form .opt span, .opt-btn { border: 1px solid var(--btn-line); background: var(--card); }
.form .check-item { border: 1px solid var(--btn-line); background: var(--card); }
.form .check-item:has(input:checked) { border-color: #22a55a; background: var(--ok-bg); }
.sub-aceite { border: 1px solid #22a55a; box-shadow: var(--shadow-sm); }

/* Tablas */
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }

/* Barra inferior del modo taller */
body.simple .bottombar { background: color-mix(in srgb, var(--top) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .06); }
body.simple .bottombar a { color: rgba(248, 250, 252, .65); gap: 4px; }
body.simple .bottombar a span { display: flex; }
body.simple .bottombar a .ic { width: 26px; height: 26px; }
body.simple .bottombar a.active { color: #fff; }
body.simple .bottombar a.active span { color: #fb7185; }
body.simple .home-btn { color: #fff; }
body.simple .home-btn .ic { width: 26px; height: 26px; }

/* Entrada */
.login { margin: 10vh auto; padding: 28px 24px; }
.login h1 { flex-direction: column; align-items: flex-start; gap: 14px; }
.login h1::before { content: ""; width: 56px; height: 56px; border-radius: 15px; background: url(icon.svg) center / cover no-repeat;
  box-shadow: 0 8px 20px rgba(208, 28, 60, .35); }

@media (max-width: 420px) {
  body { font-size: 16px; }
  .logo span { display: none; }
  .logo { font-size: 1.1rem; }
  .logo::before { content: none; }
  h1 { font-size: 1.35rem; }
}

/* Ajustes finos */
body.simple .plate { padding: 4px 10px 4px 27px; }
body.simple .plate-big { padding: 6px 14px 6px 34px; }
.btn { flex-wrap: nowrap; }
.grid-buttons > .foto-form, .grid-buttons > .foto-form .btn { height: 100%; }
.grid-buttons:not(.two):not(.three) > .foto-form .btn .lbl { flex-direction: column; gap: 6px; }
.grid-buttons:not(.two):not(.three) > .foto-form .btn .ic { width: 28px; height: 28px; }
.grid-buttons > .foto-form { display: flex; }
.grid-buttons > .foto-form > .btn { flex: 1; width: 100%; }
.grid-buttons > .foto-form.btn-big { padding: 0 !important; }

/* Comprobaciones del trabajo */
.comprobaciones > summary { justify-content: flex-start; }
.comprobaciones > summary .count { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.comprobaciones > .card { margin-top: 10px; }
.check-item span { display: flex; flex-direction: column; }
.hecha-en { font-weight: 500; color: var(--ok); font-size: .78rem; }
.sub-pieza { display: none; grid-column: 1 / -1; margin: -2px 0 6px; padding: 10px 12px; border: 1px solid #22a55a; border-radius: 14px; background: var(--card); }
.checklist:has(input[data-pieza]:checked) .sub-pieza, .sub-pieza.open { display: block; }
.sub-pieza label { margin: 0; }
.piezas-opts { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.piezas-opts .opt span { font-size: .95rem; font-weight: 650; min-height: 56px; }

/* =====================================================================
   DISEÑO 3 — fondo suave y animaciones discretas
   ===================================================================== */
:root { --dot: rgba(100, 116, 139, .13); --glow: rgba(208, 28, 60, .07); --glow-2: rgba(37, 99, 235, .05); }
:root[data-theme="dark"] { --dot: rgba(148, 163, 184, .08); --glow: rgba(208, 28, 60, .10); --glow-2: rgba(37, 99, 235, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dot: rgba(148, 163, 184, .08); --glow: rgba(208, 28, 60, .10); --glow-2: rgba(37, 99, 235, .08); } }

/* Fondo: plano de un coche muy tenue + trama de puntos + brillos de color suaves */
body {
  background-color: var(--bg);
  background-image:
    url(fondo.svg),
    radial-gradient(900px 480px at 0% 0%, var(--glow), transparent 70%),
    radial-gradient(800px 520px at 100% 100%, var(--glow-2), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.5px);
  background-size: min(980px, 135vw) auto, auto, auto, 22px 22px;
  background-position: right -6vw bottom 2vh, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Modelo del coche debajo de la matrícula */
.plate-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 0 0 auto; }
.plate-car { font-size: .78rem; font-weight: 600; color: var(--muted); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
.job-car { font-size: 1rem; font-weight: 600; color: var(--muted); margin-top: -2px; }
body.simple .plate-car { font-size: .9rem; max-width: 200px; }

/* Animaciones discretas */
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes baja { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes late { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 165, 90, .45); } 70% { box-shadow: 0 0 0 8px rgba(34, 165, 90, 0); } }

.wrap > .card, .wrap > section, .wrap > .big-card, .wrap > .grid-buttons, .wrap > .stack, .wrap > details, .wrap > .list, .wrap > form.card {
  animation: aparece .38s cubic-bezier(.2, .7, .2, 1) both;
}
.wrap > :nth-child(2) { animation-delay: .03s; } .wrap > :nth-child(3) { animation-delay: .06s; }
.wrap > :nth-child(4) { animation-delay: .09s; } .wrap > :nth-child(5) { animation-delay: .12s; }
.wrap > :nth-child(6) { animation-delay: .15s; } .wrap > :nth-child(7) { animation-delay: .18s; }
.wrap > :nth-child(n+8) { animation-delay: .21s; }
.flash { animation: baja .3s ease-out both; }

.btn, .big-card, .item, .chip, .tabs a, .check-item, .opt span, .opt-btn, details.more > summary, .nav a, .bottombar a {
  transition: transform .14s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
@media (hover: hover) {
  .btn:hover, .big-card:hover { transform: translateY(-1px); }
  .item:hover .plate { box-shadow: var(--shadow); }
}
.btn:active, .big-card:active, .chip:active, .check-item:active, .opt span:active, .opt-btn:active { transform: scale(.97); }
details[open] > :not(summary) { animation: aparece .25s ease-out both; }
.check-item input, .opt input { transition: transform .15s ease; }
.check-item input:checked { animation: marca .2s ease-out; }
@keyframes marca { 50% { transform: scale(1.15); } }

/* Cronómetro en marcha: punto verde que «late» */
.timer-card.running .timer::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #22a55a;
  margin-right: 12px; vertical-align: .35em; animation: late 1.8s ease-out infinite; }
.timer-card.paused .timer { opacity: .75; }

/* Tarjetas un poco translúcidas sobre el fondo, sin perder legibilidad */
.card, .big-card { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Que los botones de una fila nunca se salgan de la tarjeta */
.grid-buttons.two, body.simple .grid-buttons.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-buttons.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.simple .grid-buttons.three { grid-template-columns: minmax(0, 1fr); }
.grid-buttons > *, .grid-buttons .btn { min-width: 0; }
.btn-huge { padding-left: 12px; padding-right: 12px; }
@media (max-width: 420px) { .timer-card .btn-huge { font-size: 1.2rem; gap: 6px; } }
.timer-mini { font-variant-numeric: tabular-nums; font-weight: 650; }

/* Tramos de trabajo y horas en decimal */
.tramos { list-style: none; margin: 12px auto 4px; padding: 0; max-width: 340px; text-align: left; }
.tramos li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.tramos li:nth-child(odd) { background: var(--bg); }
.tramo-h { font-weight: 700; }
.tramo-d { color: var(--muted); font-weight: 600; }
.horas-decimal { margin: 6px 0 4px; font-size: 1.05rem; }
.horas-decimal strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* Carpetas por marca (pestaña Coches, administrador) */
.carpetas { display: grid; gap: 10px; margin: 12px 0; }
.carpeta { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.carpeta > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem; }
.carpeta > summary::-webkit-details-marker { display: none; }
.carpeta > summary .ic { width: 26px; height: 26px; color: #d4a017; fill: color-mix(in srgb, #f5c542 35%, transparent); }
.carpeta[open] > summary { border-bottom: 1px solid var(--line); }
.carpeta .count { margin-left: auto; font-size: .85rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.carpeta .list { padding: 4px 10px 8px; }

/* Botón y ventana de resumen */
.btn-resumen { width: 100%; min-height: 50px; background: var(--card); border: 1px solid var(--btn-line); }
dialog.resumen { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px;
  background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgba(2, 6, 23, .35); display: flex; flex-direction: column; }
dialog.resumen:not([open]) { display: none; }
dialog.resumen::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
dialog.resumen[open] { animation: aparece .25s ease-out both; }
.resumen-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.resumen-cab h2 { margin: 4px 0 0; }
.resumen-taller { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.resumen-cuerpo { padding: 6px 20px 12px; overflow-y: auto; }
.resumen-cuerpo section { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.resumen-cuerpo section:last-child { border-bottom: 0; }
.resumen-cuerpo h3 { margin: 4px 0 8px; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.rdl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin: 0; }
.rdl dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.rdl dd { margin: 0; }
.rtabla { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: .92rem; }
.rtabla th, .rtabla td { white-space: normal; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtabla td:last-child, .rtabla th:last-child { text-align: right; white-space: nowrap; }
.rtotales { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; }
.rtotales > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.rtotales span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.rtotales strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.resumen-pie { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .rdl { grid-template-columns: 1fr; } .rdl dt { margin-top: 6px; } }
@media print {
  body.imprimiendo > *:not(dialog) { display: none !important; }
  body.imprimiendo { background: #fff !important; }
  body.imprimiendo dialog.resumen { position: static; display: block !important; width: 100%; max-width: none; max-height: none; margin: 0;
    box-shadow: none; border-radius: 0; animation: none; background: #fff !important; color: #111 !important; }
  body.imprimiendo dialog.resumen * { color: #111 !important; background: transparent !important; box-shadow: none !important; }
  body.imprimiendo .resumen-cuerpo section { break-inside: avoid; }
  body.imprimiendo .resumen-pie, body.imprimiendo [data-cerrar] { display: none !important; }
  body.imprimiendo .resumen-cuerpo { overflow: visible; }
}

/* Capacidad de la batería en «Trabajo extra» */
.sub-bateria { display: none; margin: 4px 0 12px; }
.extras-opts:has(input[data-bateria]:checked) ~ .sub-bateria, .sub-bateria.open { display: block; }
.sub-bateria-titulo { display: none; margin: 0 0 12px; }
.sub-bateria-titulo.open { display: block; }

/* Botones de urgencia: legibles en claro y en oscuro */
.radio-btn.urg-urgente, .radio-btn.urg-proxima, .radio-btn.urg-vigilar {
  background: var(--card); color: var(--text); border: 2px solid var(--btn-line); font-weight: 700; gap: 12px; }
.radio-btn.urg-urgente { --u: #dc2626; --u-txt: #fff; }
.radio-btn.urg-proxima { --u: #f59e0b; --u-txt: #1f1300; }
.radio-btn.urg-vigilar { --u: #2563eb; --u-txt: #fff; }
.radio-btn[class*="urg-"]::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--u); flex: 0 0 auto; order: -1; }
.radio-btn[class*="urg-"] input { accent-color: var(--u); }
.radio-btn[class*="urg-"]:has(input:checked) { background: var(--u); border-color: var(--u); color: var(--u-txt); box-shadow: 0 6px 16px color-mix(in srgb, var(--u) 30%, transparent); }
.radio-btn[class*="urg-"]:has(input:checked)::before { background: var(--u-txt); }
.radio-btn[class*="urg-"]:has(input:checked) input { accent-color: var(--u-txt); }
.radio-btn[class*="urg-"] { position: relative; }
.radio-btn[class*="urg-"] input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.radio-btn[class*="urg-"]:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }
.radio-btn[class*="urg-"]:has(input:checked)::after { content: "✓"; margin-left: auto; font-weight: 800; font-size: 1.2rem; }
/* Revisión dentro de «Trabajo extra» */
.sub-aceite-extra { margin: 4px 0 12px; }
.extras-opts:has(input[data-revision-extra]:checked) ~ .sub-aceite-extra { display: block; }

/* Menú de aceite / batería metido entre los botones de trabajos: ocupa toda la fila, bajo el botón tocado */
.chips > .sub-aceite { flex-basis: 100%; margin: 0; }

/* Lista de trabajos: en el móvil, cada dato en su línea (matrícula, trabajo, coche, fecha y mecánico, estado) */
.trabajo-item .ti-titulo { font-weight: 650; line-height: 1.3; }
.trabajo-item .ti-coche, .trabajo-item .ti-meta { display: block; }
@media (max-width: 700px) {
  .list a.item.trabajo-item { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 10px; }
  .list a.item.trabajo-item::after { display: none; }
  .trabajo-item .item-main { width: 100%; gap: 2px; }
  .trabajo-item .ti-titulo { font-size: 1.05em; overflow-wrap: anywhere; }
}

/* Aceite de la última vez ya marcado */
.aceite-nota { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #22a55a 12%, var(--card)); font-size: .92rem; font-weight: 600; }
/* Pantalla de terminar: comprobaciones en el mismo sitio */
.terminar-titulo { margin: 6px 0 8px; font-size: 1.05rem; }
#terminar .checklist { margin-bottom: 12px; }

/* Pausa: dos motivos principales en grande y el resto en botones más pequeños */
.est-pendiente_aprobacion { background: #fde2e7; color: #9f1239; }
.btn-pausa-principal { min-height: 76px; font-size: 1.1rem; }
.pausa-otros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.pausa-otros .btn { min-height: 54px; white-space: normal; }
.pausa-nota { margin-top: 6px; }
.trabajo-item .ti-parado { display: block; color: #b45309; font-weight: 700; }

/* Tiempo trabajado: lo que se factura, primero y en grande */
.timer-label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rtotales .rtotal-principal { grid-column: 1 / -1; background: color-mix(in srgb, #22a55a 12%, var(--card)); }
.rtotales .rtotal-principal strong { font-size: 1.7rem; }
.rtotales { margin-bottom: 10px; }

/* Trabajos frecuentes: los principales en grande y el resto tras «Más trabajos…» */
.chips-grandes .chip { min-height: 60px; font-size: 1.05rem; padding: 10px 18px; }
details.chips-mas { margin: 0 0 12px; }
details.chips-mas > summary { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 1px dashed var(--btn-line); cursor: pointer; font-weight: 600; list-style: none; }
details.chips-mas > summary::-webkit-details-marker { display: none; }
details.chips-mas[open] > summary { margin-bottom: 8px; }

/* Administrador en el móvil: menú abajo (5 botones) en lugar de la barra de arriba que no cabe */
@media (max-width: 760px) {
  body:not(.simple) header.top .nav { display: none; }
  body:not(.simple) { padding-bottom: 84px; }
  .bottombar.bottombar-admin { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--top) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.3); }
  .bottombar-admin a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px;
    color: rgba(248, 250, 252, .65); text-decoration: none; font-size: .75rem; font-weight: 600; }
  .bottombar-admin a span { display: flex; font-size: 1.4rem; line-height: 1; }
  .bottombar-admin a .ic { width: 23px; height: 23px; }
  .bottombar-admin a.active { color: #fff; }
  .bottombar-admin a:active { background: rgba(255,255,255,.12); }
}
@media print { .bottombar { display: none !important; } }

/* «Visto antes en el taller»: averías parecidas resueltas */
details.casos-card { border-left: 4px solid #2563eb; padding: 12px 14px; }
details.casos-card > summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; }
details.casos-card > summary::-webkit-details-marker { display: none; }
details.casos-card > summary .count { margin-left: auto; }
.casos .item-title { white-space: normal; }

/* Cabecera del trabajo: matrícula, marca y modelo (y km si está en curso) siempre a la vista */
.coche-cab { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; text-decoration: none; color: var(--text); }
.coche-cab-flecha { color: var(--muted); font-size: 1.2rem; }
.coche-cab-datos { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.coche-cab-datos strong { font-size: 1.1rem; }
.coche-cab-datos small { color: var(--muted); font-weight: 600; }
body.simple .coche-cab-datos strong { font-size: 1.25rem; }
.h1-coche { font-size: .6em; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Conector de Claude */
pre.codigo { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .82rem; }
code.copiable { display: inline-block; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; user-select: all; }
.token-mcp { font-size: 1rem; margin-top: 6px; }
.tabla-scroll { overflow-x: auto; }
.oauth-card ul { padding-left: 20px; } .oauth-card li { margin: 6px 0; }

/* Documentos del vehículo */
.doc-item { gap: 10px; }
.doc-item .item-main { text-decoration: none; color: var(--text); }
.doc-form { margin-top: 10px; }
.doc-form .doc-otro { display: none; }
.doc-form:has(select option:last-child:checked) .doc-otro { display: block; }

/* Foto del cuadro de instrumentos (modo taller) */
.foto-form.btn-cuadro { display: block; margin: 0 0 10px; }
.foto-form.btn-cuadro .btn-foto { width: 100%; min-height: 64px; font-size: 1.1rem; font-weight: 700; border: 2px solid #2563eb; }
.cliente-orden { margin: -4px 0 10px; }
.pendientes-completar { border-left: 4px solid #f59e0b; }
/* Dictado por voz (modo taller) */
.dictado-wrap { position: relative; }
.btn-dictado { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--btn-line);
  background: var(--card); font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.btn-dictado.escuchando { background: #dc2626; color: #fff; border-color: #dc2626; animation: pulso 1.2s infinite; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); } 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }
.dictado-wrap textarea { padding-right: 64px; }
.btn-cuadro .km-cuadro { display: block; margin: 0 0 8px; font-weight: 600; }
.btn-cuadro .km-cuadro input { font-size: 1.3rem; text-align: center; }
.btn-cuadro .km-cuadro input { width: 100%; min-height: 56px; margin-top: 4px; border: 1px solid var(--btn-line); border-radius: 12px; background: var(--card); color: var(--text); padding: 8px 12px; font: inherit; font-size: 1.3rem; }

/* Trabajo extra: con o sin aprobación del cliente */
.sub-aprobacion { display: none; margin: 4px 0 10px; padding: 12px; border: 2px solid #f59e0b; border-radius: 14px; background: var(--card); }
form:has(input[data-aprobacion]:checked) .sub-aprobacion { display: block; }
form:has(input[data-aprobacion]:checked) .sin-aprob-txt { display: none; }
.aprob-check { font-weight: 700; }
.foto-extra { display: flex; width: 100%; margin-top: 10px; }
.extra-detectado { border-left: 4px solid #f59e0b; padding-left: 10px; }
.aprob { font-weight: 700; }
.aprob-aceptado { color: #15803d; } .aprob-rechazado { color: #b91c1c; }

/* Recepción del vehículo: checklist, silueta con daños y firma */
fieldset.recepcion { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
fieldset.recepcion legend { font-weight: 700; padding: 0 6px; }
.silueta-caja { max-width: 260px; margin: 8px auto; color: var(--text); }
.silueta { width: 100%; height: auto; display: block; touch-action: manipulation; }
.silueta-edit { cursor: crosshair; background: var(--bg); border-radius: 16px; }
.silueta .marca { cursor: pointer; }
.tipos-dano .radio-btn.dano-golpe { --u: #dc2626; --u-txt: #fff; } .tipos-dano .radio-btn.dano-rayon { --u: #ea580c; --u-txt: #fff; } .tipos-dano .radio-btn.dano-otro { --u: #2563eb; --u-txt: #fff; }
.tipos-dano .radio-btn { background: var(--card); color: var(--text); border: 2px solid var(--btn-line); font-weight: 700; }
.tipos-dano .radio-btn:has(input:checked) { background: var(--u); border-color: var(--u); color: var(--u-txt); }
.lista-danos, .silueta-vista ol { padding-left: 22px; margin: 6px 0; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.silueta-vista { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 12px; align-items: start; }
.firma-caja { position: relative; border: 2px dashed var(--btn-line); border-radius: 14px; background: #fff; margin: 8px 0; }
.firma-lienzo { width: 100%; height: 220px; display: block; touch-action: none; border-radius: 12px; }
.firma-borrar { position: absolute; top: 8px; right: 8px; }
.rgpd-texto { margin: 8px 0; }

/* Lo marcado como oculto no se muestra nunca (p. ej. el selector de archivo nativo bajo los botones de cámara) */
[hidden] { display: none !important; }
.btn-cuadro-entrada { min-height: 64px; font-weight: 700; border: 2px solid #2563eb !important; margin-top: 10px; }

/* Avería detectada: miniaturas de las fotos elegidas, con botón para quitar cada una */
.fotos-previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0; }
.fotos-previas figure { position: relative; margin: 0; }
.fotos-previas img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.fotos-previas .quitar-foto { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(15, 23, 42, .75); color: #fff; font-size: 1rem; cursor: pointer; }

/* Tablero del taller: columnas por estado */
.tablero { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.tablero-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 160px; border-top: 4px solid #94a3b8; }
.tablero-col h2 { font-size: 1rem; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.tablero-en_curso { border-top-color: #2563eb; } .tablero-esperando_pieza { border-top-color: #f59e0b; }
.tablero-pendiente_aprobacion { border-top-color: #e11d48; } .tablero-entregado { border-top-color: #16a34a; }
.tablero-tarjeta { display: flex; flex-direction: column; gap: 3px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); text-decoration: none; }
.tablero-tarjeta:hover { box-shadow: var(--shadow-sm); }
.tablero-tarjeta .plate { align-self: flex-start; }
.tablero-pausa { color: #b45309; font-weight: 600; }
@media (max-width: 760px) { .tablero { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; } .tablero-col { scroll-snap-align: start; } }
.estimacion .btn { margin-left: 6px; }

/* Aviso de fin de jornada */
dialog.aviso-jornada { width: min(460px, calc(100vw - 24px)); }
.aviso-jornada-cuerpo { padding: 22px 22px 10px; }
.aviso-jornada-cuerpo h2 { margin: 6px 0; text-align: center; }
.aviso-jornada-cuerpo p { margin: 4px 0 8px; text-align: center; }
.aviso-jornada-icono { font-size: 2.6rem; line-height: 1; text-align: center; }
.aviso-jornada-cuerpo ul { margin: 0; padding-left: 20px; font-size: 1.05rem; }
.aviso-jornada-cuerpo li { margin: 6px 0; }
.aviso-jornada-cuerpo li a { font-weight: 700; }
.aviso-jornada .resumen-pie { grid-template-columns: 1fr; }
.aviso-jornada .resumen-pie form { margin: 0; }
.aviso-jornada .resumen-pie .btn { width: 100%; }
/* Horarios */
.horarios .row-todos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.horarios .row-todos input { width: auto; min-height: 44px; }
.horarios td input[type=time] { min-height: 44px; margin: 0; }

/* Próximo mantenimiento: varias opciones; «Otro» con texto */
.form .mant-otro-txt { display: none; }
.form:has(input[data-mant-otro]:checked) .mant-otro-txt { display: block; }
details.mant-terminar { margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
details.mant-terminar > summary { font-weight: 700; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
