*{box-sizing:border-box}

:root{
  --q-blue:#0a66d8;
  --q-blue-2:#063f9f;
  --q-cyan:#13d6d1;
  --q-cyan-2:#0fb4c7;
  --q-green:#10d66d;
  --q-green-2:#0db95e;
  --q-dark:#06111f;
  --q-dark-2:#081b2f;
  --q-card:rgba(6,54,61,.78);
  --q-border:rgba(19,214,209,.30);
  --q-white:#ffffff;
  --q-muted:#c9ecf2;
  --q-soft:#e7ffff;
  --q-shadow:0 28px 68px rgba(0,0,0,.36);
}

html{
  scroll-behavior:smooth;
  background:#030a14;
}

body{
  margin:0;
  background:
    radial-gradient(circle at 10% 5%, rgba(19,214,209,.14), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(10,102,216,.18), transparent 32%),
    radial-gradient(circle at 35% 88%, rgba(16,214,109,.10), transparent 30%),
    linear-gradient(135deg,#030a14 0%,#06111f 46%,#071a34 100%);
  color:#fff;
  font-family:Arial,Helvetica,sans-serif;
  min-height:100vh;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-3;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.75),rgba(0,0,0,.10));
}

a{color:inherit}

.page-glow{
  position:fixed;
  width:420px;
  height:420px;
  border-radius:50%;
  filter:blur(42px);
  opacity:.23;
  pointer-events:none;
  z-index:-2;
}

.page-glow-a{
  top:130px;
  left:-170px;
  background:var(--q-cyan);
}

.page-glow-b{
  right:-160px;
  top:360px;
  background:var(--q-blue);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:14px 28px;
  background:
    linear-gradient(90deg,rgba(3,15,28,.96),rgba(4,67,66,.94)),
    radial-gradient(circle at 25% 0%,rgba(19,214,209,.18),transparent 42%);
  position:sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid rgba(19,214,209,.30);
  box-shadow:0 12px 34px rgba(0,0,0,.38);
  min-height:92px;
  backdrop-filter:blur(12px);
}

.identity-brand{
  display:flex;
  gap:14px;
  align-items:center;
  min-width:0;
  flex:1 1 auto;
}

.identity-brand img{
  width:70px;
  height:70px;
  border-radius:18px;
  object-fit:contain;
  background:rgba(0,0,0,.13);
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.48));
  flex:0 0 auto;
  transition:transform .22s ease, filter .22s ease;
}

.identity-brand img:hover{
  transform:scale(1.03);
  filter:drop-shadow(0 14px 22px rgba(19,214,209,.22));
}

.brand-copy{min-width:0}

.identity-brand h1{
  margin:0;
  font-size:30px;
  line-height:1;
  font-weight:900;
  letter-spacing:.7px;
  color:#fff;
  text-shadow:0 4px 14px rgba(0,0,0,.58);
}

.identity-brand p{
  margin:8px 0 0;
  max-width:760px;
  color:#d9fbff;
  font-size:15.5px;
  line-height:1.35;
  white-space:normal;
  text-shadow:0 3px 10px rgba(0,0,0,.45);
}

.quick-nav{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:20px;
  flex:0 0 auto;
}

.quick-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#fff;
  min-width:78px;
  padding:3px 4px;
  opacity:.96;
  border-radius:18px;
  transition:transform .18s ease, opacity .18s ease, filter .18s ease, background .18s ease;
}

.quick-item:hover{
  transform:translateY(-3px);
  opacity:1;
  background:rgba(255,255,255,.055);
  filter:drop-shadow(0 0 12px rgba(255,255,255,.20));
}

.quick-icon{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:7px;
}

.quick-icon svg{
  width:40px;
  height:40px;
  display:block;
  stroke:#fff;
  fill:none;
  stroke-width:2.55;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.38));
}

.quick-label{
  font-size:14px;
  line-height:1.05;
  font-weight:800;
  letter-spacing:.12px;
  color:#fff;
  text-align:center;
  text-shadow:0 4px 10px rgba(0,0,0,.50);
}

