@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

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

/* ══ TOKENS ══ */
:root {
    --bg:          #f0f2f5;
    --bg2:         #e8eaed;
    --surface:     #ffffff;
    --border:      rgba(0,0,0,.07);
    --border2:     rgba(0,0,0,.13);
    --text:        #0f172a;
    --text-2:      #64748b;
    --text-3:      #94a3b8;
    --accent:      #2563eb;
    --accent-h:    #1d4ed8;
    --accent-bg:   #eff6ff;
    --accent-brd:  #bfdbfe;
    --primary:     #6366f1;
    --primary-h:   #4f52d9;
    --primary-fg:  #ffffff;
    --primary-bg:  #eef2ff;
    --primary-brd: #c7d2fe;
    --success:     #16a34a;
    --success-bg:  #f0fdf4;
    --success-brd: #bbf7d0;
    --warning:     #d97706;
    --warning-bg:  #fffbeb;
    --warning-brd: #fde68a;
    --danger:      #dc2626;
    --danger-bg:   #fef2f2;
    --danger-brd:  #fecaca;
    --nav-h:       60px;
    --r:           12px;
    --r-lg:        18px;
    --r-xl:        24px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:      0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
    --shadow-lg:   0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
}

/* ── DARK THEME ── */
[data-theme="dark"] {
    --bg:          #030303;
    --bg2:         rgba(255,255,255,.02);
    --surface:     rgba(255,255,255,.04);
    --border:      rgba(255,255,255,.07);
    --border2:     rgba(255,255,255,.13);
    --text:        rgba(255,255,255,.92);
    --text-2:      rgba(255,255,255,.42);
    --text-3:      rgba(255,255,255,.22);
    --accent:      #60a5fa;
    --accent-h:    #3b82f6;
    --accent-bg:   rgba(96,165,250,.12);
    --accent-brd:  rgba(96,165,250,.25);
    --primary:     #818cf8;
    --primary-h:   #6366f1;
    --primary-bg:  rgba(99,102,241,.12);
    --primary-brd: rgba(99,102,241,.25);
    --success:     #34d399;
    --success-bg:  rgba(16,185,129,.12);
    --success-brd: rgba(16,185,129,.22);
    --warning:     #fbbf24;
    --warning-bg:  rgba(245,158,11,.1);
    --warning-brd: rgba(245,158,11,.2);
    --danger:      #fb7185;
    --danger-bg:   rgba(244,63,94,.12);
    --danger-brd:  rgba(244,63,94,.22);
    --shadow-sm:   0 1px 3px rgba(0,0,0,.4);
    --shadow:      0 4px 12px rgba(0,0,0,.5);
    --shadow-lg:   0 12px 32px rgba(0,0,0,.6);
}

/* ══ SHAPES (dark only) ══ */
[data-theme="dark"] body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 55% 35% at 15% 25%, rgba(99,102,241,.06) 0%, transparent 70%),
        radial-gradient(ellipse 45% 35% at 85% 75%, rgba(244,63,94,.05) 0%, transparent 70%);
}
[data-theme="dark"] .shape { display: block; }
.shape {
    display: none;
    position: fixed; border-radius: 9999px;
    border: 1.5px solid rgba(255,255,255,.09); pointer-events: none; z-index: 0;
    animation: shapeFloat 12s ease-in-out infinite;
}
.s1 { width: 520px; height: 118px; background: linear-gradient(to right, rgba(99,102,241,.1), transparent); top: 18%; left: -8%; transform: rotate(12deg); animation-delay: 0s; }
.s2 { width: 420px; height: 102px; background: linear-gradient(to right, rgba(37,99,235,.1), transparent); top: 68%; right: -3%; transform: rotate(-15deg); animation-delay: 1.4s; }
.s3 { width: 240px; height: 66px; background: linear-gradient(to right, rgba(139,92,246,.1), transparent); bottom: 8%; left: 8%; transform: rotate(-8deg); animation-delay: .8s; }
.s4 { width: 165px; height: 48px; background: linear-gradient(to right, rgba(245,158,11,.1), transparent); top: 12%; right: 18%; transform: rotate(20deg); animation-delay: 2s; }
.s5 { width: 120px; height: 34px; background: linear-gradient(to right, rgba(6,182,212,.1), transparent); top: 6%; left: 22%; transform: rotate(-25deg); animation-delay: 2.4s; }

@keyframes shapeFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 13px; }
}

/* ══ BASE ══ */
html, body { height: 100%; }
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px; line-height: 1.5;
    background: var(--bg); color: var(--text);
    display: flex; flex-direction: column;
    overflow: hidden;
}

