/* ===== SoftNeed Vazifa — ClickUp uslubidagi dark tema ===== */
:root{
  --bg:#000000;
  --surface:#141416;
  --surface-2:#1E1E22;
  --surface-3:#2A2A30;
  --border:#26262C;
  --text:#FFFFFF;
  --muted:#8A8A96;
  --muted-2:#5E5E68;
  --accent:#7B68EE;
  --accent-soft:rgba(123,104,238,.18);
  --red:#E8543F;
  --orange:#FF7A00;
  --yellow:#F5B301;
  --blue:#3B82F6;
  --green:#25B36B;
  --teal:#12B5A0;
  --pink:#EC4899;
  --r-sm:10px; --r:14px; --r-lg:20px; --r-xl:26px;
  --nav-h:76px;
  --font:-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,'Helvetica Neue',Arial,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:var(--bg);color:var(--text);font-family:var(--font);
  font-size:15px;line-height:1.45;
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));
  overscroll-behavior-y:none;
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:inherit}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:var(--surface-3);border-radius:6px}

/* ---------- Layout ---------- */
.wrap{max-width:720px;margin:0 auto;padding:0 16px}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;align-items:center;gap:10px}
.spacer{flex:1}
.muted{color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:11.5px}
.center{text-align:center}

/* ---------- Header ---------- */
.appbar{
  position:sticky;top:0;z-index:40;background:var(--bg);
  padding:calc(env(safe-area-inset-top) + 12px) 16px 8px;
}
.appbar-top{display:flex;align-items:center;gap:12px}
.appbar h1{font-size:26px;font-weight:800;margin:0;letter-spacing:-.5px}
.appbar .sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.iconbtn{
  width:38px;height:38px;border-radius:50%;border:none;background:transparent;
  color:var(--muted);display:grid;place-items:center;cursor:pointer;flex:none;
}
.iconbtn:active{background:var(--surface-2)}
.avatar{
  width:40px;height:40px;border-radius:50%;background:#EDEDF2;color:#1a1a1a;
  display:grid;place-items:center;font-weight:800;font-size:14px;flex:none;
  position:relative;overflow:hidden;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.sm{width:28px;height:28px;font-size:11px}
.avatar.xs{width:22px;height:22px;font-size:9.5px}
.avatar.online::after{
  content:'';position:absolute;right:0;bottom:0;width:11px;height:11px;
  border-radius:50%;background:var(--green);border:2px solid var(--bg);
}
.avatar.tinted{background:var(--surface-3);color:#fff}

/* ---------- Search ---------- */
.search{
  display:flex;align-items:center;gap:10px;background:var(--surface-2);
  border-radius:var(--r-xl);padding:11px 16px;margin:12px 0;color:var(--muted);
  border:none;width:100%;
}
.search input{background:none;border:none;color:var(--text);outline:none;flex:1;font-size:15px}
.search input::placeholder{color:var(--muted)}

/* ---------- Tiles (Home / My Tasks) ---------- */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;
  background:var(--surface);border-radius:var(--r-lg);padding:12px;margin-bottom:14px}
.tile{
  background:var(--surface-2);border-radius:var(--r);padding:14px;
  display:flex;flex-direction:column;gap:22px;min-height:96px;position:relative;
}
.tile .tile-head{display:flex;align-items:flex-start;justify-content:space-between}
.tile .ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:18px}
.tile .num{font-size:22px;font-weight:800}
.tile .lbl{font-size:16px;font-weight:700}
.tile.danger .lbl,.tile.danger .num{color:var(--red)}
.tile.wide{grid-column:1/-1}

.ico.purple{background:var(--accent)} .ico.red{background:var(--red)}
.ico.orange{background:var(--orange)} .ico.yellow{background:var(--yellow)}
.ico.blue{background:var(--blue)} .ico.teal{background:var(--teal)}
.ico.green{background:var(--green)} .ico.pink{background:var(--pink)}

/* ---------- Section ---------- */
.section-head{display:flex;align-items:center;gap:8px;padding:16px 2px 8px}
.section-head h2{font-size:15px;font-weight:700;color:var(--muted);margin:0;letter-spacing:.2px}
.section-head .add{color:var(--muted);font-size:22px;line-height:1}

