/* ============================================
   LAIK CRM — Dark Theme
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; overflow: hidden; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #e2e8f0;
    background: #0b0f1a;
}

a { color: #00e89d; text-decoration: none; }
a:hover { color: #00ffa8; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #00e89d !important;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }

button { font-family: inherit; cursor: pointer; border: none; }
button:hover { filter: brightness(1.15); }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === APP LAYOUT === */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === SIDEBAR === */
.sidebar {
    width: 240px;
    background: #0f1320;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar.collapsed { width: 64px; }

.sidebar-header {
    padding: 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon { font-size: 20px; }

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #00e89d, #00c4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(0,232,157,0.1);
    color: #00e89d;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.08em;
}

.collapse-btn {
    background: none;
    color: #64748b;
    font-size: 14px;
    padding: 4px;
}

/* === NAV === */
.nav-menu {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-item:hover { background: rgba(255,255,255,0.04); color: #e2e8f0; }
.nav-item.active { background: rgba(0,232,157,0.08); color: #00e89d; }

.nav-item .nav-icon { font-size: 16px; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c5cfc, #00c4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.agent-name { font-size: 13px; font-weight: 600; }
.agent-status { font-size: 11px; color: #10b981; }

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === CHAT LAYOUT === */
.chat-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* === LEAD LIST === */
.lead-list {
    width: 320px;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #0d1120;
}

.lead-list-header {
    padding: 16px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lead-list-header h2 { font-size: 16px; font-weight: 800; }

.btn-add {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0,232,157,0.1);
    color: #00e89d;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box {
    margin: 0 12px 8px;
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-size: 12px;
    font-family: inherit;
}

.filter-row {
    display: flex;
    gap: 4px;
    padding: 0 12px 8px;
}

.filter-btn {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: #94a3b8;
    font-size: 11px;
    font-family: inherit;
}

.filter-btn.active {
    background: rgba(0,232,157,0.1);
    border-color: rgba(0,232,157,0.2);
    color: #00e89d;
}

.lead-items {
    flex: 1;
    overflow-y: auto;
}

.lead-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.lead-item:hover { background: rgba(255,255,255,0.02); }
.lead-item.active { background: rgba(0,232,157,0.04); border-left: 2px solid #00e89d; }

.lead-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.lead-avatar.hot { background: linear-gradient(135deg, #ef4444, #f97316); }
.lead-avatar.warm { background: linear-gradient(135deg, #f59e0b, #eab308); }
.lead-avatar.cold { background: linear-gradient(135deg, #64748b, #94a3b8); }

.lead-info { flex: 1; min-width: 0; }
.lead-info-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.lead-name { font-size: 13px; font-weight: 600; }
.lead-time { font-size: 10px; color: #64748b; flex-shrink: 0; }
.lead-company { font-size: 11px; color: #64748b; margin-bottom: 3px; }
.lead-last-msg { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.unread-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    background: #00e89d;
    color: #0b0f1a;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* === CHAT PANEL === */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d1120;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-header-left { display: flex; align-items: center; gap: 10px; }

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.chat-lead-name { font-size: 14px; font-weight: 700; }
.chat-lead-info { font-size: 11px; color: #94a3b8; }

.chat-header-right { display: flex; gap: 8px; align-items: center; }

.score-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}

.score-tag.high { background: rgba(16,185,129,0.1); color: #10b981; }
.score-tag.medium { background: rgba(245,158,11,0.1); color: #f59e0b; }
.score-tag.low { background: rgba(239,68,68,0.1); color: #ef4444; }

.stage-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}

.stage-new { background: rgba(100,116,139,0.15); color: #64748b; }
.stage-demo { background: rgba(59,130,246,0.15); color: #3b82f6; }
.stage-followup { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stage-negotiation { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.stage-closing { background: rgba(16,185,129,0.15); color: #10b981; }

/* === MESSAGES === */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-row { display: flex; }
.msg-row.from-client { justify-content: flex-start; }
.msg-row.from-agent, .msg-row.from-ai { justify-content: flex-end; }

.msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.msg-bubble.client {
    background: #1e293b;
    border-bottom-left-radius: 4px;
}

.msg-bubble.ai {
    background: linear-gradient(135deg, rgba(0,232,157,0.12), rgba(0,196,255,0.08));
    border: 1px solid rgba(0,232,157,0.15);
    border-bottom-right-radius: 4px;
}

.msg-bubble.agent {
    background: rgba(124,92,252,0.1);
    border: 1px solid rgba(124,92,252,0.15);
    border-bottom-right-radius: 4px;
}

.msg-sender {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auto-tag {
    font-size: 8px;
    font-weight: 700;
    background: rgba(0,232,157,0.15);
    color: #00e89d;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.05em;
}

.msg-text { word-break: break-word; }
.msg-time { font-size: 10px; color: #64748b; margin-top: 4px; text-align: right; }

.typing-indicator .dot {
    display: inline-block;
    color: #00e89d;
    animation: dotPulse 1.4s infinite;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

/* === CHAT INPUT === */
.chat-input-area {
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #0d1120;
}

.ai-suggestions {
    padding: 8px 16px;
    display: flex;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    flex-wrap: wrap;
}

.ai-suggestions-label { font-size: 11px; color: #64748b; flex-shrink: 0; }

.sug-btn {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0,232,157,0.06);
    border: 1px solid rgba(0,232,157,0.12);
    color: #00e89d;
    font-size: 11px;
    font-family: inherit;
    white-space: nowrap;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-size: 13px;
    font-family: inherit;
}

.btn-send {
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(124,92,252,0.15);
    border: 1px solid rgba(124,92,252,0.2);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-send-ai {
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0,232,157,0.1);
    border: 1px solid rgba(0,232,157,0.2);
    color: #00e89d;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* === DETAIL PANEL === */
.detail-panel {
    width: 260px;
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    padding: 16px;
    background: #0d1120;
    flex-shrink: 0;
}

.detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 auto 10px;
}

.detail-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; text-align: center; }
.detail-company { font-size: 12px; color: #94a3b8; margin-bottom: 8px; text-align: center; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.hot { background: rgba(239,68,68,0.1); color: #ef4444; }
.status-badge.warm { background: rgba(245,158,11,0.1); color: #f59e0b; }
.status-badge.cold { background: rgba(100,116,139,0.1); color: #64748b; }

.detail-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.detail-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.detail-row-label { color: #94a3b8; min-width: 80px; flex-shrink: 0; }
.detail-row-value { color: #e2e8f0; font-weight: 500; }

.score-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.score-bar-fill.high { background: #10b981; }
.score-bar-fill.medium { background: #f59e0b; }
.score-bar-fill.low { background: #ef4444; }

.pipeline-stages {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pipeline-stage-item {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    opacity: 0.3;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pipeline-stage-item.current { opacity: 1; }
.pipeline-stage-item .stage-icon { font-size: 14px; }
.pipeline-stage-item .stage-name { font-size: 10px; }

.btn-action {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 12px;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.btn-action:hover { background: rgba(255,255,255,0.06); }

.actions-list { display: flex; flex-direction: column; gap: 4px; }

/* === PIPELINE / KANBAN === */
.pipeline-page { flex: 1; padding: 20px; overflow-y: auto; }

.pipeline-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pipeline-header h2 { font-size: 22px; font-weight: 800; }

.pipeline-stats {
    display: flex;
    gap: 16px;
}

.pipeline-stats span { font-size: 12px; color: #94a3b8; }

.kanban {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: 400px;
}

.kanban-col {
    min-width: 220px;
    flex: 1;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 10px;
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 4px 6px;
}

.kanban-col-title { font-size: 13px; font-weight: 600; }

.kanban-col-count {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.kanban-card {
    background: #111827;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: border-color 0.2s ease;
    animation: fadeIn 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.kanban-card:hover { border-color: rgba(0,232,157,0.3); }

.kanban-card-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.kanban-avatar {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.kanban-card-name { font-size: 13px; font-weight: 600; }
.kanban-card-company { font-size: 11px; color: #94a3b8; }

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

.kanban-card-msg {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
    font-style: italic;
}

/* === BRAIN / KNOWLEDGE BASE === */
.brain-page { flex: 1; padding: 20px; overflow-y: auto; }
.brain-page h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.brain-subtitle { color: #94a3b8; margin-bottom: 24px; }

.brain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.brain-card {
    background: #111827;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.brain-card-icon { font-size: 28px; margin-bottom: 10px; }
.brain-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.brain-card p { font-size: 12px; color: #94a3b8; margin-bottom: 12px; }

.brain-upload {
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.brain-upload:hover { border-color: rgba(0,232,157,0.3); }

.brain-file {
    font-size: 12px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.brain-file .status-ok { color: #10b981; }
.brain-file .status-processing { color: #f59e0b; }

.url-row { display: flex; gap: 6px; margin-bottom: 12px; }

.url-field {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-size: 12px;
    font-family: inherit;
}

.btn-url {
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(0,232,157,0.1);
    border: 1px solid rgba(0,232,157,0.2);
    color: #00e89d;
    font-size: 12px;
    font-weight: 600;
}

.train-area {
    width: 100%;
    height: 100px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}

.config-select {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    font-family: inherit;
}

input[type="range"] { accent-color: #00e89d; }

/* === CONTACTS === */
.contacts-page { flex: 1; padding: 20px; overflow-y: auto; }
.contacts-page h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }

.contacts-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
}

.contacts-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.contacts-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.contacts-table tr:hover { background: rgba(255,255,255,0.02); }

.contact-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    margin-right: 8px;
    vertical-align: middle;
}

/* === CALENDAR / APPOINTMENTS === */
.calendar-page { flex: 1; padding: 20px; overflow-y: auto; }
.calendar-page h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }

.calendar-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.appointments-list { display: flex; flex-direction: column; gap: 8px; }

.appointment-card {
    background: #111827;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    gap: 16px;
    align-items: center;
    transition: border-color 0.2s;
}

.appointment-card:hover { border-color: rgba(0,232,157,0.2); }

.appointment-time {
    text-align: center;
    min-width: 70px;
    padding: 8px;
    background: rgba(0,232,157,0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.appointment-time .time-hour { font-size: 16px; font-weight: 700; color: #00e89d; }
.appointment-time .time-date { font-size: 10px; color: #94a3b8; }

.appointment-info { flex: 1; }
.appointment-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.appointment-desc { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.appointment-lead { font-size: 11px; color: #64748b; }
.appointment-duration {
    font-size: 11px;
    color: #94a3b8;
    padding: 4px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    flex-shrink: 0;
}

.appointment-completed {
    opacity: 0.5;
}

/* === ANALYTICS === */
.analytics-page { flex: 1; padding: 20px; overflow-y: auto; }
.analytics-page h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #111827;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
}

.stat-icon { font-size: 24px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.stat-label { font-size: 12px; color: #94a3b8; }

.stat-card.accent { border-color: rgba(0,232,157,0.2); }
.stat-card.accent .stat-value { color: #00e89d; }

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
}

.chart-card {
    background: #111827;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.chart-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.bar-chart { display: flex; flex-direction: column; gap: 8px; }

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    font-size: 12px;
    color: #94a3b8;
    min-width: 90px;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-value {
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

/* === PLACEHOLDER === */
.placeholder-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    gap: 12px;
    color: #64748b;
}

.placeholder-icon { font-size: 48px; }
.placeholder-title { font-size: 18px; font-weight: 700; color: #e2e8f0; }

/* === UTILITY === */
.text-center { text-align: center; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .detail-panel { display: none; }
}

@media (max-width: 768px) {
    .sidebar { width: 64px; }
    .sidebar .nav-label,
    .sidebar .logo,
    .sidebar .sidebar-footer,
    .sidebar .logo-badge { display: none; }
    .lead-list { width: 240px; }
}

/* === EMPTY STATE === */
.empty-chat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: #64748b;
}

.empty-chat-icon { font-size: 48px; opacity: 0.5; }
.empty-chat-text { font-size: 14px; }

/* === FORMS / MODALS === */
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    font-size: 13px;
    font-family: inherit;
}

select.form-control {
    background: #1e293b;
}

.btn-primary {
    padding: 8px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00e89d, #00c4ff);
    color: #0b0f1a;
    font-size: 13px;
    font-weight: 700;
    border: none;
}

.btn-secondary {
    padding: 8px 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.08);
}
