﻿
/* ===== Theme tokens ===== */
/* ===== Theme tokens ===== */
/* ===== WATER / BLUE THEME ===== */
/* ===== RED THEME (LIGHT) ===== */


.ide-app.theme-violet {
    /* Backgrounds */
    --bg0: #f6e9f3; /* very light violet */
    --bg1: #f1dff0;
    --bg2: #ead1e8;
    --bg3: #2f2f35; /* dark neutral for contrast */
    /* Borders */
    --bd: #d7b7d3;
    /* Text */
    --tx: #4b1f45; /* deep plum */
    --mut: #7a4a73; /* muted violet */
    /* Accent */
    --acc: #b455a0; /* IDE accent violet */
    /* Semantic */
    --danger: #8b3a7a; /* violet-danger (NOT red) */
}


.ide-app.theme-red {
    /* Backgrounds */
    --bg0: #f7ecec; /* very light rose */
    --bg1: #f2e0e0; /* panel background */
    --bg2: #ebcfcf; /* cards / tables */
    --bg3: #2f2f32; /* dark neutral anchor */
    /* Borders */
    --bd: #d9b0b0;
    /* Text */
    --tx: #5a2323; /* deep brick (easy on eyes) */
    --mut: #8b4a4a; /* muted rose */
    /* Accent */
    --acc: #c24a4a; /* controlled red accent */
    /* Semantic danger (still red, not violet) */
    --danger: #9f2f2f;
}



.ide-app.theme-green {
    /* Backgrounds */
    --bg0: #e9f7ef; /* soft mint */
    --bg1: #def3e6;
    --bg2: #c9ecd9;
    --bg3: #2f3532;
    /* Borders */
    --bd: #9ddbb7;
    /* Text */
    --tx: #134e3a; /* deep emerald */
    --mut: #4b7f67;
    /* Accent */
    --acc: #2fa66f; /* softer green accent */
    /* Semantic */
    --danger: #8b3a7a; /* reuse violet danger for consistency */
}

.accordion {
    width: 100%;
}
.accordion-item {
    width: 100%;
}

/* ===== WATER THEME (PASTEL) ===== */
.ide-app.theme-water {
    --bg0: #d9e8ff;
    --bg1: #e6f1ff; /* panels */
    --bg2: #d6e9ff; /* hover / activity bar */
    --bg3: #3a3a3a;
    --bd: #b3d4ff; /* borders */

    --tx: #0b2545; /* main text */
    --mut: #4f7db8; /* muted text */

    --acc: #3b82f6; /* accent (tailwind blue-500) */
    --danger: #ef4444;
}

/* ===== Theme tokens ===== */
/* ===== Theme tokens ===== */

.ide-app.theme-dark {
    --bg0: #1e1e1e;
    --bg1: #252526;
    --bg2: #2d2d30;
    --bg3: black;
    --bd: #333;
    --tx: #d4d4d4;
    --mut: #9aa0a6;
    --acc: #4fc3f7;
    --danger: #ff6b6b;
}

.ide-app.theme-light {
    --bg0: #f6f7f9;
    --bg1: #ffffff;
    --bg2: #f0f2f5;
    --bg3: #3a3a3a;
    --bd: #d7dbe0;
    --tx: #111;
    --mut: #667085;
    --acc: #0b67d6;
    --danger: #d92d20;
}

