/* ═══════════════════════════════════════════════════════════════════
   GALAXY COSMIC PROJECTS v1.0
   Panneau de gestion des projets — esthetique creme/desert
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   OVERLAY
   ─────────────────────────────────────────────── */

.cosmic-projects-overlay {
    /* BUMP z-index above toolbar (1200) and other elements */
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    opacity: 0;
    pointer-events: none;
    transition: background 0.25s ease, backdrop-filter 0.25s ease, opacity 0.25s ease;
}

.cosmic-projects-overlay.visible {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    opacity: 1;
    pointer-events: auto;
}

.cosmic-projects-overlay.closing {
    opacity: 0;
    pointer-events: none;
}

/* ───────────────────────────────────────────────
   PANEL
   ─────────────────────────────────────────────── */

.cosmic-projects-panel {
    background: #faf6ee;
    border-radius: 16px;
    width: 92vw;
    max-width: 680px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 8px 32px rgba(90, 74, 47, 0.22),
        0 1px 4px rgba(90, 74, 47, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    animation: cppSlideUp 0.3s ease forwards;
    overflow: hidden;
}

.cosmic-projects-overlay.closing .cosmic-projects-panel {
    animation: cppSlideDown 0.25s ease forwards;
}

/* ───────────────────────────────────────────────
   HEADER
   ─────────────────────────────────────────────── */

.cpp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.15);
}

.cpp-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #3a2e1e;
    letter-spacing: 0.01em;
}

.cpp-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #8b7355;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpp-close:hover {
    background: rgba(139, 115, 85, 0.12);
    color: #5a4a2f;
}

/* ───────────────────────────────────────────────
   LIST CONTAINER (scrollable wrapper for both sections)
   ─────────────────────────────────────────────── */

.cpp-list-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow: hidden;
}

/* ───────────────────────────────────────────────
   SECTION HEADERS
   ─────────────────────────────────────────────── */

.cpp-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 0 8px;
}

.cpp-section + .cpp-section {
    border-left: 1px solid rgba(139, 115, 85, 0.15);
}

.cpp-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 6px;
    position: sticky;
    top: 0;
    background: #faf6ee;
    z-index: 1;
}

.cpp-section-icon {
    font-size: 14px;
    line-height: 1;
}

.cpp-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8b7355;
}

.cpp-section-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    margin-left: auto;
}

/* ───────────────────────────────────────────────
   NEW PROJECT BUTTON
   ─────────────────────────────────────────────── */

.cpp-new-btn {
    margin: 8px 20px 6px;
    padding: 7px 0;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b7355, #6b5a40);
    color: #faf6ee;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(90, 74, 47, 0.18);
    width: calc(100% - 40px);
}

.cpp-new-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(90, 74, 47, 0.28);
}

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

/* ───────────────────────────────────────────────
   SPLIT LAYOUT (columns)
   ─────────────────────────────────────────────── */

.cpp-split-body {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cpp-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.cpp-col-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 6px;
    flex-shrink: 0;
}

.cpp-col-icon {
    font-size: 14px;
    opacity: 0.6;
}

.cpp-col-title {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    opacity: 0.7;
}

.cpp-col-actions {
    padding: 0 14px 6px;
    flex-shrink: 0;
}

.cpp-col-search {
    padding: 0 14px 8px;
    flex-shrink: 0;
}

.cpp-col-search .cpp-search-input {
    width: 100%;
    box-sizing: border-box;
}

.cpp-col-divider {
    width: 1px;
    background: rgba(139, 115, 85, 0.15);
    flex-shrink: 0;
}

.cpp-skin-night .cpp-col-divider {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
    .cpp-split-body {
        flex-direction: column;
    }
    .cpp-col-divider {
        width: auto;
        height: 1px;
    }
}

/* ───────────────────────────────────────────────
   LIST
   ─────────────────────────────────────────────── */

.cpp-list {
    overflow-y: auto;
    padding: 4px 12px 6px;
    flex: 1;
    min-height: 0;
}

.cpp-loading,
.cpp-empty {
    padding: 28px 0;
    text-align: center;
    color: #9a8a6a;
    font-size: 14px;
}

/* ───────────────────────────────────────────────
   PROJECT ITEM
   ─────────────────────────────────────────────── */

.cpp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s;
    cursor: default;
}

.cpp-item:hover {
    background: rgba(139, 115, 85, 0.07);
}

.cpp-item.current {
    border-left: 3px solid #8b7355;
    padding-left: 9px;
    background: rgba(139, 115, 85, 0.05);
}

