:root{--bg: #f5f6f8;--surface: #ffffff;--border: #e3e6ea;--text: #1c2430;--muted: #6b7684;--primary: #2b5cff;--primary-dark: #1f47d1;--primary-soft: #eaf0ff;--won: #17b26a;--danger: #e5484d;--shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);--radius: 10px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-size:14px}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer}.app{display:flex;height:100%}.sidebar{width:216px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:16px 12px}.brand{display:flex;align-items:center;gap:10px;padding:6px 8px 18px}.brand .logo{width:30px;height:30px;border-radius:8px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700;font-size:15px}.brand b{font-size:15px}.brand span{display:block;font-size:11px;color:var(--muted);font-weight:500}.nav{display:flex;flex-direction:column;gap:2px}.nav a{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:8px;color:var(--muted);font-weight:500}.nav a:hover{background:var(--bg);color:var(--text)}.nav a.active{background:var(--primary-soft);color:var(--primary-dark)}.nav .icon{width:18px;text-align:center}.nav-badge{margin-left:auto;background:var(--primary);color:#fff;font-size:11px;font-weight:700;border-radius:20px;padding:1px 7px;min-width:20px;text-align:center}.sidebar-foot{margin-top:auto;border-top:1px solid var(--border);padding-top:12px}.sidebar-foot .who{padding:4px 8px 10px;font-size:12px;color:var(--muted)}.sidebar-foot .who b{display:block;color:var(--text);font-size:13px}.main{flex:1;overflow:auto;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:5}.topbar h1{font-size:18px;margin:0}.content{padding:20px 24px;flex:1}.btn{border:1px solid var(--border);background:var(--surface);color:var(--text);padding:8px 13px;border-radius:8px;font-weight:600;font-size:13px}.btn:hover{background:var(--bg)}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}.btn.danger{color:var(--danger);border-color:#f3c6c7;background:#fff}.btn.danger:hover{background:#fff2f2}.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}.btn.sm{padding:5px 9px;font-size:12px}input,select,textarea{width:100%;padding:9px 11px;border:1px solid var(--border);border-radius:8px;font-family:inherit;font-size:13px;background:#fff;color:var(--text)}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary-soft);border-color:var(--primary)}label{display:block;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:5px}.field{margin-bottom:13px}.row{display:flex;gap:12px}.row>*{flex:1}.board{display:flex;gap:14px;align-items:flex-start;padding:4px 4px 24px;overflow-x:auto;min-height:100%}.column{width:268px;flex-shrink:0;background:var(--bg);border-radius:var(--radius);display:flex;flex-direction:column;max-height:calc(100vh - 150px)}.column-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px}.column-head .title{display:flex;align-items:center;gap:7px;font-weight:700;font-size:13px}.column-head .count{background:#dfe3e8;color:var(--muted);border-radius:20px;padding:1px 8px;font-size:11px;font-weight:700}.column-head .sum{font-size:11px;color:var(--muted);font-weight:600}.column.won .column-head .title{color:var(--won)}.cards{padding:4px 8px 8px;overflow-y:auto;flex:1;min-height:40px}.card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:11px 12px;margin-bottom:8px;box-shadow:var(--shadow);cursor:pointer}.card:hover{border-color:#c7cdd6}.card.dragging{box-shadow:0 8px 24px #141e322e;transform:rotate(1deg)}.card .card-title{font-weight:600;margin-bottom:4px;line-height:1.3}.card .card-company{font-size:12px;color:var(--muted);margin-bottom:8px}.card .card-foot{display:flex;align-items:center;justify-content:space-between}.card .value{font-weight:700;font-size:13px}.card .next{margin-top:8px;font-size:11px;color:var(--muted);background:var(--bg);border-radius:6px;padding:5px 7px;display:flex;gap:6px;align-items:center}.avatar{width:22px;height:22px;border-radius:50%;background:var(--primary-soft);color:var(--primary-dark);font-size:10px;font-weight:700;display:grid;place-items:center}.column .add-card{margin:0 8px 10px}.column .add-card button{width:100%;text-align:left;color:var(--muted)}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:11px 16px;border-bottom:1px solid var(--border)}th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;font-weight:700}tbody tr:hover{background:var(--bg);cursor:pointer}tbody tr:last-child td{border-bottom:none}.tag{display:inline-block;background:var(--bg);border:1px solid var(--border);border-radius:20px;padding:2px 10px;font-size:12px;color:var(--muted);font-weight:600}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:22px}.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px}.stat .label{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:6px}.stat .num{font-size:26px;font-weight:700}.funnel-row{display:flex;align-items:center;gap:12px;padding:9px 0}.funnel-row .fname{width:190px;font-weight:600}.funnel-bar{height:22px;background:var(--primary);border-radius:6px;min-width:3px}.funnel-row .fval{font-size:12px;color:var(--muted)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f162366;display:grid;place-items:center;z-index:50;padding:20px}.modal{background:var(--surface);border-radius:14px;width:100%;max-width:560px;max-height:90vh;overflow:auto;box-shadow:0 20px 60px #0000004d}.modal.wide{max-width:760px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface)}.modal-head h2{margin:0;font-size:17px}.modal-body{padding:20px 22px}.modal-foot{display:flex;justify-content:space-between;gap:10px;padding:16px 22px;border-top:1px solid var(--border);position:sticky;bottom:0;background:var(--surface)}.detail-grid{display:grid;grid-template-columns:1fr 260px;gap:22px}.activity{border-left:2px solid var(--border);padding:2px 0 14px 14px;position:relative}.activity:before{content:"";position:absolute;left:-5px;top:4px;width:8px;height:8px;border-radius:50%;background:var(--primary)}.activity .meta{font-size:11px;color:var(--muted);margin-bottom:3px}.meta-list{list-style:none;padding:0;margin:0}.meta-list li{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}.meta-list li span{color:var(--muted)}.attach{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid var(--border);border-radius:8px;margin-bottom:6px;background:var(--surface)}.attach-icon{flex-shrink:0}.attach-name{flex:1;font-size:13px;font-weight:600;color:var(--primary-dark);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attach-name:hover{text-decoration:underline}.login-wrap{height:100%;display:grid;place-items:center;background:linear-gradient(140deg,#eef2ff,#f5f6f8)}.login-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:32px;width:360px;box-shadow:var(--shadow)}.login-card .brand{justify-content:center;padding-bottom:22px}.login-error{background:#fff2f2;border:1px solid #f3c6c7;color:var(--danger);padding:9px 12px;border-radius:8px;font-size:13px;margin-bottom:14px}.cal-layout{display:flex;gap:18px;align-items:flex-start}.cal{flex:1;min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}.cal-head{border-bottom:1px solid var(--border);background:var(--bg)}.cal-wd{padding:8px 10px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}.cal-cell{min-height:104px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:5px 6px;cursor:pointer;background:var(--surface)}.cal-cell:nth-child(7n){border-right:none}.cal-cell:hover{background:var(--bg)}.cal-cell.out{background:#fafbfc}.cal-cell.out .cal-daynum{color:#c2c8d0}.cal-cell.today .cal-daynum{background:var(--primary);color:#fff;border-radius:50%;width:22px;height:22px;display:grid;place-items:center}.cal-daynum{font-size:12px;font-weight:700;color:var(--text);margin-bottom:3px}.cal-events{display:flex;flex-direction:column;gap:3px}.ev-chip{font-size:11px;padding:2px 6px;border-radius:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-left:3px solid transparent}.ev-chip.done{opacity:.5;text-decoration:line-through}.ev-more{font-size:10px;color:var(--muted);padding-left:4px}.ev-call{background:#eaf0ff;color:#234ca8;border-left-color:#2b5cff}.ev-meeting{background:#f0eaff;color:#5a2ea8;border-left-color:#7c4dff}.ev-task{background:#eef1f4;color:#4a5563;border-left-color:#94a1b2}.ev-reminder{background:#fff0e8;color:#a5461a;border-left-color:#ff7a3d}.ev-followup{background:#fff6e0;color:#8a6d1a;border-left-color:#f5b400}.cal-side{width:300px;flex-shrink:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px}.up-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border);cursor:pointer}.up-item:last-child{border-bottom:none}.up-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}.up-dot.ev-call{background:#2b5cff}.up-dot.ev-meeting{background:#7c4dff}.up-dot.ev-task{background:#94a1b2}.up-dot.ev-reminder{background:#ff7a3d}.up-dot.ev-followup{background:#f5b400}.up-title{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.up-meta{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty{text-align:center;color:var(--muted);padding:60px 20px}.spinner{text-align:center;color:var(--muted);padding:40px}.searchbar{max-width:320px}.flex{display:flex;align-items:center;gap:10px}.spacer{flex:1}.muted{color:var(--muted)}
