/* style.css — estilos generales, formularios y micro-interacciones */
:root {
  --radius: 14px;
  --border: #e5e7eb;
  --muted: #6b7280;
  --fg: #0b0f19;
  --primary: #111827;
  --btn: #111827;
  --btn-hover: #0b0f19;
  --error: #e11d48;
  --focus: rgba(17,24,39,.15);
}

.container { width: min(1100px, 92vw); margin: 0 auto; padding: 28px 0; }
header.site, footer.site { padding: 16px 0; }
header.site .brand { display: flex; gap: 10px; align-items: center; }
header.site nav a { color: #111; text-decoration: none; margin-right: 14px; opacity: .75; }
header.site nav a:hover { opacity: 1; }

/* Tarjetas / paneles */
.card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.hero { padding: 24px; }

/* Formularios */
label { display:block; margin: 10px 0 6px; color: var(--fg); font-weight: 600; }
.field { position: relative; }
.field .icon-left { position:absolute; left:12px; top:50%; transform: translateY(-50%); width:18px; height:18px; color:#9ca3af; }
.field .icon-right { position:absolute; right:12px; top:50%; transform: translateY(-50%); width:18px; height:18px; color:#9ca3af; cursor: pointer; }
.input, input[type=text], input[type=password], input[type=email], input[type=file], input[type=number], textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 12px 14px 12px 40px;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
  background: #fff;
  color: var(--fg);
}
textarea { min-height: 120px; }
.input::placeholder, input::placeholder, textarea::placeholder { color: #9ca3af; }
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: #c7d2fe; box-shadow: 0 0 0 4px var(--focus);
}
.input.error, input.error, textarea.error, select.error { border-color: var(--error); }
.error-text { color: var(--error); font-size: 12px; margin-top: 6px; }

/* Botones (base) */
.btn {
  display:inline-flex;align-items:center;gap:.4em;
  border-radius:8px;padding:.5em 1em;font-weight:500;
  text-decoration:none;cursor:pointer;transition:background .2s;
}
.btn i { width:18px;height:18px; }

/* Utilidades */
.row { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.center { display:grid; place-items:center; }
.spacer { height: 18px; }
.muted { color: var(--muted); font-size: 14px; }

/* Layout simple */
main { padding: 22px 0 40px; }

/* --- Mejores accesibilidad y estados --- */
.btn:focus-visible,
.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #93c5fd;           /* azul claro sutil */
  outline-offset: 2px;
}
.btn[disabled], .btn:disabled {
  opacity: .6; cursor: not-allowed;
}

/* --- Variantes de botón (claros, no negros) --- */
.btn-blue { background:#2563eb; color:#fff; }
.btn-blue:hover { background:#1d4ed8; }

.btn-light { background:#f3f4f6; color:#111; }
.btn-light:hover { background:#e5e7eb; }

.btn-green { background:#16a34a; color:#fff; }     /* éxito/guardar */
.btn-green:hover { background:#15803d; }

.btn-red { background:#ef4444; color:#fff; }       /* eliminar/peligro */
.btn-red:hover { background:#dc2626; }

/* --- Inputs file con icono opcional --- */
input[type="file"].input { padding-left: 14px; } /* sin espacio de icon-left */
.field.no-icon .input { padding-left: 14px; }    /* usar .field.no-icon si no hay icono */

/* --- Tablas limpias --- */
.table { width:100%; border-collapse:collapse; }
.table th, .table td { padding:8px; border-bottom:1px solid #f1f5f9; text-align:left; }
.table th { border-bottom:1px solid var(--border); color:#374151; font-weight:600; }

/* --- Badges y pills --- */
.badge { display:inline-block; padding:.2em .6em; border-radius:999px; font-size:.85em; }
.badge.gray { background:#f3f4f6; color:#111; border:1px solid #e5e7eb; }
.badge.blue { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; }

/* --- Grid responsivo en móvil --- */
@media (max-width: 768px) {
  .row { grid-template-columns: 1fr; }
}

/* --- Kiosko/TV: toques más grandes (opcional) --- */
.kiosk .btn { padding:.7em 1.2em; font-size:1.05rem; }
.kiosk .input { padding: 14px 16px 14px 40px; font-size:1.05rem; }

/* Botón por defecto azul (no negro) */
:root{
  --primary:#2563eb;
  --btn:#2563eb;
  --btn-hover:#1d4ed8;
}

/* Tamaños y variantes */
.btn-sm { padding:.4em .8em; border-radius:10px; font-size:.92rem; }
.btn-outline { background:#fff; color:#111; border:1px solid var(--border); }
.btn-outline:hover { background:#f9fafb; }

/* Acciones compactas en la tabla */
.actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.actions .input,
.actions select { height:40px; padding:8px 12px; border-radius:12px; }
.actions .w-110 { width:110px; }
.actions .w-130 { width:130px; }
.actions .w-150 { width:150px; }
.actions .w-180 { width:180px; }
.actions .file { padding-left:12px; }         /* file sin icon-left */
.actions .btn { margin-left:2px; }

/* Que la celda no explote el layout */
.table td:last-child { width:1%; white-space:nowrap; }
@media (max-width: 960px){
  .table td:last-child { white-space:normal; }
  .actions { flex-direction:column; align-items:stretch; }
  .actions .w-110,.actions .w-130,.actions .w-150,.actions .w-180 { width:100%; }
}