:root{
  --navy:#101827;
  --text:#151b28;
  --muted:#707886;
  --bg:#f4f6f8;
  --card:#fff;
  --line:#dfe3e8;
  --green:#e6f7ef;
  --amber:#fff3e4;
  --red:#fdeaea;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.shell{
  max-width:820px;
  margin:auto;
  padding:20px 22px 110px;
}

h1{
  font-size:40px;
  line-height:1.06;
  margin:0 0 10px;
  font-weight:500;
}

header p{
  font-size:24px;
  color:var(--muted);
  line-height:1.22;
  margin:0 0 22px;
}

.small{
  font-size:17px!important;
}

.topline{
  display:flex;
  gap:10px;
  align-items:center;
  margin:16px 0;
}

.chip,
.badge{
  display:inline-flex;
  padding:9px 18px;
  border-radius:999px;
  font-weight:750;
  font-size:18px;
}

.badge{
  padding:7px 13px;
  font-size:15px;
}

.ok{
  background:var(--green);
}

.warn{
  background:var(--amber);
}

.danger{
  background:var(--red);
}

/* =========================
   NAVEGACIÓN
   ========================= */

.tabs{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  overflow:visible;
  padding:8px 0 20px;
  width:100%;
}

.tabs button{
  flex:0 0 auto;
  border:1px solid var(--line);
  background:#fff;
  padding:22px 26px;
  border-radius:18px;
  font-size:20px;
  font-weight:750;
  cursor:pointer;
}

.tabs button.active{
  background:var(--navy);
  color:white;
}

/* =========================
   TARJETAS
   ========================= */

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:28px;
  padding:28px;
  margin:0 0 22px;
  box-shadow:0 1px 2px rgba(0,0,0,.02);
}

.card.accent{
  border-top:8px solid #6f7e94;
}

.card h2{
  font-size:30px;
  margin:0 0 20px;
}

.eyebrow{
  font-size:17px;
  color:#6e7788;
  font-weight:800;
  letter-spacing:.06em;
}

.big{
  font-size:52px;
  font-weight:750;
  margin:12px 0;
}

.desc{
  font-size:22px;
  color:var(--muted);
  line-height:1.25;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
  font-size:22px;
}

.row:last-child{
  border-bottom:0;
}

.row strong{
  text-align:right;
}

.progress{
  height:14px;
  border-radius:99px;
  background:#eef0f4;
  overflow:hidden;
  margin:18px 0;
}

.progress i{
  display:block;
  height:100%;
  background:#73839a;
  border-radius:99px;
}

/* =========================
   BOTONES / ACCIONES
   ========================= */

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

.actions button,
.primary{
  border:1px solid var(--line);
  background:#fff;
  padding:15px 18px;
  border-radius:16px;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
}

.actions button.primary,
.primary{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy);
}

/* =========================
   MÉTRICAS
   ========================= */

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.metric{
  background:#fff;
  border:1px solid var(--line);
  border-radius:25px;
  padding:24px;
}

.metric .label{
  font-size:19px;
  color:var(--muted);
}

.metric .value{
  font-size:40px;
  font-weight:750;
  margin-top:8px;
}

/* =========================
   BLOQUES AUXILIARES
   ========================= */

.note{
  border:1px dashed var(--line);
  border-radius:22px;
  padding:22px;
  font-size:20px;
  background:#fff;
}

.nextbox{
  background:#f1f3f6;
  border-radius:18px;
  padding:18px;
  margin-top:16px;
  font-size:20px;
}

.fab{
  position:fixed;
  right:22px;
  bottom:24px;
  background:var(--navy);
  color:#fff;
  border:0;
  border-radius:999px;
  padding:17px 22px;
  font-size:17px;
  font-weight:800;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  cursor:pointer;
}

/* =========================
   DIÁLOGO CARLOS
   ========================= */

dialog{
  border:0;
  border-radius:25px;
  padding:0;
  max-width:650px;
  width:calc(100% - 28px);
}

dialog::backdrop{
  background:rgba(8,13,23,.55);
}

.dialog-card{
  padding:24px;
}

.dialog-head{
  display:flex;
  justify-content:space-between;
  font-size:25px;
}

.x{
  border:0;
  background:transparent;
  font-size:32px;
  cursor:pointer;
}

.askrow{
  display:flex;
  gap:8px;
  margin-top:20px;
}

.askrow input{
  flex:1;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
}

.askrow button{
  background:var(--navy);
  color:#fff;
  border:0;
  border-radius:12px;
  padding:12px 15px;
  cursor:pointer;
}

/* =========================
   MÓVIL
   ========================= */

@media(max-width:560px){

  .shell{
    padding:20px 21px 105px;
  }

  h1{
    font-size:37px;
  }

  header p{
    font-size:23px;
  }

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

  .card{
    padding:28px;
  }

  .tabs{
    gap:8px;
  }

  .tabs button{
    font-size:16px;
    padding:16px 18px;
    border-radius:15px;
  }

  .row{
    font-size:20px;
  }

  .metric .value{
    font-size:34px;
  }

  .fab{
    font-size:15px;
  }
}