/* ═══════════════════════════════════════════════════════
   INTEL SEEK – Dark × Electric Gold
   ═══════════════════════════════════════════════════════ */

:root {
    --bg-color: #070706;
    --surface-color: #12110e;
    --surface-hover: #1c1a14;
    --primary: #f4ecd4;
    --primary-bright: #fff8e1;
    --primary-glow: rgba(245, 197, 24, 0.08);
    --accent: #f5c518;
    --accent-glow: rgba(245, 197, 24, 0.16);
    --on-accent: #0a0906;
    --text-main: #f0ead8;
    --text-muted: #8a8270;
    --border-color: rgba(245, 197, 24, 0.12);
    --border-bright: rgba(245, 197, 24, 0.42);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --discord-blurple: #5865F2;
    --glass-bg: #0c0b08;
    --glass-border: rgba(245, 197, 24, 0.10);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 100px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    width: 100%; height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13px;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}

/* Ambient halo — electric gold lightning glow */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse 80% 60% at 50% 45%, rgba(180, 130, 12, 0.28) 0%, rgba(90, 65, 8, 0.14) 35%, transparent 70%),
                radial-gradient(ellipse 60% 50% at 30% 70%, rgba(245, 197, 24, 0.10) 0%, transparent 55%),
                radial-gradient(ellipse 50% 40% at 75% 60%, rgba(255, 220, 80, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse 90% 80% at 50% 50%, rgba(40, 28, 4, 0.22) 0%, transparent 80%);
    z-index: 0; pointer-events: none;
}

/* Remove old effects */
#bgCanvas { display: none; }
.nebula-orb { display: none; }
.noise-overlay { display: none; }

/* DarkGPT-style dark vignette on edges */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 0; pointer-events: none;
}
#particlesContainer { display: none; }
.cursor-dot, .cursor-trail { display: none; }

/* Restore normal cursor */
* { cursor: default; }
a, button, select, input, textarea, .side-item, .plan-btn, .copy-badge { cursor: pointer; }

h1, h2, h3, h4, h5, .header-title, .profile-name, .plan-title {
    font-family: var(--font-heading);
}

/* Smooth fade for everything */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ LAYOUT ═══ */
.app-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    z-index: 10;
    position: relative;
    width: 100%;
    height: 100vh;
}

/* ═══ SIDEBAR ═══ */
.side-panel {
    width: 60px;
    height: 100vh;
    background: #050504;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.5rem;
}

.side-brand .mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.45), 0 0 40px rgba(245, 197, 24, 0.18);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.side-item {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: grid; place-items: center;
    transition: all 0.2s ease;
}

.side-item svg { width: 18px; height: 18px; }

.side-item:hover {
    background: var(--surface-hover);
    color: var(--text-main);
}

.side-item.active {
    background: var(--surface-hover);
    color: var(--accent);
}

.side-item.admin-nav-btn.active,
.side-item.admin-nav-btn:hover {
    color: #e57373;
    background: rgba(229, 115, 115, 0.08);
}

.side-status { margin-top: auto; }
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4caf50;
    display: block;
}

/* ═══ MAIN CONTAINER ═══ */
.sm-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem;
    animation: fadeIn 0.4s ease;
    flex: 1;
}

.sm-container::before { display: none; }

.sm-header {
    display: flex; align-items: center; gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}
.header-logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 14px rgba(245, 197, 24, 0.35);
    flex-shrink: 0;
}
.header-title { 
    font-weight: 700; font-size: 1.05rem; 
    letter-spacing: 0.4px;
    color: var(--text-main);
}

/* ═══ AUTH ═══ */
.header-auth { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

.discord-login-btn {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-full);
    background: var(--discord-blurple); color: white;
    font-weight: 600; font-size: 12px; text-decoration: none;
    transition: all 0.2s ease;
}
.discord-login-btn::after { display: none; }
.discord-login-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.discord-icon { width: 15px; height: 15px; }

.user-pill {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.35rem 0.8rem 0.35rem 0.35rem;
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-full); transition: all 0.2s;
}
.user-pill:hover { border-color: var(--border-bright); }
.user-pill-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.user-pill-name { font-size: 12px; font-weight: 500; color: var(--text-main); }

/* ═══ VIEWS ═══ */
.sm-body { padding: 0; flex: 1; overflow: hidden; position: relative; }

.views-slider {
    display: flex; flex-direction: column;
    width: 100%; height: 800%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.views-slider.show-ai { transform: translateY(-12.5%); }
.views-slider.show-chat { transform: translateY(-25%); }
.views-slider.show-removal { transform: translateY(-37.5%); }
.views-slider.show-api { transform: translateY(-50%); }
.views-slider.show-profile { transform: translateY(-62.5%); }
.views-slider.show-plans { transform: translateY(-75%); }
.views-slider.show-admin { transform: translateY(-87.5%); }

.view-panel {
    width: 100%; height: 12.5%;
    overflow-y: auto; padding-right: 4px;
    scroll-behavior: smooth;
}
.view-panel::-webkit-scrollbar { width: 4px; }
.view-panel::-webkit-scrollbar-track { background: transparent; }
.view-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }

/* ═══ SEARCH ═══ */
.search-wrap { margin: 0.5rem auto 1rem auto; max-width: 100%; padding: 0 0.5rem; }
.hero-logo {
    width: 72px; height: 72px;
    border-radius: 16px;
    object-fit: cover;
    margin: 0 auto 0.9rem;
    display: block;
    box-shadow: 0 0 28px rgba(245, 197, 24, 0.35);
}

