:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    margin: 0;
    overflow-x: hidden;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Auth Page specific styling */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    margin: -1.5rem -1.5rem;
    /* Counteract the padding from layout if any */
}

.auth-image-side {
    flex: 1;
    background: url('/img/login-bg.png') center center no-repeat;
    background-size: cover;
    /* position: relative; */
    display: none;
    /* Hidden on mobile */
    
}

@media (min-width: 992px) {
    .auth-image-side {
        display: block;
    }
}

.auth-image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(67, 97, 238, 0.4), rgba(76, 201, 240, 0.2));
}

.auth-form-side {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 3rem;
}

@media (min-width: 992px) {
    .auth-form-side {
        width: 50%;
    }
}

.login-card {
    width: 100%;
    max-width: 480px;
}

.login-card .card {
    border: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
}

.form-control {
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* Navbar overrides */
.navbar {
    z-index: 1000;
}

/* Sidebar overrides */
.sidebar {
    background: linear-gradient(180deg, rgb(36, 74, 151) 0%, rgba(27, 36, 51, 1) 70%);
    border-right: none;
    height: calc(100vh - 72px);
    position: sticky;
    top: 72px;
    padding-top: 1rem;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Toggle State */
.sidebar-hidden .sidebar {
    margin-left: -16.666667%;
    /* LG and MD width (col-2) */
    /* LG width */
    transform: translateX(-100%);
    position: absolute;
    /* Take it out of flow for clean expansion */
}

@media (max-width: 991.98px) {
    .sidebar-hidden .sidebar {
        margin-left: -25%;
        /* MD width */
    }
}

.sidebar-hidden main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
}

main {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebarToggle {
    transition: var(--transition);
}

#sidebarToggle:hover {
    background-color: var(--primary-color) !important;
}

#sidebarToggle:hover i {
    color: white !important;
}
#layoutWrapper {
    display: flex;
}

/* Fixed width sidebar */
.sidebar {
    width: 240px;
    min-width: 240px;
    height: calc(100vh - 72px);
    position: sticky;
    top: 72px;
    transition: all 0.3s ease;
}

/* Hide sidebar */
.sidebar-hidden .sidebar {
    margin-left: -240px;
}

/* Expand main */
.sidebar-hidden main {
    width: 100%;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    margin: 0.2rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.sidebar .nav-link i {
    font-size: 1.2rem;
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sidebar .nav-link:hover i {
    color: #ffffff;
}

.sidebar .nav-link.active {
    background: #016fb2;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(1 178 154, 0.5);
    font-weight: 600;
}

.sidebar .nav-link.active i {
    color: #ffffff;
}

/* Dashboard items */
.page-title {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.page-title+p {
    margin-bottom: 0;
}

.stat-card {
    border: none;
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #8a99af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1c2434;
    margin-bottom: 0;
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.stat-trend.up {
    color: #10b981;
}

.stat-trend.down {
    color: #ef4444;
}

/* Chart and Table cards */
.content-card {
    border: none;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.content-card .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.content-card .card-body {
    padding: 1.5rem;
}

/* Color variations for icons */
.bg-soft-primary {
    background-color: rgba(67, 97, 238, 0.1);
    color: #4361ee;
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.bg-soft-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Table & Data Display */
.table-wrapper {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody td {
    padding: 1.25rem 1.5rem;
    color: #334155;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #fcfdfe;
}

.table .btn {
    white-space: nowrap;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: 6px;
    
}

.badge-soft-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-soft-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-soft-primary {
    background-color: rgba(67, 97, 238, 0.1);
    color: #4361ee;
}

/* Modal enhancements */
.modal-content {
    border: none !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.5rem 2rem !important;
}

.modal-header .modal-title {
    font-weight: 700 !important;
    color: #1e293b !important;
}

.modal-body {
    padding: 2rem !important;
}

.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 1.25rem 2rem !important;
}
#policyModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    white-space: pre-wrap; /* preserve line breaks */
}
/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    margin: 0 2px;
}

.btn-action-edit {
    background: rgba(67, 97, 238, 0.1);
    color: #4361ee;
    border: none;
}

.btn-action-edit:hover {
    background: #4361ee;
    color: #fff;
}

.btn-action-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
}

.btn-action-delete:hover {
    background: #ef4444;
    color: #fff;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #f1f5f9;
    gap: 2rem;
    margin-bottom: 2rem !important;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    padding: 1rem 0;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4361ee;
    transition: var(--transition);
}

.nav-tabs .nav-link.active {
    color: #4361ee;
    background: transparent;
}

.nav-tabs .nav-link.active::after {
    width: 100%;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: #1e293b;
}










@media (min-width: 992px) {
    .col-lg-2 {
        flex: 0 0 auto;
        width: 14.66666667%;
    }
}

@media (min-width: 992px) {
    .col-lg-10 {
        flex: 0 0 auto;
        width: 84.75%;
    }
}