/* Viontek · estilo vidrio (administrador) */
:root {
  --azul: #1E3046;
  --acero: #253D57;
  --rojo: #A02924;
  --grafito: #484F5E;
  --claro: #F5F5F5;
  --texto: #F4F6FA;
  --texto-2: #B7C1D1;
  --vidrio: rgba(255, 255, 255, 0.08);
  --vidrio-borde: rgba(255, 255, 255, 0.16);
  --radio: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: #0f1a28;
  -webkit-font-smoothing: antialiased;
}
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 90% at 10% 0%, #2a4466 0%, #16243a 45%, #0d1624 100%); }
.fondo span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; }
.fondo span:nth-child(1) { width: 480px; height: 480px; background: #2f5a8a; top: -120px; right: -80px; }
.fondo span:nth-child(2) { width: 380px; height: 380px; background: var(--rojo); bottom: -160px; left: 20%; opacity: .25; }
.fondo span:nth-child(3) { width: 320px; height: 320px; background: #4a6b8f; top: 40%; left: -120px; opacity: .3; }

a { color: #9cc3ff; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
p { color: var(--texto-2); line-height: 1.5; }
.sub { color: var(--texto-2); margin: 0 0 24px; }

/* Menú lateral */
.menu {
  position: fixed; inset: 16px auto 16px 16px; width: 248px;
  display: flex; flex-direction: column; gap: 16px; padding: 16px;
  background: var(--vidrio); border: 1px solid var(--vidrio-borde); border-radius: 24px;
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.marca { background: #fff; border-radius: 14px; padding: 10px 12px; }
.marca img { display: block; width: 100%; height: auto; }
.menu nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--texto-2); text-decoration: none; font-weight: 500;
}
.menu nav a:hover { background: rgba(255,255,255,.06); color: var(--texto); }
.menu nav a.activo { background: rgba(255,255,255,.14); color: #fff; }
.usuario { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--vidrio-borde); }
.usuario > div:nth-child(2) { flex: 1; min-width: 0; }
.usuario strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario small { color: var(--texto-2); font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--acero); display: grid; place-items: center; font-weight: 600; border: 1px solid var(--vidrio-borde); }

.contenido { padding: 32px 32px 48px; }
.con-menu .contenido { margin-left: 280px; max-width: 1180px; }

/* Tarjetas de vidrio */
.card {
  background: var(--vidrio); border: 1px solid var(--vidrio-borde); border-radius: var(--radio);
  padding: 20px; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.grid.dos { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi .card small { color: var(--texto-2); font-size: 13px; }
.kpi .card .numero { font-size: 36px; font-weight: 600; margin-top: 6px; letter-spacing: -.02em; }

.encabezado { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--vidrio-borde);
  background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn:hover { background: rgba(255,255,255,.16); }
.btn.primario { background: var(--rojo); border-color: transparent; }
.btn.primario:hover { background: #b8302a; }
.btn.chico { padding: 7px 12px; min-height: 36px; font-size: 14px; }
.icono { background: none; border: 0; color: var(--texto-2); cursor: pointer; padding: 6px; border-radius: 8px; }
.icono:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Formularios */
form.formulario { display: grid; gap: 14px; }
.fila { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: grid; gap: 6px; font-size: 14px; color: var(--texto-2); font-weight: 500; }
input, textarea, select {
  font: inherit; color: #fff; background: rgba(8, 16, 28, .45);
  border: 1px solid var(--vidrio-borde); border-radius: 12px; padding: 11px 12px; min-height: 44px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid #6fa2e0; outline-offset: 1px; }
textarea { min-height: 90px; resize: vertical; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--texto); }
label.check input { width: 20px; height: 20px; min-height: 0; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ayuda { font-size: 13px; color: var(--texto-2); font-weight: 400; }

/* Tablas y listas */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tabla th { color: var(--texto-2); font-weight: 500; font-size: 13px; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla a { color: #fff; font-weight: 600; text-decoration: none; }
.tabla a:hover { text-decoration: underline; }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lista li:last-child { border-bottom: 0; }
.lista small, .tenue { color: var(--texto-2); }
.etiqueta { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--texto); }
.vacio { color: var(--texto-2); padding: 12px 0; }

.aviso { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.aviso.ok { background: rgba(46, 160, 90, .18); border-color: rgba(46,160,90,.5); }
.aviso.error { background: rgba(160, 41, 36, .25); border-color: rgba(220,80,70,.6); }

/* Inicio de sesión */
.sin-menu .contenido { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.acceso { width: 100%; max-width: 420px; }
.acceso .marca { margin-bottom: 20px; }
.acceso h1 { font-size: 22px; text-align: center; }
.acceso .sub { text-align: center; }
.selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; background: rgba(8,16,28,.4); padding: 6px; border-radius: 14px; }
.selector a { text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--texto-2); font-weight: 600; }
.selector a.activo { background: rgba(255,255,255,.16); color: #fff; }

/* Celular */
@media (max-width: 860px) {
  .menu { inset: auto 10px 10px 10px; width: auto; flex-direction: row; align-items: center; padding: 8px; gap: 8px; border-radius: 20px; z-index: 10; }
  .menu .marca, .usuario > div:nth-child(2), .usuario .avatar { display: none; }
  .menu nav { flex-direction: row; justify-content: space-around; }
  .menu nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 8px 10px; }
  .usuario { border: 0; padding: 0; }
  .con-menu .contenido { margin-left: 0; padding: 20px 16px 110px; }
  h1 { font-size: 24px; }
  .tabla .ocultar-movil { display: none; }
  .grid.kpi { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .kpi .card { padding: 14px; }
  .kpi .card .numero { font-size: 28px; }
  .kpi .card small { font-size: 12px; }
}

h3.mini { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-2); margin: 16px 0 4px; font-weight: 600; }

/* ---------- Pantallas del técnico: fondo sólido, alto contraste, botones grandes ---------- */
.modo-tecnico .fondo { background: #121c2b; }
.modo-tecnico .fondo span { display: none; }
.modo-tecnico .contenido { max-width: 760px; }
.modo-tecnico .card, .modo-tecnico .t-punto, .modo-tecnico .t-equipo, .modo-tecnico .t-hallazgo {
  backdrop-filter: none; -webkit-backdrop-filter: none; background: #1d2a3d; border: 1px solid #33445e; }
.modo-tecnico label { color: #dfe6f0; }
.modo-tecnico input, .modo-tecnico textarea, .modo-tecnico select { background: #0e1724; border-color: #3f5272; font-size: 17px; }
.t-cabecera { margin-bottom: 18px; }
.t-cabecera h1 { font-size: 26px; }
.t-cabecera p { margin: 2px 0; color: #c3cddb; }
.t-volver { display: inline-block; color: #9cc3ff; text-decoration: none; font-weight: 600; margin-bottom: 8px; font-size: 16px; }
.t-punto { border-radius: 16px; padding: 16px; margin-bottom: 12px; display: grid; gap: 12px; }
.t-texto { font-weight: 600; font-size: 17px; display: flex; gap: 10px; align-items: baseline; color: #fff; }
.t-num { min-width: 28px; height: 28px; border-radius: 50%; background: #2f4566; display: inline-grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; }
.t-ticket { display: block; }
.t-ticket input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-ticket span { display: block; text-align: center; padding: 16px; border-radius: 14px; border: 2px solid #3f5272; font-weight: 700; font-size: 18px; color: #c3cddb; cursor: pointer; }
.t-ticket input:checked + span { background: #1f7a45; border-color: #2ea862; color: #fff; }
.t-valor { display: flex; align-items: center; gap: 10px; }
.t-valor span { font-weight: 700; color: #c3cddb; min-width: 40px; }
.t-opciones { display: flex; gap: 8px; flex-wrap: wrap; }
.t-opciones label { flex: 1; min-width: 80px; }
.t-opciones input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-opciones span { display: block; text-align: center; padding: 14px 10px; border-radius: 14px; border: 2px solid #3f5272; font-weight: 700; font-size: 16px; color: #c3cddb; cursor: pointer; }
.t-opciones input:checked + span { background: #2f5a8a; border-color: #6fa2e0; color: #fff; }
.t-punto details summary { cursor: pointer; color: #9cc3ff; font-weight: 600; padding: 4px 0; }
.t-punto details textarea { margin-top: 8px; }
.t-grande { width: 100%; min-height: 56px; font-size: 18px; margin-top: 6px; }
.t-estado { text-align: center; color: #9fb0c6; font-size: 14px; }
.t-foto { width: 100%; min-height: 54px; font-size: 17px; }
.t-equipo { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; margin-bottom: 10px; color: #fff; text-decoration: none; font-size: 17px; }
.t-equipo small { color: #a9b6c8; font-size: 14px; }
.t-hallazgo { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px; border-radius: 14px; margin-bottom: 10px; }
.t-hallazgo img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.t-hallazgo:not(:has(img)) { grid-template-columns: 1fr; }
.t-avance { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: #c3cddb; }
.t-barra { flex: 1; height: 12px; border-radius: 6px; background: #22324a; overflow: hidden; }
.t-barra span { display: block; height: 100%; background: linear-gradient(90deg, #2f5a8a, #2ea862); }
.t-ayuda { color: #c3cddb; text-align: center; margin: 18px 0 6px; }
.t-firma { width: 100%; height: 220px; background: #fff; border-radius: 14px; touch-action: none; }
.prio-alta { background: #A02924; } .prio-media { background: #b5700f; } .prio-baja { background: #2e7d4f; }

/* ---------- Etiqueta QR imprimible ---------- */
.etiqueta-qr { background: #fff; color: #1E3046; width: 300px; margin: 0 auto 14px; padding: 16px; border-radius: 16px; text-align: center; }
.etq-logo { width: 220px; display: block; margin: 0 auto 6px; }
#qr svg { display: block; margin: 0 auto; }
.etq-nombre { font-weight: 700; font-size: 18px; margin-top: 6px; }
.etq-datos { font-size: 13px; color: #484F5E; }
@media print {
  body { background: #fff !important; }
  .fondo, .menu, .no-imprimir, .aviso { display: none !important; }
  .con-menu .contenido { margin: 0; padding: 0; }
  .etiqueta-qr { border: 1px dashed #999; border-radius: 0; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
