/* Cosmos Light Theme - Global Styles */

.theme-cosmos {
    /* Accents */
    --accent1: #3b82f6; /* bleu  */
    --accent2: #8b5cf6; /* violet */
    --grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
    /* Texte */
    --text: #0f172a;
    --text-muted: #475569;
    /* Fond page */
    --page-bg: #f1f5f9;
    /* Cards glassmorphism */
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(59, 130, 246, 0.16);
    --card-shadow: 0 4px 24px rgba(59,130,246,0.10), 0 1px 4px rgba(0,0,0,0.06);
    --card-hover: 0 16px 48px rgba(59,130,246,0.18), 0 2px 8px rgba(0,0,0,0.08);
    /* Ligne lumineuse en haut des cards */
    --line1: rgba(59, 130, 246, 0.55);
    --line2: rgba(139, 92, 246, 0.55);
    /* Badge pill */
    --badge-bg: rgba(59, 130, 246, 0.10);
    --badge-bd: rgba(59, 130, 246, 0.28);
    /* Orbes */
    --orb1: rgba(59, 130, 246, 0.18);
    --orb2: rgba(139, 92, 246, 0.15);
    --orb3: rgba(6, 182, 212, 0.13);
}

/* Todo help - Planning preview */
.todo-help-view-card--planning { grid-column: span 2; }
.todo-help-planning-demo {
    position: relative;
    height: 168px;
    overflow: hidden;
    border: 1px solid rgba(59,130,246,0.18);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(59,130,246,0.035) 1px, transparent 1px), #f8fbff;
    background-size: 38px 100%;
}
.todo-help-planning-years, .todo-help-planning-months, .todo-help-planning-days {
    display: grid;
    position: relative;
    z-index: 2;
    text-align: center;
}
.todo-help-planning-years { grid-template-columns: 1fr 1fr; height: 22px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-size: 0.58rem; font-weight: 900; padding-top: 5px; }
.todo-help-planning-months { grid-template-columns: repeat(3, 1fr); height: 22px; padding-top: 5px; border-bottom: 1px solid rgba(59,130,246,0.14); color: #334155; font-size: 0.56rem; font-weight: 800; text-transform: uppercase; }
.todo-help-planning-days { grid-template-columns: repeat(8, 1fr); height: 21px; padding-top: 5px; border-bottom: 1px solid rgba(59,130,246,0.12); color: #64748b; font-size: 0.55rem; font-weight: 700; }
.todo-help-planning-today { position: absolute; top: 44px; bottom: 0; left: 58%; z-index: 4; width: 2px; background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.todo-help-planning-today i { position: absolute; top: -4px; left: -4px; color: #ef4444; font-size: 0.62rem; }
.todo-help-planning-today small { position: absolute; top: 7px; left: 5px; color: #ef4444; font-size: 0.5rem; font-weight: 900; white-space: nowrap; }
.todo-help-planning-task { position: absolute; left: 14%; z-index: 3; height: 26px; }
.todo-help-planning-task:nth-of-type(5) { top: 78px; width: 34%; }
.todo-help-planning-task:nth-of-type(6) { top: 108px; left: 32%; width: 42%; }
.todo-help-planning-task:nth-of-type(7) { top: 138px; left: 52%; width: 24%; }
.todo-help-planning-task > i, .todo-help-planning-task > strong { position: absolute; left: -7px; top: 9px; z-index: 2; width: 14px; height: 14px; transform: rotate(45deg); border: 2px solid #fff; border-radius: 3px; background: #3b82f6; box-shadow: 0 2px 5px rgba(15,23,42,0.2); }
.todo-help-planning-task > strong { width: 20px; height: 20px; top: 6px; transform: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.56rem; }
.todo-help-planning-task--red > strong { background: #ef4444; }
.todo-help-planning-task--green > strong { background: #10b981; }
.todo-help-planning-task b { position: absolute; top: 0; left: 10px; padding: 3px 6px; border: 1px solid rgba(59,130,246,0.18); border-radius: 6px; background: rgba(255,255,255,0.92); color: #334155; font-size: 0.56rem; white-space: nowrap; }
.todo-help-planning-task em { position: absolute; top: 14px; left: 0; width: 100%; height: 4px; border-radius: 99px; background: #3b82f6; }
.todo-help-planning-task--red em { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.todo-help-planning-task--green em { background: #10b981; }

@media (max-width: 900px) {
    .todo-help-view-card--planning { grid-column: auto; }
}

/* Responsive improvements for Kanban and Table inside help modal */
@media (max-width: 900px) {
    .todo-help-demo-board {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
        padding: 12px;
    }
    .todo-help-demo-column { min-height: 160px; }
    .todo-help-demo-column-title { font-size: 0.62rem; }

    /* Make mini table readable on mobile: stack cells vertically */
    .todo-help-mini-table {
        display: block;
        border-radius: 10px;
        overflow: hidden;
    }
    .todo-help-mini-table > * { display: block; padding: 10px 12px; }
    .todo-help-mini-table b { display:block; margin-bottom:6px; }

    /* Hide large filter panels and show a compact toggle */
    .todo-help-filter-panel { display: none !important; }
    .todo-help-filter-toggle { display: inline-flex; align-items: center; gap:8px; padding:8px 10px; border-radius:10px; background: linear-gradient(90deg,#3b82f6,#8b5cf6); color:#fff; border:none; cursor:pointer; box-shadow:0 8px 18px rgba(59,130,246,0.18); }
    .todo-help-filter-modal {
        position: absolute;
        left: 50%; top: 50%; transform: translate(-50%,-50%);
        width: min(360px, 92%);
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: 12px;
        box-shadow: 0 24px 60px rgba(2,6,23,0.4);
        padding: 14px;
        z-index: 9999;
    }
    .todo-help-filter-modal .close { position: absolute; right:10px; top:8px; border:none; background:transparent; color:var(--text-muted); }
}


/* Base Utility Classes */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, var(--orb1), transparent 68%);
    top: -220px;
    left: -200px;
    filter: blur(70px);
    animation: orbFloat1 22s ease-in-out infinite;
}

.orb-2 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--orb2), transparent 68%);
    bottom: -160px;
    right: -160px;
    filter: blur(65px);
    animation: orbFloat2 26s ease-in-out infinite;
}

.badge-pill {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 100px;
    background: var(--badge-bg);
    border: 1px solid var(--badge-bd);
    color: var(--accent1);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.page-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

    .page-title .accent {
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

/* --- Responsive Todo List Logic --- */
@media (max-width: 900px) {
    .todo-main-column { padding: 12px !important; }

    .cosmos-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .cosmos-header-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Modal-like filters and sidebar */
    .cosmos-filters-glass,
    .todo-side-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: blur(25px) saturate(1.8) !important;
        -webkit-backdrop-filter: blur(25px) saturate(1.8) !important;
        z-index: 10000 !important;
        display: none; /* Controlled by inline-style in TS */
        flex-direction: column !important;
        padding: 24px !important;
        overflow-y: auto !important;
    }

    .cosmos-filters-glass.open,
    .todo-side-panel.open {
        display: flex !important;
        animation: cosmosFadeIn 0.3s ease-out;
    }

    .filter-group { width: 100% !important; }

    .btn-mobile-only {
        display: flex !important;
        align-items: center;
        width: 100%;
    }

    /* Board adjustments */
    .cosmos-board {
        padding: 5px !important;
    }
    .cosmos-col {
        min-width: 85vw !important;
    }
}

/* Modal and Blur styles */
.cosmos-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2,6,23,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(12px) saturate(1.8);
    -webkit-backdrop-filter: blur(12px) saturate(1.8);
    animation: cosmosFadeIn 0.3s ease-out;
}

.cosmos-modal {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 32px 80px rgba(2,6,23,0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 90%;
    animation: cosmosModalScaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Import Tunnel Styles */
.import-tunnel-step {
    animation: stepIn 0.4s ease-out both;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.import-preview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}
.import-preview-table th, .import-preview-table td {
    border: 1px solid var(--card-border);
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}
.import-preview-table th {
    background: #f8fafc;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 2px solid var(--accent1) !important;
}

.mapping-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.mapping-targets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mapping-drop-zone {
    padding: 12px 16px;
    background: rgba(248,250,252,0.8);
    border: 2px dashed rgba(59,130,246,0.2);
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.mapping-drop-zone.drag-over {
    border-color: var(--accent1);
    background: rgba(59,130,246,0.05);
}

.mapping-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.draggable-header {
    background: var(--grad);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: grab;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin: 4px;
    box-shadow: 0 4px 10px rgba(59,130,246,0.2);
}

.draggable-header:active { cursor: grabbing; }

.header-source-pool {
    background: rgba(15,23,42,0.02);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
}

/* Drag & drop visual helpers for import mapping */
.header-drag-over {
    outline: 2px dashed var(--accent1);
    background: rgba(59,130,246,0.04);
}

.mapping-assigned {
    animation: mappingPulse 1s ease-out;
}

@keyframes mappingPulse {
    0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.18); }
    70% { box-shadow: 0 0 0 8px rgba(59,130,246,0.02); }
    100% { box-shadow: none; }
}

.mapping-label[draggable="true"] { cursor: grab; }
.mapping-label[draggable="true"]:active { cursor: grabbing; }

.assigned-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--accent2);
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
}


@keyframes cosmosFadeIn { from { opacity: 0; } to { opacity: 1; } }

.glass-card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.glass-card-line {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--line1) 40%, var(--line2) 60%, transparent);
    pointer-events: none;
    z-index: 2;
}

.cosmos-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(248,250,252,0.90);
    border: 1px solid rgba(59,130,246,0.22);
    border-radius: 10px;
    color: #0f172a;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

    .cosmos-input:focus {
        border-color: rgba(59, 130, 246, 0.55);
        background: rgba(59, 130, 246, 0.06);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
    }

.add-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .add-field-group label {
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--accent1);
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

.btn-danger-cosmos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: red;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59,130,246,0.30);
    transition: transform 0.22s, box-shadow 0.22s, filter 0.22s;
    text-decoration: none;
}

.btn-danger-cosmos:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.45);
    filter: brightness(1.06);
}
.btn-primary-cosmos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59,130,246,0.30);
    transition: transform 0.22s, box-shadow 0.22s, filter 0.22s;
    text-decoration: none;
}

    .btn-primary-cosmos:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(59,130,246,0.45);
        filter: brightness(1.06);
    }

