/* ============================================================
   AITHER — Design tokens (single source of truth for brand)
   Fuente: legacy/index.html L347-397 (no editar el legacy; solo se
   replica el bloque de tokens y las reglas de interacción globales)
   ============================================================ */
:root {
  --aither-blue: #5B9BD5;
  --aither-blue-dark: #4A8BC8;
  --aither-blue-deep: #2E6CA4;
  --aither-ink: #0A0A0F;
  --aither-muted: #8892A4;
  --aither-bg: #EAF4FC;
  --aither-surface: #FFFFFF;
  --aither-ok: #12A05C;
  --aither-warn: #F0A030;
  --aither-err: #E02020;
  --aither-radius: 14px;
  --aither-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(46,108,164,.06);
  --aither-ease: cubic-bezier(.4,0,.2,1);
}

body {
  background: var(--aither-bg);
  color: var(--aither-ink);
}

/* Smooth, premium global transitions on interactive elements */
button, .lbtn, .lbtn2, .lsel, .fseg, .dopt, .statseg, input, select {
  transition: transform .12s var(--aither-ease),
              box-shadow .18s var(--aither-ease),
              background-color .18s var(--aither-ease),
              border-color .18s var(--aither-ease),
              opacity .15s var(--aither-ease);
}

/* Tactile press feedback (feels native on tablets) */
button:active, .lbtn:active, .lbtn2:active, .statseg:active, .fseg:active {
  transform: scale(.97);
}

/* Crisp focus ring for accessibility + pro feel (keyboard users) */
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--aither-blue);
  outline-offset: 2px;
}

/* Subtle entrance animation for pages */
@keyframes aitherFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page.on { animation: aitherFadeIn .22s var(--aither-ease); }

/* Respect users who prefer reduced motion (accessibility best practice) */
@media (prefers-reduced-motion: reduce) {
  *, .page.on { animation: none !important; transition: none !important; }
}

.aither-navbar {
  background: var(--aither-surface);
  box-shadow: var(--aither-shadow);
}

.aither-brand {
  color: var(--aither-blue-deep) !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.nav-logo {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  margin-right: 8px;
}

/* ============================================================
   Shell UI layout — paridad legacy/index.html
   (pgDept L957-997, pgLogin L411-423, pgHome L458-461, pgOps L1251, pgEnroll L1042-1057)
   ============================================================ */

.shell-body {
  height: 100vh;
  overflow: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  background: var(--aither-bg);
  animation: aitherFadeIn .22s var(--aither-ease);
}

.pg-login {
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .6s;
  overflow: hidden;
}

.pg-enroll {
  background: linear-gradient(160deg, #F1F5FA, #E7EFF8);
}

.aither-logo-mark {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6BA8DC, #9BC8EC);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.l-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  flex-shrink: 0;
}

/* pgDept — glass cards y temas en day-night-shell.css */
.dpwrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 38px 20px 50px;
  text-align: center;
}

.dp-enroll-row {
  text-align: center;
  margin-top: 22px;
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.dp-enroll-cta {
  background: #FFF9E8;
  border: 1px solid #F0DFA8;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #8A6A20;
  line-height: 1.6;
  /* block a ancho completo — paridad legacy index.html L1155 */
}

.dp-enroll-btn {
  background: #C77A1A;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 9px;
}

.dp-change-fbo-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 920px;
  margin: -4px auto 26px;
  padding: 0 12px;
}

.dp-change-fbo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  font-family: inherit;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(91, 155, 213, .28);
  color: #3A7CB5;
  box-shadow: 0 4px 14px rgba(58, 124, 181, .1);
}

.dp-change-fbo:hover {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(91, 155, 213, .48);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(58, 124, 181, .16);
}

.dp-change-fbo:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(58, 124, 181, .12);
}

.dp-change-fbo svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.dp-change-fbo-label {
  line-height: 1;
}

