/* ── AutoMinds Command Center — 21st.dev-inspired premium UI ── */
:root {
    --bg: #000; --surface: #0a0a0a; --card: #111; --card-hover: #161616;
    --border: rgba(255,255,255,0.06); --border-hi: rgba(255,255,255,0.12);
    --t1: #fff; --t2: #a1a1aa; --t3: #52525b;
    --blue: #3B82F6; --green: #22C55E; --purple: #A855F7; --amber: #F59E0B;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--t1); min-height: 100vh; overflow-x: hidden; }

/* ── Particle canvas ── */
#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ── Layout ── */
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ── */
.sidebar {
    width: 260px; background: rgba(10,10,10,0.8); backdrop-filter: blur(20px);
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    padding: 24px 16px; flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; padding: 0 8px; }
.brand-logo {
    width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 15px; color: #fff;
    box-shadow: 0 0 20px rgba(59,130,246,0.3);
}
.brand-text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.brand-tag { font-size: 10px; font-weight: 500; color: var(--t3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: 0.1em; padding: 0 12px; margin-bottom: 8px; }

.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    cursor: pointer; transition: all 0.2s; margin-bottom: 2px; border: 1px solid transparent; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.03); }
.nav-item.active { background: rgba(255,255,255,0.05); border-color: var(--border-hi); }
.nav-item.active::before {
    content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 24px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--blue), var(--purple)); box-shadow: 0 0 12px rgba(59,130,246,0.5);
}
.nav-icon {
    width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-icon.cortex { background: rgba(59,130,246,0.1); }
.nav-icon.inbox { background: rgba(34,197,94,0.1); }
.nav-icon.echo { background: rgba(168,85,247,0.1); }
.nav-name { font-size: 13px; font-weight: 500; }
.nav-sub { font-size: 11px; color: var(--t3); margin-top: 1px; }
.badge { margin-left: auto; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.badge-live { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-soon { background: rgba(255,255,255,0.06); color: var(--t3); }

.sidebar-bottom { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, #3B82F6, #A855F7);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    box-shadow: 0 0 12px rgba(59,130,246,0.2);
}
.user-name { font-size: 13px; font-weight: 500; }
.user-email { font-size: 11px; color: var(--t3); }
.sign-out { background: none; border: none; color: var(--t3); font-size: 12px; cursor: pointer; padding: 6px 12px; margin-top: 8px; transition: color 0.15s; }
.sign-out:hover { color: #EF4444; }

/* ── Main ── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,0.6); backdrop-filter: blur(16px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(59,130,246,0.08); }
.topbar-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.topbar-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }
.status-pill {
    display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 99px;
    font-size: 12px; font-weight: 500; background: rgba(34,197,94,0.08); color: var(--green);
    border: 1px solid rgba(34,197,94,0.12);
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Panels ── */
.panel { flex: 1; display: flex; flex-direction: column; }
.panel.hidden { display: none; }

/* Index bar */
.index-bar {
    display: flex; align-items: center; gap: 12px; padding: 14px 28px;
    border-bottom: 1px solid var(--border); background: rgba(10,10,10,0.4);
}
.input-field {
    flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 16px; font-size: 13px; color: var(--t1); font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.input-field::placeholder { color: var(--t3); }
.input-field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.idx-status { font-size: 12px; color: var(--t3); white-space: nowrap; }
.idx-status.success { color: var(--green); }
.idx-status.error { color: #EF4444; }

/* Glow button */
.btn-glow {
    padding: 10px 24px; border-radius: 10px; font-size: 13px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer; border: none;
    background: linear-gradient(135deg, #3B82F6, #6366F1); color: #fff;
    position: relative; overflow: hidden; transition: all 0.3s;
    box-shadow: 0 0 20px rgba(59,130,246,0.3);
}
.btn-glow:hover { box-shadow: 0 0 30px rgba(59,130,246,0.5); transform: translateY(-1px); }
.btn-glow:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-glow::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg); transition: 0.6s; opacity: 0;
}
.btn-glow:hover::after { opacity: 1; transform: rotate(45deg) translate(50%, 50%); }
.btn-glow.green { background: linear-gradient(135deg, #22C55E, #16A34A); box-shadow: 0 0 20px rgba(34,197,94,0.3); text-decoration: none; display: inline-flex; }
.btn-glow.green:hover { box-shadow: 0 0 30px rgba(34,197,94,0.5); }

/* Chat area */
.chat-area { flex: 1; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: #222 transparent; }
.msg { max-width: 700px; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--border); line-height: 1.65; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg-ai { background: rgba(17,17,17,0.8); backdrop-filter: blur(8px); align-self: flex-start; }
.msg-user { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.12); align-self: flex-end; }
.msg-header { margin-bottom: 8px; }
.msg-label { font-size: 12px; font-weight: 600; }
.ai-label { color: var(--blue); }
.user-label { color: #93C5FD; }
.msg-body { font-size: 14px; color: var(--t2); white-space: pre-wrap; }
.msg-body strong { color: var(--t1); font-weight: 600; }

/* Chat input */
.chat-bar { padding: 16px 28px; border-top: 1px solid var(--border); background: rgba(10,10,10,0.6); backdrop-filter: blur(16px); }
.chat-input-wrap {
    display: flex; align-items: center; gap: 10px; background: var(--card);
    border: 1px solid var(--border); border-radius: 14px; padding: 4px 4px 4px 16px; transition: all 0.2s;
}
.chat-input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.08); }
.chat-input { flex: 1; background: none; border: none; outline: none; font-size: 14px; color: var(--t1); font-family: 'Inter', sans-serif; padding: 10px 0; }
.chat-input::placeholder { color: var(--t3); }
.send-btn {
    width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #3B82F6, #6366F1);
    border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0; box-shadow: 0 0 12px rgba(59,130,246,0.2);
}
.send-btn:hover { box-shadow: 0 0 20px rgba(59,130,246,0.4); }

/* Center panels */
.center-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }

/* Feature cards with glow */
.feature-card {
    text-align: center; max-width: 500px; background: rgba(17,17,17,0.6); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 24px; padding: 52px 44px; position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.inbox-glow { box-shadow: 0 0 60px -20px rgba(34,197,94,0.15); }
.inbox-glow::after {
    content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(34,197,94,0.06), transparent 70%); pointer-events: none;
}
.echo-glow { box-shadow: 0 0 60px -20px rgba(168,85,247,0.15); }
.echo-glow::after {
    content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(168,85,247,0.06), transparent 70%); pointer-events: none;
}
.card-icon {
    width: 68px; height: 68px; border-radius: 18px; display: flex; align-items: center;
    justify-content: center; margin: 0 auto 22px; position: relative;
}
.inbox-icon { background: rgba(34,197,94,0.08); box-shadow: 0 0 30px rgba(34,197,94,0.1); }
.echo-icon { background: rgba(168,85,247,0.08); box-shadow: 0 0 30px rgba(168,85,247,0.1); }
.feature-card h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 24px; margin-bottom: 12px; position: relative; }
.feature-card p { font-size: 14px; color: var(--t2); line-height: 1.7; position: relative; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 24px 0 28px; position: relative; }
.tag {
    padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 500;
    backdrop-filter: blur(4px); transition: all 0.2s;
}
.tag:hover { transform: translateY(-1px); }
.tag-green { background: rgba(34,197,94,0.06); color: var(--green); border: 1px solid rgba(34,197,94,0.1); }
.tag-green:hover { box-shadow: 0 0 12px rgba(34,197,94,0.15); }
.tag-purple { background: rgba(168,85,247,0.06); color: var(--purple); border: 1px solid rgba(168,85,247,0.1); }
.tag-purple:hover { box-shadow: 0 0 12px rgba(168,85,247,0.15); }

.coming-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 99px;
    font-size: 12px; font-weight: 600; background: rgba(245,158,11,0.06); color: var(--amber);
    border: 1px solid rgba(245,158,11,0.1); margin-top: 8px; position: relative;
    box-shadow: 0 0 20px rgba(245,158,11,0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .chat-area, .index-bar, .topbar, .chat-bar { padding-left: 16px; padding-right: 16px; }
    .index-bar { flex-wrap: wrap; }
}