/* ══ TOP NAV ══ */
.topnav {
    height: var(--nav-h); flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0;
    padding: 0 24px;
    position: relative; z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.topnav-logo {
    display: flex; align-items: center; gap: 10px;
    margin-right: 32px; flex-shrink: 0;
}
.logo-mark {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; color: #fff;
    box-shadow: 0 4px 10px rgba(37,99,235,.3);
}
.logo-name { font-size: 14px; font-weight: 900; color: var(--text); letter-spacing: -.3px; }

.topnav-links {
    display: flex; align-items: center; gap: 2px;
    flex: 1; overflow-x: auto; scrollbar-width: none;
}
.topnav-links::-webkit-scrollbar { display: none; }

.nav-item {
    padding: 7px 14px; border-radius: var(--r);
    font-size: 12px; font-weight: 700; color: var(--text-2);
    cursor: pointer; white-space: nowrap;
    transition: all .15s; user-select: none;
    border: 1px solid transparent;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-brd);
}

.topnav-right {
    display: flex; align-items: center; gap: 12px;
    margin-left: 24px; flex-shrink: 0;
}

.topnav-search {
    position: relative; display: flex; align-items: center;
}
.topnav-search input {
    padding: 7px 12px 7px 34px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 100px; font-size: 12px; color: var(--text);
    font-family: inherit; outline: none; width: 200px;
    transition: all .15s; font-weight: 600;
}
.topnav-search input::placeholder { color: var(--text-3); }
.topnav-search input:focus { width: 260px; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-icon { position: absolute; left: 11px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }

.topnav-date { font-size: 11px; color: var(--text-3); font-weight: 700; white-space: nowrap; }

.theme-toggle {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg);
    cursor: pointer; font-size: 15px; display: flex;
    align-items: center; justify-content: center;
    transition: all .15s;
}
.theme-toggle:hover { border-color: var(--accent); }

.topnav-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff; font-size: 13px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
    cursor: pointer;
}

/* ══ MOBILE MENU ══ */
.menu-toggle {
    display: none;
    width: 38px; height: 38px; border-radius: var(--r); flex-shrink: 0;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    align-items: center; justify-content: center; cursor: pointer;
    margin-right: 12px; transition: all .15s;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

.drawer-overlay {
    display: none; position: fixed; inset: 0; z-index: 240;
    background: rgba(0,0,0,.6); opacity: 0; visibility: hidden;
    transition: opacity .2s ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
    display: none; position: fixed; top: 0; left: 0; bottom: 0; z-index: 250;
    width: 78%; max-width: 300px; background: var(--bg);
    border-right: 1px solid var(--border); box-shadow: var(--shadow-lg);
    transform: translateX(-100%); transition: transform .25s ease;
    overflow-y: auto; padding: 16px 12px;
}
.drawer.open { transform: translateX(0); }
.drawer-logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.drawer-links { display: flex; flex-direction: column; gap: 4px; }
.drawer .nav-item { padding: 13px 14px; font-size: 13px; }
body.drawer-locked { overflow: hidden; }

/* ══ MAIN ══ */
.main {
    flex: 1; overflow: hidden;
    position: relative; z-index: 10;
    display: flex; flex-direction: column;
}
.content {
    flex: 1; overflow-y: auto; padding: 24px 28px 40px;
    scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ══ KPI GRID ══ */
.kpi-grid { display: grid; gap: 14px; margin-bottom: 20px; }
.kpi-grid-6 { grid-template-columns: repeat(6, 1fr); }
.kpi-grid-7 { grid-template-columns: repeat(7, 1fr); }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .15s;
    position: relative; overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--accent); border-radius: 4px 0 0 4px;
    opacity: 0; transition: opacity .2s;
}
.kpi-card:hover::before { opacity: 1; }
.kpi-card.border-danger::before { opacity: 1; background: var(--danger); }
.kpi-label { font-size: 10px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.kpi-value { font-size: 24px; font-weight: 900; color: var(--text); line-height: 1.1; letter-spacing: -.5px; }
.kpi-sub { font-size: 11px; color: var(--text-2); margin-top: 5px; font-weight: 600; }

/* ══ CARDS ══ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px; overflow: hidden;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 13px; font-weight: 800; color: var(--text); }

/* ══ TABLES ══ */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th {
    text-align: left; font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-3); padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .08s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tbody td { padding: 12px 20px; vertical-align: middle; font-weight: 600; }
.tfoot-row td { background: var(--bg2); font-weight: 800; border-top: 2px solid var(--border); padding: 12px 20px; }

.amount-in { color: var(--success); font-weight: 700; }
.amount-out { color: var(--danger); font-weight: 700; }

/* ══ BUTTONS ══ */
.btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border-radius: 100px; font-size: 12px;
    font-weight: 700; cursor: pointer; border: 1px solid transparent;
    font-family: inherit; transition: all .12s; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); box-shadow: 0 4px 14px rgba(37,99,235,.35); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--border2); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; border-radius: var(--r); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-brd); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-xs { padding: 3px 9px; font-size: 10px; border-radius: 100px; }

