/* =====================================================================
   CLICK SISTEMA — Hoja de estilos (web de gestión + portal + login)
   Tema oscuro profesional · acento naranja #ff6600 · azul #1a365d
   Sin frameworks: CSS puro, tipografía del sistema, responsive.
   ===================================================================== */

:root {
  --bg: #0d1117;
  --bg-2: #111827;
  --panel: #161d29;
  --panel-2: #1c2533;
  --panel-3: #222c3d;
  --borde: #2a3446;
  --borde-claro: #38445c;
  --texto: #e8edf5;
  --texto-suave: #9aa7bd;
  --texto-tenue: #6b7789;
  --naranja: #ff6600;
  --naranja-suave: #ff8533;
  --naranja-oscuro: #cc5200;
  --naranja-10: rgba(255, 102, 0, 0.10);
  --naranja-20: rgba(255, 102, 0, 0.20);
  --azul: #1a365d;
  --azul-claro: #2b5797;
  --azul-10: rgba(43, 87, 151, 0.18);
  --verde: #22c55e;
  --verde-10: rgba(34, 197, 94, 0.12);
  --rojo: #ef4444;
  --rojo-10: rgba(239, 68, 68, 0.12);
  --ambar: #f59e0b;
  --ambar-10: rgba(245, 158, 11, 0.12);
  --celeste: #38bdf8;
  --celeste-10: rgba(56, 189, 248, 0.12);
  --violeta: #a78bfa;
  --violeta-10: rgba(167, 139, 250, 0.12);
  --radio: 14px;
  --radio-chico: 9px;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.35);
  --fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