.sm-search {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.7rem 0.7rem 0.7rem 1.4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all 0.25s ease;
}
.sm-search::before { display: none; }
.sm-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.sm-search input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text-main); font-size: 14px; font-family: inherit;
}
.sm-search input::placeholder { color: var(--text-muted); }

.sm-search button {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.6rem; border: none; border-radius: var(--radius-full);
    background: var(--accent); color: var(--on-accent);
    font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 0 25px rgba(245, 197, 24, 0.4), 0 0 50px rgba(245, 197, 24, 0.15);
}
.sm-search button::after { display: none; }
.sm-search button:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 0 35px rgba(245, 197, 24, 0.6), 0 0 70px rgba(245, 197, 24, 0.25); }
.search-btn-icon { width: 13px; height: 13px; stroke: var(--on-accent); }

/* ═══ STATS BAR ═══ */
.cyber-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem; margin: 1rem 0 1.8rem 0; width: 100%;
}
.stat-card {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 0.8rem 1rem;
    display: flex; align-items: center; gap: 0.7rem;
    transition: all 0.2s ease;
}
.stat-card::after { display: none; }
.stat-card:hover { border-color: var(--border-bright); background: var(--surface-hover); }
.stat-icon-wrap {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(245, 197, 24, 0.08); border: 1px solid rgba(245, 197, 24, 0.18);
    display: grid; place-items: center; flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; gap: 0.1rem; }
.stat-number { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-main); }
.stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); font-weight: 500; }

/* ═══ ADVANCED SEARCH ═══ */
.adv-toggle-btn {
    background: var(--surface-color); border: 1px solid var(--border-color);
    color: var(--text-muted); padding: 0.45rem 1rem; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 500; transition: all 0.2s ease;
}
.adv-toggle-btn:hover { border-color: var(--border-bright); color: var(--text-main); }

.adv-search-panel {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 1.4rem; margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}
.adv-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color); padding-bottom: 0.7rem; margin-bottom: 1rem;
    font-size: 10px; font-weight: 600; color: var(--accent); letter-spacing: 1px;
}
.search-mode-selector { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 10px; }
.search-mode-selector select {
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 6px; padding: 0.3rem 0.6rem; color: white; font-size: 11px; outline: none;
}
.adv-fields-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.adv-field-group { display: flex; flex-direction: column; gap: 0.3rem; }
.adv-field-group label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 500; }
.adv-field-group input {
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 0.6rem 0.9rem;
    color: white; font-size: 12px; outline: none; transition: border-color 0.2s;
}
.adv-field-group input:focus { border-color: var(--accent); }

/* ═══ RESULTS ═══ */
.results-area { position: relative; }

.ds-field {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 0.8rem;
    display: flex; justify-content: space-between; align-items: center;
    transition: all 0.2s ease; opacity: 0; animation: slideUp 0.4s ease forwards;
}
.ds-field::before { display: none; }
.ds-field:hover { border-color: var(--border-bright); background: var(--surface-hover); }

.ds-conf { font-size: 9px; padding: 4px 10px; border-radius: var(--radius-full); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.conf-high { color: #4caf50; background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.2); }
.conf-mid { color: var(--accent); background: var(--accent-glow); border: 1px solid var(--border-bright); }
.conf-low { color: var(--text-muted); background: rgba(138,133,128,0.08); border: 1px solid var(--border-color); }

.spinner { width: 32px; height: 32px; border: 2px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.sm-empty { text-align: center; color: var(--text-muted); margin-top: 3rem; }
.sm-empty h4 { color: var(--text-main); font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }

/* ═══ AI VIEW ═══ */
.ai-agent-layout { display: flex; gap: 0; height: 100%; }
.ai-soon-overlay {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.2rem;
}
.ai-soon-card { text-align: center; max-width: 420px; }
.ai-soon-icon {
    width: 88px; height: 88px;
    margin: 0 auto 1.2rem;
    border-radius: 20px;
    overflow: hidden;
    display: grid; place-items: center;
    background: #0a0a08;
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.28);
}
.ai-soon-icon img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ai-soon-title {
    margin: 0 0 0.7rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
}
.ai-soon-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.ai-agent-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 0.5rem 0; }

.ai-container { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
.ai-section-box { animation: fadeIn 0.3s ease; }
.ai-header { text-align: center; }
.ai-badge {
    display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 1.5px;
    color: var(--accent); background: var(--accent-glow);
    border: 1px solid var(--border-bright); padding: 4px 12px; border-radius: var(--radius-full); margin-bottom: 0.4rem;
}
.ai-header h3 { margin: 0 0 0.3rem 0; font-size: 1.2rem; color: var(--text-main); font-weight: 600; }
.ai-header p { margin: 0; color: var(--text-muted); font-size: 12px; }

.ai-chat-box {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 1.2rem;
    display: flex; flex-direction: column; gap: 0.8rem;
    max-height: 250px; overflow-y: auto;
}

.ai-msg {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 0.8rem 1rem; transition: all 0.15s;
}
.ai-msg:hover { border-color: var(--border-bright); }

.ai-msg-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.ai-avatar {
    width: 24px; height: 24px; border-radius: 6px;
    background: var(--accent); display: grid; place-items: center;
    font-size: 9px; font-weight: 700; color: var(--on-accent);
    box-shadow: 0 0 12px rgba(245, 197, 24, 0.45);
    overflow: hidden;
}
.ai-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ai-sender { font-size: 11px; font-weight: 600; color: var(--accent); }
.ai-msg-content { font-size: 13px; line-height: 1.6; color: var(--text-main); }

.ai-input-wrap {
    display: flex; align-items: center; gap: 0.8rem;
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-full); padding: 0.5rem 0.5rem 0.5rem 1.2rem;
    transition: border-color 0.2s;
}
.ai-input-wrap:focus-within { border-color: var(--accent); }
.ai-input-wrap input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-main); font-size: 13px; }
.ai-input-wrap input::placeholder { color: var(--text-muted); }
.ai-input-wrap button {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.4rem; border: none; border-radius: var(--radius-full);
    background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 11px;
    text-transform: uppercase; letter-spacing: 1px; transition: opacity 0.2s;
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.4), 0 0 40px rgba(245, 197, 24, 0.15);
}
.ai-input-wrap button svg { width: 13px; height: 13px; stroke: var(--on-accent); }
.ai-input-wrap button:hover { opacity: 0.85; }

