/* ===========================
   TODO App - Custom Styles
   (Bootstrap 5 üzerine)
   =========================== */

:root {
    --app-primary: #4f46e5;
    --app-primary-hover: #4338ca;
    --app-bg: #f8f9fc;
    --app-sidebar-bg: #ffffff;
    --app-border: #e9ecef;
    --app-text-muted: #6c757d;
    --app-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body {
    background: var(--app-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Navbar ---- */
.app-navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1rem;
}

.app-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--app-primary) !important;
    letter-spacing: -0.3px;
}

.app-navbar .navbar-toggler {
    color: #495057;
    padding: 0.4rem;
}

.app-navbar .navbar-toggler:focus {
    box-shadow: none;
}

.app-navbar .nav-link {
    color: #495057 !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem !important;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}

.app-navbar .nav-link:hover {
    background: #f1f0ff;
    color: var(--app-primary) !important;
}

.app-navbar .nav-link.active {
    background: #ede9fe;
    color: var(--app-primary) !important;
}

.app-navbar .navbar-user {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

/* Dropdown inside navbar */
.app-navbar .dropdown-toggle::after {
    font-size: 0.65rem;
    vertical-align: 0.15em;
}

.app-navbar .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    border: 1px solid var(--app-border);
    padding: 0.35rem;
    min-width: 220px;
}

.app-navbar .dropdown-item {
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
}

.app-navbar .dropdown-item:hover {
    background: #f1f0ff;
    color: var(--app-primary);
}

.app-navbar .dropdown-item.active {
    background: #ede9fe;
    color: var(--app-primary);
}

/* Offcanvas mobile styling */
.offcanvas-xl .offcanvas-header {
    padding: 1rem 1.25rem;
}

.offcanvas-xl .offcanvas-body .nav-link {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.95rem;
}

/* Remove mobile border-top when on desktop */
@media (max-width: 1199.98px) {
    .navbar-user-section {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--app-border);
    }
}

/* Update badge on dropdown toggle */
.app-navbar .nav-link-update-badge::after {
    top: 6px;
    right: 14px;
}

.dropdown-item-update {
    position: relative;
}

/* ---- Tema toggle butonu ---- */
.theme-toggle-btn {
    padding: 0.35rem 0.6rem !important;
}

.theme-icon-dark {
    display: none;
}

.theme-icon-light {
    display: inline-block;
}

[data-bs-theme="dark"] .theme-icon-light {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-dark {
    display: inline-block;
}

.login-theme-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

/* ---- Page wrapper ---- */
.page-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---- Cards ---- */
.card {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: var(--app-card-shadow);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--app-border);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.85rem 1.25rem;
    border-radius: 10px 10px 0 0 !important;
}

.card-body {
    padding: 1.25rem;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.btn-outline-primary {
    color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-outline-primary:hover {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

/* ---- Tables ---- */
.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-text-muted);
    background: #f8f9fc;
    border-bottom: 1px solid var(--app-border);
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background: #f5f4ff;
}

.trigger-list-item {
    padding: 0;
}

.trigger-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 0;
    background: transparent;
    text-align: left;
}

.trigger-toggle:hover {
    background: #f8fafc;
}

.trigger-toggle-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.trigger-toggle-icon {
    color: #64748b;
    transition: transform 0.2s ease;
}

.trigger-toggle[aria-expanded="true"] .trigger-toggle-icon {
    transform: rotate(180deg);
}

.trigger-collapse-body {
    padding: 0 1.25rem 1.1rem;
    border-top: 1px solid #e5e7eb;
}

.trigger-url,
.trigger-url-table {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    color: #475569;
    word-break: break-all;
}

.trigger-url {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
}

.trigger-url-table {
    max-width: 420px;
}

/* ---- Stat Cards ---- */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--app-card-shadow);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--app-text-muted);
    margin-top: 0.25rem;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

/* ---- Badges (Priority & Status) ---- */
.badge-priority-low {
    background: #d1fae5;
    color: #065f46;
    font-weight: 600;
}

.badge-priority-medium {
    background: #fef9c3;
    color: #854d0e;
    font-weight: 600;
}

.badge-priority-high {
    background: #fed7aa;
    color: #9a3412;
    font-weight: 600;
}

