﻿:root{
  --plantel-primary:#1E3A8A;
}

a { text-decoration: none; }

/* Ajustes de sobriedad */
.page-content{ padding-top: 24px; }
.card{ border-radius: 10px; }

/* Marca Plantel */
.btn-primary{
  background-color: var(--plantel-primary) !important;
  border-color: var(--plantel-primary) !important;
}

/* ========================================
   ESTILOS PARA COMPONENTES DEL TOPBAR
   ======================================== */

/* Header / TopBar */
#page-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1001;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(56, 65, 74, 0.15);
}

.navbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0 1rem 0 0;
  height: 70px;
}

.navbar-header > .d-flex {
  display: flex;
  align-items: center;
  gap: 0;
}

.navbar-header > .d-flex:first-child {
  margin-left: -0.5rem;
}

/* Botón del menú hamburguesa */
.btn.btn-sm.header-item {
  height: 70px;
  width: auto;
  min-width: 50px;
  padding: 0 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  color: #74788d;
  transition: all 0.4s;
  font-size: 20px;
}

.btn.btn-sm.header-item:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.btn.btn-sm.header-item:focus {
  outline: none;
  box-shadow: none;
}

.btn.btn-sm.header-item i.mdi {
  font-size: 24px;
  line-height: 1;
}

/* Logo / Brand */
.navbar-brand-box {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 70px;
}

.navbar-brand-box span {
  font-size: 20px;
  font-weight: 600;
  color: var(--plantel-primary);
  line-height: 1;
  white-space: nowrap;
}

.header-item {
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  color: #74788d;
  transition: all 0.4s;
  padding: 0 0.75rem;
  cursor: pointer;
}

.header-item:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.header-item:focus {
  outline: none;
  box-shadow: none;
}

.header-item.noti-icon {
  padding: 0 1rem;
  position: relative;
}

.icon-sm {
  height: 20px;
  width: 20px;
  font-size: 20px;
}

/* Avatar en header */
.header-profile-user {
  height: 32px;
  width: 32px;
  object-fit: cover;
}

.avatar-title.header-profile-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

/* User Profile Dropdown */
.header-item.user {
  padding: 0 1rem;
  gap: 0.5rem;
}

