/* ── CSS VARIABLES ── */
:root {
    --mono: 'Inter', -apple-system, sans-serif;
}

/* ── DASHBOARD PAGE ── */
body {
    padding-top: var(--navbar-height, 72px);
    background: #0e1016;
}

body::before {
    display: none;
}

[hidden] {
    display: none !important;
}

.dashboard-section,
.dashboard-section.active {
    display: block !important;
    min-height: 0 !important;
    padding: 14px 32px 72px !important;
    background: transparent;
    position: relative;
    z-index: 1;
}

.dashboard-container {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    width: 100% !important;
}

#dbPanels,
.db-panel,
.db-panel.active {
    width: 100%;
}

.navbar-link.active {
    color: #F5F3EC;
}

/* ── PROJECT CARD — flat, no wrapper ── */
.proj-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 0;
}

.proj-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    background: transparent;
}

.proj-header::after { display: none; }

.proj-header-left {
    flex: 1;
    min-width: 0;
}

.proj-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: clamp(22px, 2vw, 30px);
    color: #F5F3EC;
    line-height: 1.0;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.db-main-tabs {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    overflow-x: auto;
    scrollbar-width: none;
}

.db-main-tabs::-webkit-scrollbar {
    display: none;
}

.db-main-tab {
    height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: rgba(255,253,246,0.48);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.16s, border-color 0.16s;
}

.db-main-tab:hover,
.db-main-tab.active {
    color: #FFFDF6;
}

.db-main-tab.active {
    border-bottom-color: #EE4408;
}

.db-main-tab-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    background: rgba(255,255,255,0.035);
    color: rgba(255,253,246,0.5);
    font-size: 11px;
    line-height: 1;
}

.db-main-tab.active .db-main-tab-icon {
    border-color: #EE4408;
    background: #EE4408;
    color: #FFFDF6;
}

.proj-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proj-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.028);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: var(--mono);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.proj-badge-t {
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.54);
}

.proj-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.proj-search-shell {
    width: min(260px, 28vw);
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.028);
    color: rgba(255,255,255,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.proj-search-input {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.86);
    font-size: 13px;
    font-family: var(--mono);
    outline: none;
}

.proj-search-input::placeholder {
    color: rgba(255,255,255,0.34);
}

.proj-user-badge {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.16), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    color: #F5F3EC;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: none;
}

.proj-primary-btn {
    height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(143, 208, 154, 0.45);
    border-radius: 10px;
    background: linear-gradient(180deg, #79cd73 0%, #5fb45a 100%);
    color: #08140a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: none;
}

.proj-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.proj-edit-link {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.42);
    text-decoration: none;
    padding: 7px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.03em;
    font-family: var(--mono);
    background: rgba(255,255,255,0.02);
}

.proj-edit-link:hover {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}

.proj-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.42);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.proj-btn-icon:hover {
    background: rgba(255,59,48,0.08);
    border-color: rgba(255,59,48,0.22);
    color: #FF3B30;
}

/* ── BODY ── */
.proj-body {
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.db-view {
    display: none;
    flex-direction: column;
    gap: 22px;
    animation: db-view-in 0.16s ease-out;
}

.db-view.active {
    display: flex;
}

@keyframes db-view-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.db-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.db-section-header {
    display: flex;
    align-items: center;
}

.db-section-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,253,246,0.34);
    font-family: var(--mono);
}

.db-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}

.db-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.db-card-vision-main {
    background:
        radial-gradient(circle at top right, rgba(238,68,8,0.07), transparent 32%),
        #1c2133;
    border-color: rgba(255,255,255,0.1);
}

.db-card-vision-side {
    background: #1c2133;
    border-color: rgba(255,255,255,0.07);
}

.db-card-execution {
    background: #1c2133;
    border-color: rgba(255,255,255,0.11);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.db-card-pilot {
    background: #1c2133;
    border-color: rgba(255,253,246,0.08);
    border-radius: 8px;
    overflow: visible;
}

/* 2-col legacy */
.db-2col {
    display: grid;
    grid-template-columns: 1fr 1.65fr;
    gap: 16px;
}

/* Row 1 : KPI + SMART côte à côte */
.db-row-kpi-smart {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    align-items: stretch;
}

/* ── SMART PANEL ── */
.smart-panel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.smart-view {
    display: grid;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    flex: 1;
    min-height: 0;
}

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

.smart-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,253,246,0.62);
    font-family: var(--mono);
}

.smart-edit-btn {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.50);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.07);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--mono);
    letter-spacing: 0.04em;
}

.smart-edit-btn:hover {
    color: #EE4408;
    border-color: rgba(238,68,8,0.28);
    background: rgba(238,68,8,0.06);
}

.smart-row {
    display: flex;
    align-items: flex-start;
    align-content: start;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    min-height: 0;
}

.smart-row:last-child { border-bottom: none; }

.smart-letter {
    flex-shrink: 0;
    margin-top: 11px;
}

.smart-letter-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    font-family: var(--mono);
}

.smart-texts {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.smart-sublabel {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.52);
    margin-bottom: 0;
    line-height: 1;
    font-family: var(--mono);
}

.smart-value {
    font-size: 12px;
    color: rgba(255,255,255,0.76);
    font-weight: 400;
    line-height: 1.35;
    font-family: var(--mono);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smart-edit {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.smart-edit-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
}

.smart-edit-label {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,0.55);
    padding-top: 8px;
    font-family: var(--mono);
}

.smart-input {
    width: 100%;
    min-height: 48px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #F5F3EC;
    font-size: 13px;
    font-family: var(--mono);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.smart-input:focus { border-color: rgba(238,68,8,0.5); }
.smart-input.invalid { border-color: #FF453A; }

.smart-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.smart-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--mono);
}

.smart-btn-cancel {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #F5F3EC;
}

.smart-btn-save {
    background: #EE4408;
    border-color: #EE4408;
    color: #fff;
}

.smart-error {
    font-size: 11px;
    color: #FF453A;
    display: none;
    font-family: var(--mono);
}

.smart-error.show { display: block; }

/* ── KPI PANEL ── */
.kpi-panel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.kpi-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
}

.kpi-panel-top-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kpi-panel-desc {
    font-size: 10px;
    color: rgba(255,255,255,0.54);
    font-family: var(--mono);
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.kpi-panel-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    font-family: var(--mono);
}

.kpi-title {
    font-size: 13px;
    font-weight: 700;
    color: #F5F3EC;
    margin-bottom: 2px;
}

.kpi-unit-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

.kpi-add-btn {
    height: 30px;
    padding: 0 12px;
    background: rgba(238,68,8,0.08);
    border: 1px solid rgba(238,68,8,0.45);
    color: #EE4408;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--mono);
    letter-spacing: 0.04em;
}

.kpi-add-btn:hover {
    background: rgba(238,68,8,0.18);
    border-color: #EE4408;
    color: #ff6030;
}

/* Header stats au-dessus du chart */
.kpi-header-stats {
    padding: 8px 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
}

.kpih-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.kpih-val {
    font-size: 26px;
    font-weight: 800;
    font-style: italic;
    color: #F5F3EC;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpih-unit {
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    color: rgba(255,255,255,0.50);
    letter-spacing: 0;
}

.kpih-delta {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--mono);
    letter-spacing: 0.02em;
}
.kpih-delta.pos { color: #3ecf8e; }
.kpih-delta.neg { color: #EE4408; }

.kpih-goal {
    font-size: 10px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
    letter-spacing: 0.05em;
    margin-top: 4px;
    text-transform: uppercase;
}

.kpi-chart-area {
    height: 380px;
    min-height: 0;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 14px 20px 14px 6px;
}



/* Empty KPI CTA */
.kpi-empty-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(238,68,8,0.22);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.kpi-empty-cta:hover {
    border-color: rgba(238,68,8,0.5);
    color: rgba(255,255,255,0.55);
    background: rgba(238,68,8,0.04);
}

.kpi-empty-cta svg { opacity: 0.5; flex-shrink: 0; }

/* Single measure overlay */
.kpi-single-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kpi-single-wrap { text-align: center; width: 100%; }

.kpi-big-val {
    font-size: 56px;
    font-weight: 800;
    color: #EE4408;
    letter-spacing: -3px;
    line-height: 1;
    font-family: 'Inter', sans-serif;
    font-style: italic;
}

.kpi-big-unit {
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    margin-top: 8px;
    font-family: var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kpi-single-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    margin-top: 14px;
    font-family: var(--mono);
}

.kpi-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.kpi-current-val {
    font-size: 15px;
    font-weight: 700;
    color: #F5F3EC;
    font-family: var(--mono);
}

.kpi-current-label {
    font-size: 10px;
    color: rgba(255,255,255,0.50);
    margin-top: 2px;
    font-family: var(--mono);
    letter-spacing: 0.03em;
}

.kpi-prog-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-family: var(--mono);
    letter-spacing: 0.04em;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ── TODO PANEL ── */
.section-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    margin-bottom: 8px;
    font-family: var(--mono);
}

.todo-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0 28px;
    min-height: unset;
}

/* Label principal de la todo — section header principale */
.todo-panel > .section-lbl {
    font-size: 16px;
    font-weight: 800;
    color: #F34C0A;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-bottom: 18px;
}

/* Jalon dynamique sous le header todo */
.todo-next-jalon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    background: rgba(238,68,8,0.07);
    border: 1px solid rgba(238,68,8,0.18);
    border-radius: 7px;
    margin-bottom: 12px;
    overflow: hidden;
}

.todo-jalon-badge {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #EE4408;
    background: rgba(238,68,8,0.14);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    font-family: var(--mono);
    white-space: nowrap;
}

.todo-jalon-text {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    font-family: var(--mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty state — message centre orange (legacy) */
.kpi-empty-label {
    display: none;
}

/* Empty state — masque radial derrière le CTA */
.kpi-empty-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        rgba(13,13,15,0.96) 0%,
        rgba(13,13,15,0.82) 45%,
        transparent 75%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 1;
}

/* Empty state — icône + texte centré */
.kpi-empty-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: none;
    z-index: 2;
}

.kpi-empty-center span {
    font-size: 18px;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 0 32px rgba(255,255,255,0.15), 0 2px 8px rgba(0,0,0,0.95);
}

.kpi-empty-sub {
    font-size: 11px;
    font-family: var(--mono);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    white-space: nowrap;
    text-shadow: none;
    margin-top: -8px;
}

/* Empty state — label MESURABLE en haut à gauche */
.kpi-mesurable-label {
    position: absolute;
    top: 4px;
    left: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--mono);
    color: rgba(255,255,255,0.50);
    pointer-events: none;
}

/* Overlay "aucune mesure" sur graphique vide */
.kpi-empty-overlay {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
    pointer-events: none;
    letter-spacing: 0.04em;
}

.todo-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: text;
    transition: background 0.12s;
}

.todo-add-row:hover {
    background: rgba(255,255,255,0.02);
}

.todo-add-icon {
    color: rgba(255,255,255,0.22);
    flex-shrink: 0;
    transition: color 0.15s;
}

.todo-add-row:focus-within .todo-add-icon {
    color: rgba(238,68,8,0.6);
}

.todo-add-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.62);
    font-family: var(--mono);
    padding: 0;
}

.todo-add-input::placeholder {
    color: rgba(255,255,255,0.25);
    font-style: normal;
}

.todo-add-input:focus {
    color: rgba(255,255,255,0.80);
}

/* legacy - keep for fallback */
.todo-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.todo-input {
    flex: 1;
    height: 46px;
    background: #101214;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    padding: 0 14px;
    color: #FFFDF6;
    font-size: 14px;
    font-family: var(--mono);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.todo-input:focus {
    background: #121518;
    border-color: rgba(238,68,8,0.70);
    box-shadow: 0 0 0 3px rgba(238,68,8,0.08);
}
.todo-input::placeholder { color: rgba(255,253,246,0.35); font-style: italic; font-weight: 400; }

.todo-plus-btn {
    width: 46px;
    height: 46px;
    background: #EE4408;
    border: 1px solid #EE4408;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.todo-plus-btn { display: none; }
.todo-plus-btn:hover { background: #ff5d1a; border-color: #ff5d1a; }

.task-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 8px;
}

.task-toolbar-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.task-toolbar-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
    font-family: var(--mono);
    line-height: 1.1;
}

.task-toolbar-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    font-family: var(--mono);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-view-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.task-view-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.task-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    flex-shrink: 0;
}

.task-view-btn {
    height: 26px;
    padding: 0 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--mono);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.task-view-btn:hover {
    color: rgba(255,255,255,0.75);
}

.task-view-btn.active {
    background: #25282c;
    color: #F5F3EC;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}

.todo-list { display: flex; flex-direction: column; gap: 1px; }

.todo-empty {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 10px;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s;
    cursor: pointer;
}
.todo-item:hover { background: rgba(255,255,255,0.03); }
.todo-item:hover .todo-del { opacity: 1; }
.todo-item:hover .todo-edit { opacity: 1; }

.task-list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    border-radius: 0;
    background: transparent;
    transition: background 0.12s;
}

.task-list-item:first-child {
    border-top: none;
}

.task-list-item:hover {
    background: rgba(255,255,255,0.03);
}

.task-list-item.doing {
    /* status visible via checkbox indicator only */
}

.task-list-item.done {
    /* status visible via checkbox */
}

.task-list-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(136,169,198,0.36);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.task-list-check.doing {
    border-color: #EE4408;
}

.task-list-check.doing::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 2px;
    background: #EE4408;
}

.task-list-check.done {
    background: #72B77B;
    border-color: #72B77B;
}

.task-list-check.done::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 5px;
    border-left: 1.5px solid #0d0d0f;
    border-bottom: 1.5px solid #0d0d0f;
    transform: rotate(-45deg);
}

.task-list-status {
    min-width: 86px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(136,169,198,0.16);
    background: rgba(136,169,198,0.08);
    color: rgba(218,232,244,0.72);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--mono);
    cursor: pointer;
    white-space: nowrap;
}

.task-list-status.doing {
    color: #EE4408;
    background: rgba(238,68,8,0.08);
    border-color: rgba(238,68,8,0.24);
}

.task-list-status.done {
    color: #95D09B;
    background: rgba(114,183,123,0.08);
    border-color: rgba(114,183,123,0.24);
}

.task-list-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.task-list-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-list-main .todo-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.86);
}

.task-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.task-list-meta span {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,0.42);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--mono);
}

.task-list-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.todo-cb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.28);
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

/* ── Checkbox 3 états ── */
.todo-cb.doing {
    border-color: #EE4408;
    background: transparent;
    position: relative;
}
.todo-cb.doing::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #EE4408;
}

.todo-cb.done,
.todo-item.done .todo-cb {
    background: #0A2A53;
    border-color: #0A2A53;
}

.todo-cb.done::after,
.todo-item.done .todo-cb::after {
    content: '';
    width: 7px;
    height: 4px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

/* ── Item "en cours" ── */
.todo-item.doing {
    border-left: 2px solid rgba(238,68,8,0.5);
    padding-left: 9px;
}

.todo-item.task-list-item.doing {
    border-left: 1px solid rgba(238,68,8,0.16);
    padding-left: 10px;
}

/* ── Labels de section ── */
.todo-section-lbl {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.26);
    padding: 10px 4px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.todo-section-lbl.doing {
    color: rgba(238,68,8,0.55);
}

.todo-section-lbl span { display: none; }

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    margin-top: 8px;
}

.kanban-column {
    min-width: 0;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    background: #0f1117;
    border: 1px solid rgba(255,253,246,0.09);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}

.kanban-column.drag-over {
    background: #151719;
    border-color: rgba(238,68,8,0.28);
}

.kanban-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.48);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--mono);
}

.kanban-column-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(136,169,198,0.5);
    flex-shrink: 0;
}

.kanban-column.doing .kanban-dot {
    background: rgba(238,68,8,0.65);
}

.kanban-column.done .kanban-dot {
    background: rgba(114,183,123,0.55);
}

.kanban-count {
    color: rgba(255,255,255,0.28);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--mono);
}

.kanban-column-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px 10px;
    flex: 1;
}

.kanban-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 6px;
    border: 1px solid rgba(255,253,246,0.09);
    background: #14161d;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s, transform 0.15s, opacity 0.15s;
    user-select: none;
}

.kanban-card::before { display: none; }

.kanban-card:hover {
    border-color: rgba(255,253,246,0.16);
    background: #181b23;
}

.kanban-card.dragging {
    opacity: 0.42;
    transform: scale(0.98);
}

.kanban-card.done .kanban-card-title {
    text-decoration: line-through;
    color: rgba(255,255,255,0.50);
}

.kanban-card-top,
.kanban-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.kanban-status-pill {
    min-width: 0;
    height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(136,169,198,0.16);
    background: rgba(136,169,198,0.08);
    color: rgba(218,232,244,0.72);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--mono);
    cursor: pointer;
    white-space: nowrap;
}

.kanban-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.kanban-status-pill.doing {
    color: #EE4408;
    background: rgba(238,68,8,0.08);
    border-color: rgba(238,68,8,0.24);
}

.kanban-status-pill.done {
    color: #95D09B;
    background: rgba(114,183,123,0.08);
    border-color: rgba(114,183,123,0.24);
}

.kanban-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.kanban-card-menu,
.kanban-card-del {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.42);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
}

.kanban-card-menu {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.kanban-card-del {
    font-size: 14px;
}

.kanban-card:hover .kanban-card-menu,
.kanban-card:hover .kanban-card-del {
    opacity: 1;
}

.kanban-card-menu:hover,
.kanban-card-del:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.07);
}

.kanban-card-title {
    color: rgba(255,255,255,0.86);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.32;
    font-family: var(--mono);
    overflow-wrap: anywhere;
    min-width: 0;
}

.kanban-card-progress {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
}

.kanban-card-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #8F6EF6;
}

.kanban-card.done .kanban-card-progress span {
    background: #72B77B;
}

.kanban-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kanban-card-meta span {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,0.48);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--mono);
}

.kanban-empty {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px dashed rgba(255,255,255,0.10);
    border-radius: 8px;
    color: rgba(255,255,255,0.34);
    text-align: center;
    font-size: 11px;
    font-family: var(--mono);
    line-height: 1.4;
}

.kanban-add-card {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px dashed var(--db-border);
    border-radius: 7px;
    background: transparent;
    color: var(--db-muted);
    cursor: text;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.kanban-add-card:hover,
.kanban-add-card:focus-within {
    border-color: rgba(238,68,8,0.34);
    background: rgba(238,68,8,0.06);
    color: var(--db-accent);
}

.kanban-add-plus {
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}

.kanban-add-card input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--db-text);
    font-size: 13px;
    font-family: var(--mono);
}

.kanban-add-card input::placeholder {
    color: var(--db-muted);
}

.todo-text {
    flex: 1;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
    user-select: none;
    font-family: var(--mono);
    cursor: text;
    outline: none;
    border-radius: 3px;
}
.todo-text.editing {
    user-select: text;
}

.todo-item.done .todo-text {
    text-decoration: line-through;
    color: rgba(255,255,255,0.50);
}

.todo-del {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.50);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    flex-shrink: 0;
}

.todo-del:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.07);
}

.todo-drop {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.50);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s, transform 0.18s;
}

.todo-drop svg { pointer-events: none; transition: transform 0.18s; transform: rotate(-90deg); }
.todo-drop.open svg { transform: rotate(0deg); }

.todo-drop:hover {
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.06);
}

.todo-edit {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.50);
    font-size: 16px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    flex-shrink: 0;
}

.todo-edit:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.07);
}

.todo-edit-row {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
}

.todo-edit-input {
    flex: 1;
    height: 32px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 0 10px;
    color: #F5F3EC;
    font-size: 12px;
    font-family: var(--mono);
    outline: none;
}

.todo-mini-btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #F5F3EC;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--mono);
}