.cpp-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cpp-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #3a2e1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpp-item-meta {
    font-size: 12px;
    color: #9a8a6a;
}

/* ───────────────────────────────────────────────
   ITEM ACTIONS
   ─────────────────────────────────────────────── */

.cpp-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.cpp-btn-open {
    padding: 4px 14px;
    border: 1px solid rgba(120, 100, 80, 0.25);
    border-radius: 8px;
    background: rgba(120, 100, 80, 0.10);
    color: #8b7e6a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.cpp-btn-open:hover {
    background: rgba(120, 100, 80, 0.18);
    border-color: rgba(120, 100, 80, 0.4);
}

.cpp-badge-active {
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(74, 140, 80, 0.10);
    color: #4a8c50;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cpp-btn-rename,
.cpp-btn-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0.35;
    transition: opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpp-item:hover .cpp-btn-rename,
.cpp-item:hover .cpp-btn-delete {
    opacity: 0.7;
}

.cpp-btn-rename:hover,
.cpp-btn-delete:hover {
    opacity: 1 !important;
    background: rgba(139, 115, 85, 0.1);
}

.cpp-btn-delete:hover {
    background: rgba(200, 60, 60, 0.1);
}

/* ───────────────────────────────────────────────
   STATUS INDICATOR (dans la toolbar)
   ─────────────────────────────────────────────── */

.cosmic-project-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: 12px;
    padding-right: 8px;
}

.cosmic-project-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cosmic-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.3s;
}

.cosmic-status-dot[data-status="saved"] {
    background: #4a8c50;
}

.cosmic-status-dot[data-status="saving"] {
    background: #d4940a;
    animation: cppPulse 1s ease-in-out infinite;
}

.cosmic-status-dot[data-status="modified"] {
    background: #d4940a;
}

.cosmic-status-dot[data-status="loading"],
.cosmic-status-dot[data-status="loaded"] {
    background: #4a7ec5;
    animation: cppPulse 0.8s ease-in-out infinite;
}

.cosmic-status-dot[data-status="error"] {
    background: #c53a3a;
}

/* ───────────────────────────────────────────────
   SCROLLBAR
   ─────────────────────────────────────────────── */

.cpp-list::-webkit-scrollbar {
    width: 5px;
}

.cpp-list::-webkit-scrollbar-track {
    background: transparent;
}

.cpp-list::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.2);
    border-radius: 4px;
}

.cpp-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.35);
}

/* ───────────────────────────────────────────────
   ANIMATIONS
   ─────────────────────────────────────────────── */

@keyframes cppSlideUp {
    from {
        transform: translateY(20px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes cppSlideDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(14px) scale(0.98);
        opacity: 0;
    }
}

@keyframes cppPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ───────────────────────────────────────────────
   RESPONSIVE — stack on small screens
   ─────────────────────────────────────────────── */

@media (max-width: 500px) {
    .cosmic-projects-panel {
        max-width: 460px;
    }

    .cpp-list-container {
        flex-direction: column;
        overflow-y: auto;
    }

    .cpp-section {
        overflow-y: visible;
    }

    .cpp-section + .cpp-section {
        border-left: none;
        border-top: 1px solid rgba(139, 115, 85, 0.12);
    }
}

/* ───────────────────────────────────────────────
   TASK PROJECT ITEMS
   ─────────────────────────────────────────────── */

.cpp-item-task .cpp-item-info {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.cpp-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cpp-btn-open-task {
    padding: 4px 14px;
    border: 1px solid rgba(120, 100, 80, 0.25);
    border-radius: 8px;
    background: rgba(120, 100, 80, 0.10);
    color: #8b7e6a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.cpp-btn-open-task:hover {
    background: rgba(120, 100, 80, 0.18);
    border-color: rgba(120, 100, 80, 0.4);
}

/* ───────────────────────────────────────────────
   TASK PROJECT BANNER (displayed on canvas)
   ─────────────────────────────────────────────── */

.cpp-task-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 5;
    pointer-events: none;
    animation: cppBannerFadeIn 0.5s ease forwards;
}

.cpp-task-banner-icon {
    font-size: 56px;
    line-height: 1;
    opacity: 0.25;
}

.cpp-task-banner-text {
    text-align: center;
}

.cpp-task-banner-name {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.cpp-task-banner-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.15);
    font-style: italic;
}

@keyframes cppBannerFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ───────────────────────────────────────────────
   SCROLLBAR for sections (independent scroll)
   ─────────────────────────────────────────────── */

.cpp-section::-webkit-scrollbar {
    width: 5px;
}

.cpp-section::-webkit-scrollbar-track {
    background: transparent;
}