.btn-ghost-cosmos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,0.14);
    background: rgba(15,23,42,0.04);
    color: var(--text) !important;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    text-decoration: none;
}

    .btn-ghost-cosmos:hover:not(:disabled) {
        background: rgba(15,23,42,0.09);
        border-color: rgba(15,23,42,0.24);
        transform: translateY(-1px);
    }
            .btn-toolbar { padding: 8px 16px; border-radius: 10px; border: 1px solid rgba(15,23,42,0.1); cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all 0.2s; white-space: nowrap; }
        .btn-toolbar:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--accent1); box-shadow: 0 2px 8px rgba(59,130,246,0.15); }
.status-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(16,185,129,0.10);
    border: 1px solid rgba(16,185,129,0.28);
    color: #047857;
}


.modal-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,0.14);
    background: rgba(15,23,42,0.04);
    color: var(--text) !important;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    text-decoration: none;
}

    .modal-btn-ghost:hover:not(:disabled) {
        background: rgba(15,23,42,0.09);
    }

/* Badge: new (top-right on sidebar items) */
.ifcv2-tb-badge-new {
    position: absolute;
    top: 4px;
    right: 123px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62em;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    animation: ifcv2BadgePulse 1.8s ease-in-out infinite;
    opacity:0.7;
}

@keyframes ifcv2BadgePulse {
    0% { transform: scale(1); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
    50% { transform: scale(1.06); box-shadow: 0 6px 12px rgba(239,68,68,0.16); }
    100% { transform: scale(1); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
}
        border-color: rgba(15,23,42,0.24);
        transform: translateY(-1px);
    }
.status-warn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #b91c1c;
}