/* ---------- Cards / list rows ---------- */
.card{background:var(--surface-2);border-radius:var(--r);padding:14px}
.list{background:var(--surface);border-radius:var(--r-lg);overflow:hidden}
.list-row{display:flex;align-items:center;gap:12px;padding:15px 16px;border-bottom:1px solid var(--border)}
.list-row:last-child{border-bottom:none}
.list-row:active{background:var(--surface-2)}
.list-row .title{font-weight:600;font-size:15.5px}
.list-row .meta{font-size:12.5px;color:var(--muted);margin-top:3px;display:flex;gap:8px;flex-wrap:wrap}
.chev{color:var(--muted-2);font-size:20px}
.count{color:var(--muted);font-size:14px;font-weight:600}

/* ---------- Task row ---------- */
.task{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);align-items:flex-start}
.task:last-child{border-bottom:none}
.dot{width:11px;height:11px;border-radius:50%;flex:none;margin-top:6px}
.task .t-title{font-weight:600;font-size:15px}
.task.done .t-title{text-decoration:line-through;color:var(--muted)}
.task .t-meta{font-size:12.5px;color:var(--muted);margin-top:4px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ---------- Badges ---------- */
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:600;
  padding:3px 9px;border-radius:20px;background:var(--surface-3);color:var(--muted)}
.badge.red{background:rgba(232,84,63,.16);color:#FF8873}
.badge.green{background:rgba(37,179,107,.16);color:#4FD98F}
.badge.blue{background:rgba(59,130,246,.16);color:#7FB0FF}
.badge.yellow{background:rgba(245,179,1,.16);color:#FFD05C}
.badge.purple{background:var(--accent-soft);color:#A99BFF}
.badge.gray{background:var(--surface-3);color:var(--muted)}

/* ---------- Progress ---------- */
.bar{height:6px;border-radius:6px;background:var(--surface-3);overflow:hidden}
.bar > i{display:block;height:100%;border-radius:6px;background:var(--accent)}
.ring{transform:rotate(-90deg)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--accent);color:#fff;border:none;border-radius:var(--r);
  padding:14px 18px;font-weight:700;font-size:15px;cursor:pointer;width:100%;
}
.btn:active{opacity:.85}
.btn.ghost{background:var(--surface-2);color:var(--text)}
.btn.danger{background:rgba(232,84,63,.18);color:#FF8873}
.btn.sm{padding:9px 14px;font-size:13.5px;width:auto;border-radius:10px}
.btn:disabled{opacity:.5}

/* ---------- Forms ---------- */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;color:var(--muted);margin-bottom:6px;font-weight:600}
.inp{
  width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);
  padding:13px 14px;color:var(--text);outline:none;
}
.inp:focus{border-color:var(--accent)}
select.inp{appearance:none;background-image:none}
.inp-color{width:56px;height:44px;padding:4px;background:var(--surface-2);
  border:1px solid var(--border);border-radius:12px}
.errors{color:#FF8873;font-size:12.5px;margin-top:5px}
.help{color:var(--muted);font-size:12px;margin-top:5px}

/* ---------- Tabs ---------- */
.tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{white-space:nowrap;padding:8px 15px;border-radius:20px;background:var(--surface-2);
  color:var(--muted);font-size:13.5px;font-weight:600;border:none;cursor:pointer}
.tab.on{background:var(--accent);color:#fff}

/* ---------- Bottom nav (ClickUp pill) ---------- */
.navbar{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  display:flex;justify-content:center;align-items:center;gap:10px;
  background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.92) 40%,#000 100%);
  pointer-events:none;
}
.navpill{
  pointer-events:auto;display:flex;align-items:center;gap:2px;
  background:#101014;border:1px solid var(--border);border-radius:34px;
  padding:8px 10px;box-shadow:0 8px 26px rgba(0,0,0,.6);
}
.navpill a{
  width:56px;height:44px;border-radius:26px;display:grid;place-items:center;
  color:var(--muted);position:relative;
}
.navpill a.on{background:var(--accent-soft);color:var(--accent)}
.navpill a .nb{
  position:absolute;top:5px;right:10px;min-width:16px;height:16px;border-radius:9px;
  background:var(--red);color:#fff;font-size:9.5px;font-weight:800;
  display:grid;place-items:center;padding:0 4px;
}
.navplus{
  pointer-events:auto;width:56px;height:56px;border-radius:50%;
  background:#101014;border:1px solid var(--border);color:var(--text);
  display:grid;place-items:center;box-shadow:0 8px 26px rgba(0,0,0,.6);
}

/* ---------- Floating Ask pill ---------- */
.askpill{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));z-index:45;
  background:rgba(28,28,32,.92);border:1px solid var(--border);backdrop-filter:blur(12px);
  border-radius:26px;padding:11px 22px;font-weight:700;font-size:14.5px;
  display:flex;align-items:center;gap:9px;box-shadow:0 6px 20px rgba(0,0,0,.5);
}

/* ---------- Modal / sheet ---------- */
.sheet-bg{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:60;backdrop-filter:blur(3px)}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:61;background:#0C0C0E;
  border-radius:22px 22px 0 0;max-height:88vh;overflow:auto;
  padding:6px 0 calc(20px + env(safe-area-inset-bottom));
}
.sheet-head{display:flex;align-items:center;justify-content:center;position:relative;padding:16px}
.sheet-head h3{margin:0;font-size:18px;font-weight:800}
.sheet-head .x{position:absolute;right:14px;top:12px;width:34px;height:34px;border-radius:50%;
  background:var(--surface-2);display:grid;place-items:center;color:var(--muted)}
.sheet .opt{display:flex;align-items:center;gap:14px;padding:14px 18px}
.sheet .opt:active{background:var(--surface)}
.sheet .opt .ico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:20px;flex:none}
.sheet .opt .t{font-weight:700;font-size:16px}
.sheet .opt .d{font-size:13px;color:var(--muted);margin-top:1px}
.sheet .divider{height:1px;background:var(--border);margin:6px 0}

