/* MAXI — complementos sobre Bootstrap 5 (dark, local) */

:root {
  --maxi-sidebar-w: 16.75rem;
  --maxi-oro: #ffd43b;
  --maxi-alta: #ff6b6b;
  --maxi-media: #ffa94d;
  --maxi-baja: #69db7c;
  --maxi-row-vencida: rgba(255, 107, 107, 0.12);
  --maxi-row-proxima: rgba(255, 169, 77, 0.1);
  --maxi-row-ok: rgba(105, 219, 124, 0.08);
}

.maxi-main {
  max-width: 1280px;
}
.maxi-main-wide {
  max-width: 1400px;
}
body.maxi-superadmin .maxi-nav-btn.active {
  font-weight: 700;
  color: var(--maxi-oro) !important;
}

/* Shell: menú lateral + contenido */
body.maxi-has-sidebar {
  overflow-x: hidden;
}
.maxi-app-shell {
  min-height: 100dvh;
}
.maxi-app-content {
  min-height: 100dvh;
  min-width: 0;
}
@media (min-width: 992px) {
  .maxi-app-content {
    margin-left: var(--maxi-sidebar-w);
  }
}
.maxi-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  width: var(--maxi-sidebar-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #252a31 0%, #14171c 100%);
  border-right: 1px solid rgba(255, 212, 59, 0.15);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(0);
  transition: transform 0.24s ease;
}
.maxi-sidebar-brand {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.maxi-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 212, 59, 0.22);
  background: rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}
.maxi-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.65rem;
  -webkit-overflow-scrolling: touch;
}
.maxi-sidebar-footer {
  flex-shrink: 0;
  padding: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}
.maxi-sidebar .maxi-nav-main,
.maxi-sidebar .maxi-nav-account {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}
.maxi-sidebar .maxi-nav-btn.nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 0.55rem 0.85rem !important;
}
.maxi-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: none;
}
body.maxi-sidebar-open .maxi-sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.maxi-topbar {
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, #252a31 0%, #14171c 100%);
  border-bottom: 1px solid rgba(255, 212, 59, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.maxi-topbar-title {
  min-width: 0;
  flex: 1;
}
.logo-maxi-sm {
  font-size: 1.15rem;
  letter-spacing: 0.15em;
}
@media (max-width: 991.98px) {
  .maxi-sidebar {
    transform: translateX(-100%);
  }
  body.maxi-sidebar-open .maxi-sidebar {
    transform: translateX(0);
  }
  body.maxi-sidebar-open {
    overflow: hidden;
  }
}

.maxi-header {
  z-index: 1030;
  background: #1a1d22;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.maxi-navbar-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.maxi-navbar-brand {
  flex: 1 1 auto;
  min-width: 0;
}
.maxi-header-nav {
  background: linear-gradient(180deg, #252a31 0%, #14171c 100%);
  border-bottom: 1px solid rgba(255, 212, 59, 0.15);
}
.maxi-navbar-brand .logo-maxi { font-size: 1.35rem; line-height: 1.1; display: block; }
.maxi-navbar-brand .header-sub { font-size: 0.68rem; margin-top: 0.15rem; color: var(--bs-secondary-color); }
.maxi-nav-toolbar {
  background: transparent;
}
.maxi-nav-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}
.maxi-user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 212, 59, 0.25);
  background: rgba(0, 0, 0, 0.35);
  max-width: min(320px, 45vw);
}
.maxi-user-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 212, 59, 0.12);
  font-size: 1rem;
  flex-shrink: 0;
}
.maxi-user-chip-body { min-width: 0; line-height: 1.2; }
.maxi-user-chip-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maxi-oro);
  font-weight: 700;
}
.maxi-user-chip-text {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bs-body-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maxi-user-chip-rol {
  display: block;
  font-size: 0.68rem;
  color: var(--bs-secondary-color);
}
.maxi-nav-main,
.maxi-nav-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.maxi-nav-btn.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.15) 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s, border-color 0.15s, background 0.15s, color 0.15s;
}
.maxi-nav-btn.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 212, 59, 0.45);
  background: rgba(255, 212, 59, 0.1);
  color: #fff !important;
}
.maxi-nav-btn.nav-link.active {
  border-color: var(--maxi-oro);
  background: linear-gradient(180deg, rgba(255, 212, 59, 0.22) 0%, rgba(255, 212, 59, 0.08) 100%);
  color: var(--maxi-oro) !important;
  box-shadow: 0 0 0 1px rgba(255, 212, 59, 0.25);
}
.maxi-nav-ico {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.95;
}
.maxi-nav-btn-danger {
  border-color: rgba(255, 107, 107, 0.4) !important;
  color: #ffb3b3 !important;
}
.maxi-nav-btn-danger:hover {
  background: rgba(255, 107, 107, 0.15) !important;
}
.login-pwa-box {
  border-style: solid;
  border-color: rgba(255, 212, 59, 0.25);
}