.cosmos-spinner-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.cosmos-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(59,130,246,0.1);
    border-top-color: var(--accent1);
    border-radius: 50%;
    animation: cosmosSpin 0.8s linear infinite;
}

@keyframes cosmosSpin {
    to {
        transform: rotate(360deg);
    }
}

.cosmos-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cosmos-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(59,130,246,0.15);
    background: rgba(255,255,255,0.70);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .cosmos-page-btn:hover:not(:disabled) {
        background: var(--grad);
        color: #fff;
        border-color: transparent;
        transform: translateY(-2px);
    }

.cosmos-page-btn--active {
    background: var(--grad) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.cosmos-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Cosmos Notifications */
.cosmos-notification-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: 100%;
    max-width: 450px;
    align-items: center;
}

.cosmos-notification {
    pointer-events: auto;
    width: 90%;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: notificationIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    position: relative;
    overflow: hidden;
}

.cosmos-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--grad);
}

.cosmos-notification.error::before {
    background: #ef4444;
}

.cosmos-notification-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cosmos-notification-content {
    flex: 1;
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.cosmos-notification.fade-out {
    animation: notificationOut 0.4s ease forwards;
}

@keyframes notificationIn {
    from { opacity: 0; transform: translateY(-40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notificationOut {
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* Oscillation animation for validation feedback */
@keyframes cosmosShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.shake-error {
    animation: cosmosShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Tag Tabs for Kanban Board */
.tag-tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.4);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

.tag-tab {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.6);
    color: var(--text-muted);
    border: 1px solid rgba(15,23,42,0.06);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .tag-tab:hover {
        background: white;
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .tag-tab.active {
        background: var(--grad);
        color: white !important;
        border: none;
        box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    }

        .tag-tab.active i {
            color: white !important;
        }

/* Custom Modal Stylings */
.cosmos-modal .rz-dialog {
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(1.8);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Blur the background behind the dialog */
.rz-dialog-mask {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.rz-dialog-titlebar {
    background: var(--grad) !important;
    color: white !important;
}

/* Cosmos DataGrid / Table Improvements */
.cosmos-table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(18px) saturate(1.5);
    margin-top: 10px;
}

.cosmos-table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    color: var(--text);
}

    .cosmos-table-modern th {
        background: rgba(248, 250, 252, 0.8);
        padding: 14px 16px;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        border-bottom: 2px solid rgba(59, 130, 246, 0.1);
        text-align: left;
    }

    .cosmos-table-modern td {
        padding: 16px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.05);
        vertical-align: middle;
        transition: background 0.2s;
    }

    .cosmos-table-modern tr:last-child td {
        border-bottom: none;
    }

    .cosmos-table-modern tr:hover td {
        background: rgba(59, 130, 246, 0.03);
    }

/* Specific helper for the import horizontal scroll */
.import-preview-container {
    flex: 1;
    overflow-x: auto;
    padding-bottom: 4px; 
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.01);
}

.top-scrollbar-container {
    overflow-x: auto;
    overflow-y: hidden;
    height: 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.02);
}

.top-scrollbar-content {
    height: 1px;
}

/* Indicators and labels for the import start row */
.start-row-selected {
    background: rgba(59, 130, 246, 0.05) !important;
    position: relative;
}

.start-row-indicator {
    width: 32px;
    text-align: center;
    color: var(--accent1);
    font-size: 1.1rem;
    border-right: 2px solid var(--accent1) !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.start-row-label {
    position: absolute;
    left: 40px;
    top: -8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 20;
}

.row-selectable {
    cursor: pointer;
    transition: background 0.15s;
}
.row-selectable:hover {
    background: rgba(59, 130, 246, 0.03);
}

/* Custom Scrollbars Cosmos Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent1);
}

/* Occurrence header type tag */
.occ-type-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0.95;
    border: 1px solid rgba(15,23,42,0.06);
}

.tz-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.95;
}

/* Matrix specific */
.matrix-table { width:100%; border-collapse: collapse; }
.matrix-th-occ { vertical-align: top; }
.matrix-td-cell { vertical-align: middle; }

/* Filters Card Glassmorphism */
.cosmos-filters-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-label-modern {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent1);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
    display: block;
}

/* --- Improved multi-image upload styles --- */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.25rem;
    max-height: 480px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.02);
    border-radius: 16px;
    border: 1px inset rgba(0, 0, 0, 0.05);
}

.upload-item {
    position: relative;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: uploadItemIn 0.4s ease-out;
}

@keyframes uploadItemIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.upload-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12);
    border-color: var(--accent1);
}

.upload-item--duplicate {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

.upload-item--success {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.upload-item-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.upload-item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.upload-item:hover .upload-item-img {
    transform: scale(1.1);
}

.upload-item-info {
    padding: 8px 4px 4px;
}

.upload-item-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.upload-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    z-index: 10;
    transition: all 0.2s ease;
}

    .upload-remove-btn:hover {
        background: #dc2626;
        transform: scale(1.1) rotate(90deg);
    }

.upload-status-badge {
    position: absolute;
    bottom: 38px;
    right: 10px;
    z-index: 5;
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

.upload-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 8;
    border-radius: 16px;
}


/* ==========================================================================
   MATRICE D'ATTRIBUTION DPGF (Cosmos Light)
   ========================================================================== */

.attr-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 58px);
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
    z-index: 1;
}

.attr-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2;
    padding: 14px 20px;
    justify-content: center;
}

