:root {
  --azul: #10345B;
  --turquesa: #00B8BE;
  --celeste: #80E2E5;
  --fondo: #f4f8f9;
  --texto: #1d2b38;
  --gris: #5b6b7a;
  --borde: #d7e3e8;
  --ok: #157347;
  --error: #b02a37;
  --pendiente: #9a6b00;
  --vencido: #b02a37;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}
a { color: var(--azul); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: #fff; border-bottom: 3px solid var(--turquesa);
  padding: .6rem 1.2rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-name { font-size: 1.35rem; font-weight: 800; color: var(--azul); letter-spacing: .2px; }
.brand-accent { color: var(--turquesa); }
.mainnav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mainnav a { text-decoration: none; font-weight: 600; color: var(--azul); }
.mainnav a:hover { color: var(--turquesa); }
.user-chip {
  background: var(--celeste); color: var(--azul);
  padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
}
.container { max-width: 1020px; margin: 0 auto; padding: 1.4rem 1rem 2.5rem; }
.footer { text-align: center; color: var(--gris); padding: 1.5rem 1rem 2rem; }
h1 { color: var(--azul); font-size: 1.7rem; margin: .2rem 0 1rem; }
h2 { color: var(--azul); font-size: 1.2rem; margin: 1.4rem 0 .6rem; }
.card {
  background: #fff; border: 1px solid var(--borde); border-radius: 12px;
  padding: 1.1rem 1.2rem; margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(16, 52, 91, .06);
}
.hero {
  background: linear-gradient(135deg, var(--azul), #17507f 55%, var(--turquesa));
  color: #fff; border-radius: 14px; padding: 2rem 1.6rem; margin-bottom: 1.2rem;
}
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: .4rem; }
.hero p { margin: .2rem 0; font-size: 1.05rem; }
.btn {
  display: inline-block; background: var(--turquesa); color: #fff !important;
  border: none; border-radius: 8px; padding: .55rem 1.1rem;
  font-weight: 700; text-decoration: none; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: #009aa0; }
.btn-secondary { background: var(--azul); }
.btn-danger { background: var(--error); }
.btn-small { padding: .35rem .8rem; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
label { display: block; font-weight: 600; margin: .7rem 0 .25rem; color: var(--azul); }
input, select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--borde);
  border-radius: 8px; font-size: 1rem; background: #fff; color: var(--texto);
}
textarea { min-height: 80px; resize: vertical; }
.form-card { max-width: 560px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { color: var(--azul); font-size: .9rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--borde); border-radius: 12px; background: #fff; }
.badge {
  display: inline-block; padding: .12rem .55rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
}
.badge-pagado { background: #d9f2e3; color: var(--ok); }
.badge-pendiente { background: #fdf0cd; color: var(--pendiente); }
.badge-vencido { background: #f8d7da; color: var(--vencido); }
.badge-linea { background: #d7f5f6; color: #006d71; }
.badge-presencial { background: #e2e8f5; color: var(--azul); }
.flash { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.flash-ok { background: #d9f2e3; color: var(--ok); }
.flash-error { background: #f8d7da; color: var(--error); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.stat { text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--azul); }
.stat .lbl { color: var(--gris); font-weight: 600; }
.skill { margin: .45rem 0; }
.skill .bar { background: #e6eef2; border-radius: 999px; height: 12px; overflow: hidden; }
.skill .fill { background: var(--turquesa); height: 100%; }
.skill .row { display: flex; justify-content: space-between; font-weight: 600; color: var(--azul); font-size: .92rem; }
.chart { display: flex; align-items: flex-end; gap: .8rem; height: 170px; padding-top: .5rem; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 64px; background: var(--turquesa); border-radius: 6px 6px 0 0; min-height: 3px; }
.chart .val { font-weight: 700; color: var(--azul); font-size: .85rem; }
.chart .mes { color: var(--gris); font-size: .82rem; font-weight: 600; }
.muted { color: var(--gris); }
.jitsi-wrap { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.jitsi-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .mainnav { gap: .6rem; font-size: .92rem; }
}