/* Chat attach (upload) button */
.ai-input-wrap button.ai-attach-btn {
    padding: 0; width: 38px; height: 38px; min-width: 38px;
    border-radius: 50%; background: var(--surface-hover);
    color: var(--text-muted); border: 1px solid var(--border-color);
    display: grid; place-items: center;
}
.ai-input-wrap button.ai-attach-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.ai-input-wrap button.ai-attach-btn:hover { color: var(--accent); border-color: var(--border-bright); opacity: 1; }

/* AI credits badge (header) */
.ai-credits-badge {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; background: var(--accent-glow); border: 1px solid var(--border-bright);
    border-radius: var(--radius-full); color: var(--accent);
    font-family: var(--font-mono); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.ai-credits-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
.ai-credits-badge #aiCreditsDisplay { line-height: 1; }

/* ═══ WORKSPACE PANEL ═══ */
.ai-workspace-panel {
    width: 520px; min-width: 480px; flex-shrink: 0;
    background: #050504; border-left: 1px solid var(--border-color);
    display: flex; flex-direction: column; overflow: hidden;
}
.ws-title { font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 0.5px; }
.ws-file-count { font-size: 10px; color: var(--text-muted); }

/* Workspace Tabs */
.ws-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 6px 0 6px; background: #060608; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.ws-tabs::-webkit-scrollbar { height: 0; }
.ws-tab {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer;
    font-size: 11px; color: var(--text-muted); border-radius: 8px 8px 0 0;
    border: 1px solid transparent; border-bottom: none; white-space: nowrap; max-width: 160px;
    transition: all 0.15s;
}
.ws-tab:hover { color: var(--text-main); background: rgba(255,255,255,0.03); }
.ws-tab.active { color: var(--accent); background: #0e0e12; border-color: var(--border-color); }
.ws-tab .ws-tab-name { overflow: hidden; text-overflow: ellipsis; }
.ws-tab .ws-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.5; flex-shrink: 0; }
.ws-tab.active .ws-tab-dot { opacity: 1; }
.ws-tab-add {
    display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 4px;
    border-radius: 6px; background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 15px; cursor: pointer; flex-shrink: 0; transition: all 0.15s;
}
.ws-tab-add:hover { color: var(--accent); border-color: var(--border-bright); }

/* Toolbar */
.ws-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border-color); }
.ws-seg { display: flex; background: #060608; border: 1px solid var(--border-color); border-radius: 8px; padding: 2px; }
.ws-seg-btn { background: transparent; border: none; color: var(--text-muted); font-size: 10px; padding: 4px 12px; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.ws-seg-btn.active { background: var(--accent-glow); color: var(--accent); }
.ws-toolbar-actions { display: flex; gap: 4px; }
.adv-toggle-btn.ws-mini { font-size: 9px; padding: 4px 8px; }

.ws-files-mode, .ws-terminal-mode { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ws-tree-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.8rem 0.3rem; flex-wrap: wrap; gap: 4px; }
.ws-tree-actions { display: flex; gap: 4px; }
.ws-tree { max-height: 34%; min-height: 90px; overflow-y: auto; padding: 0.3rem 0.5rem; font-family: var(--font-mono); font-size: 11px; border-bottom: 1px solid var(--border-color); }
.ws-empty { color: var(--text-muted); text-align: center; padding: 1.5rem 0.8rem; font-size: 11px; font-family: var(--font-body); line-height: 1.5; }
.ws-file-item { display: flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.5rem; border-radius: 6px; color: var(--text-main); transition: all 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ws-file-item:hover { background: var(--surface-hover); color: var(--accent); }
.ws-file-item.active { background: var(--accent-glow); border: 1px solid var(--border-bright); color: var(--accent); }
.ws-file-icon { font-size: 10px; flex-shrink: 0; width: 18px; text-align: center; color: var(--accent); font-family: var(--font-mono); }
.ws-folder-item { display: flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.4rem; font-weight: 600; color: var(--text-muted); font-size: 10px; cursor: pointer; }
.ws-folder-children { padding-left: 0.8rem; border-left: 1px solid var(--border-color); margin-left: 0.4rem; }

/* ═══ IMPROVED CODE VIEWER ═══ */
.code-viewer { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #060608; position: relative; }
.cv-header { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border-color); background: #0a0a0e; }
.cv-titles { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cv-filename { font-size: 12px; font-weight: 600; color: var(--accent); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-path { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-actions { display: flex; gap: 4px; flex-shrink: 0; }
.cv-body { flex: 1; display: flex; min-height: 0; overflow: hidden; position: relative; }
.cv-gutter {
    flex-shrink: 0; padding: 0.7rem 0.5rem 0.7rem 0.7rem; text-align: right;
    background: #050508; color: #444; font-family: var(--font-mono); font-size: 13px;
    line-height: 1.5; overflow: hidden; user-select: none; border-right: 1px solid var(--border-color);
    min-width: 42px;
}
.cv-gutter div { height: calc(13px * 1.5); }
.cv-code-wrap { position: relative; flex: 1; overflow: hidden; }
.cv-highlight, #wsEditorContent {
    margin: 0; padding: 0.7rem; border: none; font-family: var(--font-mono); font-size: 13px;
    line-height: 1.5; tab-size: 2; -moz-tab-size: 2; white-space: pre; word-wrap: normal;
    box-sizing: border-box;
}
.cv-highlight {
    position: absolute; inset: 0; overflow: auto; pointer-events: none; color: var(--text-main);
    z-index: 1; background: transparent;
}
.cv-highlight code { font-family: inherit; white-space: pre; display: block; }
.cv-highlight::-webkit-scrollbar { width: 0; height: 0; }
.cv-highlight { scrollbar-width: none; }
#wsEditorContent {
    position: absolute; inset: 0; overflow: auto; resize: none; outline: none;
    background: transparent; color: transparent; caret-color: var(--accent); z-index: 2;
}
.cv-footer { display: flex; align-items: center; justify-content: space-between; padding: 0.3rem 0.8rem; border-top: 1px solid var(--border-color); background: #0a0a0e; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.cv-lang { text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); }

/* Syntax highlight tokens */
.tok-key { color: #c98fdd; }
.tok-str { color: #b5cea8; }
.tok-num { color: #d9a066; }
.tok-com { color: #666; font-style: italic; }
.tok-fn  { color: #dcb67a; }
.tok-tag { color: #c98fdd; }
.tok-attr{ color: #dcb67a; }
.tok-punct { color: #9a948c; }
.tok-bool { color: #d9a066; }

/* Version history overlay */
.cv-history { position: absolute; inset: 0; background: #080a0c; z-index: 5; display: flex; flex-direction: column; }
.cv-history-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border-color); font-size: 11px; font-weight: 600; color: var(--accent); }
.cv-history-list { flex: 1; overflow-y: auto; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.cv-hist-item { padding: 0.6rem 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.cv-hist-item:hover { border-color: var(--border-bright); background: rgba(255,255,255,0.02); }
.cv-hist-item.active { border-color: var(--accent); background: var(--accent-glow); }
.cv-hist-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.cv-hist-src { font-size: 9px; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.cv-hist-src.ai { color: #4caf50; background: rgba(76,175,80,0.12); }
.cv-hist-src.user { color: var(--accent); background: var(--accent-glow); }
.cv-hist-src.upload { color: #64b5f6; background: rgba(100,181,246,0.12); }
.cv-hist-src.rollback { color: #e57373; background: rgba(229,115,115,0.12); }
.cv-hist-actions { display: flex; gap: 6px; margin-top: 6px; }

/* Live Preview iframe */
.cv-preview { position: absolute; inset: 0; background: #fff; z-index: 6; display: flex; flex-direction: column; }
.cv-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--border-color); background: #141414; font-size: 11px; font-weight: 600; color: var(--accent); }
.cv-preview-frame { flex: 1; border: none; width: 100%; background: #fff; }

/* ═══ SIMULATED TERMINAL ═══ */
.ws-terminal { flex: 1; overflow-y: auto; padding: 0.8rem; background: #050508; font-family: var(--font-mono); }
.term-cmd-row { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.6rem; }
.term-cmd { flex: 1; background: #0a0a0e; border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem 0.7rem; }
.term-cmd .term-desc { font-size: 9px; color: var(--text-muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.term-cmd .term-line { font-size: 12px; color: #a5d6a7; white-space: pre-wrap; word-break: break-all; }
.term-cmd .term-line::before { content: "$ "; color: var(--accent); }
.term-copy { flex-shrink: 0; background: var(--surface-hover); border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 6px; padding: 6px 8px; cursor: pointer; font-size: 10px; transition: all 0.15s; }
.term-copy:hover { color: var(--accent); border-color: var(--border-bright); }

/* ═══ DIFF (inline chat + modal) ═══ */
.diff-block { margin-top: 0.5rem; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: #060608; }
.diff-block-head { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.7rem; background: #0a0a0e; font-family: var(--font-mono); font-size: 10px; cursor: pointer; }
.diff-block-head .diff-path { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-stat-add { color: #4caf50; }
.diff-stat-del { color: #e57373; }
.diff-body { max-height: 260px; overflow: auto; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; }
.diff-body.collapsed { display: none; }
.diff-line { display: flex; white-space: pre; }
.diff-ln { flex-shrink: 0; width: 34px; text-align: right; padding: 0 6px; color: #555; user-select: none; border-right: 1px solid var(--border-color); }
.diff-txt { padding: 0 8px; white-space: pre; flex: 1; }
.diff-line.add { background: rgba(76,175,80,0.10); }
.diff-line.add .diff-txt { color: #a5d6a7; }
.diff-line.del { background: rgba(229,115,115,0.10); }
.diff-line.del .diff-txt { color: #ef9a9a; }
.diff-line.ctx .diff-txt { color: var(--text-muted); }
.diff-sign { flex-shrink: 0; width: 14px; text-align: center; user-select: none; }

.diff-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.diff-modal-card { background: #0a0a0e; border: 1px solid var(--border-bright); border-radius: var(--radius); width: min(900px, 100%); max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.diff-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--border-color); }
.diff-modal-body { flex: 1; overflow: auto; }

/* ═══ CONTEXT MENU ═══ */
.ws-ctx-menu { position: fixed; z-index: 4000; background: #0e0e0a; border: 1px solid var(--border-bright); border-radius: 10px; padding: 4px; min-width: 150px; box-shadow: 0 8px 30px rgba(0,0,0,0.7), 0 0 15px rgba(245, 197, 24, 0.12); }
.ws-ctx-item { padding: 7px 12px; font-size: 12px; color: var(--text-main); border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ws-ctx-item:hover { background: var(--surface-hover); color: var(--accent); }
.ws-ctx-item.danger:hover { color: #e57373; }
.ws-ctx-sep { height: 1px; background: var(--border-color); margin: 4px 0; }

/* ═══ PROFILE ═══ */
.profile-container { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; min-height: 300px; }
.profile-loader { display: flex; flex-direction: column; align-items: center; padding: 4rem 0; gap: 1rem; }
.loader-text { color: var(--accent); font-weight: 500; font-size: 11px; letter-spacing: 1px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.profile-content-wrap { display: flex; flex-direction: column; gap: 1.5rem; animation: fadeIn 0.3s ease; }
.profile-header-card { display: flex; align-items: center; gap: 1.2rem; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.4rem; transition: border-color 0.2s; }
.profile-header-card:hover { border-color: var(--border-bright); }
.profile-avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--accent); display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; color: var(--on-accent); flex-shrink: 0; overflow: hidden; box-shadow: 0 0 20px rgba(245, 197, 24, 0.35); }
.profile-name { margin: 0 0 0.3rem 0; font-size: 1.1rem; color: var(--text-main); }
.profile-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-full); background: var(--accent-glow); border: 1px solid var(--border-bright); color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: 1.5px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.p-stat { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1rem; text-align: center; transition: border-color 0.2s; }
.p-stat:hover { border-color: var(--border-bright); }
.stat-val { font-weight: 700; color: var(--text-main); font-size: 1rem; margin-bottom: 0.2rem; }
.stat-lbl { color: var(--text-muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; }
.profile-details { display: flex; flex-direction: column; gap: 0.8rem; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.2rem; }
.p-row { display: flex; justify-content: space-between; font-size: 13px; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
.p-row:last-child { border-bottom: none; padding-bottom: 0; }
.p-lbl { color: var(--text-muted); }
.p-val { color: var(--text-main); font-weight: 500; }
.p-val.online { color: #4caf50; }
.p-val.mono { font-family: var(--font-mono); color: var(--accent); }

/* ═══ PLANS ═══ */
.plans-container { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.plans-header { text-align: center; }
.plans-header h3 { font-size: 1.3rem; color: var(--text-main); margin: 0 0 0.4rem 0; font-weight: 600; }
.plans-header p { color: var(--text-muted); font-size: 12px; margin: 0; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan-card {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 1.5rem 1.2rem;
    display: flex; flex-direction: column; transition: all 0.2s ease; position: relative;
}
.plan-card::before { display: none; }
.plan-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.plan-card.featured { border-color: var(--accent); background: rgba(245, 197, 24, 0.05); }
.plan-tag { font-size: 9px; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.6rem; }
.plan-tag.popular { color: var(--accent); }
.plan-title { font-size: 1.1rem; color: var(--text-main); margin: 0 0 0.8rem 0; font-weight: 600; }
.plan-price { font-size: 1.8rem; font-weight: 700; color: var(--text-main); margin-bottom: 1.2rem; }
.plan-price span { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem 0; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.plan-features li { font-size: 12px; color: var(--text-main); display: flex; align-items: center; gap: 0.4rem; }
.plan-features li::before { content: "✓"; color: var(--accent); font-weight: bold; font-size: 11px; }
.plan-btn {
    width: 100%; padding: 0.7rem; border-radius: var(--radius-full);
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease;
}
.plan-btn.primary { background: var(--accent); border: none; color: var(--on-accent); }
.plan-btn.primary::after { display: none; }
.plan-btn.primary:hover { opacity: 0.85; }
.plan-btn.secondary { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.plan-btn.secondary:hover { border-color: var(--border-bright); }

/* ═══ ADMIN ═══ */
.admin-container { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
.admin-header { text-align: center; }
.admin-badge { display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; color: #e57373; background: rgba(229,115,115,0.06); border: 1px solid rgba(229,115,115,0.2); padding: 4px 12px; border-radius: var(--radius-full); margin-bottom: 0.5rem; }
.admin-header h3 { margin: 0 0 0.8rem 0; font-size: 1.2rem; color: var(--text-main); }
.admin-subtabs { display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.admin-tab-btn { padding: 0.5rem 1rem; border-radius: var(--radius-full); background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); font-weight: 500; font-size: 11px; transition: all 0.2s; }
.admin-tab-btn.active, .admin-tab-btn:hover { background: var(--surface-hover); border-color: var(--border-bright); color: var(--text-main); }
.admin-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 0.8rem; }
.metric-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1rem; text-align: center; }
.metric-card .m-val { font-size: 1.2rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.15rem; }
.metric-card .m-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.admin-subtitle { font-size: 0.9rem; color: var(--accent); margin: 0 0 0.8rem 0; font-weight: 600; }
.admin-table-wrap { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.admin-table th { padding: 0.8rem; background: rgba(0,0,0,0.2); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 9px; letter-spacing: 0.8px; }
.admin-table td { padding: 0.8rem; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(201,169,110,0.02); }

.ban-ip-wrap { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.8rem; }
.ban-ip-wrap input, .add-db-card input { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 0.6rem 1rem; color: white; font-size: 12px; outline: none; }
.banned-ips-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.banned-tag { background: rgba(229,115,115,0.06); border: 1px solid rgba(229,115,115,0.2); color: #e57373; font-size: 11px; padding: 3px 10px; border-radius: var(--radius-full); display: flex; align-items: center; gap: 0.4rem; }
.banned-tag button { background: none; border: none; color: #e57373; font-weight: bold; }
.plans-edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.plan-edit-card, .add-db-card, .indexer-control-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan-edit-card input { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 6px; padding: 0.4rem 0.6rem; color: white; font-size: 12px; outline: none; }

/* Progress & Logs */
.progress-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--accent); font-weight: 500; margin-bottom: 0.3rem; }
.progress-bar-bg { width: 100%; height: 6px; background: var(--bg-color); border-radius: var(--radius-full); overflow: hidden; border: 1px solid var(--border-color); }
.progress-bar-fill { width: 0%; height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width 0.3s; }
.indexer-logs-box { background: #111; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.8rem; font-family: var(--font-mono); font-size: 10px; max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.8rem; }
.log-line { color: var(--accent); line-height: 1.3; }
.log-line.text-muted { color: var(--text-muted); }

/* ═══ PROFILE CARDS (Search Results) ═══ */
.profile-card-result {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem;
    transition: all 0.2s ease; opacity: 0; animation: slideUp 0.4s ease forwards;
}
.profile-card-result::before { display: none; }
.profile-card-result:hover { border-color: var(--border-bright); }
.pcr-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border-color); }
.pcr-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--on-accent); flex-shrink: 0; }
.pcr-identity { flex: 1; }
.pcr-name { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.2rem; }
.pcr-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pcr-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.pcr-field { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.6rem; background: rgba(255,255,255,0.02); border-radius: 8px; border: 1px solid var(--border-color); }
.pcr-field:hover { border-color: var(--border-bright); }
.pcr-label { font-size: 9px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.pcr-value { font-size: 12px; color: var(--text-main); font-weight: 500; word-break: break-all; }
.pcr-value.pcr-hl { color: var(--accent); font-family: var(--font-mono); font-size: 11px; }
.pcr-sources { padding-top: 0.8rem; border-top: 1px solid var(--border-color); }
.pcr-src { display: flex; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.3rem; line-height: 1.3; }

/* Confidence Badge */
.pcr-conf-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 6px; font-size: 9px; font-weight: 600; text-transform: uppercase; }
.pcr-conf-badge.high { background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.2); color: #4caf50; }
.pcr-conf-badge.mid { background: var(--accent-glow); border: 1px solid var(--border-bright); color: var(--accent); }
.pcr-conf-badge.low { background: rgba(138,133,128,0.06); border: 1px solid var(--border-color); color: var(--text-muted); }

/* Copy Badge */
.copy-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 9px; font-weight: 500; font-family: var(--font-mono); padding: 2px 7px; border-radius: 6px; background: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-muted); transition: all 0.2s; margin-left: 4px; }
.copy-badge:hover { border-color: var(--accent); color: var(--accent); }
.copy-badge.copied { background: rgba(76,175,80,0.08); border-color: rgba(76,175,80,0.3); color: #4caf50; }

/* Exposure Badge */
.exposure-badge {
    display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 700; font-family: var(--font-mono);
    padding: 2px 7px; border-radius: 6px; background: rgba(224,134,65,0.1); border: 1px solid rgba(224,134,65,0.3);
    color: var(--accent); letter-spacing: 0.5px;
}

/* Bookmark Button */
.bookmark-btn {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);
    font-size: 16px; cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.bookmark-btn:hover { color: var(--accent); border-color: var(--border-bright); }
.bookmark-btn.active { color: var(--accent); background: var(--accent-glow); border-color: var(--accent); }

/* Timeline (dates visualisation dans profil) */
.pcr-timeline { margin: 0.8rem 0; padding: 0.6rem 0.8rem; background: rgba(0,0,0,0.15); border: 1px solid var(--border-color); border-radius: 10px; }
.pcr-timeline-label { font-size: 9px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.pcr-timeline-track { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.pcr-timeline-track::-webkit-scrollbar { height: 3px; }
.pcr-timeline-track::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
.pcr-timeline-node { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.pcr-tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--accent-glow); }
.pcr-tl-date { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; }
.pcr-tl-line { flex: 0 0 30px; height: 2px; background: var(--border-bright); margin: 0 4px; margin-bottom: 18px; }

/* Search History Dropdown */
.search-history-dropdown {
    position: fixed; z-index: 9999;
    background: var(--surface-color); border: 1px solid var(--border-bright); border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4); overflow: hidden; max-height: 320px; overflow-y: auto;
}
.sh-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border-color); }
.sh-clear { background: none; border: none; color: var(--accent); font-size: 10px; cursor: pointer; padding: 0; }
.sh-clear:hover { text-decoration: underline; }
.sh-item { padding: 8px 14px; font-size: 12px; color: var(--text-main); cursor: pointer; transition: background 0.1s; border-bottom: 1px solid var(--border-color); }
.sh-item:last-child { border-bottom: none; }
.sh-item:hover { background: var(--surface-hover); color: var(--accent); }

/* Results View Switcher */
.results-view-switcher { display: flex; justify-content: center; gap: 0.6rem; margin: 1rem 0; }
.view-switch-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0.5rem 1rem; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; background: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-muted); transition: all 0.2s; }
.view-switch-btn:hover { border-color: var(--border-bright); color: var(--text-main); }
.view-switch-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* Relation Graph */
.relation-graph-wrap { width: 100%; min-height: 420px; background: #111; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 0.8rem; margin-bottom: 1rem; }
.graph-edge { stroke: rgba(245, 197, 24, 0.22); stroke-width: 1; }
.graph-edge.highlight { stroke: var(--accent); stroke-width: 2; }
.graph-node circle { transition: all 0.2s; }
.graph-node.target circle { fill: var(--accent); stroke: var(--accent); stroke-width: 2; }
.graph-node.email circle { fill: #5c9ce6; stroke: #5c9ce6; stroke-width: 1.5; }
.graph-node.phone circle { fill: #4caf50; stroke: #4caf50; stroke-width: 1.5; }
.graph-node.location circle { fill: #e57373; stroke: #e57373; stroke-width: 1.5; }
.graph-node.ip circle { fill: #ffd54f; stroke: #ffd54f; stroke-width: 1.5; }
.graph-node.source circle { fill: #555; stroke: #777; stroke-width: 1.5; }
.graph-node:hover circle { filter: brightness(1.2); stroke-width: 2.5; }
.graph-label { font-size: 10px; font-family: var(--font-mono); fill: var(--text-muted); text-anchor: middle; pointer-events: none; }

/* Modal */
.inspect-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.inspect-modal-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius); width: 90%; max-width: 550px; padding: 1.5rem; }
.inspect-modal-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
.inspect-modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; transition: color 0.2s; }
.inspect-modal-close:hover { color: #e57373; }

/* Typing dots */
.typing-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 2px; animation: typing 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* Credit Pack Buttons */
.credit-pack-btn { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-main); transition: all 0.2s; position: relative; min-width: 90px; }
.credit-pack-btn:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.credit-pack-btn.featured { border-color: var(--accent); }
.credit-pack-amount { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.credit-pack-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.credit-pack-price { font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 0.2rem; }
.credit-pack-badge { position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--on-accent); font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: var(--radius-full); }

/* Light / Dark toggle button */
.theme-toggle {
    display: grid; place-items: center; width: 30px; height: 30px; cursor: pointer;
    background: transparent; border: 1px solid var(--border-color); border-radius: 8px;
    color: var(--text-muted); transition: all 0.2s; padding: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-bright); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ═══ LIGHT MODE (warm gold tinted) ═══ */
[data-theme="light"] {
    --bg-color: #f6f2e6;
    --surface-color: #fbf8ef;
    --surface-hover: #efe8d4;
    --primary: #3a3424;
    --primary-bright: #2a2418;
    --primary-glow: rgba(180, 140, 20, 0.08);
    --accent: #c9a227;
    --accent-glow: rgba(201, 162, 39, 0.16);
    --on-accent: #1a160c;
    --text-main: #2e2a1e;
    --text-muted: #6f6858;
    --border-color: rgba(0, 0, 0, 0.09);
    --border-bright: rgba(201, 162, 39, 0.40);
    --glass-bg: #fbf8ef;
    --glass-border: rgba(0, 0, 0, 0.07);
}
[data-theme="light"] body::before {
    background: radial-gradient(ellipse at 30% 20%, rgba(245,197,24,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(201,162,39,0.05) 0%, transparent 40%);
}
[data-theme="light"] .ai-msg { background: rgba(0,0,0,0.02); }
[data-theme="light"] .ai-avatar { color: var(--on-accent); }
[data-theme="light"] .ai-input-wrap button:not(.ai-attach-btn) svg { stroke: var(--on-accent); }
[data-theme="light"] .ai-input-wrap button:not(.ai-attach-btn) { color: var(--on-accent); }

/* Light mode: AI workspace + code viewer surfaces */
[data-theme="light"] .ai-workspace-panel { background: #efe8d4; }
[data-theme="light"] .ws-tabs { background: #e8e0c8; }
[data-theme="light"] .ws-tab.active { background: #fbf8ef; }
[data-theme="light"] .ws-seg { background: #e4dcc4; }
[data-theme="light"] .code-viewer { background: #fbf8ef; }
[data-theme="light"] .cv-header, [data-theme="light"] .cv-footer { background: #f2ead4; }
[data-theme="light"] .cv-gutter { background: #ede4cc; color: #a7926a; }
[data-theme="light"] #wsEditorContent { caret-color: var(--accent); }
[data-theme="light"] .cv-highlight { color: var(--text-main); }
[data-theme="light"] .cv-history { background: #f2ead4; }
[data-theme="light"] .ws-terminal { background: #f2ead4; }
[data-theme="light"] .term-cmd { background: #fbf8ef; }
[data-theme="light"] .term-cmd .term-line { color: #3d6b3f; }
[data-theme="light"] .diff-block, [data-theme="light"] .diff-modal-card { background: #fbf8ef; }
[data-theme="light"] .diff-block-head { background: #f2ead4; }
[data-theme="light"] .diff-line.add .diff-txt { color: #3d6b3f; }
[data-theme="light"] .diff-line.del .diff-txt { color: #b23b3b; }
[data-theme="light"] .ws-ctx-menu { background: #fbf8ef; }

/* Light mode: syntax tokens tuned for light background */
[data-theme="light"] .tok-key { color: #8a4fb0; }
[data-theme="light"] .tok-str { color: #3d6b3f; }
[data-theme="light"] .tok-num { color: #a5642a; }
[data-theme="light"] .tok-com { color: #999188; }
[data-theme="light"] .tok-fn  { color: #9a6b2f; }
[data-theme="light"] .tok-tag { color: #8a4fb0; }
[data-theme="light"] .tok-attr{ color: #9a6b2f; }
[data-theme="light"] .tok-bool { color: #a5642a; }
[data-theme="light"] .tok-punct { color: #6f685e; }

/* Selection */
::selection { background: rgba(245,197,24,0.28); color: #0a0906; }
[data-theme="light"] ::selection { background: rgba(201,162,39,0.28); color: #2a2418; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Button active */
button:active { transform: scale(0.97) !important; transition: transform 0.05s !important; }

/* Shake */
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* Responsive */
@media (max-width: 1100px) { .cyber-stats-grid { grid-template-columns: repeat(2, 1fr); } .plans-grid { grid-template-columns: 1fr; } }

/* ═══ MOBILE RESPONSIVE ═══ */
@media (max-width: 768px) {
    html, body {
        align-items: flex-start;
        height: 100%;
        overflow: auto;
    }
    .app-layout { flex-direction: column; width: 100%; height: 100%; }
    .side-panel {
        width: 100%; height: 52px; flex-direction: row;
        padding: 0.4rem 0.8rem; gap: 0; justify-content: space-around;
        border-right: none; border-top: 1px solid var(--border-color);
        position: fixed; bottom: 0; left: 0; z-index: 100;
        background: #08080a; order: 2;
    }
    .side-brand { display: none; }
    .side-nav { flex-direction: row; gap: 0; flex: 1; justify-content: space-around; }
    .side-item { width: 36px; height: 36px; }
    .side-status { display: none; }
    .sm-container {
        padding: 1rem 1rem 4rem 1rem;
        height: auto;
        min-height: calc(100vh - 52px);
        width: 100%;
        max-width: 100%;
        order: 1;
    }
    .sm-header { padding-bottom: 0.8rem; gap: 0.8rem; }
    .header-title { font-size: 0.75rem; letter-spacing: 1.5px; }
    .cyber-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .stat-card { padding: 0.5rem 0.6rem; }
    .stat-number { font-size: 0.85rem; }
    .stat-label { font-size: 8px; }
    .sm-search { padding: 0.5rem 0.5rem 0.5rem 1rem; }
    .sm-search button { padding: 0.5rem 1rem; font-size: 9px; }
    .plans-grid { grid-template-columns: 1fr; }
    .ai-agent-layout { flex-direction: column; }
    .ai-workspace-panel { width: 100%; min-width: 0; max-height: 420px; border-left: none; border-top: 1px solid var(--border-color); }
    .ws-tree { max-height: 120px; }
    .profile-stats { grid-template-columns: 1fr 1fr; }
    .adv-fields-grid { grid-template-columns: 1fr; }
    .admin-metrics { grid-template-columns: 1fr 1fr; }
    .plans-edit-grid { grid-template-columns: 1fr; }
    .views-slider { transition: transform 0.3s ease; }
    .search-wrap { margin: 0.5rem auto; }
}

/* ═══ MAINTENANCE OVERLAY ═══ */
.maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 70% 50% at 50% 40%, rgba(245, 197, 24, 0.12) 0%, transparent 60%),
        rgba(7, 7, 6, 0.94);
    backdrop-filter: blur(18px);
}
.maintenance-overlay.visible { display: flex; }
.maintenance-card {
    width: 100%;
    max-width: 440px;
    text-align: center;
    background: var(--surface-color);
    border: 1px solid var(--border-bright);
    border-radius: 24px;
    padding: 2.6rem 2rem 2.2rem;
    box-shadow: 0 0 40px rgba(245, 197, 24, 0.12), 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
}
.maint-icon-wrap {
    width: 84px; height: 84px;
    margin: 0 auto 1.2rem;
    border-radius: 18px;
    overflow: hidden;
    display: grid; place-items: center;
    background: #0a0a08;
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.28);
}
.maint-icon-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.maint-wrench {
    width: 42px; height: 42px;
    color: var(--accent);
    filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.55));
    animation: wrenchPulse 2.6s ease-in-out infinite;
}
@keyframes wrenchPulse {
    0%, 100% { transform: rotate(-12deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.06); }
}
.maint-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.maint-title {
    margin: 0 0 0.7rem;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-main);
}
.maint-text {
    margin: 0 0 1.6rem;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.maint-actions {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
}
.maint-discord-btn,
.maint-admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.maint-discord-btn {
    background: var(--discord-blurple);
    color: #fff;
}
.maint-discord-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.maint-admin-btn {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.28);
}
.maint-admin-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.maint-error {
    margin: 0.8rem 0 0;
    color: #e57373;
    font-size: 12px;
}

.maint-admin-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.6rem;
    text-align: center;
}
.maint-admin-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.35);
    color: #4caf50;
}
.maint-admin-status.on {
    background: rgba(245, 197, 24, 0.12);
    border-color: var(--border-bright);
    color: var(--accent);
}
.maint-admin-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    max-width: 460px;
    margin: 0 auto 1.4rem;
}
.maint-admin-hint {
    margin: 1.2rem 0 0;
    font-size: 12px;
    color: var(--text-muted);
}
.maint-admin-hint a { color: var(--accent); text-decoration: none; }
.maint-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
}
.maint-switch-wrap input { display: none; }
.maint-switch {
    width: 52px; height: 28px;
    border-radius: 100px;
    background: #2a2a28;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.2s;
}
.maint-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #cfc8b8;
    transition: all 0.2s;
}
.maint-switch-wrap input:checked + .maint-switch {
    background: var(--accent);
    border-color: var(--accent);
}
.maint-switch-wrap input:checked + .maint-switch::after {
    left: 27px;
    background: var(--on-accent);
}
.maint-switch-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