.attr-tabs {
    display: flex;
    align-items: center;
    flex: 1 1 360px;
    min-width: 360px;
}

.attr-lot-selector {
    position: relative;
    display: flex;
    align-items: center;
    width: 300px;
    min-height: 30px;
    padding: 0 12px 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(59, 130, 246, 0.16);

    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

.attr-lot-selector-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 6px 16px rgba(59,130,246,0.22);
}

.attr-lot-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 1;
    width: 100%;
    padding: 10px 34px 10px 12px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 800;
    outline: none;
    cursor: pointer;
}

.attr-lot-select-chevron {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
}

.attr-lot-selector:hover {
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 28px rgba(59,130,246,0.12);
}

.attr-lot-selector:focus-within {
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10), inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 28px rgba(59,130,246,0.12);
}

.attr-lot-select option {
    color: var(--text);
    background: #fff;
}

.filter-group {
    display: flex;
    gap: 14px;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.filter-group-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.filter-group-actions #view-mode-select {
    min-width: 162px;
}

.filter-group-actions #open-filters-btn {
    min-height: 42px;
}

.filter-group-actions #filters-status-badge {
    white-space: nowrap;
}

.viewer-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.08);
}

.viewer-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.viewer-mode-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text);
}

.viewer-mode-btn.active {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
}

.viewer-mode-btn:disabled {
    opacity: 1;
    cursor: default;
}

.viewer-mode-btn-icon {
    min-width: 38px;
    padding: 0 10px;
}

.viewer-mode-btn-icon i {
    font-size: 0.95rem;
}

.attr-content {
    display: flex;
    gap: 0; /* Remove gap to make resizer flush */
    flex-grow: 1;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.attr-viewer-col {
    flex: 0 0 var(--viewer-width, 42%);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: flex 0s; /* No transition for smooth drag */
}

.attr-viewer-col.hidden {
    display: none !important;
}

.viewer-init-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.attr-resizer {
    flex: 0 0 8px;
    width: 8px;
    cursor: col-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    position: relative;
}

.attr-resizer::after {
    content: "";
    width: 2px;
    height: 40px;
    background: var(--card-border);
    border-radius: 2px;
    transition: background 0.2s, height 0.2s;
}

.attr-resizer:hover {
    background: rgba(59, 130, 246, 0.1);
}

.attr-resizer:hover::after {
    background: var(--accent1);
    height: 60px;
}

.attr-matrix-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Viewer SVG */
.viewer-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-svg {
    width: 100%;
    height: 100%;
}

.viewer-path {
    cursor: pointer;
    transition: all 0.2s ease;
    stroke: var(--text-muted);
    stroke-width: 1px;
    opacity: 0.7;
}

    .viewer-path:hover, .viewer-path.highlighted {
        opacity: 1;
        stroke: var(--accent1);
        stroke-width: 3px;
        filter: drop-shadow(0px 4px 6px rgba(59,130,246,0.3));
        z-index: 10;
    }

/* Table Matrice */
/*.matrix-container {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
}

.matrix-th-corner {
    position: sticky;
    top: 0;
    left: 0;
    background: var(--card-bg);
    z-index: 10;
    border-bottom: 2px solid var(--card-border);
    border-right: 2px solid var(--card-border);
    min-width: 250px;
    width: 250px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.matrix-th-occ {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 5;
    border-bottom: 2px solid var(--card-border);
    min-width: 80px;
    max-width: 120px;
    text-align: center;
    padding: 10px 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    border-right: 1px solid rgba(59,130,246,0.1);
    backdrop-filter: blur(10px);
}

    .matrix-th-occ:hover, .matrix-th-occ.col-highlight {
        background: var(--badge-bg);
    }

.occ-header-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    color: var(--text);
}

.tz-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 100px;
    color: #fff;
    display: inline-block;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matrix-td-item {
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 4;
    border-right: 2px solid var(--card-border);
    border-bottom: 1px solid rgba(59,130,246,0.1);
    padding: 10px 12px;
    font-size: 0.82rem;
    backdrop-filter: blur(10px);
}

    .matrix-tr:hover .matrix-td-item, .matrix-td-item.row-highlight {
        background: var(--badge-bg);
    }

.matrix-td-cell {
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(59,130,246,0.1);
    border-right: 1px solid rgba(59,130,246,0.1);
    position: relative;
    padding: 6px;
}

    .matrix-td-cell.cross-highlight {
        background: rgba(59,130,246,0.04);
    }

.matrix-node {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(59,130,246,0.3);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    margin: auto;
}

    .matrix-node:hover {
        transform: scale(1.2);
        border-color: var(--accent1);
        background: var(--badge-bg);
        box-shadow: 0 2px 8px rgba(59,130,246,0.3);
    }

    .matrix-node.active {
        background: var(--grad);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    }

    .matrix-node.active::after {
        content: "\2713";
        font-size: 11px;
        font-weight: bold;
    }*/
/* Attribution DPGF Specific Layout */


.attr-filters {
    padding: 1.25rem !important;
    max-height: 185px;
    height: 185px;
    min-height: 185px;
}

.attr-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    border-radius: 14px;
}

.attr-tab {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-muted);
    border: 1px solid rgba(15, 23, 42, 0.04);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attr-tab:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: var(--accent1);
}