.todo-mini-btn.primary {
    background: rgba(238,68,8,0.12);
    border-color: rgba(238,68,8,0.3);
    color: #EE4408;
}

.todo-done-footer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.28);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    border-radius: 4px;
}

.todo-done-footer:hover {
    color: rgba(255,255,255,0.55);
}

.todo-done-group {
    flex-direction: column;
    gap: 1px;
    margin-top: 0;
}

/* ── SUBTASKS — style ClickUp ── */
.subtasks {
    margin: 0 0 0 32px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.task-list-item + .subtasks {
    margin: 0 0 0 32px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
    transition: background 0.12s;
    cursor: default;
}
.subtask-item:hover { background: rgba(255,255,255,0.025); }
.subtask-item:hover .subtask-del { opacity: 1; }
.subtask-item:hover .subtask-drag-handle { opacity: 1; }
.subtask-item.dragging { opacity: 0.4; }

.subtask-drag-handle {
    flex-shrink: 0;
    width: 14px;
    min-height: 36px;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.2);
    font-size: 12px;
    cursor: grab;
    opacity: 0;
    transition: opacity 120ms;
    touch-action: none;
    line-height: 1;
    user-select: none;
}

@media (hover: none) and (pointer: coarse) {
    .subtask-drag-handle { opacity: 0.3; }
}

.subtasks.drag-over {
    background: rgba(255,253,246,0.03);
    box-shadow: inset 2px 0 0 rgba(255,253,246,0.15);
}

/* Subtask container: indentation guide line */
.subtasks {
    border-left: 1px solid rgba(255,253,246,0.07);
    margin-left: 38px;
    padding-left: 0;
}

/* Per-row drag hover — task row */
.task-row.drag-hover {
    background: rgba(255,253,246,0.04);
    box-shadow: inset 2px 0 0 rgba(238,68,8,0.55);
}

.task-row.insert-before,
.task-row.insert-after {
    position: relative;
}
.task-row.insert-before::before,
.task-row.insert-after::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(238,68,8,0.55);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 4px rgba(238,68,8,0.25);
}
.task-row.insert-before::before { top: 0; }
.task-row.insert-after::after { bottom: 0; }

.subtask-item.insert-before,
.subtask-item.insert-after {
    position: relative;
}
.subtask-item.insert-before::before,
.subtask-item.insert-after::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 0;
    height: 1px;
    background: rgba(255,253,246,0.3);
    pointer-events: none;
    z-index: 10;
}
.subtask-item.insert-before::before { top: 0; }
.subtask-item.insert-after::after { bottom: 0; }

/* Panel context: revert to flex, not grid */
.side-panel .subtask-item,
.side-panel .subtask-add-row {
    display: flex;
    min-height: auto;
    grid-template-columns: unset;
}

/* Icône cercle loop — bouton status */
.subtask-icon-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.42);
    transition: color 0.15s;
}
.subtask-icon-btn:hover { color: rgba(255,255,255,0.55); }

/* SVG cercle — état pending */
.subtask-icon-svg { display: block; }
.subtask-icon-svg .subtask-check { opacity: 0; }

/* État done */
.subtask-item.done .subtask-icon-btn { color: #0A2A53; }
.subtask-item.done .subtask-icon-svg circle { fill: #0A2A53; stroke: #0A2A53; }
.subtask-item.done .subtask-icon-svg .subtask-check { opacity: 1; stroke: #FFFDF6; }

.subtask-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,253,246,0.82);
    font-family: inherit;
    cursor: text;
    outline: none;
    border-radius: 3px;
}
.subtask-text.editing {
    user-select: text;
}
.subtask-item.done .subtask-text {
    text-decoration: line-through;
    color: rgba(255,255,255,0.35);
}

.subtask-del {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: color 0.12s, opacity 0.12s;
    padding: 0 2px;
}
.subtask-del:hover { color: rgba(255,255,255,0.8); }

/* Row "Ajouter" — toujours visible */
.subtask-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.subtask-add-icon {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.42);
    flex-shrink: 0;
}

.subtask-input {
    flex: 1;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255,255,255,0.70);
    font-size: 12px;
    font-family: var(--mono);
    outline: none;
}
.subtask-input::placeholder { color: rgba(255,255,255,0.42); font-style: italic; }

.subtask-add-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.subtask-add-btn:hover { color: rgba(255,255,255,0.8); }

/* ── SIDE PANEL — non-bloquant, dashboard toujours visible ── */
.side-panel-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    opacity: 0;
    transition: opacity 0.18s ease;
    right: 0;
    pointer-events: none;   /* jamais bloquant — le dashboard reste cliquable */
    z-index: 9000;
    /* Aucun backdrop, aucun blur, aucun fond sombre */
}

.side-panel-overlay.open {
    opacity: 1;
    pointer-events: none;   /* l'overlay wrapper ne bloque jamais */
}

.side-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: min(560px, 42vw);
    max-width: min(560px, 100vw);
    background: #1c2133;
    border-left: 1px solid rgba(238,68,8,0.4);
    padding: 28px 24px 40px;
    box-shadow: -24px 0 60px rgba(0,0,0,0.78);
    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;   /* le panneau lui-même est interactif */
    overflow-y: auto;
    overflow-x: hidden;
}

.side-panel-overlay.open .side-panel {
    transform: translateX(0);
}

.side-panel-title {
    font-size: 17px;
    font-weight: 700;
    color: #F5F3EC;
    margin: 0 0 16px;
    font-family: var(--mono);
    line-height: 1.4;
}

.side-panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.50);
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.side-panel-close:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}

/* Back button — mobile only */
.side-panel-back {
    display: none;
}

/* ── SIDE PANEL MOBILE — full screen ── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .side-panel-overlay {
        width: 100vw;
        max-width: 100vw;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0d0d0f;
        opacity: 0;
        transition: opacity 0.18s ease;
        pointer-events: none;
        overflow: hidden;
    }
    .side-panel-overlay.open {
        opacity: 1;
        pointer-events: none; /* overlay ne capture pas les clics — ghost click ignoré */
    }
    .side-panel-overlay.open .side-panel {
        pointer-events: auto; /* le panel lui-même reste cliquable */
    }
    body.panel-open {
        overflow: hidden;
        width: 100%;
    }
    .side-panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        border-left: none;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 env(safe-area-inset-bottom, 40px);
        transform: translateY(100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .side-panel-overlay.open .side-panel {
        transform: translateY(0);
    }
    .side-panel-back {
        display: flex;
        align-items: center;
        gap: 6px;
        position: sticky;
        top: 0;
        z-index: 10;
        width: 100%;
        padding: 16px 20px;
        background: #1c2133;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        color: rgba(255,255,255,0.6);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
    }
    .side-panel-close {
        display: none;
    }
    #taskPanelBody {
        padding: 20px 20px 40px;
    }
}

.side-panel-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    margin: 20px 0 8px;
    font-family: var(--mono);
}

.side-panel-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 10px 12px;
    color: #F5F3EC;
    font-size: 12px;
    font-family: var(--mono);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
    line-height: 1.6;
}

.side-panel-textarea:focus {
    border-color: rgba(238,68,8,0.4);
}

/* ── CLICKUP-STYLE TASK PANEL ── */
.cp-status-row { margin-bottom: 12px; }

.cp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--mono);
    transition: all 0.15s;
    border: 1px solid;
}

.cp-status-badge.pending,
.cp-status-badge.todo {
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.cp-status-badge.doing {
    color: #EE4408;
    background: rgba(238,68,8,0.08);
    border-color: rgba(238,68,8,0.22);
}

.cp-status-badge.done {
    color: #EE4408;
    background: rgba(238,68,8,0.1);
    border-color: rgba(238,68,8,0.22);
}

.cp-status-badge:hover { filter: brightness(1.15); }

.cp-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.cp-task-title {
    font-size: 16px;
    font-weight: 700;
    color: #F5F3EC;
    margin: 0 0 18px;
    font-family: var(--mono);
    line-height: 1.4;
    padding-right: 36px;
}

.cp-fields {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
}

.cp-field-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: start;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cp-field-row:last-child { border-bottom: none; }

.cp-field-key {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
    letter-spacing: 0.02em;
    padding-top: 1px;
}

.cp-field-val {
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    font-family: var(--mono);
    line-height: 1.5;
}

.cp-field-jalon { color: rgba(255,255,255,0.8); }

.cp-field-date {
    color: rgba(255,255,255,0.50);
    font-size: 11px;
}

.cp-notes-textarea {
    width: 100%;
    min-height: 64px;
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255,255,255,0.62);
    font-size: 12px;
    font-family: var(--mono);
    outline: none;
    resize: none;
    line-height: 1.6;
}

.cp-notes-textarea::placeholder { color: rgba(255,255,255,0.50); font-style: italic; }

.cp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cp-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

.cp-section-count {
    font-size: 10px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

/* date on jalon hint */
.todo-jalon-date {
    font-size: 10px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Section wrapper ── */
.jt-section {
    display: flex;
    flex-direction: column;
}

/* ── BLOC UNIFIÉ JALON + TÂCHES ── */
.jt-block {
    background: #111319;
    border: 1px solid rgba(255,253,246,0.11);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.24);
}

.jt-jalon-zone,
.jt-tasks-zone {
    display: flex;
    flex-direction: column;
}

.jt-jalon-zone {
    gap: 10px;
    padding: 4px 4px 0;
}

.jt-tasks-zone {
    margin-top: 20px;
    padding: 0;
}

.jt-zone-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.26);
    font-family: var(--mono);
    margin-bottom: 0;
}

.jt-zone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.jt-task-stats {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jt-task-stat {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.56);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--mono);
}

.jt-tasks-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.jt-tasks-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.jt-tasks-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255,255,255,0.42);
    font-family: var(--mono);
}

.jt-jalon-card {
    padding: 0;
}

.jt-jalon-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.jt-jalon-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.jt-jalon-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.44);
}

.jt-jalon-card.active .jt-jalon-label {
    color: #EE4408;
}

.jt-manage-link {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: color 0.2s;
}

.jt-manage-link:hover { color: rgba(255,255,255,0.8); }

.jt-jalon-bottom {
    display: block;
}

.jt-jalon-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 78ch;
}

.jt-jalon-title {
    font-size: clamp(17px, 1.7vw, 21px);
    font-weight: 500;
    color: rgba(255,255,255,0.92);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.jt-jalon-date {
    font-size: 10px;
    color: rgba(255,255,255,0.26);
    font-family: var(--mono);
    flex-shrink: 0;
}

.jt-jalon-critere {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.52);
    font-family: var(--mono);
    max-width: 62ch;
    text-align: left;
}

.jt-validation-ambient {
    margin: 5px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255,255,255,0.26);
    max-width: 60ch;
}

.jt-block-divider {
    display: none;
    margin: 18px 0 16px;
}

.jt-validate-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid rgba(238,68,8,0.3);
    border-radius: 5px;
    color: rgba(238,68,8,0.75);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.jt-validate-btn:hover {
    background: rgba(238,68,8,0.10);
    border-color: #EE4408;
    color: #EE4408;
}

.jt-validated-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.3);
}

.jt-jalon-card.completed .jt-jalon-title {
    color: rgba(255,255,255,0.4);
    text-decoration: line-through;
    text-decoration-color: rgba(255,255,255,0.2);
}

.jt-tasks-card {
    background: transparent;
    border: none;
    padding: 0;
}

.jt-tasks-card .jt-tasks-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 10px;
}

.jt-tasks-card .todo-add-row,
.jt-tasks-card .todo-list,
.jt-tasks-card .kanban-board {
    padding: 0;
}

.jt-tasks-card .todo-add-row {
    padding-bottom: 6px;
}

.jt-tasks-card .todo-list {
    padding-bottom: 4px;
}

.jt-tasks-card .kanban-board {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* ── TABS — mini roadmap standalone ── */
.jt-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.jt-tabs::-webkit-scrollbar {
    display: none;
}

.jt-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 9px 12px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.065);
    border-radius: 10px;
    cursor: pointer;
    min-width: 190px;
    max-width: 280px;
    transition: background 0.18s, border-color 0.18s, transform 0.18s, opacity 0.18s;
    text-align: left;
    flex: 0 0 auto;
    opacity: 0.85;
}

.jt-tab-date {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.26);
    font-family: var(--mono);
    white-space: nowrap;
}

.jt-tab-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jt-tab.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.028));
    border-color: rgba(238,68,8,0.38);
    box-shadow: inset 0 3px 0 #EE4408, 0 14px 28px rgba(0,0,0,0.22);
    opacity: 1;
}

.jt-tab.active .jt-tab-date { color: #EE4408; }
.jt-tab.active .jt-tab-title { color: #F5F3EC; font-weight: 700; }
.jt-tab.completed .jt-tab-title { color: rgba(255,255,255,0.22); }
.jt-tab:hover:not(.active) {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
    opacity: 1;
}

.jt-task-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.jt-task-search {
    min-width: 0;
    flex: 1;
    max-width: 360px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.3);
}

.jt-task-search-input {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.86);
    font-size: 13px;
    font-family: var(--mono);
    outline: none;
}

.jt-task-search-input::placeholder {
    color: rgba(255,255,255,0.34);
}

.jt-task-tools-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.jt-tool-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.72);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--mono);
    cursor: pointer;
}

.jt-tool-btn:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
}

.jt-empty-state {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    font-family: var(--mono);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.012);
}


.jmt-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
    min-width: 12px;
}

.jmt-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0 2px;
}

.jmt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.18);
    transition: all 0.2s;
    flex-shrink: 0;
}

.jmt-dot.active {
    background: #EE4408;
    border-color: #EE4408;
}

.jmt-dot.completed {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.25);
}

.jmt-dot.viewed {
    border-color: #EE4408;
    background: transparent;
}

.jmt-dot-wrap:hover .jmt-dot:not(.active) {
    border-color: rgba(238,68,8,0.5);
}

.jmt-label {
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* ── JALONS HORIZONTAL TIMELINE (legacy) ── */
.jalons-panel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 14px 16px;
}

.msb-panel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 14px 16px;
}

.msb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.msb-timeline-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 2px 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.msb-timeline-wrap::-webkit-scrollbar { height: 3px; }
.msb-timeline-wrap::-webkit-scrollbar-track { background: transparent; }
.msb-timeline-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.msb-timeline {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    margin: 0 auto;
}

.msb-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.26);
    font-family: var(--mono);
    margin: 2px 0 10px;
}

.msb-divider {
    height: 1px;
    background: rgba(255,253,246,0.07);
    margin: 14px 0 12px;
}

.msb-milestone {
    flex: 0 0 72px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: center;
    color: inherit;
}

.msb-milestone.is-done {
    opacity: 0.72;
}

.msb-milestone::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: rgba(255,253,246,0.08);
    z-index: 0;
}

.msb-milestone:last-child::before { display: none; }

.msb-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    font-family: var(--mono);
    letter-spacing: 0.01em;
}

.msb-milestone.is-done .msb-dot {
    box-shadow: none;
}

.msb-milestone.is-done::before { top: 18px; }

.msb-milestone.is-done .msb-title {
    color: rgba(255,255,255,0.50);
    font-weight: 600;
}

.msb-milestone.is-done .msb-date,
.msb-milestone.is-done .msb-num {
    color: rgba(255,255,255,0.32);
}

.msb-dot--done {
    background: #EE4408;
    color: #FFFDF6;
}

.msb-dot--active {
    background: transparent;
    color: #EE4408;
    border: 2px solid #EE4408;
    box-shadow: 0 0 0 3px rgba(238,68,8,0.12);
}

.msb-dot--late {
    background: #1A1A1C;
    color: #e05545;
    border: 1px solid rgba(163,21,13,0.35);
    box-shadow: 0 0 0 3px rgba(163,21,13,0.10);
}

.msb-dot--upcoming {
    background: #1A1A1C;
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,253,246,0.1);
}

.msb-milestone.is-selected .msb-dot--active {
    box-shadow: 0 0 0 3px rgba(238,68,8,0.28), 0 0 18px rgba(238,68,8,0.14);
}

.msb-num, .msb-title, .msb-date { display: none; }

.msb-card {
    margin-top: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.016)),
        rgba(17,19,21,0.9);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msb-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.msb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255,253,246,0.06);
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,253,246,0.1);
    font-family: var(--mono);
}

.msb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--mono);
    letter-spacing: 0.02em;
}

.msb-chip-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.msb-chip--active { background: rgba(238,68,8,0.10); color: #EE4408; }
.msb-chip--done { background: rgba(10,42,83,0.25); color: #7aa8d8; }
.msb-chip--upcoming { background: rgba(255,253,246,0.05); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,253,246,0.08); }
.msb-chip--late { background: rgba(163,21,13,0.12); color: #e05545; border: 1px solid rgba(163,21,13,0.30); }

.msb-card-title {
    font-size: 19px;
    font-weight: 750;
    color: rgba(255,253,246,0.92);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.msb-card-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-family: var(--mono);
}

.msb-sep {
    height: 1px;
    background: rgba(255,253,246,0.07);
    margin: 4px 0;
}

.msb-section-key {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #AAA;
    font-family: var(--mono);
    margin-bottom: 4px;
}

.msb-section-text {
    font-size: 13px;
    color: rgba(255,255,255,0.56);
    line-height: 1.55;
    font-family: var(--mono);
}

.msb-section-text--strong {
    color: rgba(255,253,246,0.88);
    font-weight: 600;
    border-left: 2px solid rgba(238,68,8,0.55);
    padding-left: 10px;
}

.msb-empty {
    color: rgba(255,255,255,0.28);
    font-style: italic;
}

.msb-state-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.msb-state-row--single {
    justify-content: center;
}

.msb-state-row--single .msb-state-card {
    max-width: 820px;
    width: min(820px, 100%);
}

.msb-state-card {
    flex: 1;
    min-width: 240px;
    max-width: 360px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: default;
    transition: none;
}

.msb-state-card:hover {
    border-color: transparent;
    transform: none;
}

.msb-state-card.is-selected {
    border: none;
    box-shadow: none;
}

.msb-state-card:focus-visible {
    outline: none;
    box-shadow: none;
}

.msb-state-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.msb-state-hint {
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
    font-style: italic;
}

.msb-state-card .jl-kpi-block { margin-top: 2px; }

/* ── Detail inner card ── */
.msb-detail {
    background: #111112;
    border: 1px solid rgba(255,253,246,0.08);
    border-radius: 8px;
    padding: 20px 22px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msb-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.msb-detail-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.msb-detail-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Deadline badge */
.msb-deadline {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-family: var(--mono);
    font-weight: 500;
}
.msb-deadline--ok   { color: rgba(255,255,255,0.42); }
.msb-deadline--soon { color: #FFA500; }
.msb-deadline--late { color: #e05545; }

.msb-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 28px;
}

@media (max-width: 640px) {
    .msb-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .msb-milestone { flex-basis: 72px; }
}

/* ──────────────────────────────────────────────────────────
   Jalon KPI cards (leading / lagging)
   ────────────────────────────────────────────────────────── */
.jkpi-wrap {
    margin-top: 12px;
}

.jkpi-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.26);
    font-family: var(--mono);
    margin-bottom: 10px;
}

.jkpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jkpi-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 20px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
}

.jkpi-top {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jkpi-bottom {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.jkpi-unit-inline {
    font-size: 11px;
    color: rgba(255,255,255,0.32);
    font-family: var(--mono);
}

/* KPI card — vertical layout */
.jkpi-kicker {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.32);
    font-family: var(--mono);
    margin-bottom: 2px;
}

.jkpi-value-wrap {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.jkpi-value-num {
    font-size: clamp(38px, 3.5vw, 52px);
    font-weight: 780;
    letter-spacing: -0.03em;
    color: rgba(255,253,246,0.92);
    line-height: 1;
}

.jkpi-value-unit {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    font-family: var(--mono);
}

.jkpi-compact-target {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    font-family: var(--mono);
    white-space: nowrap;
}

.jkpi-edit-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    margin-left: auto;
    cursor: pointer;
    color: rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    align-self: center;
    transition: color 0.15s ease;
}

.jkpi-edit-btn:hover { color: rgba(255,255,255,0.70); }

.jkpi-name {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    font-family: var(--mono);
    line-height: 1.4;
}

.jkpi-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255,255,255,0.38);
    font-family: var(--mono);
    margin-bottom: 4px;
}

