/* Admin Dashboard Styles */

/* Professional Admin Body Background - Override logged-in animations */
body.admin-page {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 25%, #7dd3fc 50%, #bae6fd 75%, #e0f2fe 100%) !important;
    background-attachment: fixed !important;
    background-size: 100% 100% !important;
    animation: none !important;
    position: relative;
    min-height: 100vh;
}

/* Override logged-in patterns for admin pages */
body.admin-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(148, 163, 184, 0.015) 1px, transparent 1px),
        linear-gradient(rgba(148, 163, 184, 0.015) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.008) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.008) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.005) 0%, transparent 50%);
    background-size: 60px 60px, 60px 60px, 100% 100%, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
    animation: none !important;
}

/* Override logged-in accent for admin pages */
body.admin-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.012) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(99, 102, 241, 0.012) 0%, transparent 35%),
        radial-gradient(circle at 50% 15%, rgba(147, 197, 253, 0.008) 0%, transparent 45%),
        radial-gradient(circle at 25% 85%, rgba(191, 219, 254, 0.008) 0%, transparent 45%);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: -1;
    animation: none !important;
    transform: none !important;
    opacity: 0.2 !important;
}



.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Professional Pattern Overlay for Admin */
.admin-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(148, 163, 184, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(148, 163, 184, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.01) 0%, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

.admin-sidebar {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    height: fit-content;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.admin-menu a.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.admin-content {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.stat-card i {
    font-size: 2.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    margin: 0;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    font-weight: 600;
    color: #1e40af;
    border-bottom: 2px solid #3b82f6;
}

.data-table tr:hover {
    background: transparent;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-admin {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-librarian {
    background-color: #e0e7ff;
    color: #4338ca;
}

.badge-user {
    background-color: #f3f4f6;
    color: #374151;
}

.badge-active {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-tabs a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.filter-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.book-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-section {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.dashboard-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .book-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* FORCE STATIC BACKGROUND FOR ADMIN PAGES - HIGHEST PRIORITY */
body.logged-in.admin-page,
body.admin-page.logged-in {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 25%, #7dd3fc 50%, #bae6fd 75%, #e0f2fe 100%) !important;
    background-attachment: fixed !important;
    background-size: 100% 100% !important;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
}

body.logged-in.admin-page::before,
body.admin-page.logged-in::before {
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    transform: none !important;
    opacity: 0.3 !important;
}

body.logged-in.admin-page::after,
body.admin-page.logged-in::after {
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    transform: none !important;
    opacity: 0.1 !important;
}

/* Disable all animations on admin pages */
.admin-page * {
    animation-duration: 0s !important;
    -webkit-animation-duration: 0s !important;
    -moz-animation-duration: 0s !important;
    -o-animation-duration: 0s !important;
    animation-delay: 0s !important;
    -webkit-animation-delay: 0s !important;
    -moz-animation-delay: 0s !important;
    -o-animation-delay: 0s !important;
}