.attr-tab.active {
    background: var(--grad);
    color: #fff !important;
    border: none;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.32);
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.attr-content {
    display: flex;
    gap: 0; /* Remove gap to make resizer flush */
    flex-grow: 1;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.attr-viewer-col {
    flex: 0 0 var(--viewer-width, 42%);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: flex 0s; /* No transition for smooth drag */
}

.attr-viewer-col.hidden {
    display: none !important;
}

.attr-resizer {
    flex: 0 0 8px;
    width: 8px;
    cursor: col-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
    position: relative;
}

.attr-resizer::after {
    content: "";
    width: 2px;
    height: 40px;
    background: var(--card-border);
    border-radius: 2px;
    transition: background 0.2s, height 0.2s;
}

.attr-resizer:hover {
    background: rgba(59, 130, 246, 0.1);
}

.attr-resizer:hover::after {
    background: var(--accent1);
    height: 60px;
}

.attr-matrix-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Viewer SVG */
.viewer-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-svg {
    width: 100%;
    height: 100%;
}

.viewer-path {
    cursor: pointer;
    transition: all 0.2s ease;
    stroke: var(--text-muted);
    stroke-width: 1px;
    opacity: 0.7;
}

    .viewer-path:hover, .viewer-path.highlighted {
        opacity: 1;
        stroke: var(--accent1);
        stroke-width: 3px;
        filter: drop-shadow(0px 4px 6px rgba(59,130,246,0.3));
        z-index: 10;
    }

/* Table Matrice */
/*.matrix-container {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
}

.matrix-th-corner {
    position: sticky;
    top: 0;
    left: 0;
    background: var(--card-bg);
    z-index: 10;
    border-bottom: 2px solid var(--card-border);
    border-right: 2px solid var(--card-border);
    min-width: 250px;
    width: 250px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.matrix-th-occ {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 5;
    border-bottom: 2px solid var(--card-border);
    min-width: 80px;
    max-width: 120px;
    text-align: center;
    padding: 10px 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    border-right: 1px solid rgba(59,130,246,0.1);
    backdrop-filter: blur(10px);
}

    .matrix-th-occ:hover, .matrix-th-occ.col-highlight {
        background: var(--badge-bg);
    }

.occ-header-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    color: var(--text);
}

.tz-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 100px;
    color: #fff;
    display: inline-block;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matrix-td-item {
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 4;
    border-right: 2px solid var(--card-border);
    border-bottom: 1px solid rgba(59,130,246,0.1);
    padding: 10px 12px;
    font-size: 0.82rem;
    backdrop-filter: blur(10px);
}

    .matrix-tr:hover .matrix-td-item, .matrix-td-item.row-highlight {
        background: var(--badge-bg);
    }

.matrix-td-cell {
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(59,130,246,0.1);
    border-right: 1px solid rgba(59,130,246,0.1);
    position: relative;
    padding: 6px;
}

    .matrix-td-cell.cross-highlight {
        background: rgba(59,130,246,0.04);
    }

.matrix-node {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(59,130,246,0.3);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    margin: auto;
}

    .matrix-node:hover {
        transform: scale(1.2);
        border-color: var(--accent1);
        background: var(--badge-bg);
        box-shadow: 0 2px 8px rgba(59,130,246,0.3);
    }

    .matrix-node.active {
        background: var(--grad);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    }

    .matrix-node.active::after {
        content: "\2713";
        font-size: 11px;
        font-weight: bold;
    }
/* Styles pour les notifications Toast */
#cosmos-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cosmos-toast {
    min-width: 250px;
    padding: 12px 20px;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-left: 5px solid #3b82f6;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.3s forwards ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cosmos-toast.success {
        border-left-color: #10b981;
    }

    .cosmos-toast.error {
        border-left-color: #ef4444;
    }

    .cosmos-toast.info {
        border-left-color: #f59e0b;
    }

    .cosmos-toast.fade-out {
        animation: slideOutToast 0.3s forwards ease-in;
    }