.action-btns { display: flex; gap: 4px; opacity: 0; transition: opacity .1s; }
tr:hover .action-btns { opacity: 1; }

.btn-group { display: flex; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: 100px 0 0 100px; }
.btn-group .btn:last-child { border-radius: 0 100px 100px 0; border-right-width: 1px; }
.btn-group .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ══ BADGES ══ */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 100px;
    font-size: 10px; font-weight: 800; white-space: nowrap;
}
.badge-green { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-brd); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-brd); }
.badge-red { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-brd); }
.badge-blue { background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-brd); }
.badge-gray { background: var(--bg2); color: var(--text-2); border: 1px solid var(--border); }

/* ══ TASKS ══ */
.tasks-list { padding: 4px 0; }
.task-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; border-bottom: 1px solid var(--border);
    transition: background .08s;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--bg); }
.task-item:hover .del-task-btn { opacity: .5; }
.del-task-btn { opacity: 0; transition: opacity .1s; }
.task-check { width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.task-text { flex: 1; font-size: 12px; color: var(--text); font-weight: 600; }
.task-text.done { text-decoration: line-through; color: var(--text-3); }
.task-date { font-size: 10px; color: var(--text-2); flex-shrink: 0; white-space: nowrap; font-weight: 700; }
.task-date.overdue { color: var(--danger); }

.add-task-form {
    display: flex; gap: 8px; padding: 12px 20px;
    border-top: 1px solid var(--border); background: var(--bg);
}
.add-task-form input {
    flex: 1; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: 100px; font-size: 12px; font-family: inherit;
    background: var(--surface); color: var(--text); outline: none; font-weight: 600;
    transition: all .15s;
}
.add-task-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.add-task-form input[type="date"] { flex: 0 0 130px; color: var(--text-2); border-radius: var(--r); }

/* ══ CHARTS ══ */
.charts-row { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-bottom: 14px; }
.charts-row-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 20px;
    box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.chart-card h3 { font-size: 12px; font-weight: 800; margin-bottom: 16px; color: var(--text); text-transform: uppercase; letter-spacing: .06em; }

/* ══ TWO-COL ══ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

/* ══ SUB-TABS ══ */
.sub-tabs {
    display: flex; gap: 2px;
    background: var(--bg); padding: 4px;
    border-radius: 100px; margin-bottom: 18px;
    width: fit-content; border: 1px solid var(--border);
}
.sub-tab {
    padding: 6px 18px; border-radius: 100px; font-size: 12px; font-weight: 700;
    cursor: pointer; border: none; background: transparent; color: var(--text-2);
    font-family: inherit; transition: all .12s;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25); }

/* ══ MODAL ══ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; opacity: 0; visibility: hidden; transition: all .2s;
    backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 28px; width: 520px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(10px) scale(0.97); transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal h2 { font-size: 17px; font-weight: 900; margin-bottom: 22px; color: var(--text); letter-spacing: -.4px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}

/* ══ FORMS ══ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 10px; font-weight: 800; color: var(--text-3);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .1em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: var(--r); font-size: 13px; color: var(--text);
    background: var(--bg); outline: none; font-family: inherit;
    transition: all .14s; font-weight: 600;
}
.form-group select option { background: var(--surface); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-group textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ══ PROJECT CARDS ══ */
.project-card { border-bottom: 1px solid var(--border); }
.project-card:last-child { border-bottom: none; }
.project-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; transition: background .08s; user-select: none; cursor: pointer;
}
.project-header:hover { background: var(--bg); }
.project-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.project-name { font-size: 13px; font-weight: 700; }
.project-meta { font-size: 11px; color: var(--text-2); margin-top: 1px; font-weight: 600; }
.project-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: 16px; }
.project-progress { display: flex; align-items: center; gap: 8px; }
.progress-bar { width: 80px; height: 5px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .3s; background: var(--accent); }
.progress-label { font-size: 10px; color: var(--text-2); white-space: nowrap; font-weight: 700; }
.project-body { border-top: 1px solid var(--border); background: var(--bg); }
.project-body.collapsed { display: none; }
.project-tasks { padding: 4px 0; }

