/* ============================================================
   Paleta L'TOKE — los mismos colores exactos del buscador de
   precios que Hernan ya usa (~/Downloads/LTOKE Buscador NUEVO.html):
   navy #1E2D40 + rojo #C0141B. Vale para toda la app, la del
   taller y el panel de Hernan, para que sea una sola marca.
   ============================================================ */
:root {
  --bg-dark: #1E2D40;      /* navy de la marca */
  --bg-darker: #141E2B;
  --surface: #EEF2F5;
  --card: #FFFFFF;
  --border: #D7E0E6;
  --ink: #1C2733;
  --ink-soft: #64707B;
  --on-dark: #FFFFFF;
  --on-dark-soft: #C9D5E3;
  /* El acento de la marca es el rojo. Se sigue llamando --blue
     porque asi se llama en todas las plantillas; cambiarle el
     nombre no valia el riesgo de romper algo. */
  --blue: #C0141B;
  --blue-hover: #9E1015;
  --blue-light: #FDEAEA;
  --green: #1E8E5A;
  --green-light: #E7F5EE;
  --amber: #B4790A;
  --amber-light: #FBF1DE;
  --red: #C0141B;
  --red-light: #FDEAEA;
  --indigo: #1E2D40;
  --indigo-light: #E8EDF3;
  --whatsapp: #25D366;
  --whatsapp-hover: #1FB659;
}

.phone h1, .phone h2, .phone h3, .phone h4 { font-family: 'Space Grotesk', system-ui, sans-serif; }
.phone .price-lg { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.2px; }

/* ---- Logo de la marca ---- */
.brand-img { display:block; height:auto; }
.phone-brand .brand-img { width:112px; }           /* header navy de la app */
.brand-img-grande { width:190px; margin:0 auto 4px; }  /* pantallas de entrada */
.sidebar-brand .brand-img { width:118px; }         /* panel de Hernan */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', system-ui, sans-serif; margin: 0; text-wrap: balance; }
a { color: var(--blue); text-decoration: none; touch-action: manipulation; }
a:hover { color: var(--blue-hover); }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
button, a, .btn, .btn-outline, .btn-sm { -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; }

/* Quien pide menos movimiento en su sistema, no ve las animaciones de
   entrada/salida (fade, slide, pop) de tienda.css/tuttilitario.css ni
   ninguna otra transición del sitio -- vale para toda la app, no solo
   para una plantilla. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px; border-radius: 11px; border: none;
  background: var(--blue); color: white; font-weight: 700; font-size: 15px;
}
.btn:hover { background: var(--blue-hover); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border); color: var(--ink); font-weight: 600; font-size: 13.5px; padding: 13px;
}
.btn-sm { width: auto; padding: 9px 16px; font-size: 13px; }
.btn-disabled { background: oklch(0.9 0.006 90); color: oklch(0.6 0.008 90); }

.field {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14.5px; background: var(--card); color: var(--ink); outline: none;
}
.field:focus { border-color: var(--blue); }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; display: block; }

.badge { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge-ok { background: var(--green-light); color: var(--green); }
.badge-wait { background: var(--amber-light); color: var(--amber); }
.badge-danger { background: var(--red-light); color: var(--red); }
.badge-info { background: var(--indigo-light); color: var(--indigo); }
.badge-blue { background: var(--blue-light); color: var(--blue); }

.chip {
  padding: 8px 13px; border-radius: 18px; font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink-soft);
  white-space: nowrap; display: inline-block;
}
.chip-active { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }

/* --- mobile client shell --- */
.phone {
  position: relative;
  font-family: 'Public Sans', system-ui, sans-serif;
  /* height (no min-height) para que el hijo .phone-body pueda scrollear
     adentro y la barra de abajo quede fija al pie de la pantalla */
  width: 100%; max-width: 430px; margin: 0 auto; height: 100vh; background: var(--surface);
  display: flex; flex-direction: column;
}
.phone-header {
  background: var(--bg-dark); padding: 20px; display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.phone-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue) 35%, #E4444C 50%, var(--blue) 65%, transparent);
  opacity: .85;
}
.phone-brand { display: flex; align-items: center; gap: 9px; }
.phone-brand span { font-weight: 700; font-size: 16px; color: var(--on-dark); }
.phone-brand-logo { height: 34px; width: 34px; flex: none; background: #fff; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; }
.phone-back {
  padding: 16px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); background: var(--card);
}
/* flex:1 + min-height:0 = ocupa todo el alto que sobra y scrollea adentro,
   dejando la barra de abajo pegada al pie. (Antes tenia max-height:70vh,
   que cortaba la pantalla a media altura y dejaba un hueco gris debajo
   de la barra.) */