@keyframes slideInToast {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToast {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
/* Style pour la pastille M */
.badge-manuel {
    background-color: #E91E63; /* Rose framboise / fuchsia */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-right: 6px;
    line-height: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Curseur pointer uniquement quand l'avancement est manuel pour indiquer qu'on peut cliquer */
.progress-clickable {
    cursor: pointer;
    transition: transform 0.1s ease;
}

    .progress-clickable:hover {
        transform: scale(1.02); /* L�ger effet de zoom au survol */
    }

/* Stepper styles for import tunnel visual progress indicator */
.import-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 20px;
}
.import-stepper .import-step-connector {
    flex: 1;
    height: 2px;
    background: rgba(15,23,42,0.12);
    margin: 0 8px;
    min-width: 20px;
}
.import-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
    opacity: 0.55;
    transition: opacity 0.3s;
}
.import-step-item.active,
.import-step-item.completed {
    opacity: 1;
}
.import-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(15,23,42,0.08);
    color: var(--text-muted);
    border: 2px solid transparent;
    transition: all 0.3s;
}
.import-step-item.active .import-step-circle {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}
.import-step-item.completed .import-step-circle {
    background: #10b981;
    color: #fff;
}
.import-step-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.import-step-item.active .import-step-label {
    color: var(--accent1);
}
.import-step-item.completed .import-step-label {
    color: #047857;
}
/* Type Badges matrix */
.occ-type-pill {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.occ-type-pill.type-zone { background-color: rgb(209, 250, 229); color: #065f46; }
.occ-type-pill.type-mur { background-color: rgb(253, 230, 138); color: #92400e; }
.occ-type-pill.type-objet { background-color: rgb(219, 234, 254); color: #1e40af; }
/* Todo List Help Dialog Styles */
.todo-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(239,246,255,0.72), rgba(245,243,255,0.78));
    backdrop-filter: blur(12px);
    animation: todoHelpFadeIn 0.28s ease-out;
}

.todo-help-modal {
    width: min(1040px, 100%);
    max-height: min(860px, 92vh);
    overflow: auto;
    background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(239,246,255,0.94) 52%, rgba(245,243,255,0.95));
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(18px) saturate(1.5);
    animation: todoHelpModalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.todo-help-header { display: flex; justify-content: space-between; gap: 24px; padding: 30px 34px 22px; background: linear-gradient(135deg, rgba(59,130,246,0.09), rgba(139,92,246,0.10)); border-bottom: 1px solid var(--card-border); }
.todo-help-header h2 { margin: 8px 0; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 900; }
.todo-help-header h2 span { background: linear-gradient(135deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.todo-help-header p { max-width: 680px; margin: 0; color: var(--text-muted); line-height: 1.55; }
.todo-help-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--accent1); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.todo-help-close { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(15,23,42,0.12); border-radius: 10px; background: rgba(255,255,255,0.65); color: var(--text-muted); cursor: pointer; }
.todo-help-close:hover { background: rgba(239,68,68,0.1); color: #dc2626; }
.todo-help-content { min-height: 430px; padding: 32px 38px; font-size: 1rem; }
.todo-help-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.todo-help-step { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--card-border); border-radius: 14px; background: rgba(255,255,255,0.55); }
.todo-help-step-number { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.todo-help-step h3, .todo-help-panel h3 { margin: 0 0 6px; font-size: 0.93rem; font-weight: 800; }
.todo-help-step p { margin: 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }
.todo-help-visuals { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-top: 20px; }
.todo-help-panel { padding: 18px; border: 1px solid var(--card-border); border-radius: 16px; background: rgba(248,250,252,0.65); }
.todo-help-panel h3 { color: var(--accent1); }
.todo-help-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.todo-help-kanban > div { min-height: 100px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.72); }
.todo-help-kanban b { display: block; margin-bottom: 8px; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; }
.todo-help-card { display: block; padding: 8px; border-left: 3px solid; border-radius: 6px; background: #fff; font-size: 0.7rem; font-weight: 700; box-shadow: 0 2px 8px rgba(15,23,42,0.06); }
.todo-help-card--slate { border-color: #94a3b8; }
.todo-help-card--blue { border-color: #3b82f6; }
.todo-help-card--green { border-color: #10b981; }
.todo-help-annotation { display: block; margin-top: 7px; color: var(--accent1); font-size: 0.62rem; font-style: normal; font-weight: 700; }
.todo-help-view-description { margin: 10px 0 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }
.todo-help-filter-panel { margin-top: 16px; }
.todo-help-filter-example { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 14px; }
.todo-help-filter-example span { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid rgba(59,130,246,0.2); border-radius: 8px; background: rgba(59,130,246,0.08); color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
.todo-help-caption { margin: 12px 0 0; color: var(--text-muted); font-size: 0.72rem; }
.todo-help-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.todo-help-tips div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 12px; border-radius: 12px; background: rgba(59,130,246,0.06); }
.todo-help-tips i { grid-row: span 2; color: var(--accent1); }
.todo-help-tips strong { font-size: 0.78rem; }
.todo-help-tips span { color: var(--text-muted); font-size: 0.7rem; line-height: 1.4; }
.todo-help-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 34px; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.78rem; }
.todo-help-footer span { display: inline-flex; align-items: center; gap: 6px; }
.todo-help-progress { height: 4px; background: rgba(59,130,246,0.1); }
.todo-help-progress span { display: block; height: 100%; background: var(--grad); transition: width 0.35s ease; }
.todo-help-page { min-width: 48px; justify-content: center; font-weight: 800; color: var(--accent1); }
.todo-help-footer button:disabled { opacity: 0.35; cursor: not-allowed; }
.todo-help-welcome { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.todo-help-new-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid rgba(139,92,246,0.3); border-radius: 100px; background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.16)); color: var(--accent2); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; animation: todoHelpBadgePulse 2s ease-in-out infinite; }
.todo-help-welcome h3 { margin: 22px 0 10px; font-size: clamp(1.5rem, 4vw, 2.35rem); font-weight: 900; background: linear-gradient(135deg, #3b82f6, #8b5cf6);; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.todo-help-welcome p { max-width: 600px; margin: 0; color: var(--text-muted); line-height: 1.6; }
.todo-help-welcome-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0; }
.todo-help-welcome-points span { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--card-border); border-radius: 12px; background: rgba(255,255,255,0.7); color: var(--text); font-size: 0.78rem; font-weight: 700; }
.todo-help-welcome-points i { color: var(--accent1); }
.todo-help-callout { display: flex; align-items: center; gap: 10px; padding: 13px 16px; margin-top:15px; border: 1px solid rgba(59,130,246,0.18); border-radius: 12px; background: rgba(59,130,246,0.07); color: var(--text-muted); font-size: 0.8rem; line-height: 1.45; }
.todo-help-callout i { color: var(--accent1); font-size: 1rem; }
.todo-help-callout--success { margin-top: 20px; border-color: rgba(16,185,129,0.25); background: rgba(16,185,129,0.08); }.todo-help-callout--success i { color: #059669; }
.todo-help-step-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }.todo-help-step-heading h3 { margin: 0 0 7px; font-size: 1.35rem; font-weight: 900; }.todo-help-step-heading p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }.todo-help-step-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; background: var(--grad); color: #fff; font-size: 1.5rem; box-shadow: 0 8px 22px rgba(59,130,246,0.28); }
.todo-help-demo-board { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 10px; padding: 12px; border-radius: 16px; background: rgba(241,245,249,0.7); border: 1px solid var(--card-border); overflow-x: auto; }
.todo-help-demo-column { min-height: 205px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.72); border: 1px solid var(--card-border); }.todo-help-demo-column-title { margin-bottom: 12px; color: var(--text-muted); font-size: 0.65rem; font-weight: 900; text-transform: uppercase; white-space: nowrap; }.todo-help-demo-column-title i { margin-right: 4px; font-size: 0.5rem; }.todo-help-demo-column-title b { float: right; color: var(--text-muted); }.todo-help-demo-column--blue .todo-help-demo-column-title { color: #2563eb; }.todo-help-demo-column--red .todo-help-demo-column-title { color: #dc2626; }.todo-help-demo-column--green .todo-help-demo-column-title { color: #059669; }.todo-help-demo-column--dark .todo-help-demo-column-title { color: #64748b; }
.todo-help-demo-card { position: relative; padding: 13px 11px; border-radius: 9px; background: rgba(255,255,255,0.96); border: 1px solid rgba(59,130,246,0.2); box-shadow: 0 5px 14px rgba(15,23,42,0.12); color: var(--text); font-size: 0.78rem; font-weight: 800; line-height: 1.4; }.todo-help-demo-card span { display: block; margin-top: 10px; color: var(--text-muted); font-size: 0.67rem; font-weight: 600; }.todo-help-demo-card--done { border-left: 3px solid #10b981; }.todo-help-demo-empty { padding-top: 45px; color: var(--text-muted); font-size: 0.75rem; font-style: italic; text-align: center; opacity: 0.75; }
.todo-help-demo-card--moving { animation: todoHelpDragDemo 1.8s cubic-bezier(0.4,0,0.2,1) forwards; z-index: 3; }
.todo-help-demo-card--arriving { animation: todoHelpCardArrive 0.45s cubic-bezier(0.22,1,0.36,1); }
.todo-help-drag-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(139,92,246,0.08); color: var(--text-muted); font-size: 0.78rem; }.todo-help-drag-note i { color: var(--accent2); font-size: 1.1rem; }
.todo-help-views { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }.todo-help-view-card { padding: 16px; border: 1px solid var(--card-border); border-radius: 16px; background: rgba(255,255,255,0.7); }.todo-help-view-card--active { border-color: rgba(59,130,246,0.4); box-shadow: 0 8px 22px rgba(59,130,246,0.1); }.todo-help-view-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--accent1); font-weight: 900; }.todo-help-view-card p { margin: 14px 0 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }.todo-help-mini-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }.todo-help-mini-kanban span { padding: 14px 5px; border-radius: 6px; background: rgba(59,130,246,0.09); color: var(--text-muted); font-size: 0.58rem; font-weight: 800; text-align: center; }.todo-help-mini-table { display: grid; grid-template-columns: 1.5fr 1fr 0.8fr; gap: 1px; overflow: hidden; border: 1px solid var(--card-border); border-radius: 7px; background: var(--card-border); font-size: 0.59rem; }.todo-help-mini-table > * { padding: 8px 5px; background: rgba(255,255,255,0.85); }.todo-help-mini-table b { color: var(--accent1); }.todo-help-status-blue { color: #2563eb; font-weight: 800; }
.todo-help-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.todo-help-summary > div { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--card-border); border-radius: 14px; background: rgba(255,255,255,0.68); }.todo-help-summary i { color: var(--accent1); font-size: 1.3rem; }.todo-help-summary strong { font-size: 0.85rem; }.todo-help-summary span { color: var(--text-muted); font-size: 0.75rem; line-height: 1.45; }
.todo-help-visibility-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }.todo-help-visibility-card { padding: 18px; border: 1px solid var(--card-border); border-radius: 16px; background: rgba(255,255,255,0.7); }.todo-help-visibility-card--private { border-left: 4px solid #10b981; }.todo-help-visibility-card--public { border-left: 4px solid #f59e0b; }.todo-help-visibility-title { display: flex; align-items: center; gap: 8px; font-weight: 900; }.todo-help-visibility-card--private .todo-help-visibility-title { color: #047857; }.todo-help-visibility-card--public .todo-help-visibility-title { color: #b45309; }.todo-help-visibility-card p { min-height: 52px; margin: 12px 0; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }.todo-help-people { display: flex; flex-wrap: wrap; gap: 6px; }.todo-help-people span { padding: 6px 9px; border-radius: 100px; background: rgba(59,130,246,0.08); color: var(--text-muted); font-size: 0.68rem; font-weight: 700; }
.todo-help-side-panel-demo { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0; overflow: hidden; border: 1px solid var(--card-border); border-radius: 16px; background: rgba(255,255,255,0.7); }.todo-help-side-task { display: flex; flex-direction: column; gap: 12px; justify-content: center; padding: 24px; background: rgba(59,130,246,0.06); }.todo-help-side-label { color: var(--text-muted); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }.todo-help-side-task strong { font-size: 0.95rem; line-height: 1.35; }.todo-help-side-status { color: #2563eb; font-size: 0.75rem; font-weight: 800; }.todo-help-side-status i { margin-right: 5px; font-size: 0.5rem; }.todo-help-side-details { display: grid; gap: 12px; padding: 20px; border-left: 1px solid var(--card-border); }.todo-help-side-details b { color: var(--accent1); font-size: 0.82rem; }.todo-help-side-details span { color: var(--text-muted); font-size: 0.76rem; }.todo-help-side-details i { width: 20px; color: var(--accent2); }
.todo-help-content--changing { animation: todoHelpStepIn 0.28s ease-out; }
@keyframes todoHelpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes todoHelpModalIn { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes todoHelpStepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes todoHelpDragDemo { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(16px,-8px) rotate(-2deg) scale(1.03); box-shadow: 0 14px 25px rgba(59,130,246,0.25); } 70% { transform: translate(145px,-8px) rotate(2deg) scale(1.03); } 100% { transform: translate(145px,0) rotate(0); opacity: 1; } }
@keyframes todoHelpCardArrive { from { opacity: 0; transform: translateY(-18px) scale(1.04); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes todoHelpBadgePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.15); } 50% { box-shadow: 0 0 0 8px rgba(139,92,246,0); } }

@media (max-width: 760px) {
    .todo-help-overlay { padding: 10px; }
    .todo-help-header, .todo-help-content, .todo-help-footer { padding-left: 18px; padding-right: 18px; }
    .todo-help-steps, .todo-help-visuals, .todo-help-tips { grid-template-columns: 1fr; }
    .todo-help-views, .todo-help-summary { grid-template-columns: 1fr; }
    .todo-help-visibility-grid, .todo-help-side-panel-demo { grid-template-columns: 1fr; }
    .todo-help-side-details { border-top: 1px solid var(--card-border); border-left: 0; }
    .todo-help-demo-board { grid-template-columns: repeat(5, 145px); }
    .todo-help-footer { align-items: flex-start; flex-direction: column; }
}

/* Todo help modern interaction layer */
.todo-help-overlay {
    padding: clamp(12px, 3vw, 32px);
    background: radial-gradient(circle at 12% 8%, rgba(59,130,246,0.22), transparent 34%), radial-gradient(circle at 90% 92%, rgba(139,92,246,0.2), transparent 36%), rgba(15,23,42,0.58);
    backdrop-filter: blur(18px) saturate(1.2);
}

.todo-help-modal {
    width: min(1080px, 100%);
    max-height: min(900px, 94vh);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 28px;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 30px 100px rgba(15,23,42,0.38), 0 0 0 1px rgba(59,130,246,0.08);
    overflow-x: hidden;
}

.todo-help-header {
    position: relative;
    min-height: 142px;
    padding: 30px clamp(22px, 4vw, 42px) 26px;
    background: linear-gradient(135deg, rgba(239,246,255,0.98), rgba(245,243,255,0.98));
    overflow: hidden;
}

.todo-help-header::after {
    position: absolute;
    width: 240px;
    height: 240px;
    right: -70px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.22), transparent 68%);
    content: '';
    pointer-events: none;
}

