/* ========================================================
   BLACKWISE DESIGN SYSTEM — VELORA CLOUD OS
   Inspired by BlackWise Luxury Dark Crypto/Cloud UI
======================================================== */

:root {
    --bg-app: #0b0813;
    --bg-glass-card: rgba(22, 17, 34, 0.72);
    --bg-glass-card-hover: rgba(30, 23, 46, 0.85);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glow-purple: rgba(168, 85, 247, 0.35);

    --text-primary: #f8fafc;
    --text-secondary: #a39bb8;
    --text-muted: #6b6380;

    --purple-primary: #a855f7;
    --purple-deep: #7c3aed;
    --purple-glow: rgba(168, 85, 247, 0.45);

    --emerald-green: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.35);

    --coral-red: #f43f5e;
    --amber-orange: #f59e0b;
    --cyan-blue: #06b6d4;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(11, 8, 19, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.5); }

body.theme-blackwise {
    background-color: var(--bg-app);
    background-image: 
        radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.12), transparent 45%),
        radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.08), transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.06), transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utilities */
.font-mono { font-family: var(--font-mono); }
.text-cyan { color: var(--cyan-blue); }
.text-emerald { color: var(--emerald-green); }
.text-purple { color: var(--purple-primary); }
.text-amber { color: var(--amber-orange); }
.text-rose { color: var(--coral-red); }
.text-right { text-align: right; }
.hidden { display: none !important; }
.ml-auto { margin-left: auto; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.uppercase { text-transform: uppercase; }

/* 3-Column Layout */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 1. LEFT ICON DOCK */
.icon-dock {
    width: 72px;
    background: rgba(14, 10, 22, 0.85);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    z-index: 50;
}

.brand-glyph {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #181226;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.glyph-circle {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--purple-primary);
    border-radius: 50%;
    border-top-color: transparent;
}

.glyph-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--purple-primary);
    border-radius: 50%;
}

.dock-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 2.5rem;
}

.dock-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dock-btn.active {
    background: rgba(168, 85, 247, 0.18);
    border-color: var(--border-glow-purple);
    color: var(--purple-primary);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.dock-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 15px;
    height: 15px;
    background: var(--coral-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #181226;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    border-color: var(--purple-primary);
    color: #fff;
}

/* 2. MAIN STAGE */
.main-stage {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Stage Header */
.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-welcome h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.highlight-name {
    color: #fff;
    position: relative;
}

.header-welcome p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.header-kpis {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-glass-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    backdrop-filter: blur(12px);
}

.kpi-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.kpi-icon-box.purple {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.25);
}

.kpi-icon-box.cyan {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.25);
}

/* Lucide Vector Icons Global Design System */
.lucide {
    width: 1em;
    height: 1em;
    stroke-width: 2px;
    display: inline-block;
    vertical-align: -0.18em;
    transition: transform 0.15s ease, stroke 0.15s ease;
}

.icon-xs { width: 13px !important; height: 13px !important; }
.icon-sm { width: 16px !important; height: 16px !important; }
.icon-md { width: 20px !important; height: 20px !important; }
.icon-lg { width: 24px !important; height: 24px !important; }
.icon-xl { width: 32px !important; height: 32px !important; }

.hover-rose:hover {
    color: var(--coral-red) !important;
    transform: scale(1.15);
}

.jar-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid var(--border-glow-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.kpi-title {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.kpi-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
}

.kpi-unit { font-size: 0.75rem; font-weight: normal; color: var(--text-muted); }

.user-pill-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    background: #181226;
    border: 1px solid var(--border-glass);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
}

.dot-live {
    width: 7px;
    height: 7px;
    background: var(--emerald-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--emerald-green);
}

.dropdown-arrow { font-size: 0.7rem; color: var(--text-muted); }

/* Glass Sections */
.glass-section {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.2s ease;
}

/* Chart Section */
.chart-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-stats-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chart-badge-tag {
    color: var(--emerald-green);
    font-weight: 600;
    font-family: var(--font-mono);
}

.chart-tooltip {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(11, 8, 19, 0.85);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.chart-canvas-container {
    width: 100%;
    position: relative;
}

canvas#performanceChart {
    width: 100% !important;
    height: 220px !important;
}

/* Table Section ("Your holdings" style in image) */
.table-section {
    margin-top: 1rem;
}