/* ---------- Empty state ---------- */
.empty{text-align:center;padding:56px 20px;color:var(--muted)}
.empty .big{font-size:52px;opacity:.25;margin-bottom:14px}
.empty h3{color:var(--text);font-size:18px;margin:0 0 6px}

/* ---------- Toast ---------- */
.toasts{position:fixed;left:16px;right:16px;bottom:calc(var(--nav-h) + 60px);z-index:70;display:flex;
  flex-direction:column;gap:8px;pointer-events:none}
.toast{background:var(--surface-3);border:1px solid var(--border);border-radius:12px;
  padding:12px 15px;font-size:14px;box-shadow:0 6px 20px rgba(0,0,0,.5);animation:slide .25s ease}
.toast.ok{border-left:3px solid var(--green)}
.toast.err{border-left:3px solid var(--red)}
@keyframes slide{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- Auth ---------- */
.auth{min-height:100vh;display:flex;flex-direction:column;justify-content:center;
  padding:32px 22px;max-width:460px;margin:0 auto}
.auth .logo{width:62px;height:62px;border-radius:18px;background:var(--accent);
  display:grid;place-items:center;font-size:28px;margin-bottom:22px}
.auth h1{font-size:29px;font-weight:800;margin:0 0 6px;letter-spacing:-.6px}
.auth p.lead{color:var(--muted);margin:0 0 26px}

/* ---------- Grid (Excel ko'rinishi) ---------- */
.gridwrap{overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface);
  max-height:calc(100vh - 260px);-webkit-overflow-scrolling:touch}
table.xl{border-collapse:separate;border-spacing:0;font-size:13px;min-width:max-content}
table.xl th,table.xl td{border-right:1px solid var(--border);border-bottom:1px solid var(--border);
  padding:0;background:var(--surface);white-space:nowrap}