.ide-app {
    height: 100vh;
    background: var(--bg0);
    color: var(--tx);

}
.ide-app {
    --hover-bg: color-mix(in srgb, var(--bg2) 85%, var(--acc));
    --focus-ring: color-mix(in srgb, var(--acc) 40%, transparent);
}
.shell-root {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
/* Prevent accidental text selection while dragging */
.is-resizing {
    user-select: none !important;
    cursor: col-resize !important;
}

.shell-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* IMPORTANT: Sidebar must not 'shrink' or 'grow' on its own */
.shell-left, .shell-right {
    flex: 0 0 auto;
    z-index: 100 !important;
    /* 2. CRITICAL: If this is 'hidden' or 'auto', the flyout will NEVER show */
    overflow: visible !important;
}

/* IMPORTANT: Center must be the only one that is flexible */
.shell-center {
    flex: 1 1 0%;
    min-width: 0; /* Allows it to shrink smaller than content */
}

/* Make resizer easier to grab without moving the layout */
.resizer-col {
    width: 4px;
    z-index: 100;
    position: relative;
    cursor: col-resize;
    flex-shrink: 0;
}

.shell-bottom {
    flex-shrink: 0;
}

/* Resizer Handle Styling */
.resizer {
    background: transparent;
    z-index: 100;
    transition: background 0.2s;
}

    .resizer:hover, .resizer:active {
        background: var(--acc) !important;
    }


.resizer-row {
    height: 4px;
    cursor: row-resize;
    margin: -2px 0;
}

.shell-right .panel-body {
    overflow: visible !important;
}

/* This allows the dropdown to "jump" out of the right panel into the center */
.shell-right,
.shell-right .panel,
.shell-right .panel-body {
    overflow: visible !important;
    z-index: 1000 !important;
}
.shell-topbar {
    height: 44px;
    border-bottom: 1px solid var(--bd);
    background: var(--bg1);
}
/* ===== TopBar ===== */
.topbar {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.brand {
    font-weight: 600;
}

.brand-dot {
    width: 8px;
    height: 8px;
    background: var(--acc);
    border-radius: 0%;
    display: inline-block;
    margin-right: 10px;
}

.sep {
    margin: 0 10px;
    color: var(--mut);
}

.muted {
    color: var(--mut);
}

.small {
    font-size: 12px;
}

.tb-btn {
    background: transparent;
    border: 1px solid var(--bd);
    color: var(--tx);
    padding: 6px 10px;
    border-radius: 0px;
    cursor: pointer;
    margin-left: 6px;
}

    .tb-btn:hover {
        border-color: var(--acc);
    }

    .tb-btn.danger {
        border-color: transparent;
        color: var(--danger);
    }

/* ===== Activity bar ===== */
.activity-bar {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
    gap: 8px;
}

.act-btn {
    width: 34px;
    height: 34px;
    border-radius: 0px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--tx);
    cursor: pointer;
}

    .act-btn:hover {
        border-color: var(--bd);
        background: rgba(255,255,255,0.03);
    }

    .act-btn.active {
        border-color: var(--acc);
    }

/* ===== Panels ===== */
.panel {
    height: 100%;
    display: flex;
    flex: 1; /* CRITICAL */

    flex-direction: column;
    min-width: 0;
}

.panel-title {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bd);
    font-weight: 600;
    background: rgba(255,255,255,0.02);
}

.panel-body {
    padding: 10px 12px;
    overflow: auto;
}

.panel.bottom .panel-body {
    height: 100%;
}

.hr {
    border: none;
    border-top: 1px solid var(--bd);
    margin: 10px 0;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item {
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid var(--bd);
    border-radius: 0px;
    color: var(--tx);
    cursor: pointer;
}

    .list-item:hover {
        border-color: var(--acc);
    }

/* ===== Workspace ===== */
.workspace-host {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workspace-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--bd);
    background: var(--bg1);
}

.tab {
    padding: 6px 10px;
    border: 1px solid var(--bd);
    border-radius: 0px;
    background: transparent;
    color: var(--tx);
    cursor: pointer;
}

    .tab.active {
        border-color: var(--acc);
    }

.workspace-content {
    flex: 1;
    overflow: auto;
    padding: 14px;
}

.workpad h3 {
    margin: 0 0 8px 0;
}

.placeholder {
    margin-top: 12px;
    border: 1px dashed var(--bd);
    border-radius: 0px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mut);
}

