:root {
    --primary-color: #2D364C;
    /* Dark Blue from existing */
    --accent-color: #DE4C01;
    /* Orange from existing */
    --bg-color: #f6f6f6;
    /* Light Dashboard BG */
    --sidebar-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-color: #2B3674;
    --text-muted: #A3AED0;
    --border-color: #E0E5F2;
    --sidebar-width: 280px;
    --header-height: 80px;
    --radius-lg: 20px;
    --radius-md: 10px;
}

body {
    background-color: var(--bg-color) !important;
    /* font-family: 'DM Sans', sans-serif !important;*/
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
    /*font-size: 13px;*/
}

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px 0 40px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar .nav-item {
    margin-bottom: 5px;
    list-style: none;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background: rgba(45, 54, 76, 0.05);
    /* very light primary */
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 12px;
}

.sidebar .section-label {
    padding: 20px 20px 10px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: rgba(244, 247, 254, 0.8);
    /* Glassmorphismish */
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 500;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    background: #FFFFFF;
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.03);
    border: none;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    margin-left: 10px;
    color: var(--text-color);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Content Area */
.content-area {
    padding: 30px;
    padding-top: 80px;
    min-height: calc(100vh - var(--header-height));
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    color: var(--6ext-color);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 20px;
}

/* Stats Card */
.stats-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stats-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.stats-info h2 {
    margin: 5px 0 0;
    font-size: 24px;
    color: var(--text-color);
    font-weight: 700;
}

/* Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 15px;
    color: var(--text-color);
    font-weight: 400;
    border-bottom: 1px solid #f0f0f0;
}

/* Modern UI Components */

.subtitle {
    color: grey;
    font-weight: 100;
}

/* Modern button styling */
.btn-default {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    padding: 8px 16px;
    font-weight: 400;
    transition: all 0.2s;
}

.btn-default:hover {
    background: #F4F7FE;
    border-color: var(--primary-color);
}

.input-group .form-control {
    border-radius: 8px 0 0 8px;
}

.input-group-append button {
    border-radius: 0 8px 8px 0;
    background: var(--primary-color);
    color: white;
    border: none;
}

.input-group-append button:hover {
    background: #1f2839;
}

#descriptionSearch {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 400;
}

select.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 400;
}

/* Dropdown/Combobox open state styling */
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin-top: 4px;
}

.dropdown-menu .dropdown-item,
.dropdown-menu li a {
    font-weight: 400;
    padding: 8px 16px;
    transition: all 0.2s;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu li a:hover {
    background: #F4F7FE;
    color: var(--primary-color);
}

/* Bootstrap-select dropdown styling */
.bootstrap-select .dropdown-menu {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}

.bootstrap-select .dropdown-menu li a {
    font-weight: 400;
    padding: 8px 16px;
    transition: all 0.2s;
}

.bootstrap-select .dropdown-menu li a:hover {
    background: #F4F7FE;
    color: var(--primary-color);
}

.bootstrap-select button.btn-default {
    font-weight: 400;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    background: #FFFFFF !important;
}

.bootstrap-select.open button.btn-default {
    border-color: var(--primary-color) !important;
}

/* Style the caret in Bootstrap-select */
.bootstrap-select .caret {
    border-top-color: var(--text-color);
}

/* Pagination select styling */
.set-rows {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-weight: 400;
    background: #FFFFFF;
    color: var(--text-color);
    transition: all 0.2s;
}

.set-rows:hover {
    border-color: var(--primary-color);
}

.set-rows:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(43, 54, 72, 0.1);
}

/* Center settings and connection containers */
.settings-container,
.connection-container {
    margin: 0 auto;
}

.page-count {
    float: right;
    margin-right: 20px;
    margin-top: 8px;
}

/* Mobile Tweaks */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .sidebar.open {
        transform: translateX(0);
    }
}