.user-item-desc {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  max-width: 150px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub-title {
  font-size: 11px;
  color: #74788d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges en iconos de notificación */
.noti-icon .badge {
  position: absolute;
  top: 18px;
  right: 8px;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 5px;
  min-width: 18px;
  text-align: center;
}

/* Dropdown menus */
.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 4px rgba(15, 34, 58, 0.12);
  animation: DropDownSlide 0.3s ease-out;
}

@keyframes DropDownSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu-lg {
  min-width: 320px;
}

.dropdown-header {
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #495057;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Dropdown items */
.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #495057;
  transition: all 0.15s;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.dropdown-item.active {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--plantel-primary);
}

.dropdown-item.unread {
  background-color: rgba(var(--bs-primary-rgb), 0.05);
  border-left: 3px solid var(--plantel-primary);
  font-weight: 500;
}

/* Notify items */
.notify-item {
  padding: 0.75rem 1rem;
}

.notify-item:hover {
  background-color: #f8f9fa;
}

/* Avatares */
.avatar-xs {
  height: 1.5rem;
  width: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-sm {
  height: 2rem;
  width: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.rounded-circle {
  border-radius: 50% !important;
}

/* Soft backgrounds */
.bg-soft-primary {
  background-color: rgba(30, 58, 138, 0.18) !important;
}

.bg-soft-success {
  background-color: rgba(5, 150, 105, 0.18) !important;
}

.bg-soft-info {
  background-color: rgba(14, 165, 233, 0.18) !important;
}

.bg-soft-warning {
  background-color: rgba(245, 158, 11, 0.18) !important;
}

.bg-soft-danger {
  background-color: rgba(239, 68, 68, 0.18) !important;
}

.bg-soft-secondary {
  background-color: rgba(108, 117, 125, 0.18) !important;
}

/* Text colors */
.text-primary { color: var(--plantel-primary) !important; }
.text-success { color: #059669 !important; }
.text-info { color: #0ea5e9 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.text-muted { color: #74788d !important; }

/* Badges soft */
.badge-soft-primary { 
  background-color: rgba(30, 58, 138, 0.18);
  color: var(--plantel-primary);
}

.badge-soft-success { 
  background-color: rgba(5, 150, 105, 0.18);
  color: #059669;
}

.badge-soft-info { 
  background-color: rgba(14, 165, 233, 0.18);
  color: #0ea5e9;
}

.badge-soft-warning { 
  background-color: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.badge-soft-danger { 
  background-color: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

.badge-soft-secondary { 
  background-color: rgba(108, 117, 125, 0.18);
  color: #6c757d;
}

.badge-light-subtle {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Search box */
.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #74788d;
  pointer-events: none;
}

.search-box input {
  padding-left: 40px;
}

/* Font sizes */
.font-size-11 { font-size: 0.6875rem; }
.font-size-12 { font-size: 0.75rem; }
.font-size-13 { font-size: 0.8125rem; }
.font-size-14 { font-size: 0.875rem; }
.font-size-16 { font-size: 1rem; }
.font-size-18 { font-size: 1.125rem; }

/* Bordes */
.border-start {
  border-left: 1px solid;
}

.border-2 {
  border-width: 2px !important;
}

.border-3 {
  border-width: 3px !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .d-none.d-sm-block {
    display: none !important;
  }

  .d-none.d-lg-inline-block {
    display: none !important;
  }

  .navbar-header {
    padding: 0;
  }

  .header-item.noti-icon {
    padding: 0 0.5rem;
  }
}

@media (min-width: 576px) {
  .d-none.d-sm-block {
    display: block !important;
  }
}

@media (min-width: 992px) {
  .d-none.d-lg-inline-block {
    display: inline-block !important;
  }
}

/* Fix para Feather icons */
.feather {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* Dropdown position fix */
.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* Text utilities */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Alert heading */
.alert-heading {
  font-weight: 600;
}

/* Visually hidden */
.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;
}

/* ========================================
   SELECTOR DE INSTITUCIÓN
   ======================================== */
.dropdown.d-inline-block {
  display: inline-flex !important;
  align-items: center;
}

.dropdown > .btn.header-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

/* Noti title en dropdowns */
.dropdown-header.noti-title {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}

.dropdown-header.noti-title h6 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

/* Flex utilities que pueden faltar */
.flex-grow-1 {
  flex-grow: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.gap-1 {
  gap: 0.25rem;
}

/* Overflow hidden */
.overflow-hidden {
  overflow: hidden;
}

/* Position utilities */
.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.top-0 {
  top: 0;
}

.start-100 {
  left: 100%;
}

.translate-middle {
  transform: translate(-50%, -50%);
}

.translate-middle-y {
  transform: translateY(-50%);
}

/* Border utilities */
.border {
  border: 1px solid #dee2e6;
}

.border-bottom {
  border-bottom: 1px solid #dee2e6;
}

.border-white {
  border-color: #fff !important;
}

/* Me utilities */
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-auto { margin-left: auto; }

/* Padding utilities */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.pt-0 { padding-top: 0; }

/* Width utilities */
.w-100 { width: 100%; }

/* Align utilities */
.align-middle {
  vertical-align: middle;
}

.align-items-center {
  align-items: center;
}

.align-items-start {
  align-items: flex-start;
}

.justify-content-between {
  justify-content: space-between;
}

/* Display utilities */
.d-flex {
  display: flex;
}

.d-inline-flex {
  display: inline-flex;
}

/* Text align */
.text-center {
  text-align: center;
}

.text-start {
  text-align: left;
}

.text-end {
  text-align: right;
}

.text-sm-end {
  text-align: right;
}

/* Font weight */
.fw-normal {
  font-weight: 400;
}

.fw-semibold {
  font-weight: 600;
}

/* Margin top */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