.jkpi-progress-labels strong {
    color: rgba(255,253,246,0.70);
    font-weight: 600;
}

.jkpi-explain {
    font-size: 11px;
    color: rgba(255,255,255,0.30);
    font-family: var(--mono);
    font-style: italic;
    line-height: 1.45;
}

.jkpi-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}

.jkpi-bar-fill {
    height: 100%;
    background: rgba(196, 196, 85, 0.50);
    border-radius: 999px;
}

.jkpi-measure-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    font-family: var(--mono);
    font-weight: 650;
    color: rgba(255,255,255,0.28);
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease;
}

.jkpi-measure-link:hover { color: rgba(255,255,255,0.60); }

.jkpi-card--empty {
    justify-content: center;
    min-height: 160px;
}

.jkpi-empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.jkpi-empty-title {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.35);
    font-family: var(--mono);
}

.jkpi-empty-btn {
    height: 42px;
    border-radius: 12px;
    border: 1px dashed rgba(238,68,8,0.35);
    background: rgba(238,68,8,0.06);
    color: rgba(238,68,8,0.9);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.jkpi-empty-btn:hover {
    background: rgba(238,68,8,0.10);
    border-color: rgba(238,68,8,0.55);
}

@media (max-width: 860px) {
    .jkpi-grid { grid-template-columns: 1fr; }
}

.jalons-head {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.jalons-step-indicator {
    font-size: 10px;
    color: rgba(255,255,255,0.42);
    font-family: var(--mono);
}

.jalons-manage-link {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.64);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.03);
}

.jalons-manage-link:hover {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}

.jalons-scroll-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.jalons-scroll-wrap::-webkit-scrollbar { height: 3px; }
.jalons-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.jalons-scroll-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.jt-track { display: flex; align-items: flex-start; min-width: max-content; }

.jt-labels-top {
    display: flex;
    align-items: flex-end;
    min-width: max-content;
}

.jt-mid {
    display: flex;
    align-items: center;
    min-width: max-content;
}

.jt-labels-bot {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
}

.jt-col-top {
    width: 140px;
    text-align: center;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.jt-col-bot {
    width: 140px;
    text-align: center;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.jt-spacer { flex: 1; min-width: 40px; }

.jt-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

.jt-date {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.52);
    font-family: var(--mono);
}

.jt-dot-wrap {
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jt-line-seg {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.08);
}

.jt-line-seg.done { background: rgba(238,68,8,0.35); }

.jt-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.18);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.jt-dot:hover { transform: scale(1.15); }
.jt-dot.popup-active {
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.1);
}

.jt-dot.completed {
    background: #EE4408;
    border-color: #EE4408;
    box-shadow: 0 0 10px rgba(238,68,8,0.45);
}

.jt-dot.in_progress {
    border-color: #EE4408;
    background: transparent;
    box-shadow: 0 0 0 3px rgba(238,68,8,0.12);
    animation: pulse-dot 2.2s ease-in-out infinite;
}

.jt-dot.in_progress::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #EE4408;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(238,68,8,0.12); }
    50%       { box-shadow: 0 0 0 6px rgba(238,68,8,0.05); }
}

/* ── Jalon detail popup card ── */
.jl-detail-card {
    margin-top: 8px;
    padding: 14px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.016)),
        rgba(17,19,21,0.9);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: jl-fade-in 0.18s ease;
}

@keyframes jl-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.jl-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.jl-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jl-detail-tag {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-family: var(--mono);
}

.jl-detail-num {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jl-detail-status {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--mono);
}

.jl-detail-status.completed {
    color: #72B77B;
    background: rgba(114,183,123,0.10);
}

.jl-detail-status.in-progress {
    color: #EE4408;
    background: rgba(238,68,8,0.08);
}

.jl-detail-status.pending {
    color: rgba(255,255,255,0.32);
    background: rgba(255,255,255,0.05);
}

.jl-detail-date {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.38);
    font-family: var(--mono);
    flex-shrink: 0;
}

.jl-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    line-height: 1.15;
}

.jl-detail-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jl-detail-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jl-detail-text {
    font-size: 13px;
    color: rgba(255,255,255,0.62);
    line-height: 1.55;
    white-space: pre-wrap;
}

.jl-detail-kpi {
    color: rgba(255,255,255,0.72);
    font-weight: 500;
}

.jl-detail-empty {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    font-family: var(--mono);
}

.jl-detail-empty a {
    color: rgba(238,68,8,0.65);
    text-decoration: none;
}

.jl-detail-empty a:hover {
    color: #EE4408;
}

.jt-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.72);
    line-height: 1.3;
}

.jt-kpi {
    font-size: 10px;
    color: rgba(255,255,255,0.46);
    line-height: 1.3;
    font-family: var(--mono);
}

.jt-prog {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(238,68,8,0.08);
    color: #EE4408;
    font-family: var(--mono);
    border: 1px solid rgba(238,68,8,0.12);
}

.jalons-empty {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    font-family: var(--mono);
}

.jalons-empty a { color: #EE4408; text-decoration: none; }

/* ── CITATION ── */
.db-citation {
    text-align: center;
    font-size: 11px;
    font-style: italic;
    color: rgba(255,255,255,0.50);
    padding-top: 4px;
    font-family: var(--mono);
    letter-spacing: 0.03em;
}

/* ── EMPTY STATE ── */
.db-empty-state {
    padding: 80px 20px;
    text-align: center;
}

.db-empty-icon {
    color: rgba(238,68,8,0.22);
    margin-bottom: 24px;
}

.db-empty-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 26px;
    color: rgba(255,255,255,0.50);
    margin: 0 0 10px;
}

.db-empty-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.50);
    margin: 0 0 28px;
    font-family: var(--mono);
}

/* ── MODAL ── */
.m-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}

.m-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.m-box {
    background: #111112;
    border: 1px solid rgba(255,253,246,0.08);
    border-top: 1px solid rgba(255,253,246,0.14);
    border-radius: 16px;
    padding: 32px;
    width: 400px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 32px 80px rgba(0,0,0,0.85);
}

.m-box--measure {
    width: 460px;
}

.m-title {
    font-size: 17px;
    font-weight: 700;
    color: #FFFDF6;
    margin: 0 0 6px;
}

.m-sub {
    font-size: 12px;
    color: #929292;
    margin: 0 0 24px;
    line-height: 1.65;
}

.m-context {
    margin: -8px 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,253,246,0.08);
    background: rgba(255,253,246,0.025);
    color: #b0b0b6;
    font-size: 12px;
    line-height: 1.55;
}

.m-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.m-label {
    font-size: 12px;
    font-weight: 500;
    color: #929292;
}

.m-hint {
    font-size: 11px;
    color: #929292;
}

.m-row {
    display: flex;
    gap: 10px;
}
.m-row .m-field {
    flex: 1;
    min-width: 0;
}

.m-mode-toggle {
    display: flex;
    gap: 6px;
}
.m-mode-btn {
    flex: 1;
    padding: 9px 10px;
    background: #1A1A1C;
    border: 1px solid rgba(255,253,246,0.12);
    border-radius: 8px;
    color: #929292;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms, color 150ms, background 150ms;
    white-space: nowrap;
}
.m-mode-btn:hover {
    border-color: rgba(255,253,246,0.22);
    color: #FFFDF6;
}
.m-mode-btn.active {
    background: rgba(238,68,8,0.12);
    border-color: #EE4408;
    color: #FFFDF6;
}

.m-input {
    width: 100%;
    background: #1A1A1C;
    border: 1px solid rgba(255,253,246,0.12);
    border-radius: 8px;
    padding: 10px 14px;
    color: #FFFDF6;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.m-input::placeholder { color: rgba(146,146,146,0.6); }

textarea.m-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.55;
}

select.m-input {
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23929292' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.m-input:focus {
    border-color: #EE4408;
    box-shadow: 0 0 0 3px rgba(238,68,8,0.15);
}

.m-input--error,
.m-input.error {
    border-color: #A3150D;
    box-shadow: 0 0 0 3px rgba(163,21,13,0.12);
}

.m-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.m-error {
    font-size: 11px;
    color: #FF453A;
    display: none;
    font-family: var(--mono);
}

.m-error.show { display: block; }

.m-btns {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.m-btn-cancel {
    flex: 1;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255,253,246,0.08);
    color: #929292;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 140ms ease, border-color 140ms ease;
}

.m-btn-cancel:hover {
    color: #FFFDF6;
    border-color: rgba(255,253,246,0.18);
}

.m-btn-ok {
    flex: 1;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EE4408;
    border: 1px solid #EE4408;
    color: #FFFDF6;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 140ms ease;
}

.m-btn-ok:hover { background: #C63806; }

.m-btn-delete {
    flex: 1;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(163,21,13,0.12);
    border: 1px solid rgba(163,21,13,0.35);
    color: #e05545;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.m-btn-delete:hover {
    background: rgba(163,21,13,0.22);
    border-color: rgba(163,21,13,0.55);
    color: #ff6b5b;
}

.m-history-wrap {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,253,246,0.08);
}

.m-history-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a90;
    margin-bottom: 10px;
}

.m-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,253,246,0.02);
    border: 1px solid rgba(255,253,246,0.06);
}

.m-history-row--edit {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
}

.m-history-date {
    font-size: 12px;
    color: #8d8d93;
}

.m-history-value {
    font-size: 12px;
    font-weight: 700;
    color: #f4f4f5;
    white-space: nowrap;
}

.m-history-empty {
    font-size: 12px;
    color: #8d8d93;
    line-height: 1.5;
}

.m-history-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
    gap: 10px;
}

.m-history-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.m-history-field-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a8a90;
}

.m-history-input {
    padding-top: 9px;
    padding-bottom: 9px;
}

.m-history-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.m-history-action {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,253,246,0.10);
    background: rgba(255,253,246,0.03);
    color: #c9c9ce;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.m-history-action--danger {
    color: #e05545;
    border-color: rgba(163,21,13,0.35);
    background: rgba(163,21,13,0.12);
}

.m-history-action--primary {
    color: #FFFDF6;
    border-color: #EE4408;
    background: #EE4408;
}

/* ── PROJECT SWITCHER — navbar dropdown ── */
.db-switcher { display: none; } /* inutilisé — remplacé par navbar-dropdown */

.db-nav-dropdown {
    position: relative;
    display: none; /* JS le passe à flex si >1 projet */
    align-items: center;
}

.db-nav-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 5px 10px 5px 12px;
    color: rgba(255,255,255,0.80);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.18s, background 0.18s;
}

.db-nav-trigger:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.22);
}

.db-nav-trigger svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.db-nav-dropdown.open .db-nav-trigger svg {
    transform: rotate(180deg);
}

.db-nav-rename-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.db-nav-dropdown:hover .db-nav-rename-btn,
.db-nav-rename-btn:focus-visible {
    opacity: 1;
}
.db-nav-rename-btn:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
}
.db-nav-label-input {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255,255,255,0.80);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    width: 130px;
    padding: 0;
    min-width: 0;
}

.db-nav-list {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #141416;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 4px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.db-nav-dropdown.open .db-nav-list {
    display: block;
}

.db-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--mono);
    letter-spacing: 0.03em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.db-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
}

.db-nav-item.active {
    color: #F5F3EC;
    background: rgba(255,255,255,0.06);
}

/* ── PROJECT PANELS ── */
.db-panel { display: none; }
.db-panel.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .dashboard-section,
    .dashboard-section.active {
        padding: 16px 0 48px !important;
    }
    .db-2col { grid-template-columns: 1fr; }
    .db-row-kpi-smart { grid-template-columns: 1fr; gap: 0; }
    .proj-header { padding: 16px 16px 12px; flex-direction: column; }
    .db-main-tabs {
        padding: 0 16px;
        gap: 22px;
    }
    .db-main-tab {
        height: 46px;
        font-size: 13px;
    }
    .proj-header-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .proj-search-shell {
        width: 100%;
    }
    .proj-primary-btn {
        width: auto;
    }
    .proj-body {
        padding: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
    }
    .proj-actions { padding-top: 0; }
    /* Sections full-width — no card borders */
    .todo-panel {
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 20px 16px 32px;
        min-height: unset;
    }
    .kpi-panel {
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 16px;
    }
    .smart-panel {
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 16px;
    }
    .jalons-panel {
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 14px 16px;
    }
    .task-toolbar {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding-top: 2px;
    }
    .task-toolbar-sub {
        white-space: normal;
    }
    .task-view-label {
        display: none;
    }
    .jt-jalon-meta {
        gap: 6px;
    }
    .jt-jalon-bottom {
        flex-direction: column;
        gap: 8px;
    }
    .jt-jalon-title {
        font-size: 15px;
    }
    .jt-zone-kicker {
        margin-bottom: 8px;
    }
    .jt-tasks-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .jt-zone-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    .jt-tasks-sub {
        font-size: 11px;
    }
    .jt-jalon-critere {
        font-size: 11px;
        text-align: left;
        max-width: none;
    }
    .jt-block {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 14px 16px 16px;
    }
    .jt-tasks-card {
        padding: 0;
    }
    .jt-task-tools {
        flex-direction: column;
        align-items: stretch;
    }
    .jt-task-search {
        max-width: none;
    }
    .jt-task-tools-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .jt-tab {
        min-width: min(70vw, 240px);
    }
    .task-view-btn {
        height: 32px;
        padding: 0 10px;
    }
    .todo-input {
        font-size: 16px;
    }
    .kanban-board {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 2px 0 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .kanban-board::-webkit-scrollbar {
        display: none;
    }
    .kanban-column {
        min-width: min(84vw, 360px);
        min-height: 280px;
        scroll-snap-align: start;
    }
    .kanban-card-menu,
    .kanban-card-del {
        opacity: 1;
    }
    .jalons-head {
        grid-template-columns: 1fr auto;
    }
    .jalons-step-indicator {
        grid-column: 1 / -1;
    }
    .task-list-item {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px 4px;
    }
    .task-list-main {
        grid-column: auto;
    }
    .task-list-actions {
        grid-column: auto;
        align-self: center;
    }
    /* Touch targets mobile — PAS sur todo-item (casse le scroll) */
    .todo-list, .todo-item, .subtasks, .subtask-item, .todo-done-footer {
        touch-action: pan-y;
    }
    .kanban-board,
    .kanban-card,
    .kanban-column-body {
        touch-action: pan-x pan-y;
    }
    .todo-cb, .todo-drop, .todo-del, .todo-edit,
    .cp-status-badge, .side-panel-back, .todo-done-footer,
    .subtask-icon-btn, .todo-plus-btn, .task-view-btn, .task-list-check,
    .kanban-status-pill, .kanban-card-menu, .kanban-card-del {
        touch-action: manipulation;
    }
    .todo-edit {
        opacity: 1;
    }
    /* Checkbox plus grand sur mobile */
    .todo-cb {
        width: 22px;
        height: 22px;
    }
    .todo-item.done .todo-cb::after {
        width: 9px;
        height: 5px;
    }
    /* Reorder mobile : Jalon+Tâches → KPI+SMART → Citation */
    .jt-block          { order: 1; border-radius: 0; border-left: none; border-right: none; }
    .db-row-kpi-smart  { order: 2; }
    .db-citation       { order: 3; }
}

/* ── PANEL OUVERT : dim contexte (KPI+SMART) ── */
.db-row-kpi-smart {
    transition: opacity 0.24s ease;
}
body.panel-open .db-row-kpi-smart {
    opacity: 0.32;
}

/* ════════════════════════════════════════════════
   ZONE 2 — Compact tabs
   ════════════════════════════════════════════════ */
.jt-tab.jt-tab-compact {
    min-width: auto;
    max-width: 130px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
}

.jt-tab-rank {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.42);
    font-family: var(--mono);
    white-space: nowrap;
}
.jt-tab.active .jt-tab-rank { color: #EE4408; }
.jt-tab.completed .jt-tab-rank { color: rgba(255,255,255,0.18); }

.jt-tab-status-icon {
    font-size: 9px;
    color: rgba(255,255,255,0.38);
    flex-shrink: 0;
}
.jt-tab.active .jt-tab-status-icon { color: #EE4408; }

.jt-tab-status-active {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #EE4408;
    box-shadow: 0 0 6px rgba(238,68,8,0.6);
    flex-shrink: 0;
}

/* ── Zone 2 — Jalon card: active = anchor with left accent ── */
.jt-jalon-card.active {
    border-left: 2px solid rgba(238,68,8,0.45);
    padding-left: 12px;
}

/* ── Zone 2 — Jalon card header ── */
.jt-jalon-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.jt-jalon-validation-row {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.jt-jalon-validation-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    font-family: var(--mono);
}

/* ── Zone 2 — Task section header ── */
.jt-tasks-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jt-tasks-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jt-section-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    font-family: var(--mono);
}

/* ════════════════════════════════════════════════
   ZONE 3 — Pilot card
   ════════════════════════════════════════════════ */
.jt-rank-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jl-pilot-card {
    margin-top: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.016)),
                rgba(17,19,21,0.9);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jl-pilot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.jl-pilot-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,253,246,0.9);
    line-height: 1.3;
}

.jl-pilot-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jl-pilot-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jl-pilot-text {
    font-size: 13px;
    color: rgba(255,255,255,0.58);
    line-height: 1.5;
    margin: 0;
    font-family: var(--mono);
}

/* ── Zone 3 — KPI block ── */
.jl-kpi-block {
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jl-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jl-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jl-kpi-type {
    display: block;
    margin-bottom: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: var(--mono);
}

.jl-kpi-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.52);
    letter-spacing: 0.02em;
}

.jl-kpi-update-btn {
    padding: 3px 9px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    color: rgba(255,255,255,0.38);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.jl-kpi-update-btn:hover {
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
}

.jl-kpi-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.jl-kpi-current {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255,253,246,0.9);
    font-family: var(--mono);
    letter-spacing: -0.02em;
}

.jl-kpi-sep {
    font-size: 14px;
    color: rgba(255,255,255,0.2);
    font-family: var(--mono);
}

.jl-kpi-target {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.32);
    font-family: var(--mono);
}