/* Feedback vía SweetAlert2 — ocultar barras Bootstrap antiguas si quedara caché */
#app-main > .alert.ajax-flash,
#app-main > .alert.alert-dismissible {
  display: none !important;
}

.swal2-popup.maxi-swal-popup {
  border: 1px solid rgba(255, 212, 59, 0.25);
}
.swal2-popup.maxi-swal-popup .maxi-swal-confirm {
  color: #212529;
  font-weight: 700;
}

/* Menú móvil */
.navbar-toggler.maxi-hamburger {
  --maxi-burger-size: 3rem;
  width: var(--maxi-burger-size);
  height: var(--maxi-burger-size);
  padding: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 236, 153, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #343a44 0%, #252930 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.12s;
}
.navbar-toggler.maxi-hamburger:hover {
  background: linear-gradient(180deg, #3d4450 0%, #2c323c 100%);
  border-color: var(--maxi-oro);
  box-shadow: 0 0 0 1px rgba(255, 212, 59, 0.2), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.navbar-toggler.maxi-hamburger:focus {
  outline: none;
  border-color: var(--maxi-oro);
  box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.28);
}
.navbar-toggler.maxi-hamburger[aria-expanded="true"] {
  background: linear-gradient(180deg, #454d38 0%, #323828 100%);
  border-color: var(--maxi-oro);
  box-shadow: 0 0 12px rgba(255, 212, 59, 0.18);
}
.navbar-toggler.maxi-hamburger .navbar-toggler-icon { display: none; }
.maxi-hamburger-box {
  width: 1.25rem;
  height: 0.9375rem;
  position: relative;
  display: block;
  pointer-events: none;
}
.maxi-hamburger-line {
  position: absolute;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: #ffec99;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease, width 0.18s ease, left 0.18s ease;
}
.maxi-hamburger-line:nth-child(1) { top: 0; width: 100%; }
.maxi-hamburger-line:nth-child(2) { top: 0.318rem; width: 70%; left: 15%; }
.maxi-hamburger-line:nth-child(3) { top: 0.636rem; width: 100%; }
.maxi-hamburger[aria-expanded="true"] .maxi-hamburger-line:nth-child(1) {
  top: 0.318rem;
  left: 0;
  width: 100%;
  transform: rotate(45deg);
}
.maxi-hamburger[aria-expanded="true"] .maxi-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.maxi-hamburger[aria-expanded="true"] .maxi-hamburger-line:nth-child(3) {
  top: 0.318rem;
  left: 0;
  width: 100%;
  transform: rotate(-45deg);
}

@media (max-width: 991.98px) {
  .maxi-hamburger {
    position: relative;
    z-index: 1035;
    order: 2;
  }
  .maxi-navbar-brand {
    order: 1;
  }
  .maxi-nav-collapse {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem 0.25rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .maxi-nav-btn.nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.85rem !important;
    font-size: 1rem;
    border-radius: 10px;
  }
  .maxi-pwa-panel {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--bs-border-radius-lg);
    border: 1px dashed rgba(255, 212, 59, 0.35);
    background: rgba(0, 0, 0, 0.2);
  }
}
@media (min-width: 992px) {
  .maxi-navbar-shell {
    flex-wrap: nowrap;
    gap: 0.75rem;
  }
  .maxi-navbar-brand {
    flex: 0 1 auto;
    max-width: 220px;
  }
  .maxi-nav-collapse {
    display: flex !important;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .maxi-nav-toolbar {
    width: 100%;
  }
  .maxi-nav-groups {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .maxi-nav-main {
    flex: 1 1 auto;
    flex-wrap: wrap;
  }
  .maxi-nav-account {
    flex-shrink: 0;
    margin-left: auto;
  }
  .maxi-user-chip {
    order: 3;
    margin-left: 0;
  }
  .maxi-nav-btn.nav-link {
    width: auto;
  }
}

.logo-maxi {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--maxi-oro);
}
.logo-maxi-lg {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 0.25rem;
}
.header-sub {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  letter-spacing: 0.05em;
}

.input-mayus { text-transform: uppercase; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.85rem 1rem;
}
.stat-card .label { color: var(--bs-secondary-color); font-size: 0.75rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 700; }
.maxi-stat-card-static {
  cursor: default;
  pointer-events: none;
}
.maxi-stat-card-static:hover {
  transform: none;
  box-shadow: none;
}
.maxi-mi-semana-nota {
  max-width: 42rem;
}
.maxi-mi-semana-comentarios li:last-child {
  border-bottom: none !important;
}

.stat-card-btn {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  color: inherit;
  font: inherit;
}
.stat-card-btn:hover,
.stat-card-btn:focus-visible {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  outline: none;
}
.stat-card-btn[data-resumen-card="vencidas"] .value { color: var(--maxi-alta); }
.stat-card-btn[data-resumen-card="completadas"] .value { color: var(--maxi-baja); }

.superadmin-stat-filter.active {
  border-color: var(--maxi-oro);
  box-shadow: 0 0 0 1px var(--maxi-oro);
}

.panel,
.card.maxi-panel {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}
.panel h2, .card.maxi-panel h2 { margin: 0 0 0.75rem; font-size: 1rem; }

/* Modales: cuerpo con scroll, pie fijo */
.modal-dialog {
  max-height: calc(100dvh - 1rem);
  margin: 0.5rem auto;
}
.modal-content {
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-body,
.maxi-modal-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.maxi-modal .modal-dialog {
  max-height: calc(100dvh - 1rem);
}
.maxi-modal .modal-content {
  max-height: calc(100dvh - 1rem);
}
.maxi-modal-usuario .modal-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.maxi-modal-usuario .modal-content > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.maxi-modal-usuario .modal-header,
.maxi-modal-usuario .modal-footer {
  flex-shrink: 0;
}
.maxi-modal-usuario .modal-body,
.maxi-modal-usuario .maxi-modal-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1.5rem;
}
.maxi-modal-dialog-usuario {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 1rem);
}
.maxi-modal-dialog-usuario .modal-content {
  max-height: 100%;
}
@media (max-width: 991.98px) {
  .modal-dialog.modal-fullscreen-lg-down {
    max-height: 100dvh;
    height: calc(100dvh - 0.5rem);
    margin: 0.25rem auto;
  }
  .modal-fullscreen-lg-down .modal-content {
    max-height: 100%;
    height: 100%;
    border-radius: 0.5rem;
  }
  .maxi-modal-dialog-usuario,
  .maxi-modal-usuario .modal-dialog {
    margin: 0;
    max-height: 100dvh;
    height: 100dvh;
  }
  .maxi-modal-usuario .modal-content {
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
}
.modal-footer {
  flex-shrink: 0;
}
.maxi-modal .modal-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--bs-body-bg);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  padding-top: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.maxi-modal .modal-footer .btn-primary {
  min-width: 8rem;
  font-weight: 600;
}
.cal-panel-cumple { margin-bottom: 1rem; }
.cal-grid-cumple .cal-day-cumple {
  min-height: 2.75rem;
  vertical-align: middle;
}
.cal-day-cumple .cal-day-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 2.5rem;
  text-decoration: none;
  color: inherit;
  padding: 4px;
  border-radius: var(--bs-border-radius);
}
.cal-has-birthday .cal-day-link {
  background: rgba(255, 212, 59, 0.12);
  border: 1px solid rgba(255, 212, 59, 0.35);
}
.cal-badge-cake {
  font-size: 0.7rem;
  line-height: 1;
}
.cumple-dia-panel {
  border: 1px solid rgba(255, 212, 59, 0.35);
  background: linear-gradient(160deg, rgba(255, 212, 59, 0.06) 0%, var(--bs-body-bg) 45%);
}
.cumple-celebration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cumple-celebration-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--bs-border-radius-lg);
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.cumple-celebration-photo {
  position: relative;
  flex-shrink: 0;
}
.cumple-celebration-photo img,
.cumple-celebration-iniciales {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--maxi-oro);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.cumple-celebration-iniciales {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--maxi-oro);
  background: #1a1d22;
}
.cumple-celebration-emoji {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.35rem;
}
.cumple-celebration-name { color: var(--maxi-oro); font-weight: 800; }
.cumple-celebration-edad { font-size: 0.9rem; }
.cumple-celebration-msg {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--bs-body-color);
  border-left: 3px solid var(--maxi-oro);
  padding-left: 0.75rem;
  margin: 0;
}
.cumple-card-link { color: inherit; transition: border-color 0.15s; }
.cumple-card-link:hover { border-color: var(--maxi-oro); color: inherit; }
.cumple-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.cumple-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
}
.cumple-card-photo img,
.cumple-card-photo span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--maxi-oro);
}
.cumple-card-date { font-size: 0.75rem; color: var(--maxi-oro); font-weight: 700; }
.cumple-card-name { font-weight: 700; }
.usuario-modal-section {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.usuario-modal-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maxi-oro);
  margin-bottom: 0.65rem;
  font-weight: 700;
}
.rol-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
}
.rol-badge-admin { border-color: var(--maxi-oro); color: var(--maxi-oro); }
.rol-badge-supervisor { border-color: #74c0fc; color: #74c0fc; }
.rol-badge-usuario { border-color: var(--bs-secondary-color); }

.panel label:not(.form-check-label),
.card.maxi-panel label:not(.form-check-label) {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}
.panel input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]),
.panel select,
.panel textarea,
.form-grid input:not([type=checkbox]):not([type=radio]),
.form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.panel select[multiple] { min-height: 8rem; }
.maxi-select-equipo {
  max-height: 14rem;
  overflow-y: auto;
}
.panel textarea { min-height: 5rem; }

.checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-row input { width: auto; margin-top: 0 !important; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0;
}
.filters .form-select,
.filters .form-control {
  min-width: 120px;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.table-wrap { overflow-x: auto; }

#tableroListaTareas.maxi-tablero-lista {
  padding: 0.65rem 0.75rem;
}
#tableroListaTareas .maxi-tablero-tabla,
#tableroListaTareas table.maxi-tablero-tabla,
#tableroListaTareas table.table {
  font-size: 0.58rem !important;
  line-height: 1.2 !important;
}
#tableroListaTareas .maxi-tablero-tabla th,
#tableroListaTareas table.table th {
  font-size: 0.54rem !important;
  font-weight: 600;
  padding: 0.2rem 0.3rem !important;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
#tableroListaTareas .maxi-tablero-tabla td,
#tableroListaTareas table.table td {
  padding: 0.16rem 0.3rem !important;
  vertical-align: middle;
}
#tableroListaTareas .maxi-tablero-tabla a,
#tableroListaTareas table.table a {
  font-size: inherit !important;
}
#tableroListaTareas .maxi-tablero-lista-title {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.maxi-usuarios-panel {
  padding-bottom: 0.5rem;
}
.maxi-scroll-panel {
  overflow-x: auto;
  overflow-y: auto !important;
  max-height: min(68vh, calc(100dvh - 11rem));
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border-radius: var(--bs-border-radius);
}
.maxi-scroll-panel.table-wrap {
  overflow-y: auto !important;
}
#maxiUsuariosTableScroll {
  max-height: min(68vh, calc(100dvh - 11rem)) !important;
}
body:not(.modal-open) #maxiUsuariosTableScroll {
  overflow-y: auto !important;
}
.maxi-scroll-panel .maxi-usuarios-tabla {
  font-size: 0.82rem;
}
.maxi-scroll-panel .maxi-usuarios-tabla th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bs-table-bg, #212529);
  box-shadow: 0 1px 0 var(--bs-border-color);
}
@media (max-width: 991.98px) {
  .maxi-scroll-panel {
    max-height: min(55vh, calc(100dvh - 14rem));
  }
}