.layout{
  max-width:1220px;
  margin:0 auto;
  padding:24px;
}

.identity-layout{max-width:1240px}

.hero,.card{
  background:
    linear-gradient(135deg,rgba(6,73,80,.72),rgba(15,22,24,.90)),
    radial-gradient(circle at 82% 10%,rgba(16,214,109,.08),transparent 36%);
  border:1px solid var(--q-border);
  border-radius:28px;
  padding:28px;
  margin-bottom:24px;
  box-shadow:var(--q-shadow);
  position:relative;
  overflow:hidden;
}

.card::before,.hero::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(135deg,rgba(255,255,255,.08),transparent 32%,rgba(19,214,209,.055));
  opacity:.55;
}

.identity-hero{
  display:grid;
  grid-template-columns:1fr 330px;
  align-items:center;
  gap:32px;
  min-height:232px;
}

.hero-copy,.hero-logo-box,.card > *{
  position:relative;
  z-index:1;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 16px;
  border-radius:40px;
  background:linear-gradient(90deg,var(--q-cyan),#0fb2f2);
  color:#00151a;
  font-weight:900;
  box-shadow:0 8px 18px rgba(19,214,209,.18);
}

.badge::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#002830;
  box-shadow:0 0 0 3px rgba(0,40,48,.14);
}

.hero h2,.hero-copy h2{
  font-size:46px;
  margin:22px 0 10px;
  line-height:1.02;
  letter-spacing:-1.15px;
  text-shadow:0 5px 18px rgba(0,0,0,.54);
}

.hero p,.hero-copy p{
  font-size:18px;
  color:#ecffff;
  margin:0;
  max-width:650px;
  line-height:1.45;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
}

.hero-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:11px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  letter-spacing:.1px;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.hero-btn:hover{
  transform:translateY(-2px);
}

.hero-btn-primary{
  background:linear-gradient(90deg,var(--q-blue),#00d084);
  box-shadow:0 13px 26px rgba(0,0,0,.24);
}

.hero-btn-secondary{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  color:#eaffff;
}

.hero-logo-box{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:150px;
}

.hero-logo-box img{
  max-width:315px;
  max-height:198px;
  object-fit:contain;
  filter:drop-shadow(0 22px 32px rgba(0,0,0,.48));
}

.identity-card{border-color:rgba(19,214,209,.25)}

.section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.section-heading h2{
  margin:6px 0 8px;
  font-size:30px;
  line-height:1.12;
}

.section-heading p{
  margin:0;
  color:#e7ffff;
  line-height:1.45;
  font-size:16px;
}

.section-kicker{
  color:#92fff5;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:12px;
  font-weight:900;
  margin-bottom:10px;
}

.player-card video{
  width:100%;
  aspect-ratio:16/9;
  background:#000;
  border-radius:20px;
  margin-top:24px;
  box-shadow:0 22px 52px rgba(0,0,0,.44);
  border:1px solid rgba(255,255,255,.08);
}

.player-description{
  max-width:980px;
  color:#eefcff;
  font-size:17px;
  line-height:1.55;
  margin:18px 0 0;
}

.channel-title-wrap{
  display:flex;
  align-items:center;
  gap:24px;
}

.channel-number-box{
  width:110px;
  height:82px;
  border:4px solid var(--q-cyan);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  flex:0 0 auto;
  background:linear-gradient(180deg,rgba(8,34,47,.72),rgba(5,17,30,.86));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12) inset,
    0 0 20px rgba(19,214,209,.18),
    0 16px 28px rgba(0,0,0,.30);
}

.channel-number-box::after{
  content:"";
  position:absolute;
  bottom:-15px;
  left:50%;
  transform:translateX(-50%);
  width:58px;
  height:6px;
  background:var(--q-cyan);
  border-radius:14px;
  box-shadow:0 0 12px rgba(19,214,209,.35);
}