table.xl thead th{
  position:sticky;top:0;z-index:3;background:#1A1A1E;font-weight:700;color:var(--muted);
  padding:8px 10px;font-size:11.5px;text-align:center
}
table.xl thead th.wknd{background:#241A1A;color:#E09A8E}
table.xl td.sticky,table.xl th.sticky{position:sticky;left:0;z-index:2;background:#131317}
table.xl td.sticky2,table.xl th.sticky2{position:sticky;z-index:2;background:#131317}
table.xl thead th.sticky,table.xl thead th.sticky2{z-index:4}
table.xl input,table.xl select{
  background:transparent;border:none;color:var(--text);padding:9px 10px;width:100%;outline:none;font-size:13px
}
table.xl input:focus,table.xl select:focus{background:var(--accent-soft);box-shadow:inset 0 0 0 1.5px var(--accent)}
td.day{width:30px;min-width:30px;text-align:center;cursor:pointer}
td.day.on{background:var(--accent)}
td.day.on.done{background:var(--green)}
td.day.on.late{background:var(--red)}
td.day.today{box-shadow:inset 0 0 0 1.5px #fff3}
.gridbar{display:flex;gap:8px;align-items:center;padding:10px 0;flex-wrap:wrap}

/* ---------- Dashboard ---------- */
.kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.kpi{background:var(--surface-2);border-radius:var(--r);padding:14px}
.kpi .v{font-size:26px;font-weight:800;letter-spacing:-.5px}
.kpi .k{font-size:12px;color:var(--muted);margin-top:2px}
.chartbox{background:var(--surface-2);border-radius:var(--r-lg);padding:16px;margin-top:12px}
.chartbox h3{margin:0 0 14px;font-size:15px;font-weight:700}
.legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px;font-size:12.5px;color:var(--muted)}
.legend i{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:6px}

@media(min-width:640px){
  .tiles{grid-template-columns:repeat(4,1fr)}
  .kpis{grid-template-columns:repeat(4,1fr)}
}

/* ---------- 1) Kanban doska ---------- */
.board{display:flex;gap:12px;overflow-x:auto;padding-bottom:12px;scroll-snap-type:x mandatory}
.board::-webkit-scrollbar{height:6px}
.bcol{flex:0 0 82%;max-width:300px;background:var(--surface);border-radius:var(--r-lg);
  padding:12px;scroll-snap-align:start;display:flex;flex-direction:column}
.bcol-head{display:flex;align-items:center;gap:8px;padding:2px 4px 12px;font-size:14px}
.bcol-body{display:flex;flex-direction:column;gap:9px;min-height:120px}
.bcard{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
  padding:12px;cursor:grab;touch-action:manipulation}
.bcard:active{cursor:grabbing}
.bcard-title{display:block;font-weight:600;font-size:14px;line-height:1.35}
.bcard-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.bghost{opacity:.35;background:var(--accent-soft)}
.bempty{color:var(--muted-2);font-size:12.5px;text-align:center;padding:22px 0;
  border:1px dashed var(--border);border-radius:12px}
@media(min-width:760px){.bcol{flex:0 0 260px}}

/* ---------- 2) Subtask ---------- */
.sub-item{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid var(--border)}
.sub-item:last-child{border-bottom:none}
.sub-box{width:21px;height:21px;border-radius:6px;border:2px solid var(--muted-2);flex:none;
  display:grid;place-items:center;cursor:pointer;font-size:12px;color:transparent}
.sub-item.done .sub-box{background:var(--green);border-color:var(--green);color:#fff}
.sub-item.done .sub-t{text-decoration:line-through;color:var(--muted)}
.sub-t{flex:1;font-size:14.5px}

/* ---------- 3) Fayllar ---------- */
.file-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border)}
.file-row:last-child{border-bottom:none}
.file-ico{width:38px;height:38px;border-radius:10px;background:var(--surface-3);
  display:grid;place-items:center;font-size:18px;flex:none}
.file-thumb{width:38px;height:38px;border-radius:10px;object-fit:cover;flex:none}

/* ---------- 4) Timer ---------- */
.timer{display:flex;align-items:center;gap:12px;background:rgba(255,122,0,.12);
  border:1px solid rgba(255,122,0,.3);border-radius:var(--r);padding:13px 15px}
.timer .tv{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--orange)}
.timerbar{position:fixed;left:14px;right:14px;bottom:calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  z-index:44;background:rgba(255,122,0,.95);color:#fff;border-radius:14px;padding:11px 16px;
  display:flex;align-items:center;gap:10px;font-weight:700;font-size:14px;
  box-shadow:0 6px 20px rgba(0,0,0,.5)}

/* ---------- 5) Mention ---------- */
.mention{color:var(--accent);font-weight:700}
.mbox{position:absolute;z-index:80;background:#16161A;border:1px solid var(--border);
  border-radius:12px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.6);max-height:210px;overflow-y:auto}
.mbox div{padding:11px 14px;font-size:14px;cursor:pointer;display:flex;gap:9px;align-items:center}
.mbox div:hover,.mbox div.sel{background:var(--accent-soft)}

/* ---------- 7) Bog'liqlik ---------- */
.blocked-note{background:rgba(232,84,63,.12);border:1px solid rgba(232,84,63,.3);
  border-radius:var(--r);padding:13px 15px;font-size:13.5px}

/* ---------- 11) Filtr ---------- */
.filters{background:var(--surface);border-radius:var(--r-lg);padding:14px;margin-bottom:12px}
.chipset{display:flex;flex-wrap:wrap;gap:7px}
.chip{padding:7px 13px;border-radius:18px;background:var(--surface-2);color:var(--muted);
  font-size:12.5px;font-weight:600;border:1px solid var(--border);cursor:pointer}
.chip input{display:none}
.chip.on{background:var(--accent-soft);color:#A99BFF;border-color:var(--accent)}

/* ---------- 12) Tarix ---------- */
.tl{position:relative;padding-left:26px}
.tl::before{content:'';position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:var(--border)}
.tl-item{position:relative;padding:9px 0}
.tl-item::before{content:'';position:absolute;left:-23px;top:15px;width:9px;height:9px;
  border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--bg)}