/* ===== Console ===== */
.console-pre {
    margin-top: 10px;
    background: var(--bg0);
    border: 1px solid var(--bd);
    padding: 10px;
    border-radius: 0px;
    color: var(--tx);
    min-height: 90px;
}

/* ===== Auth pages ===== */
.auth-page {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 420px;
    background: var(--bg1);
    border: 1px solid var(--bd);
    border-radius: 0px;
    padding: 18px;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0 12px 0;
    border-radius: 0px;
    border: 1px solid var(--bd);
    background: var(--bg0);
    color: var(--tx);
}

.auth-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 0px;
    border: 1px solid var(--acc);
    background: rgba(79,195,247,0.12);
    color: var(--tx);
    cursor: pointer;
}

    .auth-btn:hover {
        background: rgba(79,195,247,0.18);
    }

.auth-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

    .auth-links a {
        color: var(--acc);
        cursor: pointer;
        text-decoration: none;
    }

.auth-error {
    margin-top: 10px;
    color: var(--danger);
    font-size: 13px;
}
.theme-menu {
    position: relative;
}

.theme-dropdown {
    position: absolute;
    bottom: 50px;
    left: 5px;
    background: #222;
    border: 1px solid #444;
    border-radius: 0px;
    min-width: 120px;
    z-index: 1000;
}

.theme-item {
    padding: 6px 10px;
    cursor: pointer;
}

    .theme-item:hover {
        background: #444;
    }

.activity-bar .spacer {
    flex: 1;
}


/* ===== TopBar ===== */
.topbar {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.brand {
    font-weight: 600;
}

.brand-dot {
    width: 8px;
    height: 8px;
    background: var(--acc);
    border-radius: 0%;
    display: inline-block;
    margin-right: 10px;
}

.sep {
    margin: 0 10px;
    color: var(--mut);
}

.muted {
    color: var(--mut);
}

.small {
    font-size: 12px;
}

.tb-btn {
    background: transparent;
    border: 1px solid var(--bd);
    color: var(--tx);
    padding: 6px 10px;
    border-radius: 0px;
    cursor: pointer;
    margin-left: 6px;
}

    .tb-btn:hover {
        border-color: var(--acc);
    }

    .tb-btn.danger {
        border-color: transparent;
        color: var(--danger);
    }

/* ===== Activity bar ===== */
.activity-bar {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
    gap: 8px;
}

.act-btn {
    width: 34px;
    height: 34px;
    border-radius: 0px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--tx);
    cursor: pointer;
}

    .act-btn:hover {
        border-color: var(--bd);
        background: rgba(255,255,255,0.03);
    }

    .act-btn.active {
        border-color: var(--acc);
    }

/* ===== Panels ===== */
.panel {
    height: 100%;
    display: flex;
    flex: 1; /* CRITICAL */

    flex-direction: column;
    min-width: 0;
}

.panel-title {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bd);
    font-weight: 600;
    background: rgba(255,255,255,0.02);
}

.panel-body {
    padding: 10px 12px;
    overflow: auto;
}

.panel.bottom .panel-body {
    height: 100%;
}

.hr {
    border: none;
    border-top: 1px solid var(--bd);
    margin: 10px 0;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item {
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid var(--bd);
    border-radius: 0px;
    color: var(--tx);
    cursor: pointer;
}

    .list-item:hover {
        border-color: var(--acc);
    }

/* ===== Workspace ===== */
.workspace-host {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workspace-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--bd);
    background: var(--bg1);
}

.tab {
    padding: 6px 10px;
    border: 1px solid var(--bd);
    border-radius: 0px;
    background: transparent;
    color: var(--tx);
    cursor: pointer;
}

    .tab.active {
        border-color: var(--acc);
    }

.workspace-content {
    flex: 1;
    overflow: auto;
    padding: 14px;
}

.workpad h3 {
    margin: 0 0 8px 0;
}

.placeholder {
    margin-top: 12px;
    border: 1px dashed var(--bd);
    border-radius: 0px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mut);
}

