/* --- Premium UI System --- */

:root {
    --chat-primary: #6366f1;
    --chat-primary-light: rgba(99, 102, 241, 0.1);
    --chat-bg: #f3f4f6;
    --chat-sidebar: #ffffff;
    --chat-header: rgba(255, 255, 255, 0.9);
    --chat-sent: #6366f1;
    --chat-received: #ffffff;
    --chat-border: #eef2f6;
    --chat-text: #1e293b;
    --chat-text-muted: #64748b;
    --chat-success: #10b981;
    --chat-danger: #ef4444;
    --purple: #7f44ff;
    --purple-soft: rgba(127, 68, 255, 0.1);

    /* Global Design Tokens */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: rgba(99, 102, 241, 0.1);
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Modern Utilities */
.grow { flex-grow: 1 !important; }
.grow-0 { flex-grow: 0 !important; }

.text-purple { color: var(--purple) !important; }
.bg-purple-subtle { background-color: var(--purple-soft) !important; }
.bg-success-glow { 
    background-color: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
}

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

/* Dashboard Stat Widgets */
.stat-widget-1 {
    padding: 14px 16px !important;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eee;
    min-height: 110px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-widget-1 h6 {
    margin-bottom: 2px !important;
    font-size: 13px;
    font-weight: 600;
}

.stat-widget-1 h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.stat-widget-1 p {
    margin-top: 4px !important;
    font-size: 12px !important;
    line-height: 14px;
}

/* Premium Card & Layouts */
.premium-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #edf2f7;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Tables */
.premium-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tbody td {
    padding: 16px 24px;
    vertical-align: middle;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Search & Inputs */
.search-wrapper {
    position: relative;
    max-width: 300px;
}

.search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-wrapper input {
    padding-left: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s;
}

.search-wrapper input:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Loading Overlays */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 20px;
}

/* Avatars & Badges */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

/* Scoped status badge color variants — only apply within .status-badge */
.status-badge.bg-primary-subtle { background-color: #cfe2ff; color: #084298; }
.status-badge.bg-info-subtle { background-color: #cff4fc; color: #055160; }
.status-badge.bg-success-subtle { background-color: #d1e7dd; color: #0f5132; }
.status-badge.bg-danger-subtle { background-color: #f8d7da; color: #842029; }
.status-badge.bg-warning-subtle { background-color: #fff3cd; color: #664d03; }
.status-badge.bg-secondary-subtle { background-color: #e2e3e5; color: #41464b; }

.btn-sync {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s;
}

.btn-sync:hover {
    background: #f8fafc;
    color: #6366f1;
    border-color: #6366f1;
}

/* --- Chat System --- */
.chat-wrapper {
    height: calc(100vh - 140px);
    background: var(--chat-bg);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--chat-border);
    margin-top: 10px;
}

.chat-sidebar {
    width: 360px;
    background: var(--chat-sidebar);
    border-right: 1px solid var(--chat-border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 28px 24px;
    background: var(--chat-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--chat-border);
}

.sidebar-header h4 {
    color: var(--chat-text);
    letter-spacing: -0.5px;
}

.search-box {
    position: relative;
    margin-top: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--chat-text);
}

.search-box input:focus {
    background: #fff;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 4px var(--chat-primary-light);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--chat-text-muted);
    font-size: 18px;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: none;
}

.contact-list::-webkit-scrollbar { display: none; }

.contact-card {
    padding: 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.contact-card:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.contact-card.active {
    background: var(--chat-primary-light);
    border-color: rgba(99, 102, 241, 0.2);
}

.contact-card.active .contact-name { color: var(--chat-primary); }

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--chat-success);
}

.contact-info { flex: 1; min-width: 0; }

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.contact-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--chat-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-time {
    font-size: 12px;
    color: var(--chat-text-muted);
    font-weight: 500;
}

.contact-last-msg {
    font-size: 14px;
    color: var(--chat-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.chat-header {
    padding: 20px 30px;
    background: var(--chat-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.message-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: 
        radial-gradient(circle at 2px 2px, #f1f5f9 1px, transparent 0);
    background-size: 30px 30px;
    scroll-behavior: smooth;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 22px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    animation: messageSlideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transition: all 0.3s ease;
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--chat-primary), #4f46e5);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.3);
}

.message-received {
    align-self: flex-start;
    background: #ffffff;
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--chat-border);
}

.message-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.8;
}

.status-icon { font-size: 14px; }
.status-failed { color: var(--chat-danger); }

/* Footer / Input Area */
.chat-footer {
    padding: 24px 30px;
    background: #ffffff;
    border-top: 1px solid var(--chat-border);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: #fff;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 4px var(--chat-primary-light);
    transform: translateY(-2px);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    outline: none;
    color: var(--chat-text);
    font-family: inherit;
}

.chat-input::placeholder { color: var(--chat-text-muted); }

.action-btn {
    color: var(--chat-text-muted);
    font-size: 20px;
    transition: all 0.2s;
    padding: 4px;
}

.action-btn:hover { color: var(--chat-primary); transform: scale(1.1); }

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--chat-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.send-btn:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.send-btn:active { transform: scale(0.95); }

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-icon:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

.btn-icon i {
    font-size: 1.1rem;
}

/* Keyword & Repeater Styling */
.keyword-row-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

.keyword-input-box {
    display: flex;
    flex-grow: 1;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyword-input-box:focus-within {
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 4px var(--chat-primary-light);
}

.keyword-blue-strip {
    width: 6px;
    background-color: var(--chat-primary);
    flex-shrink: 0;
}

.keyword-input-field {
    border: none !important;
    box-shadow: none !important;
    padding: 12px 16px;
    width: 100%;
    font-size: 14px;
}

.btn-delete-keyword {
    border: 1px solid #fee2e2;
    color: #ef4444;
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff;
    transition: all 0.2s;
}

.btn-delete-keyword:hover {
    background-color: #fee2e2;
    color: #dc2626;
    transform: scale(1.05);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.store-platform-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--chat-primary-light);
    color: var(--chat-primary);
}

.premium-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-breadcrumb a {
    color: var(--chat-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.premium-breadcrumb a:hover {
    color: var(--chat-primary);
}

.premium-breadcrumb .active {
    color: var(--chat-text);
    font-weight: 600;
}

.premium-breadcrumb i {
    font-size: 14px;
    color: #cbd5e1;
}

.premium-empty-icon {
    width: 100px;
    height: 100px;
    background: var(--chat-primary-light);
    color: var(--chat-primary);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
    opacity: 0.8;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========================================
   DARK MODE SYSTEM
   Triggered by body.dark-theme class
   ======================================== */

body.dark-theme {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* --- Dark Mode: Layout --- */
body.dark-theme .content-body { background: #0f172a; }
body.dark-theme .header { background: #1e293b !important; border-bottom: 1px solid #334155; }
body.dark-theme .header .header-content { background: transparent; }
body.dark-theme .sidebar { background: #0f172a !important; }

/* --- Dark Mode: Cards & Premium Card --- */
body.dark-theme .premium-card,
body.dark-theme .card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

body.dark-theme .card-header,
body.dark-theme .card-footer {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* --- Dark Mode: Tables --- */
body.dark-theme .premium-table thead th {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .premium-table tbody td {
    color: #e2e8f0 !important;
    border-bottom-color: #1e293b !important;
}

body.dark-theme .premium-table tbody tr:hover {
    background-color: #253348 !important;
}

body.dark-theme .table { color: #e2e8f0; }

/* --- Dark Mode: Text --- */
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3,
body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 {
    color: #f1f5f9 !important;
}

body.dark-theme .fw-bold.text-dark,
body.dark-theme .text-dark {
    color: #e2e8f0 !important;
}

body.dark-theme .text-muted {
    color: #94a3b8 !important;
}

body.dark-theme .page-title h3 { color: #f1f5f9 !important; }

/* --- Dark Mode: Inputs & Search --- */
body.dark-theme .search-wrapper input,
body.dark-theme .form-control,
body.dark-theme .form-select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .search-wrapper input:focus,
body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background: #1e293b !important;
    border-color: var(--chat-primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

body.dark-theme .search-wrapper i { color: #64748b !important; }

body.dark-theme .input-group-text {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* --- Dark Mode: Buttons --- */
body.dark-theme .btn-light,
body.dark-theme .btn-white {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .btn-light:hover,
body.dark-theme .btn-white:hover {
    background: #253348 !important;
}

body.dark-theme .btn-sync {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-theme .btn-icon:hover {
    background-color: #334155 !important;
}

body.dark-theme .btn-close { filter: invert(1); }

/* --- Dark Mode: Badges (scoped to content area) --- */
body.dark-theme .content-body .bg-light,
body.dark-theme .modal .bg-light,
body.dark-theme .offcanvas .bg-light { background-color: #1e293b !important; }

body.dark-theme .content-body .bg-primary-subtle { background-color: rgba(99,102,241,0.15) !important; color: #a5b4fc !important; }
body.dark-theme .content-body .bg-info-subtle { background-color: rgba(14,165,233,0.15) !important; color: #7dd3fc !important; }
body.dark-theme .content-body .bg-success-subtle { background-color: rgba(16,185,129,0.15) !important; color: #6ee7b7 !important; }
body.dark-theme .content-body .bg-danger-subtle { background-color: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }
body.dark-theme .content-body .bg-warning-subtle { background-color: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }
body.dark-theme .content-body .bg-secondary-subtle { background-color: rgba(100,116,139,0.15) !important; color: #cbd5e1 !important; }

body.dark-theme .content-body .badge.bg-light { background-color: #334155 !important; color: #cbd5e1 !important; }

/* --- Dark Mode: Loading Overlay --- */
body.dark-theme .loading-overlay {
    background: rgba(15, 23, 42, 0.75) !important;
}

/* --- Dark Mode: Empty State Icon --- */
body.dark-theme .premium-empty-icon {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
}

/* --- Dark Mode: Store Cards --- */
body.dark-theme .store-platform-icon {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
}

body.dark-theme .bg-light.rounded-4,
body.dark-theme .bg-light.rounded-3 {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* --- Dark Mode: Breadcrumbs --- */
body.dark-theme .premium-breadcrumb a { color: #64748b !important; }
body.dark-theme .premium-breadcrumb .active { color: #e2e8f0 !important; }
body.dark-theme .premium-breadcrumb i { color: #475569 !important; }

/* --- Dark Mode: Chat System --- */
body.dark-theme .chat-wrapper { background: #0f172a; border-color: #334155; }
body.dark-theme .chat-sidebar { background: #1e293b; border-color: #334155; }
body.dark-theme .sidebar-header { background: #1e293b; border-color: #334155; }
body.dark-theme .chat-main { background: #0f172a; }
body.dark-theme .chat-header { background: #1e293b; border-color: #334155; }
body.dark-theme .chat-footer { background: #1e293b; border-color: #334155; }
body.dark-theme .contact-card:hover { background: #253348; }
body.dark-theme .contact-card.active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); }
body.dark-theme .message-received { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-theme .input-wrapper { background: #0f172a; border-color: #334155; }
body.dark-theme .input-wrapper:focus-within { background: #1e293b; }
body.dark-theme .chat-input { color: #e2e8f0; }
body.dark-theme .message-container { background: #0f172a; background-image: none; }
body.dark-theme .status-indicator { border-color: #1e293b; }
body.dark-theme .search-box input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-theme .search-box input:focus { background: #1e293b; }

/* --- Dark Mode: Modals & Offcanvas --- */
body.dark-theme .modal-content {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    border-color: #334155 !important;
    background: #1e293b !important;
}

body.dark-theme .modal-footer.bg-light { background: #0f172a !important; }
body.dark-theme .modal-body.bg-light-subtle { background: #0f172a !important; }

body.dark-theme .offcanvas {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .offcanvas-header { border-color: #334155 !important; }

/* --- Dark Mode: Alerts --- */
body.dark-theme .alert-success { background: rgba(16,185,129,0.15); border-color: #065f46; color: #6ee7b7; }
body.dark-theme .alert-danger { background: rgba(239,68,68,0.15); border-color: #991b1b; color: #fca5a5; }
body.dark-theme .alert-info { background: rgba(14,165,233,0.15); border-color: #0369a1; color: #7dd3fc; }

/* --- Dark Mode: Keywords / Auto-reply --- */
body.dark-theme .keyword-input-box { background: #0f172a; border-color: #334155; }
body.dark-theme .keyword-input-field { background: transparent !important; color: #e2e8f0 !important; }
body.dark-theme .btn-delete-keyword { background: #1e293b; border-color: #991b1b; }

/* --- Dark Mode: Dashboard cards --- */
body.dark-theme .budgets-nav { background: #1e293b; border-color: #334155; }
body.dark-theme .budgets-nav-text p { color: #94a3b8 !important; }
body.dark-theme .budgets-nav-icon span { background: rgba(99,102,241,0.15); }

/* --- Dark Mode: Hover Lift cards --- */
body.dark-theme .hover-lift:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.4), 0 10px 10px -5px rgba(0,0,0,0.2) !important;
}

/* --- Dark Mode: Dropdown --- */
body.dark-theme .dropdown-menu {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .dropdown-item {
    color: #e2e8f0 !important;
}

body.dark-theme .dropdown-item:hover {
    background: #253348 !important;
}

/* --- Dark Mode: Pagination --- */
body.dark-theme .page-link {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-theme .page-item.active .page-link {
    background: var(--chat-primary) !important;
    border-color: var(--chat-primary) !important;
    color: #fff !important;
}

/* --- Dark Mode: Scrollbar --- */
body.dark-theme ::-webkit-scrollbar-thumb { background: #475569; }
body.dark-theme ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* --- Dark Mode: Header toggle icon visibility --- */
body.dark-theme .dark-light-toggle .dark { display: none; }
body.dark-theme .dark-light-toggle .light { display: inline-block; }
.dark-light-toggle .light { display: none; }

/* --- Dark Mode: Form labels --- */
body.dark-theme .form-label { color: #cbd5e1 !important; }
body.dark-theme label { color: #cbd5e1; }
body.dark-theme .form-check-label span { color: #e2e8f0 !important; }

/* --- Dark Mode: Dashboard stat widgets --- */
body.dark-theme .stat-widget-1 {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .stat-widget-1 h6 { color: #94a3b8 !important; }
body.dark-theme .stat-widget-1 h3 { color: #f1f5f9 !important; }
body.dark-theme .stat-widget-1 p { color: #94a3b8 !important; }

/* --- Dark Mode: Dashboard step cards --- */
body.dark-theme .card.p-4 {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .content-body .card-body { background: transparent; }
body.dark-theme .content-body .card-body strong { color: #f1f5f9; }

/* --- Dark Mode: Progress bars --- */
body.dark-theme .progress-stacked,
body.dark-theme .progress {
    background: #334155 !important;
}

/* --- Dark Mode: List & Invoice --- */
body.dark-theme .invoice-content ul li { border-color: #334155 !important; }
body.dark-theme .invoice-info h5 { color: #e2e8f0 !important; }
body.dark-theme .invoice-info p { color: #94a3b8 !important; }
body.dark-theme .list-1 ul li { border-color: #334155 !important; }
body.dark-theme .list-1 ul li p { color: #94a3b8 !important; }
body.dark-theme .list-1 ul li h5 { color: #e2e8f0 !important; }

/* --- Dark Mode: HR / Divider --- */
body.dark-theme hr { border-color: #334155 !important; opacity: 0.5; }

/* --- Dark Mode: Footer --- */
body.dark-theme .footer {
    background: #1e293b !important;
    border-top: 1px solid #334155 !important;
}
body.dark-theme .footer .copyright p { color: #64748b !important; }
body.dark-theme .footer a { color: #94a3b8 !important; }

/* --- Dark Mode: Header nav icons --- */
body.dark-theme .header .icon-menu span { color: #e2e8f0; }
body.dark-theme .header .notify-bell span { color: #e2e8f0; }
body.dark-theme .header .user-info h5 { color: #f1f5f9 !important; }
body.dark-theme .header .user-info span { color: #94a3b8 !important; }
body.dark-theme .header .user-email { border-color: #334155 !important; }
body.dark-theme .dark-light-toggle { color: #e2e8f0; }

/* --- Dark Mode: Breadcrumbs (legacy) --- */
body.dark-theme .breadcrumbs a { color: #94a3b8 !important; }
body.dark-theme .breadcrumbs span i { color: #475569 !important; }

/* --- Dark Mode: Table (generic Bootstrap) --- */
body.dark-theme .table thead th {
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

body.dark-theme .table tbody td {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .table tbody tr:hover { background: #253348 !important; }

/* --- Dark Mode: SweetAlert2 --- */
body.dark-theme .swal2-popup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-theme .swal2-title { color: #f1f5f9 !important; }
body.dark-theme .swal2-html-container { color: #94a3b8 !important; }

/* --- Dark Mode: Preloader --- */
body.dark-theme .preloader-wrapper { background: #0f172a !important; }

/* --- Dark Mode: Scoped content overrides --- */
body.dark-theme .content-body .bg-white { background-color: #1e293b !important; }
body.dark-theme .content-body .border { border-color: #334155 !important; }
body.dark-theme .content-body .border-bottom { border-color: #334155 !important; }
body.dark-theme .modal .bg-white { background-color: #1e293b !important; }
body.dark-theme .offcanvas .bg-white { background-color: #1e293b !important; }