/* ══ KANBAN ══ */
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; align-items: flex-start; }
.kanban-col {
    min-width: 220px; max-width: 220px;
    background: var(--bg); border-radius: var(--r-lg); overflow: hidden; flex-shrink: 0;
    border: 1px solid var(--border);
}
.kanban-col-header {
    padding: 12px 14px; font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface); border-bottom: 1px solid var(--border);
    text-transform: uppercase; letter-spacing: .05em;
}
.kanban-col-header .col-dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; display: inline-block; }
.kanban-col-count { background: var(--bg2); color: var(--text-2); padding: 1px 8px; border-radius: 100px; font-size: 10px; font-weight: 800; }
.kanban-cards { padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); padding: 12px 14px; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: all .12s;
}
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--accent-brd); transform: translateY(-1px); }
.kanban-card-name { font-weight: 700; font-size: 12px; margin-bottom: 2px; }
.kanban-card-company { font-size: 10px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.kanban-card-amount { font-size: 12px; font-weight: 800; color: var(--accent); }
.kanban-card-meta { font-size: 10px; color: var(--text-3); margin-top: 4px; font-weight: 600; }
.kanban-col-total { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 10px; font-weight: 800; color: var(--text-2); }

/* ══ CLIENTS ══ */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.client-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px;
    box-shadow: var(--shadow-sm); transition: all .15s;
}
.client-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent-brd); }
.client-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.client-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 14px; flex-shrink: 0;
}
.client-name { font-weight: 800; font-size: 14px; }
.client-company { font-size: 11px; color: var(--text-2); margin-top: 2px; font-weight: 600; }
.client-meta { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--text-2); margin-bottom: 12px; font-weight: 600; }
.client-meta-row { display: flex; align-items: center; gap: 5px; }
.client-value { font-size: 15px; font-weight: 900; color: var(--accent); margin-bottom: 12px; }
.client-actions { display: flex; justify-content: flex-end; gap: 5px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ══ GOAL CARD ══ */
.goal-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border: none !important; color: #fff; margin-bottom: 16px;
    position: relative; overflow: hidden; border-radius: var(--r-xl) !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.25) !important;
}
.goal-card::after {
    content: ''; position: absolute; top: -60px; right: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.12), transparent 70%);
    pointer-events: none;
}
.goal-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 0; padding: 22px 28px 14px; }
.goal-item { padding: 0 20px; border-right: 1px solid rgba(255,255,255,.1); }
.goal-item:first-child { padding-left: 0; }
.goal-item:last-child { border-right: none; }
.goal-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .45; margin-bottom: 5px; }
.goal-value { font-size: 26px; font-weight: 900; line-height: 1.1; letter-spacing: -.5px; }
.goal-sub { font-size: 10px; opacity: .5; margin-top: 3px; font-weight: 600; }
.goal-bar-wrap { padding: 0 28px 18px; }
.goal-bar-bg { background: rgba(255,255,255,.12); border-radius: 100px; height: 8px; overflow: hidden; margin-bottom: 6px; }
.goal-bar-fill { height: 100%; border-radius: 100px; transition: width .4s ease; box-shadow: 0 0 12px rgba(37,99,235,.4); }
.goal-bar-labels { display: flex; justify-content: space-between; font-size: 10px; opacity: .5; font-weight: 700; }

