@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f4f5fa;
  --card: #ffffff;
  --text: #1f2333;
  --muted: #6b7089;
  --line: #e4e6ef;
  --primary: #4f46e5;
  --primary-soft: #eef0ff;
  --green: #0f9d6b;
  --green-soft: #e3f7ef;
  --red: #dc3b4b;
  --red-soft: #fdecee;
  --amber: #c27c0e;
  --amber-soft: #fdf3e0;
  --blue: #2a7de1;
  --blue-soft: #e6f0fd;
  --purple: #8b5cf6;
  --purple-soft: #f1ebff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 40, .05), 0 4px 16px rgba(20, 22, 40, .05);
}
@media screen {
  :root[data-theme="dark"] {
    --bg: #12131a; --card: #1b1d27; --text: #e8e9f1; --muted: #9a9db3; --line: #2b2e3c;
    --primary: #8b85ff; --primary-soft: #26254a; --green: #34d399; --green-soft: #133328;
    --red: #f87171; --red-soft: #3a1c21; --amber: #fbbf24; --amber-soft: #382c12;
    --blue: #60a5fa; --blue-soft: #172a45; --purple: #a78bfa; --purple-soft: #2a2145;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--card); border-left: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 16px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #a855f7);
  display: grid; place-items: center; color: #fff; font-size: 18px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); font-weight: 500; cursor: pointer;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-item .ic { width: 22px; text-align: center; font-size: 16px; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.main { flex: 1; min-width: 0; padding: 24px 28px 80px; max-width: 1400px; }
.topbar { display: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; right: 0; top: 0; z-index: 50; transform: translateX(100%); transition: transform .2s;
    box-shadow: -4px 0 30px rgba(0, 0, 0, .15);
  }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 40; }
  .topbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  }
  .topbar .title { font-weight: 800; }
  .main { padding: 16px 14px 90px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } h1 { font-size: 19px; } }

/* ---------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.kpi { padding: 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font-size: 21px; font-weight: 800; margin-top: 4px; direction: rtl; }
.kpi .foot { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.green .value { color: var(--green); }
.kpi.red .value { color: var(--red); }
.kpi.blue .value { color: var(--blue); }
.kpi.amber .value { color: var(--amber); }
@media (max-width: 520px) { .kpi .value { font-size: 17px; } .kpi { padding: 12px; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { padding: 1px 8px; font-size: 12px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.icon { padding: 6px 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.bold { font-weight: 700; }
.num { font-feature-settings: 'tnum'; white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: embed; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* ---------- table */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }

/* ---------- forms */
.form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { min-height: 80px; resize: vertical; }
.input.money, .input.ltr-in { direction: ltr; text-align: right; }
.with-add { display: flex; gap: 6px; }
.with-add select { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.seg { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.search { min-width: 200px; }

/* ---------- modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 17, 30, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow-y: auto; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: pop .15s ease-out; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@media (max-width: 600px) { .modal-back { padding: 0; align-items: flex-end; } .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; } }

/* ---------- toast */
#toast-root { position: fixed; bottom: 20px; left: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #23263a; color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .2s; max-width: 340px; }
.toast.err { background: var(--red); }

/* ---------- progress */
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.bar.green > i { background: var(--green); }
.bar.red > i { background: var(--red); }
.bar.amber > i { background: var(--amber); }

/* ---------- kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kcol { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.kcol.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; font-weight: 700; }
.kcard { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.kcard:hover { border-color: var(--primary); }
.kcard .t { font-weight: 700; }
.kcard .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- checklist / steps */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.ck-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.ck-item:hover { background: var(--bg); }
.ck-item.done .txt { text-decoration: line-through; color: var(--muted); }
.ck-item .txt { flex: 1; min-width: 0; }
.ck-item .tools { opacity: 0; display: flex; gap: 2px; }
.ck-item:hover .tools { opacity: 1; }
@media (hover: none) { .ck-item .tools { opacity: 1; } }
.ck-item.current { background: var(--primary-soft); }
.ck-item.current .txt { font-weight: 700; color: var(--primary); }
.steps { display: flex; gap: 4px; margin: 6px 0 14px; }
.steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.steps span.done { background: var(--green); }
.steps span.cur { background: var(--primary); }

/* ---------- milestones */
.ms { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.ms.paid { border-color: var(--green); background: var(--green-soft); }
.ms.overdue { border-color: var(--red); }
.ms-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-head .t { font-weight: 700; }
.ms-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.ms.paid .ms-num { background: var(--green); color: #fff; }
.ms-deliv { margin-top: 8px; padding-right: 36px; }
.ms-deliv .ck-item { padding: 3px 6px; }

/* ---------- revisions */
.rev { border-right: 3px solid var(--amber); padding: 8px 12px; margin-bottom: 8px; background: var(--bg); border-radius: 8px; }
.rev.done { border-color: var(--green); }

/* ---------- gantt */
.gantt { position: relative; }
.g-row { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.g-row:last-child { border-bottom: 0; }
.g-label { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.g-track { position: relative; height: 26px; background: var(--bg); border-radius: 8px; }
.g-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: var(--primary); opacity: .85; color: #fff; font-size: 11px; padding: 0 6px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.g-bar.late { background: var(--red); }
.g-bar.rev { background: var(--amber); }
.g-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); z-index: 2; }
.g-ms { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; transform: translateX(50%) rotate(45deg); background: var(--green); border: 2px solid var(--card); z-index: 3; }
.g-ms.unpaid { background: var(--amber); }
.g-scale { display: grid; grid-template-columns: 180px 1fr; gap: 10px; font-size: 11px; color: var(--muted); }
.g-scale .marks { position: relative; height: 18px; }
.g-scale .marks span { position: absolute; transform: translateX(50%); white-space: nowrap; }
@media (max-width: 600px) { .g-row, .g-scale { grid-template-columns: 90px 1fr; } }

/* ---------- chart */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.hbar { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.hbar .bar { height: 10px; }
@media (max-width: 520px) { .hbar { grid-template-columns: 100px 1fr auto; } }

/* ---------- datepicker */
.dp { position: absolute; z-index: 300; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); padding: 10px; width: 270px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-grid .wd { color: var(--muted); font-size: 11px; padding: 4px 0; }
.dp-grid button { border: 0; background: transparent; padding: 6px 0; border-radius: 8px; cursor: pointer; }
.dp-grid button:hover { background: var(--primary-soft); }
.dp-grid button.today { color: var(--primary); font-weight: 800; }
.dp-grid button.sel { background: var(--primary); color: #fff; }
.dp-grid button.fri { color: var(--red); }
.dp-foot { display: flex; gap: 6px; margin-top: 8px; }

/* ---------- misc */
.stat-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); gap: 10px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line.total { font-weight: 800; font-size: 15px; border-top: 2px solid var(--line); border-bottom: 0; margin-top: 4px; padding-top: 10px; }
.big-price { font-size: 28px; font-weight: 900; color: var(--primary); }
.tpl-card .deliv { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.event { display: flex; gap: 12px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event .date { width: 64px; text-align: center; flex-shrink: 0; }
.event .date b { display: block; font-size: 18px; line-height: 1.1; }
.event .date span { font-size: 11px; color: var(--muted); }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.file-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-edit-row { display: grid; grid-template-columns: 1.3fr 70px 80px 2fr auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 600px) { .ms-edit-row { grid-template-columns: 1fr 1fr; } }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-color: var(--primary); }

/* ---------- print (proforma) */
.invoice { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 40px; border-radius: 8px; box-shadow: var(--shadow); }
.invoice table th, .invoice table td { border: 1px solid #ddd; padding: 8px 10px; color: #111; }
.invoice table th { background: #f4f4f8; }
.invoice .inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #4f46e5; padding-bottom: 16px; margin-bottom: 20px; }
.invoice h1 { color: #4f46e5; }
.invoice .box { background: #f7f7fb; border-radius: 8px; padding: 12px 16px; }
body.print-mode .sidebar, body.print-mode .topbar { display: none; }
body.print-mode .main { max-width: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .no-print, .sidebar, .topbar { display: none !important; }
  .main { padding: 0; }
  .invoice { box-shadow: none; padding: 0; max-width: none; }
}


/* ---------- personal daily task tracker */
.task-progress-card { margin-bottom: 16px; }
.task-progress-top { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.task-progress-date { font-size:18px; font-weight:800; margin-top:2px; }
.task-date-controls { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.task-date-input { width:145px; }
.task-date-input .input { text-align:center; }
.task-progress-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0 12px; }
.task-progress-stats > div { display:flex; flex-direction:column; gap:1px; padding:10px 12px; border-radius:11px; background:var(--bg); }
.task-progress-stats strong { font-size:21px; font-weight:800; }
.task-progress-stats span { color:var(--muted); font-size:12px; }
.task-progress-track { height:9px; background:var(--line); border-radius:99px; overflow:hidden; }
.task-progress-track i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,var(--primary),var(--green)); transition:width .2s ease; }
.task-progress-caption { color:var(--muted); font-size:12px; margin-top:8px; }
.task-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.task-filter-group { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.task-filter { border:1px solid var(--line); background:var(--card); color:var(--muted); border-radius:9px; padding:6px 11px; font:inherit; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
.task-filter.on { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.task-category-filter { max-width:100%; }
.task-group { margin-bottom:14px; }
.task-group .card-head { margin-bottom:6px; }
.my-task-list { display:flex; flex-direction:column; }
.my-task { display:flex; align-items:flex-start; gap:11px; padding:12px 5px; border-bottom:1px solid var(--line); }
.my-task:last-child { border-bottom:0; }
.my-task-check { width:23px; height:23px; flex:0 0 23px; position:relative; margin-top:2px; cursor:pointer; }
.my-task-check input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; margin:0; }
.my-task-check span { display:block; width:22px; height:22px; border:2px solid var(--line); border-radius:7px; background:var(--card); transition:all .15s; }
.my-task-check input:checked + span { background:var(--green); border-color:var(--green); }
.my-task-check input:checked + span:after { content:'✓'; display:block; color:#fff; text-align:center; line-height:18px; font-size:14px; font-weight:800; }
.my-task-check input:focus-visible + span { outline:3px solid var(--primary-soft); outline-offset:2px; }
.my-task-main { flex:1; min-width:0; }
.my-task-title { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-weight:700; line-height:1.7; }
.my-task-desc { color:var(--muted); font-size:12px; margin-top:2px; }
.my-task-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:7px; color:var(--muted); font-size:11px; }
.my-task-meta > span:not(.badge) { padding-left:7px; border-left:1px solid var(--line); }
.my-task.done .my-task-title { color:var(--muted); text-decoration:line-through; }
.my-task.done .my-task-desc { opacity:.65; }
.my-task-actions { display:flex; gap:2px; flex:0 0 auto; opacity:.65; }
.my-task:hover .my-task-actions { opacity:1; }
.task-footnote { color:var(--muted); font-size:11px; text-align:center; padding:8px 4px 2px; }
@media (max-width:700px) {
  .task-progress-top { align-items:flex-start; }
  .task-date-controls { width:100%; }
  .task-date-input { flex:1; min-width:110px; }
  .task-date-controls .btn { flex:1; }
  .task-progress-stats { gap:6px; }
  .task-progress-stats > div { padding:8px; }
  .task-progress-stats strong { font-size:18px; }
  .task-toolbar { align-items:flex-start; }
  .task-category-filter { flex-wrap:nowrap; overflow-x:auto; width:100%; padding-bottom:5px; }
  .my-task { gap:8px; }
  .my-task-actions { opacity:1; }
}


/* ---------- voice inbox add-on */
.voice-upload-card { display:flex; flex-direction:column; gap:14px; }
.voice-mic { width:54px; height:54px; flex:0 0 54px; display:grid; place-items:center; border-radius:16px; background:var(--primary-soft); font-size:27px; }
.voice-pick { align-self:flex-start; position:relative; overflow:hidden; }
.voice-pick input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.voice-note { margin-bottom:14px; }
.voice-audio { width:100%; margin:4px 0 12px; }
.voice-label { display:block; font-weight:700; margin:6px 0; }
.voice-transcript { min-height:100px; line-height:1.9; }
.voice-actions { margin-top:10px; flex-wrap:wrap; }
.voice-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:14px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.voice-preview > div { min-width:0; display:flex; flex-direction:column; gap:2px; }
.voice-preview span { color:var(--muted); font-size:11px; }
.voice-preview b { overflow-wrap:anywhere; font-size:13px; }
@media(max-width:650px) { .voice-preview { grid-template-columns:repeat(2,minmax(0,1fr)); } .voice-actions .btn { flex:1 1 auto; } }


/* Voice transcription feedback */
.voice-progress,
.voice-error {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.9;
}
.voice-progress {
  color: var(--text, #e5e7eb);
  background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(129, 140, 248, .35);
}
.voice-error {
  color: #fecaca;
  background: rgba(220, 38, 38, .12);
  border: 1px solid rgba(248, 113, 113, .35);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* ---------- Persian AI agent */
.agent-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(250px,.8fr); gap:16px; align-items:start; }
.agent-chat-card { padding:0; overflow:hidden; }
.agent-chat-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--line); }
.agent-messages { display:flex; flex-direction:column; gap:14px; padding:18px; min-height:300px; max-height:58vh; overflow:auto; background:color-mix(in srgb,var(--bg) 55%,transparent); }
.agent-message { max-width:92%; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--card); box-shadow:var(--shadow); }
.agent-message.user { align-self:flex-start; background:var(--primary-soft); border-color:color-mix(in srgb,var(--primary) 25%,var(--line)); }
.agent-message.assistant { align-self:flex-end; }
.agent-message-role { display:flex; gap:10px; align-items:center; font-size:11px; color:var(--muted); margin-bottom:6px; font-weight:700; }
.agent-message-role span { font-weight:400; }
.agent-message-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.95; }
.agent-audio { width:min(100%,360px); display:block; margin:8px 0; }
.agent-composer { padding:14px; border-top:1px solid var(--line); display:grid; gap:10px; }
.agent-composer textarea { resize:vertical; min-height:60px; }
.agent-composer-actions { gap:8px; }
.agent-side-card { display:grid; gap:12px; align-content:start; }
.agent-capability { display:grid; gap:2px; padding:10px 0; border-bottom:1px solid var(--line); }
.agent-capability span { font-size:12px; color:var(--muted); }
.agent-privacy { margin-top:6px; padding:12px; background:var(--bg); border-radius:10px; }
.agent-privacy p { margin:4px 0 0; line-height:1.8; }
.agent-action-card { margin-top:12px; border:1px solid var(--line); border-radius:10px; padding:11px; display:grid; gap:8px; background:var(--bg); }
.agent-welcome { text-align:center; margin:auto; max-width:540px; color:var(--muted); }
.agent-welcome-icon { font-size:38px; margin-bottom:8px; }
.agent-welcome h2 { color:var(--text); }
.agent-welcome p { margin:8px 0 14px; }
.agent-suggestions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.agent-setup-notice { margin-bottom:16px; border-color:var(--amber); }
@media(max-width:900px) { .agent-layout { grid-template-columns:1fr; } .agent-side-card { grid-template-columns:repeat(2,minmax(0,1fr)); } .agent-side-card h3,.agent-privacy { grid-column:1/-1; } }
@media(max-width:560px) { .agent-message { max-width:100%; } .agent-messages { padding:12px; max-height:60vh; } .agent-side-card { grid-template-columns:1fr; } .agent-side-card h3,.agent-privacy { grid-column:auto; } .agent-composer-actions .spacer { display:none; } }

:root{color-scheme:light}:root[data-theme="dark"]{color-scheme:dark}.sidebar{overflow-y:auto}.work-actions{display:flex;flex-wrap:wrap;gap:7px;margin-block:10px}.work-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(285px,100%),1fr));gap:12px}.work-grid .card{padding:18px}.work-grid p{overflow-wrap:anywhere}
.task-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.task-calendar section{min-height:70px;background:var(--card);border:1px solid var(--line);border-radius:6px;padding:5px}.task-calendar button{display:block;max-width:100%;overflow-wrap:anywhere}.task-calendar strong{text-align:center}

/* Workspace navigation and page layout */
:root {
  --bg: #f5f7fb;
  --text: #18263a;
  --muted: #53647a;
  --line: #dfe6f0;
  --primary: #2058c5;
  --primary-soft: #eaf1ff;
  --radius: 16px;
  --shadow: 0 2px 9px #25446a07;
}
:root[data-theme="dark"] {
  --bg: #111824;
  --card: #1a2434;
  --text: #edf3fb;
  --muted: #a6b6ca;
  --line: #2f3d51;
  --primary: #a4c5ff;
  --primary-soft: #233c63;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
[hidden] { display: none !important; }
.btn.primary { color: #fff; background: #2058c5; border-color: #2058c5; }
.btn.primary:hover { background: #1749aa; filter: none; }
.btn svg, .icon-action svg, .nav-item svg, .workspace-date svg, .step-link svg { width: 19px; height: 19px; flex: none; }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 90; padding: 9px 14px; transform: translateY(-150%); background: var(--card); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.workspace { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.workspace-sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 0 14px; background: var(--card); border-inline-end: 1px solid var(--line); }
.workspace-brand { display: flex; align-items: center; gap: 11px; padding: 19px 6px; color: var(--text); }
.workspace-brand strong { display: block; font-size: 19px; font-weight: 900; line-height: 1.25; }
.workspace-brand small { display: block; margin-block-start: 3px; color: var(--muted); overflow-wrap: anywhere; }
.workspace-logo { display: grid; place-items: center; width: 41px; height: 41px; flex: 0 0 41px; border-radius: 12px; background: #eaf1ff; }
.workspace-logo img { width: 25px; }
.workspace-sidebar > nav { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.nav-group { margin: 10px 0 14px; }
.nav-group h2 { padding: 0 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.workspace-sidebar .nav-item { min-height: 39px; padding: 7px 10px; font-size: 13px; }
.workspace-sidebar .nav-item svg { color: var(--muted); }
.workspace-sidebar .nav-item.active svg { color: var(--primary); }
.workspace-account { display: flex; align-items: center; gap: 8px; min-height: 66px; padding: 8px 2px; border-block-start: 1px solid var(--line); }
.workspace-account > div { flex: 1; min-width: 0; }
.workspace-account b, .workspace-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account small { color: var(--muted); }
.user-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.workspace-content { min-width: 0; }
.workspace-top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 12px; padding: 8px clamp(14px, 2.6vw, 38px); background: var(--card); border-block-end: 1px solid var(--line); }
.workspace-top-start, .workspace-top-actions, .workspace-date { display: flex; align-items: center; gap: 10px; }
.workspace-location { font-weight: 750; }
.workspace-date { color: var(--muted); font-size: 12px; }
.icon-action { display: inline-grid; place-items: center; width: 37px; height: 37px; flex: none; background: var(--card); color: var(--muted); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.icon-action:hover { color: var(--primary); background: var(--primary-soft); }
.workspace .main { margin-inline: auto; padding: 27px clamp(14px, 2.6vw, 38px) 56px; }
.workspace .main:focus { outline: none; }
.workspace-menu, .workspace-shade, .mobile-wordmark { display: none; }
.workspace-page-head h1 { font-size: clamp(25px, 3vw, 33px); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.workspace-page-head .sub { margin-block-start: 5px; }
.breadcrumb { display: block; margin-block-end: 3px; font-size: 12px; }
.breadcrumb span { margin-inline-start: 4px; }
.section-tabs { display: flex; overflow-x: auto; gap: 24px; margin-block: 20px; border-block-end: 1px solid var(--line); }
.section-tabs a { display: block; flex: none; color: var(--muted); font-weight: 650; padding: 9px 0; border-block-end: 2px solid transparent; }
.section-tabs a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.project-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.project-more { position: relative; }
.project-more summary { list-style: none; }
.project-more summary::-webkit-details-marker { display: none; }
.project-more > div { position: absolute; z-index: 8; inset-inline-end: 0; inset-block-start: calc(100% + 4px); display: grid; gap: 5px; min-width: 130px; padding: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.project-more > div .btn { justify-content: start; border: 0; }

/* Overview, project collection and task boards */
.dashboard-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: clamp(20px, 3vw, 36px); border-radius: 19px; background: linear-gradient(118deg, #16459d, #16336c 72%); color: #fff; }
.dashboard-hero::before, .dashboard-hero::after { position: absolute; z-index: -1; content: ''; width: 340px; height: 340px; border: 1px solid #a9ceff40; border-radius: 50%; inset-inline-end: -52px; top: -160px; }
.dashboard-hero::after { width: 400px; height: 400px; inset-inline-end: -71px; top: -174px; }
.dashboard-hero h1 { font-size: clamp(25px, 3.6vw, 39px); font-weight: 840; letter-spacing: -0.04em; margin-block: 4px 8px; }
.dashboard-hero p { margin: 0; color: #d0e1ff; font-size: 12px; }
.dashboard-hero h1 + div { color: #e2edff; }
.dashboard-hero .btn { background: #fff; color: #174597; border-color: #fff; }
.dashboard-hero .btn:hover { background: #e8f1ff; }
.getting-started { margin-block: 24px 30px; }
.start-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.start-step { display: grid; align-content: start; gap: 10px; }
.start-step h3 { font-weight: 780; }
.start-step p, .start-empty p { margin: 3px 0 0; color: var(--muted); }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.feature-icon svg { width: 21px; height: 21px; }
.feature-icon.complete { color: var(--green); background: var(--green-soft); }
.step-link { display: inline-flex; align-items: center; justify-self: start; gap: 6px; border: none; border-radius: 4px; padding: 0; background: transparent; color: var(--primary); font-weight: 750; cursor: pointer; }
.step-link:hover { text-decoration: underline; }
.step-link svg { width: 15px; height: 15px; }
.dashboard-hero + .dashboard-summary { margin-block-start: 24px; }
.team-summary { margin-block: 26px 0; }
.project-filters { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(120px, 150px) minmax(120px, 150px) auto; gap: 9px; align-items: center; }
.project-search { position: relative; min-width: 0; }
.project-search > svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.project-search > input { padding-inline-start: 37px; }
.view-picker { justify-self: end; }
.filter-count { margin-block: 10px 12px; color: var(--muted); font-size: 12px; }
.start-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 54px 15px; }
.start-empty .feature-icon { width: 52px; height: 52px; }
.start-empty .btn { margin-block-start: 8px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(245px, 100%), 1fr)); gap: 14px; }
.project-tile { display: flex; flex-direction: column; gap: 5px; padding: 15px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.project-tile:hover { border-color: var(--primary); }
.project-tile h2 { margin-top: 8px; }
.project-tile-top, .project-tile-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-tile-bottom { margin-block-start: auto; padding-block-start: 10px; border-block-start: 1px solid var(--line); font-size: 12px; }
.project-tile-bottom span { color: var(--muted); }
.project-tile progress { display: block; width: 100%; height: 7px; margin-block: 7px 2px; accent-color: var(--primary); }
.task-paper { display: grid; gap: 4px; width: 100%; min-width: 0; margin-block: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--text); text-align: start; cursor: pointer; overflow-wrap: anywhere; }
.task-paper:hover { border-color: var(--primary); } .task-paper small { color: var(--muted); }
.task-paper .badge { justify-self: start; }
.week { display: flex; gap: 5px; margin-block: 14px; }
.week button { flex: 1; min-width: 0; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.week button.selected { color: var(--primary); background: var(--primary-soft); font-weight: 750; }
.week b { display: block; }
.dayline { display: grid; grid-template-columns: 64px minmax(0, 1fr) max-content; align-items: center; gap: 10px; border-inline-start: 2px solid var(--primary); padding-inline: 10px 0; margin-block: 6px; }
.dayline small { color: var(--muted); }
.mood-face { display: grid; place-items: center; } .mood-face svg { width: 140px; } .mood-name { display: block; text-align: center; }

/* Forms and sign-in */
.dialog-open { overflow: hidden; }
.form-error { grid-column: 1 / -1; margin: 8px 0 0; padding: 9px 11px; color: var(--red); background: var(--red-soft); border-radius: 9px; overflow-wrap: anywhere; }
.form-details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.form-details summary { cursor: pointer; font-weight: 700; }
.form-details[open] summary { margin-bottom: 12px; }
.file-picker { position: relative; cursor: pointer; }
.file-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-picker:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
.boot-message { max-width: min(440px, 92vw); text-align: center; }
.auth-layout { display: grid; min-height: 100dvh; grid-template-columns: minmax(360px, 45%) minmax(0, 1fr); }
.auth-brand-panel { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; padding: clamp(30px, 7vw, 102px); background: linear-gradient(145deg, #183975, #173064 72%); color: #fff; }
.auth-orbit { position: absolute; z-index: -1; width: 590px; height: 590px; border: 1px solid #b2d1ff35; border-radius: 50%; top: -130px; inset-inline-end: -310px; box-shadow: 0 0 0 28px #d9e9ff0e, 0 0 0 59px #d9e9ff0c, 0 0 0 90px #d9e9ff08; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-block-end: 38px; font-weight: 900; font-size: 21px; }
.auth-brand-content p { color: #c9deff; font-weight: 650; margin-block: 0 8px; }
.auth-brand-content h2 { font-size: clamp(25px, 4vw, 51px); letter-spacing: -0.045em; line-height: 1.3; }
.auth-features { display: flex; align-items: center; flex-wrap: wrap; gap: 11px 16px; margin-block-start: 26px; color: #dbe9ff; }
.auth-features span { display: flex; align-items: center; gap: 5px; } .auth-features svg { width: 17px; height: 17px; }
.auth-form-panel { display: grid; place-items: center; padding: 24px; background: var(--card); }
.auth-form-content { width: min(100%, 370px); }
.auth-form-content h1 { font-size: clamp(27px, 4vw, 35px); letter-spacing: -0.04em; }
.auth-form-content > p { margin: 6px 0 20px; }
.auth-role { display: flex; margin-bottom: 17px; } .auth-role > button { flex: 1; }
.auth-form { display: grid; gap: 13px; }
.auth-form label { display: grid; gap: 5px; font-weight: 650; }
.auth-form input { min-height: 44px; }
.auth-form .btn.primary { min-height: 44px; }
.auth-mobile-brand { display: none; }

@media (max-width: 1080px) { .project-filters { grid-template-columns: 1fr 1fr; } .view-picker { justify-self: stretch; } }
@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace-sidebar { position: fixed; z-index: 41; inset: 0 0 0 auto; width: min(84vw, 300px); transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .workspace-sidebar.open { transform: none; visibility: visible; }
  .workspace-shade { display: block; position: fixed; z-index: 40; inset: 0; padding: 0; border: 0; background: #1726426b; }
  .workspace-menu { display: inline-grid; }
  .mobile-wordmark { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 15px; font-weight: 900; }
  .mobile-wordmark img { width: 21px; }
  .workspace-location { display: none; }
  .workspace-top { min-height: 56px; }
  .workspace .main { padding-block-start: 18px; }
  .project-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .start-steps { grid-template-columns: 1fr; }
  .start-step { grid-template-columns: auto 1fr; align-items: start; }
  .start-step .step-link { grid-column: 2; }
  .dashboard-hero { align-items: start; flex-direction: column; }
  .section-tabs { gap: 15px; }
  .workspace-date { display: none; }
  .workspace .kpi .value { white-space: normal; overflow-wrap: anywhere; }
  .project-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .project-search, .view-picker { grid-column: 1 / -1; }
  .project-filters .view-picker button { flex: 1; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-mobile-brand { display: flex; margin-block-end: 24px; }
  .auth-form-panel { padding: 28px 20px; }
  .task-calendar section { min-width: 0; }
  .task-calendar button { font-size: 10px; white-space: normal; padding: 2px; }
  .dayline { grid-template-columns: 55px minmax(0, 1fr); }
  .dayline > small { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media print { .workspace { display: block; } .workspace .main { padding: 0; } .skip-link, .workspace-shade { display: none !important; } }
.task-cover { width: 100%; max-height: 180px; object-fit: contain; display: block; border-radius: 10px; margin-block: 10px; }

/* Project boards and access management */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.project-heading { align-items: end; margin-bottom: 12px; }
.project-heading-info { margin-top: 7px; font-size: 13px; }
.project-heading-info > span { display: inline-flex; align-items: center; gap: 5px; }
.project-heading-info svg { width: 15px; height: 15px; }
.project-tabs { margin-block: 16px; }
.project-financial-summary { margin-bottom: 16px; }
.project-board { min-width: 0; }
.board-controls {
  display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(108px, 146px) minmax(108px, 146px) auto;
  align-items: center; gap: 8px;
}
.board-controls:has(> .board-control-actions:nth-child(4)) { grid-template-columns: auto minmax(140px, 1fr) minmax(108px, 146px) auto; }
.board-controls select { min-width: 0; }
.board-control-actions, .people-toolbar { display: flex; align-items: center; gap: 8px; }
.board-count { margin: 12px 0; font-size: 12px; }
.project-lanes {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(245px, min(28vw, 305px)); align-items: stretch;
  gap: 12px; min-height: 370px; overflow: auto; padding: 3px 3px 15px; scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 40%, var(--line)) transparent;
  scroll-snap-type: inline proximity;
}
.project-lane {
  min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 8px 9px 11px;
  background: color-mix(in srgb, var(--card) 37%, var(--bg)); scroll-snap-align: start;
}
.project-lane.drop-active {
  border-color: var(--primary); background: var(--primary-soft);
}
.project-lane > header {
  display: flex; gap: 7px; align-items: start; min-height: 40px;
  padding: 5px 3px 7px; border-bottom: 1px solid var(--line);
}
.project-lane > header h3 { flex: 1; font-size: 14px; overflow-wrap: anywhere; line-height: 1.45; margin-block: 2px 0; }
.lane-dot { width: 8px; height: 8px; margin-block-start: 8px; flex: 0 0 auto; border-radius: 50%; background: #8c9ab1; }
.project-lane[data-kind="doing"] .lane-dot { background: #4e8ce8; }
.project-lane[data-kind="review"] .lane-dot { background: #cb8a32; }
.project-lane[data-kind="done"] .lane-dot { background: #289a75; }
.lane-count { min-width: 22px; padding: 1px 4px; text-align: center; border-radius: 7px; background: var(--card); color: var(--muted); font-size: 12px; }
.lane-add { width: 27px; height: 27px; border-color: transparent; background: transparent; }
.lane-add svg { width: 17px; height: 17px; }
.lane-cards { display: grid; gap: 8px; padding-top: 9px; }
.lane-empty {
  text-align: center; color: var(--muted); font-size: 12px; padding: 16px 8px;
  border: 1px dashed var(--line); border-radius: 10px;
}
.board-card {
  display: grid; gap: 7px; min-width: 0; max-width: 100%; margin: 0; padding: 12px;
  border-radius: 11px; box-shadow: var(--shadow); overflow-wrap: anywhere;
}
.board-card.dragging { opacity: .48; }
.board-card strong { font-size: 14px; font-weight: 750; }
.board-card > img { width: 100%; height: 88px; object-fit: cover; border-radius: 8px; }
.board-card-project { color: var(--muted); font-size: 11px; }
.board-card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.board-card-labels span { padding: 1px 6px; background: var(--primary-soft); color: var(--primary); border-radius: 5px; font-size: 11px; }
.board-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: 12px; color: var(--muted); }
.board-card-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.board-card-meta svg { width: 14px; height: 14px; }
.board-card-meta:empty { display: none; }
.board-card-priority { color: var(--amber); }
.board-card-person { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.card-avatar {
  display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 8px;
  flex: none; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 750;
}
.personal-controls { grid-template-columns: auto minmax(140px, 1fr) minmax(110px, 165px); }
.team-task-controls { display: flex; flex-wrap: wrap; margin-bottom: 14px; }
.team-task-controls select { width: min(100%, 230px); }
.my-work-sections > section { margin-top: 20px; }
.task-list-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 226px), 1fr)); align-items: start; gap: 11px;
}
.task-list-grid > section { background: color-mix(in srgb, var(--card) 61%, var(--bg)); border: 1px solid var(--line); border-radius: 13px; padding: 7px; }
.task-list-stage { padding: 2px 3px 7px; }
.task-dialog { display: grid; gap: 14px; min-width: 0; }
.task-dialog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; font-size: 13px; color: var(--muted); }
.task-description, .task-comment p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.task-form-row { align-items: end; }
.task-clock { display: flex; justify-content: end; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-dialog-section { border-top: 1px solid var(--line); padding-top: 11px; }
.task-dialog-section summary { cursor: pointer; font-weight: 700; }
.task-dialog-section h3 { margin-bottom: 7px; }
.task-dialog-section .check { margin-block: 4px; overflow-wrap: anywhere; white-space: normal; }
.task-file-row, .task-history { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-block-end: 1px solid var(--line); }
.task-history small { color: var(--muted); }
.task-file-row a, .task-history span { min-width: 0; overflow-wrap: anywhere; }
.task-comment { background: var(--bg); border-radius: 10px; padding: 8px 11px; margin: 6px 0; }
.task-comment small { color: var(--muted); }
.board-column-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 52px; gap: 5px; align-items: center; margin-bottom: 8px; }
.people-toolbar { margin-bottom: 13px; }
.people-toolbar select { max-width: 240px; }
.people-table small { display: block; color: var(--muted); }
.people-table th, .people-table td { padding-block: 10px; }
.people-actions { white-space: nowrap; }
.people-actions .btn + .btn { margin-inline-start: 5px; }
.permission-section { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.permission-section h3 { margin-bottom: 9px; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.permission-choice { display: flex; align-items: start; gap: 6px; padding: 7px; background: var(--bg); border-radius: 8px; overflow-wrap: anywhere; }
.permission-choice small { display: block; color: var(--muted); }
.permission-title { margin-top: 13px; }
.day-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.day-heading select { max-width: 235px; }

@media (max-width: 1160px) {
  .board-controls:not(.personal-controls):not(.team-task-controls) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board-controls:not(.personal-controls):not(.team-task-controls) > .board-mode { grid-column: 1; justify-self: start; }
  .board-controls:not(.personal-controls):not(.team-task-controls) > .project-search { grid-column: span 2; }
  .board-control-actions { justify-content: end; grid-column: span 1; }
}
@media (max-width: 730px) {
  .board-controls:not(.team-task-controls) { display: flex; flex-wrap: wrap; }
  .board-controls > .project-search { flex: 1 0 100%; order: 2; }
  .board-controls > select { width: auto; flex: 1 1 110px; order: 3; }
  .board-control-actions { margin-inline-start: auto; flex-wrap: wrap; }
  .board-control-actions .btn { padding-inline: 8px; }
  .project-lanes { grid-auto-columns: minmax(220px, min(78vw, 305px)); min-height: 310px; }
  .project-tabs { gap: 14px; }
  .task-history, .task-clock { justify-content: start; flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .permission-grid { grid-template-columns: 1fr; }
  .permission-section { padding: 8px; }
}
.board-status-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block: 6px; }
.board-status-bar select { flex: 0 1 170px; padding-block: 3px; font-size: 12px; }
.project-lanes:focus-visible { outline-offset: 0; }
@media (max-width: 520px) { .board-status-bar select { flex-basis: 130px; } }
.auth-form-content.form,.auth-form-content .form,.auth-form-content.auth-form,.space-list {display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.auth-form-content label {display:grid;gap:6px}
.auth-form-content [hidden] {display:none}
.auth-form-content h1 {line-height:1.5;margin:0 0 8px}
.auth-brand-content>img {background:white;padding:14px;border-radius:18px}
.login-mark {width:38px;height:46px;object-fit:contain;margin-bottom:6px}
.workspace-account {flex-wrap:wrap}
.workspace-account>[data-action=space-picker] {width:100%}
.quick-card {display:flex;flex-wrap:wrap;gap:6px;padding:10px}
.quick-card input,.quick-card small {width:100%}
