:root {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #f2e9d8;
  --accent: #c9973f;
  --accent-soft: #e8c990;
  --panel: rgba(24, 18, 10, 0.82);
  --panel-border: rgba(226, 201, 144, 0.20);
  --danger: #ff9d85;
  --success: #b7d98a;
}
* { box-sizing: border-box; }

/* ---------- Fondo con la foto del complejo ---------- */
html, body { min-height: 100vh; margin: 0; }
body {
  padding: 2rem 1rem;
  background-image:
    linear-gradient(180deg, rgba(12,8,4,0.88) 0%, rgba(14,10,5,0.93) 45%, rgba(11,8,4,0.97) 100%),
    url('assets/fondo-pasillo-web.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}
@media (max-width: 768px) {
  body { background-attachment: scroll; } /* fixed es costoso/inestable en moviles */
}

.shell { width: min(100%, 1040px); margin: 0 auto; }

/* ---------- Marca / encabezado corporativo ---------- */
.brand-header { text-align: center; margin-bottom: 1.5rem; }
.brand-header .corp-logo {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .5rem 1.1rem; border-radius: 999px;
  background: rgba(226, 201, 144, 0.08); border: 1px solid var(--panel-border);
  font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent-soft);
}
.brand-header .corp-logo img { height: 22px; width: auto; display: block; }

.header-logo { height: 44px; width: auto; display: block; margin-bottom: .5rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

/* ---------- Tarjetas ---------- */
.card {
  padding: 1.85rem;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.03);
}
.login-card { max-width: 440px; margin: 8vh auto 0; }

.app-header { display: flex; gap: 1rem; align-items: start; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; }
.eyebrow { margin: 0; color: var(--accent-soft); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: .25rem 0 .5rem; font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -0.01em; }
h2 { margin: .25rem 0 .75rem; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.subtitle, .hint { color: #c9b89a; line-height: 1.55; }
.hint { margin: .75rem 0 0; font-size: .9rem; }

form { display: grid; gap: .6rem; margin-top: 1.25rem; }
label { font-weight: 600; font-size: .92rem; }
input, select, textarea, button { width: 100%; border-radius: 10px; font: inherit; }
input, select, textarea {
  padding: .8rem .9rem; border: 1px solid #6b5a3f; background: rgba(18, 13, 7, 0.75); color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226,201,144,0.22);
}
button {
  margin-top: .5rem; border: 0; padding: .9rem 1.1rem; cursor: pointer;
  color: #241705; background: linear-gradient(180deg, #f0d9a8, var(--accent));
  font-weight: 700; letter-spacing: .01em;
  transition: transform .08s ease, box-shadow .15s ease;
}
button:hover { box-shadow: 0 8px 22px rgba(226,201,144,0.35); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary { width: auto; color: #f2e6cf; background: rgba(74, 58, 32, 0.85); }
button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; transform: none; }

/* ---------- Indicador de pasos (con navegacion real entre paginas) ---------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem;
  margin: 1.5rem 0; padding: 0; list-style: none; color: #a8987d; font-size: .85rem;
}
.steps li { padding: .65rem .4rem; border-bottom: 3px solid #4a3f2c; text-align: center; }
.steps li.active { color: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.steps li.done { color: var(--success); border-color: #4f8f61; }
.step-card { margin: 1rem 0; }

/* ---------- Panel de estadisticas (para que no se vea vacio) ---------- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1.25rem 0 0; }
.stat-pill {
  padding: .9rem 1rem; border-radius: 12px; background: rgba(226,201,144,0.07);
  border: 1px solid var(--panel-border); text-align: left;
}
.stat-pill .stat-value { display: block; font-size: 1.7rem; font-weight: 800; color: var(--accent-soft); line-height: 1.1; }
.stat-pill .stat-label { font-size: .75rem; color: #b3a382; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Grids de equipamiento / tarifas ---------- */
/* =====================================================================
   PANEL DE EQUIPAMIENTO — layout de 2 zonas (catalogo + tarjeta del
   investigador), inspirado en dashboards tipo "panel claro + sidebar
   de color". El catalogo usa fondo claro (contraste intencional con
   el resto del sitio, oscuro); la tarjeta lateral usa el mismo ambar
   de marca pero en tono mas profundo, para distinguir "zona de accion"
   de "zona de identidad" sin salirse de la paleta general del sitio.
   ===================================================================== */
.equip-layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: 1.25rem; align-items: start; margin: 1rem 0; }

.equip-catalog-panel {
  background: linear-gradient(165deg, #faf6ee, #efe6d2);
  color: #2b2013;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.equip-catalog-panel h2 { color: #2b2013; margin-top: 0; }
.equip-catalog-panel .panel-subtitle { color: #6b5a3f; margin: 0 0 .5rem; }
.equip-catalog-panel .hint-dark { color: #6b5a3f; font-size: .9rem; margin-top: .75rem; }

.equip-catalog-panel .equipment {
  background: #fffdf8; border: 1px solid #e3d5b4; color: #2b2013;
}
.equip-catalog-panel .equipment h3 { color: #2b2013; }
.equip-catalog-panel .equipment p { color: #7a6a4d; }
.equip-catalog-panel .equipment input {
  background: #fffdf8; border: 1px solid #d8c7a0; color: #2b2013;
}
.equip-catalog-panel .equipment button {
  background: linear-gradient(180deg, #e8a34f, var(--accent)); color: #2b1502;
}

.equip-sidebar-panel {
  background: linear-gradient(170deg, #b85f1e, #7a3d10);
  color: #fdf0dd;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  position: sticky; top: 1rem;
}
.sidebar-eyebrow {
  margin: 0 0 1rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #ffdba8;
}
.investigator-avatar {
  width: 108px; height: 108px; margin: 0 auto; border-radius: 50%;
  overflow: hidden; background: #2b1502; border: 3px solid rgba(255,219,168,0.55);
}
.investigator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.investigator-name {
  margin: .85rem 0 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .04em;
}
.investigator-meta { margin: .3rem 0 0; font-size: .78rem; color: #ffdba8; }
.sidebar-divider { height: 1px; background: rgba(255,219,168,0.25); margin: 1.25rem 0; }
.sidebar-label {
  margin: 0 0 .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #ffdba8; text-align: left;
}
.sidebar-equip-list { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: .5rem; }
.sidebar-equip-list li {
  font-size: .85rem; padding: .5rem .7rem; border-radius: 8px;
  background: rgba(0,0,0,0.18); border: 1px solid rgba(255,219,168,0.2);
}
.sidebar-equip-list li.empty { color: #e8c9a0; font-style: italic; background: transparent; border-style: dashed; }

@media (max-width: 900px) {
  .equip-layout { grid-template-columns: 1fr; }
  .equip-sidebar-panel { position: static; }
}

.equipment-grid, .tariff-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.equipment, .tariff, .ticket {
  padding: 1.1rem; border: 1px solid #6b5a3f; border-radius: 12px;
  background: linear-gradient(160deg, rgba(38,29,16,0.9), rgba(24,18,10,0.9));
}
.equipment:hover, .tariff:hover { border-color: var(--accent); }
.equipment h3, .tariff h3 { margin: 0 0 .35rem; }
.equipment p, .tariff p { margin: .4rem 0; color: #c9b89a; }
.equipment label { display: block; margin-top: .75rem; font-size: .85rem; }
.equipment button, .tariff button { margin-top: .75rem; }
.tariff.risk-alto, .tariff.risk-extremo, .tariff.risk-anomalo { border-color: #8a4a3f; }
.tariff.risk-alto h3, .tariff.risk-extremo h3, .tariff.risk-anomalo h3 { color: #ff9d85; }

/* ---------- Ticket final ---------- */
.ticket { margin-top: 1rem; border-color: #a8c96e; background: linear-gradient(160deg, rgba(28,36,16,0.85), rgba(16,22,10,0.9)); }
.ticket h3 { margin-top: 0; color: var(--success); }
.ticket .ticket-code { font-size: 1.4rem; font-weight: 800; letter-spacing: .04em; margin-bottom: .75rem; }
.ticket dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1rem; margin: 0; }
.ticket dt { color: #b3a382; }
.ticket dd { margin: 0; }

.message { min-height: 1.5rem; margin: 1rem 0; color: var(--danger); }
.message.success { color: var(--success); }

.empty-hint {
  margin-top: 1rem; padding: 1rem; border: 1px dashed #6b5a3f; border-radius: 12px;
  color: #a8987d; font-size: .9rem; text-align: center;
}

.corp-footer {
  margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--panel-border);
  text-align: center; font-size: .75rem; letter-spacing: .03em; color: #8a7a5f;
}

/* =====================================================================
   RESPONSIVE — 3 puntos de quiebre: movil (<600px), tablet (600-1024px),
   escritorio (>1024px). Usa Chrome DevTools (F12 -> icono de movil/
   tablet, Ctrl+Shift+M) para probar cada uno en vivo.
   ===================================================================== */

/* Movil */
@media (max-width: 600px) {
  body { padding: 1rem .75rem; }
  .card { padding: 1.25rem; border-radius: 14px; }
  .login-card { margin: 4vh auto 0; }
  .app-header { display: block; }
  .app-header button.secondary { margin-top: .75rem; }
  .steps { font-size: .68rem; gap: .25rem; }
  .steps li { padding: .5rem .2rem; }
  .equipment-grid, .tariff-list { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .ticket dl { grid-template-columns: 1fr; gap: .15rem 0; }
  .ticket dt { margin-top: .5rem; }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  .shell { width: min(100%, 760px); }
  .equipment-grid, .tariff-list { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}

/* Escritorio grande */
@media (min-width: 1400px) {
  .shell { width: min(100%, 1200px); }
}
