/* Colores Institucionales */
:root {
    --color1: #a4142c;
    --color2: #dc8c9c;
    --color3: #a30c27;
    --color4: #b95d68;
    --color5: #caa9a8;
}

/* Clases de colores de fondo */
.color1 { background-color: #a4142c !important; }
.color2 { background-color: var(--color2) !important; }
.color3 { background-color: var(--color3) !important; }
.color4 { background-color: var(--color4) !important; }
.color5 { background-color: var(--color5) !important; }

/* Clases de colores de texto */
.text-color1 { color: var(--color1) !important; }
.text-color2 { color: var(--color2) !important; }
.text-color3 { color: var(--color3) !important; }
.text-color4 { color: var(--color4) !important; }
.text-color5 { color: var(--color5) !important; }

/* Estilos para módulos de cortes */
.cortes-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px;
}

.cortes-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(164, 20, 44, 0.1);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.cortes-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(164, 20, 44, 0.15);
}

.cortes-card-header {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color3) 100%);
    color: white;
    padding: 20px 25px;
    border-bottom: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.cortes-card-body {
    padding: 30px;
    background: var(--color2) !important;
    color: #fff !important;
}

/* Botones institucionales */
.btn-institucional {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color3) 100%);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(164, 20, 44, 0.3);
}

.btn-institucional:hover {
    background: linear-gradient(135deg, var(--color3) 0%, var(--color1) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(164, 20, 44, 0.4);
}

.btn-institucional:focus {
    box-shadow: 0 0 0 0.2rem rgba(164, 20, 44, 0.25);
}

.btn-institucional-secundario {
    background: linear-gradient(135deg, var(--color2) 0%, var(--color4) 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-institucional-secundario:hover {
    background: linear-gradient(135deg, var(--color4) 0%, var(--color2) 100%);
    color: white;
    transform: translateY(-1px);
}

/* Toggle buttons para formularios */
.toggle-container {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--color1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color3) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(164, 20, 44, 0.3);
}

.toggle-btn:hover:not(.active) {
    background: rgba(164, 20, 44, 0.1);
}

/* Formularios */
.form-control-institucional {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control-institucional:focus {
    border-color: var(--color1);
    box-shadow: 0 0 0 0.2rem rgba(164, 20, 44, 0.15);
    background: white;
}

.form-label-institucional {
    color: var(--color1);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Tablas */
.table-institucional {
    background: white !important;
    color: inherit !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table-institucional thead th {
    background: #f8f9fa !important;
    color: #212529 !important;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table-institucional tbody tr {
    color: inherit !important;
}

.table-institucional tbody tr:hover {
    background: rgba(0,0,0,0.05) !important;
}

/* Badges y estados */
.badge-institucional {
    background: linear-gradient(135deg, var(--color2) 0%, var(--color4) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-completado {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.badge-pendiente {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

/* Progress bars */
.progress-institucional {
    height: 12px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-institucional {
    background: linear-gradient(135deg, var(--color1) 0%, var(--color3) 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Alertas */
.alert-institucional {
    background: linear-gradient(135deg, var(--color5) 0%, var(--color2) 100%);
    border: none;
    border-radius: 10px;
    color: var(--color1);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(164, 20, 44, 0.1);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .cortes-container {
        padding: 15px;
    }
    
    .cortes-card-body {
        padding: 20px;
    }
    
    .toggle-container {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-institucional {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Iconos y elementos decorativos */
.icon-institucional {
    color: var(--color1);
    margin-right: 8px;
}

.divider-institucional {
    height: 2px;
    background: linear-gradient(90deg, var(--color1) 0%, var(--color2) 50%, var(--color3) 100%);
    border-radius: 1px;
    margin: 20px 0;
}

.notification-container {
  position: relative;
  display: inline-block;
}

.notification-btn {
  background: var(--color2);
  border: none;
  border-radius: 12px;
  padding: 12px 30px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: box-shadow 0.2s;
}

.notification-btn i {
  font-size: 1.5rem;
  color: #fff;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 12px;
  background: var(--color1);
  color: #fff;
  border-radius: 50%;
  padding: 3px 8px;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  animation: pop 0.3s cubic-bezier(0.3,0,0.7,1);
}

@keyframes pop {
  0% { transform: scale(0.5);}
  80% { transform: scale(1.2);}
  100% { transform: scale(1);}
}

.notification-panel {
  position: fixed; /* Antes: absolute. Ahora flota respecto a la ventana */
  top: 60px;      /* Ajusta según la altura de tu header */
  right: 30px;    /* Ajusta para que salga debajo de la campana */
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 12000; /* Muy por encima de header/curva */
  padding: 0.5rem 0;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: visible;
}

@media (max-width: 500px) {
  .notification-panel {
    right: 0;
    left: 0;
    width: 98vw;
    min-width: unset;
    max-width: unset;
    border-radius: 0 0 16px 16px;
  }
}

.noti-empty {
  text-align: center;
  color: #888;
  padding: 1rem;
}

.noti-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}
.noti-item:hover {
  background: var(--color5);
}

/* Fix botones que se ven como badges */
.btn, .btn-primary, .btn-success, .btn-sm {
  border-radius: 8px !important;
  padding: 0.4em 1.2em !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  border: none !important;
  cursor: pointer !important;
  background: initial !important;
}

.btn-primary {
  background: #a4142c !important;
  color: #fff !important;
}
.btn-success {
  background: #28a745 !important;
  color: #fff !important;
}
.btn:disabled, .btn[disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
} 

/* Forzar el dropdown de notificaciones a flotar por encima de todo */
.dropdown-menu[aria-labelledby="notificacionesDropdown"] {
  position: fixed !important;
  top: 60px !important;   /* Ajusta según la altura de tu header */
  right: 30px !important; /* Ajusta para que salga debajo de la campana */
  left: auto !important;
  /* Evitar que Popper/Bootstrap mueva el menú con transform/inset (causa "parpadeo") */
  transform: none !important;
  inset: auto !important;
  z-index: 12000 !important;
  min-width: 320px;
  max-width: 400px;
} 

/* Panel de notificaciones institucional */
.noti-panel-institucional {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(164,20,44,0.13);
    border: 2px solid var(--color2);
    padding: 1.2rem 1.5rem;
    max-width: 400px;
    min-width: 320px;
    z-index: 12000;
}
.noti-item-institucional {
    border-bottom: 1px solid var(--color5);
    padding: 0.7rem 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--color1);
    background: transparent;
}
.noti-item-institucional:last-child {
    border-bottom: none;
}
.noti-item-institucional .noti-icon {
    color: var(--color3);
    font-size: 1.3em;
    margin-top: 2px;
}
.noti-item-institucional .noti-text {
    color: var(--color1);
    font-weight: 500;
    font-size: 1em;
}
.noti-item-institucional .noti-date {
    color: var(--color4);
    font-size: 0.85em;
    margin-top: 2px;
}
.noti-empty-institucional {
    text-align: center;
    color: var(--color4);
    padding: 1.2rem 0;
    font-size: 1em;
} 