/* ========================================
   Salon Manager - Custom CSS
   Custom Styles
   ======================================== */

:root {
    --app-sidebar-width: 230px;
    --app-shell-gutter: 1.5rem;
    --color-bg: #f7f8fb;
    --color-surface: #ffffff;
    --color-surface-soft: #f0f7f5;
    --color-border: #dfe7ea;
    --color-text: #1f2937;
    --color-muted: #667085;
    --color-primary: #137f78;
    --color-primary-dark: #0f665f;
    --color-primary-soft: #dff4ef;
    --color-accent: #8b5cf6;
    --color-warning: #d89b18;
    --shadow-card: 0 10px 24px rgba(31, 41, 55, 0.07);
}

/* Base font */
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-weight: 500;
    overflow-x: hidden;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    background: var(--color-surface);
    color: var(--color-text);
    width: var(--app-sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    box-shadow: 6px 0 24px rgba(31, 41, 55, 0.06);
    border-right: 1px solid var(--color-border);
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(19,127,120,0.35) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 7px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(19,127,120,0.28);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(19,127,120,0.45);
}

.sidebar > .nav {
    overflow: visible;
    padding-bottom: 0.75rem;
}

.sidebar .nav-item {
    width: 100%;
}

.sidebar .sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.sidebar .sidebar-brand h4 {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0;
    color: var(--color-primary-dark);
}

.sidebar .sidebar-brand small {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.sidebar .nav-link {
    color: #344054;
    padding: 0.85rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    border-left-color: var(--color-primary);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, var(--color-primary-soft) 0%, #f8fbff 100%);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1rem;
    opacity: 0.9;
}

.sidebar .nav-link .fw-semibold {
    font-weight: 600 !important;
}

.sidebar .nav-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .nav-header {
    padding: 1.2rem 1.25rem 0.5rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #667085;
}

.sidebar-add-new .btn-success {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border: none;
    box-shadow: 0 8px 18px rgba(19,127,120,0.24);
    transition: all 0.3s ease;
}

.sidebar-add-new .btn-success:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #7447df 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(19,127,120,0.3);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    margin-left: var(--app-sidebar-width);
    width: calc(100% - var(--app-sidebar-width));
    max-width: calc(100vw - var(--app-sidebar-width));
    min-height: 100vh;
    transition: all 0.3s ease;
    min-width: 0;
    overflow-x: hidden;
}

/* ========================================
   Topbar
   ======================================== */
.topbar {
    background: rgba(255,255,255,0.94);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar > .d-flex {
    min-width: 0;
}

.topbar nav,
.topbar .breadcrumb {
    min-width: 0;
}

.topbar .breadcrumb {
    flex-wrap: wrap;
    row-gap: .15rem;
}

.topbar-search {
    min-width: 180px;
}

.topbar .btn-toggle-sidebar {
    border: none;
    background: none;
    font-size: 1.2rem;
    color: var(--color-muted);
    cursor: pointer;
}

/* ========================================
   Content Area
   ======================================== */
.content-wrapper {
    padding: var(--app-shell-gutter);
    min-width: 0;
    max-width: 100%;
}

.card,
.table-card,
.stat-card,
.dash-module-card,
.dash-chart-card,
.dash-list-card,
.table-responsive {
    min-width: 0;
}

/* ========================================
   Stat Cards (Dashboard)
   ======================================== */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(31, 41, 55, 0.1);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ========================================
   Table Card
   ======================================== */
.table-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-card .card-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.table-card > .table-responsive {
    padding: 1rem 1.25rem 1.25rem;
}

.table-card > .table-responsive > .table,
.table-card .dataTables_wrapper .table {
    margin-bottom: 0;
}

.table-card .dataTables_wrapper .row:first-child,
.table-card .dt-container .row:first-child {
    align-items: center;
    row-gap: .75rem;
    margin-bottom: .75rem;
}

.table-card .dataTables_wrapper .row:last-child,
.table-card .dt-container .row:last-child {
    align-items: center;
    row-gap: .75rem;
    margin-top: .85rem;
}

.table-card .dt-length,
.table-card .dt-search {
    margin-bottom: .75rem;
}

/* Vertical separators for table columns (subtle, not too dark) */
.table-card .table th,
.table-card .table td {
    border-right: 1px solid rgba(102, 112, 133, 0.12);
}

.table-card .table th:last-child,
.table-card .table td:last-child {
    border-right: none;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 0.5rem;
}

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

.btn-success:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h4 {
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* ========================================
   Modals
   ======================================== */
.modal-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    border-radius: 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ========================================
   Forms
   ======================================== */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #344054;
    margin-bottom: 0.25rem;
}

.form-control,
.form-select {
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(19,127,120,0.14);
}

/* ========================================
   Badge
   ======================================== */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

/* ========================================
   DataTables Overrides
   ======================================== */
.dataTables_wrapper {
    font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
}

table.dataTable {
    font-size: 0.83rem;
}

table.dataTable thead th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #dee2e6;
}