.jl-kpi-empty {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jl-kpi-empty-label {
    font-size: 11px;
    color: rgba(255,255,255,0.28);
    font-style: italic;
}

.jl-kpi-add-btn {
    padding: 3px 9px;
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 5px;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.jl-kpi-add-btn:hover {
    border-color: rgba(238,68,8,0.4);
    color: #EE4408;
}

/* ── Zone 3 — Action buttons ── */
.jl-pilot-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.jl-validate-btn {
    padding: 7px 16px;
    background: transparent;
    border: 1px solid rgba(238,68,8,0.3);
    border-radius: 8px;
    color: rgba(238,68,8,0.8);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.jl-validate-btn:hover {
    background: rgba(238,68,8,0.10);
    border-color: #EE4408;
    color: #EE4408;
}

.jl-reactivate-btn {
    padding: 7px 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.32);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.jl-reactivate-btn:hover {
    border-color: rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.55);
}

/* ════════════════════════════════════════════════
   DASHBOARD V2 VISUAL PASS — real data, dark only
   ════════════════════════════════════════════════ */
:root {
    --db-bg: #080809;
    --db-surface: #0f1013;
    --db-surface-2: #14161b;
    --db-surface-3: #191b21;
    --db-border: rgba(255,253,246,0.12);
    --db-border-soft: rgba(255,253,246,0.075);
    --db-text: #FFFDF6;
    --db-muted: #929292;
    --db-subtle: rgba(255,253,246,0.42);
    --db-accent: #EE4408;
    --db-accent-hover: #F34C0A;
    --db-confirm: #8ea5c4;
    --db-radius: 8px;
    --db-shadow: 0 1px 2px rgba(0,0,0,0.34);
}

body {
    background: var(--db-bg);
}

.dashboard-section,
.dashboard-section.active {
    padding: 26px 40px 88px !important;
}

.dashboard-container {
    max-width: 1120px !important;
    margin: 0 auto !important;
}

.proj-header {
    padding: 0 0 18px;
    border-bottom: 1px solid var(--db-border);
}

.proj-title {
    font-style: normal;
    font-weight: 800;
    font-size: clamp(20px, 1.7vw, 26px);
    letter-spacing: -0.04em;
    color: var(--db-text);
}

.proj-badge {
    background: var(--db-surface-2);
    border: 1px solid var(--db-border-soft);
    border-radius: 5px;
    color: var(--db-muted);
    box-shadow: none;
}

.proj-edit-link,
.proj-btn-icon,
.db-nav-trigger,
.db-nav-list,
.db-nav-item {
    border-color: var(--db-border);
    background: var(--db-surface);
    color: var(--db-muted);
}

.proj-edit-link:hover,
.db-nav-trigger:hover,
.db-nav-item:hover {
    background: var(--db-surface-3);
    color: var(--db-text);
}

.db-main-tabs {
    padding: 0;
    gap: 32px;
    border-bottom: 1px solid var(--db-border);
}

.db-main-tab {
    height: 50px;
    color: var(--db-muted);
    font-weight: 700;
}

.db-main-tab.active {
    color: var(--db-text);
    border-bottom-color: var(--db-text);
}

.db-main-tab-icon {
    background: var(--db-surface-2);
    border-color: var(--db-border-soft);
    color: var(--db-muted);
}

.db-main-tab.active .db-main-tab-icon {
    background: var(--db-text);
    border-color: var(--db-text);
    color: var(--db-bg);
}

.proj-body {
    padding: 34px 0 0;
    gap: 0;
}

.db-view {
    gap: 42px;
}

.db-section {
    gap: 18px;
}

.db-section-label,
.section-lbl,
.kpi-panel-label,
.smart-title {
    color: var(--db-muted) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.db-card,
.kpi-panel,
.smart-panel,
.jt-block,
.jalons-panel {
    background: var(--db-surface);
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    box-shadow: var(--db-shadow);
}

.db-card::before {
    display: none;
}

.db-row-kpi-smart {
    gap: 32px;
    grid-template-columns: 1.2fr 1fr;
}

.kpi-panel,
.smart-panel,
.jalons-panel {
    padding: 28px;
}

.kpi-panel {
    min-height: 340px;
}

.kpi-panel-top,
.smart-header,
.jalons-head,
.jl-pilot-header {
    border-bottom: 1px solid var(--db-border-soft);
    padding-bottom: 16px;
}

.kpi-panel-desc,
.smart-value,
.jl-pilot-text,
.jt-validation-ambient,
.detail-grid p {
    color: rgba(255,253,246,0.72);
}

.kpi-add-btn,
.jl-validate-btn,
.m-btn-ok {
    background: var(--db-accent);
    border-color: var(--db-accent);
    color: #FFFDF6;
}

.kpi-add-btn:hover,
.jl-validate-btn:hover,
.m-btn-ok:hover {
    background: var(--db-accent-hover);
    border-color: var(--db-accent-hover);
    color: #FFFDF6;
}

.smart-row {
    border-bottom-color: var(--db-border-soft);
}

.smart-letter-badge {
    background: var(--db-surface-2);
    border-color: var(--db-border);
    color: var(--db-muted);
}

.smart-edit-btn,
.jalons-manage-link,
.jl-kpi-update-btn,
.jl-reactivate-btn,
.task-view-toggle,
.task-view-btn,
.todo-edit,
.todo-del,
.todo-drop {
    background: transparent;
    border-color: var(--db-border);
    color: var(--db-muted);
}

.smart-edit-btn:hover,
.jalons-manage-link:hover,
.jl-kpi-update-btn:hover,
.jl-reactivate-btn:hover,
.todo-edit:hover,
.todo-del:hover,
.todo-drop:hover {
    background: var(--db-surface-3);
    color: var(--db-text);
    border-color: var(--db-border);
}

.jt-block {
    padding: 0;
    overflow: hidden;
}

.jt-jalon-zone {
    padding: 0;
    gap: 0;
}

.jt-tabs {
    padding: 0 20px;
    border-bottom: 1px solid var(--db-border);
    gap: 24px;
}

.jt-tab.jt-tab-compact {
    height: 46px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-width: auto;
    opacity: 1;
    color: var(--db-muted);
}

.jt-tab.active {
    border-bottom-color: var(--db-accent);
    background: transparent;
    box-shadow: none;
}

.jt-tab.active .jt-tab-rank,
.jt-tab.active .jt-tab-date {
    color: var(--db-accent);
}

.jt-jalon-card {
    padding: 22px 24px;
    border-bottom: 1px solid var(--db-border-soft);
}

.jt-jalon-card.active {
    border-left: 0;
    padding-left: 24px;
}

.jt-jalon-title {
    color: var(--db-text);
    font-size: clamp(20px, 2vw, 26px);
    letter-spacing: -0.04em;
}

.jt-jalon-label,
.jl-detail-num,
.jt-jalon-date {
    color: var(--db-muted);
}

.jl-detail-status {
    border: 1px solid var(--db-border);
    background: var(--db-surface-2);
    color: var(--db-muted);
    border-radius: 6px;
    padding: 4px 8px;
}

.jl-detail-status.in-progress,
.task-list-status.doing {
    color: var(--db-accent);
    border-color: rgba(238,68,8,0.32);
    background: rgba(238,68,8,0.10);
}

.jl-detail-status.completed,
.task-list-status.done {
    color: var(--db-confirm);
    border-color: rgba(142,165,196,0.28);
    background: rgba(142,165,196,0.10);
}

.jt-tasks-zone {
    margin: 0;
    padding: 0;
}

.jt-tasks-card {
    padding: 0;
}

.todo-add-row {
    padding: 15px 24px;
    border-top: 0;
    border-bottom: 1px solid var(--db-border);
    background: var(--db-surface);
}

.todo-add-row:hover,
.todo-add-row:focus-within {
    background: var(--db-surface-2);
}

.todo-add-input {
    color: var(--db-text);
    font-size: 14px;
}

.todo-add-input::placeholder {
    color: var(--db-muted);
}

.task-list-shell {
    background: var(--db-surface);
}

.task-list-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 150px 112px;
    align-items: center;
    padding: 12px 24px;
    background: var(--db-surface-2);
    border-bottom: 1px solid var(--db-border);
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 800;
}

.todo-section-lbl,
.todo-done-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--db-border-soft);
    background: var(--db-surface);
    color: var(--db-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.todo-section-lbl span {
    display: inline;
}

.todo-section-lbl strong {
    color: var(--db-muted);
    font-size: 12px;
}

.todo-section-lbl.doing {
    color: var(--db-accent);
}

.task-list-item {
    grid-template-columns: 40px minmax(0, 1fr) 150px 112px;
    gap: 0;
    padding: 0 24px;
    min-height: 54px;
    border-bottom: 1px solid var(--db-border-soft);
    border-left: 0 !important;
    background: transparent;
}

.task-list-item:hover {
    background: var(--db-surface-2);
}

.task-list-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border-color: var(--db-border);
}

.task-list-check.doing {
    border-color: var(--db-accent);
    background: rgba(238,68,8,0.12);
}

.task-list-check.done {
    background: var(--db-confirm);
    border-color: var(--db-confirm);
}

.task-list-main .todo-text {
    color: rgba(255,253,246,0.86);
    font-size: 14px;
    font-weight: 600;
}

.task-list-status {
    justify-self: start;
    min-width: 0;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--db-surface-2);
    border: 1px solid var(--db-border);
    color: var(--db-muted);
}

.task-list-actions {
    justify-self: end;
    opacity: 0;
    transition: opacity 0.12s;
}

.task-list-item:hover .task-list-actions {
    opacity: 1;
}

.todo-done-group {
    display: flex;
    flex-direction: column;
}

.kanban-board {
    padding: 20px 24px 24px;
    margin-top: 0;
    gap: 16px;
}

.kanban-column {
    background: var(--db-surface-2);
    border-color: var(--db-border);
    border-radius: var(--db-radius);
}

.kanban-card {
    background: var(--db-surface);
    border-color: var(--db-border-soft);
    border-radius: 7px;
    box-shadow: var(--db-shadow);
}

.kanban-card-title {
    color: rgba(255,253,246,0.86);
    font-size: 14px;
}

.jalons-panel {
    padding: 28px;
}

.jalons-scroll-wrap {
    margin: 6px 0 28px;
    padding: 18px 0 12px;
}

.jt-line-seg {
    background: var(--db-border);
}

.jt-dot {
    width: 32px;
    height: 32px;
    border: 3px solid var(--db-border);
    background: var(--db-surface);
}

.jt-dot.completed {
    background: var(--db-confirm);
    border-color: var(--db-confirm);
    box-shadow: none;
}

.jt-dot.in_progress {
    border-color: var(--db-accent);
    box-shadow: 0 0 0 4px rgba(238,68,8,0.14);
    animation: none;
}

.jt-dot.in_progress::after {
    inset: 8px;
    background: var(--db-accent);
}

.jt-dot.popup-active {
    border-color: var(--db-text);
    box-shadow: 0 0 0 4px rgba(255,253,246,0.10);
}

.jt-title {
    color: rgba(255,253,246,0.74);
    font-size: 13px;
}

.jl-pilot-card {
    padding: 24px;
    border-radius: var(--db-radius);
    border-color: var(--db-border);
    background: var(--db-surface-2);
}

.jl-pilot-title {
    font-size: 22px;
    letter-spacing: -0.04em;
}

.jl-kpi-grid {
    gap: 16px;
}

.jl-kpi-block {
    background: var(--db-surface);
    border-color: var(--db-border);
    border-radius: 7px;
    padding: 18px;
}

.jl-kpi-current {
    font-size: 28px;
    color: var(--db-text);
}

.jl-pilot-footer {
    border-top-color: var(--db-border-soft);
}

@media (max-width: 768px) {
    .dashboard-section,
    .dashboard-section.active {
        padding: 16px 0 56px !important;
    }

    .dashboard-container {
        max-width: 100% !important;
    }

    .proj-header,
    .db-main-tabs,
    .proj-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .jt-block,
    .kpi-panel,
    .smart-panel,
    .jalons-panel {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .task-list-head {
        display: none;
    }

    .task-list-item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
        padding: 12px 16px;
    }

    .task-list-status,
    .task-list-actions {
        grid-column: 2;
    }

    .task-list-actions {
        opacity: 1;
        justify-self: start;
    }

    .jl-kpi-grid,
    .db-row-kpi-smart {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════
   DASHBOARD V2 STRUCTURE MATCH — execution patterns
   ════════════════════════════════════════════════ */

.jt-tabs.milestone-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--db-border);
    scrollbar-width: none;
}

.jt-tabs.milestone-tabs::-webkit-scrollbar {
    display: none;
}

.jt-tab.milestone-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 54px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--db-muted);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 120ms ease, border-color 120ms ease;
}

.jt-tab.milestone-tab:hover,
.jt-tab.milestone-tab.active {
    color: var(--db-text);
    border-bottom-color: var(--db-text);
}

.jt-tab.milestone-tab.active {
    background: transparent;
}

.jt-tab.milestone-tab.completed {
    color: rgba(255,253,246,0.64);
}

.milestone-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--db-border);
}

.milestone-dot.active {
    background: var(--db-accent);
}

.milestone-dot.complete {
    background: var(--db-confirm);
}

.milestone-tab-main {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.jt-tab-title {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.jt-tab-rank {
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.jt-tab.milestone-tab.active .jt-tab-rank {
    color: var(--db-accent);
}

.milestone-count {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--db-surface-3);
    border: 1px solid transparent;
    color: var(--db-text);
    font-size: 12px;
    font-weight: 800;
}

.milestone-count.muted {
    background: transparent;
    border-color: var(--db-border);
    color: var(--db-muted);
}

.jt-jalon-card.criterion-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 24px;
    padding: 20px;
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    background: var(--db-surface);
    box-shadow: var(--db-shadow);
}

.jt-jalon-card.criterion-card.active {
    padding-left: 20px;
    border-left: 1px solid var(--db-border);
}

.jt-criterion-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--db-muted);
}

.jt-jalon-content {
    min-width: 0;
    flex: 1;
}

.jt-jalon-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.jt-jalon-title {
    margin: 0 0 14px;
    color: var(--db-text);
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.jt-jalon-card .overline {
    margin: 0 0 6px;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-size: 12px;
    font-weight: 900;
}

.criterion-text {
    margin: 0;
    color: rgba(255,253,246,0.82);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
}

.jt-empty-inline {
    color: var(--db-muted);
    font-weight: 600;
}

.jt-task-toolbar.task-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 24px 0;
    border-bottom: 1px solid var(--db-border);
}

.task-view-toggle.view-toggle {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    border: 0;
    background: transparent;
}

.task-view-btn.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: auto;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--db-muted);
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

.task-view-btn.view-toggle-btn:hover,
.task-view-btn.view-toggle-btn.active {
    background: transparent;
    color: var(--db-text);
    border-bottom-color: var(--db-text);
}

.task-view-icon.toggle-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid var(--db-border);
    border-radius: 5px;
    background: var(--db-surface-3);
    color: var(--db-muted);
}

.task-view-icon.toggle-icon.dark {
    background: var(--db-text);
    border-color: var(--db-text);
    color: var(--db-bg);
}

.jt-task-toolbar + .todo-add-row {
    padding-left: 64px;
}

.task-list-shell {
    overflow: hidden;
    border-top: 0;
}

.task-list-head {
    grid-template-columns: 40px minmax(0, 1fr) 160px 48px;
    padding: 12px 24px;
    font-size: 12px;
}

.task-list-item {
    grid-template-columns: 40px minmax(0, 1fr) 160px 48px;
    padding: 14px 24px;
    min-height: 52px;
}

.task-list-actions {
    width: 48px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .jt-tabs.milestone-tabs {
        padding: 0 16px;
        gap: 22px;
    }

    .jt-tab-title {
        max-width: 170px;
    }

    .jt-jalon-card.criterion-card {
        margin: 18px 16px;
        padding: 18px 16px;
    }

    .jt-jalon-header-row {
        flex-direction: column;
        gap: 8px;
    }

    .criterion-text {
        font-size: 15px;
    }

    .jt-task-toolbar.task-toolbar {
        margin: 0 16px;
    }

    .task-view-toggle.view-toggle {
        gap: 18px;
        overflow-x: auto;
    }

    .jt-task-toolbar + .todo-add-row {
        padding-left: 46px;
    }
}

/* ════════════════════════════════════════════════
   DASHBOARD V2 NAVBAR MATCH
   ════════════════════════════════════════════════ */

body {
    padding-top: 156px;
}

.dashboard-navbar.navbar {
    height: auto;
    min-height: 156px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(8,8,9,0.96);
    border-bottom: 1px solid var(--db-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dashboard-nav-top {
    height: 86px;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-project-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.nav-project-edit,
.nav-project-delete {
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--db-border-soft);
    border-radius: 7px;
    background: transparent;
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--mono);
    text-decoration: none;
    cursor: pointer;
}

.nav-project-edit {
    padding: 0 10px;
}

.nav-project-delete {
    width: 30px;
    padding: 0;
}

.nav-project-edit:hover {
    color: var(--db-text);
    border-color: rgba(255,253,246,0.20);
    background: rgba(255,253,246,0.035);
}

.nav-project-delete:hover {
    color: #FF3B30;
    border-color: rgba(255,59,48,0.28);
    background: rgba(255,59,48,0.08);
}

.dashboard-navbar .navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.dashboard-navbar .navbar-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    color: rgba(255,253,246,0.72);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.dashboard-navbar .navbar-sync-btn {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dashboard-navbar .navbar-link.cta {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--db-border);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,253,246,0.72);
    font-weight: 750;
}

.dashboard-navbar .navbar-link:hover,
.dashboard-navbar .navbar-link.cta:hover {
    color: var(--db-text);
    border-color: rgba(255,253,246,0.22);
    background: rgba(255,253,246,0.035);
    transform: none;
}

.dashboard-navbar .db-nav-dropdown {
    display: flex;
    position: relative;
    min-width: 0;
}

.dashboard-navbar .db-nav-trigger {
    min-width: 0;
    max-width: min(48vw, 420px);
    height: 38px;
    padding: 0 10px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: rgba(255,253,246,0.78);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.03em;
    font-family: var(--mono);
}

.dashboard-navbar .db-nav-trigger:hover {
    background: transparent;
    color: var(--db-text);
}

.dashboard-navbar .db-nav-trigger #dbNavLabel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-nav-initial {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 6px;
    background: var(--db-text);
    color: var(--db-bg);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.dashboard-navbar .db-nav-list {
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    padding: 6px;
    border: 1px solid var(--db-border);
    border-radius: 10px;
    background: var(--db-surface);
    box-shadow: 0 18px 44px rgba(0,0,0,0.48);
}

.dashboard-navbar .db-nav-item {
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--db-muted);
    font-size: 13px;
    font-weight: 650;
    font-family: var(--mono);
    text-align: left;
}

.dashboard-navbar .db-nav-item:hover { color: var(--db-text); background: transparent; }
.dashboard-navbar .db-nav-item.active { color: var(--db-text); background: transparent; }

.db-nav-list li {
    border-radius: 7px;
    transition: background 0.15s;
    padding-right: 4px;
}
.db-nav-list li:hover { background: var(--db-surface-3); }

