/* Power Sport Electronic · portal de ficheros
   Tema claro con naranja de marca. Colores comprobados para contraste AA:
   texto blanco sobre --brand-strong 4,5:1 · --muted sobre blanco 5,6:1. */

@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url('/fonts/barlow/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 800; font-style: italic; font-display: swap; src: url('/fonts/barlow/barlow-latin-800-italic.woff2') format('woff2'); }

:root {
  --brand: #ed7418;          /* naranja de marca: logo, iconos, detalles */
  --brand-strong: #c2560a;   /* botones y menú activo (texto blanco) */
  --brand-hover: #a94a08;
  --brand-text: #b14c0a;     /* enlaces sobre fondo claro */
  --brand-soft: #fff2e7;
  --ink: #1d2533; --muted: #5d6878; --line: #e3e8ef; --line-strong: #cfd6e0;
  --bg: #f4f6fa; --panel: #ffffff; --side: #182131; --side-line: #2a3446; --side-text: #b8c3d4;
  --ok: #1f7a55; --ok-bg: #e7f6ef; --warn: #8a5b00; --warn-bg: #fff4dd; --info: #2f5bc4; --info-bg: #ebf1ff;
  --danger: #b4232c; --danger-bg: #fdecee;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 33, 59, .04);
  --display: 'Barlow', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 'DM Sans', 'Segoe UI', Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.4px; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-family: inherit; }
main > .row-between h2, main > h2 { font-size: 28px; letter-spacing: -.3px; }
small { font-size: 13px; }
:focus-visible { outline: 3px solid #f6b27a; outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.logo { display: grid; place-items: center; width: 42px; height: 42px; background: var(--brand); color: #1a1205; border-radius: 6px 13px 6px 6px;
  font: 800 italic 19px var(--display); letter-spacing: -1px; transform: skew(-6deg); box-shadow: 3px 3px 0 rgba(237, 116, 24, .25); }
.brandwords { font: 800 italic 21px/1.02 var(--display); letter-spacing: .2px; }
.brandwords b { color: #ff9a4d; font-weight: 800; }
.brandwords small { display: block; font: 600 11px 'DM Sans', sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--side-text); margin-top: 5px; }

/* ---------- Estructura con menú lateral ---------- */
body.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-text); padding: 28px 18px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.side .brand { padding: 0 6px 24px; border-bottom: 1px solid var(--side-line); margin-bottom: 22px; }
.navlabel { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: #8f9bb0; margin: 0 12px 10px; }
.sidenav { display: flex; flex-direction: column; gap: 3px; }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: var(--side-text); font-size: 15px; font-weight: 500; text-decoration: none; }
.sidenav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidenav a.active { background: var(--brand-strong); color: #fff; }
.sidenav b { margin-left: auto; min-width: 22px; text-align: center; background: var(--brand); color: #1a1205; border-radius: 99px; padding: 1px 7px; font-size: 12px; }
.sidenav a.active b { background: #fff; color: var(--brand-strong); }
.side-bottom { margin-top: auto; padding-top: 18px; }
.service { font-size: 13px; padding: 14px 10px; border-top: 1px solid var(--side-line); border-bottom: 1px solid var(--side-line); color: #dfe5ee; }
.service i, .online i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #35c08e; margin-right: 8px; vertical-align: 1px; }
.service small { display: block; color: var(--side-text); margin: 3px 0 0 16px; }
.me { display: flex; align-items: center; gap: 10px; padding: 16px 4px 0; color: #eef2f7; font-size: 14px; }
.me-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name small { display: block; color: var(--side-text); font-size: 12px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #2f3b51; color: #e6ebf3; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.iconbtn { background: none; border: 0; color: var(--side-text); padding: 6px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.me form { margin: 0; }

.shell { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 72px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; }
.crumb { font-size: 14px; color: var(--muted); } .crumb span { margin: 0 8px; } .crumb strong { color: var(--ink); font-weight: 600; }
main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px 36px 40px; flex: 1; }
footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; padding: 20px 36px; border-top: 1px solid var(--line); }

/* Páginas públicas (portada, entrar, registro) */
body.public { min-height: 100vh; display: flex; flex-direction: column; }
.pubbar { background: var(--side); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; flex-wrap: wrap; }
.pubbar nav { display: flex; gap: 18px; align-items: center; }
.pubbar nav a:not(.btn) { color: #e6ebf3; font-weight: 500; }
body.public main { max-width: 1120px; }
body.public main:has(> .landing) { max-width: none; padding: 0; }

/* ---------- Portada ---------- */
.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.lp-hero { background: var(--side); color: #e9eef6; padding: 72px 0 84px; border-top: 1px solid var(--side-line); }
.lp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 600; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; margin: 0 0 14px; }
.lp-hero h1 { color: #fff; font-size: 46px; line-height: 1.08; letter-spacing: -1px; font-weight: 700; margin-bottom: 18px; text-wrap: balance; }
.lead { font-size: 18px; color: #c3cddc; max-width: 560px; margin: 0 0 30px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.lg { padding: 13px 24px; font-size: 16px; }
.btn.ghost-light { background: transparent; color: #fff; border-color: #4a5870; }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .07); border-color: #6b7a93; }
.lp-final .btn.ghost-light { color: var(--ink); border-color: var(--line-strong); }
.lp-final .btn.ghost-light:hover { background: var(--bg); }

.lp-mock { background: var(--panel); color: var(--ink); border-radius: 14px; padding: 18px 20px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transform: rotate(1.2deg); }
.mock-top { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.mock-top span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.mock-top em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; }
.mock-sub { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.mock-chips { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-file, .mock-msg { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.mock-file { background: var(--brand-soft); border-color: #f6d3b6; margin-bottom: 10px; }
.mock-file .ic { color: var(--brand-text); }
.mock-file span { flex: 1; font-weight: 600; font-size: 14px; } .mock-file small { display: block; font-weight: 400; color: var(--muted); }
.mock-msg { font-size: 13px; color: var(--muted); } .mock-msg .ic { color: var(--info); }

.lp-facts { background: var(--panel); border-bottom: 1px solid var(--line); }
.lp-facts .lp-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 22px; padding-bottom: 22px; }
.lp-facts div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.lp-facts .ic { color: var(--brand); margin-top: 2px; }
.lp-facts b { display: block; color: var(--ink); font-size: 15px; }

.lp-sec { padding: 64px 0; } .lp-sec.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-h2 { font-size: 30px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 22px; }
.lp-intro { color: var(--muted); max-width: 640px; margin: -10px 0 22px; }
.lp-services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lp-services li { border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; background: var(--bg); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag-comp { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.lp-features div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.lp-features .ic { width: 28px; height: 28px; color: var(--brand); margin-bottom: 12px; }
.lp-features h3 { color: var(--ink); font: 600 18px var(--display); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.lp-features p { color: var(--muted); margin: 0; }

.lp-final { padding: 0 0 72px; }
.lp-final .lp-wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; }
.lp-final .lp-wrap > div:first-child { background: none; }
.lp-final h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; } .lp-final p { color: var(--muted); margin: 0; }
.lp-final .lp-wrap { max-width: 1056px; background: var(--brand-soft); border: 1px solid #f6d3b6; border-radius: var(--radius); padding: 30px 32px; }
.lp-contact { grid-column: 1 / -1; font-size: 14px; border-top: 1px solid #f6d3b6; padding-top: 16px; }

@media (max-width: 900px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .lp-mock { transform: none; max-width: 460px; }
  .lp-facts .lp-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .lp-wrap { padding: 0 16px; }
  .lp-hero { padding: 44px 0 52px; } .lp-hero h1 { font-size: 32px; } .lead { font-size: 16px; }
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-facts .lp-wrap { grid-template-columns: 1fr; gap: 14px; }
  .lp-sec { padding: 44px 0; } .lp-h2 { font-size: 24px; }
  .lp-services { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lp-services li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; font-size: 14px; }
  .lp-final { padding: 0 16px 48px; } .lp-final .lp-wrap { grid-template-columns: 1fr; padding: 22px 20px; margin: 0; }
}
@media (prefers-reduced-motion: no-preference) { .lp-mock { transition: transform .3s ease; } .lp-mock:hover { transform: rotate(0); } }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand-strong); color: #fff; border: 1px solid var(--brand-strong);
  border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none !important; line-height: 1.3; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { padding: 7px 13px; font-size: 14px; }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--bg); }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--brand-text); padding: 0; cursor: pointer; }
.inline { display: inline; }

.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 24px; margin-bottom: 20px; }
.card.narrow { max-width: 480px; margin: 32px auto; }
.card.info { border-color: #c8d6f5; background: #f7f9ff; }
.panel { overflow: hidden; }
.panelhead { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 12px; }
.panelhead h2 { margin: 0; font-size: 19px; }

.heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.heading h1 { margin-bottom: 4px; }
.subtitle { color: var(--muted); margin: 0; font-size: 15px; }

label { display: block; margin-bottom: 14px; color: var(--ink); font-size: 14px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #fbd2b0; border-color: var(--brand); }
input[type=file] { padding: 8px; background: var(--bg); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
label.check input { width: auto; margin-top: 4px; accent-color: var(--brand-strong); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 18px; margin: 0 0 14px; }
legend { color: var(--ink); font-size: 14px; font-weight: 600; padding: 0 6px; }
fieldset.radios { grid-template-columns: repeat(2, auto); justify-content: start; gap: 4px 28px; }
.drop input { padding: 26px; border: 2px dashed #e2b38e; background: #fff9f3; }
.req { color: var(--danger); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; } .grid2 .full { grid-column: 1 / -1; }
.grid2 > .card { margin-bottom: 20px; }

.err { color: var(--danger); font-weight: 500; }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; word-break: break-all; }
.pre { white-space: pre-wrap; }
.note { background: #f7f8fb; border: 1px solid var(--line); padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; background: var(--info-bg); color: var(--info); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* Tablas */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap.flat { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid #edf0f5; vertical-align: middle; font-size: 15px; }
th { background: #fafbfd; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: #fffaf4; }
td small { display: block; color: var(--muted); }
.vehicle { display: flex; align-items: center; gap: 12px; } .vehicle strong { display: block; }
.carlogo { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: inline-grid; place-items: center;
  font: 700 11px var(--display); color: var(--muted); flex-shrink: 0; }
.rowbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); }
.rowbtn:hover { border-color: var(--brand); color: var(--brand-text); text-decoration: none; }
.rowbtn .ic { width: 16px; height: 16px; }

/* Etiquetas */
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--muted); }
.st-pend { background: var(--warn-bg); color: var(--warn); }
.st-proc { background: var(--info-bg); color: var(--info); }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-ko { background: var(--danger-bg); color: var(--danger); }
.st-new { background: var(--brand-soft); color: var(--brand-text); }
.chip { display: inline-block; font-size: 13px; padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 6px; margin: 2px 0; background: #fff; }
.tag-off { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 1px 6px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); vertical-align: 1px; }
.tag-en { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }

/* Contadores del panel de administración (stats) y del taller (kpis) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font: 600 28px var(--display); color: var(--ink); }
a.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat.st-pend b { color: var(--warn); } .stat.st-ok b { color: var(--ok); } .stat.st-ko b { color: var(--danger); } .stat.st-proc b, .stat.st-new b { color: var(--info); }
.stat.st-pend, .stat.st-ok, .stat.st-ko, .stat.st-proc, .stat.st-new { background: var(--panel); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.kpi small { display: block; color: var(--muted); font-size: 14px; }
.kpi strong { display: block; font: 600 28px var(--display); }
.kpi-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.k-curso .kpi-ic { background: var(--warn-bg); color: var(--warn); } .k-ok .kpi-ic { background: var(--ok-bg); color: var(--ok); } .k-msg .kpi-ic { background: var(--info-bg); color: var(--info); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.rightcol { display: flex; flex-direction: column; gap: 18px; }
.tile { padding: 22px; } .tile h2 { font-size: 18px; margin-bottom: 8px; } .tile p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.tile-ic { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 14px; }
.tile.soft { background: #f1f3f7; }
.online { font-size: 13px; color: var(--ok); font-weight: 600; margin-bottom: 12px; }
.formats { display: block; text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Filtros y pestañas */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select { width: auto; flex: 1; min-width: 170px; margin: 0; }
.panel .filters { padding: 0 22px; justify-content: space-between; margin-bottom: 14px; }
.panel .filters .search { flex: 0 1 260px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.tabs button:hover { color: var(--ink); background: var(--bg); }
.tabs button.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

/* Portada */
.hero { text-align: center; padding: 64px 16px 36px; }
.hero h1 { font-size: 44px; letter-spacing: -.8px; }
.hero p { max-width: 660px; margin: 0 auto 26px; color: var(--muted); font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.steps div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 10px; font-family: var(--display); }
.steps h3 { color: var(--ink); font: 600 18px var(--display); text-transform: none; letter-spacing: 0; }
.steps p { color: var(--muted); margin: 0; }

/* Formulario de subida: avisos */
.offroad-box { border: 1px solid #f0d49a; background: #fffaf0; border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }
.offroad-box p { margin: 0 0 8px; font-size: 14px; }
.dtc-box { border: 1px solid var(--line); background: #fbfcfd; border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }
.dtc-box label { margin-bottom: 6px; } .dtc-box p { margin: 0; }
.dtc-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; } .dtc-list li { font-size: 14px; }

/* Barra de progreso (importación ECM) */
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.bar > div { height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* Historial y mensajes del pedido */
.ev-filters { display: flex; gap: 6px; flex-wrap: wrap; } .ev-filters .on { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.ev-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; max-height: 560px; overflow-y: auto; padding: 2px; }
.ev { background: #f7f8fb; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 85%; }
.ev-staff { align-self: flex-end; background: var(--brand-soft); border-color: #f6d3b6; }
.ev-system, .ev-file { max-width: 100%; align-self: stretch; background: transparent; border-style: dashed; font-size: 14px; }
.ev-revision { border-color: #f0d49a; background: #fffaf0; }
.ev-internal { border-style: dashed; border-color: #e0b552; background: #fffdf6; }
.ev-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; font-size: 14px; }
.ev-text { white-space: pre-wrap; word-break: break-word; } .ev-att { margin-top: 4px; }
.ev-form .row-between { align-items: flex-end; margin: 0; } .ev-form .grow { flex: 1; min-width: 200px; }
details.card summary { cursor: pointer; } details.card[open] summary { margin-bottom: 14px; }

/* ---------- Pantallas medianas y móvil ---------- */
@media (max-width: 1180px) {
  body.app { grid-template-columns: 220px minmax(0, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .rightcol { display: grid; grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 26px 24px 36px; } .topbar, footer { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 760px) {
  body.app { display: block; }
  .side { position: static; height: auto; padding: 14px 16px 10px; }
  .side .brand { padding: 0 0 12px; margin-bottom: 10px; }
  .navlabel, .side-bottom .service { display: none; }
  /* Menú en varias filas: ningún apartado queda escondido fuera de la pantalla */
  .sidenav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .sidenav a { padding: 8px 11px; font-size: 14px; gap: 7px; background: rgba(255, 255, 255, .05); }
  .sidenav .ic { width: 18px; height: 18px; }
  .side-bottom { padding-top: 10px; } .me { padding-top: 6px; }
  .topbar { height: auto; padding: 12px 16px; }
  main { padding: 22px 16px 32px; } footer { padding: 16px; }
  h1 { font-size: 26px; } main > .row-between h2, main > h2 { font-size: 24px; }
  .grid2, .rightcol { grid-template-columns: 1fr; }
  .kpis { gap: 10px; } .kpi { padding: 14px; gap: 10px; } .kpi strong { font-size: 24px; } .kpi-ic { width: 38px; height: 38px; }
  .panel .filters { flex-direction: column; align-items: stretch; } .panel .filters .search { flex: 1 1 auto; }
  .hero { padding: 40px 4px 24px; } .hero h1 { font-size: 32px; } .hero p { font-size: 16px; }
  .pubbar { padding: 14px 16px; }
  .ev { max-width: 100%; }
}
.spaced { margin-top: 12px; }

/* ---------- Gráficas de potencia y datos del taller ---------- */
.ok-msg { color: var(--ok); background: var(--ok-bg); border-radius: 8px; padding: 8px 12px; font-weight: 500; }
ul.plain { margin: 10px 0 0; padding-left: 18px; } ul.plain li { margin: 4px 0; }
.chart-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 14px; border: 1px solid #f6c79e; background: #fffaf5; border-radius: var(--radius); }
.chart-box .tile-ic { margin: 0; width: 40px; height: 40px; }
.chart-box > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.chart-box small { color: var(--muted); }
.chart-box.warn { border-color: #f0d9a6; background: var(--warn-bg); }
.logo-row { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; }
.logo-row .grow { flex: 1; margin: 0; }
.logo-preview { width: 120px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; flex-shrink: 0; }
.logo-preview.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.power-grid { display: grid; grid-template-columns: minmax(90px, auto) 1fr 1fr; gap: 8px 12px; align-items: center; }
.power-grid b { font-size: 13px; color: var(--muted); }
.power-grid input { margin: 0; }
@media (max-width: 760px) { .logo-row { flex-direction: column; align-items: stretch; } }