/* ══ CHANNEL FUNNELS ══ */
.funnels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.funnel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.funnel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg); }
.funnel-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; }
.funnel-stages { padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.funnel-stage { display: flex; align-items: center; gap: 8px; }
.funnel-stage-label { font-size: 10px; color: var(--text-2); width: 90px; flex-shrink: 0; font-weight: 700; }
.funnel-stage-bar { flex: 1; height: 5px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.funnel-stage-fill { height: 100%; border-radius: 3px; }
.funnel-stage-num { font-size: 11px; font-weight: 800; width: 30px; text-align: right; flex-shrink: 0; }
.funnel-foot { padding: 10px 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg); font-size: 11px; color: var(--text-2); font-weight: 700; }

/* ══ SALES PLAN ══ */
.plan-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--border); }
.plan-stat-cell { padding: 16px 20px; border-right: 1px solid var(--border); }
.plan-stat-cell:last-child { border-right: none; }
.plan-stat-label { font-size: 10px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.plan-stat-fact { font-size: 22px; font-weight: 900; line-height: 1.1; letter-spacing: -.5px; }
.plan-stat-plan { font-size: 11px; color: var(--text-2); margin-top: 3px; font-weight: 600; }
.plan-mini-bar { height: 4px; background: var(--bg2); border-radius: 2px; margin-top: 6px; overflow: hidden; width: 100%; }
.plan-mini-fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* ══ WEEKLY CHECKLIST ══ */
.week-client-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); transition: background .08s; }
.week-client-row:last-child { border-bottom: none; }
.week-client-row:hover { background: var(--bg); }
.week-client-info { min-width: 160px; flex-shrink: 0; }
.week-client-name { font-size: 12px; font-weight: 800; }
.week-client-company { font-size: 10px; color: var(--text-2); margin-top: 1px; font-weight: 600; }
.week-checks { display: flex; gap: 8px; flex: 1; }
.week-check-item { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 100px; border: 1px solid var(--border); background: var(--bg); font-size: 11px; font-weight: 700; cursor: pointer; transition: all .1s; white-space: nowrap; user-select: none; }
.week-check-item input { accent-color: var(--accent); cursor: pointer; }
.week-check-item.done { background: var(--success-bg); border-color: var(--success-brd); color: var(--success); }
.week-leads-cell { min-width: 130px; flex-shrink: 0; text-align: right; }
.week-lead-bar { height: 4px; background: var(--bg2); border-radius: 2px; margin-top: 4px; overflow: hidden; width: 100%; }
.week-lead-fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* ══ SEARCH ══ */
.search-group-header { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 10px 20px 6px; background: var(--bg); border-bottom: 1px solid var(--border); }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .08s; cursor: pointer; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }
.search-result-text { flex: 1; font-size: 13px; font-weight: 700; }
.search-result-sub { font-size: 11px; color: var(--text-2); font-weight: 600; }

/* ══ MISC ══ */
.plan-fact-cell { display: flex; flex-direction: column; gap: 1px; }
.plan-fact-fact { font-weight: 700; }
.plan-fact-target { font-size: 10px; color: var(--text-3); }
.plan-fact-bar { height: 3px; background: var(--bg2); border-radius: 2px; margin-top: 3px; overflow: hidden; width: 60px; }
.plan-fact-fill { height: 100%; border-radius: 2px; background: var(--accent); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.empty-state .empty-icon { font-size: 32px; margin-bottom: 10px; opacity: .3; }

.client-detail-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ══ RESPONSIVE ══ */
@media (max-width: 1200px) {
    .kpi-grid-6 { grid-template-columns: repeat(3, 1fr); }
    .kpi-grid-7 { grid-template-columns: repeat(4, 1fr); }
    .topnav-date { display: none; }
}
@media (max-width: 1000px) {
    .charts-row { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .topnav-search input { width: 160px; }
    .funnels-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .drawer-overlay, .drawer { display: block; }
    .topnav-links { display: none; }
    .topnav { padding: 0 14px; gap: 0; }
    .topnav-logo { margin-right: auto; }
    .topnav-right { margin-left: 8px; gap: 8px; }
    .topnav-search input { width: 110px; }
    .topnav-search input:focus { width: 140px; }
    .content { padding: 16px 14px 32px; }

    .kpi-grid-6, .kpi-grid-7, .kpi-grid-4, .kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .charts-row-equal { grid-template-columns: 1fr; }
    .funnels-grid { grid-template-columns: 1fr; }
    .goal-grid { grid-template-columns: 1fr 1fr; }
    .plan-stat-row { grid-template-columns: 1fr; }
    .plan-stat-cell { border-right: none; border-bottom: 1px solid var(--border); }
    .plan-stat-cell:last-child { border-bottom: none; }
    .form-row { grid-template-columns: 1fr; }
    .client-grid { grid-template-columns: 1fr; }

    .week-client-row { flex-wrap: wrap; gap: 8px; }
    .week-client-info { min-width: 0; width: 100%; }
    .week-checks { width: 100%; flex-wrap: wrap; }
    .week-leads-cell { min-width: 0; width: 100%; text-align: left; }

    .modal { width: 92vw; padding: 20px; max-height: 88vh; }
}
@media (max-width: 480px) {
    .kpi-grid-6, .kpi-grid-7, .kpi-grid-4, .kpi-grid-3 { grid-template-columns: 1fr; }
    .goal-grid { grid-template-columns: 1fr 1fr; gap: 0; }
    .goal-item { padding: 0 12px; }
    .topnav-search { display: none; }
    .topnav-avatar { display: none; }
}