.phone-body { flex: 1; min-height: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
/* aire al final para que el boton flotante del carrito no tape la ultima tarjeta */
.phone-body:has(~ .phone-nav) { padding-bottom: 78px; }
.phone-footer { padding: 16px 20px 26px; border-top: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.phone-nav { display: flex; justify-content: space-around; padding: 12px 10px 16px; border-top: 1px solid var(--border); background: var(--card); }
.navitem { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--ink-soft); }
.navitem.active { color: var(--blue); }

.phone-searchwrap { background: var(--bg-darker); padding: 0 20px 14px; }
.phone-searchbox {
  display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px;
  padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--border);
  transition: box-shadow .15s;
}
.phone-searchbox:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 3px var(--blue-light); }
.phone-searchbox input { border: none; outline: none; flex: 1; font-size: 15px; color: var(--ink); background: transparent; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(20,30,50,.06); }
.card-row { display: flex; gap: 12px; }
.thumb {
  position: relative; overflow: hidden;
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 9px; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.thumb-lg { position: relative; overflow: hidden; }
.thumb-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--card); }

/* Solo dentro de .phone (la app del taller) -- el panel usa las mismas
   clases .card/.thumb para otras cosas y no se pidio tocarlo. */
.phone a.card { transition: box-shadow .15s, transform .15s, border-color .15s; }
.phone a.card:hover, .phone a.card:active {
  box-shadow: 0 6px 18px rgba(20,30,50,.12); transform: translateY(-1px); border-color: var(--border);
}
.phone .thumb img, .phone .thumb-lg img { transition: transform .25s ease; }
.phone a.card:hover .thumb img { transform: scale(1.08); }

.code-chip {
  display: inline-block; background: var(--bg-dark); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; letter-spacing: .3px; width: fit-content;
}
.price-lg { font-weight: 800; color: var(--bg-dark); font-size: 15px; white-space: nowrap; }
.desc { font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.brandline { font-size: 12px; color: var(--ink-soft); }

.fab-cart {
  /* absolute (no fixed) para que quede pegado a la tarjeta de la app y no
     a la ventana: con fixed, en una pantalla ancha el boton se iba al
     borde derecho del monitor, lejos de la app. .phone es position:
     relative, asi que este absolute se ancla ahi adentro.
     bottom alto: la barra de abajo mide ~68px y si no le tapa "Pedidos". */
  position: absolute; right: 14px; bottom: 82px; z-index: 25;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #E4444C, var(--blue)); color: #fff;
  border: none; box-shadow: 0 4px 16px rgba(192,20,27,.45);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.fab-cart:hover { box-shadow: 0 6px 20px rgba(192,20,27,.55); transform: translateY(-1px); }
.fab-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  background: #fff; color: var(--blue); border-radius: 999px; font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* --- desktop panel shell --- */
.panel { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex-shrink: 0; background: var(--bg-darker); display: flex; flex-direction: column; padding: 22px 14px; }
.sidebar-brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; margin-bottom: 30px; }
.sidebar-brand span { font-family: 'Space Grotesk'; font-weight: 700; font-size: 15px; color: var(--on-dark); }
.navlink { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--on-dark-soft); }
.navlink.active { background: var(--blue); color: white; }
.panel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.panel-topbar { padding: 20px 30px; border-bottom: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: space-between; }
.panel-content { flex: 1; overflow: auto; padding: 26px 30px; display: flex; flex-direction: column; gap: 22px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.kpi-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.kpi-label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-family: 'Space Grotesk'; font-size: 26px; font-weight: 700; margin-top: 6px; }

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; font-weight: 700; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; padding: 0 14px 10px; }
td { padding: 12px 14px; font-size: 13px; border-top: 1px solid var(--border); }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--surface); }

.panel-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.panel-card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

