/* Base Styles */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --card-bg: var(--color-bg-card, #ffffff);
    --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --border-color: var(--color-border, #e5e7eb);
    --text-primary: var(--color-text-main, #111827);
    --text-secondary: var(--color-text-muted, #6b7280);
    --text-muted: var(--color-text-muted, #6b7280);
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f3f4f6;
    --primary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: var(--card-shadow);
    --shadow-md: 0 10px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 32px rgba(15, 23, 42, 0.12);

    --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-dark,
.dark-theme {
    --card-bg: var(--color-bg-card, #1e293b);
    --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
    --border-color: var(--color-border, #334155);
    --text-primary: var(--color-text-main, #f3f4f6);
    --text-secondary: var(--color-text-muted, #94a3b8);
    --text-muted: var(--color-text-muted, #94a3b8);
    --bg-secondary: rgba(255, 255, 255, 0.04);
    --bg-tertiary: rgba(255, 255, 255, 0.03);
}

.empty-state {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.empty-state .empty-state-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* RTL Font Support */
.rtl,
.dir-rtl {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

/* Culture-specific optimizations */
.culture-ar,
.culture-ckb {
    font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.culture-en {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth transitions for language switching */
html {
    transition: direction 0.3s ease-in-out;
}

body {
    transition: font-family 0.3s ease-in-out;
}

/* Language switcher styles */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out;
}

.language-switcher:hover {
    border-color: var(--primary-color);
    background: var(--card-bg);
}

.language-switcher i {
    color: var(--text-secondary);
    font-size: 1rem;
}

.language-switcher select {
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 0;
    padding-right: 1.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    outline: none;
}

.language-switcher select:focus {
    outline: none;
    box-shadow: none;
}

/* Language switching animation */
.language-switcher.switching {
    opacity: 0.6;
    pointer-events: none;
}

.language-loader {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* RTL Layout adjustments */
[dir="rtl"] .language-switcher select {
    padding-right: 0;
    padding-left: 1.5rem;
}

[dir="rtl"] .language-loader {
    right: auto;
    left: 0.5rem;
}

/* Smooth fade transition for page changes */
body.page-transitioning {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* RTL/LTR transition animations */
.rtl-layout {
    transform-origin: right center;
}

.ltr-layout {
    transform-origin: left center;
}

/* Culture-specific text alignment */
.culture-ar .text-start,
.culture-ckb .text-start {
    text-align: right !important;
}

.culture-ar .text-end,
.culture-ckb .text-end {
    text-align: left !important;
}

/* Ensure smooth transitions for all text elements */
h1, h2, h3, h4, h5, h6, p, span, div, label, button, a, input, select, textarea {
    transition: font-family 0.3s ease-in-out;
}

/* Language switcher in mobile */
@media (max-width: 768px) {
    .language-switcher {
        padding: 0.25rem 0.5rem;
    }

    .language-switcher i {
        font-size: 0.875rem;
    }

    .language-switcher select {
        font-size: 0.8125rem;
    }
}

/* Buttons */
.btn {
    border-radius: 10px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #6366f1;
    border-color: #6366f1;
}

.btn-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 10px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.input-group > :not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Cards */
.card {
    background-color: var(--color-bg-card, #ffffff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Page Header */
.pms-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pms-page > .page-header {
    margin-bottom: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main, #111827);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.page-description {
    margin: 0;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .page-header {
        align-items: stretch;
    }

    .page-actions {
        width: 100%;
    }
}

/* Task Key */
.task-key {
    font-family: monospace;
    font-weight: 600;
    color: #6366f1;
}

/* Project Icon */
.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Project Card */
.project-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-card .project-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.project-card .project-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.project-card .card-footer-text {
    color: var(--text-secondary);
}

/* Stat Card */
.stat-card {
    border-radius: 12px;
}

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

.stat-primary .stat-icon {
    background-color: rgba(99, 102, 241, 0.1);
   /* color: #6366f1;*/
}

.stat-success .stat-icon {
    background-color: rgba(34, 197, 94, 0.1);
    /*color: #22c55e;*/
}

.stat-warning .stat-icon {
    background-color: rgba(245, 158, 11, 0.1);
    /*color: #f59e0b;*/
}

.stat-danger .stat-icon {
    background-color: rgba(239, 68, 68, 0.1);
    /*color: #ef4444;*/
}

.stat-info .stat-icon {
    background-color: rgba(14, 165, 233, 0.1);
    /*color: #0ea5e9;*/
}

/* Avatar */
.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

/* Badges */
.task-type-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.task-project-badge {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

.priority-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.priority-highest {
    background-color: #dc2626;
    color: white;
}

.priority-high {
    background-color: #ef4444;
    color: white;
}

.priority-medium {
    background-color: #f59e0b;
    color: white;
}

.priority-low {
    background-color: #3b82f6;
    color: white;
}

.priority-lowest {
    background-color: #6b7280;
    color: white;
}

.status-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-todo {
    background-color: #e2e8f0;
    color: #475569;
}

.status-inprogress {
    background-color: #3b82f6;
    color: white;
}

.status-inreview {
    background-color: #8b5cf6;
    color: white;
}

.status-testing {
    background-color: #f59e0b;
    color: white;
}

.status-done {
    background-color: #22c55e;
    color: white;
}

.status-cancelled {
    background-color: #6b7280;
    color: white;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 clamp(220px, 18vw, 280px);
    min-width: 0;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .kanban-board {
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .kanban-column {
        min-width: 80vw;
        max-width: 80vw;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .kanban-board {
        scroll-snap-type: x mandatory;
    }

    .kanban-column {
        min-width: 85vw;
        max-width: 85vw;
        scroll-snap-align: start;
    }
}

.kanban-card-body .task-title {
    overflow-wrap: anywhere;
}

.kanban-column-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.kanban-column-body {
    flex: 1;
    padding: 0.5rem;
    min-height: 200px;
}

.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.kanban-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.kanban-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.kanban-card-body .task-title {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #94a3b8;
}

.kanban-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.project-item:hover {
    background-color: #f1f5f9;
}

.project-item .project-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
}

.project-info .project-name {
    font-weight: 500;
}

.project-info .project-key {
    font-size: 0.75rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner.fullpage {
    min-height: 60vh;
}

/* Empty State */
.empty-state {
    padding: 3rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: #cbd5e1;
}

/* Task Detail Page */
.task-description-label {
    color: var(--text-secondary);
}

.comment-time {
    color: var(--text-secondary);
}

.empty-comment-text {
    color: var(--text-secondary);
}

.empty-history-text {
    color: var(--text-secondary);
}

.history-text {
    color: var(--text-secondary);
}

.detail-label {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.25rem;
}

.detail-unassigned {
    color: var(--text-secondary);
}

.detail-meta-text {
    color: var(--text-secondary);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

/* Member Card */
.member-card {
    transition: transform 0.2s;
}

.member-card:hover {
    transform: translateY(-2px);
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #22c55e;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Error Boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9ENTIALSC9zMjUuODY4NTIgMjYzLjU3NiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-body, #f1f5f9);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark Theme Overrides */
.theme-dark .card,
.dark-theme .card {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
}

.theme-dark .card-header,
.dark-theme .card-header {
    border-bottom-color: var(--color-border, #334155);
}

.theme-dark .card-footer,
.dark-theme .card-footer {
    border-top-color: var(--color-border, #334155);
}

.theme-dark .kanban-column,
.dark-theme .kanban-column {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border, #334155);
}

.theme-dark .kanban-card,
.dark-theme .kanban-card {
    background-color: var(--color-bg-card, #1e293b);
    border: 1px solid var(--color-border, #334155);
}

.theme-dark .form-control,
.theme-dark .form-select,
.dark-theme .form-control,
.dark-theme .form-select {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
    color-scheme: dark;
}

.theme-dark .form-control::placeholder,
.theme-dark .form-select::placeholder,
.dark-theme .form-control::placeholder,
.dark-theme .form-select::placeholder {
    color: var(--color-text-muted, #94a3b8);
}

.theme-dark .input-group-text,
.dark-theme .input-group-text {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .table,
.dark-theme .table {
    color: var(--color-text-main, #f3f4f6);
    border-color: var(--color-border, #334155);
    background-color: var(--color-bg-card, #1e293b);
    --bs-table-bg: var(--color-bg-card, #1e293b);
    --bs-table-color: var(--color-text-main, #f3f4f6);
    --bs-table-border-color: var(--color-border, #334155);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-striped-color: var(--color-text-main, #f3f4f6);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.045);
    --bs-table-hover-color: var(--color-text-main, #f3f4f6);
}

.theme-dark .table thead th,
.dark-theme .table thead th {
    border-bottom-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
    background-color: rgba(255, 255, 255, 0.02);
}

.theme-dark .table tbody td,
.dark-theme .table tbody td {
    border-bottom-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .table-hover tbody tr:hover,
.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.pms-table thead th {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.pms-table tbody td {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    vertical-align: middle;
}

.pms-sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.pms-sticky-header thead th {
    background-color: var(--color-bg-card, #ffffff);
}

.theme-dark .pms-sticky-header thead th,
.dark-theme .pms-sticky-header thead th {
    background-color: var(--color-bg-card, #1e293b);
}

.theme-dark .modal-content,
.dark-theme .modal-content {
    background: var(--color-bg-card, #1e293b);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .project-item:hover,
.dark-theme .project-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Dark mode text utilities */
.theme-dark .text-muted,
.dark-theme .text-muted {
    color: var(--color-text-muted, #94a3b8) !important;
}

.theme-dark .text-dark,
.dark-theme .text-dark {
    color: var(--color-text-main, #f3f4f6) !important;
}

.theme-dark .page-description,
.dark-theme .page-description {
    color: var(--text-secondary);
}

/* Dark mode project card */
.theme-dark .project-card,
.dark-theme .project-card {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .project-card:hover,
.dark-theme .project-card:hover {
    border-color: var(--color-border, #475569);
}

.theme-dark .project-card .project-name,
.dark-theme .project-card .project-name {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .project-card .project-key,
.dark-theme .project-card .project-key {
    color: var(--color-text-muted, #94a3b8);
}

/* Dark mode badges */
.theme-dark .badge.bg-light,
.dark-theme .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--color-text-main, #f3f4f6) !important;
}

/* Dark mode empty state */
.theme-dark .empty-state,
.dark-theme .empty-state {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .empty-state-icon,
.dark-theme .empty-state-icon {
    color: var(--color-text-muted, #94a3b8);
}

/* Dark mode task detail */
.theme-dark .task-description,
.dark-theme .task-description {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .task-description h6,
.dark-theme .task-description h6 {
    color: var(--color-text-muted, #94a3b8);
}

.theme-dark .task-description p,
.dark-theme .task-description p {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .comment-item,
.dark-theme .comment-item {
    border-bottom-color: var(--color-border, #334155) !important;
}

.theme-dark .history-item,
.dark-theme .history-item {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .detail-item label,
.dark-theme .detail-item label {
    color: var(--color-text-muted, #94a3b8) !important;
}

.theme-dark .detail-item span,
.dark-theme .detail-item span {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode breadcrumbs */
.theme-dark .breadcrumb-item,
.dark-theme .breadcrumb-item {
    color: var(--color-text-muted, #94a3b8);
}

.theme-dark .breadcrumb-item a,
.dark-theme .breadcrumb-item a {
    color: var(--color-text-muted, #94a3b8);
}

.theme-dark .breadcrumb-item.active,
.dark-theme .breadcrumb-item.active {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode alerts */
.theme-dark .alert,
.dark-theme .alert {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .alert-success,
.dark-theme .alert-success {
    background-color: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

.theme-dark .alert-danger,
.dark-theme .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.theme-dark .alert-warning,
.dark-theme .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.theme-dark .alert-info,
.dark-theme .alert-info {
    background-color: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

/* Dark mode progress bars */
.theme-dark .progress,
.dark-theme .progress {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Dark mode stat cards */
.theme-dark .stat-card,
.dark-theme .stat-card {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .stat-value,
.dark-theme .stat-value {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .stat-label,
.dark-theme .stat-label {
    color: var(--color-text-muted, #94a3b8);
}

/* Dark mode for h tags */
.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6,
.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4, .dark-theme h5, .dark-theme h6 {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode small text */
.theme-dark small,
.dark-theme small {
    color: var(--color-text-muted, #94a3b8);
}

/* Dark mode buttons outline */
.theme-dark .btn-outline-secondary,
.dark-theme .btn-outline-secondary {
    color: var(--color-text-main, #f3f4f6);
    border-color: var(--color-border, #334155);
}

.theme-dark .btn-outline-secondary:hover,
.dark-theme .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border, #475569);
}

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

.theme-dark .btn-outline-danger,
.dark-theme .btn-outline-danger {
    color: #ef4444;
    border-color: #ef4444;
}

.theme-dark .btn-outline-danger:hover,
.dark-theme .btn-outline-danger:hover {
    background-color: #ef4444;
    color: white;
}

/* Dark mode list groups */
.theme-dark .list-group-item,
.dark-theme .list-group-item {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode dropdown */
.theme-dark .dropdown-menu,
.dark-theme .dropdown-menu {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
    --bs-dropdown-bg: var(--color-bg-card, #1e293b);
    --bs-dropdown-color: var(--color-text-main, #f3f4f6);
    --bs-dropdown-border-color: var(--color-border, #334155);
    --bs-dropdown-divider-bg: var(--color-border, #334155);
    --bs-dropdown-link-color: var(--color-text-main, #f3f4f6);
    --bs-dropdown-link-hover-color: var(--color-text-main, #f3f4f6);
    --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-dropdown-link-active-bg: rgba(99, 102, 241, 0.2);
    --bs-dropdown-link-active-color: var(--color-text-main, #f3f4f6);
    --bs-dropdown-header-color: var(--color-text-muted, #94a3b8);
}

.theme-dark .dropdown-menu hr,
.dark-theme .dropdown-menu hr {
    border-top-color: var(--color-border, #334155);
    opacity: 1;
}

.theme-dark .dropdown-header,
.dark-theme .dropdown-header {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .dropdown-item,
.dark-theme .dropdown-item {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .dropdown-item:focus,
.dark-theme .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.04);
}

.theme-dark .dropdown-item:active,
.dark-theme .dropdown-item:active {
    background-color: rgba(99, 102, 241, 0.2);
}

.theme-dark .dropdown-item:hover,
.dark-theme .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.theme-dark select.form-select option,
.dark-theme select.form-select option {
    background-color: var(--color-bg-card, #1e293b);
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode nav tabs */
.theme-dark .nav-tabs,
.dark-theme .nav-tabs {
    border-bottom-color: var(--color-border, #334155);
}

.theme-dark .nav-tabs .nav-link,
.dark-theme .nav-tabs .nav-link {
    color: var(--color-text-muted, #94a3b8);
    border-color: transparent;
}

.theme-dark .nav-tabs .nav-link:hover,
.dark-theme .nav-tabs .nav-link:hover {
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .nav-tabs .nav-link.active,
.dark-theme .nav-tabs .nav-link.active {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155) var(--color-border, #334155) transparent;
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode pagination */
.theme-dark .pagination .page-link,
.dark-theme .pagination .page-link {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .pagination .page-link:hover,
.dark-theme .pagination .page-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.theme-dark .pagination .page-item.active .page-link,
.dark-theme .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dark mode accordion */
.theme-dark .accordion-item,
.dark-theme .accordion-item {
    background-color: var(--color-bg-card, #1e293b);
    border-color: var(--color-border, #334155);
}

.theme-dark .accordion-button,
.dark-theme .accordion-button {
    background-color: var(--color-bg-card, #1e293b);
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .accordion-button:not(.collapsed),
.dark-theme .accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode for strong/bold text */
.theme-dark strong,
.theme-dark b,
.dark-theme strong,
.dark-theme b {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode for generic paragraphs */
.theme-dark p,
.dark-theme p {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode project info */
.theme-dark .project-info .project-name,
.dark-theme .project-info .project-name {
    color: var(--color-text-main, #f3f4f6);
}

.theme-dark .project-info .project-key,
.dark-theme .project-info .project-key {
    color: var(--color-text-muted, #94a3b8) !important;
}

/* Dark mode table borders */
.theme-dark .table>:not(caption)>*>*,
.dark-theme .table>:not(caption)>*>* {
    border-bottom-color: var(--color-border, #334155);
}

/* Dark mode for loading spinners text */
.theme-dark .loading-spinner,
.dark-theme .loading-spinner {
    color: var(--color-text-main, #f3f4f6);
}

/* Dark mode comment content */
.theme-dark .comment-item p,
.theme-dark .comment-item strong,
.dark-theme .comment-item p,
.dark-theme .comment-item strong {
    color: var(--color-text-main, #f3f4f6) !important;
}

/* Dark mode task key in tables */
.theme-dark .task-key,
.dark-theme .task-key {
    color: #818cf8 !important;
}

/* Status badge adjustments for dark mode */
.theme-dark .status-todo,
.dark-theme .status-todo {
    background-color: #475569;
    color: #e2e8f0;
}
