:root{--bg:#16212d;--panel:#1f2c3a;--panel-2:#243445;--text:#eef4ff;--muted:#c0cede;--border:rgba(255,255,255,.11);--shadow:0 18px 40px rgba(0,0,0,.22)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;background:linear-gradient(180deg,#0f1720,#16212d 30%,#1b2735);color:var(--text)}
a{color:inherit}.container{margin:0 auto}.topbar{position:sticky;top:0;z-index:20;background:rgba(13,21,31,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}.topbar__inner{display:flex;justify-content:space-between;align-items:center;padding:14px 0;gap:16px}.brand{display:flex;align-items:center;gap:14px}.brand__logo{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(140deg,#79a7ff,#86e2ff);color:#06111f;font-weight:800}.brand__title{font-weight:800}.brand__subtitle{font-size:12px;color:var(--muted)}.nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.nav a{text-decoration:none;padding:8px 10px;border-radius:12px}.nav a:hover{background:rgba(255,255,255,.06)}main.container{padding:22px 0 40px}.card{background:rgba(25,38,52,.9);border:1px solid var(--border);border-radius:20px;padding:18px;box-shadow:var(--shadow)}.grid{display:grid;gap:16px}.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}@media (max-width:1024px){.grid--4,.grid--3,.grid--2{grid-template-columns:1fr}}.h1{font-size:26px;margin:0 0 8px}.h2{font-size:18px;margin:20px 0 10px}.muted{color:var(--muted)}.form{display:grid;gap:12px}.field label{display:block;font-size:12px;color:var(--muted);margin:0 0 6px}.input,select,textarea{width:100%;background:rgba(255,255,255,.08);border:1px solid var(--border);color:var(--text);border-radius:14px;padding:11px 12px;outline:none}select option{background:#12202e;color:var(--text)}textarea{min-height:110px;resize:vertical}.input:focus,select:focus,textarea:focus{border-color:rgba(134,226,255,.65);box-shadow:0 0 0 4px rgba(134,226,255,.12)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border:none;border-radius:14px;cursor:pointer;background:linear-gradient(140deg,#79a7ff,#86e2ff);color:#0b1624;font-weight:800;text-decoration:none}.btn--ghost{background:transparent;border:1px solid var(--border);color:var(--text)}.btn--sm{padding:8px 10px;font-size:13px}.alert{padding:12px 14px;border-radius:14px;border:1px solid var(--border);margin:10px 0}.alert--danger{background:rgba(255,93,111,.1);border-color:rgba(255,93,111,.3)}.alert--ok{background:rgba(40,209,124,.1);border-color:rgba(40,209,124,.3)}.badge{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid var(--border)}.badge--ok{background:rgba(40,209,124,.1)}.badge--warn{background:rgba(255,193,87,.1)}.toolbar{display:grid;grid-template-columns:2fr repeat(5,minmax(130px,1fr));gap:10px;margin:14px 0}.toolbar--compact{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top}.table th{text-align:center;color:var(--muted);font-size:12px}.summary-box{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.kpi{display:flex;flex-direction:column;gap:6px}.kpi__k{color:var(--muted);font-size:12px}.kpi__v{font-size:28px;font-weight:800}.kpi-card .kpi__v{font-size:34px}.text-strong{font-weight:700}.text-center{text-align:center}.input--small{max-width:100px}.actions-row{display:flex;justify-content:flex-end}.timeline{display:grid;gap:14px}.code-box{margin:6px 0 0;padding:12px;background:#0f1720;border-radius:14px;overflow:auto;white-space:pre-wrap}.auth-center{min-height:calc(100vh - 130px);place-items:center}.auth-card{width:min(560px,100%)}


.brand__logo-img{
  width:52px;
  height:52px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.22));
}
.brand__logo{
  display:none;
}
body.login-page,
.login-shell{
  min-height:calc(100vh - 82px);
}
.login-shell{
  display:grid;
  align-items:center;
  padding:24px 0 36px;
}
.login-stage{
  position:relative;
  min-height:calc(100vh - 170px);
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:30px;
  background:radial-gradient(circle at top, rgba(130,190,255,.08), transparent 38%), linear-gradient(180deg, rgba(18,31,44,.96), rgba(24,39,55,.92));
  box-shadow:var(--shadow);
  isolation:isolate;
}
.login-stage__bg{
  position:absolute;
  inset:0;
  background-image:url('../img/escudo-bg.png');
  background-repeat:no-repeat;
  background-position:center;
  background-size:min(44vw, 500px);
  opacity:.10;
  filter:drop-shadow(0 0 40px rgba(134,226,255,.12));
  z-index:-2;
}
.login-stage::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(7,14,22,.12), rgba(7,14,22,.42));
  z-index:-1;
}
.login-card{
  width:min(560px, calc(100% - 32px));
  padding:28px;
  background:rgba(20,31,43,.88);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 24px 70px rgba(0,0,0,.32);
}
.login-card__brand{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:18px;
}
.login-card__logo{
  width:92px;
  max-width:26vw;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.26));
}
.login-card__eyebrow{
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#9bc8ff;
}
.login-card__title{
  margin:4px 0 6px;
}
.login-card__text{
  margin:0;
}
.login-form{
  margin-top:12px;
}
.login-form .input{
  background:rgba(255,255,255,.92);
  color:#09131f;
  border-color:rgba(255,255,255,.28);
  font-weight:600;
}
.login-form .input:focus{
  border-color:rgba(134,226,255,.85);
  box-shadow:0 0 0 4px rgba(134,226,255,.16);
}
.login-form__submit{
  width:100%;
  margin-top:6px;
  padding:12px 16px;
  font-size:16px;
}
@media (max-width: 900px){
  .login-stage{
    min-height:calc(100vh - 150px);
    border-radius:24px;
  }
  .login-stage__bg{
    background-size:min(70vw, 420px);
    opacity:.11;
  }
}
@media (max-width: 640px){
  .brand__logo-img{
    width:44px;
    height:44px;
  }
  .login-shell{
    padding:18px 0 28px;
  }
  .login-stage{
    min-height:auto;
    padding:26px 0;
  }
  .login-card{
    padding:22px;
    border-radius:22px;
  }
  .login-card__brand{
    align-items:flex-start;
  }
  .login-card__logo{
    width:74px;
  }
}