/* Listas largas (legacy) */
.table-wrap.table-scroll-y {
  overflow-x: auto;
  overflow-y: auto !important;
  max-height: min(68vh, calc(100dvh - 10.5rem));
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border-radius: var(--bs-border-radius);
}
.table-wrap.table-scroll-y .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bs-table-bg, #212529);
  box-shadow: 0 1px 0 var(--bs-border-color);
}
@media (max-width: 991.98px) {
  .table-wrap.table-scroll-y {
    max-height: min(58vh, calc(100dvh - 13rem));
  }
}

tr.row-vencida { background: var(--maxi-row-vencida) !important; }
tr.row-proxima { background: var(--maxi-row-proxima) !important; }
tr.row-completada { background: var(--maxi-row-ok) !important; }
.prio-alta { color: var(--maxi-alta); font-weight: 600; }
.prio-media { color: var(--maxi-media); }
.prio-baja { color: var(--maxi-baja); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.tablero-alertas-cal {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 960px) {
  .tablero-alertas-cal { grid-template-columns: 1fr; }
}

.dia-pendientes-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  max-height: 10rem;
  overflow-y: auto;
}
.muted-item { color: var(--bs-secondary-color); list-style: none; margin-left: -1.1rem; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cal-title { margin: 0; font-size: 1rem; font-weight: 700; }
.cal-nav-btn { min-width: 2rem; }

.cal-grid { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cal-grid th {
  color: var(--bs-secondary-color);
  font-weight: 600;
  padding: 0.35rem 0;
  text-align: center;
  border: none;
}
.cal-day { padding: 2px; vertical-align: top; border: none; }
.cal-day a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--bs-body-color);
  border: 1px solid transparent;
}
.cal-day a:hover { background: var(--bs-secondary-bg); border-color: var(--bs-border-color); }
.cal-selected a { background: var(--bs-secondary-bg); border-color: var(--bs-primary); }
.cal-hoy .cal-num { color: var(--maxi-oro); font-weight: 700; }
.cal-num { font-size: 0.9rem; }
.cal-badge {
  font-size: 0.65rem;
  background: var(--bs-primary);
  color: #fff;
  border-radius: 8px;
  padding: 0 0.35rem;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.dia-title { margin: 0 0 0.25rem; font-size: 1.05rem; }
.dia-sub { margin: 0 0 0.75rem; color: var(--bs-secondary-color); font-size: 0.8rem; }

.auditorio-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .auditorio-layout { grid-template-columns: 1fr; }
}