.db-nav-item-delete {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--db-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.db-nav-list li:hover .db-nav-item-delete { opacity: 1; }
.db-nav-item-delete:hover { color: #FF3B30; background: rgba(255,59,48,0.10); }

.dashboard-nav-tabs.db-main-tabs {
    height: 70px;
    padding: 0 48px;
    gap: 58px;
    border-top: 0;
    border-bottom: 0;
}

.dashboard-nav-tabs .db-main-tab {
    height: 70px;
    gap: 12px;
    color: var(--db-muted);
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.dashboard-nav-tabs .db-main-tab.active {
    color: var(--db-text);
    border-bottom-color: var(--db-text);
}

.dashboard-nav-tabs .db-main-tab-icon {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: currentColor;
}

.dashboard-nav-tabs .db-main-tab.active .db-main-tab-icon {
    border: 0;
    background: transparent;
    color: var(--db-text);
}

.proj-header {
    padding: 0 0 16px;
    justify-content: flex-end;
    border-bottom: 0;
}

.proj-header-left {
    display: none;
}

.proj-body {
    padding-top: 0;
}

.proj-badges {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-top: 132px;
    }

    .dashboard-navbar.navbar {
        min-height: 132px;
    }

    .dashboard-nav-top {
        height: 72px;
        padding: 0 18px;
        gap: 14px;
    }

    .dashboard-navbar .navbar-links {
        gap: 10px;
    }

    .dashboard-navbar .navbar-link {
        font-size: 12px;
    }

    .dashboard-navbar .navbar-link.cta {
        height: 36px;
        padding: 0 12px;
    }

    .dashboard-navbar .db-nav-trigger {
        max-width: 52vw;
        font-size: 14px;
    }

    .dashboard-nav-tabs.db-main-tabs {
        height: 60px;
        padding: 0 18px;
        gap: 28px;
    }

    .dashboard-nav-tabs .db-main-tab {
        height: 60px;
        font-size: 14px;
    }

    .proj-header {
        padding: 0 16px 12px;
    }
}

/* ════════════════════════════════════════════════
   DASHBOARD DENSITY FIX — compact real dashboard
   ════════════════════════════════════════════════ */

body {
    padding-top: 136px;
}

.dashboard-navbar.navbar {
    min-height: 136px;
}

.dashboard-nav-top {
    height: 76px;
    padding: 0 44px;
}

.dashboard-nav-tabs.db-main-tabs {
    height: 60px;
    padding: 0 44px;
    gap: 44px;
}

.dashboard-nav-tabs .db-main-tab {
    height: 60px;
    font-size: 14px;
    gap: 10px;
}

.dashboard-nav-tabs .db-main-tab-icon {
    width: 20px;
    height: 20px;
}

.dashboard-navbar .db-nav-trigger {
    height: 34px;
    font-size: 14px;
}

.db-nav-initial {
    width: 22px;
    height: 22px;
    font-size: 12px;
}

.dashboard-navbar .navbar-link {
    font-size: 13px;
}

.dashboard-navbar .navbar-link.cta {
    height: 36px;
    padding: 0 15px;
}

.dashboard-section,
.dashboard-section.active {
    padding: 22px 44px 64px !important;
}

.dashboard-container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.proj-header {
    padding: 0 0 12px;
}

.proj-actions {
    gap: 8px;
}

.proj-edit-link {
    padding: 6px 10px;
    font-size: 11px;
}

.proj-btn-icon {
    width: 32px;
    height: 32px;
}

.proj-body {
    padding: 0;
}

.db-view {
    gap: 28px;
}

.db-section {
    gap: 12px;
}

.db-section-label,
.section-lbl,
.kpi-panel-label,
.smart-title {
    font-size: 10px !important;
    letter-spacing: 0.12em;
}

.jt-tabs.milestone-tabs {
    height: 50px;
    padding: 0 22px;
    gap: 34px;
}

.jt-tab.milestone-tab {
    height: 50px;
    gap: 7px;
    font-size: 13px;
}

.jt-tab-title {
    max-width: 260px;
    font-size: 13px;
}

.jt-tab-rank {
    font-size: 11px;
}

.milestone-count {
    padding: 1px 6px;
    font-size: 11px;
}

.jt-jalon-card.criterion-card {
    margin: 20px 22px;
    padding: 18px 20px;
    gap: 14px;
}

.jt-criterion-icon {
    width: 18px;
    height: 18px;
}

.jt-jalon-header-row {
    margin-bottom: 8px;
}

.jt-jalon-label,
.jl-detail-num,
.jt-jalon-date {
    font-size: 10px;
}

.jl-detail-status {
    padding: 3px 7px;
    font-size: 9px;
}

.jt-jalon-title {
    margin-bottom: 12px;
    font-size: clamp(18px, 1.35vw, 22px);
    line-height: 1.12;
}

.jt-jalon-card .overline {
    margin-bottom: 5px;
    font-size: 10px;
}

.criterion-text {
    font-size: 14px;
    line-height: 1.42;
}

.jt-task-toolbar.task-toolbar {
    margin: 0 22px;
}

.task-view-toggle.view-toggle {
    gap: 22px;
}

.task-view-btn.view-toggle-btn {
    padding-bottom: 10px;
    font-size: 13px;
}

.task-view-icon.toggle-icon {
    width: 18px;
    height: 18px;
}

.todo-add-row,
.jt-task-toolbar + .todo-add-row {
    padding: 11px 22px 11px 54px;
}

.todo-add-input,
.todo-add-input::placeholder {
    font-size: 13px;
}

.task-list-head {
    padding: 10px 22px;
    font-size: 10px;
}

.todo-section-lbl,
.todo-done-footer {
    padding: 10px 22px;
    font-size: 11px;
}

.task-list-item {
    min-height: 48px;
    padding: 11px 22px;
}

.task-list-check {
    width: 16px;
    height: 16px;
}

.task-list-main .todo-text {
    font-size: 13px;
}

.task-list-status {
    height: 26px;
    padding: 0 9px;
    font-size: 11px;
}

.kanban-board {
    padding: 14px 18px 18px;
    gap: 14px;
}

.kanban-column {
    border-radius: 8px;
}

.kanban-column-head {
    min-height: 42px;
    padding: 0 14px;
}

.kanban-column-title,
.kanban-count {
    font-size: 10px;
}

.kanban-column-body {
    padding: 12px;
    gap: 10px;
}

.kanban-card {
    padding: 12px;
    border-radius: 7px;
}

.kanban-card-title {
    font-size: 13px;
    line-height: 1.35;
}

.kanban-empty {
    min-height: 96px;
    font-size: 12px;
}

.kpi-panel,
.smart-panel,
.jalons-panel {
    padding: 22px;
}

.jl-pilot-card {
    padding: 20px;
}

.jl-pilot-title {
    font-size: 19px;
}

.jl-kpi-block {
    padding: 14px;
}

.jl-kpi-current {
    font-size: 22px;
}

@media (max-width: 768px) {
    body {
        padding-top: 122px;
    }

    .dashboard-navbar.navbar {
        min-height: 122px;
    }

    .dashboard-nav-top {
        height: 66px;
        padding: 0 16px;
    }

    .dashboard-project-actions {
        display: none;
    }

    .dashboard-nav-tabs.db-main-tabs {
        height: 56px;
        padding: 0 16px;
        gap: 24px;
    }

    .dashboard-section,
    .dashboard-section.active {
        padding: 16px 0 48px !important;
    }

    .jt-tabs.milestone-tabs {
        height: 48px;
        padding: 0 14px;
        gap: 20px;
    }

    .jt-tab-title {
        max-width: 150px;
    }

    .jt-jalon-card.criterion-card {
        margin: 16px 14px;
        padding: 16px 14px;
    }

    .todo-add-row,
    .jt-task-toolbar + .todo-add-row {
        padding: 10px 14px 10px 42px;
    }
}

/* ════════════════════════════════════════════════
   UX FIX — milestone tabs and task row alignment
   ════════════════════════════════════════════════ */

.milestone-dot,
.milestone-count {
    display: none !important;
}

.jt-tabs.milestone-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    justify-content: stretch;
}

.jt-tab.milestone-tab {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 0 18px;
    text-align: left;
}

.jt-tab.milestone-tab:first-child {
    justify-content: flex-start;
}

.jt-tab.milestone-tab:last-child {
    justify-content: flex-start;
}

.milestone-tab-main {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
}

.jt-tab.milestone-tab:first-child .milestone-tab-main {
    justify-content: flex-start;
}

.jt-tab.milestone-tab:last-child .milestone-tab-main {
    justify-content: flex-start;
}

.jt-tab-title {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,253,246,0.54);
}

.jt-tab.milestone-tab.active .jt-tab-title {
    color: var(--db-text);
}

.jt-tab.milestone-tab.completed .jt-tab-title {
    color: rgba(255,253,246,0.34);
}

.jt-tab-rank {
    flex: 0 0 auto;
    min-width: 22px;
    color: rgba(255,253,246,0.38);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.jt-tab.milestone-tab.active .jt-tab-rank {
    color: var(--db-accent);
}

.jt-tab.milestone-tab.completed .jt-tab-rank {
    color: rgba(255,253,246,0.26);
}

.task-list-head,
.task-list-item {
    grid-template-columns: 40px minmax(0, 1fr) 142px 44px;
}

.task-list-head {
    align-items: center;
}

.task-list-item {
    align-items: center;
}

.task-list-check {
    align-self: center;
    justify-self: start;
    margin: 0;
}

.task-list-main {
    align-self: center;
    justify-content: center;
    min-height: 28px;
    gap: 3px;
}

.task-list-main .todo-text {
    line-height: 1.25;
}

.task-list-meta {
    line-height: 1;
}

.task-list-status {
    align-self: center;
    justify-self: start;
    margin: 0;
}

.task-list-actions {
    align-self: center;
    justify-self: end;
    margin: 0;
}

.todo-section-lbl,
.todo-done-footer {
    min-height: 42px;
}

@media (max-width: 768px) {
    .jt-tabs.milestone-tabs {
        display: flex;
        justify-content: flex-start;
        gap: 24px;
    }

    .jt-tab.milestone-tab,
    .jt-tab.milestone-tab:first-child,
    .jt-tab.milestone-tab:last-child {
        flex: 0 0 auto;
        justify-content: flex-start;
        padding: 0;
    }

    .milestone-tab-main,
    .jt-tab.milestone-tab:first-child .milestone-tab-main,
    .jt-tab.milestone-tab:last-child .milestone-tab-main {
        justify-content: flex-start;
        width: auto;
    }

    .jt-tab-title {
        max-width: 180px;
    }

    .task-list-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }
}

/* ════════════════════════════════════════════════
   UX FIX 2 — clearer milestone tabs and task table rhythm
   ════════════════════════════════════════════════ */

.jt-tabs.milestone-tabs {
    grid-auto-columns: minmax(0, 1fr);
    gap: 10px;
    height: 56px;
    padding: 8px 18px 0;
    align-items: stretch;
}

.jt-tab.milestone-tab {
    height: 48px;
    padding: 0 12px;
    align-items: center;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    background: transparent;
}

.jt-tab.milestone-tab:hover {
    background: rgba(255,253,246,0.025);
    border-color: var(--db-border-soft);
}

.jt-tab.milestone-tab.active {
    background: rgba(255,253,246,0.035);
    border-color: var(--db-border-soft);
    border-bottom-color: var(--db-text);
}

.milestone-tab-main {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.jt-tab-rank {
    min-width: 0;
    text-align: right;
    line-height: 1;
}

.jt-tab-title {
    line-height: 1;
}

.jt-task-toolbar.task-toolbar {
    min-height: 48px;
    align-items: flex-end;
    margin: 0 22px;
}

.task-view-btn.view-toggle-btn {
    height: 38px;
    align-items: center;
    line-height: 1;
}

.todo-add-row,
.jt-task-toolbar + .todo-add-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 142px 44px;
    align-items: center;
    gap: 0;
    min-height: 44px;
    padding: 0 22px;
}

.todo-add-icon {
    justify-self: start;
    margin: 0;
}

.todo-add-input {
    height: 44px;
    line-height: 44px;
}

.task-list-head {
    grid-template-columns: 40px minmax(0, 1fr) 142px 44px;
    min-height: 44px;
    padding: 0 22px;
}

.task-list-head span:nth-child(2),
.task-list-head span:nth-child(3) {
    align-self: center;
}

.todo-section-lbl,
.todo-done-footer {
    min-height: 40px;
    padding: 0 22px;
}

.task-list-item {
    grid-template-columns: 40px minmax(0, 1fr) 142px 44px;
    min-height: 50px;
    padding: 0 22px;
}

.task-list-main {
    min-height: 34px;
}

.task-list-status {
    justify-self: start;
}

@media (max-width: 768px) {
    .jt-tabs.milestone-tabs {
        display: flex;
        height: 54px;
        padding: 8px 14px 0;
        gap: 10px;
    }

    .jt-tab.milestone-tab {
        width: auto;
        min-width: 138px;
        flex: 0 0 auto;
    }

    .todo-add-row,
    .jt-task-toolbar + .todo-add-row {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 0 14px;
    }

    .task-list-head {
        display: none;
    }

    .task-list-item {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 10px 14px;
    }
}

/* ════════════════════════════════════════════════
   V2 MOCKUP RESTORE — simple execution UI
   ════════════════════════════════════════════════ */

.db-view {
    gap: 0;
}

.db-section {
    gap: 0;
}

.db-section-header {
    margin: 0 0 24px;
}

.db-section-label {
    font-size: 12px !important;
    letter-spacing: 0.10em;
}

.jt-section {
    display: block;
}

.jt-section > .milestone-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    height: auto;
    padding: 0 0 14px;
    margin: 0 0 24px;
    border: 0;
    border-bottom: 1px solid var(--db-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.jt-section > .milestone-tabs::-webkit-scrollbar {
    display: none;
}

.jt-section .milestone-tab {
    width: auto;
    min-width: auto;
    height: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--db-muted);
    white-space: nowrap;
    font-size: 15px;
    font-weight: 650;
    text-align: left;
}

.jt-section .milestone-tab.is-compact {
    gap: 6px;
    font-size: 0;
    padding: 2px 2px;
}

.jt-section .milestone-tab.is-compact .milestone-count {
    display: none !important;
}

.jt-section .milestone-tab.is-compact .milestone-dot {
    width: 6px;
    height: 6px;
    background: rgba(84, 189, 181, 0.45);
    box-shadow: 0 0 0 2px rgba(84, 189, 181, 0.12);
}

.jt-section .milestone-tab.is-compact:hover .milestone-dot,
.jt-section .milestone-tab.is-compact.active .milestone-dot {
    background: var(--db-confirm);
}

.jt-section .milestone-compact-hint {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(84, 189, 181, 0.16);
    background: rgba(84, 189, 181, 0.06);
    color: rgba(255,255,255,0.38);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.03em;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, max-width 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.jt-section .milestone-tab.is-compact:hover .milestone-compact-hint,
.jt-section .milestone-tab.is-compact:focus-visible .milestone-compact-hint,
.jt-section .milestone-tab.is-compact.active .milestone-compact-hint {
    opacity: 1;
    max-width: 280px;
}

.jt-section .milestone-tab:hover,
.jt-section .milestone-tab.active {
    background: transparent;
    color: var(--db-text);
}

.jt-section .milestone-dot {
    width: 8px;
    height: 8px;
    display: inline-block !important;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--db-muted);
}

.jt-section .milestone-dot.active {
    background: var(--db-accent);
}

.jt-section .milestone-dot.complete {
    background: var(--db-confirm);
}

.jt-section .milestone-count {
    display: inline-flex !important;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--db-surface-3);
    border: 0;
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 700;
}

.jt-section .milestone-count.muted {
    background: transparent;
    border: 1px solid var(--db-border);
    color: var(--db-muted);
}

.criterion-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    margin: 0 0 24px;
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    background: var(--db-surface);
    box-shadow: var(--db-shadow);
}

.criterion-card .icon-lg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--db-muted);
}

.overline {
    margin: 0 0 6px;
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-size: 12px;
    font-weight: 850;
}

.criterion-text {
    margin: 0;
    color: var(--db-text);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
}

.task-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 24px;
    min-height: auto;
    margin: 0 0 6px;
    border-bottom: none;
}

.view-toggle,
.task-view-toggle.view-toggle {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    border: 0;
    background: transparent;
}

.view-toggle-btn,
.task-view-btn.view-toggle-btn {
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--db-muted);
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
}

.view-toggle-btn.active,
.task-view-btn.view-toggle-btn.active {
    color: var(--db-text);
    border-bottom-color: var(--db-text);
}

.toggle-icon,
.task-view-icon.toggle-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    border: 1px solid var(--db-border);
    background: var(--db-surface-3);
    color: var(--db-muted);
}

.toggle-icon.dark,
.task-view-icon.toggle-icon.dark {
    background: var(--db-text);
    border-color: var(--db-text);
    color: var(--db-bg);
}

.task-table {
    --tl-space-1: 4px;
    --tl-space-2: 8px;
    --tl-space-3: 12px;
    --tl-space-4: 16px;
    --tl-space-6: 24px;
    --tl-space-8: 32px;
    --tl-row-h: 36px;
    --tl-radius-sm: 4px;
    --tl-radius-md: 8px;
    --tl-line: rgba(255,253,246,0.08);
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.task-grid {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 144px 120px 32px;
    align-items: center;
}

.task-header {
    min-height: auto;
    padding: 0 0 var(--tl-space-2);
    background: transparent;
    border-bottom: 1px solid var(--tl-line);
    color: var(--db-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 500;
}

.task-header > div:first-child,
.task-header > div:last-child {
    min-width: 0;
}

.task-group {
    width: 100%;
    min-height: auto;
    display: flex;
    align-items: center;
    gap: var(--tl-space-2);
    /* Reduce vertical crater above list groups. */
    padding: 12px 0 var(--tl-space-2);
    border: 0;
    border-bottom: 0;
    background: transparent;
    color: var(--db-text);
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 700;
}

.task-group.doing {
    color: var(--db-accent);
}

.task-group.doing::before,
.task-group.todo::before,
.task-group.done::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: var(--tl-space-1);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid rgba(255,253,246,0.42);
    transform: rotate(90deg);
    transition: transform 150ms ease;
}

.task-group.collapsed::before {
    transform: rotate(0deg);
}

.task-group span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: var(--tl-space-1) var(--tl-space-2);
    border-radius: var(--tl-radius-sm);
    background: rgba(255,253,246,0.08);
    color: rgba(255,253,246,0.82);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}

.task-group.doing span {
    background: rgba(238,68,8,0.18);
    color: #ff7948;
}

.task-group.todo {
    color: rgba(255,253,246,0.68);
}

.task-group.todo span {
    background: rgba(255,253,246,0.075);
    color: rgba(255,253,246,0.72);
}

.task-group.done {
    margin-top: 8px;
    background: transparent;
    border-top: 0;
    border-bottom: 0;
    color: #54bdb5;
}

.task-group.done span {
    background: rgba(20,184,166,0.18);
    color: #7ddbd4;
}

.task-group strong {
    color: rgba(255,253,246,0.48);
    font-size: 12px;
    font-weight: 650;
}

.task-list-dropzone {
    min-height: var(--tl-row-h);
    padding-bottom: 10px;
    transition: background 120ms ease, box-shadow 120ms ease;
}

.task-list-dropzone.drag-over,
.task-group.drag-over {
    background: rgba(255,253,246,0.03);
    box-shadow: inset 2px 0 0 rgba(255,253,246,0.15);
}

.milestone-tab.drag-over {
    border-color: rgba(238,68,8,0.45);
    box-shadow: 0 0 0 3px rgba(238,68,8,0.10);
}

.msb-milestone.drag-over .msb-dot {
    box-shadow: 0 0 0 3px rgba(238,68,8,0.28), 0 0 18px rgba(238,68,8,0.16);
}


.task-list-empty {
    display: flex;
    align-items: center;
    min-height: var(--tl-row-h);
    padding: 0 0 0 72px;
    border-bottom: 1px solid var(--tl-line);
    color: var(--db-muted);
    font-size: 13px;
    font-style: italic;
}

.task-row {
    position: relative;
    min-height: var(--tl-row-h);
    padding: 0;
    border-bottom: 1px solid var(--tl-line);
    background: transparent;
    transition: background 100ms ease, box-shadow 100ms ease;
}

.task-row:hover {
    background: rgba(255,253,246,0.025);
}

.task-row.dragging {
    opacity: 0.45;
}

.task-row.completed .task-name {
    color: var(--db-muted);
    text-decoration: line-through;
}

.task-check-cell {
    display: flex;
    align-items: center;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    border: 1.5px solid rgba(255,253,246,0.2);
    border-radius: 4px;
    background: #111112;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, border-color 150ms ease;
}

.custom-checkbox:hover {
    border-color: rgba(255,253,246,0.38);
}

.custom-checkbox.done,
.task-row.done .custom-checkbox {
    background: #EE4408;
    border-color: #EE4408;
}

.custom-checkbox.done::after,
.task-row.done .custom-checkbox::after {
    content: '✓';
    font-size: 10px;
    font-weight: 700;
    color: #FFFDF6;
    line-height: 1;
}

.task-name {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding-right: var(--tl-space-4);
    color: rgba(255,253,246,0.82);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
}

.task-name.strong {
    color: var(--db-text);
    font-weight: 600;
}

.task-meta {
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 600;
}