.channel-number-box::before{
  content:"";
  position:absolute;
  bottom:-9px;
  left:50%;
  transform:translateX(-50%);
  width:28px;
  height:5px;
  background:rgba(19,214,209,.85);
  border-radius:8px;
}

.channel-number-box span{
  font-size:40px;
  font-weight:900;
  color:#fff;
  line-height:1;
  text-shadow:0 4px 10px rgba(0,0,0,.55);
}

.channel-title-text h2{
  margin:0;
  font-size:36px;
  font-weight:900;
  color:#fff;
  letter-spacing:-.5px;
  text-shadow:0 5px 16px rgba(0,0,0,.55);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.installers-grid{
  grid-template-columns:repeat(4,minmax(190px,1fr));
}

.install-card{
  background:linear-gradient(180deg,rgba(5,16,26,.74),rgba(2,12,19,.94));
  border:1px solid rgba(255,255,255,.11);
  border-radius:24px;
  padding:24px 18px 20px;
  min-height:270px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  box-shadow:0 20px 38px rgba(0,0,0,.28);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.install-card:hover{
  transform:translateY(-4px);
  border-color:rgba(19,214,209,.34);
  box-shadow:0 28px 46px rgba(0,0,0,.34);
}

.install-icon-badge{
  width:80px;
  height:80px;
  border-radius:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.16),transparent 28%),
    linear-gradient(145deg,rgba(18,133,255,.28),rgba(16,214,109,.24));
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 12px 24px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.06);
}