.timeline-wrap {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.5rem;
  min-height: 280px;
}
.timeline-hours {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
  padding: 0.1rem 0;
}
.timeline-track {
  position: relative;
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  min-height: 280px;
}
.timeline-block {
  position: absolute;
  left: 4px;
  right: 4px;
  background: #2a4568;
  border: 1px solid var(--bs-primary);
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
  color: var(--bs-body-color);
  text-decoration: none;
  overflow: hidden;
  box-sizing: border-box;
}
.timeline-block:hover { filter: brightness(1.08); }
.timeline-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  margin: 0;
}

.hora-rango {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.login-page,
.login-page-simple {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(ellipse at top, #343a40 0%, #212529 55%);
}
.login-page-split {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-content: stretch;
  min-height: 100dvh;
  padding: 0;
  background: #212529;
}
.login-page-split .login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem 2rem;
  background: radial-gradient(ellipse at top, #343a40 0%, #212529 55%);
}
.login-info-panel {
  order: 2;
  padding: 1.75rem 1.25rem 2rem;
  background: linear-gradient(160deg, rgba(255, 212, 59, 0.07) 0%, #1a1d21 42%, #212529 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.login-info-inner { max-width: 32rem; margin: 0 auto; }
.login-info-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maxi-oro);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.login-info-title {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}
.login-info-lead {
  color: var(--bs-secondary-color);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
}
.login-info-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.login-info-features li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: start;
  font-size: 0.84rem;
  line-height: 1.45;
}
.login-info-features strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.12rem;
}
.login-info-features span:not(.login-info-ico) {
  color: var(--bs-secondary-color);
}
.login-info-ico {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 0.1rem;
}
@media (min-width: 992px) {
  .login-page-split {
    grid-template-columns: 1fr 1fr;
  }
  .login-info-panel {
    order: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 100dvh;
  }
  .login-info-inner { margin: 0; max-width: 28rem; }
  .login-page-split .login-panel {
    min-height: 100dvh;
    padding: 2rem;
  }
}
.login-wrap { width: 100%; max-width: 420px; }
.login-mascot {
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}
.login-tagline { text-align: center; color: var(--bs-secondary-color); font-size: 0.9rem; margin: 0 0 1.25rem; }
.login-links { text-align: center; margin-top: 0.75rem; font-size: 0.85rem; }
.pwa-hint { color: var(--bs-secondary-color); font-size: 0.75rem; text-align: center; margin-top: 0.75rem; }

body:has(.login-page) .maxi-main { max-width: none; padding: 0 !important; }

.admin-account-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 59, 0.4);
  background: linear-gradient(135deg, rgba(255, 212, 59, 0.08) 0%, rgba(33, 37, 41, 0.95) 55%);
}
.admin-account-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 212, 59, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.admin-account-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.25rem;
}
.admin-account-photo {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.admin-account-photo img,
.admin-account-iniciales {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--maxi-oro);
  box-shadow: 0 0 20px rgba(255, 212, 59, 0.25);
}
.admin-account-iniciales {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--maxi-oro);
  background: #1a1d22;
}
.admin-account-crown {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: var(--maxi-oro);
  color: #212529;
  font-weight: 900;
  border: 2px solid #212529;
}
.admin-account-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--maxi-oro);
  font-weight: 700;
  margin: 0;
}
.admin-account-name {
  color: var(--bs-body-color);
  font-weight: 800;
}
.table-row-admin {
  background: rgba(255, 212, 59, 0.06) !important;
}
.table-row-admin td {
  border-color: rgba(255, 212, 59, 0.12) !important;
}