a { color: var(--naranja); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* ---------- Utilidades ---------- */
.oculto { display: none !important; }
.texto-suave { color: var(--texto-suave); }
.texto-tenue { color: var(--texto-tenue); }
.texto-verde { color: var(--verde); }
.texto-rojo { color: var(--rojo); }
.texto-naranja { color: var(--naranja); }
.texto-ambar { color: var(--ambar); }
.mono { font-family: var(--mono); }
.derecha { text-align: right; }
.centrado { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radio-chico);
  border: 1px solid var(--borde-claro);
  background: var(--panel-2);
  color: var(--texto);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: #4a5872; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primario {
  background: linear-gradient(180deg, var(--naranja-suave), var(--naranja));
  border-color: var(--naranja);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.btn-primario:hover { background: linear-gradient(180deg, #ff944d, #ff701a); border-color: #ff8c4d; }

.btn-azul { background: var(--azul); border-color: var(--azul-claro); color: #fff; }
.btn-azul:hover { background: var(--azul-claro); }

.btn-peligro { background: var(--rojo-10); border-color: #7f1d1d; color: #fca5a5; }
.btn-peligro:hover { background: rgba(239, 68, 68, 0.25); }

.btn-verde { background: var(--verde-10); border-color: #166534; color: #86efac; }
.btn-verde:hover { background: rgba(34, 197, 94, 0.25); }

.btn-chico { padding: 0.28rem 0.6rem; font-size: 0.8rem; border-radius: 7px; }
.btn-grande { padding: 0.8rem 1.6rem; font-size: 1rem; }

.btn-icono {
  padding: 0.45rem;
  background: transparent;
  border: none;
  color: var(--texto-suave);
  border-radius: 8px;
  cursor: pointer;
}
.btn-icono:hover { background: var(--panel-3); color: var(--texto); }
.btn-icono svg { width: 19px; height: 19px; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem; }
.campo label { font-size: 0.82rem; font-weight: 600; color: var(--texto-suave); letter-spacing: 0.02em; }
.campo label .req { color: var(--naranja); }

input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="email"], input[type="search"], input[type="tel"],
select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--borde);
  border-radius: var(--radio-chico);
  color: var(--texto);
  font: inherit;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px var(--naranja-10);
}
input::placeholder, textarea::placeholder { color: var(--texto-tenue); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--naranja); cursor: pointer; }
select option { background: var(--panel-2); }
textarea { resize: vertical; min-height: 70px; }

.campo-check { flex-direction: row; align-items: center; gap: 0.5rem; cursor: pointer; }
.campo-check label { cursor: pointer; font-weight: 500; color: var(--texto); }

.fila { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: flex-end; }
.fila > .campo { flex: 1; min-width: 160px; }
.fila .campo-grow { flex: 2; }

.ayuda { font-size: 0.8rem; color: var(--texto-tenue); margin-top: 0.25rem; }

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.tarjeta h3 { margin-top: 0; }

.grilla-tarjetas {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.grilla-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Tarjeta de estadística */
.stat {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--borde);
  border-left: 4px solid var(--naranja);
  border-radius: var(--radio);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat .stat-titulo { font-size: 0.8rem; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .stat-valor { font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.stat .stat-detalle { font-size: 0.82rem; color: var(--texto-tenue); }
.stat.azul { border-left-color: var(--azul-claro); }
.stat.verde { border-left-color: var(--verde); }
.stat.rojo { border-left-color: var(--rojo); }
.stat.ambar { border-left-color: var(--ambar); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-azul { background: var(--azul-10); color: #7fb0ff; border: 1px solid #2b4a7a; }
.badge-naranja { background: var(--naranja-10); color: #ffab6e; border: 1px solid #7a4a1f; }
.badge-verde { background: var(--verde-10); color: #86efac; border: 1px solid #1d5c3a; }
.badge-rojo { background: var(--rojo-10); color: #fca5a5; border: 1px solid #7f1d1d; }
.badge-ambar { background: var(--ambar-10); color: #fcd34d; border: 1px solid #78551a; }
.badge-celeste { background: var(--celeste-10); color: #7dd3fc; border: 1px solid #1d4a66; }
.badge-violeta { background: var(--violeta-10); color: #c4b5fd; border: 1px solid #4a3a75; }
.badge-gris { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid #3a4a5e; }

.punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.punto-verde { background: var(--verde); box-shadow: 0 0 6px var(--verde); }
.punto-rojo { background: var(--rojo); box-shadow: 0 0 6px var(--rojo); }
.punto-ambar { background: var(--ambar); box-shadow: 0 0 6px var(--ambar); }
.punto-naranja { background: var(--naranja); box-shadow: 0 0 6px var(--naranja); }

/* ---------- Tablas ---------- */
.tabla-scroll { overflow-x: auto; border-radius: var(--radio); border: 1px solid var(--borde); }
table.tabla {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 0.9rem;
  min-width: 600px;
}
.tabla th {
  text-align: left;
  padding: 0.65rem 0.8rem;
  background: var(--panel-2);
  color: var(--texto-suave);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--borde);
  white-space: nowrap;
}
.tabla td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--borde);
  vertical-align: middle;
}
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla tbody tr:hover { background: var(--panel-2); }
.tabla tr.fila-baja { background: var(--rojo-10); }
.tabla tr.fila-baja:hover { background: rgba(239, 68, 68, 0.18); }
.tabla .acciones { display: flex; gap: 0.35rem; justify-content: flex-end; }

.vacio {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--texto-tenue);
  font-size: 0.95rem;
}
.vacio svg { width: 38px; height: 38px; opacity: 0.45; margin-bottom: 0.5rem; }

/* ---------- Barra superior de la app ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 1rem;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.topbar .logo { height: 34px; width: auto; border-radius: 6px; }
.topbar .titulo { font-weight: 800; font-size: 1.02rem; letter-spacing: 0.02em; }
.topbar .titulo span { color: var(--naranja); }
.topbar .espacio { flex: 1; }

/* Campanita de notificaciones */
.campana { position: relative; }
.campana .contador {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--naranja);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.desplegable {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 92vw);
  background: var(--panel-2);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  z-index: 60;
  overflow: hidden;
}
.desplegable .cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--borde);
  font-weight: 700;
  font-size: 0.9rem;
}
.lista-notif { max-height: 380px; overflow-y: auto; }
.notif-item {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--borde);
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.notif-item:hover { background: var(--panel-3); }
.notif-item .punto { margin-top: 6px; flex: none; }
.notif-item .titulo { font-weight: 700; font-size: 0.88rem; }
.notif-item .mensaje { font-size: 0.82rem; color: var(--texto-suave); }
.notif-item .fecha { font-size: 0.72rem; color: var(--texto-tenue); margin-top: 2px; }

/* Menú usuario */
.menu-usuario { position: relative; }
.usuario-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--borde);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.usuario-chip:hover { background: var(--panel-3); }
.usuario-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--naranja), var(--azul-claro));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.8rem;
}
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  background: none;
  border: none;
  color: var(--texto);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.menu-item:hover { background: var(--panel-3); color: var(--naranja); }
.menu-item.rojo:hover { color: var(--rojo); }

/* ---------- Layout SPA ---------- */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 220px;
  flex: none;
  background: var(--bg-2);
  border-right: 1px solid var(--borde);
  padding: 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 51px;
  height: calc(100vh - 51px);
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radio-chico);
  color: var(--texto-suave);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--panel-2); color: var(--texto); }
.nav-item.activo {
  background: var(--naranja-10);
  color: var(--naranja);
  border: 1px solid var(--naranja-20);
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-seccion { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-tenue); padding: 0.9rem 0.75rem 0.3rem; }

