:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --bg-gradient-primary: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    --font-family-sans-serif: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    font-family: var(--font-family-sans-serif);
    background-color: #f8f9fc;
    overflow-x: hidden;
    margin: 0;
}

.text-gray-100 {
    color: #f8f9fc !important;
}

.text-gray-200 {
    color: #eaecf4 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-400 {
    color: #d1d3e2 !important;
}

.text-gray-500 {
    color: #b7b9cc !important;
}

.text-gray-600 {
    color: #858796 !important;
}

.text-gray-700 {
    color: #6e707e !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-900 {
    color: #3a3b45 !important;
}

.bg-gradient-primary {
    background-image: var(--bg-gradient-primary);
    background-size: cover;
}

.sidebar-heading {
    text-align: left;
    padding: 0 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    /* Increased size */
    color: rgba(255, 255, 255, 0.9);
    /* High contrast */
    text-transform: uppercase;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    /* Better spacing */
}

.border-left-primary {
    border-left: .25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: .25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: .25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: .25rem solid var(--warning-color) !important;
}

/* Wrapper for Flex Sidebar */
#wrapper {
    display: flex;
    overflow-x: hidden;
    width: 100%;
}

/* Sidebar Fixes */
.sidebar {
    width: 200px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    background: var(--bg-gradient-primary);
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Scrollbar for Webkit */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.sidebar .nav-item .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    width: 200px;
    /* Enforce width */
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: 0.85rem;
}

.sidebar .nav-item .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item .nav-link i {
    margin-right: 0.75rem;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
    z-index: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand-icon i {
    font-size: 2rem;
}

.sidebar.toggled {
    width: 0 !important;
    overflow: hidden;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .sidebar.toggled {
        width: 250px !important;
        position: fixed;
        z-index: 999;
        height: 100%;
        top: 0;
        left: 0;
    }
}

/* content wrapper */
#content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: #f8f9fc;
}

#content {
    flex: 1 0 auto;
}

.container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Cards */
.glass-card {
    border: none;
    border-radius: 0.35rem;
    background: #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}


/* Font Improvement */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif !important;
    background-color: #f0f2f5;
    /* Softer gray background */
}

/* Premium Page Heading */
h1.h3 {
    font-weight: 700;
    color: #2d3748;
    position: relative;
    padding-bottom: 10px;
}

h1.h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 50px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Modern Card Design */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    /* For glass borders */
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

/* Glass Card Enhanced */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Beautiful Inputs */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1rem;
    background-color: #fcfcfc;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.15);
}

/* Floating Labels feel (Custom implementation via spacing) */
.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Gradient Buttons */
.btn-primary {
    background: linear-gradient(45deg, #4e73df, #224abe);
    border: none;
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.4);
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #224abe, #4e73df);
    box-shadow: 0 6px 20px rgba(78, 115, 223, 0.6);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(45deg, #1cc88a, #13855c);
    border: none;
    box-shadow: 0 4px 15px rgba(28, 200, 138, 0.4);
}

.btn-success:hover {
    background: linear-gradient(45deg, #13855c, #1cc88a);
}

/* Table Design */
.table thead th {
    background-color: #f8f9fc;
    color: #5a5c69;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 2px solid #eaecf4;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
    font-weight: 600;
}

/* LOGIN PAGE FIXES */
.login-body {
    background: var(--bg-gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background Decoration */
.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.login-body::before {
    top: -200px;
    left: -200px;
    animation: floating 10s infinite alternate;
}

.login-body::after {
    bottom: -200px;
    right: -200px;
    animation: floating 12s infinite alternate-reverse;
}

@keyframes floating {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    max-width: 450px;
    width: 100%;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.login-logo {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.login-card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    border-radius: 20px;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e3e6f0;
    height: 50px;
    padding-left: 15px;
}

.login-card .input-group-text {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e3e6f0;
    border-right: none;
    color: var(--primary-color);
}

.login-card .form-control:focus {
    background: #fff;
    box-shadow: none;
    border-color: var(--primary-color);
}

.login-card .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-login {
    height: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(45deg, #4e73df, #224abe);
    border: none;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78, 115, 223, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GLOBAL SCALING FIX */
html {
    font-size: 14px;
    /* Increased base font size for better readability */
}

@media (max-width: 576px) {
    .login-container {
        padding: 15px;
        max-width: 100%;
    }

    .login-logo img {
        max-height: 60px !important;
    }

    .login-logo {
        font-size: 3rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    h3 {
        font-size: 1.5rem;
    }
}

@media (min-width: 1200px) {

    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl {
        max-width: 1140px;
    }
}

.card-body {
    padding: 1rem 1.2rem;
}

.sidebar .nav-item .nav-link {
    padding: 0.75rem 1rem;
}

/* Wizard Form Styles */
.wizard-step {
    display: none;
    animation: fadeIn 0.5s;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-progress {
    position: relative;
    margin-bottom: 30px;
    counter-reset: step;
}

.wizard-progress-bar {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    z-index: 0;
}

.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
    width: 0%;
}

.wizard-list {
    position: relative;
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1;
}

.wizard-list-item {
    position: relative;
    text-align: center;
    width: 33.33%;
}

.wizard-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e9ecef;
    color: #adb5bd;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #adb5bd;
    transition: all 0.3s;
}

/* Active and Completed States */
.wizard-list-item.active .step-number {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(78, 115, 223, 0.2);
}

.wizard-list-item.active .step-title {
    color: var(--primary-color);
}

.wizard-list-item.completed .step-number {
    border-color: var(--success-color);
    background-color: var(--success-color);
    color: #fff;
}

.wizard-list-item.completed .step-title {
    color: var(--success-color);
}

/* DataTables Custom Design */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 500;
    color: #5a5c69;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d1d3e2;
    border-radius: 10px;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.9rem;
    color: #6e707e;
    background-color: #fff;
    cursor: pointer;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    color: #5a5c69;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e3e6f0;
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    margin-left: 0.5rem;
    outline: none;
    transition: all 0.3s;
    min-width: 250px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234e73df' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
    height: 40px;
    background-color: #fff;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.15);
    width: 300px;
}

/* Pagination Styling for Bootstrap 5 DataTables */
.dataTables_wrapper .dataTables_paginate ul.pagination {
    justify-content: flex-end;
    margin-top: 1rem;
    gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    border: none;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a5c69;
    font-weight: 600;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.3);
    transform: translateY(-2px);
}

.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f1f3f9;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    background-color: #f8f9fc;
    color: #d1d3e2;
    cursor: not-allowed;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .page-item:first-child .page-link,
.dataTables_wrapper .dataTables_paginate .page-item:last-child .page-link {
    border-radius: 50px !important;
    width: auto;
    padding: 0 1.2rem;
    font-size: 0.9rem;
}