.task-sub-count {
    flex-shrink: 0;
    color: rgba(255,253,246,0.30);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 24px;
    padding: 0 var(--tl-space-2);
    border: 1px solid rgba(255,253,246,0.10);
    border-radius: var(--tl-radius-sm);
    background: rgba(255,253,246,0.04);
    color: rgba(255,253,246,0.55);
    font-size: 11px;
    font-weight: 650;
}

.status-pill.dark {
    border-color: rgba(238,68,8,0.26);
    background: rgba(238,68,8,0.12);
    color: #ff7948;
}

.due-date {
    display: inline-flex;
    align-items: center;
    gap: var(--tl-space-2);
    border: 0;
    background: transparent;
    color: rgba(255,253,246,0.46);
    font-size: 12px;
    font-weight: 500;
}

.due-date.muted {
    color: var(--db-subtle);
}

.row-action {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    justify-self: end;
    border: 0;
    border-radius: var(--tl-radius-sm);
    background: transparent;
    color: var(--db-muted);
    opacity: 0;
}

.task-row:hover .row-action {
    opacity: 1;
}

.add-task-row,
.jt-task-toolbar + .todo-add-row {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    margin: 0;
    cursor: text;
}

.add-task-row .icon {
    justify-self: center;
    color: rgba(255,253,246,0.28);
}

.add-task-row input::placeholder {
    color: rgba(255,253,246,0.28);
    font-style: normal;
}

.add-task-row:hover {
    background: rgba(255,253,246,0.02);
}

.add-task-row:hover .icon,
.add-task-row:focus-within .icon {
    color: rgba(255,253,246,0.55);
}

.add-task-row:hover input::placeholder,
.add-task-row:focus-within input::placeholder {
    color: rgba(255,253,246,0.55);
}

.add-task-row input {
    width: 100%;
    height: var(--tl-row-h);
    border: 0;
    outline: 0;
    background: transparent;
    color: rgba(255,253,246,0.78);
    font-size: 14px;
}

.add-task-row input::placeholder {
    color: rgba(255,253,246,0.52);
}

.board-view,
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
}

.kanban-shell {
    display: block;
}

/* Match dashboardV2 execution content scale: centered 1120px shell, not full viewport. */
.db-view-execution {
    width: min(1120px, calc(100vw - 80px));
    max-width: 1120px;
    margin: 0 auto;
}

.db-view-execution .db-section,
.db-view-execution .jt-section,
.db-view-execution .task-table {
    width: 100%;
}

@media (max-width: 768px) {
    .db-view-execution {
        width: min(100% - 32px, 1120px);
    }

    .jt-section > .milestone-tabs {
        gap: 22px;
    }

    .task-grid,
    .task-header,
    .task-row {
        grid-template-columns: 20px 34px 20px minmax(0, 1fr) 28px 28px;
    }

    .task-header > div:nth-child(3),
    .task-header > div:nth-child(4),
    .task-header > div:nth-child(5),
    .task-row > div:nth-child(3),
    .task-row > .due-date,
    .task-row > .row-action {
        display: none;
    }

    .task-table {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }
}

/* ════════════════════════════════════════════════
   TASK DETAIL MODAL — V2 colors, no side drawer
   ════════════════════════════════════════════════ */

body.panel-open {
    overflow: hidden;
}

.side-panel-overlay {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(8,8,9,0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
    transition: opacity 160ms ease;
}

.side-panel-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.side-panel,
.task-modal {
    position: relative;
    inset: auto;
    width: min(720px, calc(100vw - 48px));
    max-width: min(720px, calc(100vw - 48px));
    height: auto;
    max-height: min(760px, calc(100vh - 64px));
    padding: 28px;
    overflow: auto;
    border: 1px solid var(--db-border);
    border-radius: 14px;
    background: var(--db-surface);
    box-shadow: 0 28px 90px rgba(0,0,0,0.62);
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    pointer-events: auto;
    transition: transform 180ms ease, opacity 180ms ease;
}

.side-panel-overlay.open .side-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.side-panel-back {
    display: none;
}

.side-panel-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--db-border-soft);
    border-radius: 8px;
    background: var(--db-surface-2);
    color: var(--db-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.side-panel-close:hover {
    background: var(--db-surface-3);
    color: var(--db-text);
}

#taskPanelBody {
    padding: 0;
}

.cp-status-row {
    margin: 0 0 16px;
}

.cp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid var(--db-border);
    border-radius: 7px;
    background: var(--db-surface-2);
    color: var(--db-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--mono);
    cursor: pointer;
}

.cp-status-badge.doing {
    color: var(--db-accent);
    background: rgba(238,68,8,0.10);
    border-color: rgba(238,68,8,0.34);
}

.cp-status-badge.done {
    color: var(--db-confirm);
    background: rgba(142,165,196,0.10);
    border-color: rgba(142,165,196,0.30);
}

.cp-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: currentColor;
}

.cp-task-title {
    margin: 0 46px 22px 0;
    color: var(--db-text);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 820;
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-family: var(--mono);
}

.cp-fields {
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--db-border);
    border-radius: 10px;
    background: var(--db-surface);
}

.cp-field-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--db-border-soft);
}

.cp-field-row:last-child {
    border-bottom: 0;
}

.cp-field-key {
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-family: var(--mono);
}

.cp-field-val,
.cp-field-jalon {
    color: rgba(255,253,246,0.78);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    font-family: var(--mono);
}

.cp-field-date {
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 650;
}

.cp-notes-textarea {
    width: 100%;
    min-height: 76px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: rgba(255,253,246,0.78);
    font-size: 13px;
    line-height: 1.55;
    font-family: var(--mono);
}

.cp-notes-textarea::placeholder {
    color: var(--db-muted);
    font-style: italic;
}

.cp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px;
}

.cp-section-title {
    color: var(--db-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    font-weight: 850;
    font-family: var(--mono);
}

.cp-section-count {
    color: var(--db-muted);
    font-size: 12px;
    font-weight: 650;
    font-family: var(--mono);
}

.subtasks {
    margin: 0 0 0 38px;
    padding: 0;
    border-left: 1px solid rgba(255,253,246,0.07);
}

.subtask-item,
.subtask-add-row {
    min-height: 34px;
    display: grid;
    grid-template-columns: 16px 20px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--db-border-soft);
}

.subtask-item:first-child {
    border-top: 0;
}

.subtask-icon-btn,
.subtask-add-icon {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--db-muted);
}

.subtask-text {
    color: rgba(255,253,246,0.82);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.subtask-item.done .subtask-text {
    color: var(--db-muted);
    text-decoration: line-through;
}

.subtask-del {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--db-muted);
    opacity: 0;
    cursor: pointer;
}

.subtask-item:hover .subtask-del {
    opacity: 1;
}

.subtask-del:hover {
    background: rgba(255,59,48,0.10);
    color: #FF3B30;
}

.subtask-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--db-text);
    font-size: 14px;
    font-family: var(--mono);
}

.subtask-input::placeholder {
    color: var(--db-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .side-panel-overlay {
        padding: 12px;
        align-items: end;
    }

    .side-panel,
    .task-modal {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        padding: 22px 18px;
        border-radius: 14px 14px 0 0;
        transform: translateY(18px);
    }

    .side-panel-overlay.open .side-panel {
        transform: translateY(0);
    }

    .cp-field-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* ════════════════════════════════════════════════
   TASK DETAIL DRAWER — black V2 palette
   ════════════════════════════════════════════════ */

.side-panel-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    display: block;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
    transition: opacity 160ms ease;
}

.side-panel-overlay.open {
    opacity: 1;
    pointer-events: none;
}

.side-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 42vw);
    max-width: min(560px, 100vw);
    height: 100vh;
    max-height: none;
    padding: 28px 24px 40px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
    border-left: 1px solid var(--db-border);
    border-radius: 0;
    background: var(--db-bg);
    box-shadow: -24px 0 60px rgba(0,0,0,0.58);
    transform: translateX(100%);
    opacity: 1;
    pointer-events: auto;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.side-panel-overlay.open .side-panel {
    transform: translateX(0);
    opacity: 1;
}

.side-panel-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--db-border-soft);
    border-radius: 8px;
    background: var(--db-surface);
    color: var(--db-muted);
    font-size: 20px;
}

.side-panel-close:hover {
    background: var(--db-surface-2);
    color: var(--db-text);
}

.side-panel-back {
    display: none;
}

#taskPanelBody {
    padding: 0;
}

.cp-fields {
    background: var(--db-surface);
}

.cp-field-row,
.subtask-item,
.subtask-add-row {
    border-color: var(--db-border-soft);
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .side-panel-overlay {
        width: 100vw;
        max-width: 100vw;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--db-bg);
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
    }

    .side-panel-overlay.open {
        opacity: 1;
        pointer-events: none;
    }

    .side-panel-overlay.open .side-panel {
        pointer-events: auto;
        transform: translateY(0);
    }

    .side-panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: none;
        padding: 0 0 env(safe-area-inset-bottom, 40px);
        border-left: 0;
        border-radius: 0;
        background: var(--db-bg);
        box-shadow: none;
        transform: translateY(100%);
    }

    .side-panel-back {
        display: flex;
        align-items: center;
        gap: 6px;
        position: sticky;
        top: 0;
        z-index: 10;
        width: 100%;
        padding: 16px 20px;
        border: 0;
        border-bottom: 1px solid var(--db-border-soft);
        background: var(--db-bg);
        color: var(--db-muted);
        font-size: 14px;
        font-weight: 650;
        cursor: pointer;
    }

    .side-panel-close {
        display: none;
    }

    #taskPanelBody {
        padding: 20px 20px 40px;
    }
}

/* FINAL OVERRIDE — task contrast and drawer title weight. Keep this at file end. */
.task-table {
    background:
        linear-gradient(180deg, rgba(255,253,246,0.042), rgba(255,253,246,0.026));
    border: 1px solid rgba(255,253,246,0.095);
    border-radius: 8px;
    padding: 16px 24px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,253,246,0.035);
}

.task-header {
    color: rgba(255,253,246,0.58);
    border-bottom-color: rgba(255,253,246,0.12);
}

.task-row {
    border-bottom-color: rgba(255,253,246,0.11);
}

.task-row:hover {
    background: rgba(255,253,246,0.04);
}

.task-list-dropzone {
    background: transparent;
}

.task-list-empty,
.add-task-row input::placeholder {
    color: rgba(255,253,246,0.56);
}

.task-name {
    color: rgba(255,253,246,0.88);
}

.task-name.strong {
    color: rgba(255,253,246,0.96);
    font-weight: 600;
}

.task-group strong {
    color: rgba(255,253,246,0.62);
}

.task-group.done {
    margin-top: 16px;
}

.custom-checkbox {
    border-color: rgba(255,253,246,0.34);
}

.status-pill {
    color: rgba(255,253,246,0.68);
    border-color: rgba(255,253,246,0.14);
    background: rgba(255,253,246,0.055);
}

.status-pill.dark {
    color: #ff865a;
    border-color: rgba(238,68,8,0.38);
    background: rgba(238,68,8,0.16);
}

.due-date {
    color: rgba(255,253,246,0.58);
}

.due-date.muted {
    color: rgba(255,253,246,0.40);
}

.add-task-row {
    background: transparent;
}

.add-task-row:hover {
    background: rgba(255,253,246,0.025);
}

.cp-task-title {
    margin: 0 52px 24px 0;
    max-width: 18ch;
    color: rgba(255,253,246,0.96);
    font-family: var(--mono);
    font-size: clamp(24px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

/* FINAL OVERRIDE — dashboardV2 milestone tabs style. */
.jt-section > .milestone-tabs {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
    height: auto;
    padding: 0 0 14px;
    margin: 0 0 24px;
    border: 0;
    border-bottom: 1px solid rgba(255,253,246,0.12);
    overflow-x: auto;
    scrollbar-width: none;
}

.jt-section > .milestone-tabs::-webkit-scrollbar {
    display: none;
}

.jt-section .milestone-tab {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255,253,246,0.52);
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.jt-section .milestone-tab:hover,
.jt-section .milestone-tab.active {
    background: transparent !important;
    color: rgba(255,253,246,0.96);
}

.jt-section .milestone-dot {
    display: inline-block !important;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255,253,246,0.52);
}

.jt-section .milestone-dot.active {
    background: var(--db-accent);
}

.jt-section .milestone-dot.complete {
    background: #8ea5c4;
}

.jt-section .milestone-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 2px 6px;
    border: 0;
    border-radius: 4px;
    background: rgba(255,253,246,0.08);
    color: rgba(255,253,246,0.62);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.jt-section .milestone-count.muted {
    background: transparent;
    border: 1px solid rgba(255,253,246,0.14);
    color: rgba(255,253,246,0.50);
}

/* FINAL OVERRIDE — clearer task table hierarchy. */
.task-header {
    min-height: 32px;
    padding: 0 0 8px;
    color: rgba(255,253,246,0.66);
    font-size: 12px;
    font-weight: 650;
}

.task-header div:nth-child(2),
.task-header div:nth-child(3),
.task-header div:nth-child(4) {
    display: inline-flex;
    align-items: center;
}

.task-header div:nth-child(2)::before,
.task-header div:nth-child(3)::before,
.task-header div:nth-child(4)::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(255,253,246,0.28);
}

.task-group {
    padding-top: 20px;
    color: rgba(255,253,246,0.74);
}

.task-group.doing span {
    background: rgba(238,68,8,0.24);
    color: #ff9a73;
    box-shadow: inset 0 0 0 1px rgba(238,68,8,0.18);
}

.task-group.doing strong {
    color: rgba(255,154,115,0.76);
}

/* FINAL OVERRIDE — lighter milestone tab typography. */
.jt-section .milestone-tab {
    color: rgba(255,253,246,0.44);
    font-size: 15px;
    font-weight: 500;
}

.jt-section .milestone-tab.active {
    color: rgba(255,253,246,0.92);
    font-weight: 600;
}

.jt-section .milestone-count {
    background: rgba(255,253,246,0.065);
    color: rgba(255,253,246,0.54);
    font-size: 11px;
    font-weight: 650;
}

.jt-section .milestone-count.muted {
    color: rgba(255,253,246,0.42);
    border-color: rgba(255,253,246,0.12);
}

/* FINAL OVERRIDE — pixel pass for the Apple/Google presentation deck. */
:root {
    --db-bg: #0d0d0f;
    --db-surface: #121316;
    --db-surface-2: #15171b;
    --db-surface-3: #191b20;
    --db-border: rgba(255,253,246,0.105);
    --db-border-soft: rgba(255,253,246,0.072);
    --db-muted: rgba(255,253,246,0.52);
    --db-subtle: rgba(255,253,246,0.36);
}

body {
    background: var(--db-bg);
}

.dashboard-section,
.dashboard-section.active {
    padding-top: 18px !important;
}

.proj-body {
    padding-top: 18px;
    gap: 18px;
}

.db-view-execution {
    width: min(1120px, calc(100vw - 96px));
}

.db-section-header {
    margin-bottom: 22px;
}

.db-section-label {
    color: rgba(255,253,246,0.50);
    font-size: 11px !important;
    font-weight: 720;
}

.jt-section > .milestone-tabs {
    gap: 30px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom-color: rgba(255,253,246,0.12);
}

.jt-section .milestone-tab {
    gap: 8px;
    color: rgba(255,253,246,0.43);
    font-size: 15px;
    font-weight: 520;
}

.jt-section .milestone-tab.active {
    color: rgba(255,253,246,0.90);
    font-weight: 600;
}

.jt-section .milestone-count {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,253,246,0.075);
    color: rgba(255,253,246,0.56);
    font-size: 11px;
    font-weight: 640;
}

.jt-section .milestone-count.muted {
    background: transparent;
    border-color: rgba(255,253,246,0.12);
}

.criterion-card {
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-color: rgba(255,253,246,0.10);
    border-radius: 8px;
    background: rgba(255,253,246,0.028);
    box-shadow: inset 0 1px 0 rgba(255,253,246,0.025);
}

