/* TallerOS — identidad Talleres Cubamotor: negro, grafito y oro. Compartido por la web pública y el dashboard. */
:root {
  --fondo: #0a0a0b;
  --fondo-2: #111113;
  --superficie: #16161a;
  --superficie-2: #1e1e23;
  --borde: #2b2b31;
  --borde-fuerte: #3a3a42;
  --texto: #f3efe6;
  --texto-2: #b8b2a6;
  --texto-3: #8a857c;
  --oro: #d6a83e;
  --oro-claro: #f2d27c;
  --oro-oscuro: #9a7220;
  --oro-degradado: linear-gradient(135deg, #f6dc8c 0%, #d6a83e 45%, #a87b22 100%);
  --oro-suave: rgba(214, 168, 62, .12);
  --verde: #4cc38a;
  --verde-suave: rgba(76, 195, 138, .14);
  --azul: #6aa9ff;
  --azul-suave: rgba(106, 169, 255, .14);
  --rojo: #ff6b6b;
  --rojo-suave: rgba(255, 107, 107, .13);
  --gris-suave: rgba(184, 178, 166, .12);
  --radio: 14px;
  --radio-s: 10px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .45);
  --titular: "Oswald", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto); font: 15px/1.5 var(--cuerpo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--oro-claro); }
h1, h2, h3, .titular { font-family: var(--titular); font-weight: 600; letter-spacing: .02em; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
h2 { font-size: 22px; text-transform: uppercase; }
h3 { font-size: 17px; }
.oro { background: var(--oro-degradado); -webkit-background-clip: text; background-clip: text; color: transparent; }
.atenuado { color: var(--texto-2); }
.pequeno { font-size: 13px; color: var(--texto-3); }
.oculto { display: none !important; }
.fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fila.entre { justify-content: space-between; }
.pila { display: flex; flex-direction: column; gap: 12px; }
.rejilla { display: grid; gap: 16px; }

/* Tarjetas */
.tarjeta {
  background: linear-gradient(180deg, var(--superficie) 0%, var(--fondo-2) 100%);
  border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px;
}
.tarjeta.realce { border-color: rgba(214, 168, 62, .35); box-shadow: inset 0 1px 0 rgba(242, 210, 124, .08); }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radio-s); border: 1px solid var(--borde-fuerte); background: var(--superficie-2);
  color: var(--texto); font: 600 15px var(--cuerpo); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.boton:hover { border-color: var(--oro); }
.boton:active { transform: translateY(1px); }
.boton:disabled { opacity: .5; cursor: not-allowed; }
.boton.primario { background: var(--oro-degradado); color: #1a1406; border: 0; }
.boton.primario:hover { filter: brightness(1.06); }
.boton.peligro { color: var(--rojo); border-color: rgba(255, 107, 107, .4); background: var(--rojo-suave); }
.boton.fantasma { background: transparent; }
.boton.grande { min-height: 52px; font-size: 16px; padding: 0 24px; }
.boton.peq { min-height: 36px; padding: 0 12px; font-size: 14px; }
.boton:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--oro-claro); outline-offset: 2px;
}

/* Formularios */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--texto-2); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--radio-s); border: 1px solid var(--borde-fuerte);
  background: var(--fondo-2); color: var(--texto); font: 16px var(--cuerpo);
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--oro); flex: none; }
label.casilla { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--texto-2); }
.campos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.error-campo { color: var(--rojo); font-size: 14px; }

/* Etiquetas de estado */
.estado { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado.pendiente { color: var(--oro-claro); background: var(--oro-suave); }
.estado.confirmada { color: var(--verde); background: var(--verde-suave); }
.estado.en_curso { color: var(--azul); background: var(--azul-suave); }
.estado.completada { color: var(--texto-2); background: var(--gris-suave); }
.estado.cancelada, .estado.no_presentado { color: var(--rojo); background: var(--rojo-suave); }

/* Chips seleccionables (servicios, días, horas) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 14px; border-radius: var(--radio-s); border: 1px solid var(--borde-fuerte);
  background: var(--fondo-2); color: var(--texto); cursor: pointer; font: 600 15px var(--cuerpo); text-align: left;
}
.chip:hover { border-color: var(--oro); }
.chip[aria-pressed="true"] { background: var(--oro-suave); border-color: var(--oro); color: var(--oro-claro); }
.chip:disabled { opacity: .35; cursor: not-allowed; }

/* Avisos */
.aviso { padding: 12px 14px; border-radius: var(--radio-s); border: 1px solid var(--borde); background: var(--superficie-2); }
.aviso.error { border-color: rgba(255, 107, 107, .45); background: var(--rojo-suave); color: #ffd2d2; }
.aviso.ok { border-color: rgba(76, 195, 138, .45); background: var(--verde-suave); color: #c9f3dd; }
.aviso.info { border-color: rgba(214, 168, 62, .4); background: var(--oro-suave); color: var(--oro-claro); }

.tostadas { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; display: flex;
  flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.tostada { padding: 12px 16px; border-radius: var(--radio-s); background: #232329; border: 1px solid var(--borde-fuerte);
  box-shadow: var(--sombra); animation: entra .2s ease; }
.tostada.error { border-color: rgba(255, 107, 107, .6); }
.tostada.ok { border-color: rgba(76, 195, 138, .6); }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

/* Tablas */
.tabla-env { overflow-x: auto; border: 1px solid var(--borde); border-radius: var(--radio); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--texto-3); text-transform: uppercase; font-size: 12px;
  letter-spacing: .05em; background: var(--fondo-2); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--borde); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tr.clicable { cursor: pointer; }

/* Diálogo */
dialog { border: 1px solid var(--borde-fuerte); border-radius: var(--radio); background: var(--superficie); color: var(--texto);
  padding: 0; width: min(640px, 94vw); max-height: 92vh; box-shadow: var(--sombra); }
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(2px); }
.dialogo-cab { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px;
  border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: var(--superficie); z-index: 1; }
.dialogo-cuerpo { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dialogo-pie { padding: 16px 20px; border-top: 1px solid var(--borde); display: flex; gap: 10px; justify-content: flex-end;
  flex-wrap: wrap; position: sticky; bottom: 0; background: var(--superficie); }

.cargando { color: var(--texto-3); padding: 24px; text-align: center; }
.vacio { color: var(--texto-3); padding: 28px; text-align: center; border: 1px dashed var(--borde-fuerte); border-radius: var(--radio); }
