@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-soft: rgba(99, 102, 241, 0.15);
    --success: #10b981;
    /* Emerald 500 */
    --success-soft: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    /* Amber 500 */
    --warning-soft: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    /* Rose 500 */
    --danger-soft: rgba(239, 68, 68, 0.15);
    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 24px;
    --radius-sm: 16px;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: 24px;
    --glass-dark-bg: rgba(15, 23, 42, 0.85);

    --accent-blue: #38bdf8;
    /* Sky 400 */
    --accent-purple: #818cf8;
    /* Indigo 400 */
    --accent-pink: #f472b6;
    /* Pink 400 */

    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
}

body,
.main-content,
.page-content {
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Global Card Modernization */
.card,
.premium-card {
    background: var(--bg-card);
    border-radius: var(--radius) !important;
    border: none !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.card:hover,
.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-soft) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.25rem 1.5rem !important;
}

.card-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
}

/* Component Utilities */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1rem;
}

.bg-soft-primary {
    background-color: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.bg-soft-success {
    background-color: var(--success-soft) !important;
    color: var(--success) !important;
}

.bg-soft-warning {
    background-color: var(--warning-soft) !important;
    color: var(--warning) !important;
}

.bg-soft-danger {
    background-color: var(--danger-soft) !important;
    color: var(--danger) !important;
}

/* Table Modernization */
.table {
    --vz-table-hover-bg: #f8fafc;
}

.table thead th {
    background-color: #f8fafc !important;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #f1f5f9 !important;
}

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

/* Sidebar & Topbar Overrides */
#page-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

.navbar-menu {
    border-right: 1px solid #f1f5f9 !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background-color: var(--primary-soft) !important;
}

.nav-link i {
    color: var(--text-muted) !important;
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--primary) !important;
}

/* Premium Form Controls */
.form-control,
.form-select {
    border-radius: 10px !important;
    padding: 0.6rem 1rem !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2) !important;
}

.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3) !important;
}

/* Glassmorphism Utility Classes */
.dark-glass-dashboard {
    background: url('../images/glass-bg.png') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

.glass-dashboard-theme {
    background: url('../images/glass-bg.png') no-repeat center center fixed !important;
    background-size: cover !important;
}

.is-glass-dashboard .footer,
.is-glass-dashboard .sidebar-background,
.is-glass-dashboard .vertical-overlay {
    display: none !important;
}

/* Glass Topbar & Navbar */
.is-glass-dashboard #page-topbar {
    background: rgba(20, 20, 20, 0.4) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    z-index: 1002;
    padding-top: 10px;
}

.is-glass-dashboard .navbar-menu {
    top: 70px;
    /* Below topbar */
    background: rgba(25, 25, 25, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    height: auto !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-right: none !important;
    z-index: 1001;
}

.is-glass-dashboard .main-content {
    margin-left: 0 !important;
    padding-top: 110px !important;
    /* Adjust for horizontal nav */
    background: transparent !important;
}

.is-glass-dashboard .container-fluid {
    padding-left: 1.5rem !important;
    /* Standard padding */
    padding-right: 1.5rem !important;
}

.is-glass-dashboard .page-content {
    padding: 0 !important;
}

.dark-glass-dashboard .main-content,
.dark-glass-dashboard .page-content {
    background: transparent !important;
    color: #ffffff !important;
}


.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--shadow-premium), var(--shadow-inner) !important;
    border-radius: var(--radius) !important;
    color: var(--text-main) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-5px);
}

.glass-card-dark {
    background: var(--glass-dark-bg) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
}

.text-accent-orange {
    color: var(--accent-orange) !important;
}

.bg-accent-orange {
    background-color: var(--accent-orange) !important;
}

.glass-sidebar-fixed {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: rgba(25, 25, 25, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 40px !important;
    padding: 20px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.glass-sidebar-fixed .nav-item {
    margin-bottom: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.glass-sidebar-fixed .nav-item.active {
    background: var(--accent-orange);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.glass-sidebar-fixed .nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.stat-wave-container {
    height: 200px;
    width: 100%;
}

.progress-circle-container {
    width: 80px;
    height: 80px;
    position: relative;
}

/* Horizontal Nav Buttons */
.btn-ghost-secondary {
    color: var(--text-muted);
    background-color: transparent;
    border-color: transparent;
}

.btn-ghost-secondary:hover,
.btn-ghost-secondary.active {
    color: var(--primary);
    background-color: var(--primary-soft);
}

.btn-ghost-primary {
    color: var(--primary);
    background-color: transparent;
    border-color: transparent;
}

.btn-ghost-primary:hover {
    color: var(--primary);
    background-color: var(--primary-soft);
}

/* Premium Global Menu Explorer */
.glass-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.5s ease;
    overflow-y: auto;
}

.glass-nav-overlay.active {
    display: block;
    opacity: 1;
}

.close-nav-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-nav-btn:hover {
    transform: rotate(90deg);
    color: var(--primary);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.nav-module-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-module-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-8px);
}

.nav-module-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-module-links a:hover {
    color: white;
    background: var(--primary-soft);
    padding-left: 20px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.fw-extrabold {
    font-weight: 800;
}

/* Redesign Utility: Stat Cards */
.report-stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    border-color: var(--primary-soft);
}

.report-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.report-stat-info {
    flex-grow: 1;
}

.report-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.report-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.report-stat-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Modern Filter Layout */
.modern-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group-lg {
    flex: 2;
    min-width: 300px;
}

.filter-group-sm {
    flex: 0.5;
    min-width: 80px;
}

/* Glass Badges & Utilities */
.bg-glass-dark {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.border-white-20 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.opacity-05 {
    opacity: 0.05;
}

.opacity-70 {
    opacity: 0.7;
}

.text-primary-light {
    color: #a5b4fc !important;
}

/* Avatar Glow Effect */
.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    filter: blur(20px);
    opacity: 0.4;
    border-radius: 50%;
    z-index: 0;
}

/* Glass Buttons */
.btn-glass-primary {
    background: rgba(99, 102, 241, 0.2) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #ffffff !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-glass-primary:hover {
    background: rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px);
}

.btn-glass-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-glass-dark:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px);
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-glass-primary.small,
.btn-glass-dark.small {
    font-size: 11px;
    font-weight: 600;
}

/* Scrollbar refine */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.opacity-20 {
    opacity: 0.2;
}

.mx-1 {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}