.criterion-card .icon-lg {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.overline {
    margin-bottom: 6px;
    color: rgba(255,253,246,0.50);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.105em;
}

.criterion-text {
    color: rgba(255,253,246,0.91);
    font-size: 15px;
    font-weight: 560;
    line-height: 1.4;
}

.task-toolbar {
    margin-bottom: 22px;
}

.view-toggle,
.task-view-toggle.view-toggle {
    gap: 24px;
}

.view-toggle-btn,
.task-view-btn.view-toggle-btn {
    padding-bottom: 12px;
    font-size: 14px;
    font-weight: 560;
}

.view-toggle-btn.active,
.task-view-btn.view-toggle-btn.active {
    font-weight: 620;
}

.task-table {
    --tl-row-h: 38px;
    --tl-line: rgba(255,253,246,0.085);
    overflow: hidden;
    padding: 12px 22px 18px;
    border: 1px solid rgba(255,253,246,0.08);
    border-radius: 8px;
    background: rgba(255,253,246,0.022);
    box-shadow: inset 0 1px 0 rgba(255,253,246,0.022);
}

.task-grid {
    grid-template-columns: 38px minmax(0, 1fr) 136px 118px 28px;
}

.task-header {
    min-height: 28px;
    padding: 0 0 8px;
    border-bottom-color: rgba(255,253,246,0.12);
    color: rgba(255,253,246,0.48);
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 560;
}

.task-header div:nth-child(2),
.task-header div:nth-child(3),
.task-header div:nth-child(4) {
    display: block;
}

.task-header div:nth-child(2)::before,
.task-header div:nth-child(3)::before,
.task-header div:nth-child(4)::before {
    display: none;
}

.task-group {
    min-height: 30px;
    padding: 18px 0 6px;
    gap: 8px;
    color: rgba(255,253,246,0.63);
    font-size: 11px;
    font-weight: 650;
}

.task-group.doing::before,
.task-group.todo::before,
.task-group.done::before {
    margin-left: 0;
    border-top-width: 3px;
    border-bottom-width: 3px;
    border-left-width: 5px;
    border-left-color: rgba(255,253,246,0.44);
}

.task-group span {
    min-height: 18px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.task-group strong {
    color: rgba(255,253,246,0.48);
    font-size: 11px;
    font-weight: 620;
}

.task-group.done {
    margin-top: 14px;
}

.task-list-dropzone {
    min-height: var(--tl-row-h);
}

.task-list-empty {
    display: none;
}

.task-row {
    min-height: var(--tl-row-h);
    border-bottom-color: var(--tl-line);
}

.task-row:hover {
    background: rgba(255,253,246,0.034);
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border-width: 1px;
    border-color: rgba(255,253,246,0.30);
}

.task-name {
    color: rgba(255,253,246,0.81);
    font-size: 13.5px;
    font-weight: 460;
    line-height: 1.35;
}

.task-name.strong {
    color: rgba(255,253,246,0.92);
    font-weight: 560;
}

.status-pill {
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    color: rgba(255,253,246,0.58);
    font-size: 11px;
    font-weight: 590;
}

.status-pill.dark {
    color: #ff8d64;
    border-color: rgba(238,68,8,0.36);
    background: rgba(238,68,8,0.145);
}

.due-date {
    color: rgba(255,253,246,0.48);
    font-size: 12px;
    font-weight: 460;
}

.add-task-row {
    min-height: var(--tl-row-h);
    padding-left: 0;
    border-bottom: none;
}

.add-task-row input {
    height: var(--tl-row-h);
    color: rgba(255,253,246,0.80);
    font-size: 13.5px;
    font-weight: 460;
}

.add-task-row input::placeholder {
    color: rgba(255,253,246,0.47);
}

.cp-task-title {
    max-width: 22ch;
    margin-bottom: 22px;
    font-size: clamp(22px, 1.7vw, 26px);
    font-weight: 620;
    line-height: 1.14;
    letter-spacing: -0.018em;
}

@media (max-width: 768px) {
    .db-view-execution {
        width: min(100% - 32px, 1120px);
    }

    .task-table {
        padding: 10px 14px 16px;
    }

    .task-grid,
    .task-header,
    .task-row {
        grid-template-columns: 20px 34px 20px minmax(0, 1fr) 28px 28px;
    }
}

/* FINAL OVERRIDE — dashboardV2 navbar scale and shell margins. */
body {
    padding-top: 99px;
}

.dashboard-navbar.navbar {
    min-height: 99px;
    height: 99px;
    background: rgba(15,16,19,0.96);
    border-bottom: 1px solid rgba(255,253,246,0.12);
    box-shadow: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dashboard-nav-top {
    height: 56px;
    padding: 0 32px;
    gap: 24px;
}

.dashboard-nav-left,
.dashboard-brand,
.dashboard-nav-right,
.dashboard-nav-tabs.db-main-tabs,
.dashboard-nav-tabs .db-main-tab {
    display: flex;
    align-items: center;
}

.dashboard-nav-left {
    gap: 16px;
    min-width: 0;
}

.dashboard-brand {
    gap: 9px;
    flex: 0 0 auto;
    color: rgba(255,253,246,0.94);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.dashboard-brand-mark {
    display: none;
}

.dashboard-brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.dashboard-brand-name {
    font-family: 'Righteous', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
}

.dashboard-nav-divider {
    color: rgba(255,253,246,0.20);
    font-size: 18px;
    font-weight: 300;
}

.dashboard-project-actions {
    display: inline-flex;
}

.dashboard-navbar .db-nav-dropdown {
    display: flex;
    min-width: 0;
}

.dashboard-navbar .db-nav-trigger {
    height: 30px;
    max-width: 220px;
    gap: 8px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,253,246,0.72);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.dashboard-navbar .db-nav-trigger:hover {
    background: rgba(255,253,246,0.055);
    color: rgba(255,253,246,0.94);
}

.db-nav-initial {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: rgba(255,253,246,0.13);
    color: rgba(255,253,246,0.72);
    font-size: 11px;
    font-weight: 720;
}

.dashboard-navbar .db-nav-trigger svg {
    width: 14px;
    height: 14px;
    color: rgba(255,253,246,0.60);
}

.dashboard-navbar .db-nav-list {
    top: calc(100% + 8px);
    min-width: 230px;
}

.dashboard-nav-right {
    gap: 22px;
    flex-shrink: 0;
    color: rgba(255,253,246,0.52);
}

.dashboard-nav-date {
    color: rgba(255,253,246,0.52);
    font-size: 14px;
    font-weight: 450;
    white-space: nowrap;
}

.dashboard-theme-toggle {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(255,253,246,0.13);
    border-radius: 999px;
    background: rgba(255,253,246,0.03);
    color: rgba(255,253,246,0.74);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-theme-toggle:hover,
.dashboard-icon-button:hover {
    color: rgba(255,253,246,0.94);
    border-color: rgba(255,253,246,0.22);
    background: rgba(255,253,246,0.055);
}

.dashboard-icon-button,
.dashboard-avatar {
    border: 0;
    background: transparent;
    color: rgba(255,253,246,0.52);
}

.dashboard-icon-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
}

.dashboard-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,253,246,0.14);
    background: #33353c;
}

.dashboard-nav-tabs.db-main-tabs {
    height: 42px;
    gap: 32px;
    padding: 0 32px;
    border-top: 0;
    border-bottom: 0;
}

.dashboard-nav-tabs .db-main-tab {
    height: 42px;
    gap: 8px;
    padding: 0;
    border-bottom-width: 2px;
    color: rgba(255,253,246,0.52);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

.dashboard-nav-tabs .db-main-tab:hover,
.dashboard-nav-tabs .db-main-tab.active {
    color: rgba(255,253,246,0.94);
}

.dashboard-nav-tabs .db-main-tab.active {
    border-bottom-color: rgba(255,253,246,0.94);
}

.dashboard-nav-tabs .db-main-tab-icon {
    width: 16px;
    height: 16px;
}

.dashboard-nav-tabs .db-main-tab-icon svg {
    width: 16px;
    height: 16px;
}

.dashboard-section,
.dashboard-section.active {
    padding: 40px 0 96px !important;
}

.dashboard-container {
    width: min(1120px, calc(100% - 80px)) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
}

.db-view-execution {
    width: 100%;
    max-width: none;
}

.proj-body {
    padding: 0;
}

.jt-section > .milestone-tabs {
    margin-bottom: 24px;
}

.task-table {
    padding: 12px 22px 18px;
}

@media (max-width: 768px) {
    body {
        padding-top: 104px;
    }

    .dashboard-navbar.navbar {
        min-height: 104px;
        height: 104px;
    }

    .dashboard-nav-top {
        height: 58px;
        padding: 0 16px;
    }

    .dashboard-nav-tabs.db-main-tabs {
        height: 46px;
        padding: 0 16px;
        gap: 24px;
    }

    .dashboard-nav-date,
    .dashboard-icon-button {
        display: none;
    }

    .dashboard-container {
        width: min(100% - 32px, 1120px) !important;
    }

    .dashboard-section,
    .dashboard-section.active {
        padding-top: 24px !important;
    }
}

/* FINAL OVERRIDE — WCAG/accessibility UX pass. */
.jt-section {
    position: relative;
}

.milestone-tabs-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    cursor: grab;
    user-select: none;
}

.milestone-tabs-wrap:active {
    cursor: grabbing;
}

.milestone-tabs-wrap::-webkit-scrollbar {
    height: 3px;
}

.milestone-tabs-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.milestone-tabs-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,253,246,0.18);
    border-radius: 3px;
}

.jt-section .milestone-tabs-wrap > .milestone-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 28px;
    min-width: 100%;
    padding: 0 0 10px;
    color: rgba(255,253,246,0.72);
}

/* "Sol" sous la validation: pas de cratere, juste une ligne fine. */
.criterion-card {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
    margin-bottom: 0;
}

/* Nettoyage espace au-dessus de la zone de travail. */
.jt-section {
    padding-top: 0;
    margin-top: 12px;
}

.jt-section .milestone-tabs-wrap > .milestone-tabs::after {
    content: '';
    flex: 0 0 24px;
    display: block;
}

.jt-section .milestone-tab {
    flex: 0 0 auto;
    max-width: 220px;
    min-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255,253,246,0.66);
    font-weight: 560;
}

.jt-section .milestone-tab:hover,
.jt-section .milestone-tab.active {
    color: rgba(255,253,246,0.98);
}

.jt-section .milestone-tab.active {
    font-weight: 640;
}

.jt-section .milestone-count {
    flex: 0 0 auto;
    color: rgba(255,253,246,0.74);
    background: rgba(255,253,246,0.115);
}

.jt-section .milestone-count.muted {
    color: rgba(255,253,246,0.66);
    border-color: rgba(255,253,246,0.22);
}

.criterion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.criterion-card .icon-lg {
    display: none;
}

.overline {
    color: rgba(255,253,246,0.68);
    font-size: 10.5px;
    font-weight: 760;
}

.criterion-text {
    color: rgba(255,253,246,0.96);
    font-size: 14.5px;
    font-weight: 540;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.criterion-value {
    color: rgba(255,253,246,0.86);
}

.task-header {
    color: rgba(255,253,246,0.72);
    font-weight: 620;
}

.task-name {
    color: rgba(255,253,246,0.86);
}

.task-name.strong {
    color: rgba(255,253,246,0.98);
}

.add-task-row,
.add-task-row input,
.add-task-row input::placeholder {
    color: rgba(255,253,246,0.68);
}

.add-task-row:hover,
.add-task-row:focus-within {
    background: rgba(255,253,246,0.045);
}

.add-task-row:hover input::placeholder,
.add-task-row:focus-within input::placeholder {
    color: rgba(255,253,246,0.82);
}

/* Ghost add (ClickUp-like): no input shown until click. */
.add-task-row {
    background: transparent !important;
    padding: 0;
    cursor: default;
    display: block;
    grid-template-columns: none;
    align-items: unset;
    min-height: 0;
}

.add-task-ghost-btn,
.add-task-editor {
    width: 100%;
    display: grid;
    grid-template-columns: 20px 38px 20px minmax(0, 1fr);
    align-items: center;
    min-height: 36px;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.add-task-ghost-btn {
    cursor: pointer;
}

.add-task-ghost-icon {
    justify-self: center;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    color: rgba(255,253,246,0.58);
    font-size: 16px;
    line-height: 1;
    /* Pull slightly left to align under status icons gutter. */
    transform: translateX(-4px);
}

.add-task-ghost-text {
    grid-column: 2 / -1;
    text-align: left;
    color: rgba(255,253,246,0.62);
    font-size: 13.5px;
    font-weight: 450;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-task-ghost-btn:hover .add-task-ghost-text {
    color: rgba(255,253,246,0.86);
}

.add-task-editor input {
    grid-column: 2 / -1;
    width: 100%;
    height: 28px;
    border: 0;
    outline: 0;
    background: transparent;
    color: rgba(255,253,246,0.92);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-task-editor input::placeholder {
    /* Lighter placeholder for WCAG on dark background. */
    color: rgba(255,253,246,0.64);
}

.add-task-editor:focus-within .add-task-ghost-icon {
    color: rgba(255,253,246,0.86);
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border-color: rgba(255,253,246,0.46);
}

.custom-checkbox:hover,
.custom-checkbox:focus-visible {
    border-color: rgba(255,253,246,0.86);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,253,246,0.12);
}

.custom-checkbox.done,
.task-row.done .custom-checkbox {
    border-color: rgba(255,253,246,0.92);
    background: rgba(255,253,246,0.92);
}

.custom-checkbox.done::after,
.task-row.done .custom-checkbox::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #080809;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.status-pill {
    color: rgba(255,253,246,0.72);
    border-color: rgba(255,253,246,0.20);
}

.due-date {
    min-width: 64px;
    justify-content: flex-start;
    color: rgba(255,253,246,0.70);
}

.due-date.muted {
    color: rgba(255,253,246,0.62);
}

.due-date.empty {
    color: rgba(255,253,246,0.58);
}

.due-date.empty:hover,
.due-date.empty:focus-visible {
    color: rgba(255,253,246,0.92);
    outline: none;
}

.dashboard-theme-toggle {
    color: rgba(255,253,246,0.82);
}

.dashboard-theme-indicator {
    cursor: default;
}

.dashboard-theme-indicator:hover {
    color: rgba(255,253,246,0.82);
    border-color: rgba(255,253,246,0.13);
    background: rgba(255,253,246,0.03);
}

.dashboard-nav-date {
    color: rgba(255,253,246,0.68);
}

@media (max-width: 768px) {
    .jt-section .milestone-tab {
        max-width: 220px;
    }

    .criterion-card {
        padding: 8px 0;
    }
}

/* FINAL OVERRIDE — action-first execution UX, no data-table mental model. */
.jt-section > .milestone-tabs {
    /* Avoid double-spacing: spacing handled by .milestone-tabs-wrap. */
    margin-bottom: 0;
}

.jalon-focus {
    margin: 0;
    padding: 0;
}

.jalon-focus .criterion-card {
    margin-bottom: 10px;
}

.jalon-focus-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 10px;
}

.jalon-focus-kicker {
    margin: 0 0 4px;
    color: rgba(255,253,246,0.64);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.jalon-focus-title {
    margin: 0;
    color: rgba(255,253,246,0.98);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -0.01em;
}

.jalon-focus.completed .jalon-focus-title {
    color: rgba(255,253,246,0.62);
    text-decoration: line-through;
}

.jalon-validate-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 14px;
    border: 1px solid rgba(238,68,8,0.55);
    border-radius: 999px;
    background: rgba(238,68,8,0.18);
    color: #ff9a73;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0;
}

.jalon-validate-btn:hover,
.jalon-validate-btn:focus-visible {
    border-color: rgba(238,68,8,0.86);
    background: rgba(238,68,8,0.24);
    color: #ffb093;
    outline: none;
}

.jalon-validate-btn:disabled {
    cursor: default;
    border-color: rgba(255,253,246,0.12);
    background: rgba(255,253,246,0.04);
    color: rgba(255,253,246,0.46);
}

.criterion-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 0;
    padding: 2px 0 8px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    box-shadow: none;
}

.criterion-card .jalon-validate-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.criterion-card .icon-lg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin: 0;
    color: rgba(255,253,246,0.52);
}

.criterion-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: rgba(255,253,246,0.82);
    font-size: 13px;
    font-weight: 470;
    line-height: 1.2;
}

.criterion-text span:first-child {
    color: rgba(255,253,246,0.98);
    font-weight: 620;
}

.criterion-text .criterion-label {
    flex: 0 0 auto;
    margin-right: 0;
}

.criterion-context {
    color: rgba(255,253,246,0.52);
    font-weight: 520;
    text-transform: none;
    letter-spacing: 0;
}

.criterion-text .criterion-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.criterion-empty {
    color: rgba(255,253,246,0.42);
}

.task-toolbar {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0 0 8px;
    border-top: none;
    border-bottom: none;
}

/* Toggle (Liste/Board) must sit right above the work area, not in a no-man's-land. */
.tasks-toolbar {
    display: flex;
    justify-content: flex-end;
    padding-right: 8px;
    position: relative;
    z-index: 10;
}

/* Pull the toolbar into the first group line (ClickUp-like). */
.task-list-surface > .tasks-toolbar {
    margin-bottom: -32px;
}

/* In kanban, toolbar sits above the board (no overlap). */
.kanban-shell > .tasks-toolbar {
    margin-bottom: 12px;
}

.view-toggle-btn,
.task-view-btn.view-toggle-btn {
    padding-bottom: 0;
    padding-top: 0;
    background: transparent !important;
    box-shadow: none !important;
    /* Discret pour ne pas voler la vedette aux taches. */
    color: rgba(255,253,246,0.34);
    font-size: 12.5px;
    font-weight: 500;
}

.view-toggle-btn:hover,
.task-view-btn.view-toggle-btn:hover {
    background: transparent !important;
    color: rgba(255,253,246,0.72);
}

.view-toggle-btn.active,
.task-view-btn.view-toggle-btn.active {
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255,253,246,0.62);
    border-bottom-color: transparent;
    font-weight: 600;
}

/* Aucun cadre autour du toggle. */
.view-toggle,
.task-view-toggle.view-toggle {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

.toggle-icon,
.task-view-icon.toggle-icon {
    width: 18px;
    height: 18px;
    border: 0 !important;
    background: transparent !important;
    color: rgba(255,253,246,0.30);
}

.toggle-icon.dark,
.task-view-icon.toggle-icon.dark {
    background: transparent !important;
    border-color: transparent !important;
    color: rgba(255,253,246,0.60);
}

.task-list-surface {
    overflow: hidden;
    position: relative;
    padding: 0 0 28px;
    border: none;
    background: transparent;
}

.task-list-heading + .add-task-row.primary {
    margin-top: 10px;
}

.task-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0 8px;
    border-bottom: 1px solid rgba(255,253,246,0.08);
}

.task-list-heading span {
    color: rgba(255,253,246,0.78);
    font-size: 11px;
    font-weight: 520;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.task-list-heading small {
    color: rgba(255,253,246,0.44);
    font-size: 11px;
    font-weight: 400;
}

.task-table {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.task-header {
    display: none;
}

.add-task-row.primary {
    min-height: 42px;
    margin: 0 0 8px;
    padding: 0;
    border: none;
}

.add-task-row.primary .icon {
    color: rgba(255,253,246,0.82);
}

.add-task-row.primary input {
    height: 44px;
    color: rgba(255,253,246,0.92);
    font-size: 14px;
}

.add-task-row.primary input::placeholder {
    color: rgba(255,253,246,0.74);
}

.task-empty-state,
.task-success-state {
    margin: 8px 0 14px;
    padding: 14px 16px;
    border: 1px dashed rgba(255,253,246,0.14);
    border-radius: 7px;
    background: rgba(255,253,246,0.026);
    color: rgba(255,253,246,0.70);
}

.task-empty-state {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
}

.task-empty-icon {
    grid-row: span 2;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(255,253,246,0.07);
    color: rgba(255,253,246,0.80);
    font-size: 15px;
}

.task-empty-state p,
.task-success-state p {
    margin: 0;
}

.task-empty-state p,
.task-success-state strong {
    color: rgba(255,253,246,0.94);
    font-size: 13px;
    font-weight: 620;
}

.task-empty-state > span:not(.task-empty-icon),
.task-success-state span {
    color: rgba(255,253,246,0.66);
    font-size: 12.5px;
}

.task-success-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.task-group {
    min-height: 28px;
    padding: 12px 0 6px;
    outline: none;
}

.task-group span {
    min-height: 18px;
}

.task-list-dropzone {
    min-height: 0;
}

.task-row {
    min-height: 36px;
    display: grid;
    grid-template-columns: 20px 38px 20px minmax(0, 1fr) 28px 28px;
    align-items: center;
    border-bottom: 1px solid rgba(255,253,246,0.085);
}

.task-drag-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 100%;
    min-height: 44px;
    color: rgba(255,253,246,0.18);
    font-size: 13px;
    cursor: grab;
    opacity: 0;
    transition: opacity 120ms;
    user-select: none;
    touch-action: none;
    line-height: 1;
}
.task-row:hover .task-drag-grip { opacity: 1; }
.task-row.dragging .task-drag-grip { opacity: 0.4; }

@media (hover: none) and (pointer: coarse) {
    .task-drag-grip { opacity: 0.35; min-height: 44px; }
}

.task-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    color: rgba(255,253,246,0.2);
    font-size: 9px;
    cursor: pointer;
    transition: color 120ms, transform 150ms;
    visibility: hidden;
}
.task-row:hover .task-chevron,
.task-chevron.open {
    visibility: visible;
}

@media (hover: none) and (pointer: coarse) {
    .task-chevron { visibility: visible; opacity: 0.45; }
    .task-chevron.open { opacity: 1; }
}
.task-chevron.open {
    color: rgba(255,253,246,0.55);
    transform: rotate(90deg);
}
.task-chevron.empty {
    color: rgba(255,253,246,0.12);
}
.task-row:hover .task-chevron.empty {
    color: rgba(255,253,246,0.28);
}

.row-del {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(255,253,246,0.3);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.task-row:hover .row-del {
    display: flex;
}

.row-del:hover {
    background: rgba(238,68,8,0.14);
    color: #ff7948;
}

.task-row:hover {
    background: rgba(255,253,246,0.032);
}

.task-check-cell {
    display: flex;
    align-items: center;
}

.custom-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    border: 1.3px solid rgba(255,253,246,0.52);
    background: transparent;
    outline: none;
    cursor: pointer;
}

.custom-checkbox::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: inherit;
    background: transparent;
}

.custom-checkbox.doing {
    border-color: #ff8d64;
}

.custom-checkbox.doing::before {
    background: linear-gradient(90deg, #ff8d64 0 50%, transparent 50% 100%);
}

.custom-checkbox.done,
.task-row.done .custom-checkbox {
    border-color: #54bdb5;
    background: #54bdb5;
}

.custom-checkbox.done::before,
.task-row.done .custom-checkbox::before {
    background: transparent;
}

.custom-checkbox.done::after,
.task-row.done .custom-checkbox::after {
    display: none;
}

.task-name {
    padding-right: 12px;
    color: rgba(255,253,246,0.87);
    font-size: 13.5px;
    font-weight: 470;
}

.task-name.strong {
    color: rgba(255,253,246,0.98);
    font-weight: 600;
}

.task-title {
    cursor: text;
    border-radius: 4px;
}

.task-title:hover {
    color: rgba(255,253,246,1);
}

.task-title.editing {
    display: inline-block;
    min-width: 180px;
    padding: 3px 5px;
    background: rgba(255,253,246,0.08);
    outline: 1px solid rgba(255,253,246,0.20);
}

.task-row.editing {
    background: rgba(255,253,246,0.045);
}

.task-edit-input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: rgba(255,253,246,0.96);
    font-size: 13.5px;
    font-weight: 500;
    caret-color: rgba(255,253,246,0.96);
}

