/* VARIABLES  */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;

    --sidebar-primary-color: #2c3e50;
    --sidebar-secondary-color: #34495e;
    --sidebar-info-color: #3498db;
    --sidebar-danger-color: #e74c3c;
}

body {
    background-color: #ecf0f1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, var(--sidebar-primary-color) 0%, var(--sidebar-secondary-color) 100%);
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    transform: translateX(-250px);
}

.sidebar .nav-link {
    color: #ecf0f1;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-info-color);
    color: white;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 0;
    width: 100%;
}

/* NAVBAR */
.top-navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--info-color);
    position: sticky;
    top: 0;
    z-index: 1100;
}

/* TRANSICIONES */
.view {
    animation: fadeIn 0.4s ease-in-out;
}

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

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

/* TRANSICION QUE SIRVE PARA NO APLICAR TRANSICIONES CUANDO SE RECARGA EL COMPONENTE */
.no-transition * {
    transition: none !important;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
}

/* VALIDATION STYLES */
.nav-link.error {
    color: var(--danger-color) !important;
    border-bottom: 3px solid var(--danger-color) !important;
    animation: shake 0.5s ease-in-out;
}

.nav-link.success {
    color: var(--success-color) !important;
}

.is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25) !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* STEPPER NAVIGATION */
.stepper-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
}

/* HISTORY LIST STYLES */
.history-item {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.history-item:hover {
    background-color: #f8fafb;
    border-left-color: var(--info-color);
    transform: translateX(5px);
}

.history-item.certified {
    border-left-color: var(--success-color);
}

.history-item.pending {
    border-left-color: var(--warning-color);
}

/* Notificaciones */
.notification-badge {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 50rem;
    margin-left: auto;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
    display: inline-block;
    text-align: center;
}