/* ===== Programación anual: encabezado de meses fijo ===== */
:root{
  --program-sticky-top: 82px;
}

.card--plan,
.card--plan .form,
.card--plan .table-wrap{
  overflow: visible;
}

.table-wrap--program{
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
}

.table--program{
  width: 100%;
  min-width: 1240px;
  border-collapse: separate;
  border-spacing: 0;
}

.table--program thead th{
  position: sticky;
  top: var(--program-sticky-top);
  z-index: 12;
  background: rgba(18,31,44,.98);
  color: #dbe7f5;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.16);
}

.table--program thead th:first-child,
.table--program thead th:last-child{
  z-index: 13;
}

.table--program tbody td,
.table--program tbody th,
.table--program tfoot td,
.table--program tfoot th{
  background: transparent;
}

.table--program .program-action{
  min-width: 460px;
}

.table--program .program-input{
  min-width: 72px;
  max-width: 86px;
  margin-inline: auto;
}

.table--program .program-row-total{
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  min-width: 72px;
}

.table--program tfoot .table__totals th,
.table--program tfoot .table__totals td{
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(18,31,44,.98);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

@media (max-width: 1200px){
  .table--program{
    min-width: 1120px;
  }

  .table--program .program-action{
    min-width: 360px;
  }
}

@media (max-width: 900px){
  .table--program{
    min-width: 980px;
  }

  .table--program .program-action{
    min-width: 280px;
  }

  .table--program thead th{
    top: calc(var(--program-sticky-top) - 2px);
  }
}


.btn--danger{
  background:linear-gradient(140deg,#ff6b81,#ff9f6b);
  color:#1b0f13;
}

.checklist-card{
  overflow:visible;
}

.checklist-table td{
  vertical-align:middle;
}

.checklist-row-form{
  display:contents;
}

.checklist-order-input{
  max-width:80px;
  margin-inline:auto;
  text-align:center;
}

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

.checklist-admin-box{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.03);
}

.checklist-admin-box summary{
  cursor:pointer;
  font-weight:700;
}

.checklist-admin-form textarea,
.checklist-table textarea{
  min-height:72px;
}
