:root {
    --primary-color: #043AAC;
    --primary-hover: #022778;
    --primary-light: #1D62EC;
    --primary-soft: rgba(4, 58, 172, 0.08);
    --secondary-color: #0F172A;
    --accent-color: #F59E0B;
    --accent-hover: #D97706;
    --dark-color: #0F172A;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(4, 58, 172, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(4, 58, 172, 0.08), 0 4px 12px -2px rgba(4, 58, 172, 0.04);
    --shadow-lg: 0 20px 35px -5px rgba(4, 58, 172, 0.15), 0 10px 20px -5px rgba(4, 58, 172, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    padding: 0.9rem 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(4, 58, 172, 0.08);
    box-shadow: 0 4px 20px rgba(4, 58, 172, 0.03);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
    font-size: 1.25rem;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
    padding: 0.5rem 1.1rem !important;
    transition: var(--transition);
    border-radius: 8px;
    font-size: 0.92rem;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-soft);
    transform: translateY(-1px);
}

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

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    transition: var(--transition) !important;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(4, 58, 172, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #011954 100%);
    border-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(4, 58, 172, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border: none;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section with Color from Logo (#043AAC) */
.hero-section {
    padding: 90px 0 110px 0;
    background: linear-gradient(135deg, #022778 0%, #043AAC 50%, #0f172a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 98, 236, 0.35) 0%, rgba(4, 58, 172, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(4, 58, 172, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Feature Cards */
.feature-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(4, 58, 172, 0.06);
    box-shadow: 0 10px 30px rgba(4, 58, 172, 0.05);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(4, 58, 172, 0.12);
    border-color: rgba(4, 58, 172, 0.2);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 18px rgba(4, 58, 172, 0.25);
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Admin Sidebar Modernization */
.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav {
    background: #091227;
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 6px 16px;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: var(--transition);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover .sb-nav-link-icon {
    color: #fff !important;
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    box-shadow: 0 4px 14px rgba(4, 58, 172, 0.4);
}

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

.sb-sidenav-dark .sb-sidenav-menu-heading {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    margin-top: 25px !important;
    padding-bottom: 5px !important;
}

.sb-topnav.navbar-dark {
    background-color: #091227 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sb-topnav.navbar-dark #sidebarToggle {
    color: rgba(255, 255, 255, 0.8) !important;
}

.sb-topnav.navbar-dark #sidebarToggle:hover {
    color: #fff !important;
}

.sb-topnav.navbar-dark .navbar-brand {
    color: #fff !important;
}

.sb-topnav.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.sb-topnav.navbar-dark .nav-link:hover {
    color: #fff !important;
}

.sb-sidenav-footer {
    background-color: #030816 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.sb-sidenav-footer .fw-bold {
    color: #fff !important;
}

/* Tables */
.table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.table thead th {
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    padding: 1.1rem 1rem;
    border: none;
}

.table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: 8px;
}

.badge-primary-soft {
    background-color: var(--primary-soft);
    color: var(--primary-color);
}

/* Footer Styling */
footer {
    background: #091227;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer h5, footer h6 {
    color: #ffffff;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-light) !important;
}

/* Custom Tabs Styling */
.custom-tabs .nav-link {
    color: var(--text-muted) !important;
    font-weight: 600;
    padding: 1rem 1.5rem !important;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: var(--transition);
    background: transparent !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-tabs .nav-link:hover {
    color: var(--primary-color) !important;
    border-bottom: 2px solid rgba(4, 58, 172, 0.2);
}

.custom-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
}

.custom-tabs .nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
    border-radius: 20px;
    background-color: #f1f5f9;
    color: var(--text-muted);
    transition: var(--transition);
}

.custom-tabs .nav-link.active .badge {
    background-color: var(--primary-color);
    color: white;
}

/* Extra Small Buttons */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-group-xs > .btn, .btn-xs {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 6px;
}

/* Dashboard Specific Styles */
.dashboard-welcome-card {
    background: linear-gradient(135deg, #091227 0%, #043AAC 50%, #1D62EC 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(4, 58, 172, 0.18);
    position: relative;
    overflow: hidden;
}

.dashboard-welcome-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-welcome-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.kpi-card {
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(4, 58, 172, 0.12);
}

.kpi-card .icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.3s ease;
}

.kpi-card:hover .icon-wrapper {
    transform: scale(1.1);
}

/* KPI Card Theme Variants */
.kpi-indigo {
    border-left: 4px solid #4f46e5;
}
.kpi-indigo .icon-wrapper {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
}

.kpi-emerald {
    border-left: 4px solid #10b981;
}
.kpi-emerald .icon-wrapper {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.kpi-rose {
    border-left: 4px solid #f43f5e;
}
.kpi-rose .icon-wrapper {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
}

.kpi-amber {
    border-left: 4px solid #f59e0b;
}
.kpi-amber .icon-wrapper {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.kpi-purple {
    border-left: 4px solid #8b5cf6;
}
.kpi-purple .icon-wrapper {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

/* Shortcut Quick Card */
.shortcut-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    height: 100%;
}

.shortcut-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.shortcut-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Custom Table & Badge Styling for Dashboard */
.dashboard-table-card {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.dashboard-table-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.dashboard-table-card .table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 1rem;
}

.dashboard-table-card .table td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}

.dashboard-table-card .table tr:last-child td {
    border-bottom: none;
}

.avatar-chip {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* High Contrast & Custom Color Overrides for Superior Readability */
.text-warning {
    color: #b45309 !important; /* Deep amber for high contrast on light backgrounds */
}

.text-info {
    color: #0369a1 !important; /* Darker cyan-blue for high contrast */
}

.text-success {
    color: #047857 !important; /* Darker emerald green for high contrast */
}

.text-purple {
    color: #6d28d9 !important;
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

.text-muted {
    color: #475569 !important; /* Dark slate gray for crisp text readability */
}

.text-secondary {
    color: #334155 !important;
}

/* Custom font size & font weight utilities */
.fs-7 {
    font-size: 0.8125rem !important; /* 13px */
}

.fs-8 {
    font-size: 0.75rem !important; /* 12px */
}

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

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

/* Hero Card Text Colors (On Dark Background) */
.dashboard-welcome-card .text-warning {
    color: #fbbf24 !important; /* Bright gold on dark hero */
}

.dashboard-welcome-card .text-info {
    color: #38bdf8 !important; /* Bright sky blue on dark hero */
}

/* Sidebar heading readability */
.sb-sidenav-dark .sb-sidenav-menu-heading {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
}

.sb-sidenav-footer {
    color: rgba(255, 255, 255, 0.8) !important;
}