/* ========================================
   Select2 Overrides
   ======================================== */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-family: 'Montserrat', sans-serif;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.5;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #ced4da;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-primary);
}

/* Select2: blue hover for options */
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted:hover {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

/* Keep Select2 dropdown above Bootstrap modal backdrop (z-index 1055). */
.select2-container--open {
    z-index: 1060 !important;
}

/* ========================================
   Login Page
   ======================================== */
.login-wrapper {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(3, 23, 60, 0.88), rgba(5, 36, 90, 0.76)),
        url("../images/salon-login-hero.jpg") center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-shell {
    width: min(1040px, 100%);
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
}

.login-visual {
    position: relative;
    min-height: 640px;
    background:
        linear-gradient(180deg, rgba(3, 23, 60, 0.06), rgba(3, 23, 60, 0.72)),
        url("../images/salon-login-hero.jpg") center / cover no-repeat;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.login-visual-panel {
    width: 100%;
    max-width: 520px;
}

.login-visual-panel .salon-mark {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.login-visual-panel h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: .75rem;
}

.login-visual-panel p {
    color: rgba(255,255,255,0.82);
    font-size: .95rem;
    margin-bottom: 1.25rem;
}

.login-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.login-feature-row span {
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.13);
    border-radius: 999px;
    padding: .45rem .75rem;
    font-size: .76rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.login-wrapper .login-card {
    padding: 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-wrapper .login-card .login-logo {
    margin-bottom: 2rem;
}

.login-wrapper .login-card .login-logo h3 {
    font-weight: 800;
    color: var(--color-primary-dark);
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
}

.login-wrapper .login-card .login-logo p {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.login-card .input-group-text {
    background: #f7f8fb;
    border-color: #ced4da;
    color: var(--color-primary);
    border-radius: .5rem 0 0 .5rem;
}

.login-card .input-group .form-control {
    border-left: 0;
    border-radius: 0 .5rem .5rem 0;
}

/* ========================================
   Responsive Sidebar
   ======================================== */
.sidebar-collapsed .sidebar {
    margin-left: calc(var(--app-sidebar-width) * -1);
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
}

@media (max-width: 768px) {
    :root {
        --app-shell-gutter: 1rem;
    }

    .sidebar {
        margin-left: calc(var(--app-sidebar-width) * -1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
    }

    .sidebar-open .sidebar {
        margin-left: 0;
    }
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   SweetAlert2 Custom
   ======================================== */
.swal2-popup {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

/* ══════════════════════════════════════
   Dashboard Redesign
   ══════════════════════════════════════ */
.dash-banner {
    position: relative;
    background:
        linear-gradient(135deg, rgba(15, 102, 95, .88) 0%, rgba(139, 92, 246, .68) 62%, rgba(216, 155, 24, .52) 100%),
        url("../images/salon-login-hero.jpg") center 42% / cover no-repeat;
    border-radius: 16px;
    padding: 1.25rem 2rem;
    overflow: hidden;
    color: #fff;
}
.dash-banner h3 {
    font-size: 1.35rem;
}
.dash-banner p {
    font-size: 0.85rem;
}
.dash-banner-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM36 6V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.dash-banner-content { position: relative; z-index: 1; }
.dash-search-box {
    position: relative;
    max-width: 420px;
}
.dash-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    z-index: 2;
}
.dash-search-box .form-control {
    padding-left: 38px;
    border-radius: 50px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(4px);
}
.dash-search-box .form-control::placeholder { color: rgba(255,255,255,0.6); }
.dash-search-box .form-control:focus {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
    color: #fff;
}

/* Module Summary Cards */
.dash-module-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none !important;
    position: relative;
}
.dash-module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(31, 41, 55, 0.12);
}
.dash-module-card .card-decor-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    pointer-events: none;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}
.dash-module-header {
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border-radius: 18px 18px 0 0;
    position: relative;
    z-index: 2;
}
.dash-module-header i {
    font-size: 1rem;
}
.dash-module-header span {
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}
/* Vibrant colored headers */
.dash-module-card.card-registry .dash-module-header {
    background: linear-gradient(135deg, #137f78 0%, #3aa69f 100%);
    color: #fff;
}
.dash-module-card.card-registry .dash-module-header i,
.dash-module-card.card-registry .dash-module-header span { color: #fff !important; }
.dash-module-card.card-ffs .dash-module-header {
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: #fff;
}
.dash-module-card.card-ffs .dash-module-header i,
.dash-module-card.card-ffs .dash-module-header span { color: #fff !important; }
.dash-module-card.card-vsla .dash-module-header {
    background: linear-gradient(135deg, #d89b18 0%, #f3bd45 100%);
    color: #1f2937;
}
.dash-module-card.card-vsla .dash-module-header i,
.dash-module-card.card-vsla .dash-module-header span { color: #1f2937 !important; }
.dash-module-card.card-marketplace .dash-module-header {
    background: linear-gradient(135deg, #bc6c25 0%, #e09f3e 100%);
    color: #fff;
}
.dash-module-card.card-marketplace .dash-module-header i,
.dash-module-card.card-marketplace .dash-module-header span { color: #fff !important; }

.dash-module-body { 
    padding: 1rem 1.2rem; 
    flex: 1; 
    position: relative;
    z-index: 2;
    background: linear-gradient(to right, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0.7) 100%);
}
.dash-module-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
}
.dash-module-stat i { 
    width: 22px; 
    text-align: center; 
    font-size: 0.95rem;
}
.dash-stat-number { 
    font-weight: 800; 
    font-size: 1.15rem; 
    color: var(--color-primary-dark);
    letter-spacing: 0;
}
.dash-stat-text { 
    font-size: 0.78rem; 
    color: var(--color-muted);
    font-weight: 500;
}
.dash-module-footer {
    padding: 0.65rem 1.2rem;
    border-top: 1px solid #eee;
    font-size: 0.82rem;
    position: relative;
    z-index: 2;
    background: #fff;
}
.dash-module-footer a { 
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.dash-module-footer a:hover { text-decoration: underline !important; }

/* KPI Cards */
.dash-kpi-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
}
.dash-kpi-card:hover { transform: translateY(-3px); }
.dash-kpi-value { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.dash-kpi-label { font-size: 0.75rem; color: #6c757d; margin-top: 2px; font-weight: 500; }
.dash-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Chart Cards */
.dash-chart-card {
    border-radius: 8px;
    border: none;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.dash-chart-card .card-header {
    border-bottom: 1px solid #f5f5f5;
    padding: 1rem 1.2rem;
    background: #fff;
}
.dash-chart-card .card-header h6 {
    font-weight: 700 !important;
}

/* List Cards */
.dash-list-card {
    border-radius: 8px;
    border: none;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.dash-list-card .card-header {
    border-bottom: 1px solid #f5f5f5;
    padding: 1rem 1.2rem;
    background: #fff;
}
.dash-list-card .card-header h6 {
    font-weight: 700 !important;
}
.dash-list-card .list-group-item {
    border-color: #f8f8f8;
    transition: background 0.15s;
}
.dash-list-card .list-group-item:hover { background: #f8fdf9; }

/* Avatar */
.dash-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* Quick Actions */
.dash-quick-action {
    background: #f6faf9;
    transition: all 0.2s;
    color: #333;
    border: 1px solid transparent;
}
.dash-quick-action:hover {
    background: var(--color-primary-soft);
    border-color: #b8ded8;
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Card Decorative Image */
.card-decor-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    pointer-events: none;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

/* Bold Stat Text */
.dash-stat-text strong {
    font-weight: 700;
    color: #333;
}

/* Background opacity utilities */
.bg-opacity-15 {
    --bs-bg-opacity: 0.15;
}

/* Topbar enhancements */
.topbar {
    background: rgba(255,255,255,0.94);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar .btn-toggle-sidebar {
    border: none;
    background: #f2f6f7;
    font-size: 1rem;
    color: var(--color-muted);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: all 0.2s;
}

.topbar .btn-toggle-sidebar:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
}

/* Quick Add Modal Button */
.sidebar-add-new {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

/* Enhanced Module Header Labels */
.dash-module-header .fw-bold,
.dash-module-header span {
    font-weight: 700 !important;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Quick Add Modal Items */
.quick-add-item {
    border: 2px solid transparent;
}
.quick-add-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: currentColor;
}

/* Enhanced Sidebar Profile */
.sidebar-profile {
    background: #f8fbfb;
}

/* Better list item styling */
.list-group-item.border-0:hover {
    background: rgba(19,127,120,0.07) !important;
}

/* Badge improvements */
.badge.rounded-pill {
    font-weight: 600;
}

/* Progress bar styling */
.progress {
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Card header improvements */
.card-header.border-0 {
    border-bottom: 1px solid #f5f5f5 !important;
}

/* Dashboard search in banner */
.dash-search-box .form-control {
    height: 45px;
    font-size: 0.9rem;
}

/* Partner Logos in Sidebar */
.sidebar-logos {
    min-height: 50px;
}

.sidebar-logos .partner-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-logos .partner-logo-item:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-logos .partner-logo-item img {
    transition: opacity 0.2s ease;
}

.sidebar-logos .partner-logo-item:hover img {
    opacity: 1 !important;
}

/* ========================================
   Readability / Contrast Overrides
   ======================================== */
.content-wrapper,
.topbar,
.dropdown-menu,
.modal-body,
.table,
.table th,
.table td,
table.dataTable,
table.dataTable thead th,
table.dataTable tbody th,
table.dataTable tbody td,
.dataTables_wrapper,
.dt-container {
    color: var(--color-text);
}

.text-muted,
.dash-kpi-label,
small {
    color: var(--color-muted) !important;
}

.form-control,
.form-select,
.form-check-label,
.input-group-text,
input,
select,
textarea,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dt-search input,
.dt-length select,
.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-dropdown {
    color: var(--color-text) !important;
    font-weight: 500;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #98a2b3 !important;
    opacity: 1;
    font-weight: 500;
}

.table thead th,
table.dataTable thead th {
    color: #475467 !important;
}

.table tbody tr:hover {
    background-color: #f5fbf9;
}

.sidebar .text-white,
.sidebar .fw-bold.text-white {
    color: var(--color-text) !important;
}

.sidebar .profile-info small {
    color: var(--color-muted) !important;
}

/* Responsive adjustments */
@media (max-width: 1366px) {
    :root {
        --app-shell-gutter: 1.25rem;
    }

    .topbar {
        padding-inline: 1.25rem;
    }

    .topbar-search {
        max-width: 280px !important;
        margin-inline: .75rem !important;
    }

    .topbar > .d-flex:last-child {
        gap: .75rem !important;
    }
}

@media (max-width: 1199.98px) {
    .sidebar {
        margin-left: calc(var(--app-sidebar-width) * -1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
    }

    .sidebar-collapsed .sidebar {
        margin-left: 0;
    }

    .sidebar-collapsed .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
    }
}

@media (max-width: 991.98px) {
    .topbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .topbar-search {
        order: 3;
        flex-basis: 100%;
        max-width: none !important;
        margin: .25rem 0 0 !important;
    }

    .dash-module-card .card-decor-img {
        width: 35%;
        opacity: 0.15;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-visual {
        min-height: 320px;
    }
}

@media (max-width: 767.98px) {
    .dash-module-card .card-decor-img {
        display: none;
    }
    
    .sidebar-logos {
        flex-wrap: wrap;
    }
    
    .sidebar-logos img {
        height: 22px !important;
    }

    .login-wrapper {
        padding: 1rem;
    }

    .login-wrapper .login-card {
        padding: 1.5rem;
    }

    .login-visual {
        display: none;
    }

    .table-card > .table-responsive {
        padding: .85rem;
    }
}
