/* ==========================================================================
   Elyon Yireh - Estilos Globales & Extensiones Bootstrap 5
   ========================================================================== */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --accent-color: #7c3aed;
    --dark-sidebar: #1e1b4b;
    --dark-sidebar-hover: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f3f4f9;
    color: #1f2937;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Servicio de Alertas Personalizadas (5 segundos con barra de progreso)
   -------------------------------------------------------------------------- */
.custom-alert-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.custom-alert {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.custom-alert.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-alert.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Variantes de Color */
.custom-alert-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.custom-alert-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.custom-alert-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
}

.custom-alert-info {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Estructura Interna del Toast */
.custom-alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 6px 16px;
}

.custom-alert-icon {
    font-size: 1.25rem;
}

.custom-alert-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.custom-alert-countdown-text {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.custom-alert-close {
    font-size: 0.75rem;
    opacity: 0.85;
}

.custom-alert-close:hover {
    opacity: 1;
}

.custom-alert-body {
    padding: 4px 16px 14px 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.95;
}

/* Disminuidor de Tiempo (Barra de Progreso) */
.custom-alert-progress-bg {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.custom-alert-progress-bar {
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    transform-origin: left;
}

/* --------------------------------------------------------------------------
   Login Layout Split-Screen Moderno
   -------------------------------------------------------------------------- */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f8;
    padding: 24px;
    position: relative;
}

.login-split-card {
    background: #ffffff;
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08), 0 0 1px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    max-width: 1120px;
    width: 100%;
    min-height: 640px;
}

.login-left-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 320px;
    overflow: hidden;
}

.login-left-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.25) 0%, transparent 60%);
}

.login-right-panel {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 3rem;
}

@media (max-width: 575.98px) {
    .login-right-panel {
        padding: 2rem 1.5rem;
    }
}

.login-inner-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    padding: 2.5rem 2.2rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.btn-primary-blue {
    background: #1d68cd;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-primary-blue:hover {
    background: #1555ab;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(29, 104, 205, 0.35);
}

.btn-primary-blue:active {
    transform: translateY(0);
}

/* Form Controls */
.form-floating-custom > .form-control {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background-color: #f9fafb;
    padding-left: 42px;
}

.form-floating-custom > .form-control:focus {
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 5;
    font-size: 1.1rem;
}

.btn-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9ca3af;
    z-index: 5;
    cursor: pointer;
    font-size: 1.15rem;
}

.btn-toggle-pw:hover {
    color: #4f46e5;
}

/* Formas decorativas de fondo */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.bg-shape-1 {
    width: 450px;
    height: 450px;
    background: #ffffff;
    top: -120px;
    right: -100px;
    animation: floatShape 8s ease-in-out infinite;
}

.bg-shape-2 {
    width: 320px;
    height: 320px;
    background: #ffffff;
    bottom: -80px;
    left: -80px;
    animation: floatShape 6s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(6deg); }
}

/* --------------------------------------------------------------------------
   Dashboard Layout con Bootstrap
   -------------------------------------------------------------------------- */
.dashboard-sidebar {
    width: 270px;
    background: var(--dark-sidebar);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1020;
    transition: all 0.3s ease;
}

.dashboard-main-content {
    margin-left: 270px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f3f4f9;
}

.sidebar-nav-item {
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.sidebar-nav-item:hover {
    background: var(--dark-sidebar-hover);
    color: #ffffff;
}

.sidebar-nav-item.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.hero-profile-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
    border-radius: 20px;
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(30, 27, 75, 0.25);
    position: relative;
    overflow: hidden;
}

.hero-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.info-data-card {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.info-data-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 991.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    .dashboard-sidebar.show-sidebar {
        transform: translateX(0);
    }
    .dashboard-main-content {
        margin-left: 0;
    }
}