.contenido {
  flex: 1;
  padding: 1.2rem 1.4rem;
  max-width: 1300px;
  min-width: 0;
}
.pagina-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.pagina-header h1 { margin: 0; flex: 1; min-width: 200px; }
.pagina-header .acciones { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Buscadores / barras ---------- */
.barra-busqueda {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.barra-busqueda .buscar { position: relative; flex: 1; min-width: 220px; }
.barra-busqueda .buscar input { padding-left: 2.3rem; }
.barra-busqueda .buscar svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--texto-tenue);
  pointer-events: none;
}

/* ---------- Autocompletar ---------- */
.autocompletar { position: relative; }
.lista-autocompletar {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel-2);
  border: 1px solid var(--borde-claro);
  border-radius: var(--radio-chico);
  box-shadow: var(--sombra);
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
}
.lista-autocompletar .opcion {
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--borde);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.lista-autocompletar .opcion:last-child { border-bottom: none; }
.lista-autocompletar .opcion:hover, .lista-autocompletar .opcion.sel { background: var(--naranja-10); }

/* ---------- Modal ---------- */
.modal-fondo {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(3px);
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  overflow-y: auto;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--borde-claro);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  width: 100%;
  max-width: 640px;
  animation: aparecer 0.16s ease-out;
}
.modal.modal-ancho { max-width: 880px; }
.modal.modal-chico { max-width: 420px; }
@keyframes aparecer {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal .modal-cab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--borde);
}
.modal .modal-cab h3 { margin: 0; flex: 1; font-size: 1.05rem; }
.modal .modal-cuerpo { padding: 1.1rem; max-height: 70vh; overflow-y: auto; }
.modal .modal-pie {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--borde);
  flex-wrap: wrap;
}
.modal-cerrar { border: none; background: none; color: var(--texto-suave); font-size: 1.3rem; cursor: pointer; padding: 0.2rem 0.45rem; border-radius: 6px; }
.modal-cerrar:hover { background: var(--panel-3); color: var(--texto); }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(360px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--borde-claro);
  border-left: 4px solid var(--celeste);
  border-radius: var(--radio-chico);
  padding: 0.75rem 0.9rem;
  box-shadow: var(--sombra);
  font-size: 0.9rem;
  animation: entrar 0.2s ease-out;
}
@keyframes entrar {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}
.toast.ok { border-left-color: var(--verde); }
.toast.error { border-left-color: var(--rojo); }
.toast.aviso { border-left-color: var(--ambar); }
.toast .toast-msg { flex: 1; }
.toast .toast-cerrar { background: none; border: none; color: var(--texto-tenue); cursor: pointer; font-size: 1rem; padding: 0; }