/* ===== Console ===== */
.console-pre {
    margin-top: 10px;
    background: var(--bg0);
    border: 1px solid var(--bd);
    padding: 10px;
    border-radius: 0px;
    color: var(--tx);
    min-height: 90px;
}

/* ===== Auth pages ===== */
.auth-page {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 420px;
    background: var(--bg1);
    border: 1px solid var(--bd);
    border-radius: 0px;
    padding: 18px;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0 12px 0;
    border-radius: 0px;
    border: 1px solid var(--bd);
    background: var(--bg0);
    color: var(--tx);
}

.auth-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 0px;
    border: 1px solid var(--acc);
    background: rgba(79,195,247,0.12);
    color: var(--tx);
    cursor: pointer;
}

    .auth-btn:hover {
        background: rgba(79,195,247,0.18);
    }

.auth-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

    .auth-links a {
        color: var(--acc);
        cursor: pointer;
        text-decoration: none;
    }

.auth-error {
    margin-top: 10px;
    color: var(--danger);
    font-size: 13px;
}
.theme-menu {
    position: relative;
}

.theme-dropdown {
    position: absolute;
    bottom: 50px;
    left: 5px;
    background: #222;
    border: 1px solid #444;
    border-radius: 0px;
    min-width: 120px;
    z-index: 1000;
}

.theme-item {
    padding: 6px 10px;
    cursor: pointer;
}

    .theme-item:hover {
        background: #444;
    }

.activity-bar .spacer {
    flex: 1;
}




/* Whole panel scrollable */
.nav-panel {
    height: 100%;
    overflow-y: auto;
    padding: 8px 6px;
}

/* Section */
.nav-section {
    margin-bottom: 16px;
}

/* Headers left aligned */
.nav-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--mut);
    margin: 6px 4px 4px;
}

/* List indented */
.nav-list {
    list-style: none;
    padding-left: 14px;
    margin: 0;
}

    /* Items */
    .nav-list li {
        padding: 6px 10px;
        border-radius: 0px;
        cursor: pointer;
        font-size: 13px;
        color: var(--tx);
        transition: all .12s ease;
    }

        /* Hover */
        .nav-list li:hover {
            background: linear-gradient( 90deg, rgba(79,195,247,0.18), rgba(79,195,247,0.05) );
        }

        /* Active */
        .nav-list li.active {
            background: linear-gradient( 90deg, rgba(79,195,247,0.35), rgba(79,195,247,0.08) );
            color: white;
            font-weight: 600;
        }

/* Base item */
/* Base item */
.ide-app .list-item {
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    color: var(--tx);
    cursor: pointer;
    position: relative;
}

    /* Hover */
    .ide-app .list-item:hover {
        background: var(--bg2);
    }

    /* Active selection (modern IDE) */
    .ide-app .list-item.active {
        background: var(--bg1);
        border: 1px solid var(--acc);
        color: var(--tx);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc), transparent 65%);
    }

.nav-list li {
    padding: 6px 12px;
    cursor: pointer;
    color: var(--tx);
}

    .nav-list li:hover {
        background: var(--bg2);
    }

    /* Selected item */
    .nav-list li.active {
        background: var(--bg1);
        border: 1px solid var(--acc);
        color: var(--tx);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc), transparent 70%);
    }
/* ==========================================================================
   1. THEME TOKENS
   ========================================================================== */
:root {
    --font-ui: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --sb-width: 12px; /* Scrollbar width */
}

/* Base App Setup */
.shell-root {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: var(--font-ui);
    font-size: 13px;
    background: var(--bg0);
    color: var(--tx);
}

/* ==========================================================================
   2. THEMES (Redesigned for consistency)
   ========================================================================== */
.theme-dark {
    --bg0: #181818;
    --bg1: #1e1e1e;
    --bg2: #252526;
    --bd: #333;
    --tx: #ccc;
    --mut: #858585;
    --acc: #007acc;
    --danger: #f14c4c;
}

