* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

.bg-gray-50 {
    background-color: #f8fafc !important;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
    width: 1.5rem;
}

.sidebar-footer {
    padding: 1rem 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    padding: 0.75rem 0.5rem;
}

.content {
    flex-grow: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.card {
    background: white;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f1f5f9;
    border: none;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody td {
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.form-control, .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.badge-en-archivo { background: #dcfce7; color: #166534; }
.badge-en-auditoria { background: #fef3c7; color: #92400e; }
.badge-en-prestamo { background: #dbeafe; color: #1e40af; }
.badge-conclusion { background: #cffafe; color: #0e7490; }
.badge-baja { background: #fee2e2; color: #991b1b; }

.badge-no-digitalizado { background: #fee2e2; color: #991b1b; }
.badge-digitalizado-parcial { background: #fef3c7; color: #92400e; }
.badge-digitalizado-completo { background: #dcfce7; color: #166534; }

.login-container {
    max-width: 420px;
    margin: 5rem auto;
}

.toast-container {
    z-index: 9999;
}

.dropdown-menu {
    z-index: 999999 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

.modal {
    z-index: 99998 !important;
}

.sticky-top {
    z-index: 1000 !important;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
}

.text-gray-400 {
    color: #94a3b8;
}

.text-gray-900 {
    color: #0f172a;
}

.bg-gray-100 {
    background-color: #f1f5f9;
}

.text-purple {
    color: #7c3aed;
}

.bg-purple {
    background-color: #7c3aed;
}

.bg-purple.bg-opacity-10 {
    background-color: rgba(124, 58, 237, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-bar {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 50%, #1e40af 100%);
    animation: fadeIn 0.5s ease-out;
}

.notification-bar .btn-light:hover {
    background: rgba(255, 255, 255, 0.9);
}

#notificationBar {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 50%, #1e40af 100%) !important;
    animation: fadeIn 0.5s ease-out !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}

#notificationBar .bi-bell-fill {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.content {
    padding-top: 0 !important;
}

.sidebar {
    z-index: 1500 !important;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}

.topbar .h4 {
    font-size: 1.125rem;
}

#notificationBell {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#notificationBell:hover {
    background: #eff6ff;
}

#notificationDropdown.show {
    display: block;
}

#notificationList li {
    list-style: none;
    padding: 0;
    margin: 0;
}

#notificationList a.dropdown-item {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex !important;
    flex-direction: row !important;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    gap: 0.75rem;
    white-space: normal;
    align-items: flex-start;
}

#notificationList li:last-child a.dropdown-item {
    border-bottom: none;
}

#notificationList a.dropdown-item:hover {
    background: #f9fafb !important;
    text-decoration: none !important;
    color: inherit !important;
}

#notificationList .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

#notificationList .content {
    flex: 1;
    min-width: 0;
}

#notificationList .content strong {
    display: block;
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

#notificationList .content small {
    color: #6b7280;
    font-size: 0.75rem;
    display: block;
    line-height: 1.3;
}

#notificationList .time {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

