:root {
  --bg: #0a0c0f;
  --bg2: #101318;
  --card: #151920;
  --card2: #1c212a;
  --line: #272d37;
  --text: #eef0f3;
  --muted: #8d96a3;
  --amber: #ffb020;
  --amber2: #ff8a00;
  --amber-soft: rgba(255, 176, 32, .12);
  --red: #e5383b;
  --red-soft: rgba(229, 56, 59, .12);
  --ok: #3ad08a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 4.5vw, 34px); font-weight: 900; }
h2 { font-size: clamp(18px, 3vw, 22px); font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1380px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.hc-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 15, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hc-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 12px; }
.logo { font-weight: 900; font-size: 18px; letter-spacing: .02em; color: var(--text); white-space: nowrap; }
.logo i { font-style: normal; color: var(--amber); }
.logo:hover { text-decoration: none; }
.hc-nav { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.hc-nav a { color: var(--muted); padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.hc-nav a:hover { color: var(--text); text-decoration: none; background: var(--card); }
.hc-nav a.active { color: var(--amber); }
@media (max-width: 560px) { .hc-header .wrap { gap: 8px; } .hc-nav { gap: 0; } .hc-nav a { padding: 8px 5px; font-size: 12.5px; } .logo { font-size: 15px; } }
@media (max-width: 380px) { .hc-nav a { padding: 8px 4px; font-size: 12px; } .logo { font-size: 14px; } }

.hc-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0; color: var(--muted); font-size: 13px; }
.hc-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card2); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .05s, background .15s, border-color .15s;
}
.btn:hover { border-color: #3a414d; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--amber), var(--amber2)); color: #1a1205; border: 0; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { background: var(--red-soft); color: #ff8a8c; border-color: rgba(229,56,59,.4); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.big { padding: 11px 18px; font-size: 14px; font-weight: 800; letter-spacing: .04em; }

label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; }
.check input { width: auto; accent-color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--amber); text-decoration: none; }
.chip.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 20px; font-weight: 800; }
.stat span { color: var(--muted); font-size: 13px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.badge.signed { background: var(--amber); color: #1a1205; }
.badge.owner { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge.pending { background: var(--red-soft); color: #ff8a8c; border: 1px dashed rgba(229,56,59,.5); }
.badge.net { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255,176,32,.4); }
.badge.free { background: var(--card2); color: var(--muted); }
.badge.example { background: var(--red-soft); color: #ff8a8c; }

/* ---------- hero / consulta ---------- */
.hero { padding: 28px 0 16px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 520px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(255,176,32,.20), transparent 70%) 20% 50% / 520px 360px no-repeat,
    radial-gradient(closest-side, rgba(229,56,59,.16), transparent 70%) 85% 40% / 440px 320px no-repeat;
}
.hero .wrap { position: relative; }
.kicker { color: var(--amber); font-weight: 800; letter-spacing: .14em; font-size: 12px; text-transform: uppercase; margin-bottom: 10px; }
.lookup { max-width: 380px; margin-top: 18px; }
.lookup .card { padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.plate-input {
  font-size: 19px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-align: center;
  background: #f4f5f7; color: #111; border: 3px solid #1a1a1a; border-top: 9px solid #1f4fbf; border-radius: 7px; padding: 5px 10px;
}
.plate-input:focus { border-color: #1a1a1a; border-top-color: #1f4fbf; box-shadow: 0 0 0 3px var(--amber-soft); }
.plate-input::placeholder { color: #9aa1ab; }
.digits { display: flex; gap: 10px; }
.digits input { width: 46px; height: 46px; text-align: center; font-size: 20px; font-weight: 800; text-transform: uppercase; }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; }
.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-top: 12px; }
.msg.err { background: var(--red-soft); border: 1px solid rgba(229,56,59,.4); color: #ffb3b4; }
.msg.ok { background: rgba(58,208,138,.1); border: 1px solid rgba(58,208,138,.35); color: #9ff0c8; }
.msg.info { background: var(--amber-soft); border: 1px solid rgba(255,176,32,.35); color: #ffd27a; }

.plate-badge {
  display: inline-block; background: #f4f5f7; color: #111; font-weight: 900; letter-spacing: .12em;
  border: 3px solid #1a1a1a; border-top: 8px solid #1f4fbf; border-radius: 7px; padding: 2px 12px; font-size: 19px;
}

/* ---------- historial ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.rec { position: relative; padding-left: 44px; margin-bottom: 12px; }
.rec::before {
  content: ''; position: absolute; left: 8px; top: 20px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--muted);
}
.rec.is-signed::before { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 12px rgba(255,176,32,.6); }
.rec .card { padding: 14px 16px; }
.rec.is-signed .card { border-color: rgba(255,176,32,.35); }
.rec-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.rec-km { font-size: 16px; font-weight: 800; }
.rec-type { font-weight: 700; font-size: 14px; }
.rec-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- talleres ---------- */
.ws-map { height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 900px) { .ws-map { height: 420px; } }
.ws-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.ws-card:hover { border-color: #3a414d; }
.ws-card.net { border: 1px solid rgba(255,176,32,.55); background: linear-gradient(180deg, rgba(255,176,32,.07), transparent 60%), var(--card); padding: 18px; }
.ws-card.free { padding: 10px 14px; opacity: .85; }
.ws-card.free h3 { font-size: 15px; font-weight: 600; }
.ws-card .dist { color: var(--muted); font-size: 13px; white-space: nowrap; }
.leaflet-container { background: #1a1d22; font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; padding: 22px; position: relative; }
.modal.wide { max-width: 860px; }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; background: var(--card2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100% - 32px); }
.toast.err { border-color: rgba(229,56,59,.6); }
.toast.ok { border-color: rgba(58,208,138,.6); }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg2); }
tr:last-child td { border-bottom: 0; }
td.wrap-text { white-space: normal; min-width: 180px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.low td { color: #ffb3b4; }

/* ---------- panel (app) ---------- */
.app { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 60px); }
@media (min-width: 900px) { .app { grid-template-columns: 230px 1fr; } }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 10px; }
.side a { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.side a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.side a.active { background: var(--amber-soft); color: var(--amber); }
.side .ws-name { padding: 6px 12px 14px; font-weight: 800; }
@media (max-width: 899px) {
  .side { display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 60px; z-index: 20; }
  .side .ws-name { display: none; }
  .side a { white-space: nowrap; padding: 8px 10px; }
}
.main { padding: 22px 16px 60px; min-width: 0; }
@media (min-width: 900px) { .main { padding: 28px 32px 60px; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-slot { margin: 14px 0; }
.ad-slot a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ad-slot img { display: block; width: 100%; height: auto; max-height: 160px; object-fit: cover; }
.ad-slot .ad-txt { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; color: var(--text); }
.ad-label { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.pick-map { height: 360px; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; }

/* ---------- publicidad: banner arriba / abajo + columna derecha ---------- */
.page-grid { max-width: 1380px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.page-main .wrap { max-width: none; }
.page-main { min-width: 0; }
.page-side { padding: 16px; }
@media (min-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 8px; }
  .page-side { padding: 20px 16px 20px 0; position: sticky; top: 52px; align-self: start; }
}
.ad { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); color: var(--text); }
.ad:hover { border-color: var(--amber); text-decoration: none; }
.ad img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad .ad-txt { padding: 12px 14px; }
.banner-h { height: 90px; max-width: 970px; margin: 0 auto; }
.banner-v { height: 250px; }
.side-logos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (min-width: 1100px) { .side-logos { grid-template-columns: 1fr; } }
.side-logo { height: 64px; }
.side-logo img { object-fit: contain; }
.side-banner { margin-top: 12px; }
.ad-ph { border: 1px dashed #3a414d; border-radius: 10px; color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; }
.ad-ph.logo { height: 64px; }
@media (max-width: 600px) { .banner-h { height: 60px; } }

/* banner a todo el ancho, marcas pasando de derecha a izquierda */
.ad-top, .ad-bottom { width: 100%; }
.ad-bottom { margin-top: 28px; }
.marquee { overflow: hidden; height: 90px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.ad-bottom .marquee { border-top: 1px solid var(--line); }
.marquee-track { display: flex; width: max-content; height: 100%; animation: hc-marquee var(--dur, 20s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .ad { flex: none; width: max(220px, 33.333vw); height: 100%; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--bg2); }
.marquee .ad img { object-fit: contain; padding: 10px 18px; }
@keyframes hc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
@media (max-width: 600px) { .marquee { height: 64px; } }

/* inicio: empresas al lado del formulario */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); } .hero-side { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .hero-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr) 260px; gap: 28px; } .hero-side { grid-column: auto; } }
.hero-news { padding-top: 4px; }
.news { padding: 14px 16px; margin-top: 6px; }
.news + .news { margin-top: 10px; }
.news img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.news-date { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 4px; }
.news h3 { font-size: 16px; margin-bottom: 6px; }
.news p { margin-bottom: 8px; }
/* logos: la caja toma la forma del logo, sin franjas a los costados */
.side-logo { height: auto; }
.side-logo img { height: auto; object-fit: initial; }
.hub-on { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

/* ---------- Mi cuenta del taller: sin cajas, una acción principal y una lista ---------- */
.acct { max-width: 760px; margin: 0 auto; padding: 8px 0 40px; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.acct-name { font-size: 22px; font-weight: 800; }
.acct-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.acct-tools { display: flex; gap: 16px; font-size: 13px; white-space: nowrap; }
.acct-tools a { color: var(--muted); }
.acct-tools a:hover { color: var(--text); }
.acct-cta { border-left: 3px solid var(--amber); padding: 6px 0 6px 18px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.acct-cta b { display: block; font-size: 17px; }
.acct-cta span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.acct-list { border-top: 1px solid var(--line); }
.acct-row { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.acct-row:hover { text-decoration: none; background: rgba(255,255,255,.03); }
.acct-ic { font-size: 18px; width: 26px; text-align: center; }
.acct-txt { flex: 1; min-width: 0; }
.acct-txt b { display: block; font-weight: 600; font-size: 15px; }
.acct-txt span { display: block; color: var(--muted); font-size: 12px; }
.acct-arrow { color: var(--muted); font-size: 20px; }
.acct-back { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.acct-big { font-size: 18px; font-weight: 700; margin: 6px 0 14px; }
.acct-form { margin-top: 10px; }

/* ---------- Software del taller: listas con líneas finas, sin cajas dentro de cajas ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec-t { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 8px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
@media (min-width: 1000px) { .cols2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.kpis { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.kpis > * { flex: 1 1 150px; padding: 14px 16px; border-right: 1px solid var(--line); color: var(--text); }
.kpis > *:last-child { border-right: 0; }
.kpis a:hover { text-decoration: none; background: rgba(255,255,255,.03); }
.kpis b { display: block; font-size: 22px; font-weight: 800; }
.kpis span span, .kpis a span { color: var(--muted); font-size: 12px; }

.list { border-top: 1px solid var(--line); }
.lrow { display: flex; align-items: center; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
a.lrow:hover { text-decoration: none; background: rgba(255,255,255,.03); }
.lrow-k { color: var(--muted); font-size: 12px; font-weight: 700; min-width: 64px; white-space: nowrap; }
.lrow-m { flex: 1; min-width: 0; }
.lrow-m b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-m span { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-r { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lempty { color: var(--muted); padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.debt { color: #ff8a8c; }
.okc { color: var(--ok); }
.danger-txt { color: #ff8a8c; }

.st { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.st-diagnostico, .st-en_reparacion { color: var(--amber); border-color: rgba(255,176,32,.45); }
.st-esperando_repuesto { color: #ff8a8c; border-color: rgba(229,56,59,.45); }
.st-terminado { color: var(--ok); border-color: rgba(58,208,138,.45); }
.st-entregado { color: var(--muted); }
.st-cancelado { color: var(--muted); text-decoration: line-through; }
.st-b-aceptado { color: var(--ok); border-color: rgba(58,208,138,.45); }
.st-b-rechazado { color: #ff8a8c; border-color: rgba(229,56,59,.45); }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 0; overflow-x: auto; border-top: 1px solid var(--line); padding-bottom: 8px; }
.kcol { border-right: 1px solid var(--line); padding: 10px; min-height: 300px; }
.kcol:last-child { border-right: 0; }
.kcol-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.kcount { margin-left: auto; color: var(--text); }
.kcard { border-bottom: 1px solid var(--line); padding: 10px 2px; }
.kcard-main { display: block; color: var(--text); }
.kcard-main:hover { text-decoration: none; }
.kcard-main b { display: block; font-size: 15px; }
.kcard-main span { display: block; font-size: 12px; color: var(--muted); }
.kcard-act { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.kempty { color: var(--muted); font-size: 13px; }

.stbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.doc-meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plate-badge.sm { font-size: 12px; padding: 0 7px; border-width: 2px; border-top-width: 5px; border-radius: 5px; }
.doc { margin-top: 6px; }
.totals { display: flex; justify-content: flex-end; gap: 24px; align-items: center; flex-wrap: wrap; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.totals b { font-size: 18px; }
.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.irows { border-top: 1px solid var(--line); }
.irow { display: grid; grid-template-columns: 90px minmax(0, 1.3fr) minmax(0, 1.5fr) 80px 110px 100px 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.irow[data-kind=mano_obra] { grid-template-columns: 90px minmax(0, 2.8fr) 80px 110px 100px 36px; }
.irow-k { font-size: 12px; color: var(--muted); font-weight: 700; }
.irow-sub { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .irow, .irow[data-kind=mano_obra] { grid-template-columns: 1fr 1fr; } .irow-k { grid-column: 1 / -1; } }
.wp-block { border-left: 3px solid var(--amber); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.wp-title { font-weight: 700; margin-bottom: 8px; }
.chip.sm { padding: 5px 11px; font-size: 12px; }

@media print {
  .hc-header, .side, .ad-top, .ad-bottom, .head-actions, .acct-back, .doc-actions, .page-side { display: none !important; }
  body { background: #fff; color: #000; }
  .app { display: block; }
  .main { padding: 0; }
  .lrow, .list, .totals { border-color: #ccc; }
  .lrow-m span, .muted { color: #444 !important; }
}
.side-g { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #5d6571; padding: 14px 12px 4px; }
@media (max-width: 899px) { .side-g { display: none; } }

/* ---------- Etapa C: estadísticas, buscador, mano de obra ---------- */
.irow.has-sel { grid-template-columns: 90px minmax(0, 1.3fr) minmax(0, 1.5fr) 80px 110px 100px 36px; }
@media (max-width: 760px) { .irow.has-sel { grid-template-columns: 1fr 1fr; } }
.vbars { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 0 4px; overflow-x: auto; overflow-y: hidden; }
.vbar { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vbar-b { width: 70%; max-width: 46px; background: var(--amber); border-radius: 4px 4px 0 0; }
.vbar:hover .vbar-b { filter: brightness(1.15); }
.vbar-v { font-size: 11px; color: var(--text); white-space: nowrap; margin-bottom: 4px; min-height: 14px; }
.vbar-l { font-size: 11px; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--line); width: 100%; text-align: center; }
.vbars + .cols2 { margin-top: 30px; }
.hbar { display: block; height: 6px; background: transparent; margin-top: 5px; }
.hbar span { display: block; height: 100%; background: var(--amber); border-radius: 0 4px 4px 0; }
.cat-row { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.cat-main { min-width: 0; }
.cat-main > b { font-size: 15px; margin-right: 8px; }

/* ---------- buscador para elegir (vehículo, cliente, producto, proveedor) ---------- */
.picker { position: relative; min-width: 0; }
.pk-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1500; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; max-height: 280px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,.5); min-width: 240px; }
.pk-opt { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pk-opt:last-child { border-bottom: 0; }
.pk-opt:hover, .pk-opt.on { background: var(--amber-soft); }
.pk-opt b { display: block; font-weight: 600; font-size: 14px; }
.pk-opt span { display: block; color: var(--muted); font-size: 12px; }
.pk-none { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.pk-row { display: flex; align-items: center; gap: 6px; position: relative; }
.pk-ic { position: absolute; left: 10px; font-size: 13px; opacity: .7; pointer-events: none; }
.pk-row .pk-in { padding-left: 32px; flex: 1; min-width: 0; }
.pk-btn { white-space: nowrap; }

/* ---------- Taller simple: 3 columnas y líneas a mano ---------- */
.kanban.k3 { grid-auto-columns: minmax(240px, 1fr); }
.st-esperando { color: var(--muted); }
.st-en_reparacion { color: var(--amber); border-color: rgba(255,176,32,.45); }
.slines { border-top: 1px solid var(--line); }
.sline { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sline [data-f=desc] { flex: 1; min-width: 0; }
.sline-p { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.sline-p input { width: 130px; text-align: right; }
.kcard { cursor: pointer; }
.kcard[draggable=true] { cursor: grab; }
.kcard:hover { background: rgba(255,255,255,.03); }
.kcard > b { display: block; font-size: 15px; }
.kcard > span { display: block; font-size: 12px; color: var(--muted); }
.kcard.dragging { opacity: .4; }
.kcol.drop { background: var(--amber-soft); }
.pop-order { min-height: 200px; }

/* ---------- ventana única del auto ---------- */
.chip.wbtn { border-radius: 8px; padding: 9px 16px; }
.chip.wbtn.sm { padding: 6px 12px; }
.sl-desc { position: relative; flex: 1; min-width: 0; }
.sl-desc input { width: 100%; }
.finish { margin-top: 20px; padding-top: 4px; border-top: 2px solid var(--amber); }

/* Taller: cada auto es una tarjeta-botón (rectángulo con puntas redondeadas) */
.kcol { padding: 10px 10px 14px; }
.kcard { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; transition: border-color .15s, transform .05s; }
.kcard:hover { background: var(--card2); border-color: var(--amber); }
.kcard:active { transform: translateY(1px); }
.kcol[data-col=terminado] .kcard { border-color: rgba(58,208,138,.35); }

/* Taller: color del recuadro según la columna */
.kcol[data-col=esperando] .kcard { border: 2px solid #e5383b; }
.kcol[data-col=en_reparacion] .kcard { border: 2px solid #ffd21f; }
.kcol[data-col=terminado] .kcard { border: 2px solid #3ad08a; }
.kcard:hover { filter: brightness(1.12); }
.pk-row .pk-in { padding-left: 10px; }
.kcol[data-col=esperando] .kcard { background: rgba(229,56,59,.08); }
.kcol[data-col=en_reparacion] .kcard { background: rgba(255,210,31,.07); }
.kcol[data-col=terminado] .kcard { background: rgba(58,208,138,.08); }

/* Caja: filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.filters input[type=date] { width: auto; }
.filters #fQ { width: 240px; }
.filters select { width: auto; }
.filters-q { display: flex; gap: 6px; }
.arq-g { margin-bottom: 14px; }
.arq-gh { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 2px solid var(--line); }
@media print { .filters, .tabs, .acct-cta { display: none !important; } }

/* cheques y cuenta corriente */
.cheque-box { border-left: 3px solid var(--amber); padding: 2px 0 2px 14px; margin: 10px 0 14px; }
.ch-cartera { color: var(--amber); border-color: rgba(255,176,32,.45); }
.ch-depositado { color: #8fb8ff; border-color: rgba(143,184,255,.45); }
.ch-cobrado { color: var(--ok); border-color: rgba(58,208,138,.45); }
.ch-rechazado { color: #ff8a8c; border-color: rgba(229,56,59,.45); }
.ccdet { padding-left: 24px; background: rgba(255,255,255,.02); }

/* ---------- página del Software ---------- */
.sw-hero { padding: 40px 0 30px; position: relative; overflow: hidden; }
.sw-hero::before { content: ''; position: absolute; inset: -30% -10% auto; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,176,32,.16), transparent 70%) 15% 40% / 560px 380px no-repeat,
              radial-gradient(closest-side, rgba(229,56,59,.12), transparent 70%) 90% 30% / 420px 320px no-repeat; }
.sw-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 960px) { .sw-hero-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.sw-hero h1 { font-size: clamp(26px, 4.2vw, 42px); max-width: 680px; }
.sw-lead { font-size: 16px; color: var(--muted); max-width: 620px; }
.sw-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.sw-login .card { padding: 18px; }
.sw-sec { padding: 34px 16px; border-top: 1px solid var(--line); }
.sw-sec h2 { font-size: clamp(20px, 3vw, 28px); }
.sw-sec p { max-width: 760px; }
.sw-feat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: center; }
@media (min-width: 960px) { .sw-feat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sw-feat.rev > :first-child { order: 2; } }
.sw-list { padding-left: 18px; margin: 10px 0 0; }
.sw-list li { margin-bottom: 8px; }
.sw-shot { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.sw-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 960px) { .sw-two { grid-template-columns: 1fr 1fr; } }
.sw-sign { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sw-sign-k { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.sw-sign-r { border-left: 3px solid var(--amber); padding: 8px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sw-sign-r span { font-size: 13px; color: var(--muted); }
.sw-sign-r .badge { align-self: flex-start; color: #1a1205; }
.sw-badge-box { background: var(--card); border: 1px solid rgba(255,176,32,.55); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.sw-badge-box .badge { align-self: flex-start; }
.sw-badge-box b { font-size: 18px; }
.sw-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 10px; }
.sw-more div { border-left: 3px solid var(--amber); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 4px; }
.sw-more span { color: var(--muted); font-size: 13px; }
.sw-price { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.sw-price h2 { font-size: clamp(28px, 4vw, 40px); color: var(--amber); margin: 4px 0 8px; }

/* Consulta del historial: patente más corta y todo centrado */
#lookupForm .field > label { text-align: center; }
#lookupForm .plate-input { display: block; width: 100%; max-width: 172px; margin: 0 auto; padding: 5px 4px; }
#lookupForm .digits { justify-content: center; }
#lookupForm .help { text-align: center; }

/* Inicio: pestañas Ver historial / Registrar mi auto */
.lk-tabs { display: flex; gap: 4px; background: var(--bg, #0b0d10); border: 1px solid var(--line, #2a2f37); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.lk-tabs button { flex: 1; background: none; border: 0; color: var(--muted, #9aa1ab); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 6px; border-radius: 7px; cursor: pointer; }
.lk-tabs button.on { background: var(--amber); color: #111; }
#lookupForm .reg-only .field > label { text-align: left; }
