@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   SILOVELYCRM — DESIGN SYSTEM
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-dark: #1e40af;

    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-width: 256px;

    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;

    --text: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, .12);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.logo-sub {
    font-size: 0.68rem;
    color: var(--sidebar-text);
    font-weight: 400;
}

.nav-body {
    padding: 12px 10px;
    flex: 1;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text);
    padding: 12px 12px 4px;
    opacity: 0.55;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.14s ease, color 0.14s ease;
    margin-bottom: 2px;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
}

.nav-bottom {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.top-bar {
    height: 62px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.top-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.content-area {
    padding: 28px 28px;
    flex: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card:last-child {
    margin-bottom: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.card-title i {
    color: var(--primary);
    font-size: 0.9rem;
}

.card-accent-blue {
    border-top: 3px solid var(--primary);
}

.card-accent-green {
    border-top: 3px solid var(--success);
}

.card-accent-amber {
    border-top: 3px solid var(--warning);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.amber {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    margin: 0 -1px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 11px 16px;
    text-align: left;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--primary); color: white !important; border: none; border-radius: var(--radius-sm); }
body .dataTables_wrapper .dataTables_paginate .paginate_button { border: none; padding: 6px 12px; margin: 0 2px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted) !important; font-size: 0.875rem; font-weight: 500; }
body .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: #e2e8f0; color: var(--text-dark) !important; border: none; }

body .dataTables_wrapper .dataTables_filter input { 
    border: 1.5px solid var(--border); 
    border-radius: var(--radius-sm); 
    padding: 9px 13px; 
    margin-left: 8px; 
    outline: none; 
    transition: border-color 0.15s, box-shadow 0.15s; 
    height: 40px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    background: #fff;
}
body .dataTables_wrapper .dataTables_filter input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}
body .dataTables_wrapper .dataTables_length select { 
    border: 1.5px solid var(--border); 
    border-radius: var(--radius-sm); 
    padding: 9px 13px; 
    height: 40px;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    margin: 0 8px;
    color: var(--text);
    background: #fff;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: var(--info-bg);
    color: var(--info);
}

.badge-green {
    background: var(--success-bg);
    color: #065f46;
}

.badge-amber {
    background: var(--warning-bg);
    color: #92400e;
}

.badge-red {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
}

.badge-purple {
    background: #f5f3ff;
    color: #6d28d9;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.14s ease, box-shadow 0.14s ease, transform 0.1s ease, border-color 0.14s ease;
    white-space: nowrap;
    height: 40px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: #f8fafc;
    color: var(--text);
    border-color: #cbd5e1;
}


.btn-lg {
    padding: 13px 24px;
    font-size: 1rem;
    height: auto;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input.form-control, select.form-control {
    height: 40px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 76px;
}

select.form-control {
    cursor: pointer;
}

/* ============================================================
   SELECT2 OVERRIDES
   ============================================================ */
.select2-container .select2-selection--single {
    height: 40px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
    align-items: center;
    background: #fff !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 13px !important;
}

.select2-container .select2-selection--multiple {
    min-height: 40px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    background: #fff !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #f3e8ff !important;
    border: 1px solid #d8b4fe !important;
    color: #7e22ce !important;
    border-radius: 20px !important;
    margin-top: 5px !important;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    overflow: hidden;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #9333ea !important;
    border-right: 1px solid #d8b4fe !important;
    border-top-left-radius: 20px !important;
    border-bottom-left-radius: 20px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: #e9d5ff !important;
    color: #7e22ce !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 6px !important;
    padding-right: 10px !important;
}

/* ============================================================
   CUSTOM TOGGLE SWITCH
   ============================================================ */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background-color: var(--success);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: 0 !important;
}
.form-control.is-invalid {
    border-color: var(--danger);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 2px;
}

.form-divider {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
}

.form-divider i {
    font-size: 0.85rem;
}

.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert i {
    margin-right: 8px;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
body.auth-body {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    margin-left: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 26px;
}

/* ============================================================
   PUBLIC / LANDING
   ============================================================ */
body.public-body {
    display: block;
    background: #fff;
    margin-left: 0;
}

.pub-header {
    background: var(--primary);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
}

.pub-brand i {
    font-size: 1.3rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #60a5fa 100%);
    color: #fff;
    padding: 70px 40px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    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%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.88;
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-trust span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    opacity: 0.8;
}

.features-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-heading {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.feat-icon.blue {
    background: var(--info-bg);
    color: var(--primary);
}

.feat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.feat-icon.amber {
    background: var(--warning-bg);
    color: var(--warning);
}

.feat-icon.purple {
    background: #f5f3ff;
    color: #6d28d9;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.lead-section {
    background: var(--bg);
    padding: 60px 40px;
    border-top: 1px solid var(--border);
}

.lead-inner {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.lead-inner h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lead-inner p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.lead-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    text-align: left;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 13px;
    max-width: 300px;
    transition: border-color 0.15s, background 0.15s;
}

.search-wrap:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.search-wrap i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-wrap input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
}

.search-wrap input:focus {
    outline: none;
}

/* ============================================================
   CUSTOMER PROFILE
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.profile-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.info-item .info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.info-item .info-value {
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
}

.cred-password {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--danger);
}

/* ============================================================
   SECTION / PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.35;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ============================================================
   UTILITIES
   ============================================================ */
hr.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.8rem;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-24 {
    margin-top: 24px;
}

.mono {
    font-family: 'Courier New', monospace;
}

/* Date urgency colors */
.date-urgent {
    color: var(--danger);
    font-weight: 600;
}

.date-soon {
    color: var(--warning);
    font-weight: 600;
}

.date-ok {
    color: var(--success);
    font-weight: 500;
}

/* ============================================================
   CUSTOMER PORTAL (public-facing side)
   ============================================================ */
body.portal-body {
    display: block;
    background: var(--bg);
    margin-left: 0;
}

.portal-header {
    background: var(--primary);
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.portal-header-right a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-header-right a:hover {
    color: #fff;
}

.portal-body .content-area {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 20px;
}

/* Status pill for customer view */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
body.auth-body {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    margin-left: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 26px;
}

/* ============================================================
   PUBLIC / LANDING
   ============================================================ */
body.public-body {
    display: block;
    background: #fff;
    margin-left: 0;
}

.pub-header {
    background: var(--primary);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
}

.pub-brand i {
    font-size: 1.3rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #60a5fa 100%);
    color: #fff;
    padding: 70px 40px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    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%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.88;
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-trust span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    opacity: 0.8;
}

.features-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-heading {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.feat-icon.blue {
    background: var(--info-bg);
    color: var(--primary);
}

.feat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.feat-icon.amber {
    background: var(--warning-bg);
    color: var(--warning);
}

.feat-icon.purple {
    background: #f5f3ff;
    color: #6d28d9;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.lead-section {
    background: var(--bg);
    padding: 60px 40px;
    border-top: 1px solid var(--border);
}

.lead-inner {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.lead-inner h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lead-inner p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.lead-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    text-align: left;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 13px;
    max-width: 300px;
    transition: border-color 0.15s, background 0.15s;
}

.search-wrap:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.search-wrap i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-wrap input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
}

.search-wrap input:focus {
    outline: none;
}

/* ============================================================
   CUSTOMER PROFILE
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.profile-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.info-item .info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.info-item .info-value {
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
}

.cred-password {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--danger);
}

/* ============================================================
   SECTION / PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.35;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ============================================================
   UTILITIES
   ============================================================ */
hr.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.8rem;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-24 {
    margin-top: 24px;
}

.mono {
    font-family: 'Courier New', monospace;
}

/* Date urgency colors */
.date-urgent {
    color: var(--danger);
    font-weight: 600;
}

.date-soon {
    color: var(--warning);
    font-weight: 600;
}

.date-ok {
    color: var(--success);
    font-weight: 500;
}

/* ============================================================
   CUSTOMER PORTAL (public-facing side)
   ============================================================ */
body.portal-body {
    display: block;
    background: var(--bg);
    margin-left: 0;
}

.portal-header {
    background: var(--primary);
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.portal-header-right a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-header-right a:hover {
    color: #fff;
}

.portal-body .content-area {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 20px;
}

/* Status pill for customer view */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: toastIn 0.3s ease forwards;
    pointer-events: all;
    max-width: 320px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

@keyframes toastIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: toastOut 0.3s ease forwards;
}

/* ============================================================
   CONFIRM MODAL
   ============================================================ */
.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.active {
    display: flex;
}

.modal-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-icon {
    font-size: 2rem;
    color: var(--danger);
    margin-bottom: 12px;
}

/* Custom Standard Modal */
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
.sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 150;
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar.open ~ .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 901px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .col-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    .content-area {
        padding: 16px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .col-2,
    .col-3,
    .col-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .features-section,
    .lead-section {
        padding: 40px 20px;
    }
}

/* ============================================================
   FLATPICKR OVERRIDES
   ============================================================ */
.flatpickr-calendar {
    z-index: 99999 !important;
}

/* ============================================================
   DATATABLES OVERRIDES
   ============================================================ */
table.dataTable {
    border-collapse: collapse;
    width: 100%;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--border);
}

table.dataTable thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

table.dataTable tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-dark);
}

table.dataTable tbody tr:hover {
    background: #f8fafc;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary);
    color: white !important;
    border: none;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none;
    padding: 4px 12px;
    margin: 0 2px;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e2e8f0;
    color: var(--text-dark) !important;
    border: none;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    margin-left: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
}

/* ============================================================
   SELECT2 OVERRIDES
   ============================================================ */
/* Hide the default search box in the dropdown if we want, but let's just style it */
.dataTables_length .select2-container {
    width: 70px !important;
    display: inline-block;
    margin: 0 8px;
    vertical-align: middle;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    height: 40px;
}

.select2-container .select2-selection--single {
    height: 40px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    background-color: #fff !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.select2-container--open .select2-selection--single,
.select2-container--focus .select2-selection--single {
    border-color: var(--border) !important;
    box-shadow: none !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text) !important;
    font-size: 0.875rem !important;
    line-height: 37px !important;
    padding-left: 13px !important;
    padding-right: 30px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-muted) transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.select2-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 12px !important;
    font-family: inherit;
    font-size: 0.875rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--primary) !important;
}

.select2-results__option {
    font-size: 0.875rem !important;
    padding: 8px 13px !important;
    color: var(--text) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary) !important;
    color: #fff !important;
}


/* ============================================================
   FLATPICKR OVERRIDES
   ============================================================ */
.flatpickr-calendar {
    font-family: inherit !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-sm) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}