.table-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.table-section-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.section-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(14, 10, 22, 0.7);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.search-input-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    font-size: 0.8rem;
    width: 140px;
}

.pill-btn-filter {
    background: rgba(14, 10, 22, 0.7);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-btn-filter:hover { background: #1e172e; color: #fff; }
.pill-btn-filter.active {
    background: rgba(168, 85, 247, 0.22);
    border-color: var(--border-glow-purple);
    color: #fff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.table-responsive {
    overflow-x: auto;
}

.blackwise-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    font-size: 0.85rem;
}

.blackwise-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border: none;
}

.blackwise-table tbody tr {
    background: rgba(17, 12, 28, 0.45);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.blackwise-table tbody tr:hover {
    background: rgba(28, 20, 45, 0.75);
    transform: translateY(-1px);
}

.blackwise-table td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border: none;
}

.blackwise-table td:first-child { border-radius: 12px 0 0 12px; }
.blackwise-table td:last-child { border-radius: 0 12px 12px 0; }

.node-title-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    color: #fff;
}

.node-icon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-purple { background: var(--purple-primary); box-shadow: 0 0 8px var(--purple-primary); }
.dot-emerald { background: var(--emerald-green); box-shadow: 0 0 8px var(--emerald-green); }
.dot-cyan { background: var(--cyan-blue); box-shadow: 0 0 8px var(--cyan-blue); }
.dot-amber { background: var(--amber-orange); box-shadow: 0 0 8px var(--amber-orange); }

/* Badges like High Risk, Mid Risk, Low Risk, Trending in BlackWise */
.badge-blackwise {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.3px;
}

.badge-risk-high { background: rgba(244, 63, 94, 0.2); color: #fca5a5; border: 1px solid rgba(244, 63, 94, 0.35); }
.badge-risk-mid { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-risk-low { background: rgba(6, 182, 212, 0.2); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.35); }
.badge-trending { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.35); }

/* Action circular buttons `+` and `···` */
.row-action-btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.action-circle-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1c152e;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-circle-btn:hover { background: var(--purple-primary); color: #fff; }

/* 3. RIGHT WIDGET PANEL */
.right-widget-panel {
    width: 320px;
    padding: 1.75rem 1.5rem 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex-shrink: 0;
}

.glass-widget-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 22px;
    padding: 1.4rem;
    backdrop-filter: blur(20px);
}