.roster-title {
  color: var(--maxi-oro);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.hero-card {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 1rem;
  height: 100%;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.hero-card:hover {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.hero-card.peligro {
  border-color: var(--maxi-alta);
}

.hero-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--maxi-oro);
  background: #3d5a80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.1rem;
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 1.5rem;
}

.hero-nivel { color: var(--maxi-oro); font-size: 0.75rem; font-weight: 700; }
.hero-nombre { font-size: 1.05rem; font-weight: 700; margin: 0.15rem 0; }
.hero-cargo { color: var(--bs-secondary-color); font-size: 0.8rem; }
.hero-rango { font-weight: 700; font-size: 0.85rem; margin-top: 0.25rem; }

.hero-xp-label {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-top: 0.65rem;
}

.xp-bar {
  height: 8px;
  background: #1e2430;
  border-radius: 4px;
  margin: 0.25rem 0 0.5rem;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
}
.xp-fill {
  height: 100%;
  background: var(--bs-primary);
  border-radius: 3px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
}
.hero-stats span {
  background: var(--bs-secondary-bg);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.hero-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.hero-card:hover .hero-link { color: var(--bs-primary); }

.hero-resumen { color: var(--bs-body-color); }

.card-click {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.card-click:hover {
  border-color: var(--bs-primary) !important;
  transform: translateY(-1px);
}

.maxi-tablero-vista .nav-link { color: var(--bs-secondary-color); }
.maxi-tablero-vista .nav-link.active { color: var(--bs-body-color); font-weight: 600; }
.maxi-tablero-filters { flex-wrap: wrap; gap: 0.5rem 1rem; align-items: end; margin-bottom: 1rem; }

.maxi-prio-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--prio-color, #868e96) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--prio-color, #868e96) 55%, transparent);
  color: var(--bs-body-color);
  vertical-align: middle;
  line-height: 1.2;
}
.maxi-prio-pill-alta { --prio-color: var(--maxi-alta); }
.maxi-prio-pill-media { --prio-color: var(--maxi-media); }
.maxi-prio-pill-baja { --prio-color: var(--maxi-baja); }

.maxi-prio-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.maxi-prio-pill-option {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}
.maxi-prio-pill-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.maxi-prio-pill-option input:focus-visible + .maxi-prio-pill {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}
.maxi-prio-pill-option input:checked + .maxi-prio-pill {
  background: color-mix(in srgb, var(--prio-color) 42%, transparent);
  border-color: var(--prio-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--prio-color) 70%, transparent);
}
.maxi-prio-pill-option:hover .maxi-prio-pill {
  border-color: color-mix(in srgb, var(--prio-color) 80%, var(--bs-border-color));
}

.maxi-kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}
@media (max-width: 992px) {
  .maxi-kanban-board { grid-template-columns: 1fr; }
}
.maxi-kanban-col {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  min-height: 12rem;
  display: flex;
  flex-direction: column;
}
.maxi-kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.maxi-kanban-col-title { font-size: 0.85rem; margin: 0; font-weight: 600; }
.maxi-kanban-col-count {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.maxi-kanban-dropzone {
  flex: 1;
  padding: 0.45rem;
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.maxi-kanban-dropzone.maxi-kanban-drop-over {
  background: color-mix(in srgb, var(--bs-primary) 12%, transparent);
  outline: 1px dashed var(--bs-primary);
  outline-offset: -2px;
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
}
.maxi-kanban-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-left-width: 3px;
  border-radius: var(--bs-border-radius);
  padding: 0.5rem 0.55rem;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.maxi-kanban-card.prio-border-alta { border-left-color: var(--maxi-alta); }
.maxi-kanban-card.prio-border-media { border-left-color: var(--maxi-media, #ffc107); }
.maxi-kanban-card.prio-border-baja { border-left-color: var(--maxi-baja); }
.maxi-kanban-card-vencida { border-color: color-mix(in srgb, var(--maxi-alta) 45%, var(--bs-border-color)); }
.maxi-kanban-card-dragging { opacity: 0.55; cursor: grabbing; }
.maxi-kanban-card-title {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--bs-body-color);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.maxi-kanban-card-title:hover { color: var(--bs-primary); }
.maxi-kanban-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }

.maxi-actividad-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--bs-border-color);
  margin-left: 0.35rem;
}
.maxi-actividad-item {
  position: relative;
  padding: 0.45rem 0 0.45rem 1rem;
  font-size: 0.82rem;
}
.maxi-actividad-item::before {
  content: '';
  position: absolute;
  left: -0.42rem;
  top: 0.65rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--bs-secondary);
  border: 2px solid var(--bs-body-bg);
}
.maxi-actividad-tipo { font-weight: 600; margin-right: 0.35rem; }
.maxi-actividad-who { color: var(--bs-secondary-color); margin-right: 0.35rem; }
.maxi-actividad-when { display: block; font-size: 0.72rem; color: var(--bs-secondary-color); }
.maxi-actividad-detalle { margin-top: 0.2rem; color: var(--bs-secondary-color); white-space: pre-wrap; }
.maxi-actividad-completada::before { background: var(--maxi-baja); }
.maxi-actividad-creada::before { background: var(--bs-primary); }
