.mt-image-preview {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11000;
  color: #fff;
  background: rgba(2, 6, 23, 0.97);
  display: flex;
  flex-direction: column;
}

.mt-image-preview > header,
.mt-image-preview > footer {
  min-height: 58px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mt-image-preview > header strong {
  margin-right: 14px;
}

.mt-image-preview > header button {
  position: absolute;
  right: 18px;
}

.mt-image-preview button,
.mt-image-preview a {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.mt-image-preview__stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mt-image-preview__stage img {
  max-width: 82vw;
  max-height: 78vh;
  object-fit: contain;
  transition: transform 160ms ease;
}

.mt-image-preview__stage button {
  position: absolute;
  z-index: 2;
  font-size: 32px;
}

.mt-image-preview__stage .previous {
  left: 18px;
}

.mt-image-preview__stage .next {
  right: 18px;
}

.mt-image-preview > footer > * {
  margin: 0 5px;
}

/* FilterCombo — combobox filtrable global Toolkit */
.tk-combo {
  position: relative;
  display: block;
  min-width: 0;
}

.tk-combo__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--toolkit-text-label, var(--toolkit-text-muted, #64748b));
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tk-combo__control {
  position: relative;
  display: flex;
  align-items: stretch;
}

.tk-combo.is-open .tk-combo__control input,
.tk-combo__control input:focus {
  outline: 0;
  border-color: var(--toolkit-blue, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--toolkit-blue, #2563eb) 18%, transparent);
}

.tk-combo__control input {
  width: 100%;
  min-height: var(--toolkit-input-height, 44px);
  padding: 10px 42px 10px 12px;
  border: 1px solid color-mix(in srgb, var(--toolkit-panel-border, #e2e8f0) 80%, #94a3b8);
  border-radius: var(--toolkit-btn-radius, 12px);
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text-body, #0f172a);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tk-combo__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 10%, var(--toolkit-panel-bg, #fff));
  color: var(--toolkit-blue, #2563eb);
  font-size: 16px;
  cursor: pointer;
  transition: transform .22s ease, background .18s ease, color .18s ease;
}

.tk-combo.is-open .tk-combo__toggle {
  transform: translateY(-50%) rotate(180deg);
  background: var(--toolkit-blue, #2563eb);
  color: #fff;
}

.tk-combo__toggle:hover:not(:disabled) {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 18%, var(--toolkit-panel-bg, #fff));
}

.tk-combo.is-open .tk-combo__toggle:hover:not(:disabled) {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 88%, #0f172a);
}

.tk-combo__toggle:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.tk-combo__drop {
  position: fixed;
  /* Por encima de cualquier modal/backdrop de la app (10020-11000, 2147483xxx). */
  z-index: 2147483647;
  max-height: min(320px, 50vh);
  min-height: 52px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--toolkit-blue, #2563eb) 28%, var(--toolkit-panel-border, #e2e8f0));
  border-radius: var(--toolkit-card-radius, 14px);
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text-body, #0f172a);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.18),
    0 0 0 1px color-mix(in srgb, var(--toolkit-blue, #2563eb) 8%, transparent);
  transform-origin: top center;
  animation: tk-combo-in 220ms cubic-bezier(.22, 1, .36, 1) both;
  pointer-events: auto;
}

.tk-combo__drop.is-up {
  transform-origin: bottom center;
  animation-name: tk-combo-in-up;
}

@keyframes tk-combo-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tk-combo-in-up {
  from {
    opacity: 0;
    transform: translateY(8px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tk-combo__drop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0);
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 8%, var(--toolkit-panel-bg, #fff));
  color: var(--toolkit-blue, #2563eb);
  font-size: 12px;
  font-weight: 750;
}

.tk-combo__drop-head small {
  margin-left: auto;
  color: var(--toolkit-text-muted, #64748b);
  font-weight: 600;
}

.tk-combo__drop-body {
  overflow: auto;
  padding: 6px;
  overscroll-behavior: contain;
}

.tk-combo__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--toolkit-text-body, #0f172a);
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

.tk-combo__option span {
  min-width: 0;
}

.tk-combo__option svg {
  flex: 0 0 auto;
  color: var(--toolkit-blue, #2563eb);
  font-size: 16px;
}

.tk-combo__option.is-active,
.tk-combo__option:hover {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
}

.tk-combo__option.is-selected {
  font-weight: 750;
  color: color-mix(in srgb, var(--toolkit-blue, #2563eb) 70%, #0f172a);
}

.tk-combo__empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}

.tk-combo__empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 14px;
}

.tk-combo__empty-wrap .tk-combo__empty {
  padding: 10px 6px 0;
}

.tk-combo__empty-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--toolkit-blue, #2563eb) 35%, var(--toolkit-panel-border, #e2e8f0));
  border-radius: 10px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 10%, #fff);
  color: var(--toolkit-blue, #2563eb);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.tk-combo__empty-action:hover {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 18%, #fff);
  border-color: var(--toolkit-blue, #2563eb);
}

.tk-combo__empty-action:active {
  transform: scale(.97);
}

/* Encaje en formularios que ya envuelven label */
.compras-field > .tk-combo,
.colegio-field > .tk-combo,
.rh-field > div > .tk-combo,
.cap-students__field > .tk-combo,
.cap-field > .tk-combo,
.cap-purchase-field > .tk-combo,
.enf-field.tk-combo {
  width: 100%;
  border: 0;
  padding: 0;
  height: auto;
  min-height: 0;
  background: transparent;
  box-shadow: none;
}

/* RH: el wrapper .rh-field>div ya aporta borde/fondo (como un input).
   El control del combo no debe verse como un segundo input encima. */
.rh-field > div > .tk-combo {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
}
.rh-field > div > .tk-combo .tk-combo__control {
  flex: 1;
  width: 100%;
  min-width: 0;
}
.rh-field > div > .tk-combo .tk-combo__control input,
.rh-field > div > .tk-combo.is-open .tk-combo__control input,
.rh-field > div > .tk-combo .tk-combo__control input:focus {
  min-height: 46px;
  padding: 9px 42px 9px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.rh-field > div > .tk-combo .tk-combo__toggle {
  right: 8px;
}

.inventory-request-toolbar .tk-combo,
.cap-students__filters .tk-combo,
.cap-inventory-toolbar .tk-combo,
.compras-filter-row .tk-combo,
.compras-register-summary .tk-combo {
  min-width: 180px;
  flex: 0 1 220px;
  border: 0;
  padding: 0;
  height: auto;
  min-height: 0;
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .tk-combo__drop,
  .tk-combo__toggle {
    animation: none !important;
    transition: none !important;
  }
}

.cap-profile-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.cap-profile-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  height: calc(100vh - 40px);
  min-height: 320px;
  max-height: 900px;
  overflow: hidden;
  border-radius: 30px;
  color: var(--toolkit-text-body, #111827);
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.3);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-animation: cap-profile-enter 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: cap-profile-enter 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cap-profile-overlay > .cap-profile-modal {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@supports not (animation-name: cap-profile-enter) {
  .cap-profile-modal {
    -webkit-animation: none;
    animation: none;
    -webkit-transform: none;
    transform: none;
  }
}

.cap-profile-modal.playful { border-radius: 34px; }
.cap-profile-modal.serious { border-radius: 26px; }

.cap-profile-topbar {
  min-height: 58px;
  padding: 10px 16px 10px 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.96));
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.cap-profile-topbar > div {
  color: var(--toolkit-text-body, #475569);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.cap-profile-topbar i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
}

.cap-profile-topbar button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--toolkit-text-body, #334155);
  background: var(--toolkit-surface, #f1f5f9);
  font-size: 23px;
  cursor: pointer;
}

.cap-profile-topbar__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-left: 12px;
}

.cap-profile-topbar__actions > * + * {
  margin-left: 8px;
}

.cap-profile-lock {
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0;
  height: 36px !important;
  padding: 0 12px 0 10px !important;
  border-radius: 999px !important;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #6d28d9 !important;
  background: #ede9fe !important;
  border: 1px solid #c4b5fd !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  -webkit-transition: -webkit-transform .15s ease, background .15s ease, color .15s ease;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.cap-profile-lock__icon {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 16px;
}

.cap-profile-lock__icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.cap-profile-lock__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
}

.cap-profile-lock:hover {
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
  background: #ddd6fe !important;
}

.cap-profile-lock.is-open {
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #db2777) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.35);
}

.cap-profile-close {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.cap-profile-alert-chip {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  margin: 12px 18px 0;
  padding: 10px 14px;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.12), #fff7ed);
  color: #b45309;
  font-size: 13px;
  font-weight: 750;
}

.cap-profile-alert-chip svg {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  font-size: 18px;
}

.cap-profile-atenciones {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.cap-profile-atenciones > li {
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, #fff);
}

.cap-profile-atenciones header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.cap-profile-atenciones h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.cap-profile-atenciones p {
  margin: 0 0 4px;
  color: var(--toolkit-text-body, #334155);
  font-size: 13px;
}

.cap-profile-atencion-pase {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px !important;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.1);
  color: #b45309 !important;
  font-size: 12px !important;
  font-weight: 750;
}

.cap-profile-atencion-meds {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: 6px;
  color: #0f766e !important;
  font-weight: 650;
}

.cap-profile-atencion-notes {
  color: var(--toolkit-text-muted, #64748b) !important;
}

.cap-profile-scroll {
  min-height: 0;
  padding: 22px 22px 30px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cap-profile-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  padding: 16px;
  border: 2px dashed;
  border-radius: 26px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.cap-profile-hero-fx {
  z-index: 1;
}

/* Partículas en todo el hero (foto + nombre + stats). */
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(1) { top: 8%; left: 6%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(2) { top: 12%; left: 48%; right: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(3) { top: 10%; left: 78%; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(4) { top: 22%; left: 92%; right: auto; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(5) { top: 18%; left: 36%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(6) { top: 28%; left: 62%; right: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(7) { top: 36%; left: 86%; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(8) { top: 44%; left: 42%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(9) { top: 52%; left: 72%; right: auto; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(10) { top: 6%; left: 28%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(11) { top: 58%; left: 54%; right: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(12) { top: 70%; left: 88%; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(13) { top: 76%; left: 40%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(14) { top: 82%; left: 64%; right: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(15) { top: 34%; left: 18%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(16) { top: 48%; left: 96%; right: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(17) { top: 4%; left: 58%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(18) { top: 64%; left: 78%; right: auto; bottom: auto; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(19) { top: 40%; left: 50%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(20) { top: 16%; left: 70%; }
.cap-profile-hero-fx .cap-student-editor-fx__item:nth-child(21) { top: 88%; left: 52%; bottom: auto; }

.cap-profile-hero > .star,
.cap-profile-hero > .rocket,
.cap-profile-hero > .scribble {
  position: absolute;
  z-index: 2;
  font-style: normal;
  pointer-events: none;
}

.cap-profile-hero > .star {
  top: 24px;
  right: 28px;
  font-size: 27px;
  -webkit-transform: rotate(-12deg);
  transform: rotate(-12deg);
  -webkit-animation: cap-profile-float 1700ms ease-in-out infinite alternate;
  animation: cap-profile-float 1700ms ease-in-out infinite alternate;
}

.cap-profile-hero > .rocket {
  right: 120px;
  bottom: 24px;
  font-size: 31px;
  -webkit-transform: rotate(14deg);
  transform: rotate(14deg);
}

.cap-profile-hero > .scribble {
  top: -58px;
  right: -48px;
  width: 210px;
  height: 210px;
  border: 18px dotted;
  border-radius: 50%;
  opacity: 0.45;
}

.cap-profile-hero-photo {
  position: relative;
  z-index: 3;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  width: auto;
  max-width: min(34%, 280px);
  min-width: 168px;
  margin-right: 30px;
  padding: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.86);
  background: #e5e7eb;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  -webkit-align-self: center;
  align-self: center;
  -webkit-transform: rotate(-1deg);
  transform: rotate(-1deg);
  -webkit-animation: cap-profile-photo-enter 560ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: cap-profile-photo-enter 560ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cap-profile-hero-photo > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center top;
  background: transparent;
}

.cap-profile-hero-photo > span {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: 220px;
  height: 260px;
  max-width: 100%;
  color: #fff;
  font-size: 76px;
  font-weight: 900;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.cap-profile-hero-photo > b {
  position: absolute;
  z-index: 8;
  bottom: 18px;
  left: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.cap-profile-hero-photo > b.is-logo {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  padding: 2px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--toolkit-panel-bg, #fff);
}

.cap-profile-hero-photo > b img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cap-profile-hero-copy {
  position: relative;
  z-index: 4;
  min-width: 0;
  padding: 22px 0;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  -webkit-align-self: center;
  align-self: center;
}

.cap-profile-hero-copy > small {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.2px;
}

.cap-profile-hero-copy h2 {
  margin: 12px 0;
  font-size: 44px;
  line-height: 48px;
  font-weight: 900;
  letter-spacing: -1.6px;
}

.cap-profile-hero-copy > p {
  margin: 0;
  color: var(--toolkit-text-muted, #6b7280);
  font-size: 16px;
  line-height: 24px;
}

.cap-profile-hero-stats {
  margin: 12px -5px 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.cap-profile-hero-stats span {
  min-width: 112px;
  margin: 5px;
  padding: 10px 13px;
  border: 2px dashed;
  border-radius: 15px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.cap-profile-hero-stats b {
  margin-right: 5px;
  color: var(--toolkit-text-body, #111827);
  font-size: 17px;
}

.cap-profile-loading {
  margin: 12px 0 0;
  padding: 11px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.cap-profile-section-grid,
.cap-profile-academic-rail {
  display: -ms-grid;
  display: grid;
  margin: 2px -8px 10px;
}

.cap-profile-section-grid {
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cap-profile-section-grid > .cap-profile-section:nth-child(3) {
  -ms-grid-column: 1;
  -ms-grid-column-span: 2;
  grid-column: 1 / -1;
}

.cap-profile-academic-rail {
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cap-profile-section {
  position: relative;
  min-width: 0;
  min-height: 190px;
  margin: 8px;
  padding: 18px;
  overflow: visible;
  border: 2px dashed;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.cap-profile-section-blob {
  position: absolute;
  top: -42px;
  right: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

.cap-profile-section > header {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.cap-profile-section > header > span {
  width: 38px;
  height: 38px;
  margin-right: 11px;
  border: 2px dashed;
  border-radius: 12px;
  font-size: 19px;
  font-style: normal;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-transform: rotate(-3deg);
  transform: rotate(-3deg);
}

.cap-profile-section > header small {
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.cap-profile-section h3 {
  margin: 1px 0 0;
  font-size: 17px;
}

.cap-profile-section-body {
  position: relative;
  z-index: 1;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 16px;
  min-width: 0;
}

.cap-profile-detail {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  width: auto;
  padding: 0;
  vertical-align: top;
  box-sizing: border-box;
}

.cap-profile-detail span,
.cap-profile-detail strong {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.cap-profile-detail span {
  color: var(--toolkit-text-muted, #6b7280);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.25;
}

.cap-profile-detail strong {
  margin-top: 0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--toolkit-text-title, #0f172a);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.cap-profile-section-body > .cap-profile-empty {
  grid-column: 1 / -1;
}

.cap-profile-chips {
  margin: -4px;
}

.cap-profile-chips span {
  display: inline-block;
  max-width: calc(100% - 8px);
  margin: 4px;
  padding: 7px 11px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 999px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
  font-size: 12px;
  font-weight: 700;
}

.cap-profile-stack p {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
}

.cap-profile-stack b,
.cap-profile-stack small { display: block; }
.cap-profile-stack small { margin-top: 3px; color: var(--toolkit-text-muted, #64748b); }
.cap-profile-empty { color: var(--toolkit-text-muted, #64748b); font-size: 13px; }

.cap-profile-access-hint {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.cap-profile-access-stats {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px -4px;
}

.cap-profile-access-stats span {
  margin: 4px;
  padding: 10px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 12px;
  color: var(--toolkit-text-muted, #64748b);
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
  font-size: 11px;
}

.cap-profile-access-stats b {
  display: block;
  color: #4f46e5;
  font-size: 20px;
}

.cap-profile-access-chart {
  display: block;
  width: 100%;
  height: 210px;
  margin: 8px 0;
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
}

.cap-profile-access-chart line {
  stroke: var(--toolkit-panel-border, #cbd5e1);
  stroke-width: 1;
}

.cap-profile-history-toggle {
  width: 100%;
  margin: 7px 0;
  padding: 10px 12px;
  border: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 14px;
  color: #4f46e5;
  background: var(--toolkit-panel-bg, #fff);
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.cap-profile-history-toggle span,
.cap-profile-history-toggle b,
.cap-profile-history-toggle small { display: block; }
.cap-profile-history-toggle b { color: var(--toolkit-text-body, #0f172a); font-size: 14px; }
.cap-profile-history-toggle small { margin-top: 2px; color: var(--toolkit-text-muted, #64748b); font-size: 12px; }
.cap-profile-history-toggle > i { font-size: 20px; font-style: normal; }

.cap-profile-history-list {
  max-height: 310px;
  overflow: auto;
}

.cap-profile-history-list > button {
  width: 100%;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr) auto 20px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 20px;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 6px;
  padding: 9px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 14px;
  color: var(--toolkit-text-body, #334155);
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.75));
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cap-profile-history-list > button:disabled { cursor: default; }
.cap-profile-history-list em {
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.cap-profile-history-list em.on-time { color: #2563eb; }
.cap-profile-history-list em.late { color: #65a30d; }
.cap-profile-history-list em.other { color: #ea580c; }

.cap-profile-access-preview {
  position: fixed;
  z-index: 2147483646;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px;
  background: rgba(15, 23, 42, 0.86);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.cap-profile-access-preview img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  object-fit: contain;
}

.cap-profile-access-preview button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
  cursor: pointer;
}

.cap-profile-thumbs {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.cap-profile-thumbs button {
  width: 150px;
  height: 110px;
  margin-right: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 16px;
  background: #e5e7eb;
  cursor: pointer;
}

.cap-profile-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.cap-profile-ticket-grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: -6px;
}

.cap-profile-ticket-grid article {
  position: relative;
  min-width: 0;
  margin: 6px;
  padding: 14px 14px 14px 18px;
  overflow: hidden;
  border: 2px dashed rgba(202, 138, 4, 0.35);
  border-radius: 16px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.75));
}

.cap-profile-ticket-grid article > i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
}

.cap-profile-ticket-grid small,
.cap-profile-ticket-grid strong,
.cap-profile-ticket-grid span,
.cap-profile-ticket-grid time {
  display: block;
  margin-bottom: 5px;
}

.cap-profile-ticket-grid small,
.cap-profile-ticket-grid span,
.cap-profile-ticket-grid time { color: var(--toolkit-text-muted, #64748b); font-size: 11px; }

.cap-profile-footer {
  min-height: 58px;
  padding: 10px 18px;
  border-top: 1px solid var(--toolkit-panel-border, #e2e8f0);
  background: var(--toolkit-panel-bg, #fff);
  text-align: right;
}

.cap-profile-footer button {
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #4f46e5;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cap-profile-gallery-viewer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1200;
  color: #fff;
  background: rgba(2, 6, 23, 0.97);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.cap-profile-gallery-viewer > header,
.cap-profile-gallery-viewer > footer {
  min-height: 58px;
  padding: 10px 18px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.cap-profile-gallery-viewer > header strong { margin-right: 14px; }
.cap-profile-gallery-viewer > header button { position: absolute; right: 18px; }

.cap-profile-gallery-viewer button,
.cap-profile-gallery-viewer a {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.cap-profile-gallery-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.cap-profile-gallery-stage img {
  max-width: 82vw;
  max-height: 78vh;
  object-fit: contain;
  -webkit-transition: -webkit-transform 160ms ease;
  transition: transform 160ms ease;
}

.cap-profile-gallery-stage button { position: absolute; z-index: 2; font-size: 32px; }
.cap-profile-gallery-stage .previous { left: 18px; }
.cap-profile-gallery-stage .next { right: 18px; }
.cap-profile-gallery-viewer > footer > * { margin: 0 5px; }

@-webkit-keyframes cap-profile-enter {
  from { opacity: 0; -webkit-transform: translateY(34px) scale(0.96); transform: translateY(34px) scale(0.96); }
  to { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes cap-profile-enter {
  from { opacity: 0; -webkit-transform: translateY(34px) scale(0.96); transform: translateY(34px) scale(0.96); }
  to { opacity: 1; -webkit-transform: none; transform: none; }
}

@-webkit-keyframes cap-profile-photo-enter {
  from { opacity: 0; -webkit-transform: translateX(-80px) scale(1.35) rotate(-12deg); transform: translateX(-80px) scale(1.35) rotate(-12deg); }
  to { opacity: 1; -webkit-transform: rotate(-1deg); transform: rotate(-1deg); }
}

@keyframes cap-profile-photo-enter {
  from { opacity: 0; -webkit-transform: translateX(-80px) scale(1.35) rotate(-12deg); transform: translateX(-80px) scale(1.35) rotate(-12deg); }
  to { opacity: 1; -webkit-transform: rotate(-1deg); transform: rotate(-1deg); }
}

@-webkit-keyframes cap-profile-float {
  from { margin-top: -7px; }
  to { margin-top: 7px; }
}

@keyframes cap-profile-float {
  from { margin-top: -7px; }
  to { margin-top: 7px; }
}

@media (max-width: 859px) {
  .cap-profile-overlay { padding: 8px; }
  .cap-profile-modal {
    height: calc(100vh - 16px);
    border-radius: 22px;
    -webkit-animation-duration: 220ms;
    animation-duration: 220ms;
  }
  .cap-profile-scroll { padding: 14px 12px 24px; }
  .cap-profile-hero {
    min-height: 0;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }
  .cap-profile-hero-photo {
    width: auto;
    max-width: 80%;
    min-width: 0;
    height: auto;
    margin: 0 auto 18px;
  }
  .cap-profile-hero-copy { padding: 5px 8px 18px; }
  .cap-profile-hero-copy h2 { font-size: 32px; line-height: 37px; letter-spacing: -0.8px; }
  .cap-profile-section-grid,
  .cap-profile-academic-rail,
  .cap-profile-ticket-grid {
    -ms-grid-columns: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .cap-profile-hero-photo { width: auto; max-width: 100%; height: auto; }
  .cap-profile-section-body {
    -ms-grid-columns: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
  }
  .cap-profile-detail { width: auto; }
  .cap-profile-hero-stats span { min-width: calc(50% - 10px); }
}

@media (prefers-reduced-motion: reduce) {
  .cap-profile-modal,
  .cap-profile-hero-photo,
  .cap-profile-hero > .star,
  .cap-profile-hero-fx .cap-student-editor-fx__item,
  .cap-knotion-popup {
    -webkit-animation: none !important;
    animation: none !important;
  }
}

/* Popup acceso Knotion */
.cap-knotion-backdrop {
  position: absolute;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 18px;
  background: rgba(76, 29, 149, 0.28);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.cap-knotion-popup {
  position: relative;
  width: min(420px, 100%);
  overflow: hidden;
  padding: 18px 18px 20px;
  border: 3px solid #fff;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.35), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.28), transparent 40%),
    linear-gradient(165deg, #fff7ed 0%, #faf5ff 48%, #eff6ff 100%);
  box-shadow: 0 24px 60px rgba(76, 29, 149, 0.28);
  -webkit-animation: cap-knotion-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: cap-knotion-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cap-knotion-popup__glow {
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 70%);
  pointer-events: none;
}

.cap-knotion-popup__stars {
  position: absolute;
  top: 12px;
  right: 54px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 8px;
  color: #f59e0b;
  font-size: 14px;
  pointer-events: none;
}

.cap-knotion-popup__head {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cap-knotion-popup__badge {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  width: 46px;
  height: 46px;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  font-size: 22px;
  box-shadow: 0 10px 22px rgba(139, 92, 246, 0.35);
}

.cap-knotion-popup__head small {
  display: block;
  color: #a855f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cap-knotion-popup__head h3 {
  margin: 2px 0 0;
  color: #4c1d95;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.cap-knotion-popup__head > button {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.8);
  font-size: 22px;
  cursor: pointer;
}

.cap-knotion-popup__cards {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.cap-knotion-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cap-knotion-card.is-user {
  border-color: #93c5fd;
}

.cap-knotion-card.is-pass {
  border-color: #f9a8d4;
}

.cap-knotion-card > span {
  color:var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cap-knotion-card > strong {
  color: #1e293b;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cap-knotion-card > strong.is-masked {
  letter-spacing: 0.18em;
}

.cap-knotion-card button,
.cap-knotion-card__actions button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #5b21b6;
  background: #f3e8ff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.cap-knotion-card.is-user > button {
  width: -webkit-max-content;
  width: max-content;
  color: #1d4ed8;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 22%, var(--toolkit-panel-bg, #fff));
}

.cap-knotion-card__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cap-knotion-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cap-knotion-popup__empty {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

@-webkit-keyframes cap-knotion-in {
  from { opacity: 0; -webkit-transform: translateY(16px) scale(0.94); transform: translateY(16px) scale(0.94); }
  to { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes cap-knotion-in {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.profile-page {
  min-height: 100%;
  padding: 12px 0 28px;
  background: transparent;
  box-sizing: border-box;
}

.profile-page * {
  box-sizing: border-box;
}

.profile-loading {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 280px;
  gap: 14px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 15px;
  font-weight: 600;
}

.profile-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(37, 99, 235, 0.18);
  border-top-color: #2563eb;
  border-radius: 50%;
  -webkit-animation: profile-spin 0.7s linear infinite;
  animation: profile-spin 0.7s linear infinite;
}

@-webkit-keyframes profile-spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes profile-spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.profile-tabs {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-self: center;
  align-self: center;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 0 auto 18px;
  padding: 4px;
  border-radius: 14px;
  background: var(--toolkit-panel-border, #e2e8f0);
  gap: 4px;
}

.profile-superadmin {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.profile-tab {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  gap: 7px;
}

.profile-tab svg {
  width: 17px;
  height: 17px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.profile-tab.is-active {
  background: var(--toolkit-panel-bg, #fff);
}

.profile-tab.is-active.profile {
  color: var(--profile-accent, #2563eb);
}

.profile-tab.is-active.superadmin {
  color: #dc2626;
}

.profile-notify-card {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: var(--toolkit-panel-bg, #fff);
}

.profile-notify-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-notify-header > svg {
  width: 19px;
  height: 19px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.profile-notify-header h2 {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 16px;
  font-weight: 800;
}

.profile-notify-status {
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.profile-notify-status.on { color: #16a34a; }
.profile-notify-status.off { color: #dc2626; }

.profile-notify-card > p {
  margin: 0 0 12px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  line-height: 19px;
}

.profile-ticket-queue-card {
  margin-top: 12px;
}

.profile-ticket-queue-field {
  display: block;
  margin: 0 0 14px;
}

.profile-ticket-queue-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-notify-button {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  gap: 9px;
}

.profile-notify-button.on { background: #dc2626; }
.profile-notify-button.off { background: #16a34a; }
.profile-notify-button:disabled { opacity: 0.65; cursor: default; }
.profile-notify-button svg { width: 18px; height: 18px; }

.profile-login-card {
  width: 100%;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: var(--toolkit-panel-bg, #fff);
}

.profile-login-card > p {
  margin: 0 0 14px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  line-height: 19px;
}

.profile-login-preview {
  position: relative;
  width: 100%;
  min-height: 160px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(14, 165, 233, 0.08));
  color: var(--toolkit-text-muted, #64748b);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.profile-login-preview.has-image {
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.08);
  background: #0f172a;
}

.profile-login-preview img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center bottom;
}

.profile-login-preview > span {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.profile-login-preview > span svg {
  width: 22px;
  height: 22px;
  color: #2563eb;
}

.profile-login-error {
  margin: 0 0 12px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
}

.profile-login-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-login-upload,
.profile-login-remove {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.profile-login-upload {
  border: 0;
  background: #2563eb;
  color: #fff;
}

.profile-login-upload.is-busy,
.profile-login-remove:disabled {
  opacity: 0.65;
  cursor: default;
}

.profile-login-remove {
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
}

.profile-login-upload svg,
.profile-login-remove svg {
  width: 17px;
  height: 17px;
}

.profile-login-card .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.profile-agent-card {
  margin-top: 14px;
}

.profile-agent-fields {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-agent-ua strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--toolkit-text-body, #334155);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.profile-layout {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  gap: 20px;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.profile-layout.is-stacked {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.profile-hero-col {
  width: 36%;
  min-width: 300px;
  max-width: 420px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.profile-layout.is-stacked .profile-hero-col {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.profile-details-col {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: var(--toolkit-panel-bg, #fff);
}

.profile-hero-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: var(--profile-accent, #2563eb);
  opacity: 0.14;
}

.profile-hero-inner {
  padding: 24px 22px;
}

.profile-identity {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.profile-avatar-ring {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  padding: 4px;
  border: 4px solid var(--profile-accent, #2563eb);
  border-radius: 50%;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

button.profile-avatar-ring {
  margin: 0;
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}

button.profile-avatar-ring:hover,
button.profile-avatar-ring:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
  outline: none;
}

button.profile-avatar-ring:focus-visible {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--profile-accent, #2563eb),
    0 12px 22px rgba(15, 23, 42, 0.18);
}

.profile-avatar-ring img,
.profile-avatar-fallback {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-fallback {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.18);
  color: var(--profile-accent, #2563eb);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}

.profile-hero-text {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.profile-hero-text h1 {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.35px;
  line-height: 32px;
}

.profile-hero-text p {
  margin: 8px 0 0;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 14px;
  line-height: 20px;
}

.profile-badge {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--profile-accent, #2563eb);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  gap: 8px;
}

.profile-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--profile-accent, #2563eb);
}

.profile-logout {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.9);
  color: #ef4444;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  gap: 10px;
}

.profile-logout svg {
  width: 20px;
  height: 20px;
}

.profile-logout:active {
  opacity: 0.85;
}

.profile-error {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 14px;
  background: rgba(248, 113, 113, 0.08);
  text-align: center;
}

.profile-error p {
  margin: 0 0 10px;
  color: #b91c1c;
  font-size: 14px;
}

.profile-error button {
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-sections {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 16px;
}

.profile-sections.is-two-col {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-align-items: stretch;
  align-items: stretch;
}

/* Los hijos directos son los envoltorios .profile-enter; ellos definen la retícula. */
.profile-sections.is-two-col > div {
  width: 48.5%;
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
  flex-grow: 1;
}

.profile-sections.is-two-col .profile-section {
  width: 100%;
  height: 100%;
}

.profile-section {
  padding: 16px 18px 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: var(--toolkit-panel-bg, #fff);
}

.profile-section-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
  color: var(--toolkit-text-body, #0f172a);
}

.profile-section-header svg {
  width: 18px;
  height: 18px;
  color: #2563eb;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.profile-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.profile-field-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.profile-field-row.is-horizontal {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 16px;
}

.profile-field-row small {
  display: block;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.profile-field-row.is-horizontal small {
  -webkit-box-flex: 0.42;
  -webkit-flex: 0.42;
  flex: 0.42;
  padding-top: 2px;
}

.profile-field-row strong {
  display: block;
  margin-top: 4px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  -webkit-user-select: text;
  user-select: text;
}

.profile-field-row.is-horizontal strong {
  -webkit-box-flex: 0.58;
  -webkit-flex: 0.58;
  flex: 0.58;
  margin-top: 0;
  text-align: right;
}

.profile-enter {
  -webkit-animation: profile-enter 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: profile-enter 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-enter.delay-1 { -webkit-animation-delay: 0.09s; animation-delay: 0.09s; }
.profile-enter.delay-2 { -webkit-animation-delay: 0.14s; animation-delay: 0.14s; }
.profile-enter.delay-3 { -webkit-animation-delay: 0.21s; animation-delay: 0.21s; }
.profile-enter.delay-4 { -webkit-animation-delay: 0.28s; animation-delay: 0.28s; }
.profile-enter.delay-5 { -webkit-animation-delay: 0.35s; animation-delay: 0.35s; }

@-webkit-keyframes profile-enter {
  from {
    opacity: 0;
    -webkit-transform: translateY(16px);
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes profile-enter {
  from {
    opacity: 0;
    -webkit-transform: translateY(16px);
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@media (max-width: 1099px) {
  .profile-sections.is-two-col > div {
    width: 100%;
  }
}

@media (max-width: 819px) {
  .profile-layout {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .profile-hero-col {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .profile-avatar-ring {
    width: 88px;
    height: 88px;
  }

  .profile-hero-text h1 {
    font-size: 22px;
    line-height: 28px;
  }

  .profile-identity {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    text-align: left;
  }
}

@media (min-width: 1100px) {
  .profile-avatar-ring {
    width: 120px;
    height: 120px;
  }

  .profile-avatar-fallback {
    font-size: 34px;
  }
}

/* ===== Theme Studio (Superadmin) ===== */
.theme-studio {
  margin-top: 18px;
  color: var(--toolkit-text);
}

.theme-studio__hero {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.theme-studio__mode {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--toolkit-panel-border, #e2e8f0);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, #fff);
  gap: 4px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.theme-studio__mode button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.theme-studio__mode button svg {
  width: 16px;
  height: 16px;
}

.theme-studio__mode button.is-active {
  background: var(--toolkit-blue, #2563eb);
  color: #fff;
}

.theme-studio__kicker {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--toolkit-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-studio__hero h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.theme-studio__hero > div > p:last-child {
  max-width: 54ch;
  margin: 6px 0 0;
  color: var(--toolkit-muted);
  font-size: 13px;
  line-height: 1.45;
}

.theme-studio__presets {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-studio__presets button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: 999px;
  background: var(--toolkit-panel-bg);
  color: var(--toolkit-text);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.theme-studio__presets button:hover {
  border-color: var(--toolkit-blue);
  color: var(--toolkit-blue);
}

.theme-studio__loading {
  margin: 0 0 12px;
  color: var(--toolkit-muted);
  font-size: 13px;
}

.theme-studio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 14px;
  -webkit-box-align: start;
  -webkit-align-items: start;
  align-items: start;
}

.theme-studio__nav {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
  -webkit-overflow-scrolling: touch;
}

.theme-studio__nav button {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--toolkit-muted);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.theme-studio__nav button.is-active {
  background: var(--toolkit-blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.theme-studio__panel {
  margin-bottom: 0;
}

.theme-studio__panel-head {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.theme-studio__panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.theme-studio__panel-head p {
  margin: 4px 0 0;
  color: var(--toolkit-muted);
  font-size: 12px;
}

.theme-studio__dirty {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, #10b981 14%, var(--toolkit-panel-bg, #fff));
  color: var(--toolkit-success, #16a34a);
  font-size: 11px;
  font-weight: 800;
}

.theme-studio__dirty.is-on {
  background: color-mix(in srgb, #ea580c 12%, var(--toolkit-panel-bg, #fff));
  color: #c2410c;
}

.theme-studio__fields {
  display: grid;
  gap: 10px;
}

.theme-brand-bg {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 14px;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--toolkit-panel-bg, #fff), var(--toolkit-surface));
}

.theme-brand-bg__preview {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(var(--toolkit-brand-wash, rgba(255, 255, 255, 0.78)), var(--toolkit-brand-wash, rgba(255, 255, 255, 0.78))),
    var(--toolkit-panel-border, #e2e8f0);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: var(--toolkit-muted);
  font-size: 12px;
}

.theme-brand-bg__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-brand-bg__meta {
  min-width: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 8px;
}

.theme-brand-bg__meta strong {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  color: var(--toolkit-text);
  font-size: 14px;
  font-weight: 800;
}

.theme-brand-bg__meta p {
  margin: 0;
  color: var(--toolkit-muted);
  font-size: 12px;
  line-height: 1.4;
}

.theme-brand-bg__error {
  color: var(--toolkit-danger, #dc2626) !important;
}

.theme-brand-bg__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.theme-brand-bg__upload,
.theme-brand-bg__remove {
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.theme-brand-bg__upload {
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  color: var(--toolkit-blue, #2563eb);
}

.theme-brand-bg__upload.is-busy,
.theme-brand-bg__remove:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.theme-brand-bg__remove {
  border: 1px solid rgba(220, 38, 38, 0.22);
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-danger, #dc2626);
}

.theme-brand-bg .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .theme-brand-bg {
    grid-template-columns: 1fr;
  }

  .theme-brand-bg__preview {
    min-height: 140px;
  }
}

.theme-field {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.2fr);
  gap: 12px;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--toolkit-panel-bg, #fff), var(--toolkit-surface));
}

.theme-field__meta span {
  display: block;
  color: var(--toolkit-text);
  font-size: 13px;
  font-weight: 750;
}

.theme-field__meta small {
  display: block;
  margin-top: 3px;
  color: var(--toolkit-muted);
  font-size: 11px;
  line-height: 1.35;
}

.theme-field__control {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.theme-field__control--color .theme-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.theme-field__control--color input[type='color'] {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  cursor: pointer;
}

.theme-hex,
.theme-number {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text);
  font-size: 12px;
  font-weight: 650;
}

.theme-hex {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.theme-field__control--range input[type='range'] {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  accent-color: var(--toolkit-blue);
}

.theme-number {
  width: 72px;
  -webkit-flex: 0 0 72px;
  flex: 0 0 72px;
}

.theme-field__control--range b {
  min-width: 58px;
  color: var(--toolkit-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.theme-preview {
  position: sticky;
  top: 12px;
  overflow: hidden;
}

.theme-preview__bar {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin: calc(var(--toolkit-panel-pad) * -1) calc(var(--toolkit-panel-pad) * -1) 14px;
  padding: 12px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.theme-preview__bar i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.theme-preview__swatches {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}

.theme-preview__swatches > span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
}

.theme-preview__tabs {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid;
  border-radius: 12px;
}

.theme-preview__tabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: default;
}

.theme-preview__body h3 {
  margin: 0 0 6px;
}

.theme-preview__body > p {
  margin: 0 0 14px;
  line-height: 1.45;
}

.theme-preview__card {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.theme-preview__card strong {
  font-size: 14px;
}

.theme-preview__card small {
  font-size: 12px;
}

.theme-preview__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.theme-preview__actions button {
  border: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  padding: 0 14px;
  cursor: default;
}

.theme-preview__actions button.ghost {
  border: 1px solid;
  background: transparent;
}

.theme-preview__input {
  width: 100%;
  padding: 0 12px;
  border: 1px solid;
  font-size: 13px;
}

.theme-studio__bar {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: 16px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.92));
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.theme-studio__bar-msg p {
  margin: 0;
  color: var(--toolkit-muted);
  font-size: 12px;
}

.theme-studio__notice {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.theme-studio__notice.is-ok { color: var(--toolkit-success, #16a34a); }
.theme-studio__notice.is-error { color: var(--toolkit-danger, #dc2626); }
.theme-studio__notice.is-info { color: var(--toolkit-blue); }

.theme-studio__bar-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-studio__bar-actions button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--toolkit-btn-radius, 12px);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.theme-studio__bar-actions button.ghost {
  border: 1px solid var(--toolkit-panel-border);
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text);
}

.theme-studio__bar-actions button.primary {
  border: 0;
  background: var(--toolkit-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.theme-studio__bar-actions button:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 980px) {
  .theme-studio__layout {
    grid-template-columns: 1fr;
  }

  .theme-preview {
    position: relative;
    top: 0;
  }

  .theme-studio__hero {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .theme-field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .theme-studio__bar {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    align-items: stretch;
  }

  .theme-studio__bar-actions {
    width: 100%;
  }

  .theme-studio__bar-actions button {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
  }
}

/* Perfil estilo CAP «PERFIL DEL ALUMNO» */
.profile-cap-shell.cap-profile-modal {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.profile-cap-topbar.cap-profile-topbar {
  padding-left: 16px;
  padding-right: 16px;
}

.profile-cap-topbar-spacer {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

.profile-cap-scroll.cap-profile-scroll {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  overflow: visible;
  max-height: none;
  padding-right: 16px;
  padding-left: 16px;
}

.profile-cap-logout {
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  width: auto !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 7px;
  color: #b91c1c !important;
  background: color-mix(in srgb, var(--toolkit-danger, #dc2626) 10%, var(--toolkit-panel-bg, #fff)) !important;
  font-size: 13px !important;
  font-weight: 800;
}

.profile-cap-logout svg {
  width: 17px;
  height: 17px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.profile-cap-shell .cap-profile-hero {
  overflow: visible;
}

.profile-cap-shell .cap-profile-hero-photo {
  position: relative;
  z-index: 5;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  overflow: hidden;
}

.profile-cap-shell .cap-profile-hero-photo:disabled {
  cursor: default;
}

/* Evitar que el CSS de CAP estire el logo del badge a todo el avatar */
.profile-cap-shell .cap-profile-hero-photo img {
  width: auto;
  height: auto;
}

.profile-cap-shell .cap-profile-hero-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.profile-cap-shell .cap-profile-hero-photo > b {
  position: absolute;
  z-index: 8;
  bottom: 14px;
  left: 14px;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  overflow: hidden;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.profile-cap-shell .cap-profile-hero-photo > b.is-logo {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  padding: 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--toolkit-panel-bg, #fff) !important;
}

.profile-cap-shell .cap-profile-hero-photo > b.is-logo img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}

.profile-location-hero-img {
  position: relative;
  z-index: 5;
  width: 120px;
  height: 120px;
  margin-left: auto;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  background: var(--toolkit-panel-bg, #fff);
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  -webkit-align-self: center;
  align-self: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* Partículas del hero (mismo lenguaje visual que CAP) */
.profile-cap-shell .cap-student-editor-fx {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.profile-cap-shell .cap-student-editor-fx__item {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform, opacity;
}

.profile-cap-shell .cap-student-editor-fx__item.is-star {
  width: 1em;
  height: 1em;
  color: #fbbf24;
  font-size: 15px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.75);
}

.profile-cap-shell .cap-student-editor-fx__item.is-star:before {
  content: "★";
}

.profile-cap-shell .cap-student-editor-fx__item.is-spark {
  width: 10px;
  height: 10px;
  color: #fff;
}

.profile-cap-shell .cap-student-editor-fx__item.is-spark:before,
.profile-cap-shell .cap-student-editor-fx__item.is-spark:after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 2px;
  content: "";
  box-shadow: 0 0 6px currentColor;
}

.profile-cap-shell .cap-student-editor-fx__item.is-spark:before {
  width: 10px;
  height: 2px;
  margin: -1px 0 0 -5px;
}

.profile-cap-shell .cap-student-editor-fx__item.is-spark:after {
  width: 2px;
  height: 10px;
  margin: -5px 0 0 -1px;
}

.profile-cap-shell .cap-student-editor-fx__item.is-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.profile-cap-shell .cap-student-editor-fx__item.is-ring {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.55);
}

.profile-cap-shell .cap-student-editor-fx__item.is-glow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0, rgba(251, 191, 36, 0.35) 35%, transparent 70%);
  filter: blur(1px);
}

.profile-cap-shell .cap-student-editor-fx__item.is-beam {
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  -webkit-transform-origin: 50% 100%;
  transform-origin: 50% 100%;
}

.profile-cap-shell .cap-student-editor-fx__item:nth-child(1) { -webkit-animation: cap-fx-twinkle 2.4s ease-in-out infinite; animation: cap-fx-twinkle 2.4s ease-in-out infinite; font-size: 18px; color: #fbbf24; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(2) { -webkit-animation: cap-fx-float 3.2s ease-in-out 0.2s infinite; animation: cap-fx-float 3.2s ease-in-out 0.2s infinite; font-size: 13px; color: #f472b6; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(3) { -webkit-animation: cap-fx-twinkle 2.8s ease-in-out 0.4s infinite; animation: cap-fx-twinkle 2.8s ease-in-out 0.4s infinite; font-size: 16px; color: #a78bfa; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(4) { -webkit-animation: cap-fx-float 3.6s ease-in-out 0.1s infinite reverse; animation: cap-fx-float 3.6s ease-in-out 0.1s infinite reverse; font-size: 12px; color: #38bdf8; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(5) { -webkit-animation: cap-fx-spark 1.8s ease-in-out infinite; animation: cap-fx-spark 1.8s ease-in-out infinite; color: #fff; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(6) { -webkit-animation: cap-fx-spark 2.1s ease-in-out 0.3s infinite; animation: cap-fx-spark 2.1s ease-in-out 0.3s infinite; color: #fde68a; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(7) { -webkit-animation: cap-fx-spark 1.6s ease-in-out 0.5s infinite; animation: cap-fx-spark 1.6s ease-in-out 0.5s infinite; color: #fda4af; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(8) { -webkit-animation: cap-fx-spark 2.3s ease-in-out 0.15s infinite; animation: cap-fx-spark 2.3s ease-in-out 0.15s infinite; color: #c4b5fd; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(9) { -webkit-animation: cap-fx-spark 1.9s ease-in-out 0.7s infinite; animation: cap-fx-spark 1.9s ease-in-out 0.7s infinite; color: #fff; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(10) { -webkit-animation: cap-fx-float 4s ease-in-out infinite; animation: cap-fx-float 4s ease-in-out infinite; background: #fbbf24; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(11) { -webkit-animation: cap-fx-float 3.4s ease-in-out 0.25s infinite; animation: cap-fx-float 3.4s ease-in-out 0.25s infinite; background: #ec4899; width: 5px; height: 5px; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(12) { -webkit-animation: cap-fx-twinkle 2.2s ease-in-out 0.35s infinite; animation: cap-fx-twinkle 2.2s ease-in-out 0.35s infinite; background: #22c55e; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(13) { -webkit-animation: cap-fx-float 3.9s ease-in-out 0.45s infinite reverse; animation: cap-fx-float 3.9s ease-in-out 0.45s infinite reverse; background: #38bdf8; width: 6px; height: 6px; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(14) { -webkit-animation: cap-fx-twinkle 1.7s ease-in-out 0.2s infinite; animation: cap-fx-twinkle 1.7s ease-in-out 0.2s infinite; background: #e879f9; width: 4px; height: 4px; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(15) { -webkit-animation: cap-fx-orbit 5.5s linear infinite; animation: cap-fx-orbit 5.5s linear infinite; border-color: #fbbf24; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(16) { -webkit-animation: cap-fx-orbit 7s linear infinite reverse; animation: cap-fx-orbit 7s linear infinite reverse; width: 14px; height: 14px; border-color: #f472b6; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(17) { -webkit-animation: cap-fx-glow 3.2s ease-in-out infinite; animation: cap-fx-glow 3.2s ease-in-out infinite; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(18) { -webkit-animation: cap-fx-glow 4s ease-in-out 0.5s infinite; animation: cap-fx-glow 4s ease-in-out 0.5s infinite; width: 36px; height: 36px; background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0, rgba(167, 139, 250, 0.4) 40%, transparent 72%); }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(19) { -webkit-animation: cap-fx-glow 3.6s ease-in-out 0.8s infinite; animation: cap-fx-glow 3.6s ease-in-out 0.8s infinite; width: 28px; height: 28px; background: radial-gradient(circle, rgba(255, 255, 255, 0.75) 0, rgba(56, 189, 248, 0.35) 38%, transparent 70%); }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(20) { -webkit-animation: cap-fx-beam 2.6s ease-in-out infinite; animation: cap-fx-beam 2.6s ease-in-out infinite; }
.profile-cap-shell .cap-student-editor-fx__item:nth-child(21) { -webkit-animation: cap-fx-beam 3.1s ease-in-out 0.4s infinite reverse; animation: cap-fx-beam 3.1s ease-in-out 0.4s infinite reverse; height: 22px; background: linear-gradient(180deg, rgba(253, 230, 138, 0.95), rgba(253, 230, 138, 0)); }

@-webkit-keyframes cap-fx-float {
  0%, 100% { -webkit-transform: translateY(0) translateX(0); transform: translateY(0) translateX(0); opacity: 0.85; }
  50% { -webkit-transform: translateY(-12px) translateX(4px); transform: translateY(-12px) translateX(4px); opacity: 1; }
}
@keyframes cap-fx-float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.85; }
  50% { transform: translateY(-12px) translateX(4px); opacity: 1; }
}
@-webkit-keyframes cap-fx-twinkle {
  0%, 100% { -webkit-transform: scale(0.7) rotate(0); transform: scale(0.7) rotate(0); opacity: 0.35; }
  40% { -webkit-transform: scale(1.15) rotate(18deg); transform: scale(1.15) rotate(18deg); opacity: 1; }
  70% { -webkit-transform: scale(0.9) rotate(-8deg); transform: scale(0.9) rotate(-8deg); opacity: 0.7; }
}
@keyframes cap-fx-twinkle {
  0%, 100% { transform: scale(0.7) rotate(0); opacity: 0.35; }
  40% { transform: scale(1.15) rotate(18deg); opacity: 1; }
  70% { transform: scale(0.9) rotate(-8deg); opacity: 0.7; }
}
@-webkit-keyframes cap-fx-spark {
  0%, 100% { -webkit-transform: scale(0.4) rotate(0); transform: scale(0.4) rotate(0); opacity: 0.2; }
  45% { -webkit-transform: scale(1.2) rotate(45deg); transform: scale(1.2) rotate(45deg); opacity: 1; }
  70% { -webkit-transform: scale(0.8) rotate(70deg); transform: scale(0.8) rotate(70deg); opacity: 0.55; }
}
@keyframes cap-fx-spark {
  0%, 100% { transform: scale(0.4) rotate(0); opacity: 0.2; }
  45% { transform: scale(1.2) rotate(45deg); opacity: 1; }
  70% { transform: scale(0.8) rotate(70deg); opacity: 0.55; }
}
@-webkit-keyframes cap-fx-orbit {
  0% { -webkit-transform: rotate(0) translateX(10px) rotate(0); transform: rotate(0) translateX(10px) rotate(0); opacity: 0.55; }
  50% { opacity: 1; }
  100% { -webkit-transform: rotate(360deg) translateX(10px) rotate(-360deg); transform: rotate(360deg) translateX(10px) rotate(-360deg); opacity: 0.55; }
}
@keyframes cap-fx-orbit {
  0% { transform: rotate(0) translateX(10px) rotate(0); opacity: 0.55; }
  50% { opacity: 1; }
  100% { transform: rotate(360deg) translateX(10px) rotate(-360deg); opacity: 0.55; }
}
@-webkit-keyframes cap-fx-glow {
  0%, 100% { -webkit-transform: scale(0.75); transform: scale(0.75); opacity: 0.35; }
  50% { -webkit-transform: scale(1.2); transform: scale(1.2); opacity: 0.9; }
}
@keyframes cap-fx-glow {
  0%, 100% { transform: scale(0.75); opacity: 0.35; }
  50% { transform: scale(1.2); opacity: 0.9; }
}
@-webkit-keyframes cap-fx-beam {
  0%, 100% { -webkit-transform: rotate(-12deg) scaleY(0.7); transform: rotate(-12deg) scaleY(0.7); opacity: 0.25; }
  50% { -webkit-transform: rotate(8deg) scaleY(1.15); transform: rotate(8deg) scaleY(1.15); opacity: 0.95; }
}
@keyframes cap-fx-beam {
  0%, 100% { transform: rotate(-12deg) scaleY(0.7); opacity: 0.25; }
  50% { transform: rotate(8deg) scaleY(1.15); opacity: 0.95; }
}

@media (max-width: 859px) {
  .profile-cap-shell.cap-profile-modal {
    height: auto;
    max-height: none;
    border-radius: 0;
  }

  .profile-cap-shell .cap-profile-hero-photo {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .profile-location-hero-img {
    width: 88px;
    height: 88px;
    margin: 8px auto 0;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-cap-shell .cap-student-editor-fx__item {
    -webkit-animation: none !important;
    animation: none !important;
  }
}

/* ===== Toolkit News · Superadmin composer (publica en el Muro) ===== */
.profile-toolkit-news-card {
  border-color: rgba(29, 78, 216, 0.22);
  box-shadow: 0 10px 28px rgba(29, 78, 216, 0.08);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0)) ,
    var(--toolkit-panel-bg, #fff);
}

.profile-toolkit-news-card .profile-notify-header {
  margin-bottom: 8px;
}

.toolkit-news-avatar {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #0b3d91, #1d4ed8 55%, #2563eb);
  box-shadow:
    0 6px 14px rgba(29, 78, 216, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-toolkit-news-sub {
  margin: 0 0 14px;
  color: var(--toolkit-text-muted, #475569);
  font-size: 13.5px;
  line-height: 1.55;
}

.toolkit-news-composer {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 12px;
}

.toolkit-news-input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--toolkit-text-body, #0f172a);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.toolkit-news-input::-webkit-input-placeholder { color: #94a3b8; }
.toolkit-news-input:-ms-input-placeholder { color: #94a3b8; }
.toolkit-news-input::-ms-input-placeholder { color: #94a3b8; }
.toolkit-news-input::placeholder { color: #94a3b8; }

.toolkit-news-input:focus {
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.05),
    0 0 0 4px rgba(29, 78, 216, 0.12);
}

.toolkit-news-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolkit-news-actions > div {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
}

.toolkit-news-charcount {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.toolkit-news-charcount.warn {
  color: #b45309;
}

.toolkit-news-banner {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
}

.toolkit-news-banner.success {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.toolkit-news-banner.error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.profile-notify-button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.profile-notify-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.profile-notify-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-notify-button.on {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.3);
}

.profile-notify-button.off {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.profile-notify-button svg {
  width: 16px;
  height: 16px;
}

/* Fin estilos perfil */

.home-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card-bg, #ffffff);
  color: var(--card-fg, #0f172a);
  border-radius: 18px;
  padding: 20px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--card-border, rgba(15, 23, 42, 0.08));
  min-height: 420px;
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.home-feed__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
  scrollbar-gutter: stable;
}

.home-feed__list::-webkit-scrollbar {
  width: 8px;
}

.home-feed__list::-webkit-scrollbar-track {
  background: transparent;
}

.home-feed__list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  border: 2px solid transparent;
}

.home-feed__list::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

.home-feed__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.home-feed__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
}

.home-feed__header p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--card-muted, rgba(15, 23, 42, 0.62));
}

.home-feed__compose-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--module-btn-border, rgba(59, 130, 246, 0.35));
  background: var(--module-btn-bg, rgba(59, 130, 246, 0.12));
  color: var(--module-btn-fg, #1d4ed8);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.home-feed__compose-btn:hover {
  transform: translateY(-1px);
  background: rgba(59, 130, 246, 0.18);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.home-feed__composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card-subtle-bg, rgba(15, 23, 42, 0.03));
  border: 1px dashed var(--card-border, rgba(15, 23, 42, 0.12));
}

.home-feed__composer-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.home-feed__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
  font-size: 0.9rem;
  user-select: none;
}

.home-feed__avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.28);
}

.home-feed__input {
  flex: 1;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--card-border, rgba(15, 23, 42, 0.12));
  background: var(--card-bg, #ffffff);
  color: inherit;
  padding: 12px 14px;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  line-height: 1.45;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.home-feed__input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.home-feed__composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-feed__charcount {
  color: var(--card-muted, rgba(15, 23, 42, 0.55));
  font-size: 0.75rem;
}

.home-feed__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 100ms ease, background 120ms ease, opacity 120ms ease;
}

.home-feed__btn--primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.home-feed__btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.42);
}

.home-feed__btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-feed__btn--ghost {
  background: transparent;
  color: var(--card-muted, rgba(15, 23, 42, 0.72));
  border-color: var(--card-border, rgba(15, 23, 42, 0.12));
}

.home-feed__btn--ghost:hover {
  background: rgba(15, 23, 42, 0.04);
}

.home-feed__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-feed__empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--card-muted, rgba(15, 23, 42, 0.6));
  border-radius: 14px;
  background: var(--card-subtle-bg, rgba(15, 23, 42, 0.02));
  border: 1px dashed var(--card-border, rgba(15, 23, 42, 0.1));
}

.home-feed__post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--card-border, rgba(15, 23, 42, 0.08));
}

.home-feed__post.last {
  margin-bottom: 0;
}

.home-feed__post-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-feed__post-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.home-feed__post-meta strong {
  font-size: 0.92rem;
  color: inherit;
}

.home-feed__post-meta small {
  color: var(--card-muted, rgba(15, 23, 42, 0.55));
  font-size: 0.78rem;
}

.home-feed__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--card-muted, rgba(15, 23, 42, 0.65));
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.home-feed__icon-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
}

.home-feed__icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.home-feed__post-body {
  padding-left: 46px;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
}

.home-feed__post-body p {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-feed__post-body p:last-child {
  margin-bottom: 0;
}

.home-feed__post-footer {
  padding-left: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-feed__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border, rgba(15, 23, 42, 0.08));
  background: transparent;
  color: var(--card-muted, rgba(15, 23, 42, 0.7));
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 100ms ease;
}

.home-feed__action:hover {
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
  transform: translateY(-1px);
}

.home-feed__action.liked {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.home-feed__action.liked:hover {
  background: rgba(239, 68, 68, 0.14);
}

@media (max-width: 640px) {
  .home-feed {
    padding: 16px;
    border-radius: 16px;
  }

  .home-feed__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-feed__composer-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .home-feed__charcount {
    align-self: flex-end;
  }

  .home-feed__post-body,
  .home-feed__post-footer {
    padding-left: 0;
  }
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

* {
  box-sizing: border-box;
}

body,
button,
input {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: var(--toolkit-surface, #f1f5f9);
  color: var(--toolkit-text-body, #0f172a);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-size: 16px;
}

button {
  min-height: 48px;
  cursor: pointer;
  -webkit-appearance: none;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

button svg {
  vertical-align: middle;
}

.login-page {
  position: relative;
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  overflow: hidden;
  background-color: #16213e;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.login-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-gradient {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 1;
  opacity: 0.5;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  background-image: -webkit-linear-gradient(
    left,
    #4050b8,
    #4248f5,
    #2c4d9e,
    #24243e,
    #16213e,
    #2c4d9e,
    #4248f5,
    #4050b8
  );
  background-image: linear-gradient(
    90deg,
    #4050b8,
    #4248f5,
    #2c4d9e,
    #24243e,
    #16213e,
    #2c4d9e,
    #4248f5,
    #4050b8
  );
  background-size: 400% 400%;
  -webkit-animation: loginGradientShift 8s ease infinite;
  animation: loginGradientShift 8s ease infinite;
}

@-webkit-keyframes loginGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes loginGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.4);
}

.login-center {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 784px;
  padding: 32px;
  padding-top: max(32px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.login-hello {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 24px;
}

.login-hello-compact {
  max-width: 320px;
  margin-bottom: 16px;
}

.login-hello-svg {
  display: block;
  width: 100%;
  height: auto;
}

.login-hello-path {
  fill: none;
  stroke: #fff;
  stroke-width: 48;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 10;
  stroke-dasharray: 5800;
  stroke-dashoffset: 5800;
  -webkit-animation: loginHelloDraw 10s linear infinite;
  animation: loginHelloDraw 10s linear infinite;
}

@-webkit-keyframes loginHelloDraw {
  0% {
    stroke-dashoffset: 5800;
  }
  7% {
    stroke-dashoffset: 5800;
  }
  34% {
    stroke-dashoffset: 0;
  }
  70% {
    stroke-dashoffset: 0;
  }
  90% {
    stroke-dashoffset: 5800;
  }
  100% {
    stroke-dashoffset: 5800;
  }
}

@keyframes loginHelloDraw {
  0% {
    stroke-dashoffset: 5800;
  }
  7% {
    stroke-dashoffset: 5800;
  }
  34% {
    stroke-dashoffset: 0;
  }
  70% {
    stroke-dashoffset: 0;
  }
  90% {
    stroke-dashoffset: 5800;
  }
  100% {
    stroke-dashoffset: 5800;
  }
}

.login-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 720px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  box-shadow:
    0 6px 6px rgba(0, 0, 0, 0.2),
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(0, 0, 0, 0.12);
  color: #fff;
}

.login-card-compact {
  max-width: 400px;
}

.login-glass-svg,
.liquid-glass-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-card-effect {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  -webkit-filter: url(#liquid-glass-distortion);
  filter: url(#liquid-glass-distortion);
  pointer-events: none;
}

.login-card-tint {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.login-card-shine {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  overflow: hidden;
  box-shadow:
    inset 2px 2px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 1px 1px rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.login-card-body {
  position: relative;
  z-index: 3;
}

.login-card-desktop {
  position: relative;
  min-height: 220px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  align-items: stretch;
}

.login-panel {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  padding: 32px 28px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.login-panel-left {
  padding-right: 20px;
}

.login-panel-right {
  padding-left: 20px;
}

.login-divider-vertical {
  width: 1px;
  margin: 24px 0;
  background: rgba(255, 255, 255, 0.28);
  -webkit-align-self: stretch;
  align-self: stretch;
}

.login-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.login-logo--institutional {
  -webkit-filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(15, 23, 42, 0.24));
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(15, 23, 42, 0.24));
}

.login-card-mobile {
  position: relative;
  padding: 28px 24px;
  text-align: center;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.brand-row {
  margin-bottom: 10px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.brand-logot-tap {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.brand-symbol {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-logos-gap {
  width: 2px;
}

.brand-name {
  width: 130px;
  height: 45px;
  object-fit: contain;
}

.login-card-compact .brand-symbol {
  width: 44px;
  height: 44px;
}

.login-card-compact .brand-name {
  width: 110px;
  height: 38px;
}

.login-subtitle {
  margin: 0 auto 24px;
  max-width: 300px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.google-button-wrap {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.google-button {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #dadce0;
  border-radius: 12px;
  background: var(--toolkit-panel-bg, #fff);
  color: #3c4043;
  font-size: 16px;
  font-weight: 600;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.google-button:active {
  background: #f8f9fa;
}

.google-mark {
  margin-right: 12px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.google-mark svg {
  display: block;
}

.login-error,
.login-status {
  position: relative;
  z-index: 3;
  margin: 14px 0 0;
  max-width: 400px;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.login-error {
  color: #fecaca;
  max-width: 520px;
  white-space: pre-wrap;
  text-align: left;
}

.login-status {
  color: #bfdbfe;
}

.login-version {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.manual-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.manual-modal {
  width: 100%;
  max-width: 400px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
}

.manual-modal-title {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}

.manual-modal-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.65);
}

.manual-modal-form {
  text-align: left;
}

.manual-modal-form label {
  display: block;
  margin: 6px 0 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.manual-modal-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 15px;
}

.manual-modal-form input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.2);
}

.manual-modal-form input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.manual-modal-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #fca5a5;
}

.manual-modal-actions {
  margin-top: 16px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.manual-btn-secondary {
  margin-right: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--toolkit-panel-border, #e2e8f0);
  font-size: 14px;
  font-weight: 600;
}

.manual-btn-primary {
  min-width: 100px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.loading-page {
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  background: #16213e;
  color: #fff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  -webkit-animation: spin 0.8s linear infinite;
  animation: spin 0.8s linear infinite;
}

@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.home-page {
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  padding-bottom: 32px;
  background: var(--toolkit-surface, #f8fafc);
}

.home-screen-enter {
  -webkit-animation: screenFade 360ms ease-out both;
  animation: screenFade 360ms ease-out both;
}

.animated-card {
  opacity: 0;
  -webkit-animation: cardEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: cardEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-from-right {
  -webkit-animation-name: cardEnterRight;
  animation-name: cardEnterRight;
  -webkit-animation-delay: 90ms;
  animation-delay: 90ms;
}

.home-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 8px 10px;
  background: -webkit-linear-gradient(left, #002569, #1d4ed8, #1e3a8a);
  background: linear-gradient(to right, #002569, #1d4ed8, #1e3a8a);
  color: #fff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.header-icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 25px;
}

.header-icon-button svg {
  width: 27px;
  height: 27px;
}

.header-school-logo {
  width: 68px;
  height: 48px;
  margin-left: 5px;
  object-fit: contain;
}

.module-header-title {
  display: none;
}

.header-actions {
  margin-left: auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

@media (max-width: 768px) {
  .module-shell .header-school-logo {
    display: none;
  }

  .toolkit-shell.mobile .module-shell.is-home .header-school-logo {
    display: block;
    width: 68px;
    height: 44px;
    margin-left: 5px;
    object-fit: contain;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .toolkit-shell.mobile .module-shell.is-home .module-header-title {
    display: none;
  }

  .module-shell .module-header-title {
    min-width: 0;
    margin-left: 5px;
    margin-right: 5px;
    color: #fff;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    -webkit-animation: moduleHeaderEnter 420ms ease-out both;
    animation: moduleHeaderEnter 420ms ease-out both;
  }

  .module-header-title > span {
    width: 26px;
    min-width: 26px;
    height: 26px;
    margin-right: 4px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .module-header-title svg {
    width: 24px;
    height: 24px;
    display: block;
  }

  .module-header-title h1 {
    margin: 0;
    min-width: 0;
    max-height: 34px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
    overflow: hidden;
  }

  .module-shell .header-actions {
    margin-left: 0;
  }
}

/* ===== Shell desktop fiel al Toolkit padre ===== */
@media (min-width: 769px) {
  html,
  body,
  #root {
    height: 100%;
    overflow: hidden;
  }

  body {
    background: var(--toolkit-shell-bg, #ececec);
  }

  button {
    min-height: 0;
  }

  .toolkit-shell.desktop {
    width: 100%;
    height: 100vh;
    min-height: 0;
    padding: 0;
    background: var(--toolkit-shell-bg, #ececec);
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    align-items: stretch;
  }

  .toolkit-shell.desktop .module-shell {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: calc(100vh - 20px);
    margin: 10px 10px 10px 0;
    padding: 0;
    border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.06));
    border-radius: 10px;
    background-color: var(--toolkit-panel-bg, #fff);
    overflow: hidden;
    box-shadow: var(--toolkit-chrome-shadow);
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .toolkit-shell.desktop .module-shell-content {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background-color: var(--toolkit-panel-bg);
    background-image:
      linear-gradient(var(--toolkit-brand-wash), var(--toolkit-brand-wash)),
      var(--toolkit-brand-bg, none);
    background-repeat: no-repeat, repeat;
    background-position: center top, center top;
    background-size: 100% 100%, var(--toolkit-brand-tile) var(--toolkit-brand-tile);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
  }

  .toolkit-sidebar.desktop {
    position: relative;
    width: 320px;
    min-width: 320px;
    height: calc(100vh - 26px);
    margin: 13px 10px 13px 13px;
    padding: 0;
    border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.08));
    border-radius: 16px;
    background: var(--toolkit-sidebar-glass, rgba(255, 255, 255, 0.58));
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    overflow: hidden;
    box-shadow: var(--toolkit-chrome-shadow);
    -webkit-transition: width 400ms ease, min-width 400ms ease;
    transition: width 400ms ease, min-width 400ms ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .toolkit-sidebar.desktop.collapsed {
    width: 80px;
    min-width: 80px;
  }

  .toolkit-sidebar.desktop .drawer-toolbar {
    min-height: 66px;
    height: 66px;
    padding: 10px 12px;
    -webkit-transition: padding 400ms ease;
    transition: padding 400ms ease;
  }

  .toolkit-sidebar.desktop.collapsed .drawer-toolbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .toolkit-sidebar.desktop .drawer-brand > img:first-child {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .toolkit-sidebar.desktop .drawer-brand > img + img {
    width: 100px;
    height: 35px;
    margin-left: 2px;
    object-fit: contain;
    -webkit-animation: sidebarLabelIn 300ms ease both;
    animation: sidebarLabelIn 300ms ease both;
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.045);
    color: rgba(17, 24, 39, 0.72);
    font-size: 18px;
    -webkit-transition: background 160ms ease, -webkit-transform 160ms ease;
    transition: background 160ms ease, transform 160ms ease;
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button:hover {
    background: rgba(0, 0, 0, 0.09);
    -webkit-transform: scale(1.04);
    transform: scale(1.04);
  }

  .toolkit-sidebar.desktop .module-nav {
    padding: 8px 9px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
  }

  .toolkit-sidebar.desktop .module-nav button,
  .toolkit-sidebar.desktop .drawer-profile-link,
  .toolkit-sidebar.desktop .drawer-logout {
    position: relative;
    width: 100%;
    min-height: 48px;
    margin: 2px 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(17, 24, 39, 0.88);
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    -webkit-transition: background 150ms ease, -webkit-transform 150ms ease;
    transition: background 150ms ease, transform 150ms ease;
  }

  .toolkit-sidebar.desktop .module-nav button:hover,
  .toolkit-sidebar.desktop .drawer-profile-link:hover,
  .toolkit-sidebar.desktop .drawer-logout:hover {
    background: var(--toolkit-sidebar-hover, rgba(0, 0, 0, 0.04));
  }

  .toolkit-sidebar.desktop .module-nav button.selected {
    background: var(--toolkit-sidebar-selected, rgba(0, 0, 0, 0.07));
  }

  .toolkit-sidebar.desktop .module-nav button > span,
  .toolkit-sidebar.desktop .drawer-profile-link > span {
    width: 34px;
    min-width: 34px;
    margin-right: 9px;
    color: rgba(0, 0, 0, 0.82);
    font-size: 22px;
    text-align: center;
  }

  .toolkit-sidebar.desktop .module-nav button strong,
  .toolkit-sidebar.desktop .drawer-profile-link strong {
    color: inherit;
    font-size: 16px;
    font-weight: 400;
    -webkit-animation: sidebarLabelIn 300ms ease both;
    animation: sidebarLabelIn 300ms ease both;
  }

  .toolkit-sidebar.desktop.collapsed .module-nav button,
  .toolkit-sidebar.desktop.collapsed .drawer-profile-link,
  .toolkit-sidebar.desktop.collapsed .drawer-logout {
    padding-left: 13px;
    padding-right: 13px;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
  }

  .toolkit-sidebar.desktop.collapsed .module-nav button > span,
  .toolkit-sidebar.desktop.collapsed .drawer-profile-link > span {
    margin-right: 0;
  }

  .toolkit-sidebar.desktop .drawer-footer {
    padding: 8px 9px 11px;
  }

  .toolkit-shell.desktop .home-header {
    position: relative;
    top: auto;
    z-index: 30;
    width: 100%;
    min-height: 74px;
    height: 74px;
    padding: 10px 50px 8px;
    border-radius: 0;
    overflow: visible;
    background: -webkit-linear-gradient(135deg, #002569, #1d4ed8, #1e3a8a);
    background: linear-gradient(135deg, #002569, #1d4ed8, #1e3a8a);
    box-shadow: none;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .toolkit-shell.desktop .header-school-logo {
    display: block;
    width: 68px;
    height: 44px;
    object-fit: contain;
    -webkit-transition: left 420ms cubic-bezier(0.22, 1, 0.36, 1), width 420ms ease, -webkit-transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    transition: left 420ms cubic-bezier(0.22, 1, 0.36, 1), width 420ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .toolkit-shell.desktop .is-home .header-school-logo {
    position: relative;
    left: auto;
    -webkit-transform: none;
    transform: none;
  }

  .toolkit-shell.desktop .is-module .header-school-logo {
    position: absolute;
    left: 50%;
    width: 140px;
    height: 48px;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }

  .header-school-name {
    display: none;
  }

  .toolkit-shell.desktop .is-home .header-school-name {
    display: block;
    max-width: 280px;
    margin-left: 2px;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    -webkit-animation: schoolNameReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation: schoolNameReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .toolkit-shell.desktop .module-header-title {
    position: absolute;
    left: 50px;
    top: 10px;
    bottom: 8px;
    width: 34vw;
    max-width: 420px;
    min-width: 0;
    color: #fff;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-animation: desktopHeaderTitleIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation: desktopHeaderTitleIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .toolkit-shell.desktop .is-home .module-header-title {
    display: none;
  }

  .toolkit-shell.desktop .module-header-title > span {
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin-right: 6px;
    font-size: 29px;
    text-align: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .toolkit-shell.desktop .module-header-title svg {
    width: 29px;
    height: 29px;
    display: block;
  }

  .toolkit-shell.desktop .module-header-title h1 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 24px;
    line-height: 29px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolkit-shell.desktop .header-actions {
    margin-left: auto;
    min-width: 0;
  }

  .toolkit-shell.desktop .header-actions > *,
  .toolkit-shell.desktop .header-actions > .global-search,
  .toolkit-shell.desktop .header-actions > .notifications-bell {
    margin-left: 10px;
  }

  .toolkit-shell.desktop .global-search-field {
    min-height: 40px;
  }

  .toolkit-shell.desktop .global-search.is-open .global-search-field {
    width: min(360px, 42vw);
    max-width: min(360px, 42vw);
  }

  .toolkit-shell.desktop .global-search-icon-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  .toolkit-shell.desktop .global-search-field input {
    height: 38px;
  }

  .toolkit-shell.desktop .header-actions > button,
  .toolkit-shell.desktop .header-actions > .notifications-bell > button,
  .toolkit-shell.desktop .header-message-button,
  .toolkit-shell.desktop .header-avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    -webkit-transition: background 160ms ease, -webkit-transform 160ms ease;
    transition: background 160ms ease, transform 160ms ease;
  }

  .toolkit-shell.desktop .header-actions > button:hover,
  .toolkit-shell.desktop .header-actions > .notifications-bell > button:hover,
  .toolkit-shell.desktop .header-message-button:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
  }

  .toolkit-shell.desktop .header-avatar {
    border-radius: 50%;
  }
}

@media (min-width: 769px) {
  .toolkit-home-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 12px;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
  }

  .toolkit-shell.desktop .module-shell.is-home {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .toolkit-shell.desktop .module-shell.is-home > .home-header {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
  }

  .toolkit-shell.desktop .module-shell.is-home > .module-shell-content {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .toolkit-shell.desktop .module-shell.is-home .toolkit-home-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 15px;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .home-layout-toolbar {
    min-height: 30px;
    margin: 0 0 4px;
  }

  .home-2cols {
    display: -ms-grid;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-gap: 12px;
    gap: 12px;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    align-items: stretch;
    justify-items: stretch;
    align-self: stretch;
    justify-self: stretch;
  }

  .home-2cols__col {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    align-self: stretch;
    justify-self: stretch;
  }

  .home-2cols__col--feed > .home-feed,
  .home-2cols__col--feed > .home-feed.animated-card {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
  }

  .home-2cols__col--widgets > .home-layout,
  .home-2cols__col--widgets > .home-layout > .home-editable-grid {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
  }

  .toolkit-shell.desktop .module-shell.is-home .home-editable-grid {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(0, auto);
    align-content: start;
    align-items: stretch;
    grid-auto-flow: row dense;
    grid-gap: 12px;
    margin: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .home-editable-grid {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    grid-gap: 12px;
    margin: 0;
  }

  .home-editable-block,
  .home-editable-block.wide {
    min-width: 0;
    margin: 0;
    border-radius: 18px;
    -webkit-box-flex: initial;
    -webkit-flex: initial;
    flex: initial;
  }

  .home-editable-block.block-welcome {
    grid-column: span 9;
    align-self: center;
  }

  .home-editable-block.block-weather {
    grid-column: span 3;
    align-self: center;
  }

  .home-editable-block.block-menu,
  .home-editable-block.block-circular,
  .home-editable-block.block-modules {
    grid-column: 1 / -1;
  }

  .home-editable-block.block-menu,
  .home-editable-block.block-circular,
  .home-editable-block.block-modules {
    align-self: start;
    overflow: visible;
    min-height: 0;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .home-editable-block.block-menu.is-open,
  .home-editable-block.block-circular.is-open {
    z-index: 150 !important;
  }

  .home-editable-block.block-menu .day-widget,
  .home-editable-block.block-circular .day-widget {
    position: relative;
  }

  .toolkit-shell.desktop .module-shell.is-home .home-editable-grid {
    overflow: visible;
  }

  .home-2cols__col--widgets {
    overflow: visible !important;
    position: relative;
  }

  .toolkit-shell.desktop .module-shell.is-home .toolkit-home-content {
    overflow: visible;
  }

  .home-2cols {
    overflow: visible;
  }

  .home-editable-block.block-modules .module-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 12px;
    margin: 0 0 12px;
  }

  .home-editable-block.block-modules .module-home-card {
    min-height: 156px;
    padding: 14px 12px 12px;
    border-radius: 16px;
  }

  .home-editable-block.block-modules .module-home-card h2 {
    font-size: 17px;
    line-height: 21px;
    margin-bottom: 6px;
  }

  .home-editable-block.block-modules .module-home-card p {
    font-size: 12px;
    line-height: 16px;
    margin: 2px 2px 8px;
  }

  .home-editable-block.block-modules .module-home-card button {
    min-height: 34px;
    font-size: 12px;
    padding: 6px 12px;
  }

  .home-editable-block.block-direct,
  .home-editable-block.block-feed {
    display: none !important;
  }

  .welcome-block {
    min-height: 112px;
    padding: 16px 8px 10px;
  }

  .welcome-block p {
    font-size: 30px;
  }

  .welcome-line {
    margin: 14px 0 10px;
    -webkit-transform-origin: left center;
    transform-origin: left center;
    -webkit-animation: welcomeLineDraw 820ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation: welcomeLineDraw 820ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .welcome-block h1 {
    font-size: 38px;
    font-weight: 700;
  }

  .weather-card {
    width: 100%;
    min-height: 96px;
    margin: 0;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.88));
    border-color: var(--toolkit-panel-border, rgba(15, 23, 42, 0.08));
    box-shadow: var(--toolkit-panel-shadow, 0 8px 24px rgba(15, 23, 42, 0.08));
    -webkit-transition: box-shadow 220ms ease, -webkit-transform 220ms ease;
    transition: box-shadow 220ms ease, transform 220ms ease;
  }

  .weather-card:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  }

  .weather-icon svg {
    width: 38px;
    height: 38px;
  }

  .day-widget {
    height: 100%;
    min-height: 124px;
    margin: 0;
    border-radius: 18px;
    -webkit-transition: box-shadow 220ms ease, -webkit-transform 220ms ease;
    transition: box-shadow 220ms ease, transform 220ms ease;
  }

  .day-widget:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
  }

  .menu-day-widget:hover,
  .circular-day-widget:hover {
    -webkit-transform: none;
    transform: none;
  }

  .menu-day-widget,
  .circular-day-widget {
    border-color: rgba(255, 255, 255, 0.45);
    background: transparent;
    box-shadow:
      0 6px 6px rgba(0, 0, 0, 0.12),
      0 0 20px rgba(0, 0, 0, 0.08);
  }

  .menu-day-widget .day-widget-header,
  .circular-day-widget .day-widget-header {
    background: transparent;
  }

  .direct-section {
    margin: 6px 0 0;
    padding: 12px 4px;
  }

  .direct-section > h2 {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .direct-grid {
    margin: 0 -6px;
  }

  .direct-tile {
    width: 108px;
    padding: 6px;
  }

  .direct-tile span {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    -webkit-transition: box-shadow 180ms ease, -webkit-transform 180ms ease;
    transition: box-shadow 180ms ease, transform 180ms ease;
  }

  .direct-tile:hover span {
    -webkit-transform: translateY(-3px) scale(1.03);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 18px rgba(0, 37, 105, 0.24);
  }

  .module-list {
    margin: 6px 0 20px;
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 12px;
  }

  .module-home-card {
    position: relative;
    min-height: 170px;
    margin: 0;
    padding: 18px 16px;
    overflow: hidden;
    -webkit-transform: perspective(900px) translateZ(0);
    transform: perspective(900px) translateZ(0);
    -webkit-transition: box-shadow 280ms ease, -webkit-transform 280ms ease;
    transition: box-shadow 280ms ease, transform 280ms ease;
    box-shadow: 0 6px 18px rgba(0, 37, 105, 0.14);
  }

  .module-home-card:hover {
    -webkit-transform: perspective(900px) translateY(-3px) rotateX(0.5deg) rotateY(-0.5deg);
    transform: perspective(900px) translateY(-3px) rotateX(0.5deg) rotateY(-0.5deg);
    box-shadow: 0 12px 26px rgba(0, 37, 105, 0.22);
  }

  .module-home-card h2 {
    font-size: 21px;
    line-height: 1.08;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .module-home-card p {
    font-size: 12.5px;
  }

  .module-home-card button {
    min-height: 36px;
    font-size: 13px;
    -webkit-transition: background 180ms ease, -webkit-transform 180ms ease;
    transition: background 180ms ease, transform 180ms ease;
  }

  .module-home-card button:hover {
    background: rgba(255, 255, 255, 0.24);
    -webkit-transform: scale(1.03);
    transform: scale(1.03);
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .toolkit-sidebar.desktop {
    width: 284px;
    min-width: 284px;
  }

  .module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 920px) {
  .module-list {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .home-editable-block.block-menu,
  .home-editable-block.block-circular {
    grid-column: span 12;
  }

  .home-editable-block.block-feed,
  .home-editable-block.block-direct,
  .home-editable-block.block-modules {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .home-editable-block.block-feed {
    grid-row: auto;
  }
}

@-webkit-keyframes sidebarLabelIn {
  from { opacity: 0; -webkit-transform: translateX(-8px); transform: translateX(-8px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@keyframes sidebarLabelIn {
  from { opacity: 0; -webkit-transform: translateX(-8px); transform: translateX(-8px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@-webkit-keyframes desktopHeaderTitleIn {
  from { opacity: 0; -webkit-transform: translateX(-28px); transform: translateX(-28px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@keyframes desktopHeaderTitleIn {
  from { opacity: 0; -webkit-transform: translateX(-28px); transform: translateX(-28px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@-webkit-keyframes schoolNameReveal {
  from { max-width: 0; opacity: 0; }
  to { max-width: 280px; opacity: 1; }
}

@keyframes schoolNameReveal {
  from { max-width: 0; opacity: 0; }
  to { max-width: 280px; opacity: 1; }
}

@-webkit-keyframes welcomeLineDraw {
  from { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@keyframes welcomeLineDraw {
  from { opacity: 0; -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { opacity: 1; -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .toolkit-sidebar.desktop,
  .module-header-title,
  .header-school-name,
  .welcome-line,
  .animated-card,
  .module-home-card,
  .direct-tile span {
    -webkit-animation: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ===== Chat dock completo: emojis, adjuntos y zumbido ===== */
.message-list article {
  position: relative;
}

.message-list article.nudge-message,
.message-list article.nudge-message.mine {
  width: 100%;
  margin: 8px 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.nudge-pill {
  width: max-content;
  max-width: 92%;
  margin: 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.12);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.nudge-pill svg {
  width: 15px;
  min-width: 15px;
  height: 15px;
  margin-right: 6px;
  color: #f59e0b;
}

.message-image-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.message-image-link img {
  display: block;
  width: 100%;
  max-width: 220px;
  max-height: 190px;
  border-radius: 9px;
  object-fit: cover;
}

.message-image-link small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-link {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(2, 132, 199, 0.16);
  border-radius: 9px;
  background: rgba(240, 249, 255, 0.82);
  color: #0369a1;
  text-decoration: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.message-list article.mine .message-file-link {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  color: #0f3d91;
}

.message-file-link svg {
  width: 21px;
  min-width: 21px;
  height: 21px;
  margin-right: 7px;
}

.message-file-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-message-button {
  min-height: 0;
  margin-top: 6px;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 10px;
}

.message-emoji-picker {
  max-height: 150px;
  padding: 8px;
  overflow-y: auto;
  border-top: 1px solid var(--toolkit-panel-border, #e2e8f0);
  background: var(--toolkit-panel-bg, #fff);
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-gap: 3px;
}

.message-emoji-picker button {
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 19px;
}

.message-emoji-picker button:hover {
  background: #e0f2fe;
  -webkit-transform: scale(1.08);
  transform: scale(1.08);
}

.message-composer {
  min-height: 58px;
  padding: 7px 7px;
  border-top: 1px solid var(--toolkit-panel-border, #e2e8f0);
  background: var(--toolkit-panel-bg, #fff);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
}

.message-composer .message-tool-button {
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 40px;
  min-height: 40px;
  margin: 0 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--toolkit-text-muted, #64748b);
  font-size: initial;
  line-height: normal;
  text-align: center;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.message-composer .message-tool-button:hover,
.message-composer .message-tool-button.active {
  background: #e0f2fe;
  color: #0284c7;
}

.message-composer .nudge-button.active {
  background: #fffbeb;
  color: #f59e0b;
}

.message-composer .message-tool-button svg {
  width: 21px;
  height: 21px;
  margin: 0;
}

.message-composer .file-button input {
  position: absolute;
  left: -9999px;
}

.message-composer textarea {
  min-width: 0;
  min-height: 40px;
  max-height: 86px;
  margin: 0 5px;
  padding: 9px 11px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--toolkit-panel-border, #cbd5e1);
  border-radius: 18px;
  background: var(--toolkit-surface, #f8fafc);
  color: var(--toolkit-text-body, #0f172a);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.message-composer textarea:focus {
  border-color: #38bdf8;
  outline: 2px solid rgba(56, 189, 248, 0.14);
}

.message-composer .message-send-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  margin: 1px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: -webkit-linear-gradient(135deg, #38bdf8, #0284c7);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.message-composer .message-send-button:disabled {
  background: var(--toolkit-panel-border, #cbd5e1);
}

.message-composer .message-send-button svg {
  width: 16px;
  height: 16px;
}

.conversation.nudge-flash-0,
.conversation.nudge-flash-1 {
  -webkit-animation: conversationNudge 650ms ease;
  animation: conversationNudge 650ms ease;
}

@-webkit-keyframes conversationNudge {
  0%, 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); }
  12% { -webkit-transform: translate(-4px, 2px); transform: translate(-4px, 2px); }
  24% { -webkit-transform: translate(4px, -3px); transform: translate(4px, -3px); }
  36% { -webkit-transform: translate(-3px, -2px); transform: translate(-3px, -2px); }
  48% { -webkit-transform: translate(4px, 3px); transform: translate(4px, 3px); }
  60% { -webkit-transform: translate(-4px, 0); transform: translate(-4px, 0); }
  72% { -webkit-transform: translate(3px, -2px); transform: translate(3px, -2px); }
  84% { -webkit-transform: translate(-2px, 2px); transform: translate(-2px, 2px); }
}

@keyframes conversationNudge {
  0%, 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); }
  12% { -webkit-transform: translate(-4px, 2px); transform: translate(-4px, 2px); }
  24% { -webkit-transform: translate(4px, -3px); transform: translate(4px, -3px); }
  36% { -webkit-transform: translate(-3px, -2px); transform: translate(-3px, -2px); }
  48% { -webkit-transform: translate(4px, 3px); transform: translate(4px, 3px); }
  60% { -webkit-transform: translate(-4px, 0); transform: translate(-4px, 0); }
  72% { -webkit-transform: translate(3px, -2px); transform: translate(3px, -2px); }
  84% { -webkit-transform: translate(-2px, 2px); transform: translate(-2px, 2px); }
}

/* ===== Inbox del header fiel al Toolkit padre ===== */
.notifications-bell > button {
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
}

.toolkit-shell.desktop .header-actions .notifications-bell > button {
  width: 40px;
  min-width: 40px;
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
}

.notifications-bell > button svg {
  width: 22px;
  height: 22px;
}

.notifications-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: #ff453a;
  box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.25);
}

.notifications-modal-root {
  position: fixed;
  z-index: 1200;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.notifications-dismiss-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(8, 12, 24, 0.22);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-animation: notificationsScrimIn 220ms ease-out;
  animation: notificationsScrimIn 220ms ease-out;
}

.notifications-panel {
  position: absolute;
  top: 58px;
  right: 42px;
  left: auto;
  z-index: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: min(460px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 72px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.48) 48%, rgba(248, 250, 252, 0.58) 100%);
  color:var(--toolkit-text-title, #0f172a);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 18px 50px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.1);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-animation: notificationsPanelIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: notificationsPanelIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-transform-origin: top right;
  transform-origin: top right;
}

.notifications-panel-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 70%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, rgba(167, 139, 250, 0.12) 42%, transparent 70%);
  pointer-events: none;
}

.notifications-panel-header {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 16px 14px 10px 16px;
  border: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 10px;
}

.notifications-panel-title {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notifications-panel-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.95), rgba(99, 102, 241, 0.9));
  color: #fff;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
  flex: 0 0 auto;
}

.notifications-panel-mark svg {
  width: 20px;
  height: 20px;
}

.notifications-panel-title > div {
  min-width: 0;
}

.notifications-panel-header strong {
  display: block;
  color:var(--toolkit-text-title, #0f172a);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.notifications-panel-title p {
  margin: 2px 0 0;
  color: rgba(71, 85, 105, 0.92);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.notifications-panel-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.notifications-count {
  min-width: 24px;
  height: 24px;
  margin: 0;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6259, #ff453a);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(255, 69, 58, 0.35);
}

.notifications-mark-all {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0;
  padding: 0 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.42) !important;
  color: #1d4ed8 !important;
  font-size: 12px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.notifications-mark-all svg {
  width: 15px !important;
  height: 15px !important;
}

.notifications-mark-all:hover {
  background: rgba(255, 255, 255, 0.62) !important;
}

.notifications-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.35) !important;
  color:var(--toolkit-text-body, #475569) !important;
  cursor: pointer;
}

.notifications-close svg {
  width: 16px !important;
  height: 16px !important;
}

.notifications-close:hover {
  background: rgba(255, 255, 255, 0.55) !important;
  color:var(--toolkit-text-title, #0f172a) !important;
}

.notifications-filters {
  position: relative;
  z-index: 1;
  padding: 0 12px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  scrollbar-width: none;
}

.notifications-filters::-webkit-scrollbar {
  display: none;
}

.notifications-filters button {
  -webkit-flex: 0 0 auto !important;
  flex: 0 0 auto !important;
  -webkit-box-flex: 0 !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 7px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.28) !important;
  color:var(--toolkit-text-body, #475569) !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  -webkit-transition: background 160ms ease, color 160ms ease, -webkit-transform 160ms ease;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.notifications-filters button:hover {
  background: rgba(255, 255, 255, 0.48) !important;
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.notifications-filters button.active {
  border-color: rgba(59, 130, 246, 0.35) !important;
  background: linear-gradient(180deg, #60a5fa, #3b82f6) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.35);
}

.notifications-list {
  position: relative;
  z-index: 1;
  max-height: none;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 10px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.notifications-list li {
  margin: 0 0 8px;
  padding: 0;
}

.notifications-list li:last-child {
  margin-bottom: 0;
}

.notifications-list button,
.notification-row {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.42) !important;
  color:var(--toolkit-text-title, #0f172a) !important;
  text-align: left;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-transition: background 160ms ease, -webkit-transform 160ms ease, box-shadow 160ms ease;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.notification-row.unread {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 18px rgba(59, 130, 246, 0.12);
}

.notification-row:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.notification-row-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: color-mix(in srgb, var(--ntf-accent, #64748b) 16%, rgba(255, 255, 255, 0.55));
  color: var(--ntf-accent, #64748b);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  flex: 0 0 40px;
}

.notification-row-icon svg {
  width: 18px;
  height: 18px;
}

.notification-row-body {
  min-width: 0;
  display: block;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.notification-row-top {
  width: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.notification-row-top .kind {
  display: inline-block;
  color: color-mix(in srgb, var(--ntf-accent, #64748b) 75%, #64748b);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notification-row-top time,
.notification-row-body time {
  color:var(--toolkit-text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.notification-row-body strong {
  display: block;
  color:var(--toolkit-text-title, #0f172a);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.notification-row-body small {
  display: block;
  margin-top: 3px;
  color:var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
  height: 10px;
  margin-top: 4px;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.notification-row-badge:not(:empty) {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
}

.notifications-empty {
  position: relative;
  z-index: 1;
  margin: 4px 12px 16px;
  padding: 36px 18px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.28);
  text-align: center;
  color:var(--toolkit-text-muted, #64748b);
}

.notifications-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(160deg, rgba(147, 197, 253, 0.55), rgba(196, 181, 253, 0.45));
  color: #1d4ed8;
}

.notifications-empty-icon svg {
  width: 26px;
  height: 26px;
}

.notifications-empty p {
  margin: 0 0 4px;
  color:var(--toolkit-text-title, #0f172a);
  font-size: 15px;
  font-weight: 800;
}

.notifications-empty small {
  display: block;
  max-width: 240px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.4;
}

@-webkit-keyframes notificationsScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes notificationsScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@-webkit-keyframes notificationsPanelIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(-12px) scale(0.94);
    transform: translateY(-12px) scale(0.94);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes notificationsPanelIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(-12px) scale(0.94);
    transform: translateY(-12px) scale(0.94);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .notifications-panel {
    top: 58px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    margin-left: 0;
    border-radius: 24px;
  }

  .notifications-mark-all span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notifications-panel,
  .notifications-dismiss-layer {
    -webkit-animation: none !important;
    animation: none !important;
  }
}

/* ===== Mensajería flotante web, fuera del header ===== */
.floating-messages-host {
  position: fixed;
  z-index: 2147483000;
  right: 16px;
  bottom: 28px;
  pointer-events: none;
}

.floating-messages-fab {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.95), rgba(99, 102, 241, 0.92));
  color: #fff;
  pointer-events: auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 10px 28px rgba(59, 130, 246, 0.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-transition: box-shadow 180ms ease, -webkit-transform 180ms ease;
  transition: box-shadow 180ms ease, transform 180ms ease;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.floating-messages-fab:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 14px 34px rgba(59, 130, 246, 0.5);
}

.floating-messages-fab svg {
  width: 26px;
  height: 26px;
}

.floating-messages-fab b {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6259, #ff453a);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(255, 69, 58, 0.35);
}

.floating-messages-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  z-index: 1;
  width: min(400px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.38) !important;
  color:var(--toolkit-text-title, #0f172a);
  pointer-events: auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 50px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.1);
  -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
  backdrop-filter: blur(32px) saturate(190%) !important;
  -webkit-animation: floatingMessagesGlassIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: floatingMessagesGlassIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.floating-messages-panel-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 70%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, rgba(167, 139, 250, 0.12) 42%, transparent 70%);
  pointer-events: none;
}

.floating-messages-panel-header {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 16px 14px 12px 16px;
  border: 0;
  background: transparent;
  color:var(--toolkit-text-title, #0f172a);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 10px;
}

.floating-messages-panel-title {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.floating-messages-panel-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.95), rgba(99, 102, 241, 0.9));
  color: #fff;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
  flex: 0 0 auto;
}

.floating-messages-panel-mark svg {
  width: 20px;
  height: 20px;
}

.floating-messages-panel-title > div {
  min-width: 0;
}

.floating-messages-panel-header strong {
  display: block;
  color:var(--toolkit-text-title, #0f172a);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.floating-messages-panel-title p {
  margin: 2px 0 0;
  color: rgba(71, 85, 105, 0.92);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.floating-messages-panel-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.floating-messages-count {
  min-width: 24px;
  height: 24px;
  margin: 0;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6259, #ff453a);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(255, 69, 58, 0.35);
}

.floating-messages-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.35) !important;
  color:var(--toolkit-text-body, #475569) !important;
  cursor: pointer;
}

.floating-messages-icon-btn:hover {
  background: rgba(255, 255, 255, 0.55) !important;
  color:var(--toolkit-text-title, #0f172a) !important;
}

.floating-messages-icon-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.floating-messages-panel .messages-panel.compact {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0 !important;
  overflow: hidden;
  background: transparent !important;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.floating-messages-panel .messages-panel.compact .message-users {
  width: 100%;
  min-width: 0;
  border-right: 0;
  background: transparent !important;
}

.floating-messages-panel .messages-panel.compact .message-users.conversation-open {
  display: none;
}

.floating-messages-panel .messages-panel.compact .conversation {
  width: 100%;
  min-width: 0;
  background: transparent !important;
}

.floating-messages-panel .messages-panel.compact .conversation-empty {
  display: none;
}

.floating-messages-panel .async-state {
  min-height: 0;
  padding: 28px 16px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
}

.floating-messages-panel .message-users ul {
  max-height: none;
  height: 100%;
  padding: 0 10px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent !important;
}

.floating-messages-panel .message-users li {
  margin: 0 0 8px;
}

.floating-messages-panel .message-users li:last-child {
  margin-bottom: 0;
}

.floating-messages-panel .message-users li.offline-divider {
  margin: 10px 4px 6px;
  padding: 0 4px;
  border: 0;
  color:var(--toolkit-text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.floating-messages-panel .message-users li button {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-transition: background 160ms ease, -webkit-transform 160ms ease;
  transition: background 160ms ease, transform 160ms ease;
}

.floating-messages-panel .message-users li button:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.floating-messages-panel .message-users strong {
  color:var(--toolkit-text-title, #0f172a);
  font-size: 13px;
  font-weight: 750;
}

.floating-messages-panel .message-users small {
  color:var(--toolkit-text-muted, #64748b);
}

.floating-messages-panel .message-users b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6259, #ff453a);
  box-shadow: 0 4px 10px rgba(255, 69, 58, 0.28);
  font-size: 10px;
  font-weight: 800;
  line-height: 20px;
}

.floating-messages-panel .conversation > header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.floating-messages-panel .message-list {
  background: transparent;
}

.floating-messages-panel .message-list article {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.floating-messages-panel .message-list article.mine {
  background: rgba(191, 219, 254, 0.72);
  border-color: rgba(147, 197, 253, 0.55);
}

.floating-messages-panel .message-composer {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.floating-messages-panel .message-composer input[type=text],
.floating-messages-panel .message-composer > input {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.55);
}

.floating-chat-docks {
  position: absolute;
  right: 70px;
  bottom: 0;
  max-width: calc(100vw - 110px);
  pointer-events: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: reverse;
  -webkit-flex-direction: row-reverse;
  flex-direction: row-reverse;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
}

.floating-chat-dock {
  width: 340px;
  min-width: 340px;
  height: 460px;
  margin-left: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.38) !important;
  pointer-events: auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 50px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.1);
  -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
  backdrop-filter: blur(32px) saturate(190%) !important;
  -webkit-animation: floatingMessagesGlassIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: floatingMessagesGlassIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.floating-chat-dock.minimized {
  height: 62px;
}

.floating-chat-dock.incoming-nudge {
  -webkit-animation: conversationNudge 650ms ease;
  animation: conversationNudge 650ms ease;
}

.floating-chat-dock > header {
  position: relative;
  z-index: 1;
  min-height: 62px;
  height: 62px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.28);
  color:var(--toolkit-text-title, #0f172a);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.floating-chat-dock > header .message-user-avatar {
  width: 34px;
  min-width: 34px;
  height: 34px;
  margin-right: 8px;
  line-height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.floating-chat-dock > header > div {
  min-width: 0;
  margin-right: auto;
}

.floating-chat-dock > header strong,
.floating-chat-dock > header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-chat-dock > header strong {
  color:var(--toolkit-text-title, #0f172a);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.floating-chat-dock > header small {
  margin-top: 1px;
  color: rgba(71, 85, 105, 0.9);
  font-size: 10px;
  font-weight: 600;
}

.floating-chat-dock > header button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color:var(--toolkit-text-body, #475569);
}

.floating-chat-dock > header button:hover {
  background: rgba(255, 255, 255, 0.55);
  color:var(--toolkit-text-title, #0f172a);
}

.floating-chat-dock > header button svg {
  width: 16px;
  height: 16px;
}

.floating-chat-dock .messages-panel.conversation-only,
.floating-chat-dock .messages-panel {
  width: 100%;
  min-height: 0 !important;
  overflow: hidden;
  background: transparent !important;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.floating-chat-dock .conversation {
  width: 100%;
  min-width: 0;
  background: transparent !important;
}

.floating-chat-dock .async-state {
  background: transparent !important;
  border: 0;
}

.floating-chat-dock .message-list {
  min-height: 0;
  background: transparent !important;
}

.floating-chat-dock .message-list article {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.floating-chat-dock .message-list article.mine {
  background: rgba(191, 219, 254, 0.72);
  border-color: rgba(147, 197, 253, 0.55);
}

.floating-chat-dock .message-composer {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.floating-chat-dock .message-composer input[type=text],
.floating-chat-dock .message-composer > input {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.55);
}

.toolkit-shell.desktop .home-header .header-message-button {
  display: none;
}

.toolkit-shell.mobile .home-header .header-message-button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

@media (max-width: 393px) {
  .floating-messages-host {
    display: none;
  }
}

@-webkit-keyframes floatingMessagesIn {
  from { opacity: 0; -webkit-transform: translateY(14px) scale(0.96); transform: translateY(14px) scale(0.96); }
  to { opacity: 1; -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1); }
}

@keyframes floatingMessagesIn {
  from { opacity: 0; -webkit-transform: translateY(14px) scale(0.96); transform: translateY(14px) scale(0.96); }
  to { opacity: 1; -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1); }
}

/* Solo opacity: transform rompe backdrop-filter en WebKit/Chromium */
@-webkit-keyframes floatingMessagesGlassIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floatingMessagesGlassIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.message-user-avatar-wrap {
  position: relative;
  width: 46px;
  min-width: 46px;
  height: 46px;
  margin-right: 10px;
  display: block;
}

.message-user-avatar {
  width: 42px;
  min-width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--toolkit-panel-border, #e2e8f0);
  object-fit: cover;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.14);
  display: block;
}

.message-user-avatar.fallback {
  background: -webkit-linear-gradient(135deg, #38bdf8, #0284c7);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  font-size: 16px;
  line-height: 38px;
  font-weight: 800;
  text-align: center;
}

.message-user-avatar-wrap .presence-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  min-width: 11px;
  height: 11px;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
}

.conversation > header > .message-user-avatar {
  margin-right: 9px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.conversation > header > div {
  min-width: 0;
  margin-right: auto;
}

.header-school-name {
  display: none;
}

@media (max-width: 480px) {
  .module-header-title > span {
    width: 22px;
    min-width: 22px;
    margin-right: 3px;
  }

  .module-header-title svg {
    width: 21px;
    height: 21px;
    display: block;
  }

  .module-header-title h1 {
    margin: 0;
    font-size: 13px;
    line-height: 21px;
  }
}

.header-actions > button,
.header-actions > .notifications-bell > button,
.header-actions > .global-search .global-search-icon-btn {
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 21px;
}

.header-actions .global-search-panel button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-left: 0;
  border-radius: 10px;
  color: inherit;
  font-size: inherit;
}

.header-actions .header-message-button b {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #1e3a8a;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.header-actions > button svg,
.header-actions > .notifications-bell > button svg,
.header-actions > .global-search .global-search-icon-btn svg,
.header-actions > .global-search .global-search-close svg {
  width: 22px;
  height: 22px;
}

.header-actions .header-create {
  background: #16a34a;
  font-size: 27px;
}

.toolkit-shell.desktop .header-actions .header-create-ticket,
.header-actions .header-create-ticket {
  width: auto;
  min-width: 40px;
  max-width: 40px;
  height: 34px;
  min-height: 34px;
  margin-left: 4px;
  padding: 0 9px;
  border-radius: 8px;
  background: #16a34a;
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-transition: max-width 220ms ease-out, padding 220ms ease-out;
  transition: max-width 220ms ease-out, padding 220ms ease-out;
}

.header-create-ticket > span {
  width: 22px;
  min-width: 22px;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
}

.header-create-ticket > strong {
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  white-space: nowrap;
  -webkit-transition: max-width 220ms ease-out, margin-left 220ms ease-out, opacity 220ms ease-out;
  transition: max-width 220ms ease-out, margin-left 220ms ease-out, opacity 220ms ease-out;
}

@media (hover: hover) and (min-width: 769px) {
  .header-actions .header-create-ticket:hover,
  .header-actions .header-create-ticket:focus,
  .header-actions .header-create-ticket.expanded {
    max-width: 220px;
    padding: 0 12px;
  }

  .header-create-ticket:hover > strong,
  .header-create-ticket:focus > strong,
  .header-create-ticket.expanded > strong {
    max-width: 120px;
    margin-left: 4px;
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .toolkit-shell.desktop .header-actions .header-create-ticket.expanded {
    width: auto;
    max-width: 220px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .toolkit-shell.desktop .header-actions .header-create-ticket.expanded > strong {
    max-width: 120px;
    margin-left: 4px;
    opacity: 1;
  }
}

.toolkit-shell .header-actions .header-avatar,
.header-actions .header-avatar {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 700;
  box-sizing: border-box;
}

.header-avatar > img,
.header-avatar-fallback {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  box-sizing: border-box;
}

.header-avatar > img {
  display: block;
  object-fit: cover;
}

.header-avatar-fallback {
  background: rgba(255, 255, 255, 0.25);
  color: #1d4ed8;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.header-avatar-fallback svg {
  width: 24px;
  height: 24px;
}

.header-avatar-fallback i {
  display: none;
}

.create-ticket-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.create-ticket-sheet {
  position: relative;
  width: 940px;
  max-width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(var(--app-height, 100vh) - 36px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.96);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-animation: modalEnter 220ms ease-out both;
  animation: modalEnter 220ms ease-out both;
}

.create-ticket-sheet > header {
  min-height: 70px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--toolkit-panel-border, #dbe3ee);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.create-ticket-heading,
.create-ticket-head-actions,
.create-ticket-heading > div {
  min-width: 0;
}

.create-ticket-heading {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.create-ticket-heading > span {
  width: 42px;
  height: 42px;
  margin-right: 11px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.create-ticket-heading svg {
  width: 23px;
  height: 23px;
}

.create-ticket-heading h2,
.create-ticket-heading p {
  margin: 0;
}

.create-ticket-heading h2 {
  color: var(--toolkit-text-body, #0f172a);
  font-size: 19px;
}

.create-ticket-heading p {
  margin-top: 3px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.create-ticket-head-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.create-ticket-head-actions button {
  width: 38px;
  height: 38px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e9eef5;
  color: var(--toolkit-text-muted, #64748b);
}

.create-ticket-head-actions button.active {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.create-ticket-head-actions svg {
  width: 21px;
  height: 21px;
}

.create-ticket-progress {
  padding: 11px 28px;
  border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.create-ticket-progress > span {
  position: relative;
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  color: var(--toolkit-text-muted, #94a3b8);
  text-align: center;
}

.create-ticket-progress > span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--toolkit-panel-border, #dbe3ee);
}

.create-ticket-progress i {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  margin: 0 auto 3px;
  border-radius: 50%;
  background: var(--toolkit-panel-border, #e2e8f0);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 24px;
  display: block;
}

.create-ticket-progress small {
  font-size: 10px;
}

.create-ticket-progress .done {
  color: #059669;
}

.create-ticket-progress .done i,
.create-ticket-progress .done:not(:last-child)::after {
  background: #10b981;
  color: #fff;
}

.create-ticket-sheet > form {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.create-ticket-columns {
  padding: 16px 18px 10px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.create-ticket-main-column {
  min-width: 0;
  margin-right: 14px;
  -webkit-box-flex: 2;
  -webkit-flex: 2;
  flex: 2;
}

.create-ticket-sheet fieldset {
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 15px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.82));
}

.create-ticket-sheet legend {
  padding: 0 5px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 14px;
  font-weight: 750;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.create-ticket-sheet legend > b {
  width: 25px;
  height: 25px;
  margin-right: 7px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  line-height: 25px;
  text-align: center;
}

.create-ticket-sheet legend small {
  margin-top: 2px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 10px;
  font-weight: 400;
  display: block;
}

.create-ticket-sheet label {
  margin-top: 10px;
  display: block;
}

.create-ticket-sheet label > span {
  margin-bottom: 5px;
  color: var(--toolkit-text-body, #334155);
  font-size: 11px;
  font-weight: 700;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.create-ticket-sheet label > span svg {
  margin-right: 5px;
}

.create-ticket-sheet label > span b {
  margin-left: 3px;
  color: #dc2626;
}

.create-ticket-sheet label > span small {
  margin-left: auto;
  color: var(--toolkit-text-muted, #94a3b8);
  font-weight: 500;
}

.create-ticket-sheet input,
.create-ticket-sheet textarea,
.create-ticket-sheet select {
  width: 100%;
  padding: 10px 11px;
  box-sizing: border-box;
  border: 1px solid var(--toolkit-panel-border, #cbd5e1);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text-body, #0f172a);
  font: inherit;
  font-size: 13px;
}

.create-ticket-sheet textarea {
  min-height: 92px;
  resize: vertical;
}

.create-ticket-sheet input:focus,
.create-ticket-sheet textarea:focus,
.create-ticket-sheet select:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.12);
}

.create-ticket-sheet label > em {
  margin-top: 4px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 10px;
  font-style: normal;
  display: block;
}

.ticket-mention-field {
  position: relative;
}

.ticket-mention-composer {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  min-height: 42px;
  padding: 5px 7px;
  box-sizing: border-box;
  border: 1px solid var(--toolkit-panel-border, #cbd5e1);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  cursor: text;
}

.ticket-mention-field.multiline .ticket-mention-composer {
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  min-height: 92px;
}

.ticket-mention-composer:focus-within {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.12);
}

.create-ticket-sheet .ticket-mention-composer input,
.create-ticket-sheet .ticket-mention-composer textarea {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 120px;
  flex: 1 1 120px;
  width: auto;
  min-width: 96px;
  padding: 4px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.create-ticket-sheet .ticket-mention-composer textarea {
  min-height: 68px;
  resize: vertical;
}

.create-ticket-sheet .ticket-mention-composer input:focus,
.create-ticket-sheet .ticket-mention-composer textarea:focus {
  outline: none;
}

.ticket-mention-text {
  white-space: pre-wrap;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 13px;
  line-height: 1.4;
}

.ticket-mention-chip {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  margin: 2px 4px 2px 0;
  padding: 2px 4px 2px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
}

.ticket-mention-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.ticket-mention-chip button {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  margin-left: 2px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 13px;
}

.ticket-mention-chip button:hover {
  background: rgba(29, 78, 216, 0.18);
}

.ticket-mention-field .ticket-mention-suggestions {
  position: absolute;
  z-index: 6;
  right: 0;
  left: 0;
  max-height: 250px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  overflow-y: auto;
}

.ticket-mention-field .ticket-mention-suggestions__head {
  padding: 4px 6px 8px;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 4px;
}

.ticket-mention-field .ticket-mention-suggestions__head strong {
  display: block;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 12px;
}

.ticket-mention-field .ticket-mention-suggestions__head span {
  display: block;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
}

.ticket-mention-field .ticket-mention-suggestions button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--toolkit-text-body, #111827);
  text-align: left;
  cursor: pointer;
}

.ticket-mention-field .ticket-mention-suggestions button:hover,
.ticket-mention-field .ticket-mention-suggestions button:focus {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
}

.ticket-mention-field .ticket-mention-suggestions button b {
  display: block;
  font-size: 13px;
}

.ticket-mention-field .ticket-mention-suggestions small {
  display: block;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
}

.ticket-mention-field .ticket-mention-suggestions .ticket-mention-status {
  margin: 0;
  padding: 8px 9px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.ticket-mention-field .ticket-mention-suggestions .ticket-mention-status.error {
  color: #dc2626;
}

.ticket-mention-field .ticket-mention-suggestions .ticket-mention-dismiss {
  margin-top: 4px;
  color: #2563eb;
  font-size: 12px;
  text-align: center;
}

.create-ticket-selects {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.create-ticket-selects label {
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.create-ticket-selects label:first-child {
  margin-right: 10px;
}

.create-ticket-evidence {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.create-ticket-dropzone {
  min-height: 155px;
  padding: 16px;
  border: 2px dashed #bfdbfe;
  border-radius: 14px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
  color: #2563eb;
  text-align: center;
  cursor: pointer;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.create-ticket-dropzone svg {
  width: 35px;
  height: 35px;
  margin-bottom: 7px;
}

.create-ticket-dropzone strong {
  font-size: 13px;
}

.create-ticket-dropzone small {
  margin-top: 3px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 10px;
}

.create-ticket-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.create-ticket-files {
  margin-top: 8px;
}

.create-ticket-files > span {
  min-width: 0;
  margin-top: 5px;
  padding: 6px 7px;
  border-radius: 8px;
  background: var(--toolkit-surface, #f1f5f9);
  color: var(--toolkit-text-body, #475569);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.create-ticket-files > span button {
  float: right;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--toolkit-panel-border, #cbd5e1);
}

.create-ticket-sheet footer {
  min-height: 70px;
  padding: 11px 18px;
  border-top: 1px solid var(--toolkit-panel-border, #dbe3ee);
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.9));
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.create-ticket-sheet footer > div {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.create-ticket-sheet footer > div.ready {
  color: #059669;
}

.create-ticket-sheet footer > div svg {
  margin-right: 5px;
}

.create-ticket-sheet footer > p {
  margin: 0 8px;
  color: #b42318;
  font-size: 11px;
}

.create-ticket-footer-actions {
  margin-left: auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.create-ticket-footer-actions button {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--toolkit-panel-border, #cbd5e1);
  border-radius: 9px;
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text-body, #475569);
  font-weight: 700;
}

.create-ticket-footer-actions button + button {
  margin-left: 8px;
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.create-ticket-footer-actions button:disabled {
  border-color:var(--toolkit-text-muted, #94a3b8);
  background: #94a3b8;
  opacity: 0.65;
}

.create-ticket-footer-actions svg {
  vertical-align: middle;
}

.create-ticket-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.create-ticket-confirm {
  width: min(420px, 100%);
  padding: 18px;
  border-radius: 18px;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.create-ticket-confirm--receipt {
  text-align: center;
  padding: 28px 22px 20px;
}

.create-ticket-confirm__icon {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 32px;
}

.create-ticket-confirm--receipt h3 {
  margin: 0 0 8px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 20px;
  font-weight: 800;
}

.create-ticket-confirm > header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.create-ticket-confirm > header h3 {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 17px;
  font-weight: 800;
}

.create-ticket-confirm > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--toolkit-surface, #f1f5f9);
  color: var(--toolkit-text-muted, #64748b);
  cursor: pointer;
}

.create-ticket-confirm__lead {
  margin: 0 0 8px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.create-ticket-confirm__eta {
  margin: 0 0 18px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 14px;
  line-height: 1.45;
}

.create-ticket-confirm__meta {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--toolkit-panel-border, #e2e8f0);
  border-radius: 14px;
  background: var(--toolkit-surface, #f8fafc);
}

.create-ticket-confirm__meta > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
}

.create-ticket-confirm__meta > div + div {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.create-ticket-confirm__meta dt {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.create-ticket-confirm__meta dd {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

.create-ticket-confirm__queue {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 12px;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--toolkit-text-body, #0f172a);
}

.create-ticket-confirm__queue svg {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-top: 2px;
  color: #2563eb;
  font-size: 22px;
}

.create-ticket-confirm__queue strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.create-ticket-confirm__queue span {
  display: block;
  margin-top: 4px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
}

.create-ticket-confirm__queue span b {
  color: var(--toolkit-text-body, #0f172a);
}

.create-ticket-confirm__error {
  margin: 0 0 10px;
  color: #dc2626;
  font-size: 13px;
}

.create-ticket-confirm > footer {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.create-ticket-confirm--receipt > footer {
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.create-ticket-confirm > footer button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--toolkit-panel-border, #e2e8f0);
  background: var(--toolkit-surface, #f8fafc);
  color: var(--toolkit-text-body, #0f172a);
  font-weight: 700;
  cursor: pointer;
}

.create-ticket-confirm > footer button:first-child {
  background: transparent;
}

.create-ticket-confirm--receipt > footer button,
.create-ticket-confirm > footer button:last-child {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.create-ticket-confirm > footer button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .create-ticket-overlay {
    padding: 0;
  }

  .create-ticket-sheet {
    width: 100%;
    height: var(--app-height, 100vh);
    max-height: var(--app-height, 100vh);
    border: 0;
    border-radius: 0;
  }

  .create-ticket-columns,
  .create-ticket-selects {
    display: block;
  }

  .create-ticket-main-column,
  .create-ticket-selects label:first-child {
    margin-right: 0;
  }

  .create-ticket-progress {
    padding-right: 10px;
    padding-left: 10px;
  }

  .create-ticket-sheet footer {
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .create-ticket-footer-actions {
    width: 100%;
    margin-top: 8px;
  }

  .create-ticket-footer-actions button {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
  }
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: 10px 0 10px 10px;
  background: rgba(15, 23, 42, 0.35);
}

.home-drawer {
  width: 290px;
  max-width: 290px;
  height: calc(100% - 20px);
  padding: 0 13px 14px;
  border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  background: var(--toolkit-sidebar-glass, rgba(255, 255, 255, 0.58));
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--toolkit-chrome-shadow);
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  -webkit-animation: drawerEnter 280ms ease-out both;
  animation: drawerEnter 280ms ease-out both;
}

@media (max-width: 1024px) {
  .home-drawer {
    background: rgba(255, 255, 255, 0.68);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    backdrop-filter: saturate(140%) blur(12px);
  }
}

.drawer-toolbar {
  min-height: 82px;
  padding: 18px 4px 10px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.drawer-brand {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-box-pack: start;
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  -webkit-box-flex: 0;
  -webkit-flex: 0 1 auto;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  gap: 2px;
}

.sidebar-logot-wrap {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: block;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.sidebar-logot-wrap img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.sidebar-toolkit-reveal {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  width: 102px;
  max-width: 102px;
  height: 35px;
  margin-left: 0;
  overflow: hidden;
  opacity: 1;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  -webkit-transform: scaleX(1);
  transform: scaleX(1);
  -webkit-transform-origin: left center;
  transform-origin: left center;
}

.sidebar-toolkit-reveal img {
  display: block;
  width: 100px;
  height: 35px;
  object-fit: contain;
}

.drawer-brand img:first-child {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.drawer-brand img:last-child {
  width: 100px;
  height: 35px;
  object-fit: contain;
}

.toolkit-sidebar.drawer .drawer-brand {
  gap: 2px;
}

.toolkit-sidebar.drawer .sidebar-logot-wrap,
.toolkit-sidebar.drawer .sidebar-logot-wrap img {
  width: 40px;
  min-width: 40px;
  height: 40px;
}

.toolkit-sidebar.drawer .sidebar-toolkit-reveal {
  width: 102px;
  max-width: 102px;
}

.toolkit-sidebar.drawer .sidebar-toolkit-reveal img {
  width: 100px;
  height: 35px;
}

@media (max-width: 420px) {
  .toolkit-sidebar.drawer .sidebar-logot-wrap,
  .toolkit-sidebar.drawer .sidebar-logot-wrap img {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }

  .toolkit-sidebar.drawer .sidebar-toolkit-reveal {
    width: 88px;
    max-width: 88px;
  }

  .toolkit-sidebar.drawer .sidebar-toolkit-reveal img {
    width: 86px;
    height: 30px;
  }
}

.drawer-toolbar > button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--toolkit-text-body, #334155);
  font-size: 28px;
}

.drawer-divider,
.module-nav-divider {
  height: 1px;
  background: var(--toolkit-border, rgba(15, 23, 42, 0.12));
}

.module-nav {
  margin-top: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.module-nav-divider {
  margin: 8px 5px;
}

.module-nav button,
.drawer-profile-link,
.drawer-logout {
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(0, 0, 0, 0.82);
  text-align: left;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.module-nav button > span,
.drawer-profile-link > span {
  width: 30px;
  min-width: 30px;
  height: 30px;
  margin-right: 8px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.module-nav button svg,
.drawer-profile-link svg,
.drawer-logout svg {
  width: 19px;
  height: 19px;
}

.module-nav button strong,
.drawer-profile-link strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.module-nav button.selected {
  background: var(--toolkit-sidebar-selected, rgba(255, 255, 255, 0.92));
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.module-nav button:active,
.drawer-profile-link:active {
  background: var(--toolkit-sidebar-hover, rgba(255, 255, 255, 0.7));
}

.drawer-spacer {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-height: 12px;
}

.drawer-footer {
  flex-shrink: 0;
}

.drawer-footer-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
}

.drawer-footer-row .drawer-profile-link {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.drawer-theme-toggle {
  position: relative;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--toolkit-text-sidebar-icon, #1f2937);
  cursor: pointer;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  -webkit-transition: background 280ms ease, border-color 280ms ease, color 280ms ease, box-shadow 280ms ease, -webkit-transform 220ms ease;
  transition: background 280ms ease, border-color 280ms ease, color 280ms ease, box-shadow 280ms ease, transform 220ms ease;
}

.drawer-theme-toggle:disabled {
  cursor: wait;
  opacity: 0.92;
}

.drawer-theme-toggle__orbit,
.drawer-theme-toggle__pulse {
  position: absolute;
  inset: 4px;
  border-radius: 9px;
  pointer-events: none;
}

.drawer-theme-toggle__orbit {
  border: 1.5px solid transparent;
  opacity: 0;
  -webkit-transform: scale(0.86) rotate(0deg);
  transform: scale(0.86) rotate(0deg);
}

.drawer-theme-toggle__pulse {
  background: radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.22), transparent 68%);
  opacity: 0;
}

.drawer-theme-toggle__icons {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
}

.drawer-theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin: 0;
  font-style: normal;
  -webkit-transition: opacity 320ms ease, -webkit-transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-theme-toggle__icon svg {
  width: 20px;
  height: 20px;
}

.drawer-theme-toggle.is-light .drawer-theme-toggle__icon.moon {
  opacity: 1;
  -webkit-transform: rotate(0deg) scale(1);
  transform: rotate(0deg) scale(1);
}

.drawer-theme-toggle.is-light .drawer-theme-toggle__icon.sun {
  opacity: 0;
  -webkit-transform: rotate(-50deg) scale(0.55);
  transform: rotate(-50deg) scale(0.55);
}

.drawer-theme-toggle__star {
  position: absolute;
  top: -3px;
  right: -4px;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  margin: 0;
  color: #60a5fa;
  opacity: 0;
  pointer-events: none;
  font-style: normal;
  -webkit-transform: scale(0.4) rotate(-40deg);
  transform: scale(0.4) rotate(-40deg);
  -webkit-transition: opacity 280ms ease, -webkit-transform 360ms ease;
  transition: opacity 280ms ease, transform 360ms ease;
  filter: drop-shadow(0 0 3px rgba(96, 165, 250, 0.55));
}

.drawer-theme-toggle__star svg {
  width: 10px;
  height: 10px;
}

.drawer-theme-toggle.is-light .drawer-theme-toggle__star {
  opacity: 1;
  -webkit-animation: themeToggleStarSpin 4.5s linear infinite;
  animation: themeToggleStarSpin 4.5s linear infinite;
}

.drawer-theme-toggle.is-dark .drawer-theme-toggle__star {
  opacity: 0;
  -webkit-transform: scale(0.3) rotate(50deg);
  transform: scale(0.3) rotate(50deg);
}

.drawer-theme-toggle.is-dark .drawer-theme-toggle__icon.moon {
  opacity: 0;
  -webkit-transform: rotate(50deg) scale(0.55);
  transform: rotate(50deg) scale(0.55);
}

.drawer-theme-toggle.is-dark .drawer-theme-toggle__icon.sun {
  opacity: 1;
  -webkit-transform: rotate(0deg) scale(1);
  transform: rotate(0deg) scale(1);
  -webkit-animation: themeToggleSunSpin 6s linear infinite;
  animation: themeToggleSunSpin 6s linear infinite;
}

.drawer-theme-toggle.is-light .drawer-theme-toggle__pulse {
  opacity: 0.55;
  -webkit-animation: themeTogglePulseLight 2.6s ease-in-out infinite;
  animation: themeTogglePulseLight 2.6s ease-in-out infinite;
}

.drawer-theme-toggle.is-dark {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
  color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08), 0 6px 16px rgba(37, 99, 235, 0.12);
}

.drawer-theme-toggle.is-dark .drawer-theme-toggle__orbit {
  display: none;
}

.drawer-theme-toggle.is-dark .drawer-theme-toggle__pulse {
  background: radial-gradient(circle at 50% 45%, rgba(251, 191, 36, 0.32), transparent 70%);
  opacity: 0.7;
  -webkit-animation: themeTogglePulseDark 2.1s ease-in-out infinite;
  animation: themeTogglePulseDark 2.1s ease-in-out infinite;
}

.drawer-theme-toggle.is-switching {
  -webkit-transform: scale(0.94);
  transform: scale(0.94);
}

.drawer-theme-toggle.is-switching .drawer-theme-toggle__icons {
  -webkit-animation: themeToggleSpin 640ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: themeToggleSpin 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-theme-toggle.is-switching .drawer-theme-toggle__icon.sun {
  -webkit-animation: none;
  animation: none;
}

.drawer-theme-toggle.is-switching .drawer-theme-toggle__star {
  -webkit-animation: none;
  animation: none;
}

.drawer-theme-toggle:hover {
  background: rgba(15, 23, 42, 0.08);
}

.drawer-theme-toggle.is-dark:hover {
  background: rgba(59, 130, 246, 0.2);
}

html[data-toolkit-mode='dark'] .drawer-theme-toggle.is-light {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.12);
  color: var(--toolkit-text-sidebar-icon, #cbd5e1);
}

html[data-toolkit-mode='dark'] .drawer-theme-toggle.is-light:hover {
  background: rgba(148, 163, 184, 0.2);
}

html[data-toolkit-mode='dark'] .drawer-theme-toggle.is-dark {
  background: rgba(59, 130, 246, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.42) !important;
  color: #fbbf24 !important;
}

@-webkit-keyframes themeToggleSunSpin {
  to { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}
@keyframes themeToggleSunSpin {
  to { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}

@-webkit-keyframes themeToggleStarSpin {
  0% { -webkit-transform: scale(1) rotate(0deg); transform: scale(1) rotate(0deg); }
  50% { -webkit-transform: scale(1.12) rotate(180deg); transform: scale(1.12) rotate(180deg); }
  100% { -webkit-transform: scale(1) rotate(360deg); transform: scale(1) rotate(360deg); }
}
@keyframes themeToggleStarSpin {
  0% { -webkit-transform: scale(1) rotate(0deg); transform: scale(1) rotate(0deg); }
  50% { -webkit-transform: scale(1.12) rotate(180deg); transform: scale(1.12) rotate(180deg); }
  100% { -webkit-transform: scale(1) rotate(360deg); transform: scale(1) rotate(360deg); }
}

@-webkit-keyframes themeTogglePulseLight {
  0%, 100% { opacity: 0.35; -webkit-transform: scale(0.92); transform: scale(0.92); }
  50% { opacity: 0.7; -webkit-transform: scale(1.05); transform: scale(1.05); }
}
@keyframes themeTogglePulseLight {
  0%, 100% { opacity: 0.35; -webkit-transform: scale(0.92); transform: scale(0.92); }
  50% { opacity: 0.7; -webkit-transform: scale(1.05); transform: scale(1.05); }
}

@-webkit-keyframes themeTogglePulseDark {
  0%, 100% { opacity: 0.45; -webkit-transform: scale(0.9); transform: scale(0.9); }
  50% { opacity: 0.9; -webkit-transform: scale(1.08); transform: scale(1.08); }
}
@keyframes themeTogglePulseDark {
  0%, 100% { opacity: 0.45; -webkit-transform: scale(0.9); transform: scale(0.9); }
  50% { opacity: 0.9; -webkit-transform: scale(1.08); transform: scale(1.08); }
}

@-webkit-keyframes themeToggleSpin {
  0% { -webkit-transform: rotate(0deg) scale(1); transform: rotate(0deg) scale(1); }
  55% { -webkit-transform: rotate(160deg) scale(0.82); transform: rotate(160deg) scale(0.82); }
  100% { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}
@keyframes themeToggleSpin {
  0% { -webkit-transform: rotate(0deg) scale(1); transform: rotate(0deg) scale(1); }
  55% { -webkit-transform: rotate(160deg) scale(0.82); transform: rotate(160deg) scale(0.82); }
  100% { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}

/* Splash de cambio claro ↔ oscuro */
.toolkit-mode-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  pointer-events: all;
  opacity: 0;
  -webkit-transition: opacity 380ms ease;
  transition: opacity 380ms ease;
}

.toolkit-mode-splash.is-visible {
  opacity: 1;
}

.toolkit-mode-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
  -webkit-transition-duration: 420ms;
  transition-duration: 420ms;
}

.toolkit-mode-splash__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(37, 99, 235, 0.18), transparent 55%),
    rgba(248, 250, 252, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__veil {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(251, 191, 36, 0.14), transparent 52%),
    rgba(2, 6, 23, 0.82);
}

.toolkit-mode-splash__orbits {
  position: absolute;
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  pointer-events: none;
}

.toolkit-mode-splash__ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 50%;
  display: block;
  -webkit-animation: modeSplashSpin 8s linear infinite;
  animation: modeSplashSpin 8s linear infinite;
}

.toolkit-mode-splash__ring.r2 {
  inset: 0;
  border-color: rgba(15, 23, 42, 0.08);
  border-top-color: rgba(37, 99, 235, 0.45);
  border-left-color: transparent;
  -webkit-animation-duration: 5.2s;
  animation-duration: 5.2s;
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__ring {
  border-color: rgba(148, 163, 184, 0.16);
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__ring.r2 {
  border-top-color: rgba(251, 191, 36, 0.55);
}

.toolkit-mode-splash__spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.7);
  -webkit-animation: modeSplashSpark 1.8s ease-in-out infinite;
  animation: modeSplashSpark 1.8s ease-in-out infinite;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__spark {
  background: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.75);
}

.toolkit-mode-splash__spark.s1 { top: 18%; left: 22%; -webkit-animation-delay: 0s; animation-delay: 0s; }
.toolkit-mode-splash__spark.s2 { top: 64%; right: 18%; -webkit-animation-delay: 0.35s; animation-delay: 0.35s; }
.toolkit-mode-splash__spark.s3 { bottom: 16%; left: 46%; -webkit-animation-delay: 0.7s; animation-delay: 0.7s; }

.toolkit-mode-splash__card {
  position: relative;
  z-index: 1;
  width: min(86vw, 320px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  text-align: center;
  -webkit-transform: translateY(12px) scale(0.96);
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  -webkit-transition: opacity 360ms ease, -webkit-transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 360ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toolkit-mode-splash.is-visible .toolkit-mode-splash__card {
  opacity: 1;
  -webkit-transform: translateY(0) scale(1);
  transform: translateY(0) scale(1);
}

.toolkit-mode-splash.is-leaving .toolkit-mode-splash__card {
  opacity: 0;
  -webkit-transform: translateY(-8px) scale(0.98);
  transform: translateY(-8px) scale(0.98);
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: var(--toolkit-panel-border, #e2e8f0);
}

.toolkit-mode-splash__planet {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe, #eff6ff 55%, #fff);
  box-shadow: inset 0 -6px 16px rgba(37, 99, 235, 0.12);
  overflow: hidden;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__planet {
  background: linear-gradient(145deg, #0f172a, #1e293b 55%, #334155);
  box-shadow: inset 0 -6px 16px rgba(251, 191, 36, 0.12), 0 0 24px rgba(251, 191, 36, 0.18);
}

.toolkit-mode-splash__icon {
  position: absolute;
  inset: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #1d4ed8;
  -webkit-transition: opacity 420ms ease, -webkit-transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toolkit-mode-splash__icon svg {
  width: 34px;
  height: 34px;
}

.toolkit-mode-splash.is-light .toolkit-mode-splash__icon.moon {
  opacity: 0;
  -webkit-transform: rotate(70deg) scale(0.4);
  transform: rotate(70deg) scale(0.4);
}

.toolkit-mode-splash.is-light .toolkit-mode-splash__icon.sun {
  opacity: 1;
  color: #f59e0b;
  -webkit-transform: rotate(0) scale(1);
  transform: rotate(0) scale(1);
  -webkit-animation: modeSplashSunSpin 2.4s linear infinite;
  animation: modeSplashSunSpin 2.4s linear infinite;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__icon.moon {
  opacity: 1;
  color: #93c5fd;
  -webkit-transform: rotate(0) scale(1);
  transform: rotate(0) scale(1);
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__icon.sun {
  opacity: 0;
  -webkit-transform: rotate(-70deg) scale(0.4);
  transform: rotate(-70deg) scale(0.4);
}

.toolkit-mode-splash__glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25), transparent 62%);
  pointer-events: none;
  -webkit-animation: modeSplashGlow 1.6s ease-in-out infinite;
  animation: modeSplashGlow 1.6s ease-in-out infinite;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__glow {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.28), transparent 62%);
}

.toolkit-mode-splash__card strong {
  display: block;
  margin: 0 0 6px;
  color:var(--toolkit-text-title, #0f172a);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__card strong {
  color: #f8fafc;
}

.toolkit-mode-splash__card p {
  margin: 0 0 16px;
  color:var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  line-height: 1.4;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__card p {
  color:var(--toolkit-text-muted, #94a3b8);
}

.toolkit-mode-splash__bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__bar {
  background: rgba(148, 163, 184, 0.18);
}

.toolkit-mode-splash__bar > i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  -webkit-animation: modeSplashBar 1.05s ease-in-out infinite;
  animation: modeSplashBar 1.05s ease-in-out infinite;
}

.toolkit-mode-splash.is-dark .toolkit-mode-splash__bar > i {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

@-webkit-keyframes modeSplashSpin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes modeSplashSpin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@-webkit-keyframes modeSplashSpark {
  0%, 100% { opacity: 0.25; -webkit-transform: scale(0.7); transform: scale(0.7); }
  50% { opacity: 1; -webkit-transform: scale(1.15); transform: scale(1.15); }
}
@keyframes modeSplashSpark {
  0%, 100% { opacity: 0.25; -webkit-transform: scale(0.7); transform: scale(0.7); }
  50% { opacity: 1; -webkit-transform: scale(1.15); transform: scale(1.15); }
}

@-webkit-keyframes modeSplashGlow {
  0%, 100% { opacity: 0.45; -webkit-transform: scale(0.92); transform: scale(0.92); }
  50% { opacity: 1; -webkit-transform: scale(1.08); transform: scale(1.08); }
}
@keyframes modeSplashGlow {
  0%, 100% { opacity: 0.45; -webkit-transform: scale(0.92); transform: scale(0.92); }
  50% { opacity: 1; -webkit-transform: scale(1.08); transform: scale(1.08); }
}

@-webkit-keyframes modeSplashSunSpin {
  to { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}
@keyframes modeSplashSunSpin {
  to { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); }
}

@-webkit-keyframes modeSplashBar {
  0% { -webkit-transform: translateX(-120%); transform: translateX(-120%); }
  100% { -webkit-transform: translateX(280%); transform: translateX(280%); }
}
@keyframes modeSplashBar {
  0% { -webkit-transform: translateX(-120%); transform: translateX(-120%); }
  100% { -webkit-transform: translateX(280%); transform: translateX(280%); }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-theme-toggle__orbit,
  .drawer-theme-toggle__pulse,
  .drawer-theme-toggle.is-dark .drawer-theme-toggle__icon.sun,
  .drawer-theme-toggle.is-light .drawer-theme-toggle__star,
  .drawer-theme-toggle.is-switching .drawer-theme-toggle__icons,
  .toolkit-mode-splash__ring,
  .toolkit-mode-splash__spark,
  .toolkit-mode-splash__glow,
  .toolkit-mode-splash__bar > i,
  .toolkit-mode-splash.is-dark .toolkit-mode-splash__icon.sun,
  .toolkit-mode-splash.is-light .toolkit-mode-splash__icon.sun {
    -webkit-animation: none !important;
    animation: none !important;
  }

  .drawer-theme-toggle__icon,
  .toolkit-mode-splash,
  .toolkit-mode-splash__card,
  .toolkit-mode-splash__icon {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

.drawer-profile-link div {
  min-width: 0;
}

.drawer-profile-link strong,
.drawer-profile-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-profile-link small {
  max-width: 190px;
  margin-top: 2px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 10px;
}

.drawer-logout {
  min-height: 42px;
  margin-top: 4px;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.drawer-logout svg {
  margin-right: 7px;
}

.welcome-card,
.apps-section {
  width: calc(100% - 32px);
  max-width: 880px;
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.08);
}

.toolkit-home-content {
  width: calc(100% - 24px);
  max-width: 880px;
  margin: 14px auto 0;
}

.welcome-block {
  padding: 10px 2px 8px;
}

.welcome-block p {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 20px;
  font-weight: 300;
}

.welcome-block p strong {
  font-weight: 600;
}

.welcome-line {
  width: 100%;
  height: 4px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: -webkit-linear-gradient(left, #020617, #2563eb, #3b82f6, #172554);
  background: linear-gradient(to right, #020617, #2563eb, #3b82f6, #172554);
  -webkit-transform-origin: left center;
  transform-origin: left center;
  -webkit-animation: lineReveal 820ms 100ms ease-out both;
  animation: lineReveal 820ms 100ms ease-out both;
}

.welcome-block h1 {
  margin: 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 28px;
  letter-spacing: -0.6px;
}

.weather-card,
.day-widget {
  margin-top: 10px;
  border: 1px solid var(--toolkit-panel-border, rgba(15, 23, 42, 0.08));
  border-radius: 16px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.94));
  box-shadow: var(--toolkit-panel-shadow, 0 4px 16px rgba(15, 23, 42, 0.06));
  color: var(--toolkit-text-home-weather, #0f172a);
}

.weather-card {
  min-height: 84px;
  padding: 14px 18px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.weather-icon {
  margin-right: 16px;
  font-size: 42px;
}

.weather-icon svg {
  width: 42px;
  height: 42px;
  color: #f59e0b;
}

.weather-card strong {
  color: var(--toolkit-text-home-weather, #0f172a);
  font-size: 26px;
}

.weather-card p {
  margin: 2px 0 0;
  color: var(--toolkit-text-home-weather-muted, #64748b);
  font-size: 13px;
}

.day-widget {
  overflow: hidden;
}

.day-widget-header {
  min-height: 66px;
  padding: 12px 14px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  background: -webkit-linear-gradient(left, #002569, #1d4ed8);
  background: linear-gradient(to right, #002569, #1d4ed8);
  color: #fff;
}

.day-widget-icon {
  margin-right: 12px;
  font-size: 28px;
}

.day-widget-icon svg {
  width: 29px;
  height: 29px;
}

.day-widget-header h2,
.day-widget-header p {
  margin: 0;
}

.day-widget-header h2 {
  font-size: 17px;
}

.day-widget-header p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.day-widget-body {
  padding: 12px;
}

.day-group {
  margin-bottom: 10px;
  padding: 10px;
  border-left: 3px solid var(--toolkit-blue, #2563eb);
  border-radius: 8px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #eff6ff));
}

.day-group:last-child {
  margin-bottom: 0;
}

.day-group strong {
  color: var(--toolkit-blue, #1d4ed8);
  font-size: 13px;
}

.day-group p {
  margin: 5px 0 0;
  color: var(--toolkit-text-home-widget, #334155);
  font-size: 13px;
  line-height: 18px;
}

.empty-widget {
  margin: 0;
  padding: 22px 14px;
  color: var(--toolkit-text-home-widget-muted, #64748b);
  font-size: 13px;
  text-align: center;
}

.direct-section {
  margin-top: 20px;
}

.direct-section > h2 {
  margin: 0 0 12px;
  color: var(--toolkit-text-body, #334155);
  font-size: 21px;
  font-weight: 300;
}

.direct-grid {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.direct-tile {
  width: 50%;
  min-width: 0;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--toolkit-text-body, #334155);
}

.direct-tile span {
  width: 66px;
  height: 66px;
  margin: 0 auto 7px;
  border-radius: 15px;
  background: -webkit-linear-gradient(135deg, #2563eb, #002569);
  background: linear-gradient(135deg, #2563eb, #002569);
  color: #fff;
  font-size: 30px;
  line-height: 66px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 37, 105, 0.25);
  -webkit-transition: -webkit-transform 160ms ease, box-shadow 160ms ease;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.direct-tile:active span {
  -webkit-transform: scale(0.92);
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(0, 37, 105, 0.2);
}

.direct-tile span svg {
  width: 31px;
  height: 31px;
  margin-top: 17px;
}

.direct-tile small {
  display: block;
  font-size: 12px;
}

.module-list {
  margin-top: 14px;
}

.module-home-card {
  min-height: 210px;
  margin-top: 12px;
  padding: 22px 18px;
  border-radius: 16px;
  color: #fff;
  text-align: center;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 37, 105, 0.22);
}

.module-color-0 { background: -webkit-linear-gradient(135deg, #1d4ed8, #002569); background: linear-gradient(135deg, #1d4ed8, #002569); }
.module-color-1 { background: -webkit-linear-gradient(135deg, #2563eb, #1e3a8a); background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.module-color-2 { background: -webkit-linear-gradient(135deg, #1e40af, #002569); background: linear-gradient(135deg, #1e40af, #002569); }
.module-color-3 { background: -webkit-linear-gradient(135deg, #3b82f6, #1e3a8a); background: linear-gradient(135deg, #3b82f6, #1e3a8a); }

.module-home-card h2 {
  margin: 0;
  font-size: 25px;
}

.module-home-card p {
  margin: 12px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 20px;
}

.module-home-card button {
  width: 140px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}

.module-home-card button:active {
  -webkit-transform: scale(0.96);
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.22);
}

@-webkit-keyframes screenFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes screenFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@-webkit-keyframes cardEnter {
  from { opacity: 0; -webkit-transform: translateY(18px); transform: translateY(18px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes cardEnter {
  from { opacity: 0; -webkit-transform: translateY(18px); transform: translateY(18px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@-webkit-keyframes cardEnterRight {
  from { opacity: 0; -webkit-transform: translateX(22px) scale(0.96); transform: translateX(22px) scale(0.96); }
  to { opacity: 1; -webkit-transform: translateX(0) scale(1); transform: translateX(0) scale(1); }
}

@keyframes cardEnterRight {
  from { opacity: 0; -webkit-transform: translateX(22px) scale(0.96); transform: translateX(22px) scale(0.96); }
  to { opacity: 1; -webkit-transform: translateX(0) scale(1); transform: translateX(0) scale(1); }
}

@-webkit-keyframes drawerEnter {
  from { -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); }
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

@keyframes drawerEnter {
  from { -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); }
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

@-webkit-keyframes moduleHeaderEnter {
  from { opacity: 0; -webkit-transform: translateX(-28px); transform: translateX(-28px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@keyframes moduleHeaderEnter {
  from { opacity: 0; -webkit-transform: translateX(-28px); transform: translateX(-28px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@-webkit-keyframes lineReveal {
  from { -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@keyframes lineReveal {
  from { -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .home-screen-enter,
  .animated-card,
  .home-drawer,
  .module-header-title {
    opacity: 1;
    -webkit-animation: none;
    animation: none;
  }
}

.eyebrow {
  margin: 0;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.welcome-card h1 {
  margin: 8px 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 28px;
}

.welcome-card > p:last-of-type {
  margin: 0;
  color: var(--toolkit-text-muted, #64748b);
}

.profile-grid {
  margin: 22px 0 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.profile-grid > div {
  width: 50%;
  padding: 10px;
}

.profile-grid dt {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.profile-grid dd {
  margin: 4px 0 0;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

.apps-section h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.apps-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.apps-grid li {
  width: calc(50% - 10px);
  min-height: 48px;
  margin: 5px;
  padding: 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
  color: #1e40af;
  font-weight: 700;
}

@media (max-width: 767px) {
  .profile-grid > div,
  .apps-grid li {
    width: 100%;
  }

}

/* Shell modular y componentes DOM compatibles con Safari 12.1 */
.module-page {
  width: calc(100% - 24px);
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

.module-title {
  min-height: 72px;
  margin-bottom: 14px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.module-title p,
.module-title h1 {
  margin: 0;
}

.module-title p {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
}

.module-title h1 {
  margin-top: 3px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 28px;
}

.segmented-tabs {
  margin: 0 -2px 16px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.segmented-tabs button {
  min-height: 42px;
  margin: 0 2px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--toolkit-text-body, #475569);
  font-weight: 700;
}

.segmented-tabs button.active {
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 2px 7px rgba(30, 58, 138, 0.22);
}

.async-state {
  min-height: 110px;
  padding: 28px 16px;
  border-radius: 12px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.72));
  color: var(--toolkit-text-muted, #64748b);
  text-align: center;
}

.async-state button,
.error-boundary button {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: #1e3a8a;
  color: #fff;
}

.spinner.dark {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  border-width: 3px;
  border-color: rgba(30, 58, 138, 0.2);
  border-top-color: #1e3a8a;
}

.data-table-wrap {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.8));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: var(--toolkit-text-body, #475569);
  font-size: 11px;
  text-transform: uppercase;
}

.data-table tbody tr:active {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
}

.ticket-unread-badge {
  display: inline-block;
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 12px;
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10050;
  padding: 16px;
  background: rgba(15, 23, 42, 0.48);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.app-modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.96));
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.3);
}

.app-modal.wide {
  max-width: 840px;
}

.app-modal > header {
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.app-modal h2 { margin: 0; font-size: 19px; }
.app-modal > header button { width: 42px; min-height: 42px; border: 0; border-radius: 10px; font-size: 26px; }
.app-modal-body { max-height: calc(100vh - 105px); padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.error-boundary {
  max-width: 540px;
  margin: 80px auto;
  padding: 24px;
  border-radius: 16px;
  background: var(--toolkit-panel-bg, #fff);
  text-align: center;
}

.profile-card,
.settings-card,
.module-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.82));
}

.profile-avatar {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 68px;
  text-align: center;
}

.profile-field { padding: 9px 0; border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0); }
.profile-field small, .profile-field strong { display: block; }
.profile-field small { margin-bottom: 3px; color: var(--toolkit-text-muted, #64748b); }
.toggle-row { min-height: 48px; border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0); display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; }
.toggle-row input { width: 24px; height: 24px; }
.danger-button { width: 100%; min-height: 46px; border: 0; border-radius: 11px; background: #fee2e2; color: #b91c1c; font-weight: 800; }

.messages-panel {
  min-height: 500px;
  background: var(--toolkit-surface, #f8fafc);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.messages-panel.full-page { min-height: calc(100vh - 70px); }
.message-users { width: 38%; min-width: 250px; border-right: 1px solid var(--toolkit-panel-border, #e2e8f0); background: var(--toolkit-panel-bg, #fff); }
.message-users > header, .conversation > header { min-height: 58px; padding: 8px 12px; border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0); display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; }
.message-users h2 { margin: 0; font-size: 19px; }
.message-users ul { margin: 0; padding: 0; list-style: none; }
.message-users li button { width: 100%; min-height: 58px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--toolkit-panel-border, #f1f5f9); background: transparent; text-align: left; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.message-users li button > span:nth-child(2) { min-width: 0; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.message-users strong, .message-users small, .conversation header strong, .conversation header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-users small, .conversation header small { margin-top: 2px; color: var(--toolkit-text-muted, #64748b); font-size: 11px; }
.message-users b { min-width: 22px; height: 22px; border-radius: 12px; background: #ef4444; color: #fff; line-height: 22px; text-align: center; }
.presence-dot { width: 10px; min-width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; background: #94a3b8; }
.presence-dot.online { background: #22c55e; }
.conversation { min-width: 0; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; flex-direction: column; }
.conversation-back { width: 42px; min-height: 42px; margin-right: 8px; border: 0; border-radius: 9px; font-size: 29px; }
.message-list { padding: 12px; overflow-y: auto; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.message-list article { width: 80%; margin: 0 0 9px; padding: 9px 11px; border-radius: 12px 12px 12px 3px; background: var(--toolkit-panel-bg, #fff); box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08); }
.message-list article.mine { margin-left: auto; border-radius: 12px 12px 3px 12px; background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 22%, var(--toolkit-panel-bg, #fff)); }
.message-list p { margin: 0 0 4px; white-space: pre-wrap; }
.message-composer { padding: 9px; border-top: 1px solid var(--toolkit-panel-border, #e2e8f0); background: var(--toolkit-panel-bg, #fff); display: -webkit-box; display: -webkit-flex; display: flex; }
.message-composer input[type=text], .message-composer > input { min-width: 0; min-height: 44px; margin: 0 7px; padding: 8px 11px; border: 1px solid var(--toolkit-panel-border, #cbd5e1); border-radius: 22px; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.message-composer button { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 22px; background: #1e3a8a; color: #fff; font-weight: 700; }
.file-button { width: 44px; height: 44px; border-radius: 50%; background: var(--toolkit-panel-border, #e2e8f0); font-size: 27px; line-height: 42px; text-align: center; overflow: hidden; }
.file-button input { position: absolute; left: -9999px; }
.conversation-empty { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; padding: 80px 20px; color: var(--toolkit-text-muted, #64748b); text-align: center; }

@media (max-width: 600px) {
  .message-users { width: 100%; min-width: 0; }
  .message-users.conversation-open { display: none; }
  .conversation-empty { display: none; }
}

.module-screen {
  width: calc(100% - 24px);
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

.module-screen > h1,
.module-page > h1 {
  margin: 8px 0 14px;
  color: var(--toolkit-text-body, #0f172a);
  font-size: 28px;
}

.module-toolbar,
.button-row {
  margin-bottom: 12px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.module-toolbar > *,
.button-row > * {
  margin-right: 8px;
  margin-bottom: 6px;
}

.module-toolbar h2 {
  margin-top: 0;
  margin-bottom: 6px;
  margin-right: auto;
}

.module-toolbar input,
.button-row input,
.module-form input,
.module-form select,
.module-form textarea,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--toolkit-panel-border, #cbd5e1);
  border-radius: 9px;
  background: var(--toolkit-panel-bg, #fff);
  color: var(--toolkit-text-body, #0f172a);
  font-size: 16px;
}

.module-toolbar input {
  width: auto;
  min-width: 190px;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.module-toolbar button,
.button-row button,
.module-form button,
.module-card button,
.permission-denied button {
  min-height: 42px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
}

.button-row button.active {
  background: #16a34a;
}

.module-form {
  padding: 14px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 13px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.86));
}

.module-form h2,
.module-form h3 {
  margin-top: 0;
}

.form-field {
  min-width: 0;
  margin-bottom: 11px;
  display: block;
}

.form-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--toolkit-text-body, #475569);
  font-size: 12px;
  font-weight: 700;
}

.module-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.84));
}

.module-card > strong,
.module-card > span {
  display: block;
  margin-bottom: 5px;
}

.stats-grid {
  margin: 0 -5px 12px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.stat-card {
  min-width: 120px;
  margin: 5px;
  padding: 13px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.85));
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  color: #1e3a8a;
  font-size: 23px;
}

.stat-card span {
  margin-top: 3px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  text-transform: capitalize;
}

.signature-field canvas {
  width: 100%;
  max-width: 560px;
  height: 190px;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  touch-action: none;
}

.file-action {
  display: inline-block;
  min-height: 42px;
  margin-right: 8px;
  margin-bottom: 8px;
  padding: 10px 13px;
  border-radius: 9px;
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.file-action input {
  position: absolute;
  left: -9999px;
}

.permission-denied {
  padding-top: 80px;
  text-align: center;
}

@media (max-width: 600px) {
  .module-toolbar {
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    align-items: stretch;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }
  .module-toolbar > *,
  .module-toolbar input {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 390px) {
  .login-center {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-card-mobile {
    padding: 22px 18px;
  }

  .login-hello-compact {
    max-width: 260px;
    margin-bottom: 12px;
  }

  .login-subtitle {
    margin-bottom: 18px;
  }

  .welcome-card,
  .apps-section {
    width: calc(100% - 16px);
    margin-top: 12px;
    padding: 18px;
  }
}

/* ===== Desktop shell / sidebar fija (solo viewport ≥769px) ===== */
.toolkit-shell {
  min-height: var(--app-height, 100vh);
  background: var(--toolkit-shell-bg, #ececec);
}

@media (min-width: 769px) {
  .toolkit-shell.desktop {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
  }

  .toolkit-shell.desktop .module-shell {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    margin: 10px 10px 10px 0;
    border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.06));
    border-radius: 10px;
    background-color: var(--toolkit-panel-bg, #fff);
    overflow: hidden;
  }
}

.toolkit-sidebar.desktop {
  width: 290px;
  min-width: 290px;
  margin: 10px 0 10px 10px;
  padding: 0 13px 14px;
  border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  background: var(--toolkit-sidebar-glass, rgba(255, 255, 255, 0.72));
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--toolkit-chrome-shadow);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  overflow: hidden;
}

.toolkit-sidebar.desktop.collapsed {
  width: 84px;
  min-width: 84px;
}

.toolkit-sidebar.drawer {
  width: 290px;
  max-width: 290px;
  height: calc(100% - 20px);
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  padding: 0 13px 14px;
  border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  background: var(--toolkit-sidebar-glass, rgba(255, 255, 255, 0.58));
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--toolkit-chrome-shadow);
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

/* El wrapper del portal/backdrop debe transmitir altura al drawer. */
.drawer-backdrop > div {
  height: 100%;
  max-height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.toolkit-sidebar.drawer .sidebar-panel,
.toolkit-sidebar.drawer .sidebar-panel-content {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
  min-height: 0;
  height: auto;
  max-height: 100%;
  overflow: hidden;
}

/* Lista de módulos: scroll interno (en desktop ya tenía flex:1; en drawer faltaba). */
.toolkit-sidebar.drawer .module-nav {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
  min-height: 0;
  margin-top: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.toolkit-sidebar.drawer .drawer-toolbar,
.toolkit-sidebar.drawer .drawer-divider,
.toolkit-sidebar.drawer .drawer-footer {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* El spacer empujaba el footer pero impedía que module-nav se acotara. */
.toolkit-sidebar.drawer .drawer-spacer {
  display: none;
}

.sidebar-collapse-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--toolkit-text-body, #334155);
  font-size: 18px;
}

.module-nav button strong {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  width: 100%;
}

.nav-badge {
  margin-left: 8px;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.nav-badge.collapsed {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0 4px;
  font-size: 9px;
  line-height: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95);
}

/* Distintivo "módulo nuevo": aura dorada a todo el selectable del menú */
.toolkit-sidebar .module-nav button.is-new-module {
  position: relative;
  overflow: visible;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.42), rgba(251, 191, 36, 0.18) 48%, rgba(245, 158, 11, 0.28));
  box-shadow:
    inset 0 0 0 1.5px rgba(217, 119, 6, 0.55),
    0 0 14px rgba(245, 158, 11, 0.28),
    0 6px 16px rgba(180, 83, 9, 0.12);
  animation: nav-new-module-pulse 2.6s ease-in-out infinite;
}

.toolkit-sidebar .module-nav button.is-new-module:hover {
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.55), rgba(251, 191, 36, 0.28) 48%, rgba(245, 158, 11, 0.38));
}

.toolkit-sidebar .module-nav button.is-new-module.selected {
  background: linear-gradient(135deg, rgba(252, 211, 77, 0.62), rgba(245, 158, 11, 0.34) 50%, rgba(217, 119, 6, 0.4));
  box-shadow:
    inset 0 0 0 1.5px rgba(180, 83, 9, 0.7),
    0 0 18px rgba(245, 158, 11, 0.38),
    0 8px 18px rgba(180, 83, 9, 0.16);
}

.toolkit-sidebar .module-nav button.is-new-module > .module-nav-icon,
.toolkit-sidebar .module-nav button.is-new-module > strong {
  position: relative;
  z-index: 2;
}

/* Anclado al selectable completo (no al span del icono). */
.toolkit-sidebar .module-nav button.is-new-module > .nav-new-corner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-style: normal;
  line-height: 1;
  pointer-events: none;
  transform: rotate(30deg);
  transform-origin: center center;
  filter: drop-shadow(0 3px 5px rgba(127, 29, 29, .38));
}

.toolkit-sidebar .module-nav button.is-new-module > .nav-new-corner::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, #ff4d4f, #dc2626 58%, #991b1b);
  clip-path: polygon(
    50% 0%, 59% 18%, 77% 7%, 78% 27%, 100% 28%,
    84% 46%, 98% 61%, 76% 64%, 76% 89%, 57% 76%,
    45% 100%, 37% 77%, 14% 89%, 20% 64%, 0% 54%,
    19% 40%, 4% 22%, 29% 24%, 32% 4%
  );
  content: "";
  animation: nav-new-pop 1.8s ease-in-out infinite;
}

.toolkit-sidebar .module-nav button.is-new-module > .nav-new-corner::after {
  position: absolute;
  inset: 7px 10px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(127, 29, 29, .34);
  content: "";
}

.toolkit-sidebar .module-nav button.is-new-module > .nav-new-corner b {
  position: relative;
  z-index: 1;
  color: #fff !important;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(69, 10, 10, .8);
}

.toolkit-sidebar.desktop.collapsed .module-nav button.is-new-module > .nav-new-corner {
  top: 0;
  right: 0;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 25px;
  min-height: 25px;
}

.toolkit-sidebar.desktop.collapsed .module-nav button.is-new-module > .nav-new-corner b {
  font-size: 7px;
}

/* Reserva espacio para que la etiqueta no pase por debajo del distintivo. */
.toolkit-sidebar:not(.collapsed) .module-nav button.is-new-module > strong {
  padding-right: 38px;
}

.nav-new-aura {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.nav-new-aura__sheen {
  position: absolute;
  top: -40%;
  left: -60%;
  width: 55%;
  height: 180%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(253, 230, 138, 0.35) 58%,
    transparent 78%
  );
  transform: skewX(-18deg);
  animation: nav-new-sheen 2.8s ease-in-out infinite;
}

.nav-new-aura__ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 0 18px rgba(251, 191, 36, 0.35);
  animation: nav-new-ring 2.6s ease-in-out infinite;
}

.nav-new-aura__spark {
  position: absolute;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow:
    0 0 5px 1px rgba(255, 255, 255, 0.95),
    0 0 12px 3px rgba(251, 191, 36, 0.9),
    0 0 18px 5px rgba(245, 158, 11, 0.45);
  animation: nav-new-spark 2s ease-in-out infinite;
}

.nav-new-aura__spark.s1 { top: 10%; left: 8%; animation-delay: 0s; }
.nav-new-aura__spark.s2 { top: 18%; right: 10%; animation-delay: .28s; }
.nav-new-aura__spark.s3 { bottom: 14%; left: 18%; animation-delay: .55s; }
.nav-new-aura__spark.s4 { bottom: 12%; right: 14%; animation-delay: .85s; }
.nav-new-aura__spark.s5 { top: 48%; left: 42%; width: 3px; height: 3px; animation-delay: 1.15s; }
.nav-new-aura__spark.s6 { top: 6%; left: 58%; width: 4px; height: 4px; animation-delay: 1.45s; }

@keyframes nav-new-module-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1.5px rgba(217, 119, 6, 0.5),
      0 0 10px rgba(245, 158, 11, 0.22),
      0 4px 12px rgba(180, 83, 9, 0.1);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 1.5px rgba(245, 158, 11, 0.85),
      0 0 22px rgba(251, 191, 36, 0.48),
      0 8px 20px rgba(180, 83, 9, 0.18);
    filter: brightness(1.06);
  }
}

@keyframes nav-new-sheen {
  0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  12% { opacity: .95; }
  45% { transform: translateX(280%) skewX(-18deg); opacity: .7; }
  55%, 100% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}

@keyframes nav-new-ring {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@keyframes nav-new-spark {
  0%, 100% {
    opacity: 0;
    transform: scale(.35);
  }
  25% {
    opacity: 1;
    transform: scale(1.35);
  }
  55% {
    opacity: .7;
    transform: scale(.85);
  }
}

@keyframes nav-new-pop {
  0%, 100% { transform: scale(.94); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .toolkit-sidebar .module-nav button.is-new-module,
  .nav-new-corner::before,
  .nav-new-aura__sheen,
  .nav-new-aura__ring,
  .nav-new-aura__spark {
    animation: none !important;
  }
}

.module-nav button > span,
.module-nav button > .module-nav-icon {
  position: relative;
  overflow: visible;
}

.toolkit-shell.desktop .header-icon-button {
  display: none;
}

.toolkit-shell.desktop .header-school-logo {
  display: block;
}

.toolkit-shell.desktop .module-header-title {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

@media (max-width: 768px) {
  /* Blindaje CSS: aunque haya desfase de clase JS, no forzar chrome de escritorio */
  .toolkit-shell.desktop .module-shell,
  .toolkit-shell.mobile .module-shell {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .home-editable-grid {
    display: block !important;
  }

  .home-editable-block,
  .home-editable-block.wide,
  .home-editable-block.block-welcome,
  .home-editable-block.block-weather,
  .home-editable-block.block-menu,
  .home-editable-block.block-circular,
  .home-editable-block.block-direct,
  .home-editable-block.block-modules {
    width: 100% !important;
    margin: 0 0 10px !important;
    grid-column: auto !important;
  }
}

/* ===== Notificaciones / búsqueda / toasts ===== */
.notifications-bell,
.global-search {
  position: relative;
}

.notifications-bell > button {
  width: 40px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.global-search {
  position: relative;
  z-index: 1;
}

.global-search.is-open {
  z-index: 70;
  width: auto;
  max-width: none;
}

.global-search-field {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 0;
  width: 40px;
  max-width: 40px;
  min-height: 34px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  box-sizing: border-box;
  -webkit-transition:
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease,
    border-color 240ms ease,
    gap 280ms ease;
  transition:
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease,
    border-color 240ms ease,
    gap 280ms ease;
}

.global-search.is-open .global-search-field {
  width: min(320px, calc(100vw - 140px));
  max-width: min(320px, calc(100vw - 140px));
  gap: 6px;
  padding: 0 6px 0 4px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.global-search-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  min-width: 40px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #fff !important;
  flex: 0 0 auto;
  cursor: pointer;
}

.global-search-icon-btn svg {
  width: 22px;
  height: 22px;
}

.global-search-field input {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 0;
  width: 0;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  opacity: 0;
  pointer-events: none;
  -webkit-transition:
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease 60ms,
    width 320ms cubic-bezier(0.22, 1, 0.36, 1);
  transition:
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease 60ms,
    width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.global-search.is-open .global-search-field input {
  max-width: 280px;
  width: auto;
  opacity: 1;
  pointer-events: auto;
}

.global-search-field input::-webkit-search-cancel-button {
  display: none;
}

.global-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  opacity: 1;
}

.global-search-field input:-webkit-autofill,
.global-search-field input:-webkit-autofill:hover,
.global-search-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 99999s ease-in-out 0s;
}

.global-search-close {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px !important;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  -webkit-transition:
    max-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    min-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease 80ms;
  transition:
    max-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    min-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease 80ms;
}

.global-search.is-open .global-search-close {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px;
  opacity: 1;
  pointer-events: auto;
}

.global-search-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.notifications-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: #ff453a;
  box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.25);
}

.notifications-bell .notifications-panel,
.global-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, #fff);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  color: var(--toolkit-text-body, #0f172a);
}

.global-search-panel {
  left: 0;
  right: 0;
  width: auto;
  min-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-transform: translateY(-8px) scale(0.98);
  transform: translateY(-8px) scale(0.98);
  -webkit-transform-origin: top right;
  transform-origin: top right;
  -webkit-transition:
    opacity 220ms ease,
    visibility 220ms ease,
    -webkit-transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.global-search-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  -webkit-transform: none;
  transform: none;
}

.notifications-bell .notifications-panel-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--toolkit-panel-border, #e2e8f0);
}

.notifications-bell .notifications-panel-header strong {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.notifications-bell .notifications-count {
  margin-right: 8px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.notifications-bell .notifications-mark-all,
.notifications-bell .notifications-close {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  margin-left: 8px;
}

.notifications-bell .notifications-close {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 22px;
  line-height: 1;
}

.notifications-bell .notifications-filters {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  overflow-x: auto;
  padding: 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.notifications-bell .notifications-filters button {
  margin-right: 8px;
  padding: 6px 10px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 999px;
  background: var(--toolkit-surface, #f8fafc);
  color: var(--toolkit-text-body, #475569);
  white-space: nowrap;
  font-size: 12px;
}

.notifications-bell .notifications-filters button.active {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 22%, var(--toolkit-panel-bg, #fff));
  border-color: #93c5fd;
  color: #1d4ed8;
}

.notifications-bell .notifications-list {
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
  max-height: 48vh;
  overflow-y: auto;
}

.notifications-bell .notifications-list button {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--toolkit-panel-border, #f1f5f9);
  background: transparent;
  text-align: left;
}

.notifications-bell .notifications-list button.unread {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
}

.notifications-bell .notifications-list .kind {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.notifications-bell .notifications-list strong,
.notifications-bell .notifications-list small {
  display: block;
}

.notifications-bell .notifications-list small {
  margin-top: 3px;
  color: var(--toolkit-text-muted, #64748b);
}

.notifications-bell .notifications-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--toolkit-text-muted, #64748b);
}

.global-search-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(50vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
}

.global-search-panel li button {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
}

.global-search-panel li button:hover,
.global-search-panel li button:focus {
  background: var(--toolkit-surface, #f1f5f9);
  -webkit-transform: none;
  transform: none;
}

.global-search-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, #0d9488 20%, var(--toolkit-panel-bg, #fff));
  color: #0f766e;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 36px;
}

.global-search-avatar.has-photo {
  background: var(--toolkit-panel-border, #e2e8f0);
}

.global-search-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.global-search-name {
  display: block;
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--toolkit-text-title, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-empty {
  margin: 0;
  padding: 16px 10px;
  text-align: center;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.ticket-toast-host {
  position: fixed;
  right: 16px;
  top: 78px;
  z-index: 80;
  width: min(340px, calc(100vw - 24px));
}

.ticket-toast {
  position: relative;
  width: 100%;
  margin-top: 10px;
  padding: 14px 36px 14px 14px;
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.ticket-toast strong,
.ticket-toast span {
  display: block;
}

.ticket-toast span {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.92;
}

.ticket-toast i {
  position: absolute;
  top: 8px;
  right: 10px;
  font-style: normal;
  font-size: 20px;
  cursor: pointer;
}

/* ===== Home layout editable ===== */
.home-layout-toolbar {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  margin: 8px 0 4px;
}

.home-layout-toolbar button {
  padding: 7px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.home-editable-grid {
  display: block;
  width: 100%;
  margin: 0;
}

.home-editable-block {
  position: relative;
  width: 100%;
  -webkit-box-flex: initial;
  -webkit-flex: initial;
  flex: initial;
  min-width: 0;
  margin: 0 0 10px;
}

.home-editable-block.editing {
  outline: 2px dashed #93c5fd;
  outline-offset: 2px;
  border-radius: 14px;
}

.home-editable-block .drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  cursor: grab;
}

.home-editable-block.wide {
  width: 100%;
}

/* ===== Forms / org / promotion ===== */
.org-form-grid,
.promo-summary-grid {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.org-form-grid label,
.promo-summary-card {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 180px;
  flex: 1 1 180px;
  margin: 0 10px 10px 0;
}

.promo-summary-card {
  padding: 12px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 12px;
  background: var(--toolkit-surface, #f8fafc);
}

.promo-summary-card strong {
  display: block;
  font-size: 22px;
  color: var(--toolkit-text-body, #0f172a);
}

.promo-summary-card span {
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
}

.adeudos-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: color-mix(in srgb, #10b981 14%, var(--toolkit-panel-bg, #fff));
}

.adeudos-action-bar button {
  margin-right: 8px;
  margin-bottom: 4px;
}

.adeudos-pagination {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-top: 12px;
}

.template-variable-chip {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: color-mix(in srgb, #0d9488 12%, var(--toolkit-panel-bg, #fff));
  color: #0f766e;
  font-size: 12px;
  cursor: pointer;
}

.stats-kpi-grid {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.stats-kpi-card {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 160px;
  flex: 1 1 160px;
  margin: 0 10px 10px 0;
  padding: 14px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 12px;
  background: var(--toolkit-panel-bg, #fff);
}

.stats-kpi-card small {
  color: var(--toolkit-text-muted, #64748b);
}

.stats-kpi-card h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.presence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.presence-dot.online {
  background: #16a34a;
}

.messages-user-list .offline-divider {
  margin: 8px 0;
  padding: 6px 0;
  border-top: 1px solid var(--toolkit-panel-border, #e2e8f0);
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Paridad visual Toolkit web ===== */
:root {
  --toolkit-blue: #2563eb;
  --toolkit-text: #111827;
  --toolkit-muted: #64748b;
  --toolkit-text-body: #111827;
  --toolkit-text-muted: #64748b;
  --toolkit-text-title: #0f172a;
  --toolkit-text-label: #64748b;
  --toolkit-text-card-title: #0f172a;
  --toolkit-text-card-meta: #64748b;
  --toolkit-text-tab: #64748b;
  --toolkit-text-tab-active: #ffffff;
  --toolkit-text-sidebar: #111827;
  --toolkit-text-sidebar-icon: #1f2937;
  --toolkit-text-sidebar-active: #0f172a;
  --toolkit-text-header: #ffffff;
  --toolkit-text-hero: #ffffff;
  --toolkit-text-link: #2563eb;
  --toolkit-text-home-welcome: #111827;
  --toolkit-text-home-weather: #111827;
  --toolkit-text-home-weather-muted: #64748b;
  --toolkit-text-home-widget: #111827;
  --toolkit-text-home-widget-muted: #64748b;
  --toolkit-surface: #f8fafc;
  --toolkit-border: rgba(0, 0, 0, 0.12);
  --toolkit-panel-bg: #ffffff;
  --toolkit-panel-border: var(--toolkit-panel-border, #e2e8f0);
  --toolkit-panel-radius: 17px;
  --toolkit-panel-pad: 14px;
  --toolkit-panel-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  --toolkit-brand-wash: rgba(255, 255, 255, 0.78);
  --toolkit-brand-tile: clamp(220px, 28vmin, 380px);
  --toolkit-danger: #dc2626;
  --toolkit-success: #16a34a;
  --toolkit-font-base: 16px;
  --toolkit-font-title: 24px;
  --toolkit-font-label: 12px;
  --toolkit-font-strong: 700;
  --toolkit-btn-height: 40px;
  --toolkit-btn-radius: 12px;
  --toolkit-card-radius: 16px;
  --toolkit-input-height: 40px;
  --toolkit-tab-height: 48px;
  --toolkit-page-pad-x: 12px;
  --toolkit-page-pad-top: 20px;
  --toolkit-page-pad-bottom: 16px;
  --toolkit-blue-rgb: 37, 99, 235;
  --toolkit-shell-bg: #f8fafc;
  --toolkit-sidebar-glass: rgba(255, 255, 255, 0.58);
  --toolkit-sidebar-hover: rgba(0, 0, 0, 0.04);
  --toolkit-sidebar-selected: rgba(0, 0, 0, 0.07);
  --toolkit-chrome-border: rgba(0, 0, 0, 0.08);
  --toolkit-chrome-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  --toolkit-widget-tint: rgba(255, 255, 255, 0.25);
  --toolkit-widget-shine: inset 2px 2px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 1px 1px rgba(255, 255, 255, 0.5);
  --toolkit-widget-blob: rgba(255, 255, 255, 0.48);
  --toolkit-widget-blob-soft: rgba(255, 255, 255, 0.26);
}

/* Superficie opaca compartida (CAP, RH, Académico, Sistemas, etc.) */
.toolkit-panel {
  padding: var(--toolkit-panel-pad);
  margin: 0 0 12px;
  border: 1px solid var(--toolkit-panel-border);
  border-radius: var(--toolkit-panel-radius);
  background: var(--toolkit-panel-bg);
  box-shadow: var(--toolkit-panel-shadow);
}

/* ===== Puentes de tema: el chrome de módulos usa tokens globales ===== */
html[data-toolkit-theme="custom"] body,
.toolkit-shell {
  color: var(--toolkit-text-body);
  font-size: var(--toolkit-font-base);
}

.toolkit-shell .module-page,
.toolkit-shell .module-screen {
  color: var(--toolkit-text-body) !important;
  font-size: var(--toolkit-font-base);
}

/* Títulos */
.toolkit-shell h1,
.toolkit-shell h2,
.toolkit-shell h3,
.toolkit-shell h4,
.toolkit-shell .module-page > h1,
.toolkit-shell .module-screen > h1,
.toolkit-shell .systems-pending h2,
.toolkit-shell .systems-history h2,
.toolkit-shell .cap-students__title,
.toolkit-shell .academico-section-header h2,
.toolkit-shell .rh-section-heading h2,
.toolkit-shell .colegio-section-card h2,
.toolkit-shell .colegio-section-card h3 {
  color: var(--toolkit-text-title) !important;
}

.toolkit-shell .module-header-title h1 {
  color: var(--toolkit-text-header) !important;
}

/* Texto sobre heroes y encabezados de fondo oscuro */
.toolkit-shell .systems-stats-hero,
.toolkit-shell .systems-stats-hero *,
.toolkit-shell .systems-tests-hero,
.toolkit-shell .systems-tests-hero *,
.toolkit-shell .systems-ticket-hero,
.toolkit-shell .systems-ticket-hero *,
.toolkit-shell .systems-user-hero,
.toolkit-shell .systems-user-hero *,
.toolkit-shell .rh-person-hero,
.toolkit-shell .rh-person-hero *,
.toolkit-shell .colegio-catalog__hero,
.toolkit-shell .colegio-catalog__hero *,
.toolkit-shell .colegio-modal__hero,
.toolkit-shell .colegio-modal__hero *,
.toolkit-shell .colegio-cycle__hero,
.toolkit-shell .colegio-cycle__hero *,
.toolkit-shell .enf-modal__hero,
.toolkit-shell .enf-modal__hero *,
.toolkit-shell .systems-modal > header,
.toolkit-shell .systems-modal > header *,
.toolkit-shell .rh-modal > header,
.toolkit-shell .rh-modal > header * {
  color: var(--toolkit-text-hero) !important;
}

/* Hero institucional: contraste fijo sobre gradiente de marca */
.toolkit-shell .colegio-identity-card,
.toolkit-shell .colegio-identity-card .colegio-logo-copy,
.toolkit-shell .colegio-identity-card .colegio-logo-copy h2,
.toolkit-shell .colegio-identity-card .colegio-logo-copy p,
.toolkit-shell .colegio-identity-card .colegio-logo-copy > span {
  color: var(--toolkit-text-hero, #fff) !important;
}

.toolkit-shell .colegio-identity-card .colegio-logo-copy p {
  color: rgba(255, 255, 255, 0.78) !important;
}

.toolkit-shell .colegio-identity-card .colegio-button--primary,
.toolkit-shell .colegio-identity-card .colegio-button--primary * {
  color: var(--toolkit-blue, #2563eb) !important;
}

.toolkit-shell .colegio-identity-card .colegio-button--danger-outline,
.toolkit-shell .colegio-identity-card .colegio-button--danger-outline * {
  color: #fff !important;
}

/* Botones claros dentro del hero: no heredar texto blanco */
.toolkit-shell .colegio-cycle__hero .colegio-button--light,
.toolkit-shell .colegio-cycle__hero .colegio-button--light *,
.toolkit-shell .colegio-catalog__hero .colegio-button--light,
.toolkit-shell .colegio-catalog__hero .colegio-button--light * {
  color: #0f766e !important;
}

.toolkit-shell .colegio-catalog__hero .colegio-button--primary,
.toolkit-shell .colegio-catalog__hero .colegio-button--primary *,
.toolkit-shell .colegio-cycle__hero .colegio-button--primary,
.toolkit-shell .colegio-cycle__hero .colegio-button--primary * {
  color: #ffffff !important;
}

/* Home: accesos sobre gradiente — contraste según luminancia del fondo */
.toolkit-shell .module-home-card,
.toolkit-shell .module-home-card h2,
.toolkit-shell .module-home-card h2 strong,
.toolkit-shell .module-home-card h2 span,
.toolkit-shell .module-home-card button {
  color: var(--module-card-fg, var(--toolkit-text-hero, #fff)) !important;
  text-shadow: none;
}

.toolkit-shell .module-home-card p {
  color: var(--module-card-muted, rgba(255, 255, 255, 0.9)) !important;
  text-shadow: none;
}

.toolkit-shell .module-home-card button {
  border-color: var(--module-card-btn-border, rgba(255, 255, 255, 0.3)) !important;
  background: var(--module-card-btn-bg, rgba(255, 255, 255, 0.12)) !important;
}

.toolkit-shell .direct-tile span,
.toolkit-shell .direct-tile span svg {
  color: var(--toolkit-text-hero, #fff) !important;
}

/* Labels / muted genérico */
.toolkit-shell label > span,
.toolkit-shell .rh-field > span,
.toolkit-shell .cap-students__field span,
.toolkit-shell .academico-section-header p,
.toolkit-shell .profile-field-row small,
.toolkit-shell small:not([class]) {
  color: var(--toolkit-text-label) !important;
}

.toolkit-shell a {
  color: var(--toolkit-text-link);
}

/* Home / widgets: textos controlados desde Tema global */
.toolkit-shell .welcome-block p,
.toolkit-shell .welcome-block h1,
.toolkit-shell .welcome-block p strong {
  color: var(--toolkit-text-home-welcome) !important;
}

.toolkit-shell .weather-card {
  background: var(--toolkit-panel-bg) !important;
  border-color: var(--toolkit-panel-border) !important;
  box-shadow: var(--toolkit-panel-shadow) !important;
  color: var(--toolkit-text-home-weather) !important;
}

.toolkit-shell .weather-card,
.toolkit-shell .weather-card strong {
  color: var(--toolkit-text-home-weather) !important;
}

.toolkit-shell .weather-temp small,
.toolkit-shell .weather-card p,
.toolkit-shell .weather-card > div > small {
  color: var(--toolkit-text-home-weather-muted) !important;
}

.toolkit-shell .day-widget {
  --widget-text: var(--toolkit-text-home-widget);
  --widget-muted: var(--toolkit-text-home-widget-muted);
  background: var(--toolkit-panel-bg);
  border-color: var(--toolkit-panel-border);
}

.toolkit-shell .menu-day-widget,
.toolkit-shell .circular-day-widget {
  --widget-text: var(--toolkit-text-home-widget);
  --widget-muted: var(--toolkit-text-home-widget-muted);
  --widget-accent: var(--toolkit-text-home-widget-muted);
  background: transparent;
}

.toolkit-shell .day-widget .day-widget-slide strong {
  color: var(--toolkit-text-home-widget) !important;
}

.toolkit-shell .day-widget .day-widget-slide p,
.toolkit-shell .day-widget .empty-widget,
.toolkit-shell .day-widget-chips button:not(.active) {
  color: var(--toolkit-text-home-widget-muted) !important;
}

.toolkit-shell .day-widget-expand,
.toolkit-shell .day-widget-print {
  color: var(--toolkit-text-home-widget) !important;
  border-color: var(--toolkit-panel-border) !important;
  background: color-mix(in srgb, var(--toolkit-panel-bg) 70%, transparent) !important;
}

.toolkit-shell .day-group {
  background: color-mix(in srgb, var(--toolkit-blue) 14%, var(--toolkit-panel-bg)) !important;
  border-left-color: var(--toolkit-blue) !important;
}

.toolkit-shell .day-group strong {
  color: var(--toolkit-blue) !important;
}

.toolkit-shell .day-group p {
  color: var(--toolkit-text-home-widget) !important;
}

/* Tab bars: reglas unificadas al final de styles.css (sección Tab bars globales) */

/* Sidebar izquierda */
.toolkit-shell .module-nav button,
.toolkit-shell .drawer-profile-link,
.toolkit-shell .drawer-logout,
.toolkit-sidebar .module-nav button,
.toolkit-sidebar .drawer-profile-link,
.toolkit-sidebar .drawer-logout {
  color: var(--toolkit-text-sidebar) !important;
}

.toolkit-shell .module-nav button > span,
.toolkit-shell .drawer-profile-link > span,
.toolkit-sidebar .module-nav button > span,
.toolkit-sidebar .drawer-profile-link > span,
.toolkit-shell .module-nav-icon,
.toolkit-sidebar .module-nav-icon {
  color: var(--toolkit-text-sidebar-icon) !important;
}

/* Iconos del menú: outline (fill=none) por stroke; rellenos (IoHome, etc.) por fill */
.toolkit-shell .module-nav button svg,
.toolkit-shell .drawer-profile-link svg,
.toolkit-shell .drawer-logout svg,
.toolkit-sidebar .module-nav button svg,
.toolkit-sidebar .drawer-profile-link svg,
.toolkit-sidebar .drawer-logout svg,
.toolkit-shell .module-nav-icon svg,
.toolkit-sidebar .module-nav-icon svg {
  color: var(--toolkit-text-sidebar-icon) !important;
}

.toolkit-shell .module-nav button svg[fill="none"],
.toolkit-shell .drawer-profile-link svg[fill="none"],
.toolkit-shell .drawer-logout svg[fill="none"],
.toolkit-sidebar .module-nav button svg[fill="none"],
.toolkit-sidebar .drawer-profile-link svg[fill="none"],
.toolkit-sidebar .drawer-logout svg[fill="none"],
.toolkit-shell .module-nav-icon svg[fill="none"],
.toolkit-sidebar .module-nav-icon svg[fill="none"] {
  fill: none !important;
  stroke: currentColor !important;
}

.toolkit-shell .module-nav button svg[fill="none"] *,
.toolkit-shell .drawer-profile-link svg[fill="none"] *,
.toolkit-shell .drawer-logout svg[fill="none"] *,
.toolkit-sidebar .module-nav button svg[fill="none"] *,
.toolkit-sidebar .drawer-profile-link svg[fill="none"] *,
.toolkit-sidebar .drawer-logout svg[fill="none"] *,
.toolkit-shell .module-nav-icon svg[fill="none"] *,
.toolkit-sidebar .module-nav-icon svg[fill="none"] * {
  stroke: currentColor !important;
}

.toolkit-shell .module-nav button svg:not([fill="none"]),
.toolkit-shell .drawer-profile-link svg:not([fill="none"]),
.toolkit-shell .drawer-logout svg:not([fill="none"]),
.toolkit-sidebar .module-nav button svg:not([fill="none"]),
.toolkit-sidebar .drawer-profile-link svg:not([fill="none"]),
.toolkit-sidebar .drawer-logout svg:not([fill="none"]),
.toolkit-shell .module-nav-icon svg:not([fill="none"]),
.toolkit-sidebar .module-nav-icon svg:not([fill="none"]) {
  fill: currentColor !important;
}

.toolkit-shell .module-nav button svg [fill="none"],
.toolkit-shell .drawer-profile-link svg [fill="none"],
.toolkit-shell .drawer-logout svg [fill="none"],
.toolkit-sidebar .module-nav button svg [fill="none"],
.toolkit-sidebar .drawer-profile-link svg [fill="none"],
.toolkit-sidebar .drawer-logout svg [fill="none"],
.toolkit-shell .module-nav-icon svg [fill="none"],
.toolkit-sidebar .module-nav-icon svg [fill="none"] {
  fill: none !important;
  stroke: currentColor !important;
}

.toolkit-shell .module-nav button svg [fill]:not([fill="none"]),
.toolkit-shell .drawer-profile-link svg [fill]:not([fill="none"]),
.toolkit-shell .drawer-logout svg [fill]:not([fill="none"]),
.toolkit-sidebar .module-nav button svg [fill]:not([fill="none"]),
.toolkit-sidebar .drawer-profile-link svg [fill]:not([fill="none"]),
.toolkit-sidebar .drawer-logout svg [fill]:not([fill="none"]),
.toolkit-shell .module-nav-icon svg [fill]:not([fill="none"]),
.toolkit-sidebar .module-nav-icon svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

.toolkit-shell .module-nav button strong,
.toolkit-shell .drawer-profile-link strong,
.toolkit-sidebar .module-nav button strong,
.toolkit-sidebar .drawer-profile-link strong {
  color: inherit !important;
}

.toolkit-shell .module-nav button.selected,
.toolkit-sidebar .module-nav button.selected {
  color: var(--toolkit-text-sidebar-active) !important;
}

.toolkit-shell .module-nav button.selected strong,
.toolkit-sidebar .module-nav button.selected strong,
.toolkit-shell .module-nav button.selected > span,
.toolkit-sidebar .module-nav button.selected > span,
.toolkit-shell .module-nav button.selected .module-nav-icon,
.toolkit-sidebar .module-nav button.selected .module-nav-icon {
  color: var(--toolkit-text-sidebar-active) !important;
}

.toolkit-shell .module-nav button.selected svg,
.toolkit-sidebar .module-nav button.selected svg,
.toolkit-shell .module-nav button.selected .module-nav-icon svg,
.toolkit-sidebar .module-nav button.selected .module-nav-icon svg {
  color: var(--toolkit-text-sidebar-active) !important;
}

.toolkit-shell .module-nav button.selected svg[fill="none"],
.toolkit-sidebar .module-nav button.selected svg[fill="none"],
.toolkit-shell .module-nav button.selected .module-nav-icon svg[fill="none"],
.toolkit-sidebar .module-nav button.selected .module-nav-icon svg[fill="none"] {
  fill: none !important;
  stroke: currentColor !important;
}

.toolkit-shell .module-nav button.selected svg:not([fill="none"]),
.toolkit-sidebar .module-nav button.selected svg:not([fill="none"]),
.toolkit-shell .module-nav button.selected .module-nav-icon svg:not([fill="none"]),
.toolkit-sidebar .module-nav button.selected .module-nav-icon svg:not([fill="none"]) {
  fill: currentColor !important;
}

.toolkit-shell .module-nav button.selected svg [fill]:not([fill="none"]),
.toolkit-sidebar .module-nav button.selected svg [fill]:not([fill="none"]),
.toolkit-shell .module-nav button.selected .module-nav-icon svg [fill]:not([fill="none"]),
.toolkit-sidebar .module-nav button.selected .module-nav-icon svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

/* Cards: títulos y metas */
.toolkit-shell .rh-person-card,
.toolkit-shell .cap-students__card,
.toolkit-shell .systems-history-card,
.toolkit-shell .academico-activity-card,
.toolkit-shell .academico-kpi,
.toolkit-shell .academico-section-card.toolkit-panel,
.toolkit-shell .module-academico .toolkit-panel,
.toolkit-shell .colegio-entity-card,
.toolkit-shell .compras-purchase-card {
  border-radius: var(--toolkit-card-radius) !important;
  background: var(--toolkit-panel-bg) !important;
  border-color: var(--toolkit-panel-border) !important;
  color: var(--toolkit-text-body) !important;
}

/* Pupil cards: no forzar border-color (mata el borde izquierdo de asistencia) */
.toolkit-shell .academico-pupil-card {
  border-radius: var(--toolkit-card-radius) !important;
  background: var(--toolkit-panel-bg) !important;
  border-top-color: var(--toolkit-panel-border) !important;
  border-right-color: var(--toolkit-panel-border) !important;
  border-bottom-color: var(--toolkit-panel-border) !important;
  color: var(--toolkit-text-body) !important;
}

.toolkit-shell .rh-person-card__name,
.toolkit-shell .cap-students__name,
.toolkit-shell .systems-history-card h3,
.toolkit-shell .systems-pending-card__content h3,
.toolkit-shell .academico-activity-body strong,
.toolkit-shell .academico-pupil-main strong,
.toolkit-shell .colegio-entity-card strong,
.toolkit-shell .compras-purchase-card h3 {
  color: var(--toolkit-text-card-title) !important;
}

.toolkit-shell .rh-person-card__meta,
.toolkit-shell .cap-students__meta,
.toolkit-shell .cap-students__hint,
.toolkit-shell .rh-counter,
.toolkit-shell .systems-history-card p,
.toolkit-shell .systems-history-card small,
.toolkit-shell .systems-pending-card > span,
.toolkit-shell .systems-pending-card > small,
.toolkit-shell .academico-activity-body span,
.toolkit-shell .academico-activity-count,
.toolkit-shell .academico-pupil-main span,
.toolkit-shell .colegio-entity-card p,
.toolkit-shell .colegio-entity-card small,
.toolkit-shell .compras-purchase-meta span {
  color: var(--toolkit-text-card-meta) !important;
}

.toolkit-shell .rh-btn.primary,
.toolkit-shell .systems-btn.primary,
.toolkit-shell .compras-btn.primary,
.toolkit-shell .colegio-button--primary,
.toolkit-shell .cap-students__button,
.toolkit-shell .theme-studio__bar-actions button.primary,
.toolkit-shell .segmented-tabs button.active,
.toolkit-shell .async-state > .async-state__actions button,
.toolkit-shell .async-state > button,
.toolkit-shell .module-toolbar > button,
.toolkit-shell .button-row > button,
.toolkit-shell .module-form > button,
.toolkit-shell .module-card > button,
.toolkit-shell .permission-denied button,
.toolkit-shell .message-composer button {
  min-height: var(--toolkit-btn-height) !important;
  border-radius: var(--toolkit-btn-radius) !important;
  background: var(--toolkit-blue) !important;
  color: var(--toolkit-text-tab-active) !important;
  box-shadow: 0 6px 14px rgba(var(--toolkit-blue-rgb), 0.22) !important;
}

.toolkit-shell .rh-btn,
.toolkit-shell .systems-btn,
.toolkit-shell .compras-btn,
.toolkit-shell .colegio-button {
  min-height: var(--toolkit-btn-height);
  border-radius: var(--toolkit-btn-radius);
}

.toolkit-shell .rh-person-toolbar,
.toolkit-shell .systems-ticket-toolbar,
.toolkit-shell .rh-org-toolbar,
.toolkit-shell .cap-students__filters,
.toolkit-shell .systems-pending,
.toolkit-shell .systems-history {
  border-color: var(--toolkit-panel-border) !important;
  border-radius: var(--toolkit-panel-radius) !important;
  background: var(--toolkit-panel-bg) !important;
  box-shadow: var(--toolkit-panel-shadow) !important;
}

.toolkit-shell .rh-search,
.toolkit-shell .systems-search,
.toolkit-shell .cap-students__search,
.toolkit-shell .cap-students__select,
.toolkit-shell .cap-students__input,
.toolkit-shell input[type="text"],
.toolkit-shell input[type="search"],
.toolkit-shell input[type="email"],
.toolkit-shell input[type="password"],
.toolkit-shell input[type="number"],
.toolkit-shell select,
.toolkit-shell textarea {
  min-height: var(--toolkit-input-height);
  border-color: var(--toolkit-panel-border) !important;
  border-radius: var(--toolkit-btn-radius) !important;
  color: var(--toolkit-text-body) !important;
}

.toolkit-shell .rh-modal > header,
.toolkit-shell .systems-modal > header {
  background: var(--toolkit-blue) !important;
}

.toolkit-shell .rh-filter-row button {
  color: var(--toolkit-text-tab) !important;
}

.toolkit-shell .rh-filter-row button.active,
.toolkit-shell .systems-history-filters > button.active {
  border-color: var(--toolkit-blue) !important;
  background: var(--toolkit-blue) !important;
  color: var(--toolkit-text-tab-active) !important;
}

/* Sistemas / Marketing: anular button{min-height:48px} en chips y cards */
.toolkit-shell .systems-history-filters > button,
.toolkit-shell .marketing-history-filters > button {
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  background: var(--toolkit-surface, #f2f2f2) !important;
  color: var(--toolkit-text-tab) !important;
  box-shadow: none !important;
}

.toolkit-shell .systems-history-filters > button.active,
.toolkit-shell .marketing-history-filters > button.active {
  background: var(--toolkit-blue) !important;
  color: var(--toolkit-text-tab-active) !important;
}

.toolkit-shell .systems-pending > header button,
.toolkit-shell .systems-pagination button,
.toolkit-shell .systems-search > button,
.toolkit-shell .marketing-pagination button,
.toolkit-shell .marketing-search > button {
  min-height: 0 !important;
  box-shadow: none !important;
}

.toolkit-shell .systems-pending > header button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--toolkit-panel-bg, #fff) !important;
  color: #2563eb !important;
}

.toolkit-shell .systems-pending-card,
.toolkit-shell .marketing-pending-card {
  display: block !important;
  min-height: 250px !important;
  height: 250px !important;
  max-height: 250px !important;
  padding: 12px !important;
  border-radius: 12px !important;
  background: linear-gradient(150deg, var(--ticket-color, #2563eb), #0f172a) !important;
  color: #fff !important;
  box-shadow: 0 9px 20px rgba(15, 23, 42, 0.16) !important;
}

.toolkit-shell .marketing-pending-card {
  background: linear-gradient(
    150deg,
    var(--toolkit-panel-bg, #fff) 38%,
    color-mix(in srgb, var(--ticket-accent, #7c3aed) 12%, var(--toolkit-panel-bg, #fff))
  ) !important;
  color: var(--toolkit-text-body, #0f172a) !important;
}

/* Tickets pendientes de Sistemas y Marketing: texto sobre gradiente oscuro */
.toolkit-shell .systems-pending-card,
.toolkit-shell .systems-pending-card__content h3,
.toolkit-shell .systems-pending-card > span,
.toolkit-shell .systems-pending-card > small,
.toolkit-shell .systems-pending-card__top time {
  color: #fff !important;
}

.toolkit-shell .systems-btn {
  min-height: var(--toolkit-btn-height) !important;
  height: var(--toolkit-btn-height) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.toolkit-shell .systems-btn.ghost {
  background: var(--toolkit-panel-bg, #fff) !important;
  color: var(--toolkit-text-body) !important;
  border: 1px solid var(--toolkit-panel-border) !important;
  box-shadow: none !important;
}

.toolkit-shell .systems-history-card footer button {
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  min-height: 30px !important;
  height: 30px !important;
  max-height: 30px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff)) !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.toolkit-shell .systems-search {
  font-size: 14px !important;
}

.toolkit-shell .systems-search input {
  font-size: 14px !important;
  min-height: 0 !important;
  height: 100% !important;
}

@media (max-width: 767px) {
  .toolkit-shell .systems-history-grid,
  .toolkit-shell .marketing-history-grid {
    grid-template-columns: 1fr !important;
  }

  .toolkit-shell .systems-history-card {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    min-height: 122px !important;
  }

  .toolkit-shell .systems-history-card__cover {
    width: 112px !important;
    -webkit-flex: 0 0 112px !important;
    flex: 0 0 112px !important;
  }

  .toolkit-shell .systems-history-card__body {
    -webkit-box-flex: 1 !important;
    -webkit-flex: 1 !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .toolkit-shell .marketing-history-card {
    min-height: 150px !important;
  }

  .toolkit-shell .systems-ticket-toolbar {
    -webkit-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
  }

  .toolkit-shell .systems-ticket-toolbar > .systems-search {
    -webkit-flex-basis: 100% !important;
    flex-basis: 100% !important;
    margin-bottom: 7px !important;
  }

  .toolkit-shell .marketing-page.systems-page,
  .toolkit-shell .marketing-page {
    width: 100% !important;
  }
}

.toolkit-shell .module-shell-content {
  background-color: var(--toolkit-panel-bg);
  background-image:
    linear-gradient(var(--toolkit-brand-wash), var(--toolkit-brand-wash)),
    var(--toolkit-brand-bg, none);
  background-size: 100% 100%, var(--toolkit-brand-tile) var(--toolkit-brand-tile);
}

textarea,
select {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.module-shell-content {
  position: relative;
  z-index: 1;
  min-height: 0;
  /* El mosaico vive aquí (área visible bajo el header), detrás del DOM de cada módulo */
  background-color: var(--toolkit-panel-bg);
  background-image:
    linear-gradient(var(--toolkit-brand-wash), var(--toolkit-brand-wash)),
    var(--toolkit-brand-bg, none);
  background-repeat: no-repeat, repeat;
  background-position: center top, center top;
  background-size: 100% 100%, var(--toolkit-brand-tile) var(--toolkit-brand-tile);
}

.toolkit-shell .module-shell {
  position: relative;
  background-color: var(--toolkit-panel-bg, #fff);
}

.module-screen,
.module-page {
  max-width: none;
  padding-top: var(--toolkit-page-pad-top);
  padding-left: var(--toolkit-page-pad-x);
  padding-right: var(--toolkit-page-pad-x);
  padding-bottom: 0;
  color: var(--toolkit-text-body);
  background: transparent;
  font-size: var(--toolkit-font-base);
  box-sizing: border-box;
}

.module-screen > h1,
.module-page > h1 {
  font-size: var(--toolkit-font-title);
  font-weight: var(--toolkit-font-strong);
  letter-spacing: -0.02em;
  color: var(--toolkit-text-title);
}

.segmented-tabs {
  border-color: var(--toolkit-border);
  background: var(--toolkit-surface);
}

.segmented-tabs button.active,
.async-state > .async-state__actions button,
.async-state > button,
.module-toolbar > button,
.button-row > button,
.module-form > button,
.module-card > button,
.permission-denied button,
.message-composer button {
  min-height: var(--toolkit-btn-height);
  border-radius: var(--toolkit-btn-radius);
  background: var(--toolkit-blue);
}

.segmented-tabs button.active {
  box-shadow: 0 2px 7px rgba(37, 99, 235, 0.22);
}

.profile-card,
.settings-card,
.module-panel,
.module-card,
.module-form,
.data-table-wrap,
.async-state {
  background: var(--toolkit-panel-bg, #fff);
  border-color: var(--toolkit-border);
}

.data-table tbody tr {
  -webkit-transition: background 120ms ease;
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: var(--toolkit-surface, #f8fafc);
}

.message-users .offline-divider {
  min-height: auto;
  margin: 8px 10px 0;
  padding: 9px 2px 5px;
  border-top: 1px solid var(--toolkit-panel-border, #e2e8f0);
  color: var(--toolkit-text-muted, #64748b);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ticket-mention-suggestions {
  max-height: 190px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--toolkit-panel-border, #dbe3ee);
  border-radius: 10px;
  background: var(--toolkit-panel-bg, #fff);
  overflow-y: auto;
}

.ticket-mention-suggestions button {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--toolkit-text-body, #111827);
  text-align: left;
}

.ticket-mention-suggestions button:hover,
.ticket-mention-suggestions button:focus {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
}

.ticket-mention-suggestions small {
  display: block;
  color: var(--toolkit-text-muted, #64748b);
}

.home-editable-block > .weather-card,
.home-editable-block > .day-widget,
.home-editable-block > .direct-section,
.home-editable-block > .module-list {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.drag-handle button {
  min-width: 30px;
  min-height: 30px;
  margin-left: 3px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

@media (max-width: 768px) {
  .module-screen,
  .module-page {
    width: 100%;
    padding-left: 5px;
    padding-right: 5px;
  }

  .module-screen > h1,
  .module-page > h1 {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 21px;
  }

  .segmented-tabs {
    margin-left: 4px;
    margin-right: 4px;
  }

  .notifications-bell .notifications-panel,
  .global-search-panel {
    position: fixed;
    top: 66px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(var(--app-height, 100vh) - 76px);
  }

  .ticket-toast-host {
    right: 8px;
    top: 68px;
    width: calc(100vw - 16px);
  }

  .home-editable-grid {
    display: block;
  }

  .home-editable-block {
    min-width: 0;
    margin: 8px 0;
  }
}

/* ===== WebSidebar: réplica estructural del Toolkit padre ===== */
.sidebar-panel,
.sidebar-panel-content {
  min-height: 0;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.sidebar-panel {
  position: relative;
}

.sidebar-panel-glass {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

@media (min-width: 769px) {
  .toolkit-sidebar.desktop {
    position: relative;
    z-index: 1;
    width: 333px;
    min-width: 333px;
    height: 100vh;
    margin: 0;
    padding: 13px 0 13px 13px;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: visible;
    box-shadow: none;
    -webkit-transition: width 400ms ease, min-width 400ms ease;
    transition: width 400ms ease, min-width 400ms ease;
  }

  .toolkit-sidebar.desktop.collapsed {
    z-index: 50;
    width: 80px;
    min-width: 80px;
  }

  .toolkit-sidebar.desktop .sidebar-panel {
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    border: 1px solid var(--toolkit-chrome-border, rgba(0, 0, 0, 0.08));
    border-radius: 16px;
    background: transparent;
    box-shadow: var(--toolkit-chrome-shadow);
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
  }

  .toolkit-sidebar.desktop .sidebar-panel-glass {
    border-radius: 16px;
    background: var(--toolkit-sidebar-glass, rgba(255, 255, 255, 0.58));
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
  }

  .toolkit-sidebar.desktop .sidebar-panel-content {
    position: relative;
    min-width: 0;
    overflow-x: hidden;
    padding: 0 10px 10px;
  }

  .toolkit-sidebar.desktop .drawer-toolbar {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 16px 13px 13px;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-transition: padding 400ms ease;
    transition: padding 400ms ease;
  }

  .toolkit-sidebar.desktop.collapsed .drawer-toolbar {
    padding: 16px 5px 13px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .toolkit-sidebar.desktop .drawer-brand {
    min-width: 0;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    align-items: flex-end;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 auto;
    flex: 0 1 auto;
    gap: 2px;
  }

  .toolkit-sidebar.desktop .sidebar-logot-wrap {
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: block;
    /* Solo invert: mix-blend-mode + backdrop-filter hace desaparecer el logo en Safari */
    -webkit-filter: invert(1);
    filter: invert(1);
  }

  .toolkit-sidebar.desktop .sidebar-logot-wrap img {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .toolkit-sidebar.desktop .sidebar-toolkit-reveal {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    align-items: flex-end;
    width: 102px;
    max-width: 102px;
    height: 35px;
    margin-left: 0;
    overflow: hidden;
    opacity: 1;
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
    -webkit-transform-origin: left center;
    transform-origin: left center;
    -webkit-transition: max-width 400ms ease, opacity 400ms ease, -webkit-transform 400ms ease;
    transition: max-width 400ms ease, opacity 400ms ease, transform 400ms ease;
    -webkit-filter: invert(1);
    filter: invert(1);
  }

  .toolkit-sidebar.desktop .sidebar-toolkit-reveal img {
    width: 100px;
    height: 35px;
    object-fit: contain;
  }

  .toolkit-sidebar.desktop.collapsed .sidebar-toolkit-reveal {
    width: 0;
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button {
    width: 36px;
    min-width: 36px;
    height: 29px;
    min-height: 29px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    opacity: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
  }

  .toolkit-sidebar.desktop.collapsed .sidebar-collapse-button {
    margin-top: 10px;
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button:active {
    background: rgba(0, 0, 0, 0.06);
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button:hover {
    background: transparent;
    -webkit-transform: none;
    transform: none;
  }

  .toolkit-sidebar.desktop .sidebar-collapse-button:disabled {
    cursor: default;
    opacity: 1;
  }

  .sidebar-toggle-glyph {
    position: relative;
    width: 20px;
    height: 16px;
    overflow: hidden;
    border: 1.2px solid rgba(0, 0, 0, 0.45);
    border-radius: 3px;
    display: block;
  }

  .sidebar-toggle-glyph.collapsed {
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
  }

  .sidebar-toggle-glyph i {
    width: 5px;
    height: 100%;
    border-right: 1.2px solid rgba(0, 0, 0, 0.45);
    background: rgba(0, 0, 0, 0.06);
    display: block;
  }

  .toolkit-sidebar.desktop .drawer-divider {
    height: 1px;
    margin: 5px 13px 13px;
    background: var(--toolkit-border, rgba(0, 0, 0, 0.1));
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .toolkit-sidebar.desktop .module-nav {
    min-height: 0;
    margin: 0;
    padding: 0 5px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 auto;
    flex: 0 1 auto;
  }

  .toolkit-sidebar.desktop .module-nav button,
  .toolkit-sidebar.desktop .drawer-profile-link {
    position: relative;
    width: 100%;
    min-height: 39px;
    height: auto;
    margin: 1px 0;
    padding: 8px 0;
    overflow: visible;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: rgba(0, 0, 0, 0.82);
    -webkit-transform: none;
    transform: none;
    -webkit-transition: background 120ms ease;
    transition: background 120ms ease;
    display: block;
  }

  .toolkit-sidebar.desktop .module-nav button:hover,
  .toolkit-sidebar.desktop .drawer-profile-link:hover {
    background: transparent;
    -webkit-transform: none;
    transform: none;
  }

  .toolkit-sidebar.desktop .module-nav button:active:not(.selected),
  .toolkit-sidebar.desktop .drawer-profile-link:active:not(.selected) {
    background: var(--toolkit-sidebar-hover, rgba(0, 0, 0, 0.04));
  }

  .toolkit-sidebar.desktop .module-nav button.selected,
  .toolkit-sidebar.desktop .drawer-profile-link.selected {
    background: var(--toolkit-sidebar-selected, rgba(0, 0, 0, 0.07));
    box-shadow: none;
  }

  .toolkit-sidebar.desktop .module-nav button > span,
  .toolkit-sidebar.desktop .module-nav button > .module-nav-icon,
  .toolkit-sidebar.desktop .drawer-profile-link > span {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 29px;
    min-width: 29px;
    height: 29px;
    margin: -15px 0 0;
    overflow: visible;
    color: rgba(0, 0, 0, 0.82);
    font-size: 22px;
    text-align: center;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    -webkit-transition: left 400ms ease, -webkit-transform 400ms ease;
    transition: left 400ms ease, transform 400ms ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
  }

  .toolkit-sidebar.desktop.collapsed .module-nav button > span,
  .toolkit-sidebar.desktop.collapsed .module-nav button > .module-nav-icon,
  .toolkit-sidebar.desktop.collapsed .drawer-profile-link > span {
    left: 50%;
    margin-right: 0;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }

  .toolkit-sidebar.desktop .module-nav button strong,
  .toolkit-sidebar.desktop .drawer-profile-link strong {
    position: absolute;
    top: 0;
    right: 13px;
    bottom: 0;
    left: 54px;
    min-width: 0;
    max-width: 286px;
    margin: 0;
    overflow: hidden;
    opacity: 1;
    color: rgba(0, 0, 0, 0.82);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 23px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-transition: opacity 400ms ease, max-width 400ms ease;
    transition: opacity 400ms ease, max-width 400ms ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
  }

  .toolkit-sidebar.desktop.collapsed .module-nav button strong,
  .toolkit-sidebar.desktop.collapsed .drawer-profile-link strong {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
  }

  .toolkit-sidebar.desktop .module-nav-divider {
    height: 1px;
    margin: 10px 13px;
    background: var(--toolkit-border, rgba(0, 0, 0, 0.1));
  }

  .toolkit-sidebar.desktop .nav-badge {
    min-width: 23px;
    height: 23px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    line-height: 23px;
    font-weight: 800;
    text-align: center;
  }

  .toolkit-sidebar.desktop .nav-badge:not(.collapsed) {
    margin-left: auto;
  }

  .toolkit-sidebar.desktop .nav-badge.collapsed {
    top: -4px;
    right: -6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 17px;
    font-weight: 800;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95);
  }

  .toolkit-sidebar.desktop .drawer-spacer {
    min-height: 8px;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
  }

  .toolkit-sidebar.desktop .drawer-footer {
    padding: 5px 5px 3px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
  }

  .toolkit-sidebar.desktop .drawer-footer .module-nav-divider {
    margin: 0 5px 10px;
  }

  .toolkit-sidebar.desktop .drawer-footer-row {
    gap: 4px;
  }

  .toolkit-sidebar.desktop .drawer-theme-toggle {
    width: 39px;
    min-width: 39px;
    height: 39px;
    border-radius: 9px;
  }

  .toolkit-sidebar.desktop.collapsed .drawer-footer-row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 4px;
  }

  .toolkit-sidebar.desktop.collapsed .drawer-footer-row .drawer-profile-link,
  .toolkit-sidebar.desktop.collapsed .drawer-theme-toggle {
    width: 100%;
  }
}

.sidebar-floating-tooltip {
  position: fixed;
  z-index: 2147483000;
  max-width: 286px;
  margin-top: -18px;
  padding: 8px 13px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 21px;
  font-weight: 500;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}

/* ===== Home: réplica del layout Toolkit padre ===== */
.toolkit-shell.desktop .module-shell.is-home {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.toolkit-shell.desktop .module-shell.is-home > .home-header {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

.toolkit-shell.desktop .module-shell.is-home > .module-shell-content {
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  overflow: hidden;
}

.toolkit-home-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 15px;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.home-2cols {
  width: 100%;
  display: -ms-grid;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.home-2cols__col {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  align-self: stretch;
  justify-self: stretch;
}

.home-2cols__col--feed > .home-feed,
.home-2cols__col--feed > .home-feed.animated-card {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.home-2cols__col--widgets > .home-layout,
.home-2cols__col--widgets > .home-layout > .home-editable-grid {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.toolkit-shell.desktop .module-shell.is-home .toolkit-home-content {
  overflow: hidden;
}

.home-layout-toolbar {
  width: 100%;
  min-height: 42px;
  margin: 0 0 4px;
  padding: 0 4px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 13px;
  line-height: 18px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.home-layout-toolbar button {
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* Base mobile-first: apilado. La rejilla 12 cols solo en desktop. */
.home-editable-grid {
  width: 100%;
  margin: 0;
  display: block;
}

.toolkit-shell.desktop .module-shell.is-home .home-editable-grid {
  height: 100%;
  min-height: 0;
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  align-items: stretch;
  grid-auto-flow: row dense;
  grid-gap: 12px;
  overflow: hidden;
}

.home-editable-block,
.home-editable-block.wide {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  border: 0;
  border-radius: 18px;
  -webkit-box-flex: initial;
  -webkit-flex: initial;
  flex: initial;
}

@media (min-width: 769px) {
  .toolkit-shell.desktop .module-shell.is-home > .module-shell-content {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .toolkit-home-content {
    overflow: visible !important;
  }

  .home-2cols {
    overflow: visible !important;
  }

  .home-2cols__col--widgets {
    overflow: visible !important;
  }

  /* ANULAR reglas antiguas grid-template-rows 0fr que colapsaban el panel */
  .day-widget.menu-day-widget .day-widget-expand-panel,
  .day-widget.circular-day-widget .day-widget-expand-panel,
  .day-widget.menu-day-widget.expanded .day-widget-expand-panel,
  .day-widget.circular-day-widget.expanded .day-widget-expand-panel,
  .day-widget.menu-day-widget.collapsed .day-widget-expand-panel,
  .day-widget.circular-day-widget.collapsed .day-widget-expand-panel {
    grid-template-rows: none !important;
  }

  .day-widget.menu-day-widget.collapsed .day-widget-collapsed-panel,
  .day-widget.circular-day-widget.collapsed .day-widget-collapsed-panel,
  .day-widget.menu-day-widget.expanded .day-widget-collapsed-panel,
  .day-widget.circular-day-widget.expanded .day-widget-collapsed-panel {
    grid-template-rows: none !important;
  }

  .day-widget.menu-day-widget .day-widget-panel-inner,
  .day-widget.circular-day-widget .day-widget-panel-inner {
    min-height: 0 !important;
    overflow: visible !important;
  }


  .toolkit-home-content {
    height: 100%;
  }

  .toolkit-home-content .home-2cols {
    display: -ms-grid;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-auto-rows: minmax(0, 1fr);
    grid-gap: 12px;
    gap: 12px;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    align-items: stretch;
    justify-items: stretch;
    align-self: stretch;
    justify-self: stretch;
  }

  .toolkit-home-content .home-2cols__col {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    align-self: stretch;
    justify-self: stretch;
  }

  .toolkit-home-content .home-2cols__col--feed > .home-feed,
  .toolkit-home-content .home-2cols__col--feed > .home-feed.animated-card {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .toolkit-home-content .home-2cols__col--widgets > .home-layout,
  .toolkit-home-content .home-2cols__col--widgets > .home-layout > .home-editable-grid {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
  }

  .home-editable-grid {
    -webkit-box-align: start;
    -webkit-align-items: start;
    align-items: start;
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    grid-gap: 12px;
  }

  .home-editable-block,
  .home-editable-block.wide {
    width: auto;
    margin: 0;
    -webkit-align-self: stretch;
    align-self: stretch;
    min-height: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
  }

  .home-editable-block.block-welcome {
    grid-column: span 9;
  }

  .home-editable-block.block-weather {
    grid-column: span 3;
  }

  .home-editable-block.block-menu,
  .home-editable-block.block-circular,
  .home-editable-block.block-modules {
    grid-column: 1 / -1;
    width: 100%;
    overflow: hidden;
  }

  .home-editable-block.block-modules .module-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-gap: 12px;
    margin: 0 0 12px;
  }

  .home-editable-block.block-modules .module-home-card {
    min-height: 140px;
    padding: 14px 12px;
    border-radius: 14px;
  }

  .home-editable-block.block-modules .module-home-card h2 {
    font-size: 19px;
    line-height: 23px;
    margin-bottom: 8px;
  }

  .home-editable-block.block-direct,
  .home-editable-block.block-feed {
    display: none !important;
  }

  .home-editable-block.block-menu.wide,
  .home-editable-block.block-circular.wide,
  .home-editable-block.block-direct.wide,
  .home-editable-block.block-modules.wide {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .home-editable-block.block-welcome {
    grid-column: span 8;
  }

  .home-editable-block.block-weather {
    grid-column: span 4;
  }
}

.home-editable-block.editing {
  outline: 1px dashed rgba(37, 99, 235, 0.62);
  outline-offset: 3px;
  cursor: move;
  -webkit-animation: homeBlockWiggle 420ms ease-in-out infinite alternate;
  animation: homeBlockWiggle 420ms ease-in-out infinite alternate;
}

.home-editable-block.editing:nth-child(even) {
  -webkit-animation-delay: -180ms;
  animation-delay: -180ms;
}

.home-editable-block .drag-handle {
  position: absolute;
  z-index: 12;
  top: 6px;
  right: 6px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.home-editable-block .drag-handle button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  margin: 0 1px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #fff;
}

.home-editable-block .drag-handle button:last-child {
  background: #2563eb;
}

/* =========================================================
   PREMIUM WIDGETS · Menú del día + Circular del día
   (Welcome y Weather se mantienen de base)
========================================================= */

/* Rollback Welcome/Weather a estilo base */
.welcome-block {
  width: 100%;
  min-height: 112px;
  padding: 14px 4px 8px;
  border-radius: initial;
  background: transparent;
  color: initial;
  border: 0;
  box-shadow: none;
  position: initial;
  overflow: initial;
  isolation: initial;
}
.welcome-block::after { display: none; }
.welcome-block .welcome-row,
.welcome-block .welcome-text,
.welcome-block .welcome-badge-date,
.welcome-block .weather-loc { display: none; }

.welcome-block p {
  margin: 0;
  color: var(--toolkit-text-body, #111827);
  font-size: 30px;
  line-height: 38px;
  font-weight: 300;
  letter-spacing: -0.4px;
  background: none;
  -webkit-text-fill-color: initial;
}

.welcome-block p strong {
  font-weight: 600;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: inherit;
}

.welcome-line {
  width: 100%;
  height: 4px;
  margin: 12px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: -webkit-linear-gradient(left, #000, #020617, #0f172a, #1e3a8a, #2563eb, #3b82f6, #1d4ed8, #172554, #0f172a, #000);
  background: linear-gradient(to right, #000, #020617, #0f172a, #1e3a8a, #2563eb, #3b82f6, #1d4ed8, #172554, #0f172a, #000);
  box-shadow: none;
  -webkit-transform-origin: left center;
  transform-origin: left center;
  -webkit-animation: welcomeLineDraw 820ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: welcomeLineDraw 820ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
  opacity: 1;
}

.welcome-block h1 {
  margin: 0;
  color: var(--toolkit-text-body, #111827);
  font-size: 38px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.6px;
  background: none;
  -webkit-text-fill-color: initial;
  -webkit-animation: homeInicioIn 420ms 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation: homeInicioIn 420ms 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.weather-card {
  width: 100%;
  max-width: 220px;
  min-width: 148px;
  min-height: 96px;
  margin: 0 0 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: var(--toolkit-panel-bg, rgba(255, 255, 255, 0.88));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--toolkit-text-body, #111827);
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: initial;
  -webkit-align-self: start;
  align-self: start;
  position: initial;
  overflow: initial;
  isolation: initial;
}

.weather-card::before { display: none; }
.weather-card > * { position: initial; z-index: auto; }

.weather-card .weather-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin-right: 9px;
  color: #2563eb;
  line-height: 0;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  border-radius: initial;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.weather-card .weather-icon svg {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
  vertical-align: initial;
  filter: none;
}

.weather-card > div {
  min-width: 0;
  margin-left: auto;
  text-align: right;
  display: initial;
  flex-direction: initial;
  gap: initial;
}

.weather-temp {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: initial;
}

.weather-card strong {
  font-size: 26px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: initial;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
}

.weather-temp small {
  margin: 1px 0 0 2px;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: initial;
}

.weather-card p,
.weather-card > div > small {
  display: block;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--toolkit-text-muted, #64748b);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   DayWidget · Premium (Menú + Circular)
========================================================= */

.day-widget {
  position: relative;
  width: 100%;
  min-height: 124px;
  height: auto;
  margin: 0;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  border-radius: 20px;
  transition:
    box-shadow 260ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease;
  isolation: isolate;
}

.day-widget:hover {
  transform: translateY(-2px);
}

.day-widget.expanded {
  min-height: 0;
}

.day-widget-effect,
.day-widget-tint,
.day-widget-shine {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  pointer-events: none;
}

.day-widget-effect { display: none; }
.day-widget-tint    { display: none; }
.day-widget-shine   {
  z-index: 2;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0.7;
  mix-blend-mode: screen;
}

.day-widget::before,
.day-widget::after {
  position: absolute;
  z-index: 0;
  content: "";
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.7;
}

.day-widget::before {
  top: -70px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: var(--widget-blob-strong, rgba(255, 255, 255, 0.25));
}

.day-widget::after {
  bottom: -60px;
  left: -30px;
  width: 180px;
  height: 180px;
  background: var(--widget-blob-soft, rgba(255, 255, 255, 0.12));
}

/* ------------- Variante MENÚ (Verde oliva premium) ------------- */
.menu-day-widget {
  --widget-text: #052e16;
  --widget-muted: #14532d;
  --widget-accent: #16a34a;
  --widget-blob-strong: rgba(34, 197, 94, 0.28);
  --widget-blob-soft: rgba(250, 204, 21, 0.22);

  color: var(--widget-text);
  border: 1px solid rgba(22, 163, 74, 0.25);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(250, 204, 21, 0.32), rgba(250, 204, 21, 0) 55%),
    radial-gradient(120% 180% at 0% 100%, rgba(22, 163, 74, 0.28), rgba(22, 163, 74, 0) 55%),
    linear-gradient(160deg, #ecfdf5 0%, #dcfce7 45%, #fef9c3 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 16px 34px rgba(5, 46, 22, 0.12),
    0 4px 14px rgba(22, 163, 74, 0.12);
}

.menu-day-widget::after {
  border-top: 3px solid transparent;
  background-clip: padding-box;
  border-image: linear-gradient(90deg, #16a34a, #facc15) 1;
}

.menu-day-widget::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 45%, #facc15 100%);
  filter: drop-shadow(0 2px 4px rgba(22, 163, 74, 0.25));
  opacity: 0.92;
  z-index: 3;
}

/* ------------- Variante CIRCULAR (Indigo Royal) ------------- */
.circular-day-widget {
  --widget-text: #1e1b4b;
  --widget-muted: #3730a3;
  --widget-accent: #6366f1;
  --widget-blob-strong: rgba(99, 102, 241, 0.3);
  --widget-blob-soft: rgba(139, 92, 246, 0.22);

  color: var(--widget-text);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(244, 114, 182, 0.24), rgba(244, 114, 182, 0) 55%),
    radial-gradient(120% 180% at 0% 100%, rgba(99, 102, 241, 0.28), rgba(99, 102, 241, 0) 55%),
    linear-gradient(160deg, #eef2ff 0%, #e0e7ff 45%, #f5f3ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 16px 34px rgba(30, 27, 75, 0.12),
    0 4px 14px rgba(99, 102, 241, 0.12);
}

.circular-day-widget::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #4f46e5 0%, #8b5cf6 50%, #ec4899 100%);
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.25));
  opacity: 0.92;
  z-index: 3;
  pointer-events: none;
}

/* DayWidget shared internals */
.day-widget-content { position: relative; z-index: 3; }

.day-widget-header,
.day-widget-collapsed-body,
.day-widget-body,
.day-widget-collapsed-panel,
.day-widget-expand-panel,
.empty-widget {
  position: relative;
  z-index: 3;
}

.day-widget-header {
  min-height: 62px;
  padding: 14px 16px 8px;
  background: transparent;
  color: var(--widget-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.day-widget-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin-right: 12px;
  border-radius: 14px;
  color: #fff;
  display: grid;
  place-items: center;
  background: var(--widget-icon-bg, linear-gradient(135deg, #1e293b, #334155));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.menu-day-widget .day-widget-icon {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.circular-day-widget .day-widget-icon {
  background: linear-gradient(135deg, #6366f1, #4338ca);
}

.day-widget-icon i {
  width: 100%;
  height: 100%;
  font-style: normal;
  line-height: 0;
  display: grid;
  place-items: center;
}

.day-widget-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  vertical-align: initial;
  color: inherit;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.day-widget-heading {
  min-width: 0;
  padding: 2px 0;
  background: transparent;
  flex: 1 1 auto;
}

.day-widget-header h2 {
  font-size: 18px;
  line-height: 22px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.day-widget-header p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  opacity: 0.85;
}

.day-widget .day-widget-header h2,
.day-widget .day-widget-slide strong { color: var(--widget-text); }
.day-widget .day-widget-header p        { color: var(--widget-muted); opacity: 0.9; }
.day-widget .day-widget-slide p,
.day-widget .empty-widget                { color: var(--widget-muted); }

.day-widget-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: 8px;
}

.day-widget-print,
.day-widget-expand {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  color: var(--widget-text);
  font-size: 20px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 10px rgba(15, 23, 42, 0.08);
}

.day-widget-expand { font-size: 22px; font-weight: 800; }

.day-widget-print:hover, .day-widget-print:focus-visible,
.day-widget-expand:hover, .day-widget-expand:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 8px 16px rgba(15, 23, 42, 0.14);
  transform: translateY(-1px);
}

.day-widget-print:active, .day-widget-expand:active {
  transform: scale(0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.day-widget-expand.is-open { transform: rotate(180deg); }

.day-widget-collapsed-body { padding: 4px 16px 14px; }

.day-widget-chips {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.day-widget-chips button {
  min-height: 28px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--widget-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.day-widget-chips button:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--widget-text);
  transform: translateY(-1px);
}

.menu-day-widget .day-widget-chips button.active {
  border-color: rgba(22, 163, 74, 0.5);
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 12px rgba(22, 163, 74, 0.25);
}

.circular-day-widget .day-widget-chips button.active {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 12px rgba(99, 102, 241, 0.25);
}

.day-widget-slide {
  min-height: 84px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(15, 23, 42, 0.08);
  animation: dayWidgetSlideIn 260ms ease both;
}

.day-widget-slide strong,
.day-widget-slide p { position: relative; z-index: 1; }

.day-widget-slide strong {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--widget-text);
  padding-bottom: 4px;
  display: block;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
  margin-bottom: 6px;
}

.day-widget-slide p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--widget-muted);
}

.day-widget-body { padding: 6px 16px 16px; }

.day-widget-body .day-group {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(15, 23, 42, 0.08);
}

.day-widget-body .day-group:last-child { margin-bottom: 0; }

.day-widget-body .day-group strong { color: var(--widget-text); font-size: 13px; }
.day-widget-body .day-group p      { color: var(--widget-muted); font-size: 13px; }

/* =========================================================
   Module cards · Premium
========================================================= */

.module-list {
  width: 100%;
  margin: 0 0 4px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-home-card {
  position: relative;
  width: 100%;
  min-height: 170px;
  height: 100%;
  margin: 0;
  padding: 18px 16px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #fff;
  text-align: center;
  isolation: isolate;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%),
    radial-gradient(80% 200% at 100% 100%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 60%),
    linear-gradient(155deg, #020617 0%, #0f172a 50%, #172554 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(2, 6, 23, 0.42);
  transition:
    box-shadow 260ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease;
}

.module-home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 220% at 100% 0%, rgba(251, 191, 36, 0.16), rgba(251, 191, 36, 0) 55%);
  opacity: 0.9;
  z-index: -1;
  pointer-events: none;
}

.module-home-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.45), rgba(147, 197, 253, 0.08) 50%, rgba(96, 165, 250, 0.55));
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}

.module-home-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 36px rgba(2, 6, 23, 0.55),
    0 6px 20px rgba(59, 130, 246, 0.25);
  border-color: rgba(251, 191, 36, 0.35);
}

.module-home-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 21px;
  line-height: 25px;
  letter-spacing: -0.25px;
  font-weight: 800;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.25),
    0 10px 22px rgba(0, 0, 0, 0.35);
}

.module-home-card h2 strong { font-weight: 900; }
.module-home-card h2 span   { font-weight: 500; color: rgba(219, 234, 254, 0.92); }

.module-home-card p {
  margin: auto 4px 12px;
  color: rgba(226, 232, 240, 0.95);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.module-home-card button {
  margin-top: 6px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(59, 130, 246, 0.45));
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(2, 6, 23, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.module-home-card button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 20px rgba(2, 6, 23, 0.35);
}

.module-home-card button:active {
  transform: translateY(1px) scale(0.98);
}

.day-widget {
  position: relative;
  width: 100%;
  min-height: 124px;
  height: auto;
  margin: 0;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  border-radius: 18px;
  -webkit-transition: box-shadow 220ms ease;
  transition: box-shadow 220ms ease;
}

.day-widget.expanded {
  min-height: 0;
}

.day-widget-collapsed-panel,
.day-widget-expand-panel {
  display: -ms-grid;
  display: grid;
  -webkit-transition:
    grid-template-rows 340ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    -webkit-transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
  transition:
    grid-template-rows 340ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.day-widget-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.day-widget.collapsed .day-widget-collapsed-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
  pointer-events: auto;
}

.day-widget.collapsed .day-widget-expand-panel {
  grid-template-rows: 0fr;
  opacity: 0;
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
  pointer-events: none;
}

.day-widget.expanded .day-widget-collapsed-panel {
  grid-template-rows: 0fr;
  opacity: 0;
  -webkit-transform: translateY(-8px);
  transform: translateY(-8px);
  pointer-events: none;
}

.day-widget.expanded .day-widget-expand-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
  pointer-events: auto;
}

.day-widget-expand.is-open {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

.menu-day-widget,
.circular-day-widget {
  --widget-text: var(--toolkit-text-home-widget, #0f172a);
  --widget-muted: var(--toolkit-text-home-widget-muted, #334155);
  --widget-accent: var(--toolkit-text-home-widget-muted, rgba(15, 23, 42, 0.78));
  isolation: isolate;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow:
    0 6px 6px rgba(0, 0, 0, 0.16),
    0 0 20px rgba(0, 0, 0, 0.08);
  /* Sin transform: si queda activo, rompe backdrop-filter / liquid glass. */
  -webkit-animation-name: liquidGlassEnter;
  animation-name: liquidGlassEnter;
}

@-webkit-keyframes liquidGlassEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes liquidGlassEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.menu-day-widget::before,
.menu-day-widget::after,
.circular-day-widget::before,
.circular-day-widget::after {
  display: none;
}

.day-widget-effect,
.day-widget-tint,
.day-widget-shine {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  pointer-events: none;
}

.day-widget-effect {
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  -webkit-filter: url(#liquid-glass-distortion);
  filter: url(#liquid-glass-distortion);
}

.day-widget-tint {
  z-index: 1;
  background: var(--toolkit-widget-tint, rgba(255, 255, 255, 0.25));
}

.day-widget-shine {
  z-index: 2;
  overflow: hidden;
  box-shadow: var(
    --toolkit-widget-shine,
    inset 2px 2px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 1px 1px rgba(255, 255, 255, 0.5)
  );
}

.day-widget-content {
  position: relative;
  z-index: 3;
}

.menu-day-widget .day-widget-slide,
.circular-day-widget .day-widget-slide {
  /* Evitar transform residual que rompe el backdrop-filter del vidrio. */
  -webkit-animation-name: liquidGlassEnter;
  animation-name: liquidGlassEnter;
}

.day-widget::before,
.day-widget::after {
  position: absolute;
  z-index: 0;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.day-widget::before {
  top: -48px;
  right: -36px;
  width: 140px;
  height: 140px;
  background: var(--toolkit-widget-blob, rgba(255, 255, 255, 0.48));
}

.day-widget::after {
  bottom: -28px;
  left: -18px;
  width: 96px;
  height: 96px;
  background: var(--toolkit-widget-blob-soft, rgba(255, 255, 255, 0.26));
}

.day-widget-header,
.day-widget-collapsed-body,
.day-widget-body,
.day-widget-collapsed-panel,
.day-widget-expand-panel,
.empty-widget {
  position: relative;
  z-index: 1;
}

.day-widget-header {
  min-height: 58px;
  padding: 10px 12px 4px;
  background: transparent;
  color: var(--widget-text);
}

.day-widget-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 12px;
  color: var(--toolkit-text-body, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 4px 12px rgba(15, 23, 42, 0.08);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.menu-day-widget .day-widget-icon,
.circular-day-widget .day-widget-icon {
  background: rgba(255, 255, 255, 0.35);
  color: var(--toolkit-text-body, #0f172a);
}

.day-widget-icon i {
  width: 100%;
  height: 100%;
  font-style: normal;
  line-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.day-widget-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  vertical-align: initial;
  color: inherit;
}

.day-widget-heading {
  min-width: 0;
  padding: 4px 0;
  background: transparent;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.day-widget-header h2 {
  font-size: 16px;
  line-height: 19px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.day-widget-header p {
  margin-top: 1px;
  font-size: 12px;
  line-height: 15px;
  font-weight: 700;
}

.day-widget .day-widget-header h2,
.day-widget .day-widget-slide strong {
  color: var(--widget-text);
}

.day-widget .day-widget-header h2 {
  color: var(--widget-text);
  text-shadow: none;
}

.day-widget .day-widget-header p {
  color: var(--widget-muted);
  text-shadow: none;
}

.day-widget .day-widget-slide p,
.day-widget .empty-widget {
  color: var(--widget-muted);
}

.day-widget-header-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 8px;
}

.day-widget-print {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--widget-text);
  font-size: 18px;
  line-height: 1;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
  -webkit-transition: background-color 180ms ease, -webkit-transform 180ms ease;
  transition: background-color 180ms ease, transform 180ms ease;
}

.day-widget-print:hover,
.day-widget-print:focus-visible {
  background: rgba(255, 255, 255, 0.42);
}

.day-widget-print:active {
  -webkit-transform: scale(0.96);
  transform: scale(0.96);
}

.day-widget-expand {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin-left: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--widget-text);
  font-size: 24px;
  line-height: 32px;
  -webkit-transition: -webkit-transform 280ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

.day-widget-collapsed-body {
  padding: 4px 12px 10px;
}

.day-widget-chips {
  margin-bottom: 8px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.day-widget-chips button {
  min-height: 29px;
  margin-right: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--widget-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.menu-day-widget .day-widget-chips button.active,
.circular-day-widget .day-widget-chips button.active {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.55);
  color: var(--toolkit-text-body, #0f172a);
  box-shadow: inset -2px -2px 2px rgba(0, 0, 0, 0.08);
}

.day-widget-slide {
  min-height: 78px;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-animation: dayWidgetSlideIn 260ms ease both;
  animation: dayWidgetSlideIn 260ms ease both;
}

.day-widget-slide strong,
.day-widget-slide p {
  position: relative;
  z-index: 1;
}

.day-widget-slide strong {
  font-size: 12px;
  font-weight: 800;
}

.day-widget-slide p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.day-widget-body {
  padding: 8px 12px 14px;
}

.day-widget-body .day-group {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
}

.day-widget-body .day-group strong {
  color: var(--widget-text);
}

.day-widget-body .day-group p {
  color: var(--widget-muted);
}

.direct-section {
  margin: 0;
  padding: 10px 4px 2px;
}

.direct-section > h2 {
  margin: 0 0 12px;
  color: var(--toolkit-text-body, #111827);
  font-size: 24px;
  line-height: 30px;
  font-weight: 300;
}

.direct-grid {
  margin: 0 -6px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.direct-tile {
  width: 108px;
  min-height: 100px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
}

.direct-tile span {
  width: 62px;
  height: 62px;
  margin: 0 auto 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: -webkit-linear-gradient(135deg, #2563eb, #002569);
  background: linear-gradient(135deg, #2563eb, #002569);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  line-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.direct-tile span svg {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0;
  vertical-align: initial;
  color: #fff;
}

.direct-tile small {
  color: var(--toolkit-text-body, #334155);
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
}

.module-list {
  width: 100%;
  margin: 0 0 24px;
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
}

.module-home-card {
  position: relative;
  width: 100%;
  min-height: 210px;
  height: 100%;
  margin: 0;
  padding: 16px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 37, 105, 0.16);
  -webkit-transform: perspective(900px) translateZ(0);
  transform: perspective(900px) translateZ(0);
  -webkit-transition: box-shadow 280ms ease, -webkit-transform 280ms ease;
  transition: box-shadow 280ms ease, transform 280ms ease;
}

.module-home-card:hover {
  -webkit-transform: perspective(900px) translateY(-2px) rotateX(0.5deg) rotateY(-0.5deg);
  transform: perspective(900px) translateY(-2px) rotateX(0.5deg) rotateY(-0.5deg);
  box-shadow: 0 13px 30px rgba(0, 37, 105, 0.23);
}

.module-home-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 27px;
  line-height: 31px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.module-home-card h2 strong {
  font-weight: 700;
}

.module-home-card h2 span {
  font-weight: 300;
}

.module-home-card p {
  margin: auto 4px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 19px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.module-home-card button {
  width: 140px;
  min-height: 40px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
   PREMIUM OVERRIDE · Menú + Circular (gana en cascada + especificidad)
   (después de liquid-glass original para evitar que transparentes el fondo)
========================================================= */

.day-widget.menu-day-widget,
.day-widget.circular-day-widget {
  position: relative;
  width: 100%;
  min-height: 124px;
  height: auto;
  margin: 0;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  border-radius: 20px;
  transition:
    box-shadow 260ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease;
  isolation: isolate;
}

.day-widget.menu-day-widget:hover,
.day-widget.circular-day-widget:hover {
  transform: translateY(-2px);
}

.day-widget.menu-day-widget .day-widget-effect,
.day-widget.menu-day-widget .day-widget-tint,
.day-widget.circular-day-widget .day-widget-effect,
.day-widget.circular-day-widget .day-widget-tint {
  display: none;
}

.day-widget.menu-day-widget .day-widget-shine,
.day-widget.circular-day-widget .day-widget-shine {
  z-index: 2;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0.7;
  mix-blend-mode: screen;
}

/* ---------- Variante MENÚ (Azul Toolkit Premium) ---------- */
.day-widget.menu-day-widget {
  --widget-text: #0b1220;
  --widget-muted: #172554;
  --widget-accent: #2563eb;
  --widget-blob-strong: rgba(59, 130, 246, 0.34);
  --widget-blob-soft: rgba(251, 191, 36, 0.22);

  color: var(--widget-text);
  border: 1px solid rgba(37, 99, 235, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(251, 191, 36, 0.26), rgba(251, 191, 36, 0) 55%),
    radial-gradient(120% 180% at 0% 100%, rgba(37, 99, 235, 0.28), rgba(37, 99, 235, 0) 55%),
    linear-gradient(160deg, #eff6ff 0%, #dbeafe 45%, #e0e7ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(15, 23, 42, 0.14),
    0 4px 14px rgba(37, 99, 235, 0.16);
}

.day-widget.menu-day-widget::before {
  display: block;
  position: absolute;
  z-index: 0;
  content: "";
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.75;
  top: -70px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: var(--widget-blob-strong);
}

.day-widget.menu-day-widget::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 45%, #fbbf24 100%);
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.25));
  opacity: 0.95;
  z-index: 3;
  pointer-events: none;
}

/* ---------- Variante CIRCULAR (Azul Navy + Oro Toolkit Premium) ---------- */
.day-widget.circular-day-widget {
  --widget-text: #020617;
  --widget-muted: #172554;
  --widget-accent: #1d4ed8;
  --widget-blob-strong: rgba(30, 58, 138, 0.3);
  --widget-blob-soft: rgba(96, 165, 250, 0.26);

  color: var(--widget-text);
  border: 1px solid rgba(30, 58, 138, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(147, 197, 253, 0.34), rgba(147, 197, 253, 0) 55%),
    radial-gradient(120% 180% at 0% 100%, rgba(30, 58, 138, 0.24), rgba(30, 58, 138, 0) 55%),
    linear-gradient(160deg, #f8fafc 0%, #e2e8f0 45%, #eff6ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(15, 23, 42, 0.16),
    0 4px 14px rgba(30, 58, 138, 0.16);
}

.day-widget.circular-day-widget::before {
  display: block;
  position: absolute;
  z-index: 0;
  content: "";
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.75;
  bottom: -60px;
  left: -30px;
  width: 180px;
  height: 180px;
  background: var(--widget-blob-soft);
}

.day-widget.circular-day-widget::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #0f172a 0%, #2563eb 50%, #fbbf24 100%);
  filter: drop-shadow(0 2px 4px rgba(30, 58, 138, 0.28));
  opacity: 0.95;
  z-index: 3;
  pointer-events: none;
}

/* ---------- Premium internals ---------- */
.day-widget.menu-day-widget .day-widget-content,
.day-widget.circular-day-widget .day-widget-content { position: relative; z-index: 3; }

.day-widget.menu-day-widget .day-widget-header,
.day-widget.menu-day-widget .day-widget-collapsed-body,
.day-widget.menu-day-widget .day-widget-body,
.day-widget.menu-day-widget .day-widget-collapsed-panel,
.day-widget.menu-day-widget .empty-widget,
.day-widget.circular-day-widget .day-widget-header,
.day-widget.circular-day-widget .day-widget-collapsed-body,
.day-widget.circular-day-widget .day-widget-body,
.day-widget.circular-day-widget .day-widget-collapsed-panel,
.day-widget.circular-day-widget .empty-widget {
  position: relative;
  z-index: 3;
}

/* ---------- Expand panel: FLOW NORMAL. Animación FLUIDA GRID 0fr → 1fr (sin display:none, height se anima nativamente) ---------- */
.day-widget.menu-day-widget .day-widget-expand-panel,
.day-widget.circular-day-widget .day-widget-expand-panel {
  display: -ms-grid;
  display: grid;
  -ms-grid-rows: 0fr;
  grid-template-rows: 0fr;
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 140;
  margin-top: -2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  will-change: grid-template-rows, opacity, transform, visibility;
  -webkit-transition:
    grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms linear 360ms,
    z-index 0ms linear 0ms;
  transition:
    grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms linear 360ms,
    z-index 0ms linear 0ms;
}

@supports (grid-template-rows: 0fr) {
  .day-widget.menu-day-widget .day-widget-expand-panel,
  .day-widget.circular-day-widget .day-widget-expand-panel {
    -webkit-transition:
      grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 260ms ease,
      transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0ms linear 360ms,
      z-index 0ms linear 0ms;
    transition:
      grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 260ms ease,
      transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0ms linear 360ms,
      z-index 0ms linear 0ms;
  }
}

.day-widget.menu-day-widget .day-widget-expand-panel > .day-widget-panel-inner,
.day-widget.circular-day-widget .day-widget-expand-panel > .day-widget-panel-inner {
  display: block;
  overflow: hidden;
  min-height: 0;
  height: 0;
  -webkit-transition:
    height 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
  transition:
    height 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
}

/* COLLAPSED = state base (grid 0fr, hidden) */
.day-widget.menu-day-widget.collapsed .day-widget-expand-panel,
.day-widget.circular-day-widget.collapsed .day-widget-expand-panel {
  -ms-grid-rows: 0fr;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  z-index: -1;
  -webkit-transition:
    grid-template-rows 280ms cubic-bezier(0.4, 0, 1, 1),
    opacity 180ms ease 60ms,
    transform 280ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0ms linear 280ms,
    z-index 0ms linear 280ms;
  transition:
    grid-template-rows 280ms cubic-bezier(0.4, 0, 1, 1),
    opacity 180ms ease 60ms,
    transform 280ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0ms linear 280ms,
    z-index 0ms linear 280ms;
}

/* EXPANDED = grid 1fr, visible, contenido baja con fluidez */
.day-widget.menu-day-widget.expanded .day-widget-expand-panel,
.day-widget.circular-day-widget.expanded .day-widget-expand-panel {
  -ms-grid-rows: 1fr;
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 140;
  margin-bottom: 10px;
  -webkit-transition:
    grid-template-rows 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease 80ms,
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms linear 0ms,
    z-index 0ms linear 0ms;
  transition:
    grid-template-rows 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease 80ms,
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms linear 0ms,
    z-index 0ms linear 0ms;
}

.day-widget.menu-day-widget.expanded .day-widget-expand-panel > .day-widget-panel-inner,
.day-widget.circular-day-widget.expanded .day-widget-expand-panel > .day-widget-panel-inner {
  height: auto;
}

/* COLLAPSED: collapsed-panel (vista pequeña) siempre visible en collapsed */
.day-widget.menu-day-widget.collapsed .day-widget-collapsed-panel,
.day-widget.circular-day-widget.collapsed .day-widget-collapsed-panel {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  -ms-grid-rows: none !important;
  grid-template-rows: none !important;
  -webkit-transition: opacity 200ms ease, transform 200ms ease;
  transition: opacity 200ms ease, transform 200ms ease;
}

/* EXPANDED: collapsed-panel se oculta con fade-out (más elegante que display none de golpe) */
.day-widget.menu-day-widget.expanded .day-widget-collapsed-panel,
.day-widget.circular-day-widget.expanded .day-widget-collapsed-panel {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  transform: translateY(-4px) scaleY(.96);
  pointer-events: none !important;
  -webkit-transition:
    opacity 160ms ease,
    transform 200ms cubic-bezier(0.4, 0, 1, 1),
    max-height 280ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0ms linear 280ms;
  transition:
    opacity 160ms ease,
    transform 200ms cubic-bezier(0.4, 0, 1, 1),
    max-height 280ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0ms linear 280ms;
}

.day-widget.menu-day-widget.expanded,
.day-widget.circular-day-widget.expanded {
  min-height: 124px !important;
  overflow: visible !important;
  z-index: 120 !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 44px rgba(15, 23, 42, 0.28),
    0 10px 24px rgba(37, 99, 235, 0.22);
  border-radius: 20px;
  -webkit-transition:
    box-shadow 260ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease,
    z-index 0ms linear 0ms;
  transition:
    box-shadow 260ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease,
    z-index 0ms linear 0ms;
}

.day-widget.menu-day-widget,
.day-widget.circular-day-widget {
  overflow: visible;
  -webkit-transition: box-shadow 260ms ease, transform 260ms ease, border-color 260ms ease;
  transition: box-shadow 260ms ease, transform 260ms ease, border-color 260ms ease;
}

.day-widget.menu-day-widget .day-widget-content,
.day-widget.circular-day-widget .day-widget-content {
  position: relative;
  z-index: 3;
  overflow: visible;
  min-height: 124px;
}

/* Expand panel interno body: padding glass blur + border bottom radius + anim fade translate interno */
.day-widget.menu-day-widget .day-widget-body,
.day-widget.circular-day-widget .day-widget-body {
  position: relative;
  z-index: 1;
  max-height: min(520px, 52vh);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0 0 20px 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid color-mix(in srgb, var(--widget-accent) 30%, transparent);
  border-top: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 36px rgba(15, 23, 42, 0.22),
    0 6px 18px rgba(37, 99, 235, 0.18);
  padding: 14px 18px 18px;
  transform-origin: top center;
  -webkit-transition: box-shadow 260ms ease;
  transition: box-shadow 260ms ease;
}

/* day-widget-slide: vista collapsed chip-switch small */
.day-widget.menu-day-widget .day-widget-slide,
.day-widget.circular-day-widget .day-widget-slide {
  display: block;
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  top: auto;
  margin: 0;
  z-index: 1;
  max-height: none;
  overflow: visible;
  border-radius: 0 0 20px 20px;
  border-top: 0 !important;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  padding: 2px 2px 8px;
  animation: none;
  transform-origin: top center;
}

@keyframes floatExpandSlideIn {
  0%   { opacity: 0; transform: translateY(-6px) scaleY(0.96); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

.day-widget.menu-day-widget .day-widget-header,
.day-widget.circular-day-widget .day-widget-header {
  min-height: 62px;
  padding: 14px 16px 8px;
  background: transparent;
  color: var(--widget-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.day-widget.menu-day-widget .day-widget-icon,
.day-widget.circular-day-widget .day-widget-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin-right: 12px;
  border-radius: 14px;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.day-widget.menu-day-widget .day-widget-icon   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.day-widget.circular-day-widget .day-widget-icon { background: linear-gradient(135deg, #1e3a8a, #0f172a); }

.day-widget.menu-day-widget .day-chips button.is-active,
.day-widget.circular-day-widget .day-chips button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--widget-accent), color-mix(in srgb, var(--widget-accent) 70%, #1d4ed8));
  border-color: color-mix(in srgb, var(--widget-accent) 55%, #0f172a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 14px color-mix(in srgb, var(--widget-accent) 30%, transparent);
  transform: translateY(-1px);
}

.day-widget.menu-day-widget .day-widget-slide,
.day-widget.circular-day-widget .day-widget-slide {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border-top: 1px solid color-mix(in srgb, var(--widget-accent) 25%, transparent);
  padding: 14px 16px 16px;
}

.day-widget.menu-day-widget .day-widget-slide h3,
.day-widget.circular-day-widget .day-widget-slide h3 {
  color: var(--widget-muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed color-mix(in srgb, var(--widget-accent) 35%, transparent);
}

@media (min-width: 769px) and (max-width: 1180px) {
  .module-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 980px) {
  .home-editable-block.block-welcome {
    grid-column: span 8;
  }

  .home-editable-block.block-weather {
    grid-column: span 4;
  }

  .module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .direct-tile {
    width: 100px;
  }
}

@media (max-width: 768px) {
  .toolkit-home-content {
    padding: 5px 10px;
  }

  .home-editable-grid {
    display: block;
  }

  .home-editable-block {
    width: 100%;
    margin-bottom: 10px;
  }

  .welcome-block p {
    font-size: 24px;
    line-height: 30px;
  }

  .welcome-block h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .weather-card {
    max-width: none;
  }

  .module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 12px;
  }

  .module-home-card {
    min-height: 190px;
  }
}

@media (max-width: 459px) {
  .module-list {
    grid-template-columns: 1fr;
  }

  .direct-tile {
    width: 92px;
  }
}

@-webkit-keyframes homeBlockWiggle {
  from { -webkit-transform: rotate(-1.4deg); transform: rotate(-1.4deg); }
  to { -webkit-transform: rotate(1.4deg); transform: rotate(1.4deg); }
}

@keyframes homeBlockWiggle {
  from { -webkit-transform: rotate(-1.4deg); transform: rotate(-1.4deg); }
  to { -webkit-transform: rotate(1.4deg); transform: rotate(1.4deg); }
}

@-webkit-keyframes homeInicioIn {
  from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes homeInicioIn {
  from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@-webkit-keyframes dayWidgetSlideIn {
  from { opacity: 0; -webkit-transform: translateX(12px); transform: translateX(12px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@keyframes dayWidgetSlideIn {
  from { opacity: 0; -webkit-transform: translateX(12px); transform: translateX(12px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .home-editable-block.editing,
  .welcome-line,
  .welcome-block h1,
  .day-widget-slide,
  .module-home-card {
    -webkit-animation: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    transition: none !important;
  }

  .day-widget-collapsed-panel,
  .day-widget-expand-panel,
  .day-widget-expand,
  .day-widget-print {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ===== Tab bars globales (módulos + sub-tabs) =====
   Misma altura, tipografía, colores, forma y animación.
   El ancho total varía con el número de opciones (--tab-seg fijo por botón). */
:root {
  --toolkit-tabs-height: 48px;
  --toolkit-tabs-pad: 4px;
  --toolkit-tabs-radius: 10px;
  --toolkit-tabs-seg: 128px;
  --toolkit-tabs-btn-height: 40px;
  --toolkit-tabs-btn-radius: 8px;
  --toolkit-tabs-font-size: 13px;
  --toolkit-tabs-font-weight: 700;
  --toolkit-tabs-margin-x: 0px;
  --toolkit-tabs-margin-bottom: 8px;
  --toolkit-tabs-anim: 380ms;
}

.toolkit-shell .academico-tabs,
.toolkit-shell .colegio-tabs,
.toolkit-shell .compras-tabs,
.toolkit-shell .systems-tabs,
.toolkit-shell .systems-subtabs,
.toolkit-shell .rh-tabs,
.toolkit-shell .enfermeria-tabs,
.toolkit-shell .uniformes-tabs,
.toolkit-shell .reception-tabs,
.toolkit-shell .reception-subtabs,
.toolkit-shell .cap-section-tabs,
.toolkit-shell .profile-tabs,
.toolkit-shell .cap-inventory-tabs,
.toolkit-shell .hik-tabs,
.toolkit-shell .segmented-tabs,
.toolkit-tabbar {
  --tab-seg: var(--toolkit-tabs-seg);
  --tab-index: 0;
  --tab-count: 2;
  position: relative !important;
  box-sizing: border-box !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  width: -webkit-max-content !important;
  width: max-content !important;
  max-width: calc(100% - (var(--toolkit-tabs-margin-x) * 2)) !important;
  min-width: 0 !important;
  height: var(--toolkit-tabs-height) !important;
  min-height: var(--toolkit-tabs-height) !important;
  max-height: var(--toolkit-tabs-height) !important;
  margin: 0 var(--toolkit-tabs-margin-x) var(--toolkit-tabs-margin-bottom) !important;
  padding: var(--toolkit-tabs-pad) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid var(--toolkit-panel-border) !important;
  border-radius: var(--toolkit-tabs-radius) !important;
  background: var(--toolkit-panel-bg) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
  gap: 0 !important;
  -webkit-flex-wrap: nowrap !important;
  flex-wrap: nowrap !important;
  -webkit-box-align: stretch !important;
  -webkit-align-items: stretch !important;
  align-items: stretch !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.toolkit-shell .profile-tabs {
  margin-left: auto !important;
  margin-right: auto !important;
}

.toolkit-shell .academico-tabs::-webkit-scrollbar,
.toolkit-shell .colegio-tabs::-webkit-scrollbar,
.toolkit-shell .compras-tabs::-webkit-scrollbar,
.toolkit-shell .systems-tabs::-webkit-scrollbar,
.toolkit-shell .systems-subtabs::-webkit-scrollbar,
.toolkit-shell .rh-tabs::-webkit-scrollbar,
.toolkit-shell .enfermeria-tabs::-webkit-scrollbar,
.toolkit-shell .uniformes-tabs::-webkit-scrollbar,
.toolkit-shell .reception-tabs::-webkit-scrollbar,
.toolkit-shell .reception-subtabs::-webkit-scrollbar,
.toolkit-shell .cap-section-tabs::-webkit-scrollbar,
.toolkit-shell .profile-tabs::-webkit-scrollbar,
.toolkit-shell .cap-inventory-tabs::-webkit-scrollbar,
.toolkit-shell .hik-tabs::-webkit-scrollbar,
.toolkit-shell .segmented-tabs::-webkit-scrollbar {
  display: none;
  height: 0;
}

/* Indicador deslizante (tab bars principales + sub-tabs) */
.toolkit-shell .academico-tab-indicator,
.toolkit-shell .colegio-tabs__indicator,
.toolkit-shell .compras-tabs > span,
.toolkit-shell .systems-tabs > span,
.toolkit-shell .systems-subtabs > span,
.toolkit-shell .rh-tabs > span,
.toolkit-shell .enfermeria-tabs > span,
.toolkit-shell .uniformes-tabs > span,
.toolkit-shell .reception-tabs > span,
.toolkit-shell .reception-subtabs > span,
.toolkit-shell .cap-section-tab-indicator,
.toolkit-shell .cap-inventory-tabs > span,
.toolkit-shell .cap-students__tab-indicator,
.toolkit-shell .colegio-modal__tab-indicator {
  position: absolute !important;
  z-index: 0 !important;
  top: var(--toolkit-tabs-pad) !important;
  bottom: var(--toolkit-tabs-pad) !important;
  left: var(--toolkit-tabs-pad) !important;
  height: auto !important;
  border: 0 !important;
  border-radius: var(--toolkit-tabs-btn-radius) !important;
  background: var(--toolkit-blue) !important;
  box-shadow: 0 5px 14px rgba(var(--toolkit-blue-rgb), 0.26) !important;
  pointer-events: none !important;
  display: block !important;
}

.toolkit-shell .academico-tab-indicator,
.toolkit-shell .colegio-tabs__indicator,
.toolkit-shell .compras-tabs > span,
.toolkit-shell .systems-tabs > span,
.toolkit-shell .systems-subtabs > span,
.toolkit-shell .rh-tabs > span,
.toolkit-shell .enfermeria-tabs > span,
.toolkit-shell .uniformes-tabs > span,
.toolkit-shell .reception-tabs > span,
.toolkit-shell .reception-subtabs > span,
.toolkit-shell .cap-section-tab-indicator,
.toolkit-shell .cap-inventory-tabs > span {
  width: var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  -webkit-transform: translateX(calc(var(--tab-index, 0) * 100%));
  transform: translateX(calc(var(--tab-index, 0) * 100%));
  -webkit-transition: -webkit-transform var(--toolkit-tabs-anim) cubic-bezier(0.22, 1, 0.36, 1) !important;
  transition: transform var(--toolkit-tabs-anim) cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.toolkit-shell .cap-students__tab-indicator,
.toolkit-shell .colegio-modal__tab-indicator {
  -webkit-transition: -webkit-transform var(--toolkit-tabs-anim) cubic-bezier(0.22, 1, 0.36, 1), width var(--toolkit-tabs-anim) !important;
  transition: transform var(--toolkit-tabs-anim) cubic-bezier(0.22, 1, 0.36, 1), width var(--toolkit-tabs-anim) !important;
}

/* CAP: no animar el indicador al montar (tras el loading de permisos). */
.toolkit-shell .cap-section-tabs:not(.is-ready) .cap-section-tab-indicator {
  -webkit-transition: none !important;
  transition: none !important;
}

/* Botones de tab bar principal / sub-tabs */
.toolkit-shell .academico-tabs button,
.toolkit-shell .colegio-tabs button,
.toolkit-shell .compras-tabs button,
.toolkit-shell .systems-tabs button,
.toolkit-shell .systems-subtabs button,
.toolkit-shell .rh-tabs button,
.toolkit-shell .enfermeria-tabs button,
.toolkit-shell .uniformes-tabs button,
.toolkit-shell .reception-tabs button,
.toolkit-shell .reception-subtabs button,
.toolkit-shell .cap-section-tabs button,
.toolkit-shell .profile-tabs button,
.toolkit-shell .profile-tab,
.toolkit-shell .cap-inventory-tabs button,
.toolkit-shell .hik-tabs button,
.toolkit-shell .segmented-tabs button,
.toolkit-shell .cap-tabs .cap-tab {
  position: relative !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  width: var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  min-width: var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  max-width: var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  height: var(--toolkit-tabs-btn-height) !important;
  min-height: var(--toolkit-tabs-btn-height) !important;
  max-height: var(--toolkit-tabs-btn-height) !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: var(--toolkit-tabs-btn-radius) !important;
  background: transparent !important;
  color: var(--toolkit-text-tab) !important;
  font-size: var(--toolkit-tabs-font-size) !important;
  font-weight: var(--toolkit-tabs-font-weight) !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  cursor: pointer;
  gap: 6px !important;
  -webkit-box-flex: 0 !important;
  -webkit-flex: 0 0 var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  flex: 0 0 var(--tab-seg, var(--toolkit-tabs-seg)) !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-pack: center !important;
  -webkit-justify-content: center !important;
  justify-content: center !important;
  -webkit-transition: color 180ms ease, -webkit-transform 180ms ease !important;
  transition: color 180ms ease, transform 180ms ease !important;
}

.toolkit-shell .academico-tabs button.active,
.toolkit-shell .colegio-tabs button.active,
.toolkit-shell .compras-tabs button.active,
.toolkit-shell .systems-tabs button.active,
.toolkit-shell .systems-subtabs button.active,
.toolkit-shell .rh-tabs button.active,
.toolkit-shell .enfermeria-tabs button.active,
.toolkit-shell .uniformes-tabs button.active,
.toolkit-shell .reception-tabs button.active,
.toolkit-shell .reception-subtabs button.active,
.toolkit-shell .cap-section-tabs button.active,
.toolkit-shell .profile-tabs button.is-active,
.toolkit-shell .profile-tab.is-active,
.toolkit-shell .cap-inventory-tabs button.active,
.toolkit-shell .hik-tabs button.active,
.toolkit-shell .segmented-tabs button.active,
.toolkit-shell .cap-tabs .cap-tab.is-active,
.toolkit-shell .cap-tabs .cap-tab[aria-selected="true"] {
  background: transparent !important;
  color: var(--toolkit-text-tab-active) !important;
  box-shadow: none !important;
}

.toolkit-shell .profile-tabs button.is-active,
.toolkit-shell .profile-tab.is-active {
  /* profile no siempre tiene indicador: el botón activo es la píldora */
  background: var(--toolkit-blue) !important;
  color: var(--toolkit-text-tab-active) !important;
}

.toolkit-shell .academico-tabs button:active,
.toolkit-shell .colegio-tabs button:active,
.toolkit-shell .compras-tabs button:active,
.toolkit-shell .systems-tabs button:active,
.toolkit-shell .systems-subtabs button:active,
.toolkit-shell .rh-tabs button:active,
.toolkit-shell .enfermeria-tabs button:active,
.toolkit-shell .uniformes-tabs button:active,
.toolkit-shell .reception-tabs button:active,
.toolkit-shell .reception-subtabs button:active,
.toolkit-shell .cap-section-tabs button:active,
.toolkit-shell .profile-tab:active,
.toolkit-shell .cap-inventory-tabs button:active,
.toolkit-shell .hik-tabs button:active,
.toolkit-shell .segmented-tabs button:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}

/* ===== Sub-tab bars (modales / editores) — mismas métricas visuales ===== */
.toolkit-shell .rh-form-tabs,
.toolkit-shell .colegio-modal__tabs,
.toolkit-shell .cap-students__tabs,
.toolkit-shell .cap-students__modal--editor .cap-students__tabs {
  position: relative !important;
  box-sizing: border-box !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  height: var(--toolkit-tabs-height) !important;
  min-height: var(--toolkit-tabs-height) !important;
  max-height: var(--toolkit-tabs-height) !important;
  margin: 0 !important;
  padding: var(--toolkit-tabs-pad) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 0 !important;
  border-bottom: 1px solid var(--toolkit-panel-border) !important;
  border-radius: 0 !important;
  background: var(--toolkit-surface) !important;
  box-shadow: none !important;
  gap: 0 !important;
  -webkit-flex-wrap: nowrap !important;
  flex-wrap: nowrap !important;
  -webkit-box-align: stretch !important;
  -webkit-align-items: stretch !important;
  align-items: stretch !important;
}

.toolkit-shell .cap-students__modal--editor .cap-students__tabs {
  width: auto !important;
  margin: 8px 12px !important;
  border: 1px solid var(--toolkit-panel-border) !important;
  border-radius: var(--toolkit-tabs-radius) !important;
  background: var(--toolkit-panel-bg) !important;
}

.toolkit-shell .rh-form-tabs button,
.toolkit-shell .colegio-modal__tabs button,
.toolkit-shell .cap-students__tab,
.toolkit-shell .cap-students__tabs .cap-students__tab {
  position: relative !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
  display: -webkit-inline-box !important;
  display: -webkit-inline-flex !important;
  display: inline-flex !important;
  height: var(--toolkit-tabs-btn-height) !important;
  min-height: var(--toolkit-tabs-btn-height) !important;
  max-height: var(--toolkit-tabs-btn-height) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: var(--toolkit-tabs-btn-radius) !important;
  background: transparent !important;
  color: var(--toolkit-text-tab) !important;
  font-size: var(--toolkit-tabs-font-size) !important;
  font-weight: var(--toolkit-tabs-font-weight) !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: hidden;
  overflow-wrap: break-word;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  cursor: pointer;
  gap: 6px !important;
  -webkit-box-flex: 1 !important;
  -webkit-flex: 1 1 0 !important;
  flex: 1 1 0 !important;
  -webkit-box-align: center !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-box-pack: center !important;
  -webkit-justify-content: center !important;
  justify-content: center !important;
  -webkit-transition: color 180ms ease, background 180ms ease, -webkit-transform 180ms ease !important;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease !important;
}

.toolkit-shell .rh-form-tabs button.active,
.toolkit-shell .colegio-modal__tabs button.active,
.toolkit-shell .cap-students__tab--active,
.toolkit-shell .cap-students__tab.cap-students__tab--active {
  background: var(--toolkit-blue) !important;
  color: var(--toolkit-text-tab-active) !important;
  box-shadow: 0 4px 12px rgba(var(--toolkit-blue-rgb), 0.2) !important;
}

.toolkit-shell .cap-students__modal--editor .cap-students__tabs .cap-students__tab--active {
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .toolkit-shell .academico-tabs,
  .toolkit-shell .colegio-tabs,
  .toolkit-shell .compras-tabs,
  .toolkit-shell .systems-tabs,
  .toolkit-shell .systems-subtabs,
  .toolkit-shell .rh-tabs,
  .toolkit-shell .enfermeria-tabs,
  .toolkit-shell .uniformes-tabs,
  .toolkit-shell .reception-tabs,
  .toolkit-shell .reception-subtabs,
  .toolkit-shell .cap-section-tabs,
  .toolkit-shell .cap-inventory-tabs,
  .toolkit-shell .hik-tabs,
  .toolkit-shell .segmented-tabs {
    max-width: calc(100% - 12px) !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toolkit-shell .academico-tab-indicator,
  .toolkit-shell .colegio-tabs__indicator,
  .toolkit-shell .compras-tabs > span,
  .toolkit-shell .systems-tabs > span,
  .toolkit-shell .systems-subtabs > span,
  .toolkit-shell .rh-tabs > span,
  .toolkit-shell .enfermeria-tabs > span,
  .toolkit-shell .uniformes-tabs > span,
  .toolkit-shell .reception-tabs > span,
  .toolkit-shell .reception-subtabs > span,
  .toolkit-shell .cap-section-tab-indicator,
  .toolkit-shell .cap-inventory-tabs > span,
  .toolkit-shell .cap-students__tab-indicator,
  .toolkit-shell .colegio-modal__tab-indicator {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ===== Padding interno unificado (todos los módulos) ===== */
.toolkit-shell .module-page,
.toolkit-shell .module-screen,
.toolkit-shell .systems-page,
.toolkit-shell .rh-page,
.toolkit-shell .compras-page,
.toolkit-shell .colegio-page,
.toolkit-shell .reception-page,
.toolkit-shell .academico-page,
.toolkit-shell .cap-page,
.toolkit-shell .profile-page,
.toolkit-shell .marketing-page.systems-page,
.toolkit-shell .marketing-page {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: var(--toolkit-page-pad-top) !important;
  padding-right: var(--toolkit-page-pad-x) !important;
  padding-bottom: 0 !important;
  padding-left: var(--toolkit-page-pad-x) !important;
  box-sizing: border-box !important;
}

.toolkit-shell .systems-panel,
.toolkit-shell .rh-panel,
.toolkit-shell .compras-panel,
.toolkit-shell .colegio-tab-panel,
.toolkit-shell .reception-panel,
.toolkit-shell .academico-tab-panel,
.toolkit-shell .cap-page > .async-state,
.toolkit-shell .cap-debts,
.toolkit-shell .cap-inventory,
.toolkit-shell .cap-access,
.toolkit-shell .cap-students {
  padding-right: 0 !important;
  padding-left: 0 !important;
  padding-bottom: var(--toolkit-page-pad-bottom) !important;
  box-sizing: border-box !important;
}

.toolkit-shell .systems-tabs,
.toolkit-shell .systems-subtabs,
.toolkit-shell .rh-tabs,
.toolkit-shell .enfermeria-tabs,
.toolkit-shell .uniformes-tabs,
.toolkit-shell .compras-tabs,
.toolkit-shell .colegio-tabs,
.toolkit-shell .reception-tabs,
.toolkit-shell .reception-subtabs,
.toolkit-shell .academico-tabs,
.toolkit-shell .cap-section-tabs,
.toolkit-shell .cap-inventory-tabs,
.toolkit-shell .hik-tabs,
.toolkit-shell .segmented-tabs,
.toolkit-shell .profile-tabs {
  max-width: 100% !important;
  margin-left: var(--toolkit-tabs-margin-x) !important;
  margin-right: var(--toolkit-tabs-margin-x) !important;
}

@media (max-width: 900px) {
  .toolkit-shell .systems-tabs,
  .toolkit-shell .systems-subtabs,
  .toolkit-shell .rh-tabs,
  .toolkit-shell .enfermeria-tabs,
  .toolkit-shell .uniformes-tabs,
  .toolkit-shell .compras-tabs,
  .toolkit-shell .colegio-tabs,
  .toolkit-shell .reception-tabs,
  .toolkit-shell .reception-subtabs,
  .toolkit-shell .academico-tabs,
  .toolkit-shell .cap-section-tabs,
  .toolkit-shell .cap-inventory-tabs,
  .toolkit-shell .hik-tabs,
  .toolkit-shell .segmented-tabs {
    max-width: 100% !important;
    margin-left: var(--toolkit-tabs-margin-x) !important;
    margin-right: var(--toolkit-tabs-margin-x) !important;
  }

  .toolkit-shell .systems-panel,
  .toolkit-shell .rh-panel,
  .toolkit-shell .compras-panel,
  .toolkit-shell .colegio-tab-panel,
  .toolkit-shell .reception-panel {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
}


.toolkit-shell .marketing-tab-panel,
.toolkit-shell .marketing-tabs {
  padding-right: 0 !important;
  padding-left: 0 !important;
}
.toolkit-shell .marketing-tabs {
  max-width: 100% !important;
  margin-left: var(--toolkit-tabs-margin-x) !important;
  margin-right: var(--toolkit-tabs-margin-x) !important;
  padding: var(--toolkit-tabs-pad) !important;
}

/* Barra global de sincronización offline (cola de asistencia) */
.toolkit-offline-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.toolkit-offline-bar.is-offline {
  background: color-mix(in srgb, #ea580c 12%, var(--toolkit-panel-bg, #fff));
  color: #9a3412;
  border: 1px solid #fdba74;
}

.toolkit-offline-bar.is-online {
  background: color-mix(in srgb, var(--toolkit-blue, #2563eb) 12%, var(--toolkit-panel-bg, #fff));
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}


/* ===== Modo oscuro: chrome shell + left tab bar ===== */
html[data-toolkit-mode='dark'] body,
html[data-toolkit-mode='dark'] .toolkit-shell,
html[data-toolkit-mode='dark'] .toolkit-shell.desktop {
  background: var(--toolkit-shell-bg, #0f172a) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .module-shell,
html[data-toolkit-mode='dark'] .toolkit-shell.desktop .module-shell {
  background-color: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-chrome-border, #334155) !important;
  box-shadow: var(--toolkit-chrome-shadow) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop,
html[data-toolkit-mode='dark'] .toolkit-sidebar.drawer,
html[data-toolkit-mode='dark'] .home-drawer {
  background: var(--toolkit-sidebar-glass, rgba(30, 41, 59, 0.82)) !important;
  border-color: var(--toolkit-chrome-border, #334155) !important;
  box-shadow: var(--toolkit-chrome-shadow) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-panel {
  border-color: var(--toolkit-chrome-border, #334155) !important;
  box-shadow: var(--toolkit-chrome-shadow) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-panel-glass {
  background: var(--toolkit-sidebar-glass, rgba(30, 41, 59, 0.82)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar .module-nav button:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar .drawer-profile-link:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar .drawer-logout:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .module-nav button:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .drawer-profile-link:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .drawer-logout:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .module-nav button:active:not(.selected),
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .drawer-profile-link:active:not(.selected) {
  background: var(--toolkit-sidebar-hover, rgba(255, 255, 255, 0.07)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar .module-nav button.selected,
html[data-toolkit-mode='dark'] .toolkit-sidebar .drawer-profile-link.selected,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .module-nav button.selected,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .drawer-profile-link.selected {
  background: var(--toolkit-sidebar-selected, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: none !important;
}

html[data-toolkit-mode='dark'] .drawer-divider,
html[data-toolkit-mode='dark'] .module-nav-divider,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .drawer-divider,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .module-nav-divider {
  background: var(--toolkit-border, rgba(148, 163, 184, 0.22)) !important;
}

html[data-toolkit-mode='dark'] .sidebar-collapse-button,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-collapse-button,
html[data-toolkit-mode='dark'] .drawer-toolbar > button {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--toolkit-text-sidebar-icon, #cbd5e1) !important;
}

html[data-toolkit-mode='dark'] .sidebar-collapse-button:hover,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-collapse-button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

html[data-toolkit-mode='dark'] .sidebar-toggle-glyph,
html[data-toolkit-mode='dark'] .sidebar-toggle-glyph i {
  border-color: rgba(226, 232, 240, 0.45) !important;
  background: rgba(226, 232, 240, 0.12) !important;
}

html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-logot-wrap,
html[data-toolkit-mode='dark'] .toolkit-sidebar.desktop .sidebar-toolkit-reveal {
  -webkit-filter: none !important;
  filter: none !important;
}

html[data-toolkit-mode='dark'] .drawer-profile-link small {
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .drawer-logout {
  background: rgba(248, 113, 113, 0.12) !important;
  color: var(--toolkit-danger, #f87171) !important;
}

html[data-toolkit-mode='dark'] .toolkit-panel {
  background: var(--toolkit-panel-bg) !important;
  border-color: var(--toolkit-panel-border) !important;
  color: var(--toolkit-text-body) !important;
  box-shadow: var(--toolkit-panel-shadow) !important;
}

/* Home widgets en modo oscuro */
html[data-toolkit-mode='dark'] .weather-card,
html[data-toolkit-mode='dark'] .toolkit-shell .weather-card {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  box-shadow: var(--toolkit-panel-shadow) !important;
  color: var(--toolkit-text-home-weather, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .weather-card strong,
html[data-toolkit-mode='dark'] .toolkit-shell .weather-card strong {
  color: var(--toolkit-text-home-weather, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .weather-card p,
html[data-toolkit-mode='dark'] .toolkit-shell .weather-card p,
html[data-toolkit-mode='dark'] .toolkit-shell .weather-temp small {
  color: var(--toolkit-text-home-weather-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .day-widget:not(.menu-day-widget):not(.circular-day-widget) {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
}

html[data-toolkit-mode='dark'] .menu-day-widget,
html[data-toolkit-mode='dark'] .circular-day-widget {
  --widget-text: var(--toolkit-text-home-widget, #e2e8f0);
  --widget-muted: var(--toolkit-text-home-widget-muted, #94a3b8);
  --widget-accent: var(--toolkit-text-home-widget-muted, #94a3b8);
}

html[data-toolkit-mode='dark'] .day-widget-tint {
  background: var(--toolkit-widget-tint, rgba(30, 41, 59, 0.72)) !important;
}

html[data-toolkit-mode='dark'] .day-widget-shine {
  box-shadow: var(--toolkit-widget-shine) !important;
}

html[data-toolkit-mode='dark'] .day-widget::before,
html[data-toolkit-mode='dark'] .day-widget::after {
  background: var(--toolkit-widget-blob, rgba(148, 163, 184, 0.14)) !important;
}

html[data-toolkit-mode='dark'] .day-widget::after {
  background: var(--toolkit-widget-blob-soft, rgba(148, 163, 184, 0.08)) !important;
}

html[data-toolkit-mode='dark'] .day-widget-expand,
html[data-toolkit-mode='dark'] .day-widget-print {
  border-color: var(--toolkit-panel-border, #334155) !important;
  background: rgba(148, 163, 184, 0.14) !important;
  color: var(--toolkit-text-home-widget, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .day-widget-chips button {
  background: rgba(148, 163, 184, 0.12) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-home-widget-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .day-widget-chips button.active {
  background: var(--toolkit-blue, #3b82f6) !important;
  border-color: var(--toolkit-blue, #3b82f6) !important;
  color: #fff !important;
}

html[data-toolkit-mode='dark'] .day-group {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-left-color: var(--toolkit-blue, #3b82f6) !important;
}

html[data-toolkit-mode='dark'] .day-group strong {
  color: var(--toolkit-blue, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .day-group p,
html[data-toolkit-mode='dark'] .empty-widget {
  color: var(--toolkit-text-home-widget, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .direct-section > h2,
html[data-toolkit-mode='dark'] .direct-tile {
  color: var(--toolkit-text-home-welcome, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .day-widget-slide {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: rgba(15, 23, 42, 0.35) !important;
}

html[data-toolkit-mode='dark'] .day-widget-slide strong {
  color: var(--toolkit-text-home-widget, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .day-widget-slide p {
  color: var(--toolkit-text-home-widget-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .menu-day-widget .day-widget-chips button.active,
html[data-toolkit-mode='dark'] .circular-day-widget .day-widget-chips button.active {
  background: rgba(59, 130, 246, 0.35) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

/* ===== Modo oscuro · paneles/modulos compartidos ===== */
html[data-toolkit-mode='dark'] .toolkit-shell .module-page,
html[data-toolkit-mode='dark'] .toolkit-shell .module-screen,
html[data-toolkit-mode='dark'] .toolkit-shell .messages-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .floating-messages-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .floating-chat-dock {
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .module-page > h1,
html[data-toolkit-mode='dark'] .toolkit-shell .module-screen > h1,
html[data-toolkit-mode='dark'] .toolkit-shell .module-page h2,
html[data-toolkit-mode='dark'] .toolkit-shell .module-page h3,
html[data-toolkit-mode='dark'] .toolkit-shell .module-form h2,
html[data-toolkit-mode='dark'] .toolkit-shell .module-form h3 {
  color: var(--toolkit-text-title, #f8fafc);
}

html[data-toolkit-mode='dark'] .toolkit-shell input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
html[data-toolkit-mode='dark'] .toolkit-shell select,
html[data-toolkit-mode='dark'] .toolkit-shell textarea {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell input::placeholder,
html[data-toolkit-mode='dark'] .toolkit-shell textarea::placeholder {
  color: var(--toolkit-text-muted, #94a3b8);
  opacity: 0.85;
}

html[data-toolkit-mode='dark'] .message-list article.mine {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 28%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .file-button,
html[data-toolkit-mode='dark'] .message-emoji-picker button:hover {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .systems-history-card footer button,
html[data-toolkit-mode='dark'] .toolkit-shell .data-table tbody tr:active,
html[data-toolkit-mode='dark'] .toolkit-shell .data-table tbody tr:hover {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-section-heading {
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--toolkit-blue, #3b82f6) 14%, var(--toolkit-panel-bg, #1e293b)),
    var(--toolkit-panel-bg, #1e293b)
  ) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-filter-row button.active,
html[data-toolkit-mode='dark'] .toolkit-shell .marketing-history-filters button.active {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 22%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .error-boundary,
html[data-toolkit-mode='dark'] .async-state,
html[data-toolkit-mode='dark'] .data-table-wrap,
html[data-toolkit-mode='dark'] .module-form,
html[data-toolkit-mode='dark'] .module-card,
html[data-toolkit-mode='dark'] .module-panel,
html[data-toolkit-mode='dark'] .profile-card,
html[data-toolkit-mode='dark'] .settings-card {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .data-table th,
html[data-toolkit-mode='dark'] .data-table td {
  border-bottom-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .data-table th {
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

/**
 * Puente de modo oscuro para módulos / submódulos.
 * Reasigna tokens locales y corrige superficies hardcodeadas
 * cuando html[data-toolkit-mode='dark'] está activo.
 */

/* —— Tokens de módulo → vars Toolkit —— */
html[data-toolkit-mode='dark'] .enf-module {
  --enf-ink: var(--toolkit-text-title, #f8fafc);
  --enf-muted: var(--toolkit-text-muted, #94a3b8);
  --enf-line: var(--toolkit-panel-border, #334155);
  --enf-soft: color-mix(in srgb, #0d9488 14%, var(--toolkit-panel-bg, #1e293b));
  color: var(--enf-ink);
}

html[data-toolkit-mode='dark'] .uni-module {
  --uni-ink: var(--toolkit-text-title, #f8fafc);
  --uni-muted: var(--toolkit-text-muted, #94a3b8);
  --uni-line: var(--toolkit-panel-border, #334155);
  --uni-soft: color-mix(in srgb, #c2410c 16%, var(--toolkit-panel-bg, #1e293b));
  color: var(--uni-ink);
}

html[data-toolkit-mode='dark'] .apple-inventory,
html[data-toolkit-mode='dark'] .apple-modal-backdrop {
  --apple-text: var(--toolkit-text-title, #f8fafc);
  --apple-muted: var(--toolkit-text-muted, #94a3b8);
  --apple-border: var(--toolkit-panel-border, #334155);
  --apple-card: var(--toolkit-panel-bg, #1e293b);
  --apple-surface: var(--toolkit-surface, #0f172a);
  --apple-accent-soft: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, transparent);
  --apple-chip-active: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 22%, transparent);
}

html[data-toolkit-mode='dark'] {
  --cap-ink: var(--toolkit-text-title, #f8fafc);
  --cap-muted: var(--toolkit-text-muted, #94a3b8);
  --cap-line: var(--toolkit-panel-border, #334155);
  --cap-line-soft: color-mix(in srgb, var(--toolkit-panel-border, #334155) 70%, transparent);
  --cap-surface: var(--toolkit-panel-bg, #1e293b);
  --cap-canvas: var(--toolkit-surface, #0f172a);
  --cap-indigo-soft: color-mix(in srgb, #6366f1 18%, var(--toolkit-panel-bg, #1e293b));
  --cap-success-soft: color-mix(in srgb, #4ade80 14%, var(--toolkit-panel-bg, #1e293b));
  --cap-warning-soft: color-mix(in srgb, #fbbf24 14%, var(--toolkit-panel-bg, #1e293b));
  --cap-danger-soft: color-mix(in srgb, #f87171 14%, var(--toolkit-panel-bg, #1e293b));
  --cap-info-soft: color-mix(in srgb, #38bdf8 14%, var(--toolkit-panel-bg, #1e293b));
  --cap-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --cap-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  --cap-shadow-modal: 0 32px 90px rgba(0, 0, 0, 0.5);
}

html[data-toolkit-mode='dark'] .cap-accesos,
html[data-toolkit-mode='dark'] .hik-accesos,
html[data-toolkit-mode='dark'] [class*='hik-'] {
  --hik-bg: var(--toolkit-panel-bg, #1e293b);
  --hik-bg-mid: var(--toolkit-surface, #0f172a);
  --hik-text: var(--toolkit-text-title, #f8fafc);
  --hik-muted: var(--toolkit-text-muted, #94a3b8);
  --hik-card-bg: var(--toolkit-panel-bg, #1e293b);
  --hik-card-border: var(--toolkit-panel-border, #334155);
  --hik-photo-bg: rgba(148, 163, 184, 0.1);
  --hik-enroll-border: rgba(148, 163, 184, 0.28);
  --hik-empty-bg: rgba(30, 41, 59, 0.75);
  --hik-overlay: rgba(15, 23, 42, 0.92);
}

html[data-toolkit-mode='dark'] .enf-wa-page {
  --enf-wa-ink: var(--toolkit-text-title, #f8fafc);
  --enf-wa-muted: var(--toolkit-text-muted, #94a3b8);
  --enf-wa-line: color-mix(in srgb, #0f766e 28%, var(--toolkit-panel-border, #334155));
  --enf-wa-panel: var(--toolkit-panel-bg, #1e293b);
  --enf-wa-soft: color-mix(in srgb, #0f766e 14%, var(--toolkit-panel-bg, #1e293b));
  --enf-wa-chat-bg: color-mix(in srgb, #0f766e 10%, var(--toolkit-surface, #0f172a));
  --enf-wa-out: color-mix(in srgb, #0d9488 28%, var(--toolkit-panel-bg, #1e293b));
  --enf-wa-in: var(--toolkit-panel-bg, #1e293b);
}

/* —— Superficies / tipografía genéricas de módulos —— */
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-section-card,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-sticky-save,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-catalog__tools,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-entity-card,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-media-card,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-service-card,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-enroll-box,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-person-toolbar,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-toolbar,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-person-card,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-list > article,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-department-summary,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-stat-pills article,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-person-editor,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-settings-menu,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table-wrap,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-dropdown,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-avatar-preview,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-card,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__card,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__modal,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__filters,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__count-footer,
html[data-toolkit-mode='dark'] .toolkit-shell .module-count-footer,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__section,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__settings-menu,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__sort-menu,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-card,
html[data-toolkit-mode='dark'] .toolkit-shell .mk-photos-frame,
html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .compras-card,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-card,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-save-success,
html[data-toolkit-mode='dark'] .toolkit-shell .photo-frame-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .filter-combo__panel,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-datepicker,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-datepicker__panel {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
  box-shadow: var(--toolkit-panel-shadow) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .colegio-field input,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-field select,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-field textarea,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-search,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-field > div,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-form-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-class-toggle,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-position-row,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-month,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__detail,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__chip:not(.cap-students__chip--active),
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-schedule__day,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-asset-picker {
  background: var(--toolkit-surface, #0f172a) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

/* —— RH checador (tabla sticky) —— */
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-live {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-toggle {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-toggle.active,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-toggle[aria-expanded='true'] {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 22%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: var(--toolkit-blue, #3b82f6) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table th,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table td {
  border-bottom-color: var(--toolkit-panel-border, #334155) !important;
  border-right-color: color-mix(in srgb, var(--toolkit-panel-border, #334155) 55%, transparent) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table thead th {
  background: var(--toolkit-surface, #0f172a) !important;
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table th.sticky-col,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table td.sticky-col {
  background: var(--toolkit-panel-bg, #1e293b) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-table thead th.sticky-col {
  background: var(--toolkit-surface, #0f172a) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-emp-avatar {
  background: var(--toolkit-surface, #0f172a) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-dropdown button {
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-dropdown button:hover,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-dept-dropdown button.is-selected {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-checker-info-btn {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-blue, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-btn.ghost,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-filter-row button:not(.active):not(.danger),
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-button--ghost,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-filter-chips button:not(.active) {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-gear {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 35%, var(--toolkit-panel-border, #334155)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-settings-menu button:hover {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-person-card__photo-wrap,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-avatar img {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 14%, var(--toolkit-surface, #0f172a)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-hero {
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--toolkit-blue, #3b82f6) 22%, var(--toolkit-panel-bg, #1e293b)),
    var(--toolkit-panel-bg, #1e293b)
  ) !important;
  color: var(--toolkit-text-title, #f8fafc) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-search button {
  background: var(--toolkit-surface, #0f172a) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-list > article > section {
  border-top-color: var(--toolkit-panel-border, #334155) !important;
}

/* —— Enfermería —— */
html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear {
  background: color-mix(in srgb, #0d9488 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, #0d9488 35%, var(--toolkit-panel-border, #334155)) !important;
  color: #5eead4 !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear:hover {
  background: color-mix(in srgb, #0d9488 24%, var(--toolkit-panel-bg, #1e293b)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs {
  background: color-mix(in srgb, #0d9488 12%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, #0d9488 28%, var(--toolkit-panel-border, #334155)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs button {
  color: #5eead4 !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-wa-toolbar {
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.16), transparent 42%),
    var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--enf-wa-line, #334155) !important;
}

/* —— CAP students —— */
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students {
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__search,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__select,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__input {
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__button--soft,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__gear {
  background: color-mix(in srgb, #6366f1 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, #6366f1 35%, var(--toolkit-panel-border, #334155)) !important;
  color: #a5b4fc !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__settings-menu button:hover,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__sort-menu button:hover {
  background: color-mix(in srgb, #6366f1 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: #a5b4fc !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__sort-menu button.is-active {
  background: color-mix(in srgb, #6366f1 22%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: #c7d2fe !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__photo-wrap {
  background: color-mix(in srgb, #6366f1 14%, var(--toolkit-surface, #0f172a)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__card-edit {
  background: rgba(30, 41, 59, 0.94) !important;
  color: #a5b4fc !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-page {
  background:
    radial-gradient(circle at 6% 0, rgba(99, 102, 241, 0.14), transparent 30%),
    var(--cap-canvas, var(--toolkit-surface, #0f172a)) !important;
  color: var(--cap-ink, var(--toolkit-text-body, #e2e8f0)) !important;
}

/* —— Accesos Hik —— */
html[data-toolkit-mode='dark'] .toolkit-shell .cap-accesos,
html[data-toolkit-mode='dark'] .toolkit-shell [class^='hik-'] {
  color: var(--hik-text, var(--toolkit-text-body, #e2e8f0));
}

/* —— Colegio —— */
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-section-card__head > span,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-service-icon {
  background: color-mix(in srgb, var(--section-accent, var(--toolkit-blue, #3b82f6)) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--section-accent, var(--toolkit-blue, #60a5fa)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .colegio-sticky-save {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)),
    var(--toolkit-panel-bg, #1e293b) 50%,
    color-mix(in srgb, var(--toolkit-blue, #3b82f6) 10%, var(--toolkit-panel-bg, #1e293b))
  ) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .colegio-form-section:hover {
  border-color: color-mix(in srgb, var(--section-accent, var(--toolkit-blue, #3b82f6)) 35%, var(--toolkit-panel-border, #334155)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .colegio-card-actions button {
  background: rgba(30, 41, 59, 0.94) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .colegio-logo-box {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* —— Soft tints claros → oscuros —— */
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module [style*='background: #fff'],
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module [style*='background: #fff'] {
  background: var(--toolkit-panel-bg, #1e293b) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-person-card__status:not(.down),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-counts span,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-list header > b:not(.inactive),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-position-row > b:not(.inactive),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-stat-pills span {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 22%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-list header > button:not(.rh-org-collapse),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-position-row > button:not(.delete) {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

/* —— WhatsApp CAP: fondos blancos residuales —— */
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-page,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-toolbar,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-inbox,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-chat,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-thread,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-composer,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-list,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-panel {
  background: var(--cap-surface, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: var(--cap-line, var(--toolkit-panel-border, #334155)) !important;
  color: var(--cap-ink, var(--toolkit-text-body, #e2e8f0));
}

/* —— Shared —— */
html[data-toolkit-mode='dark'] .toolkit-shell .tk-combo__menu,
html[data-toolkit-mode='dark'] .toolkit-shell .filter-combo__menu,
html[data-toolkit-mode='dark'] .toolkit-shell .global-search-field,
html[data-toolkit-mode='dark'] .toolkit-shell .global-search-results,
html[data-toolkit-mode='dark'] .toolkit-shell .notifications-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .floating-messages-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .floating-chat-dock,
html[data-toolkit-mode='dark'] .toolkit-shell .messages-panel {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .tk-save-success,
html[data-toolkit-mode='dark'] .tk-save-success-backdrop .tk-save-success {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
  border-color: var(--toolkit-panel-border, #334155);
}

html[data-toolkit-mode='dark'] .tk-save-success h2 {
  color: var(--toolkit-text-title, #f8fafc) !important;
}

html[data-toolkit-mode='dark'] .tk-save-success p {
  color: var(--toolkit-text-muted, #94a3b8) !important;
}

/* —— Offline bar —— */
html[data-toolkit-mode='dark'] .toolkit-offline-bar.is-offline {
  background: color-mix(in srgb, #f59e0b 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: #fbbf24 !important;
  border-color: color-mix(in srgb, #f59e0b 40%, transparent) !important;
}

html[data-toolkit-mode='dark'] .toolkit-offline-bar.is-online {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 18%, var(--toolkit-panel-bg, #1e293b)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
  border-color: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 40%, transparent) !important;
}

/* —— Gradientes light soft residuales en paneles —— */
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-settings-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-card,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-sheet,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-notebook,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-entry,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-form,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-detail,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-historial,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-module .enf-search,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-sheet,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-card,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-editor,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-module .uni-list,
html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-card,
html[data-toolkit-mode='dark'] .toolkit-shell .marketing-card,
html[data-toolkit-mode='dark'] .toolkit-shell .profile-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .theme-studio,
html[data-toolkit-mode='dark'] .toolkit-shell .theme-studio-card {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

/* Soft accent surfaces that stay pastel in light mode */
html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-levels button:not(.active),
html[data-toolkit-mode='dark'] .toolkit-shell .enf-btn:not(.primary):not(.danger),
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__button--soft,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-students__gear,
html[data-toolkit-mode='dark'] .toolkit-shell .rh-gear:not([aria-expanded='true']),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-filter-row button:not(.active):not(.danger),
html[data-toolkit-mode='dark'] .toolkit-shell .rh-org-counts span,
html[data-toolkit-mode='dark'] .toolkit-shell .colegio-enrolled__hero {
  background: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 14%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, var(--toolkit-blue, #3b82f6) 28%, var(--toolkit-panel-border, #334155)) !important;
  color: var(--toolkit-text-link, #60a5fa) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs button {
  background: color-mix(in srgb, #0d9488 14%, var(--toolkit-panel-bg, #1e293b)) !important;
  border-color: color-mix(in srgb, #0d9488 28%, var(--toolkit-panel-border, #334155)) !important;
  color: #5eead4 !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .enf-settings-tabs button.is-active,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-gear[aria-expanded='true'] {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #fff !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .hik-accesos {
  --hik-bg: var(--toolkit-panel-bg, #1e293b);
  --hik-bg-mid: var(--toolkit-surface, #0f172a);
  --hik-text: var(--toolkit-text-title, #f8fafc);
  --hik-muted: var(--toolkit-text-muted, #94a3b8);
  --hik-card-bg: var(--toolkit-panel-bg, #1e293b);
  --hik-card-border: var(--toolkit-panel-border, #334155);
  --hik-photo-bg: rgba(148, 163, 184, 0.1);
  --hik-enroll-border: rgba(148, 163, 184, 0.28);
  --hik-empty-bg: rgba(30, 41, 59, 0.75);
  --hik-overlay: rgba(15, 23, 42, 0.92);
  color: var(--hik-text);
}

html[data-toolkit-mode='dark'] .toolkit-shell .date-picker,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-date-picker,
html[data-toolkit-mode='dark'] .toolkit-shell .react-datepicker,
html[data-toolkit-mode='dark'] .toolkit-shell .dp-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .shared-datepicker,
html[data-toolkit-mode='dark'] .toolkit-shell [class*='datepicker'] {
  background: var(--toolkit-panel-bg, #1e293b);
  border-color: var(--toolkit-panel-border, #334155);
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .mk-photos-row:hover,
html[data-toolkit-mode='dark'] .toolkit-shell .mk-photos-frame,
html[data-toolkit-mode='dark'] .toolkit-shell .marketing-photo-card {
  background: var(--toolkit-surface, #0f172a) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .compras-card,
html[data-toolkit-mode='dark'] .toolkit-shell .compras-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .compras-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-card,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-history-card,
html[data-toolkit-mode='dark'] .toolkit-shell .profile-card,
html[data-toolkit-mode='dark'] .toolkit-shell .login-screen-card,
html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-panel,
html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-card {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

/* Tablas genéricas restantes */
html[data-toolkit-mode='dark'] .toolkit-shell table thead th {
  background: var(--toolkit-surface, #0f172a);
  color: var(--toolkit-text-muted, #94a3b8);
  border-color: var(--toolkit-panel-border, #334155);
}

html[data-toolkit-mode='dark'] .toolkit-shell table tbody td {
  border-color: var(--toolkit-panel-border, #334155);
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-btn:not(.primary),
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-zoom > button,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-pad button,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-auto {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-auto,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-zoom > button,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-pad button {
  color: #c4b5fd !important;
  background: color-mix(in srgb, #7c3aed 16%, var(--toolkit-panel-bg, #1e293b)) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .tk-photo-frame-zoom > span {
  color: #ddd6fe !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .filter-combo__panel,
html[data-toolkit-mode='dark'] .toolkit-shell .filter-combo__menu,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-combo__panel,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-combo__menu,
html[data-toolkit-mode='dark'] .toolkit-shell .tk-date__panel {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-bubble,
html[data-toolkit-mode='dark'] .toolkit-shell .cap-wa-msg,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-wa-bubble,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-wa-msg {
  border-color: var(--toolkit-panel-border, #334155);
}

html[data-toolkit-mode='dark'] .toolkit-shell .recepcion-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .reception-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .marketing-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .uni-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .enf-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .enfermeria-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .compras-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .profile-tabs {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
}

html[data-toolkit-mode='dark'] .toolkit-shell .reception-intro {
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--toolkit-blue, #3b82f6) 16%, var(--toolkit-panel-bg, #1e293b)),
    var(--toolkit-panel-bg, #1e293b)
  ) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .reception-card,
html[data-toolkit-mode='dark'] .toolkit-shell .reception-period,
html[data-toolkit-mode='dark'] .toolkit-shell .reception-calendar__day,
html[data-toolkit-mode='dark'] .toolkit-shell .reception-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .monthly-images > section,
html[data-toolkit-mode='dark'] .toolkit-shell .monthly-images__head,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-tabs,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-search,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-history,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-history-card,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-btn.ghost,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-modal,
html[data-toolkit-mode='dark'] .toolkit-shell .systems-card,
html[data-toolkit-mode='dark'] .toolkit-shell .menu-filters button:not(.active),
html[data-toolkit-mode='dark'] .toolkit-shell .reception-btn.ghost {
  background: var(--toolkit-panel-bg, #1e293b) !important;
  border-color: var(--toolkit-panel-border, #334155) !important;
  color: var(--toolkit-text-body, #e2e8f0);
}

html[data-toolkit-mode='dark'] .toolkit-shell .reception-calendar__day > div,
html[data-toolkit-mode='dark'] .toolkit-shell .menu-food-chips > span {
  background: var(--toolkit-surface, #0f172a) !important;
}

