:root,
[data-bs-theme="light"] {
  --bs-primary: #bf0000;
  --bs-primary-rgb: 191, 0, 0;
  /* Compatibilidad con algunas versiones de Sneat */
  --primary: #bf0000;
}


.btn-primary {
  --bs-btn-bg: #bf0000;
  --bs-btn-border-color: #bf0000;
  --bs-btn-hover-bg: #a00000;
  --bs-btn-hover-border-color: #a00000;
  --bs-btn-active-bg: #850000;
  --bs-btn-active-border-color: #850000;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

  .fade-in:nth-child(1) {
    animation-delay: 0.1s;
  }

  .fade-in:nth-child(2) {
    animation-delay: 0.2s;
  }

  .fade-in:nth-child(3) {
    animation-delay: 0.3s;
  }

  .fade-in:nth-child(4) {
    animation-delay: 0.4s;
  }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeInLeft 0.5s ease-out forwards;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* Shared header: keep long names readable at narrow widths. */
#layout-navbar {
  block-size: auto;
  min-block-size: 4rem;
  padding-block: .625rem;
}

.sge-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "date name" "date role";
  align-items: center;
  gap: .125rem 1rem;
  flex: 1;
  min-width: 0;
  color: var(--bs-heading-color);
}

.sge-topbar-name {
  grid-area: name;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.sge-topbar-role {
  grid-area: role;
  font-size: .875rem;
  line-height: 1.5;
}

.sge-topbar-name,
.sge-topbar-role {
  text-align: right;
  overflow-wrap: anywhere;
}

.sge-topbar-date {
  grid-area: date;
  font-size: .875rem;
  line-height: 1.5;
}

.sge-topbar-date-short {
  display: none;
}

.sge-topbar-toggle {
  flex-shrink: 0;
  margin-inline-end: .75rem;
}

.sge-topbar-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--bs-heading-color);
}

.sge-topbar-menu:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  #layout-navbar.navbar-detached {
    padding-inline: .75rem;
  }

  .sge-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name name" "role date";
    column-gap: .5rem;
  }

  .sge-topbar-name,
  .sge-topbar-role {
    text-align: left;
  }

  .sge-topbar-date-full {
    display: none;
  }

  .sge-topbar-date-short {
    display: inline;
    white-space: nowrap;
  }
}

@media (max-width: 359.98px) {
  .sge-topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "role" "date";
  }
}

.sge-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.sge-table {
  min-width: 760px;
}

.sge-table th {
  white-space: nowrap;
}

.sge-table .sge-cell-truncate {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sge-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
  white-space: nowrap;
}

.sge-table-actions .btn-icon {
  width: 2rem;
  height: 2rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  padding: 1rem 1.5rem .75rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: .9rem 1.5rem 1rem;
}

.dataTables_wrapper .dataTables_filter input {
  min-width: min(280px, 70vw);
  margin-left: 0;
}

.dataTables_wrapper .pagination {
  margin-bottom: 0;
}

.sge-form-card {
  max-width: 1100px;
  margin-inline: auto;
}

@media (max-width: 767.98px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    padding-inline: 1rem;
    text-align: left;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
  }
}

/* Perfil de soporte informático */
.sge-role-ti, .sge-topbar-role.sge-role-ti { background-color: #d9f3f0; color: #075c54; border: 1px solid #83cfc5; font-weight: 700; }
