/* /assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 76px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #25eb6a;
    --topbar-height: 70px;
    --bg-light: #f1f5f9;
}

/* Global loader overlay */
.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 20, 0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.global-loader-inner {
    text-align: center;
}
.global-loader svg { width: 120px; height: 120px; display: block; margin: 0 auto; }
.global-loader .small { color: #cfe8ff; }

/* Small entrance animation for loader */
.global-loader .global-loader-inner { animation: loaderPop .28s ease-out; }
@keyframes loaderPop { from { transform: translateY(-6px) scale(.98); opacity: 0 } to { transform: translateY(0) scale(1); opacity: 1 } }

body {
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Wrapper */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar-wrapper {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.25s ease-out, transform 0.25s ease-out;
    z-index: 1000;
}

.sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
}

.sidebar-brand i {
    flex: 0 0 auto;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.list-group-item-sidebar {
    background-color: transparent;
    color: #cbd5e1;
    border: none;
    min-height: 48px;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.list-group-item-sidebar i {
    font-size: 1.1rem;
    width: 24px;
    flex: 0 0 24px;
    margin-right: 0;
    text-align: center;
}

.list-group-item-sidebar .sidebar-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-section-label {
    display: block;
    padding: 0 1.25rem;
    font-size: 11px;
    letter-spacing: .08em;
}

.list-group-item-sidebar:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.list-group-item-sidebar.active {
    background-color: var(--sidebar-active);
    color: #fff;
    border-radius: 0 25px 25px 0;
    margin-right: 15px;
}

/* Page Content */
#page-content-wrapper {
    min-width: 0;
    width: 100%;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease-out;
}

#wrapper.sidebar-collapsed #sidebar-wrapper {
    width: var(--sidebar-collapsed-width);
}

#wrapper.sidebar-collapsed #page-content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

#wrapper.sidebar-collapsed .sidebar-heading {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

#wrapper.sidebar-collapsed .sidebar-label,
#wrapper.sidebar-collapsed .list-group-item-sidebar:not(:hover)::after,
#wrapper.sidebar-collapsed .list-group small {
    display: none;
}

#wrapper.sidebar-collapsed .list-group-item-sidebar {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

#wrapper.sidebar-collapsed .list-group-item-sidebar i {
    margin-right: 0;
}

#wrapper.sidebar-collapsed .sidebar-toggle {
    position: absolute;
    top: 19px;
    left: 22px;
}

#wrapper.sidebar-collapsed .sidebar-heading {
    justify-content: center;
}

#wrapper.sidebar-collapsed .sidebar-brand i {
    margin-right: 0 !important;
}

#wrapper.sidebar-collapsed .sidebar-section-label {
    display: none;
}

/* Topbar */
.navbar-top {
    height: var(--topbar-height);
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0 1.5rem;
}

/* Keep topbar fixed at top while scrolling */
.navbar-top {
    position: sticky;
    top: 0;
    z-index: 1300;
}

.search-bar {
    max-width: 400px;
    background-color: var(--bg-light);
    border: none;
    border-radius: 20px;
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

/* Cards & Dashboard */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* Dashboard entrance animations */
.card-enter {
    animation: cardEntrance 600ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes cardEntrance {
    0% { transform: translateY(10px) scale(0.995); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Smooth progress bar transitions */
.progress .progress-bar {
    transition: width 900ms cubic-bezier(.22,.9,.22,1), background-color 400ms ease;
}

/* Subtle glow for active KPI on hover */
.kpi-glow:hover {
    box-shadow: 0 12px 30px rgba(0,183,255,0.07), 0 6px 18px rgba(3,10,25,0.12);
    transform: translateY(-4px);
}

.assignee-widget { cursor: pointer; border-radius:6px; padding:6px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }
.assignee-widget:focus { outline: 2px solid rgba(13,110,253,0.12); }

/* Ensure Bootstrap modals float above the topbar, assistant panel, and other fixed elements */
.modal-backdrop { z-index: 2990 !important; }
.modal { z-index: 3000 !important; }

/* Spark animation for badges */
.spark { position: relative; overflow: visible; }
.spark::after { content: ''; position: absolute; right: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(0,183,255,0.6) 30%, transparent 60%); opacity: 0; transform: scale(.3); transition: opacity .35s ease, transform .45s ease; }
.spark.activated::after { opacity: 1; transform: scale(1); }

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Toggled State for Mobile */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    #wrapper.toggled #sidebar-wrapper {
        transform: translateX(0);
    }
    #page-content-wrapper,
    #wrapper.sidebar-collapsed #page-content-wrapper {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: none;
    }
    /* Overlay */
    #wrapper.toggled::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
}

