:root {
    --sidebar-w: 250px;
    --sidebar-bg: #1b2433;
    --accent: #3b82f6;
}

body { background: #f3f5f9; font-family: "Segoe UI", Arial, sans-serif; }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    padding: 1rem 0.75rem;
    overflow-y: auto;
    z-index: 1000;
    transition: transform .25s;
}
.sidebar .brand {
    display: block; color: #fff; font-size: 1.4rem; font-weight: 700;
    text-decoration: none; padding: .5rem .75rem 1.25rem;
}
.sidebar .brand i { color: #fbbf24; }
.sidebar .nav-link {
    color: #aab4c5; padding: .65rem .85rem; border-radius: .5rem;
    margin-bottom: .15rem; display: flex; align-items: center; gap: .7rem;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active { background: var(--accent); color: #fff; }

/* Asosiy qism */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar {
    background: #fff; padding: .75rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: sticky; top: 0; z-index: 900;
}
.content { padding: 1.5rem; }

/* Kartalar */
.card-box { background: #fff; border-radius: .75rem; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card {
    background: #fff; border-radius: .75rem; padding: 1.1rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card h4 { margin: 0; font-weight: 700; }
.stat-card small { color: #6b7280; }
.stat-icon {
    width: 52px; height: 52px; border-radius: .75rem; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}

/* Login */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1b2433, #3b82f6);
}
.login-card { background: #fff; width: 100%; max-width: 400px; border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-logo {
    width: 64px; height: 64px; margin: 0 auto; border-radius: 1rem;
    background: var(--sidebar-bg); color: #fbbf24; font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
}

/* Telefon va planshet */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
}
/* Kanban */
.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; align-items: flex-start; }
.kanban-col {
    flex: 0 0 280px; background: #e9edf4; border-radius: .75rem;
    padding: .75rem; max-height: calc(100vh - 220px); overflow-y: auto;
}
.kanban-col-head {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; margin-bottom: .75rem; padding-bottom: .5rem;
    border-bottom: 3px solid var(--col, #6b7280);
}
.col-new { --col: #3b82f6; }
.col-contacted { --col: #f59e0b; }
.col-negotiation { --col: #8b5cf6; }
.col-won { --col: #22c55e; }
.col-lost { --col: #ef4444; }

.lead-card {
    background: #fff; border-radius: .6rem; padding: .8rem;
    margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.lead-card .lead-name { font-weight: 600; }
.lead-card .lead-meta { font-size: .85rem; color: #6b7280; }
/* Mahsulot rasmi */
.product-thumb {
    width: 48px; height: 48px; object-fit: cover; border-radius: .5rem;
    border: 1px solid #e5e7eb;
}
.product-thumb-empty {
    width: 48px; height: 48px; border-radius: .5rem; background: #eef1f6; color: #9ca3af;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
a.stat-link { text-decoration: none; color: inherit; }
a.stat-link:hover .stat-card { box-shadow: 0 3px 10px rgba(0,0,0,.12); }