.stepper { display: flex; align-items: center; }
.step { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.step-circle { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step-line { flex: 1; height: 2px; margin: 0 8px 22px; background: var(--border); }
.step-line.done { background: var(--green); }

.callout { border-radius: 12px; padding: 13px 16px; font-size: 12.5px; line-height: 1.5; }
.callout-amber { background: var(--amber-light); color: oklch(0.4 0.09 65); border: 1px solid oklch(0.82 0.07 65); }
.callout-green { background: var(--green-light); color: oklch(0.4 0.1 152); border: 1px solid oklch(0.85 0.06 152); }

.qty-btn { width: 28px; height: 28px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
  .panel { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 12px 16px; overflow-x: auto; }
  .sidebar-brand { margin-bottom: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Titulos de seccion y estados vacios de la pantalla de Inicio (combos) */
.phone .seccion-titulo{
  font-size:11.5px;font-weight:800;color:var(--ink-soft);
  text-transform:uppercase;letter-spacing:.06em;
  margin:2px 2px 2px;
}
.phone .vacio-chico{
  font-size:12.5px;color:var(--ink-soft);line-height:1.5;
  background:var(--card);border:1px dashed var(--border);
  border-radius:12px;padding:14px 16px;
}

/* ---- Buscador por auto (marca/modelo/año) del catalogo ---- */
.phone .auto-box{
  padding:0 16px 10px;display:flex;flex-direction:column;gap:8px;
  background:var(--bg-dark);
}
.phone .auto-form{display:flex;gap:8px;}
.phone .auto-form input[type=text],
.phone .auto-form select{
  flex:1;min-width:0;height:44px;border-radius:12px;
  border:none;padding:0 14px;font-size:14px;font-family:inherit;
  background:#fff;color:var(--ink);
}
.phone .auto-form select{appearance:none;font-weight:700;}
.phone .auto-btn{
  border:none;border-radius:12px;padding:0 18px;height:44px;
  background:var(--red);color:#fff;font-weight:800;font-size:14px;
  font-family:inherit;cursor:pointer;
}
.phone .auto-activo{
  display:flex;align-items:center;gap:9px;
  background:rgba(255,255,255,.12);color:#fff;
  border-radius:12px;padding:11px 14px;font-size:14px;
}
.phone .auto-quitar{
  color:#fff;opacity:.75;font-size:12px;font-weight:700;
  text-decoration:underline;flex-shrink:0;
}

/* ---- Panel de combos (armar kits para los clientes) ---- */
.combo-cols{display:grid;grid-template-columns:1fr 340px;gap:14px;align-items:start;}
@media (max-width:900px){ .combo-cols{grid-template-columns:1fr;} }
.panel-input{
  padding:8px 11px;border-radius:9px;border:1px solid var(--border);
  background:var(--card);font-size:13px;font-family:inherit;color:var(--ink);
  outline:none;
}
.panel-input:focus{border-color:var(--blue);}

/* ---- Entrar al panel de Hernan ---- */
.login-panel{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:24px;
}
.login-card{
  background:var(--card);border-radius:16px;padding:28px;
  width:100%;max-width:370px;
  box-shadow:0 10px 40px rgba(0,0,0,.28);
}
.login-card .label{display:block;font-size:12px;font-weight:700;margin-bottom:6px;}
.login-card .field{
  width:100%;height:44px;border-radius:10px;border:1px solid var(--border);
  padding:0 13px;font-size:14px;font-family:inherit;background:var(--card);color:var(--ink);
}
.login-card .field:focus{outline:none;border-color:var(--blue);}
.login-card .btn{width:100%;justify-content:center;}

/* ---- emblema de marca (circulo de color + iniciales) ----
   No son los logos reales de las automotrices -- son marcas registradas.
   Se usa en los chips de marca de la app del taller y de la tienda
   publica. El color y las iniciales salen solos del nombre
   (vehiculos.color_de_marca / sigla_de_marca), no hay lista aparte. */
.marca-emblema{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:50%;flex-shrink:0;
  color:#fff;font-size:10px;font-weight:800;letter-spacing:-.02em;line-height:1;
}
.marca-emblema-chico{ width:20px;height:20px;font-size:8.5px; }

/* ---- Elegir marca / modelo con chips (dentro de la caja navy del auto) ---- */
.phone .auto-omarca{
  font-size:11px;font-weight:700;color:var(--on-dark-soft);
  text-transform:uppercase;letter-spacing:.05em;margin:4px 2px 0;
}
.phone .auto-chips{
  display:flex;flex-wrap:wrap;gap:6px;
}
/* los modelos de una marca pueden ser muchos (VW tiene 32): ahi si scrollea */
.phone .auto-chips-scroll{ max-height:168px; overflow-y:auto; }
.phone .auto-chip{
  display:inline-flex;align-items:center;gap:5px;
  background:rgba(255,255,255,.13);color:#fff;
  border-radius:9px;padding:8px 11px;
  font-size:12.5px;font-weight:600;line-height:1;
}
.phone .auto-chip:hover{background:rgba(255,255,255,.24);color:#fff;}
.phone .auto-chip-n{
  font-size:10.5px;font-weight:700;opacity:.62;
}

/* aviso cuando el buscador corrigió lo escrito o buscó con menos palabras */
.phone .aviso-busqueda{
  font-size:12px;line-height:1.45;color:var(--ink);
  background:var(--amber-light);border-radius:10px;padding:9px 12px;
}

/* ---- Pantalla de configuracion del panel ---- */
.cfg-label{display:block;font-size:12.5px;font-weight:700;margin-bottom:7px;}
.cfg-fila{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.cfg-porc{font-size:13px;font-weight:700;color:var(--ink-soft);}
.cfg-ayuda{font-size:12px;color:var(--ink-soft);}

/* ---- Acciones sobre un pedido (panel_pedido.html) ---- */
.acciones-pedido {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.acc-envio { display: flex; flex-direction: column; gap: 5px; }
.acc-envio label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }

.btn-chico {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; border-radius: 9px; padding: 10px 15px;
  font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  background: var(--bg-dark); color: #fff; text-decoration: none; white-space: nowrap;
}
.btn-chico:hover { opacity: .88; }
.btn-verde { background: var(--green-light); color: var(--green); cursor: default; }
.btn-marcar-pago { background: var(--amber-light); color: var(--amber); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-hover); opacity: 1; }