.install-icon-badge svg{
  width:46px;
  height:46px;
  stroke:#fff;
  fill:none;
  stroke-width:2.35;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.install-platform{
  display:inline-block;
  font-size:12px;
  font-weight:900;
  color:#d9ffff;
  background:rgba(19,214,209,.14);
  border:1px solid rgba(19,214,209,.22);
  border-radius:999px;
  padding:6px 11px;
  margin-bottom:10px;
  letter-spacing:.2px;
}

.install-card h3{
  margin:0 0 8px;
  font-size:20px;
  line-height:1.15;
}

.install-card p{
  margin:0;
  color:#e6fdff;
  font-size:15px;
  line-height:1.35;
  max-width:245px;
}

.install-card .btn{
  margin-top:auto;
  padding:11px 18px;
}

.channel-row,.contact-item{
  background:rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:18px;
}

.install-card a,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:8px;
  background:linear-gradient(90deg,#147bff,#00d084);
  padding:11px 18px;
  border-radius:30px;
  color:white;
  text-decoration:none;
  font-weight:900;
  border:0;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(0,0,0,.18);
}

.btn.danger{background:linear-gradient(90deg,#8b1235,#e04b5a)}

.channels{
  display:grid;
  gap:12px;
}

.channel-row{
  display:grid;
  grid-template-columns:70px 1fr auto;
  gap:16px;
  align-items:center;
  transition:transform .18s ease, border-color .18s ease;
}

.channel-row:hover{
  transform:translateX(3px);
  border-color:rgba(19,214,209,.28);
}

.channel-row img{
  width:58px;
  height:42px;
  object-fit:contain;
  background:white;
  border-radius:9px;
  padding:3px;
}

.contact-card{scroll-margin-top:120px}

.contact-box{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
  margin-top:18px;
}

.contact-item b{
  display:block;
  color:#fff;
  margin-bottom:6px;
}

.contact-item span,.contact-item a{
  color:#d9fbff;
  text-decoration:none;
  overflow-wrap:anywhere;
}

footer,.identity-footer{
  text-align:center;
  padding:34px 20px;
  background:#050b14;
  color:#bde;
  border-top:1px solid rgba(19,214,209,.18);
}

/* Admin layout */
.admin-layout{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.side{background:#04101d;padding:24px;position:sticky;top:0;height:100vh}
.side h2{margin-top:0}
.side a{display:block;color:#fff;text-decoration:none;padding:12px 14px;margin:8px 0;border-radius:10px;background:rgba(255,255,255,.06)}
.side a:hover,.side a.active{background:linear-gradient(90deg,#147bff55,#00d08455)}
.content{padding:28px;max-width:1500px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(250px,1fr));gap:16px}
.form-grid.three{grid-template-columns:repeat(3,minmax(200px,1fr))}
.field label{display:block;font-weight:bold;margin-bottom:6px;color:#dff}
.field input,.field textarea,.field select{width:100%;padding:12px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:#07111f;color:#fff}
.field textarea{min-height:90px}
.notice{padding:12px 16px;border-radius:12px;background:#063;color:#dff;margin-bottom:16px}
.error{background:#612;color:#ffd}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid rgba(255,255,255,.12);padding:12px;text-align:left}
.table img{width:54px;height:40px;background:#fff;border-radius:8px;object-fit:contain}
.pill{display:inline-block;border-radius:20px;background:#0b6;padding:4px 9px;color:#001;font-weight:bold}
.api-list code{display:block;background:#000;padding:10px;border-radius:8px;margin:8px 0;color:#9ff}

@media(max-width:1180px){
  .topbar{
    align-items:flex-start;
    flex-direction:column;
    min-height:auto;
  }

  .quick-nav{
    width:100%;
    justify-content:space-between;
    gap:12px;
  }

  .quick-item{
    min-width:auto;
    flex:1;
  }

  .identity-hero{
    grid-template-columns:1fr;
    text-align:center;
  }

  .hero p,.hero-copy p{
    margin-left:auto;
    margin-right:auto;
  }

  .hero-actions{
    justify-content:center;
  }

  .installers-grid{
    grid-template-columns:repeat(2,minmax(220px,1fr));
  }
}

@media(max-width:900px){
  .admin-layout{display:block}
  .side{position:relative;height:auto}
  .form-grid,.form-grid.three{grid-template-columns:1fr}
  .layout{padding:14px}
  .channel-row{grid-template-columns:1fr}
}

@media(max-width:700px){
  .topbar{padding:14px 14px 16px}
  .identity-brand{align-items:flex-start}
  .identity-brand img{width:58px;height:58px}
  .identity-brand h1{font-size:22px}
  .identity-brand p{font-size:14px;max-width:none}
  .quick-nav{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:8px}
  .quick-item{padding:4px 0;min-width:0}
  .quick-icon,.quick-icon svg{width:32px;height:32px}
  .quick-label{font-size:12px}
  .hero h2,.hero-copy h2{font-size:34px}
  .section-heading h2{font-size:25px}
  .channel-title-wrap{align-items:flex-start;gap:18px}
  .channel-number-box{width:82px;height:64px}
  .channel-number-box span{font-size:31px}
  .channel-title-text h2{font-size:28px}
  .install-card{min-height:unset;padding:18px 16px}
  .install-icon-badge{width:68px;height:68px}
  .install-icon-badge svg{width:40px;height:40px}
  .install-card h3{font-size:18px}
  .install-card p{font-size:14px}
}

@media(max-width:520px){
  .quick-nav{
    grid-template-columns:repeat(2,1fr);
  }

  .layout{
    padding:10px;
  }

  .hero,.card{
    padding:18px;
    border-radius:22px;
  }

  .identity-brand p{
    font-size:13px;
  }

  .hero h2,.hero-copy h2{
    font-size:29px;
  }

  .hero-logo-box img{
    max-width:250px;
  }

  .grid,.installers-grid{
    grid-template-columns:1fr;
  }

  .contact-box{
    grid-template-columns:1fr;
  }

  .hero-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .channel-title-wrap{
    flex-direction:column;
  }
}


/* Lectura remota visual */
.remote-status-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:12px;
  margin-top:16px;
}

.remote-status-card{
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:16px;
}

.remote-status-card b{
  display:block;
  margin-bottom:8px;
}

.remote-preview-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
  margin-top:18px;
}

.remote-channel-card{
  background:linear-gradient(180deg,rgba(5,16,26,.76),rgba(2,12,19,.94));
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  padding:16px;
  min-height:190px;
}

.remote-channel-head{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:12px;
}

.remote-channel-head img{
  width:68px;
  height:48px;
  object-fit:contain;
  background:#fff;
  border-radius:10px;
  padding:4px;
}

.remote-channel-num{
  width:42px;
  height:42px;
  border-radius:12px;
  background:linear-gradient(90deg,#147bff,#00d084);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}

.remote-channel-card h3{
  margin:0;
  font-size:17px;
}

.remote-channel-card small{
  color:#bff;
  overflow-wrap:anywhere;
}

.remote-list-box{
  display:grid;
  gap:10px;
}

.remote-list-item{
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:14px;
}

.remote-list-item b{
  display:block;
  margin-bottom:5px;
}

.remote-list-item small{
  display:block;
  color:#bff;
  overflow-wrap:anywhere;
}

.remote-img-preview{
  width:84px;
  height:58px;
  object-fit:contain;
  background:#fff;
  border-radius:8px;
  margin-top:6px;
}

@media(max-width:700px){
  .remote-preview-grid{
    grid-template-columns:1fr;
  }

  .remote-status-grid{
    grid-template-columns:1fr;
  }
}


/* Reporte de rutas */
#routeMapTable code,
#routeFindingsTable code{
  display:block;
  max-width:520px;
  white-space:normal;
  overflow-wrap:anywhere;
  background:rgba(0,0,0,.35);
  border-radius:8px;
  padding:8px;
  color:#bff;
  font-size:12px;
}

#routeFindingsTable td{
  vertical-align:top;
}


/* Reporte clasificado de recursos */
#classifiedItemsTable code{
  display:block;
  max-width:420px;
  white-space:normal;
  overflow-wrap:anywhere;
  background:rgba(0,0,0,.35);
  border-radius:8px;
  padding:8px;
  color:#bff;
  font-size:12px;
}

#classifiedItemsTable td{
  vertical-align:top;
}

#classifiedItemsTable small{
  color:#bff;
}


/* Progreso de reportes largos */
.progress-wrap{
  margin-top:18px;
  background:rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:16px;
}

.progress-meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  color:#eaffff;
}

.progress-bar{
  width:100%;
  height:18px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  overflow:hidden;
  box-shadow:inset 0 2px 8px rgba(0,0,0,.35);
}

.progress-fill{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#147bff,#00d084);
  border-radius:999px;
  transition:width .25s ease;
}

#classifiedProgressDetail{
  display:block;
  margin-top:10px;
  color:#bff;
}

.btn[disabled]{
  opacity:.5;
  cursor:not-allowed;
}

#classifiedItemsTable code{
  display:block;
  max-width:420px;
  white-space:normal;
  overflow-wrap:anywhere;
  background:rgba(0,0,0,.35);
  border-radius:8px;
  padding:8px;
  color:#bff;
  font-size:12px;
}

#classifiedItemsTable td{
  vertical-align:top;
}


/* Corrección JSON refinada */
#correctionTable code{
  display:block;
  max-width:520px;
  white-space:normal;
  overflow-wrap:anywhere;
  background:rgba(0,0,0,.35);
  border-radius:8px;
  padding:8px;
  color:#bff;
  font-size:12px;
}

#correctionTable td{
  vertical-align:top;
}


/* Fase 29.10 Verificación post-corrección */
#oldRoutesTable code,
#correctRoutesTable code,
#postVerifyFilesTable code{
  display:block;
  max-width:520px;
  white-space:normal;
  overflow-wrap:anywhere;
  background:rgba(0,0,0,.35);
  border-radius:8px;
  padding:8px;
  color:#bff;
  font-size:12px;
}

#oldRoutesTable td,
#correctRoutesTable td,
#postVerifyFilesTable td{
  vertical-align:top;
}
