[data-theme="dark"] .category-segment {
    background: #1e293b !important;
}
[data-theme="dark"] .seg-btn {
    color: #94a3b8 !important;
}
[data-theme="dark"] .seg-btn:hover {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .seg-btn.active {
    background: #334155 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] .seg-count {
    background: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .seg-btn.active .seg-count {
    background: #3b82f6 !important;
    color: #fff !important;
}

/* --- View Toggle --- */
[data-theme="dark"] .view-toggle {
    background: #1e293b !important;
}
[data-theme="dark"] .view-toggle button {
    color: #94a3b8 !important;
}
[data-theme="dark"] .view-toggle button.active {
    background: #334155 !important;
    color: #3b82f6 !important;
}
[data-theme="dark"] .view-toggle button:hover:not(.active) {
    color: #f1f5f9 !important;
}

/* --- Status Tabs --- */
[data-theme="dark"] .status-tab {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .status-tab:hover {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}
[data-theme="dark"] .status-tab.active {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
}
[data-theme="dark"] .tab-count {
    background: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .status-tab.active .tab-count {
    background: #3b82f6 !important;
    color: #fff !important;
}

/* --- Table Headers --- */
[data-theme="dark"] .desktop-table .table thead th {
    background: #1e2535 !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .desktop-table .table td {
    border-color: #334155 !important;
}
[data-theme="dark"] .desktop-table .table {
    background: #1e293b !important;
}
[data-theme="dark"] .ticket-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}
[data-theme="dark"] .ticket-row.selected {
    background: rgba(59, 130, 246, 0.12) !important;
}

/* --- Filter Bar Inputs --- */
[data-theme="dark"] .filter-bar .form-control,
[data-theme="dark"] .filter-bar .form-select {
    background-color: #1e2535 !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .filter-bar .form-label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .filter-bar {
    background: #1e293b !important;
}
[data-theme="dark"] .count-badge {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}

/* --- Detail Drawer --- */
[data-theme="dark"] .drawer-content {
    background: #1e293b !important;
}
[data-theme="dark"] .drawer-header {
    background: #1e2535 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .drawer-header h3 {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .drawer-header .close-btn {
    color: #94a3b8 !important;
}
[data-theme="dark"] .drawer-header .close-btn:hover {
    background: #334155 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .detail-section {
    border-color: #334155 !important;
}
[data-theme="dark"] .section-label {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .field-label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .field-value {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .description-text {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* --- Drawer Inputs --- */
[data-theme="dark"] .drawer-content .form-control,
[data-theme="dark"] .drawer-content .form-select,
[data-theme="dark"] .drawer-content textarea,
[data-theme="dark"] .drawer-content input[type="text"],
[data-theme="dark"] .drawer-content input[type="date"],
[data-theme="dark"] .drawer-content input[type="month"] {
    background-color: #1e2535 !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* --- Comments --- */
[data-theme="dark"] .comment-item {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .comment-item.internal {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}
[data-theme="dark"] .comment-author {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .comment-date {
    color: #64748b !important;
}
[data-theme="dark"] .comment-text {
    color: #cbd5e1 !important;
}

/* --- Needs Attention Badge --- */
[data-theme="dark"] .needs-attention-badge {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* --- Mobile Cards --- */
[data-theme="dark"] .mobile-ticket-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .mobile-ticket-card:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* --- Dashboard Stats / Metrics --- */
[data-theme="dark"] .stat-card {
    background: #1e293b !important;
}
[data-theme="dark"] .chart-card {
    background: #1e293b !important;
}
[data-theme="dark"] .metric-card {
    background: #0f172a !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .bar-track {
    background: #334155 !important;
}
[data-theme="dark"] .metrics-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* --- Category Badges --- */
[data-theme="dark"] .category-active { background: rgba(59, 130, 246, 0.15) !important; color: #93c5fd !important; }
[data-theme="dark"] .category-backlog { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; }
[data-theme="dark"] .category-future { background: rgba(139, 92, 246, 0.15) !important; color: #c4b5fd !important; }

/* --- Overdue Badge --- */
[data-theme="dark"] .overdue-badge {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* --- Triage / Edit Sections --- */
[data-theme="dark"] .category-note-form {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .edit-reason-form {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

/* --- Kanban Board --- */
[data-theme="dark"] .kanban-column {
    background: #1e293b !important;
}
[data-theme="dark"] .kanban-column-header {
    border-color: #334155 !important;
}
[data-theme="dark"] .kanban-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .kanban-card:hover {
    border-color: #3b82f6 !important;
}

/* --- Lightbox --- */
[data-theme="dark"] .lightbox-content {
    background: #1e293b !important;
}
[data-theme="dark"] .lightbox-header {
    background: #0f172a !important;
    border-color: #334155 !important;
}

/* ===================================================================
   Support Ticket Modal — Dark Mode
   =================================================================== */
[data-theme="dark"] .support-modal {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .support-modal__header {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .support-modal__header h2,
[data-theme="dark"] .support-modal__header h3 {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .support-modal__tabs {
    background: #0f172a !important;
}
[data-theme="dark"] .support-type-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .support-type-btn:hover {
    border-color: #3b82f6 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .support-type-btn.selected {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
}
[data-theme="dark"] .support-field__label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .support-field__input,
[data-theme="dark"] .support-field__textarea,
[data-theme="dark"] .support-field__select {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .support-priority-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .support-priority-btn:hover {
    border-color: #60a5fa !important;
}
[data-theme="dark"] .support-file-label {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .support-modal__footer {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .support-btn--outline,
[data-theme="dark"] .support-btn--secondary {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

/* ===================================================================
   Support Agent Chat — Dark Mode
   =================================================================== */
[data-theme="dark"] .chat-container,
[data-theme="dark"] .support-chat {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .support-chat__messages {
    background: #0f172a !important;
}
[data-theme="dark"] .support-chat__msg.sent .support-chat__bubble {
    background: #26315c !important;
    color: #f1f5f9 !important;
    border: none !important;
}
[data-theme="dark"] .support-chat__msg.received .support-chat__bubble {
    background: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}
[data-theme="dark"] .support-chat__time {
    color: #64748b !important;
}
[data-theme="dark"] .support-chat__input {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .support-chat__input input {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}