.theme-light {
    --bg0: #f3f3f3;
    --bg1: #ffffff;
    --bg2: #f8f8f8;
    --bd: #ddd;
    --tx: #333;
    --mut: #666;
    --acc: #007acc;
    --danger: #d32f2f;
}

.theme-violet {
    --bg0: #1e1b26;
    --bg1: #252230;
    --bg2: #2d2a3d;
    --bd: #423d5c;
    --tx: #e0def4;
    --mut: #908caa;
    --acc: #c4a7e7;
    --danger: #eb6f92;
}

.theme-water {
    --bg0: #0b121e;
    --bg1: #111b27;
    --bg2: #1b2a3d;
    --bd: #2d4a6d;
    --tx: #d1d9e1;
    --mut: #71839b;
    --acc: #3b82f6;
    --danger: #f87171;
}

.theme-red {
    --bg0: #1a1111;
    --bg1: #241818;
    --bg2: #2e1f1f;
    --bd: #4d3333;
    --tx: #f5e6e6;
    --mut: #a37a7a;
    --acc: #c24a4a;
    --danger: #ff4d4d;
}

.theme-green {
    --bg0: #0d1110;
    --bg1: #121816;
    --bg2: #1a231f;
    --bd: #2a3a34;
    --tx: #e0e6e3;
    --mut: #82968f;
    --acc: #2fa66f;
    --danger: #e67e22;
}

/* ==========================================================================
   3. SHELL LAYOUT (Flexbox Resizable)
   ========================================================================== */

/* Topbar Fixed Height */
.shell-topbar {
    height: 40px;
    background: var(--bg1);
    border-bottom: 1px solid var(--bd);
    display: flex;
    align-items: center;
    z-index: 100;
}

/* Body contains Activity, Left, Center, Right */
.shell-body {
    flex: 1; /* Take remaining vertical space */
    display: flex;
    flex-direction: row;
    overflow: hidden; /* Critical for inner scrolling */
}