.cpp-section::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.2);
    border-radius: 4px;
}

.cpp-section::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.35);
}

/* ───────────────────────────────────────────────
   TASK NODE TOOLTIP
   ─────────────────────────────────────────────── */

.cosmic-task-tooltip {
    position: fixed;
    z-index: 10000;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f0f0f5;
    border-radius: 10px;
    padding: 12px 14px;
    max-width: 300px;
    min-width: 160px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Segoe UI", system-ui, sans-serif;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.cosmic-task-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.ctt-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #ffffff;
}

.ctt-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.ctt-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 4px;
    color: #ffffff;
    line-height: 1.4;
}

.ctt-row {
    font-size: 12px;
    color: rgba(240, 240, 245, 0.8);
    margin-bottom: 4px;
    line-height: 1.3;
}

.ctt-date {
    color: rgba(240, 240, 245, 0.6);
    font-size: 11px;
}

.ctt-desc {
    font-size: 11px;
    color: rgba(240, 240, 245, 0.55);
    line-height: 1.4;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ───────────────────────────────────────────────
   TASK INFO PANEL (read-only, 3D click)
   ─────────────────────────────────────────────── */

.task-info-panel-3d {
    position: fixed;
    z-index: 1150;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: min(380px, 33vw);
    height: 100vh;
    background: rgba(20, 20, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f0f0f5;
    border-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 22px 22px;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.45);
    font-family: "Segoe UI", system-ui, sans-serif;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    /* Exit: ease-in — starts soft, accelerates out */
    transition: transform 0.45s cubic-bezier(0.4, 0, 1, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 1, 1);
}

.task-info-panel-3d.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    /* Enter: ease-out — arrives gently, decelerates to stop */
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-info-panel-3d .tip-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(240, 240, 245, 0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.task-info-panel-3d .tip-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.task-info-panel-3d .tip-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    padding-right: 28px;
    color: #ffffff;
}

.task-info-panel-3d .tip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.task-info-panel-3d .tip-project {
    font-size: 11px;
    color: rgba(240, 240, 245, 0.6);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
}

.task-info-panel-3d .tip-assigned {
    font-size: 13px;
    color: rgba(240, 240, 245, 0.85);
    margin-bottom: 4px;
}

.task-info-panel-3d .tip-date {
    font-size: 12px;
    color: rgba(240, 240, 245, 0.5);
    margin-bottom: 4px;
}

.task-info-panel-3d .tip-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0;
}

.task-info-panel-3d .tip-desc {
    font-size: 13px;
    color: rgba(240, 240, 245, 0.7);
    line-height: 1.55;
    min-height: 60px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-info-panel-3d .tip-empty {
    color: rgba(240, 240, 245, 0.3);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   GALAXY PROJECTS PANEL — REFONTE v2.0
   Colonne unique · MAHA VIEW · Tabs · Search · Thème Night/Desert
   ═══════════════════════════════════════════════════════════════════ */

/* ── Layout: colonne unique (override flex-row) ── */
.cpp-list-container {
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
}
.cpp-section {
    flex: unset;
}

/* ── Search bar ── */
.cpp-search-wrap {
    padding: 8px 16px 0;
}
.cpp-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(139,115,85,0.25);
    background: rgba(139,115,85,0.07);
    color: #3a2e1e;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.cpp-search-input::placeholder { color: #9a8a6a; }
.cpp-search-input:focus { border-color: #8b7355; }

/* ── MAHA VIEW button ── */
.cpp-maha-wrap {
    padding: 10px 16px 0;
}
.cpp-maha-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e1245 0%, #251560 100%);
    border: 1px solid rgba(167,139,250,0.2);
    color: #e2d9f3;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(139,92,246,0.15);
}
.cpp-maha-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(139,92,246,0.25);
    border-color: rgba(167,139,250,0.35);
}
.cpp-maha-icon {
    font-size: 22px;
    flex-shrink: 0;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251,191,36,0.6);
}
.cpp-maha-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cpp-maha-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #c4b5fd;
}
.cpp-maha-sub {
    font-size: 11px;
    color: rgba(196,181,253,0.65);
}
.cpp-maha-arrow {
    font-size: 16px;
    color: rgba(196,181,253,0.5);
    flex-shrink: 0;
}

/* ── Divider label ── */
.cpp-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 0;
}
.cpp-divider::before,
.cpp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(139,115,85,0.18);
}
.cpp-divider-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9a8a6a;
    white-space: nowrap;
}