.todo-help-header > div,
.todo-help-close { position: relative; z-index: 1; }
.todo-help-header h2 { margin: 12px 0 8px; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -0.04em; }
.todo-help-header p { font-size: 0.92rem; }
.todo-help-badge { color: #7c3aed; font-size: 0.7rem; }
.todo-help-close { transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.todo-help-close:hover { transform: rotate(8deg) scale(1.06); }

.todo-help-progress { height: 5px; background: rgba(59,130,246,0.1); }
.todo-help-progress span { background: linear-gradient(90deg, #06b6d4, #3b82f6 45%, #8b5cf6); box-shadow: 0 0 14px rgba(59,130,246,0.45); }
.todo-help-content { min-height: 430px; padding: clamp(24px, 4vw, 42px); margin-top:15px; }
.todo-help-content--changing { animation: todoHelpStepIn 0.32s cubic-bezier(0.22,1,0.36,1); }

.todo-help-welcome { min-height: 360px; gap: 2px; }
.todo-help-new-badge { background: linear-gradient(135deg, #f97316, #ec4899); border-color: transparent; color: #fff; box-shadow: 0 10px 26px rgba(236, 72, 153, 0.3); }
.todo-help-welcome h3 { margin-top: 24px; letter-spacing: -0.04em; }
.todo-help-welcome-points span,
.todo-help-view-card,
.todo-help-summary > div,
.todo-help-visibility-card { transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease; }
.todo-help-welcome-points span:hover,
.todo-help-view-card:hover,
.todo-help-summary > div:hover,
.todo-help-visibility-card:hover { transform: translateY(-3px); border-color: rgba(59,130,246,0.35); box-shadow: 0 12px 28px rgba(59,130,246,0.12); }

.todo-help-step-heading { align-items: flex-start; margin-bottom: 28px; }
.todo-help-step-heading h3 { font-size: clamp(1.18rem, 2vw, 1.5rem); letter-spacing: -0.025em; }
.todo-help-step-icon { width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, #3b82f6, #8b5cf6); box-shadow: 0 12px 26px rgba(59,130,246,0.28); }
.todo-help-demo-board { padding: 14px; gap: 12px; border-radius: 20px; background: rgba(241,245,249,0.8); }
.todo-help-demo-column { min-height: 220px; padding: 12px; border-radius: 15px; background: rgba(255,255,255,0.86); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); }
.todo-help-demo-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.todo-help-demo-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,0.16); }
.todo-help-drag-note { border: 1px solid rgba(139,92,246,0.14); background: linear-gradient(90deg, rgba(139,92,246,0.1), rgba(59,130,246,0.06)); }

.todo-help-visibility-card { position: relative; overflow: hidden; padding: 20px; }
.todo-help-visibility-card::after { position: absolute; width: 110px; height: 110px; right: -45px; bottom: -55px; border-radius: 50%; content: ''; opacity: 0.12; pointer-events: none; }
.todo-help-visibility-card--private::after { background: #10b981; }
.todo-help-visibility-card--public::after { background: #f59e0b; }
.todo-help-visibility-card--private .todo-help-visibility-title { color: #047857; }
.todo-help-visibility-card--public .todo-help-visibility-title { color: #c2410c; }
.todo-help-visibility-badge { margin-left: auto; padding: 5px 9px; border-radius: 100px; font-size: 0.61rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.todo-help-visibility-card--private .todo-help-visibility-badge { background: #dcfce7; color: #15803d; }
.todo-help-visibility-card--public .todo-help-visibility-badge { background: #ffedd5; color: #c2410c; }

.todo-help-footer { position: relative; padding: 18px clamp(22px, 4vw, 42px); background: rgba(248,250,252,0.72); }
.todo-help-footer button { min-height: 42px; transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; }
.todo-help-footer button:hover:not(:disabled) { transform: translateY(-2px); }
.todo-help-page { padding: 7px 12px; border: 1px solid rgba(59,130,246,0.16); border-radius: 100px; background: rgba(255,255,255,0.75); }

@media (max-width: 600px) {
    .todo-help-modal { border-radius: 20px; }
    .todo-help-header { min-height: 126px; }
    .todo-help-header p { padding-right: 12px; font-size: 0.82rem; }
    .todo-help-content { min-height: 380px; }
    .todo-help-step-heading { gap: 12px; }
    .todo-help-step-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 1.2rem; }
    .todo-help-visibility-title { align-items: flex-start; flex-wrap: wrap; }
    .todo-help-visibility-badge { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .todo-help-overlay *, .todo-help-overlay *::before, .todo-help-overlay *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