/* pgLogin */
.lbox {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  width: 380px;
  max-width: 94vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.lhdr {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 14px;
  margin-bottom: 24px;
}

.lname {
  font-size: 22px;
  font-weight: 800;
  color: var(--aither-blue-deep);
}

.lname-by {
  font-size: .6em;
  font-weight: 700;
  color: var(--aither-blue);
}

.lsub {
  font-size: 11px;
  color: var(--aither-muted);
  margin-top: 2px;
}

.deptcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.deptcrumb b {
  font-size: 12.5px;
  color: var(--aither-blue-deep);
  background: #EAF3FB;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.deptcrumb button {
  background: none;
  border: none;
  color: var(--aither-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.llbl {
  font-size: 10px;
  font-weight: 700;
  color: #5A6478;
  text-transform: uppercase;
  letter-spacing: .07em;
  display: block;
  margin-bottom: 8px;
}

.lsel {
  width: 100%;
  height: 48px;
  border: 1.5px solid #CADEF0;
  border-radius: 10px;
  font-size: 14px;
  padding: 0 40px 0 12px;
  color: var(--aither-ink);
  background-color: #F8F9FC;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23555E6D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  outline: none;
  margin-bottom: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.lsel:focus { border-color: var(--aither-blue); }

.lwelcome {
  font-size: 13px;
  color: var(--aither-ok);
  font-weight: 600;
  min-height: 20px;
  margin-bottom: 12px;
}

.lbtn {
  width: 100%;
  height: 54px;
  background: linear-gradient(180deg, #5B9BD5, #4A8BC8);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(91, 155, 213, .28);
  cursor: pointer;
  transition: all .15s ease;
  margin-top: 4px;
}

.lbtn:active { opacity: .85; }
.lbtn:disabled {
  opacity: .85;
  cursor: default;
}

.lerr {
  font-size: 12px;
  color: var(--aither-err);
  text-align: center;
  margin-top: 8px;
  min-height: 16px;
}

.pin-lbl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #5A6478;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.pin-input {
  width: 100%;
  height: 54px;
  font-size: 22px;
  text-align: center;
  letter-spacing: .28em;
  border: 1px solid #D6E8F7;
  border-radius: var(--aither-radius);
  background: #FAFBFD;
  outline: none;
  padding: 0 12px;
  -webkit-text-security: disc;
  text-security: disc;
  font-family: ui-monospace, monospace;
  caret-color: var(--aither-blue);
}

.pin-input::placeholder {
  -webkit-text-security: none;
  text-security: none;
  letter-spacing: .28em;
  color: #B8C4D4;
  font-size: 18px;
}

.pin-err {
  margin-top: 8px;
  font-size: 12px;
  color: var(--aither-err);
  text-align: center;
  min-height: 16px;
}

.llegal {
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #D6E8F7;
}

.llegal-copy {
  font-size: 9px;
  color: #B8BEC9;
  letter-spacing: .05em;
}

.llegal-ver {
  font-size: 9px;
  color: #5B9BD5;
  font-weight: 700;
  margin-top: 3px;
}

.llegal-note {
  font-size: 8px;
  color: #B8BEC9;
  margin-top: 2px;
}

.llegal-body {
  font-size: 8px;
  color: #B8BEC9;
  margin-top: 6px;
  line-height: 1.55;
  text-align: justify;
  padding: 0 4px;
}

.llegal-forbid {
  font-size: 7px;
  color: #B8BEC9;
  margin-top: 6px;
  line-height: 1.5;
  padding: 0 4px;
}

/* pgEnroll */
.ewrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 44px 22px;
}

.pg-enroll .emark {
  margin: 0 auto 12px;
}

.ebrand {
  font-size: 20px;
  font-weight: 700;
  color: var(--aither-blue-deep);
  letter-spacing: -.01em;
  text-align: center;
  margin-bottom: 8px;
}

.ebrand span {
  font-size: .6em;
  color: var(--aither-blue);
}

.pg-enroll h1 {
  font-size: 20px;
  font-weight: 700;
  color: #0E1A2B;
  text-align: center;
  margin: 0 0 6px;
}

.esub {
  font-size: 13px;
  color: #5A6B7F;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 26px;
}

.ecard {
  background: #fff;
  border: 1px solid #DCE6F0;
  border-radius: 15px;
  padding: 22px;
}

.ecard label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #5A6B7F;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 7px;
}

.ecard input {
  width: 100%;
  padding: 13px;
  border: 1px solid #DCE6F0;
  border-radius: 11px;
  font-size: 15px;
  background: #F8FAFC;
  outline: none;
  font-family: ui-monospace, monospace;
  font-size: 24px;
  text-align: center;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--aither-ink);
}

.ecard input:focus {
  border-color: var(--aither-blue);
  background: #fff;
}

.ebtn {
  width: 100%;
  background: var(--aither-blue-deep);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

.ebtn:disabled {
  background: #B8C4D4;
  cursor: default;
}

.e-stub-msg {
  font-size: 12px;
  color: var(--aither-muted);
  text-align: center;
  margin-top: 10px;
}

.eerr {
  font-size: 12.5px;
  color: #C7402E;
  margin-top: 10px;
  min-height: 17px;
  text-align: center;
}

.ehelp {
  font-size: 11.5px;
  color: var(--aither-muted);
  text-align: center;
  margin-top: 18px;
  line-height: 1.6;
}

.elink {
  color: var(--aither-blue-deep);
  font-size: 12px;
  text-decoration: underline;
}

/* pgHome / pgOps toolbar */
.tb {
  background: linear-gradient(90deg, #1B4F7C, #2E6CA4);
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .15);
}

.tblogo {
  width: 34px;
  height: 34px;
  background: var(--aither-blue);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tblogo-radar {
  background: linear-gradient(135deg, #6BA8DC, #9BC8EC);
}

.tblogo-img {
  display: block;
  padding: 0;
  object-fit: cover;
  object-position: center 28%;
  background: none;
}

.tbt {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tbt-sub {
  opacity: .55;
  font-weight: 400;
  font-size: .8em;
}

.tbav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--aither-blue);
  border: 2px solid var(--aither-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tb-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.tb-user-role {
  font-size: 10px;
  color: rgba(255, 255, 255, .5);
}

.tbout {
  background: none;
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.tbbk {
  background: rgba(255, 255, 255, .12);
  border: 1.5px solid rgba(255, 255, 255, .35);
  color: #fff;
  height: 42px;
  min-width: 42px;
  padding: 0 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.tbbk svg { width: 20px; height: 20px; stroke-width: 2.5; }

.body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--aither-bg);
}

.sync-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sync-badge-empty {
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .2);
}

.aither-navbar .sync-badge-empty {
  background: #EAF3FB;
  color: var(--aither-muted);
  border: 1px solid #D6E8F7;
}

.icn {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .lbox { padding: 24px 20px; }
}
