/* =========================================================
   INDEX — Dashboard (Mobile First)
========================================================= */

.dashboard{
  padding: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Barra de acciones (arriba de todo) ---------- */
.dashbar{
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}

.dash-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-search{
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 10px 10px;
  background: #fff;
}

.dash-search input{
  width: 100%;
  border: 0;
  outline: 0;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
}

/* ---------- Diagnóstico minimizado ---------- */
.diagWrap{
  margin-bottom: 14px;
}

/* ---------- KPIs ---------- */
.kpiGrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.kpi{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.kpi-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.kpi-title{
  font-weight: 900;
  font-size: 14px;
}

.kpi-value{
  font-weight: 1000;
  font-size: 32px;
  margin-top: 8px;
  line-height: 1;
}

.kpi-sub{
  margin-top: 8px;
  font-size: 12px;
}

.chip{
  font-weight: 900;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(245, 200, 0, .14);
}

/* ---------- Panel / Charts ---------- */
.charts .panel{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.panel-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-title{
  font-weight: 1000;
  font-size: 14px;
}

.bars{
  display: grid;
  gap: 10px;
}

.barRow{
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.barLabel{
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,.7);
}

.barTrack{
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
  overflow: hidden;
}

.barFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(245, 200, 0, .95);
  transition: width .35s ease;
}

.barVal{
  text-align: right;
  font-weight: 1000;
  font-size: 12px;
}

.miniNote{
  margin-top: 10px;
  font-size: 12px;
}

/* ---------- Footer ---------- */
.foot{
  margin: 16px 0 6px;
  font-size: 12px;
  text-align: center;
}

/* =========================================================
   Breakpoints
========================================================= */

@media (min-width: 680px){
  .dashbar{
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .kpiGrid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px){
  .kpiGrid{
    grid-template-columns: repeat(4, 1fr);
  }
}
/* =====================================================
   NAV 5B — FIX MOBILE (CELULAR)
===================================================== */
@media (max-width: 768px){

  /* ---------- Header ---------- */
  .masthead{
    padding: 8px 12px;
  }

  .masthead .brand{
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .masthead .logo{
    width: 44px;
    height: auto;
  }

  .masthead .titles{
    line-height: 1.1;
  }

  .masthead .title{
    font-size: 15px;
    font-weight: 800;
  }

  .masthead .subtitle{
    font-size: 12px;
    color: #666;
  }

  .masthead .api-status{
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
  }

  /* ---------- Nav principal ---------- */
  #topnav{
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }

  #topnav .inner{
    overflow-x: auto;
  }

  #navList{
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 8px 6px;
    white-space: nowrap;
  }

  #navList li{
    flex: 0 0 auto;
  }

  #navList a{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 12px;
  }

  #navList a span{
    display: none; /* texto largo fuera */
  }

  #navList a i,
  #navList a svg{
    font-size: 18px;
  }

  /* ---------- Activo ---------- */
  #navList a.active{
    background: rgba(245,196,0,.25);
    font-weight: 800;
  }

}
