/* Modern UI Enhancement for Urban Security */

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --surface-glass: rgba(255, 255, 255, 0.8);
    --surface-glass-dark: rgba(255, 255, 255, 0.4);
    --border-glass: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #f8fafc !important;
    color: #1e293b;
}

/* Sidenav Modernization */
.sidenav {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--shadow-xl) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidenav .nav-link {
    border-radius: var(--radius-md) !important;
    margin: 4px 12px !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease !important;
}

.sidenav .nav-link.active {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
    color: #fff !important;
}

.sidenav .nav-link.active .icon i {
    color: #fff !important;
}

.sidenav .nav-link:hover:not(.active) {
    background: rgba(99, 102, 241, 0.08) !important;
    transform: translateX(4px);
}

.sidenav-header {
    padding: 2rem 1.5rem !important;
}

.navbar-brand-img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Card Modernization */
.card {
    border-radius: var(--radius-lg) !important;
    border: none !important;
    box-shadow: var(--shadow-md) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.card:hover {
    box-shadow: var(--shadow-lg) !important;
}

.card-header {
    background: transparent !important;
    padding: 1.5rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

/* Table Modernization */
.table thead th {
    text-transform: uppercase;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem !important;
    color: #64748b !important;
    background: #f1f5f9;
}

/* Dropdown fix for tables */
.table-responsive {
    overflow: visible !important;
    min-height: 200px;
}

@media (max-width: 991.98px) {
    .table-responsive {
        overflow-x: auto !important;
        min-height: auto;
    }
}

.table tbody td {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.table tr:hover td {
    background-color: #f8fafc;
}

.avatar {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm);
}

/* Button Modernization */
.btn {
    border-radius: var(--radius-md) !important;
    padding: 0.625rem 1.25rem !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: none !important;
    letter-spacing: 0;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3) !important;
}

.btn-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--radius-md) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.625rem 1rem !important;
    transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Pagination Modernization */
.pagination .page-item .page-link {
    border-radius: 8px !important;
    margin: 0 4px;
    border: 1px solid #e2e8f0 !important;
    color: #64748b;
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modals */
.modal-content {
    border-radius: var(--radius-xl) !important;
    border: none !important;
    box-shadow: var(--shadow-xl) !important;
    background-color: #ffffff !important;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    padding: 1.5rem 1.5rem 1rem !important;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05) !important;
    padding: 1rem 1.5rem 1.5rem !important;
}

.modal-backdrop {
    backdrop-filter: blur(4px);
    background-color: rgba(15, 23, 42, 0.5) !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .navbar, .sidenav {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Fix for Bootstrap Modals interaction */
.modal {
    background: rgba(0,0,0,0.1);
}