.shell-activity {
    width: 48px;
    background: var(--bg2);
    border-right: 1px solid var(--bd);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.shell-left, .shell-right {
    background: var(--bg1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shell-left {
    border-right: 1px solid var(--bd);
}

.shell-right {
    border-left: 1px solid var(--bd);
}

.shell-center {
    flex: 1; /* Grows to fill all space between left and right */
    background: var(--bg0);
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex-children from breaking container */
}

.shell-bottom {
    background: var(--bg1);
    border-top: 1px solid var(--bd);
    width: 100%;
}

/* ==========================================================================
   4. RESIZERS (The clickable handles)
   ========================================================================== */
.resizer {
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}

    .resizer:hover {
        background: var(--acc) !important;
    }

.resizer-col {
    width: 4px;
    margin: 0 -2px;
    cursor: col-resize;
    height: 100%;
}

.resizer-row {
    height: 4px;
    margin: -2px 0;
    cursor: row-resize;
    width: 100%;
}

/* ==========================================================================
   5. PANEL INTERNAL COMPONENTS
   ========================================================================== */

/* Full Width Headers Fix */
.panel-header {
    height: 35px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg2);
    border-bottom: 1px solid var(--bd);
    color: var(--mut);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05rem;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    width: 100%;
}

/* IDE Lists (Explorer style) */
.list-item {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

    .list-item:hover {
        background: var(--bg2);
    }

    .list-item.active {
        background: color-mix(in srgb, var(--acc), transparent 90%);
        border-left-color: var(--acc);
        color: var(--tx);
    }

/* Collapsed State */

/* ==========================================================================
   6. SCROLLBARS (Pro Look)
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg3, #444);
    border: 2px solid transparent;
    background-clip: content-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--mut);
        background-clip: content-box;
    }



/* 1. The container for center and right panels */
.shell-body {
    position: relative;
    z-index: 1;
    display: flex;
}

/* 2. The Workspace (Center) - Must be lower */
.shell-center {
    position: relative;
    z-index: 1; /* Lowest */
}

/* 3. The Right Panel - Must be higher to let menus "float" over center */
.shell-right {
    position: relative;
    z-index: 100 !important; /* Higher than center */
    /* CRITICAL: Any overflow other than 'visible' will chop off the menu */
    overflow: visible !important;
}

    /* 4. If your panel has a wrapper inside, it also needs to be visible */
    .shell-right .panel,
    .shell-right .panel-container {
        overflow: visible !important;
    }

    .shell-body,
    .shell-center,
    .shell-right,
    .shell-right .panel,
    .shell-right .panel-container {
        overflow: visible !important;
        z-index: inherit; /* let submenu z-index win */
    }

/* ==========================================================================
   1. THEME TOKENS
   ========================================================================== */
:root {
    --font-ui: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --sb-width: 12px; /* Scrollbar width */
}

/* ==========================================================================
   2. THEMES
   ========================================================================== */
.ide-app.theme-dark {
    --bg0: #181818;
    --bg1: #1e1e1e;
    --bg2: #252526;
    --bg3: black;
    --bd: #333;
    --tx: #ccc;
    --mut: #858585;
    --acc: #007acc;
    --danger: #f14c4c;
}

.ide-app.theme-light {
    --bg0: #f3f3f3;
    --bg1: #ffffff;
    --bg2: #f8f8f8;
    --bg3: #3a3a3a;
    --bd: #ddd;
    --tx: #333;
    --mut: #666;
    --acc: #007acc;
    --danger: #d32f2f;
}

.ide-app.theme-violet {
    --bg0: #1e1b26;
    --bg1: #252230;
    --bg2: #2d2a3d;
    --bg3: #2f2f35;
    --bd: #423d5c;
    --tx: #e0def4;
    --mut: #908caa;
    --acc: #c4a7e7;
    --danger: #eb6f92;
}

.ide-app.theme-water {
    --bg0: #0b121e;
    --bg1: #111b27;
    --bg2: #1b2a3d;
    --bg3: #3a3a3a;
    --bd: #2d4a6d;
    --tx: #d1d9e1;
    --mut: #71839b;
    --acc: #3b82f6;
    --danger: #f87171;
}

.ide-app.theme-red {
    --bg0: #1a1111;
    --bg1: #241818;
    --bg2: #2e1f1f;
    --bg3: #2f2f32;
    --bd: #4d3333;
    --tx: #f5e6e6;
    --mut: #a37a7a;
    --acc: #c24a4a;
    --danger: #ff4d4d;
}

.ide-app.theme-green {
    --bg0: #0d1110;
    --bg1: #121816;
    --bg2: #1a231f;
    --bg3: #2f3532;
    --bd: #2a3a34;
    --tx: #e0e6e3;
    --mut: #82968f;
    --acc: #2fa66f;
    --danger: #e67e22;
}

/* ==========================================================================
   3. BASE APP LAYOUT
   ========================================================================== */
.ide-app {
    height: 100vh;
    width: 100vw;
    background: var(--bg0);
    color: var(--tx);
    font-family: var(--font-ui);
    font-size: 13px;
    --hover-bg: color-mix(in srgb, var(--bg2) 85%, var(--acc));
    --focus-ring: color-mix(in srgb, var(--acc) 40%, transparent);
}

/* ==========================================================================
   4. SHELL LAYOUT (Top / Body / Panels / Resizers)
   ========================================================================== */
.shell-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.shell-topbar {
    height: 40px;
    background: var(--bg1);
    border-bottom: 1px solid var(--bd);
    display: flex;
    align-items: center;
    z-index: 100;
}

.shell-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.shell-activity {
    width: 48px;
    background: var(--bg2);
    border-right: 1px solid var(--bd);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.shell-left, .shell-right {
    background: var(--bg1);
    display: flex;
    flex-direction: column;
}

.shell-left {
    border-right: 1px solid var(--bd);
}

.shell-right {
    border-left: 1px solid var(--bd);
    overflow: visible !important;
    z-index: 100;
}

.shell-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg0);
    position: relative;
    z-index: 1;
}

.shell-bottom {
    background: var(--bg1);
    border-top: 1px solid var(--bd);
    width: 100%;
}

/* Resizers */
.resizer {
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}

    .resizer:hover {
        background: var(--acc) !important;
    }

.resizer-col {
    width: 4px;
    margin: 0 -2px;
    cursor: col-resize;
    height: 100%;
}

.resizer-row {
    height: 4px;
    margin: -2px 0;
    cursor: row-resize;
    width: 100%;
}

/* ==========================================================================
   5. PANEL INTERNAL COMPONENTS
   ========================================================================== */
.panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.panel-header {
    height: 35px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--bg2);
    border-bottom: 1px solid var(--bd);
    color: var(--mut);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .05rem;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 10px 12px;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

    .list-item:hover {
        background: var(--bg2);
    }

    .list-item.active {
        background: color-mix(in srgb, var(--acc), transparent 90%);
        border-left-color: var(--acc);
        color: var(--tx);
    }

/* Workspace tabs */
.workspace-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--bd);
    background: var(--bg1);
}