/* ── Tabs ── */
.cpp-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 16px 0;
}
.cpp-tab {
    flex: 1;
    padding: 7px 0;
    border: 1px solid rgba(139,115,85,0.2);
    border-radius: 8px;
    background: transparent;
    color: #9a8a6a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease-out, background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, opacity 0.15s ease-out;
}
.cpp-tab:hover {
    background: rgba(139,115,85,0.08);
    color: #3a2e1e;
}
.cpp-tab.active {
    background: linear-gradient(135deg, #8b7355, #6b5a40);
    border-color: transparent;
    color: #faf6ee;
}

/* ── List scrollable ── */
.cpp-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 0;
}
.cpp-list {
    padding: 4px 12px 8px;
}

/* ── Item info: align icon + text in row ── */
.cpp-item-info {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.cpp-item-info > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   NIGHT SKIN (dark mode) — .cpp-skin-night
   ═══════════════════════════════════════════════════════════════════ */

.cpp-skin-night.cosmic-projects-panel {
    background: rgba(12, 12, 22, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
    color: #e5e7eb;
}
.cpp-skin-night .cpp-header {
    border-bottom-color: rgba(255,255,255,0.07);
}
.cpp-skin-night .cpp-title {
    color: #e5e7eb;
}
.cpp-skin-night .cpp-close {
    color: #6b7280;
}
.cpp-skin-night .cpp-close:hover {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}
.cpp-skin-night .cpp-search-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: #e5e7eb;
}
.cpp-skin-night .cpp-search-input::placeholder { color: #6b7280; }
.cpp-skin-night .cpp-search-input:focus { border-color: #60a5fa; }
.cpp-skin-night .cpp-divider::before,
.cpp-skin-night .cpp-divider::after { background: rgba(255,255,255,0.08); }
.cpp-skin-night .cpp-divider-label { color: #6b7280; }
.cpp-skin-night .cpp-tab {
    border-color: rgba(255,255,255,0.1);
    color: #6b7280;
}
.cpp-skin-night .cpp-tab:hover {
    background: rgba(255,255,255,0.07);
    color: #e5e7eb;
}
.cpp-skin-night .cpp-tab.active {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #ffffff;
}
.cpp-skin-night .cpp-item:hover { background: rgba(255,255,255,0.05); }
.cpp-skin-night .cpp-item.current {
    border-left-color: #60a5fa;
    background: rgba(96,165,250,0.07);
}
.cpp-skin-night .cpp-item-name { color: #e5e7eb; }
.cpp-skin-night .cpp-item-meta { color: #6b7280; }
.cpp-skin-night .cpp-loading,
.cpp-skin-night .cpp-empty { color: #6b7280; }
.cpp-skin-night .cpp-section-header { background: rgba(12,12,22,0.97); }
.cpp-skin-night .cpp-section-title { color: #6b7280; }
.cpp-skin-night .cpp-new-btn {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}
.cpp-skin-night .cpp-btn-open,
.cpp-skin-night .cpp-btn-open-task {
    background: rgba(96, 165, 250, 0.12);
    color: #93b8f0;
    border-color: rgba(96, 165, 250, 0.25);
}
.cpp-skin-night .cpp-btn-open:hover,
.cpp-skin-night .cpp-btn-open-task:hover {
    background: rgba(96, 165, 250, 0.20);
    border-color: rgba(96, 165, 250, 0.4);
}
.cpp-skin-night .cpp-badge-active {
    background: rgba(96,165,250,0.10);
    color: #7dd3a8;
}

/* Scrollbar night */
.cpp-skin-night .cpp-list-container::-webkit-scrollbar { width: 5px; }
.cpp-skin-night .cpp-list-container::-webkit-scrollbar-track { background: transparent; }
.cpp-skin-night .cpp-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   DESERT SKIN override already in original — keep MAHA btn coherent
   ═══════════════════════════════════════════════════════════════════ */
.cpp-skin-desert .cpp-maha-btn {
    background: linear-gradient(135deg, #3d2a0a 0%, #5c3d14 50%, #3d2a0a 100%);
    border-color: rgba(180,140,80,0.4);
    color: #f5ead0;
}
.cpp-skin-desert .cpp-maha-btn:hover {
    box-shadow: 0 8px 28px rgba(180,120,20,0.35);
}
.cpp-skin-desert .cpp-maha-title { color: #f0c060; }
.cpp-skin-desert .cpp-maha-sub { color: rgba(240,192,96,0.6); }
.cpp-skin-desert .cpp-maha-icon { color: #d4a017; }

/* FORCE panel visible when overlay is visible */
.cosmic-projects-overlay.visible .cosmic-projects-panel {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}