/* AI Project Assistant */
.assistant-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    border: 0;
    border-radius: 999px;
    padding: .75rem 1rem;
    background: #0f766e;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 118, 110, .3);
}
.assistant-launcher:hover { background: #115e59; }
.assistant-launcher i { margin-right: .35rem; }
.assistant-panel {
    position: fixed;
    right: 24px;
    bottom: 84px;
    z-index: 1101;
    display: none;
    flex-direction: column;
    width: min(390px, calc(100vw - 32px));
    height: min(590px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .2);
}
.assistant-panel.open { display: flex; }
.assistant-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; color: #fff; background: #0f766e; }
.assistant-header small { display: block; margin-top: .15rem; color: rgba(255,255,255,.78); font-size: .75rem; }
.assistant-messages { flex: 1; overflow-y: auto; padding: 1rem; background: #f8fafc; }
.assistant-message { max-width: 90%; margin-bottom: .7rem; padding: .65rem .75rem; border-radius: 10px; white-space: pre-wrap; font-size: .88rem; line-height: 1.45; }
.assistant-message-bot { background: #fff; border: 1px solid #e2e8f0; color: #334155; }
.assistant-message-user { margin-left: auto; background: #0f766e; color: #fff; }
.assistant-loading { color: #64748b; font-style: italic; }
.assistant-references { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.assistant-references a { color: #0d6efd; font-size: .76rem; text-decoration: none; }
.assistant-suggestions { display: flex; gap: .35rem; overflow-x: auto; padding: .55rem .75rem; border-top: 1px solid #e2e8f0; }
.assistant-suggestions button { flex: 0 0 auto; border: 1px solid #cbd5e1; border-radius: 999px; padding: .3rem .55rem; background: #fff; color: #475569; font-size: .75rem; }
.assistant-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid #e2e8f0; }
.assistant-form textarea { flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 8px; padding: .5rem; font-size: .85rem; }
.assistant-form button { align-self: flex-end; }
@media (max-width: 575.98px) { .assistant-launcher { right: 12px; bottom: 12px; } .assistant-panel { right: 12px; bottom: 68px; } }

/* Midnight workspace theme */
:root {
    --font-ui: 'Inter', "Mirava Sans", "Trebuchet MS", "Segoe UI", sans-serif;
    --ink: #e7eef8;
    --ink-muted: #91a4bd;
    --surface: #172235;
    --surface-raised: #1d2b41;
    --surface-deep: #0b1322;
    --line: rgba(148, 163, 184, .18);
    --accent-cyan: #38d6d0;
    --accent-lime: #b9f36c;
    --accent-coral: #ff7f6e;
    --accent-violet: #a78bfa;
    --sidebar-bg: #0d1728;
    --sidebar-hover: #1b2b44;
    --sidebar-active: #2bbe97;
    --bg-light: #0b1322;
}

html,
body {
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--bg-light);
}

body {
    background-image: radial-gradient(circle at 78% 0%, rgba(56, 214, 208, .08), transparent 28rem), linear-gradient(135deg, #0b1322 0%, #101b2e 55%, #0b1322 100%);
}

/* Tasks index UI tweaks */
.table-compact td, .table-compact th { padding: .45rem .6rem; vertical-align: middle; }
.table-compact thead th { font-size: .85rem; color: var(--ink-muted); }
.table-compact tbody tr:hover { background: rgba(255,255,255,0.03); }
.badge-assignee { background: rgba(255,255,255,0.06); color: var(--ink); border: 1px solid rgba(255,255,255,0.04); }
.tasks-toolbar { padding: .65rem .85rem; display:flex; gap:.5rem; align-items:center; }
.tasks-count { font-size:.9rem; color:var(--ink-muted); margin-left:.5rem; }
.tasks-search { max-width:320px; }
.table-responsive .no-results { padding:1rem; color:var(--ink-muted); }

@media (max-width: 767.98px) {
    .tasks-toolbar { flex-direction: column; align-items: stretch; gap:.5rem; }
}

/* Status chips */
.status-chip { display:inline-block; padding:.35rem .6rem; border-radius:999px; background:rgba(255,255,255,0.03); color:var(--ink); border:1px solid rgba(255,255,255,0.04); font-size:.85rem; text-decoration:none; }
.status-chip:hover { background: rgba(255,255,255,0.06); }

.task-title-link { color: inherit; text-decoration:none; font-weight:600; }
.task-title-link:hover { text-decoration:underline; color: #cfe8ff; }

body,
.text-dark { color: var(--ink) !important; }
.text-muted { color: var(--ink-muted) !important; }
a { color: var(--accent-cyan); }
a:hover { color: #8af5e9; }

#sidebar-wrapper {
    background: linear-gradient(180deg, #0d1728 0%, #101c30 62%, #0a1322 100%);
    border-right: 1px solid var(--line);
    box-shadow: 14px 0 40px rgba(0, 0, 0, .16);
}

.sidebar-heading {
    border-bottom-color: var(--line);
    color: var(--ink);
}
.sidebar-brand i { color: var(--accent-lime) !important; filter: drop-shadow(0 0 8px rgba(185, 243, 108, .45)); }
.sidebar-toggle { border-color: var(--line); background: rgba(56, 214, 208, .08); color: var(--accent-cyan); }
.sidebar-toggle:hover { background: rgba(56, 214, 208, .2); color: #fff; }
.sidebar-section-label { color: #6f839f !important; }
.list-group-item-sidebar { color: #b8c7d9; }
.list-group-item-sidebar i { color: #7f96b2; transition: color .2s, transform .2s; }
.list-group-item-sidebar:hover { background: var(--sidebar-hover); color: #fff; }
.list-group-item-sidebar:hover i { color: var(--accent-cyan); transform: translateX(2px); }
.list-group-item-sidebar.active { background: linear-gradient(90deg, #438afc, #3eeea2); color: #fff; box-shadow: 0 8px 20px rgba(22, 125, 120, .25); }
.list-group-item-sidebar.active i { color: var(--accent-lime); }

#page-content-wrapper { background: transparent; }
.navbar-top { background: rgba(16, 27, 46, .86); border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .16); backdrop-filter: blur(14px); }
.navbar-top .btn-light { background: var(--surface-raised); border-color: var(--line) !important; color: var(--ink); }
.navbar-top .text-dark { color: var(--ink) !important; }
.navbar-top .dropdown-menu { background: var(--surface-raised); border-color: var(--line) !important; }
.navbar-top .dropdown-item { color: var(--ink); }
.navbar-top .dropdown-item:hover { background: var(--sidebar-hover); color: #243d6d; }
.search-bar { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); }
.search-bar::placeholder { color: #71849d; }
.search-icon { color: var(--ink-muted); }

.card,
.modal-content,
.list-group-item,
.table { color: var(--ink); background-color: var(--surface); border-color: var(--line) !important; }
.card-header,
.card-footer,
.table-light,
.bg-white { color: var(--ink) !important; background-color: var(--surface-raised) !important; border-color: var(--line) !important; }
.table { --bs-table-bg: var(--surface); --bs-table-color: var(--ink); --bs-table-hover-bg: #22334b; --bs-table-hover-color: #fff; }
.table > :not(caption) > * > * { border-bottom-color: var(--line); }
.form-control,
.form-select,
.input-group-text,
textarea { color: var(--ink); background-color: #101c30; border-color: #344861; }
.form-control:focus,
.form-select:focus,
textarea:focus { color: var(--ink); background-color: #14243b; border-color: var(--accent-cyan); box-shadow: 0 0 0 .2rem rgba(56, 214, 208, .15); }
.form-control::placeholder { color: #71849d; }
.form-select option { background: #101c30; color: var(--ink); }
.btn-light { color: var(--ink); background: var(--surface-raised); border-color: var(--line); }
.btn-light:hover { color: var(--ink); background: #2a3c56; border-color: #506785; }
.btn-outline-secondary { color: #b8c7d9; border-color: #52657e; }

/* Subtask / division styling */
.subtask-row {
    /* darker, theme-complementing row for subtasks */
    background: rgba(1, 14, 36, 0.45); /* uses --surface-deep tone */
    border-left: 4px solid rgba(56,214,208,0.06); /* subtle cyan accent */
}
.subtask-row td { padding-left: 2.5rem !important; }

/* Ensure table-secondary + subtask rows don't show white background (override Bootstrap) */
.table-secondary.subtask-row,
.table-secondary.subtask-row > td {
    background: rgba(11,19,34,0.45) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}

/* Kanban subtask item */
.subtask-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .5rem;
    border-radius: 8px;
    background: rgba(29,43,65,0.35); /* soft raised band matching dark theme */
    border: 1px solid rgba(148,163,184,0.06);
    font-size: .82rem;
    color: var(--ink);
}
.subtask-item small { color: var(--ink-muted); }

.subtask-row.d-none { display: none; }
.subtask-item.d-none { display: none; }

.btn-toggle-subtasks, .btn-toggle-milestone-subtasks, .btn-toggle-column-subtasks {
    font-size: 12px;
    padding: 4px 8px;
}

/* Hover states for subtasks: use subtle, dark complements (avoid white) */
.table-hover tbody tr.subtask-row:hover,
.subtask-row:hover {
    background: rgba(29,43,65,0.62) !important;
}
.subtask-item:hover {
    background: rgba(29,43,65,0.55);
    border-color: rgba(56,214,208,0.08);
}

/* Ensure hovered subtask cells keep dark background and readable text */
.table.table-hover tbody tr.subtask-row:hover td,
.table.table-hover > tbody > tr.subtask-row:hover > td,
.table-hover tbody tr.subtask-row:hover td,
.subtask-row:hover td,
.table.table-hover tbody tr.subtask-row:hover th,
.table.table-hover > tbody > tr.subtask-row:hover > th,
.table-hover tbody tr.subtask-row:hover th,
.subtask-row:hover th {
    background-color: rgba(11,19,34,0.92) !important;
    background: rgba(11,19,34,0.92) !important;
    color: var(--ink) !important;
}

/* Links inside subtasks should remain legible */
.subtask-row a { color: var(--accent-cyan) !important; }
.subtask-row a:hover { color: #8af5e9 !important; text-decoration: underline; }

/* Slightly stronger hover for subtask inline items */
.subtask-item:hover { color: var(--ink); }

/* Strong override for Bootstrap table-secondary hover on subtask rows */
tr.table-secondary.subtask-row:hover,
tr.table-secondary.subtask-row:hover td,
tr.table-secondary.subtask-row:hover th {
    background-color: rgba(11,19,34,0.92) !important;
    color: var(--ink) !important;
}

/* Buttons and badges inside subtask rows should use subtle dark surfaces */
.subtask-row .btn-light {
    background: rgba(255,255,255,0.03) !important;
    color: var(--ink) !important;
    border-color: rgba(255,255,255,0.06) !important;
}
.subtask-row .btn-light:hover {
    background: rgba(255,255,255,0.06) !important;
}
.subtask-row .badge.bg-light {
    background: rgba(255,255,255,0.06) !important;
    color: var(--ink) !important;
    border-color: rgba(255,255,255,0.04) !important;
}

/* Final high-specificity override: force dark hover for any subtask-row regardless of table styles */
body .table .subtask-row:hover,
body .table > tbody > tr.subtask-row:hover,
body .table.table-hover > tbody > tr.subtask-row:hover,
body tr.subtask-row.table-secondary:hover,
body tr.subtask-row.table-light:hover {
    background-color: rgba(6,12,22,0.96) !important;
    background: rgba(6,12,22,0.96) !important;
    color: var(--ink) !important;
}
body .table .subtask-row:hover td,
body .table > tbody > tr.subtask-row:hover td,
body tr.subtask-row.table-secondary:hover td,
body tr.subtask-row.table-light:hover td {
    background-color: rgba(6,12,22,0.96) !important;
    color: var(--ink) !important;
}
/* Ensure interactive elements inside remain readable */
body .subtask-row:hover a,
body .subtask-row:hover .btn,
body .subtask-row:hover .badge {
    color: var(--accent-cyan) !important;
}

/* If inline styles are forcing white, add an override for background-image and background-color */
body .subtask-row[style] :where(td, th) {
    background-image: none !important;
    background-color: rgba(6,12,22,0.96) !important;
}

/* Feature badge for quick visual grouping */
.feature-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    background: rgba(167,139,250,0.08);
    color: var(--accent-violet);
    border: 1px solid rgba(167,139,250,0.06);
}

/* Clearer division lines in dark theme */
.card-body, .table-responsive { border-top: 1px solid rgba(148,163,184,0.04); }
.btn-outline-secondary:hover { color: #fff; background: #2a3c56; border-color: #6c829e; }
.btn-primary { background: #1e9b8d; border-color: #1e9b8d; }
.btn-primary:hover { background: #29b5a4; border-color: #29b5a4; }
.btn-outline-primary { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.btn-outline-primary:hover { color: #06131d; background: var(--accent-cyan); border-color: var(--accent-cyan); }
.btn-outline-danger { color: var(--accent-coral); border-color: var(--accent-coral); }
.btn-outline-danger:hover { color: #210d0a; background: var(--accent-coral); border-color: var(--accent-coral); }
.border, .border-top, .border-bottom, .border-start { border-color: var(--line) !important; }
.bg-light { color: var(--ink) !important; background-color: var(--surface-raised) !important; }
.progress { background-color: #0d1728; }
.badge.bg-light { color: var(--ink) !important; }
.alert-light { color: #c7d4e4; background: #17283d; border-color: var(--line); }
.modal-header, .modal-footer { border-color: var(--line); }
.btn-close { filter: invert(1) grayscale(1) brightness(1.8); }
.dropdown-menu { background: var(--surface-raised); border-color: var(--line); }
.dropdown-item { color: var(--ink); }
.dropdown-item:hover { color: #fff; background: var(--sidebar-hover); }
.pagination .page-link { color: var(--accent-cyan); background: var(--surface); border-color: var(--line); }
.pagination .active .page-link { color: #06131d; background: var(--accent-cyan); border-color: var(--accent-cyan); }

/* Creative icon treatment */
.bi { line-height: 1; }
.card-header > h5::before,
.card-header > h6::before { content: "✦"; margin-right: .5rem; color: var(--accent-lime); font-size: .78em; }
.exec-kpi { background: linear-gradient(145deg, var(--surface-raised), #152338) !important; border: 1px solid var(--line) !important; }
.exec-kpi .value { color: var(--ink) !important; }
.exec-section { background: var(--surface) !important; }
.assistant-panel { background: var(--surface) !important; border-color: var(--line); }
.assistant-header { background: linear-gradient(135deg, #116e6a, #1b9b8e); }
.assistant-messages { background: var(--surface-deep); }
.assistant-message-bot { color: var(--ink); background: var(--surface-raised); border-color: var(--line); }
.assistant-suggestions, .assistant-form { border-color: var(--line); background: var(--surface); }
.assistant-suggestions button { color: #c7d4e4; background: var(--surface-raised); border-color: var(--line); }
.assistant-form textarea { color: var(--ink); background: #101c30; border-color: var(--line); }
.assistant-launcher { background: linear-gradient(135deg, #1e9b8d, #a78bfa); box-shadow: 0 8px 28px rgba(56, 214, 208, .25); }

@media (max-width: 991.98px) {
    #wrapper.toggled::before { background: rgba(2, 8, 23, .72); }
}

/* Task status doughnut sizing: ensure canvas has explicit dimensions for Chart.js when container is flexible */
#taskStatusDoughnut {
    width: 180px !important;
    height: 180px !important;
    max-width: 100%;
    display: block;
}
@media (max-width: 575.98px) {
    #taskStatusDoughnut {
        width: 140px !important;
        height: 140px !important;
    }
}

/* Milestone task zebra-striping to improve readability (stronger selectors to override Bootstrap) */
.table tbody tr.milestone-task-odd,
.table tbody tr.milestone-task-odd td { background-color: rgba(255,255,255,0.04) !important; }
.table tbody tr.milestone-task-even,
.table tbody tr.milestone-task-even td { background-color: transparent !important; }
.table tbody tr.milestone-task-odd td,
.table tbody tr.milestone-task-even td { transition: background-color .15s ease; }

/* Stronger tint for dark theme to make stripes visible */
@media (prefers-color-scheme: dark) {
    .table tbody tr.milestone-task-odd,
    .table tbody tr.milestone-task-odd td { background-color: rgba(255,255,255,0.035) !important; }
}