.widget-header-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.widget-icon-card {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.widget-label { font-size: 0.72rem; color: var(--text-secondary); font-weight: 600; }
.widget-val { font-size: 1.5rem; font-weight: 800; color: #fff; font-family: var(--font-mono); }
.unit-sub { font-size: 0.85rem; font-weight: normal; color: var(--text-muted); }

/* Mode Switcher pills (Buy / Sell in image) */
.mode-switch-pills {
    display: flex;
    background: #140e21;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 1.25rem;
}

.mode-pill {
    flex: 1;
    padding: 0.5rem;
    border-radius: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-pill.active {
    background: #251a3b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Swap Tokens / Modules Card */
.swap-module-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.module-token-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #140e21;
    border: 1px solid var(--border-glass);
    padding: 0.85rem 1rem;
    border-radius: 14px;
}

.token-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.badge-eth {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.badge-ltc {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.token-info { display: flex; flex-direction: column; }
.token-name { font-weight: 700; font-size: 0.9rem; color: #fff; }
.token-sub { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

.swap-circle-divider {
    display: flex;
    justify-content: center;
    margin: -0.3rem 0;
    position: relative;
    z-index: 5;
}

.swap-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #251a3b;
    border: 2px solid var(--bg-glass-card);
    color: var(--purple-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.swap-icon-btn:hover {
    transform: rotate(180deg);
    background: var(--purple-primary);
    color: #fff;
}

/* Bright Purple Action Button ("Change" in BlackWise image) */
.action-btn-change {
    width: 100%;
    padding: 0.85rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border: none;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45);
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.action-btn-change:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.6);
}

.btn-danger-glow {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.45) !important;
}

/* Team Mini List */
.team-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-mini-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #140e21;
    border: 1px solid var(--border-glass);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.78rem;
}

.team-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #251a3b;
    color: var(--purple-primary);
    font-weight: 800;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-mini-name { font-weight: 700; color: #fff; }
.team-mini-status { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); }

/* QA Matrix in BlackWise */
.qa-grid-blackwise {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.qa-card-bw {
    background: #140e21;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.qa-card-bw:hover {
    border-color: var(--border-glow-purple);
}

.step-chip-bw {
    background: #000;
    color: var(--purple-primary);
    font-family: var(--font-mono);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    cursor: pointer;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    display: inline-block;
    transition: all 0.2s;
}

.step-chip-bw:hover {
    background: var(--purple-primary);
    color: #fff;
}

/* File Split View */
.file-split-view {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    height: 520px;
    margin-top: 1rem;
}

.file-tree-box {
    background: #140e21;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.file-editor-box {
    background: #0c0816;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-top-bar {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #140e21;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.active-filename { color: var(--purple-primary); font-weight: 700; }
.file-encoding { color: var(--text-muted); }

.editor-textarea-blackwise {
    flex: 1;
    background: transparent;
    color: #f1f5f9;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 1rem;
    border: none;
    outline: none;
    resize: none;
}

/* Jars Grid */
.jars-grid-blackwise {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.jar-card-bw {
    background: #140e21;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jar-card-bw:hover { border-color: var(--purple-primary); }

/* Console */
.console-box-blackwise {
    background: #07050d;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    height: 480px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    margin-top: 1rem;
}

/* Buttons */
.purple-pill-btn {
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-deep));
    border: none;
    color: #fff;
    padding: 0.5rem 1.15rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    transition: all 0.2s;
}

.purple-pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.pill-btn-secondary {
    background: #1e172e;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.55rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(7, 5, 13, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: #150f24;
    border: 1px solid var(--border-glow-purple);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    overflow: hidden;
}

.modal-lg { max-width: 680px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-sub { font-size: 0.82rem; color: var(--text-secondary); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid var(--border-glass);
}

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-row { display: flex; gap: 0.75rem; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

label { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); }

input[type="text"], textarea {
    background: #0d0917;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

input[type="text"]:focus, textarea:focus { border-color: var(--purple-primary); }

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 300;
}

.toast {
    background: #1c152e;
    border: 1px solid var(--border-glow-purple);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Category Pills Bar */
.category-pills {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(14, 10, 22, 0.7);
    border: 1px solid var(--border-glass);
    padding: 0.25rem;
    border-radius: 12px;
}

.category-pills .pill-btn-filter {
    background: none;
    border: none;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.category-pills .pill-btn-filter.active {
    background: #251a3b;
    border-color: var(--border-glow-purple);
    color: #fff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* Terminal Input Bar */
.terminal-input-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #090612;
    border: 1px solid var(--border-glass);
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 0.75rem 1rem;
    margin-top: -4px;
}

.terminal-prompt {
    font-family: var(--font-mono);
    color: var(--cyan-blue);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.terminal-cmd-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    outline: none !important;
    padding: 0 !important;
}

/* Editor Wrapper & Line Numbers */
.editor-inner-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #0a0714;
}

.editor-line-numbers {
    width: 44px;
    padding: 1rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--border-glass);
    background: #080510;
    overflow-y: hidden;
}

/* Modern Select */
.modern-select {
    width: 100%;
    background: #0d0917;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}

.modern-select:focus { border-color: var(--purple-primary); }
.modern-select option { background: #140e21; color: #fff; }

/* Tree folder caret */
.tree-caret {
    display: inline-block;
    width: 12px;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    user-select: none;
}

.tree-caret.open { transform: rotate(90deg); }

/* User Profile Header Dropdown */
.user-dropdown-container {
    position: relative;
}

.user-pill-dropdown {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.85rem;
    background: #181226;
    border: 1px solid var(--border-glass);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-pill-dropdown:hover {
    border-color: rgba(168, 85, 247, 0.4);
    background: #201734;
}

.user-avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(168, 85, 247, 0.6);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    background: rgba(20, 15, 32, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    padding: 1rem;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    animation: fadeInMenu 0.2s ease;
}

.user-dropdown-menu.show {
    display: flex;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--purple-primary);
}

.user-menu-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-menu-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-role {
    font-size: 0.7rem;
    color: var(--purple-primary);
    font-family: var(--font-mono);
}

.user-menu-id {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    word-break: break-all;
}

.btn-menu-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem;
    border-radius: 10px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fda4af;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-menu-logout:hover {
    background: rgba(244, 63, 94, 0.25);
    color: #fff;
}