.task-edit-input:focus {
    background: transparent;
}

.task-meta {
    color: rgba(255,253,246,0.58);
    font-size: 11.5px;
    font-weight: 500;
}

.status-pill,
.due-date {
    display: none;
}

.row-action {
    width: 26px;
    height: 26px;
    color: rgba(255,253,246,0.54);
    opacity: 0;
}

.task-row:hover .row-action,
.row-action:focus-visible {
    opacity: 1;
}

.done-group {
    opacity: 0.72;
}

@media (hover: none) and (pointer: coarse) {
    .task-row .row-del { display: flex; opacity: 0.55; }
    .task-row .row-action { opacity: 0.7; }
    .subtask-del { opacity: 0.55; }
}

@media (max-width: 768px) {
    .jalon-focus-top {
        flex-direction: column;
        gap: 12px;
    }

    .jalon-validate-btn {
        width: 100%;
    }

    .task-list-surface {
        padding: 8px 14px 18px;
    }

    .task-list-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .task-row {
        grid-template-columns: 20px 34px 20px minmax(0, 1fr) 28px 28px;
    }
}

/* FINAL OVERRIDE — lighter milestone and validation typography. */
.jt-section .milestone-tab {
    color: rgba(255,253,246,0.58);
    font-size: 14px;
    font-weight: 470;
}

.jt-section .milestone-tab.active {
    color: rgba(255,253,246,0.92);
    font-weight: 560;
}

.jt-section .milestone-count {
    color: rgba(255,253,246,0.64);
    font-size: 10.5px;
    font-weight: 560;
}

.jalon-focus-kicker {
    color: rgba(255,253,246,0.48);
    font-size: 10px;
    font-weight: 520;
}

.jalon-focus-title {
    color: rgba(255,253,246,0.84);
    font-size: 16px;
    font-weight: 430;
}

.jalon-validate-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 560;
}

.criterion-text {
    color: rgba(255,253,246,0.78);
    font-size: 13px;
    font-weight: 430;
}

.criterion-label {
    font-weight: 600;
    color: rgba(255,253,246,0.52);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 6px;
}

.cp-danger-zone {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,253,246,0.07);
}

.cp-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(238,68,8,0.25);
    border-radius: 7px;
    background: transparent;
    color: rgba(255,120,80,0.72);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 120ms, color 120ms, border-color 120ms;
}

.cp-delete-btn:hover {
    background: rgba(238,68,8,0.12);
    border-color: rgba(238,68,8,0.55);
    color: #ff7948;
}

.task-group-empty {
    padding: 6px 0 6px 38px;
    color: rgba(255,253,246,0.28);
    font-size: 12px;
    font-style: italic;
    border-bottom: 1px solid var(--tl-line);
}

.criterion-text span:first-child {
    color: rgba(255,253,246,0.88);
    font-weight: 560;
}

.db-sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,253,246,0.14);
    background: transparent;
    color: rgba(255,253,246,0.62);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms, color 150ms, border-color 150ms;
    white-space: nowrap;
}

.db-sync-btn:hover {
    background: rgba(255,253,246,0.06);
    color: rgba(255,253,246,0.92);
    border-color: rgba(255,253,246,0.28);
}

.db-nav-add {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border-top: 1px solid rgba(255,253,246,0.08);
    margin-top: 4px;
    color: rgba(238,68,8,0.82);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 120ms, background 120ms;
}

/* ══════════════════════════════════════════════════
   DESIGN SYSTEM OVERRIDE — Inputs & Checkboxes
   Unified tokens from CarryIT Design System
   ══════════════════════════════════════════════════ */

/* Checkbox — square design system */
.custom-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    border-radius: 4px !important;
    border: 1.5px solid rgba(255,253,246,0.2) !important;
    background: #111112 !important;
    cursor: pointer;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, border-color 150ms ease;
}

.custom-checkbox::before { display: none !important; }

.custom-checkbox:hover {
    border-color: rgba(255,253,246,0.38) !important;
    box-shadow: none !important;
}

.custom-checkbox.done,
.task-row.done .custom-checkbox {
    background: #EE4408 !important;
    border-color: #EE4408 !important;
}

.custom-checkbox.done::after,
.task-row.done .custom-checkbox::after {
    content: '✓' !important;
    position: static !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #FFFDF6 !important;
    line-height: 1 !important;
    border: none !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
}

/* ══════════════════════════════════════════════════════════
   PILOTAGE BLOCK — nouveau prototype
   ══════════════════════════════════════════════════════════ */

/* Timeline */
.pil-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 20px 28px 8px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}
.pil-milestone {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    min-width: 56px;
}
.pil-milestone::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: rgba(255,253,246,0.08);
    z-index: 0;
}
.pil-milestone:last-child::after { display: none; }

.pil-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
    background: #1A1A1C;
    color: #929292;
    border: 1px solid rgba(255,253,246,0.1);
    transition: box-shadow 180ms ease;
}
.pil-m-title {
    font-size: 10px;
    font-weight: 500;
    color: #929292;
    text-align: center;
    max-width: 64px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Milestone states */
.milestone--done .pil-dot {
    background: #EE4408;
    color: #FFFDF6;
    border-color: #EE4408;
}
.milestone--done .pil-m-title { color: rgba(255,253,246,0.5); }

.milestone--active .pil-dot {
    background: transparent;
    color: #EE4408;
    border: 2px solid #EE4408;
    box-shadow: 0 0 0 3px rgba(238,68,8,0.12);
}
.milestone--active .pil-m-title { color: #EE4408; }

.milestone--late .pil-dot {
    background: rgba(163,21,13,0.18);
    color: #e05545;
    border: 2px solid #A3150D;
}
.milestone--late .pil-m-title { color: #e05545; }

.pil-milestone.is-selected .pil-dot {
    box-shadow: 0 0 0 4px rgba(255,253,246,0.12);
}

/* Header info */
.pil-header-info {
    padding: 20px 28px 20px;
}
.pil-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.pil-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.pil-meta {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #929292;
}
.pil-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFFDF6;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}
.pil-deadline {
    font-size: 12px;
    color: #929292;
}
.pil-deadline--urgent { color: #e05545; }
.pil-deadline--late   { color: #e05545; font-weight: 600; }

/* Objective grid */
.objective-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
@media (max-width: 640px) {
    .objective-grid { grid-template-columns: 1fr; gap: 16px; }
}
.objective-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pil-desc-text {
    font-size: 13px;
    color: #929292;
    line-height: 1.55;
}
.critere-highlight {
    font-size: 13px;
    color: #FFFDF6;
    line-height: 1.55;
    border-left: 2px solid rgba(238,68,8,0.55);
    padding-left: 12px;
    font-weight: 500;
}

/* KPI stats block */
.block-pilotage-stats {
    background: #1A1A1C;
    border-top: 1px solid rgba(255,253,246,0.08);
    padding: 22px 28px;
}
.kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 640px) {
    .kpi-row { grid-template-columns: 1fr; }
}

/* KPI station card */
.kpi-station {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,253,246,0.08);
    border-radius: 10px;
    overflow: hidden;
}
.kpi-station--empty {
    opacity: 0.7;
}
.kpi-station__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 14px;
}
.kpi-station__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.kpi-phrasing {
    font-size: 11px;
    font-style: italic;
    color: #929292;
}
.kpi-value--mid {
    font-size: 32px;
    font-weight: 700;
    color: #FFFDF6;
    line-height: 1;
}
.kpi-value__unit {
    font-size: 13px;
    color: #929292;
    margin-left: 4px;
}
.kpi-desc-text {
    font-size: 12px;
    color: #929292;
    line-height: 1.45;
}
.card__action {
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    color: #929292;
    cursor: pointer;
    font-family: inherit;
    transition: color 150ms ease;
}
.card__action:hover { color: #FFFDF6; }

.kpi-station__footer-btn {
    background: rgba(255,255,255,0.03);
    border: none;
    border-top: 1px solid rgba(255,253,246,0.07);
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 500;
    color: #929292;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 150ms ease, color 150ms ease;
}
.kpi-station__footer-btn:hover {
    background: rgba(255,255,255,0.06);
    color: #FFFDF6;
}

/* Pilotage footer */
.pil-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid rgba(255,253,246,0.08);
}

/* ════════════════════════════════════════════════
   STEERING CARD — Nouveau design Pilotage Jalons
   ════════════════════════════════════════════════ */

.steering-card {
    background: #0b0b0d;
    border: 1px solid rgba(255,253,246,0.08);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.steering-header {
    padding: 32px 40px;
    border-bottom: 1px solid rgba(255,253,246,0.08);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.steering-card .pil-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0;
    line-height: 1.1;
    color: #f4f4f5;
}

.steering-header .section-key,
.section-label-pilotage {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8a8a90;
}

.pil-deadline {
    font-size: 13.5px;
    color: #929292;
    margin-top: 4px;
}

.pil-deadline strong {
    color: #929292;
    font-weight: 800;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

@media (max-width: 640px) {
    .info-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Validate / Reactivate buttons inside header-actions */
.header-actions .jl-validate-btn,
.header-actions .jl-reactivate-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 700;
    box-shadow: none;
}

.header-actions .msb-chip {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.header-actions .jl-validate-btn {
    background: rgba(255,253,246,0.03);
    color: #FFFDF6;
    border: 1px solid rgba(255,253,246,0.15);
}

.header-actions .jl-validate-btn:hover {
    background: rgba(255,253,246,0.03);
    color: #FFFDF6;
    border-color: rgba(255,253,246,0.15);
    box-shadow: none;
}

.header-actions .jl-reactivate-btn {
    background: rgba(255,253,246,0.03);
    color: #FFFDF6;
    border: 1px solid rgba(255,253,246,0.15);
}

.header-actions .jl-reactivate-btn:hover {
    background: rgba(255,253,246,0.06);
    border-color: rgba(255,253,246,0.18);
}

.info-grid .section-key {
    margin-bottom: 8px;
}

.pil-desc-text {
    font-size: 15px;
    color: #8d8d93;
    line-height: 1.6;
}

.critere-highlight {
    border-left: 2px solid #EE4408;
    padding-left: 20px;
    font-size: 15px;
    color: #f4f4f5;
    line-height: 1.6;
}

/* KPI pilotage zone */
.steering-pilotage-wrap {
    background: #050505;
    padding: 40px;
}

.section-label-pilotage {
    display: block;
    margin-bottom: 32px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 40px;
    align-items: stretch;
}

@media (max-width: 640px) {
    .kpi-grid { grid-template-columns: 1fr; gap: 24px; }
    .v-sep { display: none; }
}

.v-sep {
    background: rgba(255,253,246,0.08);
    width: 1px;
}

.kpi-unit {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kpi-unit--empty {
    opacity: 0.65;
    justify-content: flex-start;
}

.kpi-unit__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-category {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: #f4f4f5;
    margin: 0;
    letter-spacing: 0.05em;
}

.kpi-phrasing {
    font-size: 12px;
    font-weight: 600;
    color: #7f7f86;
    font-style: italic;
    margin-top: 2px;
}

.edit-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 90, 31, 0.2);
    background: rgba(255, 90, 31, 0.1);
    color: #ff5a1f;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}

.edit-btn:hover {
    background: rgba(255, 90, 31, 0.1);
}

.kpi-factual-title {
    font-size: 14px;
    font-weight: 600;
    color: #f4f4f5;
    margin-top: 6px;
    line-height: 1.45;
    min-height: 2.9em;
    max-width: 26ch;
}

.value-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

.value-group strong {
    font-size: 42px;
    line-height: 0.9;
    letter-spacing: -0.06em;
    font-weight: 800;
    color: #f4f4f5;
}

.value-group span {
    font-size: 20px;
    font-weight: 500;
    color: #77777d;
    letter-spacing: -0.04em;
}

.description-text {
    font-size: 14px;
    color: #8d8d93;
    line-height: 1.5;
    min-height: 42px;
    margin: 8px 0 4px;
    max-width: 34ch;
}

.freshness {
    font-size: 11px;
    font-weight: 600;
    color: #5a5a60;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.freshness-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #404025;
}

.kpi-progress-area {
    margin-top: 4px;
}

.kpi-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #8a8a90;
    margin-bottom: 6px;
}

.kpi-progress-labels span:first-child {
    color: #6f6f75;
}

.kpi-progress-labels strong {
    color: #f4f4f5;
}

.kpi-progress-copy {
    color: #8a8a90;
}

.kpi-progress-copy strong {
    color: #f4f4f5;
}

.kpi-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: #24242a;
    overflow: hidden;
    margin-bottom: 20px;
}

.kpi-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: #6d6928;
    transition: width 0.6s ease;
}

.kpi-empty-copy {
    font-size: 14px;
    line-height: 1.5;
    color: #8d8d93;
    min-height: 42px;
    max-width: 34ch;
    margin: 8px 0 4px;
}

.add-btn {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #24242a;
    background: rgba(255,253,246,0.02);
    color: #d7d7db;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.add-btn:hover {
    background: rgba(255,253,246,0.05);
    color: #FFFDF6;
    border-color: rgba(255,253,246,0.1);
}

.kpi-unit .add-btn {
    margin-top: 0;
}

.kpi-inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
}

.kpi-inline-grid {
    display: grid;
    grid-template-columns: minmax(0, 148px) minmax(0, 1fr);
    gap: 12px;
}

.kpi-inline-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-inline-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a90;
}

.kpi-inline-input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,253,246,0.08);
    background: rgba(255,253,246,0.03);
    color: #f4f4f5;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.kpi-inline-input::placeholder {
    color: #6f6f75;
}

.kpi-inline-input:hover {
    border-color: rgba(255,253,246,0.14);
}

.kpi-inline-input:focus {
    border-color: rgba(238, 68, 8, 0.5);
    background: rgba(255,253,246,0.05);
    box-shadow: 0 0 0 3px rgba(238, 68, 8, 0.12);
}

.kpi-inline-hint {
    font-size: 11px;
    font-weight: 600;
    color: #5a5a60;
    line-height: 1.4;
}

.kpi-inline-submit-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
}

.kpi-inline-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 188px;
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 90, 31, 0.2);
    background: rgba(255, 90, 31, 0.1);
    color: #ff5a1f;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-inline-submit:hover {
    background: rgba(255, 90, 31, 0.16);
    border-color: rgba(255, 90, 31, 0.32);
    color: #fff3ed;
    box-shadow: 0 0 12px rgba(238, 68, 8, 0.18);
}

.kpi-inline-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 68, 8, 0.14);
}

.kpi-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpi-quick-edit-btn,
.kpi-history-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,253,246,0.10);
    background: rgba(255,253,246,0.03);
    color: #929292;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kpi-history-edit:hover {
    background: rgba(255,253,246,0.06);
    color: #FFFDF6;
    border-color: rgba(255,253,246,0.16);
}

.kpi-history {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,253,246,0.06);
}

.kpi-history-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a8a90;
    margin-bottom: 8px;
}

.kpi-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-history-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #8d8d93;
}

.kpi-history-row strong {
    color: #f4f4f5;
    font-weight: 600;
}

@media (max-width: 640px) {
    .steering-header,
    .steering-pilotage-wrap {
        padding: 24px 20px;
    }

    .header-top-row {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .kpi-inline-grid {
        grid-template-columns: 1fr;
    }
}
/* Strict jalons-test.html port */
.pt-card {
    background: #0b0b0d;
    border: 1px solid rgba(255, 253, 246, 0.08);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

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

.pt-shell {
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
    max-width: 980px;
    margin: 0 auto;
}

.pt-shell-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.5;
    color: #FFFDF6;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-timeline {
    display: flex;
    margin-bottom: 50px;
    position: relative;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    align-items: flex-start;
}

.pt-milestone {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.pt-milestone::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: rgba(255, 253, 246, 0.08);
    z-index: 0;
}

.milestone--done.pt-milestone::before {
    background: #EE4408;
}

.pt-milestone:last-child::before {
    display: none;
}

.pt-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    background: #1A1A1C;
    color: #929292;
    border: 1px solid rgba(255, 253, 246, 0.08);
    overflow: hidden;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.milestone--done .pt-dot {
    background: #EE4408;
    color: #FFFDF6;
    border: none;
}

.pt-m-title {
    font-size: 11px;
    font-weight: 600;
    color: #929292;
    text-align: center;
    line-height: 1.35;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.milestone--active .pt-m-title {
    color: #EE4408;
    font-weight: 700;
}

.milestone--late .pt-dot {
    background: #1A1A1C;
    color: #e05545;
    border: 1px solid rgba(163,21,13,0.35);
    box-shadow: 0 0 0 3px rgba(163,21,13,0.10);
}

.milestone--late .pt-m-title {
    color: #e05545;
    font-weight: 700;
}

.pt-header {
    padding: 32px 40px;
    border-bottom: 1px solid rgba(255, 253, 246, 0.08);
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 12px;
}

.pt-header-main {
    min-width: 0;
}

.pt-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pt-section-key {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8a8a90;
    margin-bottom: 8px;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #f4f4f5;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-deadline {
    font-size: 13.5px;
    color: #929292;
    margin-top: 4px;
    line-height: 1.4;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-deadline strong {
    color: #929292;
    font-weight: 800;
}

.pt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    height: 24px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #929292;
    background: transparent;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-chip-dot { display: none; }

.pt-btn-edit-jalons-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid rgba(255,253,246,0.08);
    border-radius: 6px;
    color: rgba(255,253,246,0.3);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    flex-shrink: 0;
    opacity: 0.6;
}
.pt-btn-edit-jalons-icon:hover {
    color: var(--db-text);
    border-color: rgba(255,253,246,0.18);
    background: rgba(255,253,246,0.04);
    opacity: 1;
}

.pt-btn-validate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: rgba(255,253,246,0.3);
    border: 1px solid rgba(255,253,246,0.08);
    padding: 0 12px;
    height: 28px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    letter-spacing: 0;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
    opacity: 0.6;
}

.pt-btn-validate:hover {
    background: rgba(255,253,246,0.05);
    border-color: rgba(255,253,246,0.18);
    color: rgba(255,253,246,0.85);
    opacity: 1;
}

.pt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.pt-info-col {
    min-width: 0;
}

.pt-objective-text {
    font-size: 15px;
    color: #8d8d93;
    line-height: 1.6;
    max-width: 36ch;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-critere-highlight {
    border-left: 2px solid #EE4408;
    padding-left: 20px;
    font-size: 15px;
    color: #f4f4f5;
    line-height: 1.6;
    max-width: 35ch;
    font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}

.pt-empty-text {
    color: rgba(255,253,246,0.32);
    font-style: italic;
}

.pt-chip--active {
    color: #c9c9c9;
    background: rgba(238,68,8,0.06);
}
.pt-chip--active::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #EE4408;
    box-shadow: 0 0 5px rgba(238,68,8,0.5);
    flex-shrink: 0;
}

.pt-chip--done {
    background: rgba(10,42,83,0.25);
    color: #7aa8d8;
}

.pt-chip--upcoming {
    background: rgba(255,253,246,0.05);
    color: #929292;
    border: 1px solid rgba(255,253,246,0.08);
}

.pt-chip--late {
    background: rgba(163,21,13,0.12);
    color: #e05545;
    border: 1px solid rgba(163,21,13,0.30);
}

@media (max-width: 640px) {
    .pt-header {
        padding: 24px 20px;
    }

    .pt-header-top-row {
        flex-direction: column;
    }

    .pt-header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .pt-info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
