:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
}

.app-container { display: flex; height: 100vh; width: 100vw; }

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), #a855f7);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.logo h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }

.nav-links { list-style: none; flex-grow: 1; }
.nav-links li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}
.nav-links li:hover { background-color: #f1f5f9; color: var(--text-main); }
.nav-links li.active { background-color: #eef2ff; color: var(--primary-color); }

.webmcp-status {
    margin-top: auto;
    padding: 12px;
    background-color: #f1f5f9;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.status-indicator { width: 8px; height: 8px; border-radius: 50%; background-color: #94a3b8; }
.status-indicator.online { background-color: #10b981; box-shadow: 0 0 8px #10b981; }

.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; }

.top-bar {
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f1f5f9;
    padding: 10px 16px;
    border-radius: 20px;
    width: 300px;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.search-bar:focus-within { border-color: var(--primary-color); }

.search-bar input { border: none; background: none; outline: none; width: 100%; font-size: 14px; }

.user-profile { display: flex; align-items: center; gap: 20px; cursor: pointer; }

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }

.avatar {
    width: 36px;
    height: 36px;
    background-color: #ddd6fe;
    color: #5b21b6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.view { display: none; padding: 40px; animation: fadeIn 0.3s ease-out; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 40px; }
.stat-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.highlight { background: linear-gradient(135deg, var(--primary-color), #a855f7); color: white; border: none; }
.stat-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.stat-value { font-size: 24px; font-weight: 700; }

.content-row { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }

.contact-item {
    background-color: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.contact-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }

.strength-tag {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.strength-strong { background-color: #dcfce7; color: #166534; }
.strength-warm { background-color: #fef9c3; color: #854d0e; }
.strength-new { background-color: #fee2e2; color: #991b1b; }

.insight-card {
    background-color: white;
    padding: 16px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    padding: 32px;
    border-radius: var(--radius);
    width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s;
}
@keyframes slideIn { from { opacity:0; transform: translateY(-20px); } to { opacity:1; transform: translateY(0); } }
