/*
 * RUD Primatura - Ajustes de marca institucional sobre la plantilla base.
 * Se mantiene el esquema de color original de FlexAdmin (acento teal),
 * sin desviarse del diseño de la plantilla. Solo sobrescribe variables,
 * no modifica los archivos originales de la plantilla.
 */

:root {
  --accent-color: #0ea5a4;
}

.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.page-loading-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.page-loading-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(14, 165, 164, 0.2);
  border-top-color: var(--accent-color);
  animation: page-loading-spin 0.7s linear infinite;
}

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

.notification-mark-all-read {
  border: 0;
  background: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--accent-color);
  white-space: nowrap;
  cursor: pointer;
}

.notification-mark-all-read:hover {
  text-decoration: underline;
}

/*
 * Logout is a POST form for CSRF safety, but must look identical to the
 * template's original <a> links - reset the <button> chrome so the
 * template's existing classes (user-menu-logout, sidebar-footer-action,
 * mobile-menu-item) render the same regardless of element type.
 */
.btn-unstyled {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  text-align: inherit;
}

.fauth-card-logo {
  height: 64px;
  width: auto;
  margin-bottom: 12px;
}

.fauth-visual-title {
  font-size: 1.3rem;
  margin-top: 24px;
}

/*
 * Correspondencias submenu uses small plain icons instead of the
 * template's default nav-dot bullets - sized to sit inline with the
 * submenu's own tighter font-size/gap rather than the full nav-icon
 * box built for top-level items.
 */
.sidebar .nav-submenu-icon {
  flex-shrink: 0;
  width: 14px;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.6;
}

.sidebar .nav-submenu > li > .nav-link.active .nav-submenu-icon {
  opacity: 1;
}

/*
 * Document tables sit in a card-body with padding removed (p-0) so the
 * table itself runs edge-to-edge, but that leaves the datatable's own
 * search box, pagination row, and outer table columns flush against
 * the card border with nothing to separate them. Scoped to
 * .datatable-table specifically (the class simple-datatables adds to
 * an initialized table) so plain non-datatable tables are untouched.
 */
.card-body.p-0 .datatable-top,
.card-body.p-0 .datatable-bottom {
  padding-left: 20px;
  padding-right: 20px;
}

.card-body.p-0 table.datatable-table > thead > tr > th:first-child,
.card-body.p-0 table.datatable-table > tbody > tr > td:first-child {
  padding-left: 20px;
}

.card-body.p-0 table.datatable-table > thead > tr > th:last-child,
.card-body.p-0 table.datatable-table > tbody > tr > td:last-child {
  padding-right: 20px;
}

/*
 * Header profile trigger: name/role have no width limit or truncation
 * in the template, so a long role name (even the abbreviated "Ministro
 * SG") can overlap the chevron icon or the search bar next to it
 * instead of just clipping cleanly.
 */
.user-brief {
  max-width: 150px;
}

.user-name,
.user-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