.badge-priority-critical {
    background: #fecaca;
    color: #991b1b;
    font-weight: 600;
}

.badge-status-open {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.badge-status-in_progress {
    background: #fef9c3;
    color: #854d0e;
    font-weight: 600;
}

.badge-status-done {
    background: #d1fae5;
    color: #065f46;
    font-weight: 600;
}

.badge-status-cancelled {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
}

.badge-status-on_hold {
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
}

.badge-status-rejected {
    background: #fecaca;
    color: #991b1b;
    font-weight: 600;
}

.badge-escalated {
    background: #fef9c3;
    color: #854d0e;
    font-weight: 600;
}

/* backward compat */
.badge-low {
    background: #d1fae5;
    color: #065f46;
}

.badge-medium {
    background: #fef9c3;
    color: #854d0e;
}

.badge-high {
    background: #fed7aa;
    color: #9a3412;
}

.badge-critical {
    background: #fecaca;
    color: #991b1b;
}

.badge-open {
    background: #dbeafe;
    color: #1e40af;
}

.badge-in_progress {
    background: #fef9c3;
    color: #854d0e;
}

.badge-done {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #e5e7eb;
    color: #374151;
}

.badge-on_hold {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-rejected {
    background: #fecaca;
    color: #991b1b;
}

/* ---- Task title link ---- */
.todo-title-link {
    color: #212529;
    font-weight: 500;
    text-decoration: none;
}

.todo-title-link:hover {
    color: var(--app-primary);
    text-decoration: underline;
}

/* ---- History timeline ---- */
.history-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--app-border);
    font-size: 0.85rem;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.history-created {
    border-left: 3px solid #10b981;
    padding-left: 0.75rem;
}

.history-item.history-updated {
    border-left: 3px solid #6366f1;
    padding-left: 0.75rem;
}

.history-item.history-assigned {
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
}

.history-item.history-status_change {
    border-left: 3px solid #f59e0b;
    padding-left: 0.75rem;
}

.history-item.history-escalated {
    border-left: 3px solid #ef4444;
    padding-left: 0.75rem;
}

.history-item.history-monitor_read {
    border-left: 3px solid #22c55e;
    padding-left: 0.75rem;
}

.history-time {
    white-space: nowrap;
    color: var(--app-text-muted);
    font-size: 0.75rem;
    min-width: 110px;
}

/* ---- Comment items ---- */
.comment-item {
    background: #f8f9fc;
    border-left: 3px solid var(--app-primary);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.comment-item .comment-author {
    font-weight: 600;
    font-size: 0.875rem;
}

.comment-item .comment-time {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

/* ---- Login page ---- */
.login-bg {
    min-height: 100vh;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.login-bg *,
.login-bg *::before,
.login-bg *::after {
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border: none;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.login-card .login-header {
    text-align: center;
    padding: 2.5rem 2.5rem 0.5rem;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.login-brand-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.login-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.login-brand-tagline {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.login-card-body {
    padding: 1.25rem 2.5rem 2.5rem;
}

.login-form .login-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.login-required {
    color: #dc3545;
    font-weight: 600;
}

.login-form .login-input {
    min-height: 48px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
}

.login-form .login-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-check-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

.login-forgot {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #007bff;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
    color: #0062cc;
}

.login-submit {
    min-height: 50px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.login-submit:hover,
.login-submit:focus {
    background-color: #0069d9 !important;
    border-color: #0062cc !important;
}

.login-footer-text {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 1.5rem 0 0;
}

.login-footer-link {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
}

.login-footer-link:hover {
    text-decoration: underline;
}

[data-bs-theme="dark"] a.login-forgot,
[data-bs-theme="dark"] a.login-footer-link {
    color: #60a5fa;
}

/* ---- Monitor (TV) page ---- */
.monitor-page {
    background: #0f0f1a;
    color: #e8e8f0;
    min-height: 100vh;
    padding: 1.5rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2a2a3e;
}

.monitor-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #a5b4fc;
}

.monitor-time {
    font-size: 0.8rem;
    color: #6b7280;
}

.monitor-table {
    width: 100%;
    border-collapse: collapse;
}

.monitor-table th {
    background: #1a1a2e;
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 1rem;
}

.monitor-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #1e1e30;
    font-size: 0.875rem;
}

.monitor-table tr:hover td {
    background: #1a1a2e;
}

/* ---- View tabs ---- */
.view-tabs {
    display: flex;
    gap: 0.25rem;
}

.view-tab {
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    color: #495057;
    background: #f1f3f5;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.view-tab:hover {
    background: #e9e8ff;
    color: var(--app-primary);
}

.view-tab.active {
    background: var(--app-primary);
    color: #fff;
    border-color: var(--app-primary);
}

/* ---- Page header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

/* ---- Form tweaks ---- */
.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
}

.form-control,
.form-select {
    font-size: 0.875rem;
    border-color: var(--app-border);
    border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

/* ---- Task detail DL ---- */
.task-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.task-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    overflow: hidden;
}

.task-meta-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-text-muted);
}

.task-meta-value {
    font-size: 0.875rem;
    color: #212529;
    font-weight: 500;
}

/* ---- Score badge ---- */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--app-primary);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ---- Tag pills ---- */
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15em 0.55em;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tag-check-label .tag-pill {
    cursor: pointer;
    transition: opacity 0.15s;
}

.tag-check-label:hover .tag-pill {
    opacity: 0.85;
}

/* ---- Overdue rows ---- */
tr.row-overdue>td {
    background: #fff5f5 !important;
}

tr.row-overdue .overdue-date {
    color: #dc2626;
    font-weight: 600;
}

tr.row-overdue .overdue-icon {
    font-size: 0.75rem;
    color: #dc2626;
}

/* ---- Sortable column headers ---- */
.sort-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sort-th:hover {
    color: var(--app-primary);
}

.sort-th .sort-icon {
    font-size: 0.9rem;
    margin-left: 5px;
    vertical-align: middle;
}

.sort-th .sort-icon-idle {
    opacity: 0.55;
    transition: opacity 0.15s;
}

.sort-th:hover .sort-icon-idle {
    opacity: 0.85;
}

.sort-th .sort-icon-active {
    opacity: 1;
    color: var(--app-primary);
}

/* ---- Inline status select ---- */
.status-select {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    border: 1px solid var(--app-border);
    background: white;
    cursor: pointer;
    max-width: 130px;
}

.status-select:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.assign-select {
    max-width: 140px;
    min-width: 100px;
}

.priority-select {
    max-width: 110px;
    min-width: 80px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.priority-select-low {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.priority-select-medium {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}

.priority-select-high {
    background-color: #fed7aa;
    color: #9a3412;
    border-color: #fdba74;
}

.priority-select-critical {
    background-color: #fecaca;
    color: #991b1b;
    border-color: #fca5a5;
}

/* ---- Monitor: critical alert overlay ---- */
.critical-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc2626;
    color: white;
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    z-index: 9999;
    animation: criticalPulse 1s ease-in-out infinite alternate;
}

@keyframes criticalPulse {
    from {
        background: #dc2626;
    }

    to {
        background: #7f1d1d;
    }
}

/* ---- VS Code Eklentisi güncelleme animasyonu ---- */
.nav-link-update-badge {
    position: relative;
}

.nav-link-update-badge::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: #f59e0b;
    border-radius: 50%;
    animation: updatePulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
}

@keyframes updatePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    60% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* ---- Pagination ---- */
.pagination .page-link {
    font-size: 0.82rem;
    padding: 0.3rem 0.65rem;
    color: var(--app-primary);
    border-color: var(--app-border);
}

.pagination .page-item.active .page-link {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.pagination .page-link:hover {
    background: #ede9fe;
    color: var(--app-primary);
    border-color: var(--app-border);
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
}

/* ===========================
   Dark Mode Overrides
   =========================== */
[data-bs-theme="dark"] {
    --app-bg: #1e1e2e;
    --app-sidebar-bg: #252536;
    --app-border: #3f3f5a;
    --app-text-muted: #94a3b8;
    --app-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .app-navbar {
    background: #1e1e2e !important;
    border-bottom-color: #3f3f5a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .app-navbar .navbar-toggler {
    color: #94a3b8;
}

[data-bs-theme="dark"] .app-navbar .nav-link:hover {
    background: #2a2a3e;
}

[data-bs-theme="dark"] .app-navbar .nav-link.active {
    background: #3f3f5a;
}

[data-bs-theme="dark"] .app-navbar .dropdown-menu {
    background-color: #252536;
    border-color: #3f3f5a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

[data-bs-theme="dark"] .app-navbar .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .app-navbar .dropdown-item:hover {
    background: #2a2a3e;
    color: #a5b4fc;
}

[data-bs-theme="dark"] .app-navbar .dropdown-item.active {
    background: #3f3f5a;
    color: #a5b4fc;
}

[data-bs-theme="dark"] .offcanvas-xl {
    background-color: #1e1e2e;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offcanvas-xl .offcanvas-header {
    border-bottom-color: #3f3f5a;
}

[data-bs-theme="dark"] .offcanvas-xl .btn-close {
    filter: invert(1);
}

[data-bs-theme="dark"] .stat-card {
    background: #252536;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .stat-card .stat-value {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .card-header {
    background: #252536;
    border-bottom-color: #3f3f5a;
}

[data-bs-theme="dark"] .table th {
    background: #1a1a2e;
    color: #94a3b8;
    border-bottom-color: #3f3f5a;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background: #2a2a3e;
}

[data-bs-theme="dark"] .trigger-url {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .trigger-toggle:hover {
    background: #1f2937;
}

[data-bs-theme="dark"] .trigger-toggle-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .trigger-collapse-body {
    border-top-color: #334155;
}

[data-bs-theme="dark"] .trigger-url,
[data-bs-theme="dark"] .trigger-url-table {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .login-bg {
    background: #0f172a;
}

[data-bs-theme="dark"] .login-card {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .todo-title-link {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .todo-title-link:hover {
    color: #a5b4fc;
}

[data-bs-theme="dark"] .view-tab {
    color: #94a3b8;
    background: #2a2a3e;
}

[data-bs-theme="dark"] .view-tab:hover {
    background: #3f3f5a;
    color: #a5b4fc;
}

[data-bs-theme="dark"] .page-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .form-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .task-meta-value {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .status-select {
    background: #252536;
    border-color: #3f3f5a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .comment-item {
    background: #252536;
    border-left-color: #6366f1;
}

[data-bs-theme="dark"] tr.row-overdue>td {
    background: #3f1f1f !important;
}

[data-bs-theme="dark"] .breadcrumb-item a,
[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #94a3b8;
}

[data-bs-theme="dark"] .breadcrumb-item a:hover {
    color: #a5b4fc;
}

/* stats.php inline styles override */
[data-bs-theme="dark"] .user-card {
    color: inherit;
}

[data-bs-theme="dark"] .user-card .stat-mini .n {
    color: inherit;
}

[data-bs-theme="dark"] .user-card:hover {
    color: inherit;
}

[data-bs-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #252536;
    border-color: #3f3f5a;
}

/* Dark mode - genel yazı renkleri */
[data-bs-theme="dark"] body {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .table td {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .stat-card .stat-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .card-header {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .comment-item .comment-author {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .comment-item .comment-time {
    color: #94a3b8;
}

[data-bs-theme="dark"] .history-time {
    color: #94a3b8;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #252536;
    border-color: #3f3f5a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

[data-bs-theme="dark"] .app-navbar .nav-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .app-navbar .nav-link.active {
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] .app-navbar .nav-link:hover {
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] .app-navbar .navbar-user {
    color: #94a3b8;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: #94a3b8;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #3f3f5a;
    border-color: #3f3f5a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .theme-toggle-btn {
    color: #94a3b8;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .theme-toggle-btn:hover {
    background-color: #3f3f5a;
    color: #e2e8f0;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .sort-th {
    color: #94a3b8;
}

[data-bs-theme="dark"] .sort-th:hover {
    color: #a5b4fc;
}

[data-bs-theme="dark"] .sort-th .sort-icon-active {
    color: #a5b4fc;
}

[data-bs-theme="dark"] .pagination .page-link {
    color: #a5b4fc;
    background-color: transparent;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: #3f3f5a;
    color: #a5b4fc;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    color: #64748b;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

[data-bs-theme="dark"] .task-meta-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .login-brand-name,
[data-bs-theme="dark"] .login-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .login-subtitle,
[data-bs-theme="dark"] .login-form .login-label,
[data-bs-theme="dark"] .login-check-label,
[data-bs-theme="dark"] .login-footer-text {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .login-brand-tagline {
    color: #94a3b8;
}

[data-bs-theme="dark"] .login-form .login-input {
    background-color: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .login-form .login-input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 1px #a5b4fc;
}

[data-bs-theme="dark"] .login-card .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.todo-title-link):not(.view-tab) {
    color: #a5b4fc;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.todo-title-link):not(.view-tab):hover {
    color: #c7d2fe;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #252536;
    border-color: #3f3f5a;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #3f3f5a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: #3f3f5a;
}

/* ── Subtask (Alt Görev) Stili ─────────────────────────────────────────── */

.subtask-list {
    padding-left: 0;
}

.subtask-item {
    border-bottom: 1px solid var(--app-border, #e9ecef);
}

.subtask-item:last-child {
    border-bottom: none;
}

.subtask-item .subtask-delete,
.subtask-item .subtask-add-child {
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 0.85rem;
}

.subtask-item:hover>.d-flex>.subtask-delete,
.subtask-item:hover>.d-flex>.subtask-add-child {
    opacity: 1;
}

.subtask-check {
    cursor: pointer;
    width: 1.1em;
    height: 1.1em;
}

.subtask-title {
    font-size: 0.875rem;
}

.subtask-progress-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--app-text-muted, #6c757d);
}

.subtask-progress-mini .progress {
    width: 48px;
    height: 4px;
}

[data-bs-theme="dark"] .subtask-item {
    border-bottom-color: #3f3f5a;
}

/* ── Dark Mode: Mesai Ekranı ─────────────────────────────────────────── */

/* Hafta sonu satırları (table-warning) — Bootstrap CSS variable override */
[data-bs-theme="dark"] .table-warning {
    --bs-table-bg: rgba(202, 138, 4, 0.15);
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: #3f3f5a;
    --bs-table-striped-bg: rgba(202, 138, 4, 0.2);
    --bs-table-striped-color: #e2e8f0;
    --bs-table-active-bg: rgba(202, 138, 4, 0.2);
    --bs-table-active-color: #e2e8f0;
    --bs-table-hover-bg: rgba(202, 138, 4, 0.25);
    --bs-table-hover-color: #e2e8f0;
    color: #e2e8f0;
    border-color: #3f3f5a;
}

/* Tablo başlık (thead table-light) — Bootstrap CSS variable override */
[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #1a1a2e;
    --bs-table-color: #94a3b8;
    --bs-table-border-color: #3f3f5a;
    --bs-table-striped-bg: #1a1a2e;
    --bs-table-striped-color: #94a3b8;
    --bs-table-active-bg: #1a1a2e;
    --bs-table-active-color: #94a3b8;
    --bs-table-hover-bg: #222236;
    --bs-table-hover-color: #94a3b8;
    color: #94a3b8;
    border-color: #3f3f5a;
}

/* Tablo kenarlık renkleri */
[data-bs-theme="dark"] .table {
    --bs-table-border-color: #3f3f5a;
}

[data-bs-theme="dark"] .table> :not(caption)>* {
    border-bottom-color: #3f3f5a;
}

/* Card header bg-white düzeltmesi */
[data-bs-theme="dark"] .card-header.bg-white {
    background-color: #252536 !important;
    color: #e2e8f0;
}

/* bg-light badge düzeltmesi */
[data-bs-theme="dark"] .badge.bg-light {
    background-color: #3f3f5a !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .badge.bg-light.text-dark {
    color: #e2e8f0 !important;
}

/* text-dark override in dark mode */
[data-bs-theme="dark"] .table .text-dark {
    color: #e2e8f0 !important;
}

/* badge text-dark override */
[data-bs-theme="dark"] .badge.text-dark {
    color: #e2e8f0 !important;
}

/* bg-white elements inside cards */
[data-bs-theme="dark"] .bg-white {
    background-color: #252536 !important;
}

/* Modal dark mode */
[data-bs-theme="dark"] .modal-content {
    background-color: #252536;
    border-color: #3f3f5a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #3f3f5a;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #3f3f5a;
}