/* ---------- Login ---------- */
.fondo-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.5rem;
  background:
    radial-gradient(1000px 500px at 80% -10%, var(--naranja-10), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, var(--azul-10), transparent 60%),
    var(--bg);
}
.login-tarjeta { width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 1.1rem; }
.login-logo img { width: 86px; height: auto; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.login-logo h1 { font-size: 1.25rem; margin: 0.7rem 0 0.2rem; }
.login-logo h1 span { color: var(--naranja); }
.login-logo p { margin: 0; color: var(--texto-suave); font-size: 0.85rem; }

/* ---------- Portal público ---------- */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.portal-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem 1rem;
  flex-wrap: wrap;
}
.portal-header img.logo { height: 40px; border-radius: 8px; }
.portal-header .marca { font-weight: 800; line-height: 1.2; }
.portal-header .marca .chica { display: block; font-size: 0.72rem; color: var(--texto-suave); font-weight: 600; }
.portal-header .espacio { flex: 1; }
.pestanas { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pestana {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  color: var(--texto-suave);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.pestana:hover { color: var(--texto); background: var(--panel-2); }
.pestana.activa { background: var(--naranja-10); color: var(--naranja); border-color: var(--naranja-20); }

.portal-contenido { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.3rem 1rem 2.5rem; }
.portal-hero {
  background: linear-gradient(135deg, var(--azul) 0%, #0f1c30 60%, var(--bg-2) 100%);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.6rem 1.5rem;
  margin-bottom: 1.3rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}
.portal-hero h1 { margin: 0 0 0.3rem; font-size: 1.4rem; }
.portal-hero p { margin: 0; color: var(--texto-suave); }
.portal-hero .ctas { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.9rem; }

.catalogo-grilla {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.prod-tarjeta {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s, transform 0.1s;
}
.prod-tarjeta:hover { border-color: var(--borde-claro); transform: translateY(-2px); }
.prod-tarjeta .nombre { font-weight: 700; font-size: 0.95rem; }
.prod-tarjeta .detalle { font-size: 0.82rem; color: var(--texto-suave); }
.prod-tarjeta .precio { font-size: 1.25rem; font-weight: 800; color: var(--naranja); margin-top: auto; padding-top: 0.5rem; }
.prod-tarjeta .pie { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--texto-tenue); }

.aviso-legal {
  background: var(--azul-10);
  border: 1px solid #2b4a7a;
  border-radius: var(--radio-chico);
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  color: #a9c3ea;
  margin: 1rem 0;
}

/* Acceso cliente */
.acceso-panel { max-width: 560px; margin: 0 auto; }
.codigo-input {
  display: flex;
  gap: 0.6rem;
}
.codigo-input input {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1.1rem;
  text-align: center;
  flex: 1;
}

/* Galería evidencias */
.galeria {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.galeria figure {
  margin: 0;
  background: var(--panel-2);
  border: 1px solid var(--borde);
  border-radius: var(--radio-chico);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.galeria figure .media { aspect-ratio: 4/3; background: #000; display: flex; align-items: center; justify-content: center; }
.galeria figure img, .galeria figure video { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria figure figcaption { padding: 0.45rem 0.6rem; font-size: 0.76rem; color: var(--texto-suave); }
.galeria figure figcaption b { display: block; color: var(--texto); font-size: 0.8rem; }

/* Items de venta / equipos */
.tabla-items input, .tabla-items select { margin: 0; padding: 0.35rem 0.5rem; font-size: 0.85rem; min-width: 60px; }

/* Timeline de estados */
.timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.timeline .paso {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radio-chico);
  background: var(--panel-2);
  border: 1px solid var(--borde);
  cursor: pointer;
  font-size: 0.9rem;
}
.timeline .paso:hover { border-color: var(--naranja); }
.timeline .paso.actual { border-color: var(--naranja); background: var(--naranja-10); font-weight: 700; }
.timeline .paso .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex: none;
}
.timeline .paso.actual .num { background: var(--naranja); color: #fff; }

/* Comprobante */
.comprobante-marco {
  border: 1px solid var(--borde);
  border-radius: var(--radio-chico);
  background: #fff;
  overflow: hidden;
}
.comprobante-marco iframe {
  width: 100%;
  height: 70vh;
  border: none;
  background: #fff;
  display: block;
}

/* Detalle órdenes: secciones plegables */
.detalle-seccion { border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; margin-bottom: 1rem; }
.detalle-seccion > .cab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: var(--panel-2);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
}
.detalle-seccion > .cab:hover { background: var(--panel-3); }
.detalle-seccion > .cab .flecha { margin-left: auto; transition: transform 0.15s; color: var(--texto-tenue); }
.detalle-seccion.abierta > .cab .flecha { transform: rotate(90deg); }
.detalle-seccion > .cuerpo { padding: 1rem; border-top: 1px solid var(--borde); }
.detalle-seccion:not(.abierta) > .cuerpo { display: none; }

/* ---------- Pie ---------- */
.pie {
  text-align: center;
  padding: 1.2rem 1rem;
  color: var(--texto-tenue);
  font-size: 0.78rem;
  border-top: 1px solid var(--borde);
}
.pie .naranja { color: var(--naranja); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 51px;
    bottom: 0;
    width: 250px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 55;
    box-shadow: var(--sombra);
    height: auto;
  }
  .sidebar.abierta { transform: none; }
  .velo-menu {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 14, 0.6);
    z-index: 50;
  }
  .contenido { padding: 1rem 0.85rem; }
  .usuario-chip .nombre { display: none; }
  .portal-hero { padding: 1.2rem; }
  .modal .modal-cuerpo { max-height: 62vh; }
  .topbar .titulo { font-size: 0.92rem; }
}

@media (min-width: 901px) {
  .btn-menu-movil { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--borde-claro); }

/* Spinner de carga */
.cargando {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 2.5rem 1rem;
  color: var(--texto-suave);
}
.rueda {
  width: 30px;
  height: 30px;
  border: 3px solid var(--panel-3);
  border-top-color: var(--naranja);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Código de acceso destacado */
.codigo-destacado {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--naranja);
  background: var(--bg-2);
  border: 1px dashed var(--naranja);
  border-radius: var(--radio-chico);
  padding: 0.9rem 1rem;
  text-align: center;
  user-select: all;
  word-break: break-all;
}

/* Foto publicitaria del catálogo */
.prod-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #2a2a2a;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip {
  background: #333;
  border: 1px solid #ff6600;
  color: #ffaa66;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 11px;
}