.tab {
    padding: 6px 10px;
    border: 1px solid var(--bd);
    background: transparent;
    cursor: pointer;
    color: var(--tx);
}

    .tab.active {
        border-color: var(--acc);
    }

/* Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg3);
    border: 2px solid transparent;
    background-clip: content-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--mut);
        background-clip: content-box;
    }

/* ==========================================================================
   6. NAVIGATION PANELS / ACCORDIONS
   ========================================================================== */
.nav-panel {
    height: 100%;
    overflow-y: auto;
    padding: 8px 6px;
    background: var(--bg1);
}

.nav-section {
    margin-bottom: 16px;
}

.nav-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--mut);
    margin: 6px 4px 4px;
}

.nav-list {
    list-style: none;
    padding-left: 14px;
    margin: 0;
}

    .nav-list li {
        padding: 6px 12px;
        cursor: pointer;
        color: var(--tx);
        transition: all .12s ease;
    }

        .nav-list li:hover {
            background: var(--bg2);
        }

        .nav-list li.active {
            background: var(--bg1);
            border: 1px solid var(--acc);
            color: var(--tx);
            box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc), transparent 70%);
        }

/* Accordion Style */
.accordion {
    width: 100%;
}

.accordion-item {
    width: 100%;
    background-color: var(--bg1);
    border: 1px solid var(--bd);
    border-radius: 4px;
    margin-bottom: 4px;
}

.accordion-header {
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
    background: var(--bg2);
    color: var(--tx);
}

    .accordion-header:hover {
        background: var(--hover-bg);
    }

.accordion-body {
    padding: 10px 15px;
    background: var(--bg3);
    display: none;
}

    .accordion-body.active {
        display: block;
    }

/* ==========================================================================
   7. AUTH COMPONENTS
   ========================================================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    height: 100%;
}

.auth-card {
    width: 420px;
    background: var(--bg1);
    border: 1px solid var(--bd);
    padding: 18px;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0 12px 0;
    border: 1px solid var(--bd);
    background: var(--bg0);
    color: var(--tx);
}

.auth-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--acc);
    background: rgba(79,195,247,0.12);
    color: var(--tx);
    cursor: pointer;
}

    .auth-btn:hover {
        background: rgba(79,195,247,0.18);
    }

.auth-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

    .auth-links a {
        color: var(--acc);
        cursor: pointer;
        text-decoration: none;
    }

.auth-error {
    margin-top: 10px;
    color: var(--danger);
    font-size: 13px;
}

/* ==========================================================================
   8. MISC
   ========================================================================== */
.placeholder {
    margin-top: 12px;
    border: 1px dashed var(--bd);
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mut);
}
