@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;800&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  margin: 0; font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: #F3F4FB;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url('bg-watermark.png') center center / min(70vw, 1100px) no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
.app {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: transparent;
  color: #262A3D;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 172px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas: "top top" "rail main";
}
.loading { display:flex; align-items:center; justify-content:center; }
.loader { color:#6B7280; font-size:15px; padding: 40px; }

.topbar {
  grid-area: top;
  background: #1E2350;
  color: #EAF3EE;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.brand { display:flex; align-items:center; gap:10px; }
.brand-mark {
  background:#3D4FA6; color:#fff; font-weight:800; font-size:14px;
  padding:4px 10px; border-radius:8px; letter-spacing:1px;
}
.brand-name { font-weight:600; font-size:15px; }
.brand-logo {
  height:38px; width:auto; display:block;
  background:#fff; border-radius:8px; padding:4px 8px;
}
.brand-logo-lg { height:56px; background:none; padding:0; border-radius:0; }
.topbar-right { display:flex; align-items:center; gap:14px; }
.user-name { font-size:12px; color:#D2D8F5; font-weight:600; }
.running-timer {
  display:flex; align-items:center; gap:8px; font-size:12px; color:#E8A94B; font-weight:700;
  background:#2B3170; padding:5px 12px; border-radius:10px;
}
.running-timer:empty { display:none; padding:0; }
.running-timer b { color:#fff; font-weight:600; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.timer-stop-btn {
  background:#C2402A; color:#fff; border:none; cursor:pointer; font-family:inherit;
  font-size:11px; font-weight:700; padding:3px 10px; border-radius:8px;
}
.timer-stop-btn:hover { background:#A5341F; }
.topbar-link {
  color:#D2D8F5; text-decoration:none; font-size:16px; opacity:.85;
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:8px;
}
.topbar-link:hover { background:#2B3170; opacity:1; }
.topbar-link svg { width:17px; height:17px; }
.user-menu {
  display:flex; align-items:center; gap:8px; padding:4px 6px 4px 4px;
  border-radius:12px; background:#2B3170; margin-inline-start:2px;
}
.user-avatar {
  width:26px; height:26px; border-radius:50%; background:#3D4FA6; color:#fff;
  font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.user-menu .user-logout { width:24px; height:24px; font-size:13px; }

.rail {
  grid-area: rail;
  background:#fff;
  border-left:1px solid #E1E4F0;
  padding:16px 10px;
  display:flex; flex-direction:column; gap:4px;
}
.tab {
  display:flex; align-items:center; gap:10px;
  background:none; border:none; cursor:pointer;
  font-family:inherit; font-size:14px; color:#4B5566;
  padding:10px 12px; border-radius:10px; text-align:right;
  transition: background .15s;
  position:relative;
  width:100%;
}
.tab:hover { background:#F5F7FC; }
.tab.active { background:#EAF1FB; color:#1E2350; font-weight:700; }
.tab-icon {
  font-size:14px; width:26px; height:26px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  border-radius:8px; color:#8891A0; background:transparent;
  transition:background .15s, color .15s;
}
.tab-icon svg { width:15px; height:15px; }
.tab.active .tab-icon { background:#3D4FA6; color:#fff; }
.badge {
  background:#C97B1B; color:#fff; font-size:11px; font-weight:700;
  border-radius:10px; padding:1px 7px; margin-right:auto;
}
.tab.active .badge { background:#E8A94B; color:#1E2350; }

.subnav { display:flex; gap:6px; flex-wrap:wrap; margin:14px 0 18px; border-bottom:1px solid #E1E4F0; padding-bottom:10px; }
.subnav-tab {
  background:none; border:1px solid transparent; cursor:pointer;
  font-family:inherit; font-size:13px; color:#4B5566; font-weight:600;
  padding:7px 14px; border-radius:9px; transition:background .15s, color .15s;
}
.subnav-tab:hover { background:#F0F2FA; }
.subnav-tab.active { background:#3D4FA6; color:#fff; }

.main { grid-area: main; padding: 28px 32px 60px; max-width: none; width: 100%; min-width: 0; }

.page-title { font-size:24px; font-weight:800; }
.page-sub { color:#6B7280; font-size:13px; margin-top:4px; margin-bottom:20px; }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }

.card {
  background:#fff; border:1px solid #E1E4F0; border-radius:14px;
  padding:16px 18px; margin-bottom:12px;
}
.card-title { font-size:14px; font-weight:700; margin-bottom:10px; color:#1E2350; }

.btn {
  background:#3D4FA6; color:#fff; border:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:600;
  padding:9px 18px; border-radius:10px;
  transition: background .15s;
}
.btn:hover { background:#2E3C82; }
.btn.ghost { background:#E7EAFC; color:#2E3C82; }
.btn.ghost:hover { background:#D2E6DC; }
.btn.xs { padding:6px 12px; font-size:12px; }
.btn.danger-ghost { background:none; color:#B3261E; border:1px solid #EBC5C1; margin-top:12px; }
.btn.danger-ghost:hover { background:#FBF0EF; }
.btn:disabled { opacity:.5; cursor:default; }
.link-btn { background:none; border:none; color:#9CA3B4; cursor:pointer; font-family:inherit; font-size:12px; }
.link-btn:hover { color:#B3261E; }

.input {
  font-family:inherit; font-size:14px;
  border:1px solid #D5DCD4; border-radius:10px;
  padding:9px 12px; background:#FBFCFA; color:#262A3D;
  outline:none;
}
.input:focus { border-color:#3D4FA6; box-shadow:0 0 0 3px #3D4FA622; }
.input.sm { padding:7px 10px; font-size:13px; }
.input.xs { padding:5px 9px; font-size:12px; }
.input.num { width:70px; text-align:center; }
.input.grow { flex:1; }
.input.wide { grid-column: 1 / -1; }

.row { display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap; }
.form-card { border-color:#3D4FA655; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:12px; }
.file-upload-row { display:flex; align-items:center; gap:8px; padding:8px 12px; border:1px dashed #3D4FA688; border-radius:10px; background:#F7F8FD; cursor:pointer; font-size:12px; color:#3D4FA6; }
.file-upload-row:hover { background:#EEF0FB; }
.file-grid-item { display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.notif-bell-wrap { position:relative; }
.notif-bell-btn { position:relative; font-size:17px; }
.notif-badge {
  position:absolute; top:-4px; left:-6px; min-width:16px; height:16px; padding:0 3px;
  background:#C2402A; color:#fff; border-radius:9px; font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center; line-height:1;
}
.notif-dropdown {
  position:absolute; top:38px; left:0; width:320px; max-height:420px; overflow-y:auto;
  background:#fff; border:1px solid #E1E4F0; border-radius:12px; box-shadow:0 12px 36px rgba(30,35,80,.22);
  z-index:1200; text-align:right;
}
.notif-dropdown-head {
  display:flex; align-items:center; justify-content:space-between; padding:10px 14px;
  border-bottom:1px solid #EEF0F8; font-size:13px; font-weight:700; position:sticky; top:0; background:#fff;
}
.notif-dropdown-list { display:flex; flex-direction:column; }
.notif-item { padding:10px 14px; border-bottom:1px dashed #EEF0F8; cursor:pointer; font-size:12px; }
.notif-item:last-child { border-bottom:none; }
.notif-item:hover { background:#F7F8FD; }
.notif-item.unread { background:#EEF0FB; }
.notif-item.unread::before { content:"● "; color:#3D4FA6; }
.notif-item-title { font-weight:700; color:#262A3D; }
.notif-item-body { color:#4B5566; margin-top:2px; }
.notif-item-time { color:#9CA3B4; margin-top:4px; font-size:11px; }
.notif-toast {
  position:fixed; top:70px; left:16px; z-index:2000; max-width:300px;
  background:#1E2350; color:#fff; border-radius:12px; padding:12px 16px;
  box-shadow:0 12px 30px rgba(30,35,80,.4); cursor:pointer; animation:notif-toast-in .25s ease-out;
}
.notif-toast-title { font-weight:700; font-size:13px; }
.notif-toast-body { font-size:12px; color:#D2D8F5; margin-top:4px; }
@keyframes notif-toast-in { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@media (max-width: 720px) {
  .notif-dropdown { width:88vw; left:-8px; }
  .notif-toast { left:8px; right:8px; max-width:none; top:64px; }
}
.rank-groups-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; align-items:start; }
.rank-group-card { margin-bottom:0; min-width:0; }
@media (max-width: 720px) { .rank-groups-grid { grid-template-columns:1fr; } }

.rank-fade-wrap { position:relative; }
.rank-fade-wrap.has-fade .table-card { max-height:300px; overflow-y:hidden; overflow-x:auto; }
.rank-fade-overlay {
  position:absolute; left:0; right:0; bottom:0; height:86px;
  background:linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 70%);
  display:flex; align-items:flex-end; justify-content:center; padding-bottom:12px;
  cursor:pointer;
}
.rank-fade-label {
  font-size:11.5px; font-weight:700; color:#3D4FA6; background:#fff;
  padding:6px 16px; border-radius:20px; border:1px solid #E7E9F5;
  box-shadow:0 4px 14px rgba(30,35,80,.1); transition:box-shadow .2s ease, transform .2s ease;
}
.rank-fade-overlay:hover .rank-fade-label { box-shadow:0 8px 20px rgba(61,79,166,.24); transform:translateY(-2px); }
.activity-log-list { display:flex; flex-direction:column; max-height:60vh; overflow-y:auto; }
.activity-log-row {
  display:grid; grid-template-columns:110px 100px 110px 1fr 1.4fr; gap:8px; align-items:center;
  padding:8px 4px; border-bottom:1px dashed #E9ECF7; font-size:12px;
}
.activity-log-row:last-child { border-bottom:none; }
.activity-log-time { color:#9CA3B4; white-space:nowrap; }
.activity-log-user { font-weight:700; color:#3D4FA6; }
.activity-log-action { color:#4B5566; }
.activity-log-task { color:#262A3D; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-log-detail { color:#6B7280; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 720px) {
  .activity-log-row { grid-template-columns:1fr 1fr; grid-template-areas:"time user" "action task" "detail detail"; font-size:11px; }
  .activity-log-time { grid-area:time; }
  .activity-log-user { grid-area:user; }
  .activity-log-action { grid-area:action; }
  .activity-log-task { grid-area:task; white-space:normal; }
  .activity-log-detail { grid-area:detail; white-space:normal; }
}
.file-grid-item .mini-main { word-break:break-word; }
.form-card-narrow { max-width:320px; }
.form-grid-narrow { display:flex; flex-direction:column; gap:8px; margin-bottom:0; }
.form-grid-narrow .input { width:100%; }
.form-grid-narrow .btn { width:100%; }
.ls-settings-grid { grid-template-columns:2fr 1fr 1fr; }
@media (max-width: 560px) { .ls-settings-grid { grid-template-columns:1fr; } }
.ls-save-status { display:inline-block; margin-top:8px; font-size:12px; color:#2E9E5B; font-weight:600; min-height:16px; }
.filter-row { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }

.stat-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin-bottom:20px; }
.stat {
  background:#fff; border:1px solid #E1E4F0; border-radius:14px;
  padding:16px; text-align:right; cursor:pointer; font-family:inherit;
  transition: transform .12s, box-shadow .12s;
}
.stat:hover { transform:translateY(-2px); box-shadow:0 4px 14px #1E235014; }
.stat-num { font-size:28px; font-weight:800; color:#1E2350; }
.stat-label { font-size:12px; color:#6B7280; margin-top:2px; }
.stat.hot { border-color:#C97B1B; background:#FDF7EE; }
.stat.hot .stat-num { color:#C97B1B; }
.stat.danger { border-color:#C2402A; background:#FCF1EF; }
.stat.danger .stat-num { color:#C2402A; }

.priority-grid, .rank-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; align-items:start; margin-bottom:14px; }
.priority-card { margin-bottom:0; }
.priority-card.danger { border-color:#EBC5C1; background:#FFFBFA; }
.priority-card.today-card { border-color:#F3DFB9; background:#FFFDF8; }
.priority-card.tomorrow-card { border-color:#CBD9EC; background:#FAFCFF; }
.priority-header { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.priority-count { font-size:13px; font-weight:800; padding:3px 12px; border-radius:10px; white-space:nowrap; }
.priority-count.overdue { color:#B3261E; background:#FCF1EF; font-size:16px; }
.priority-count.today { color:#C97B1B; background:#FDF7EE; }
.priority-count.tomorrow { color:#2B5FA8; background:#EAF1FB; }
.priority-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 2px; border-bottom:1px dashed #E9ECF7; font-size:13px; }
.priority-row:last-child { border-bottom:none; }
.priority-days { background:#F6DAD5; color:#8A2418; font-weight:800; font-size:11px; border-radius:6px; padding:2px 8px; white-space:nowrap; }
.priority-title { font-weight:600; flex:1; min-width:140px; }
.priority-meta { font-size:12px; color:#6B7280; white-space:nowrap; }
.priority-group { margin-top:4px; }
.priority-group:first-child { margin-top:0; }
.priority-group-head { font-size:12px; font-weight:700; color:#1E2350; padding:8px 2px 4px; border-top:1px solid #EEF0F8; }
.priority-group:first-child .priority-group-head { border-top:none; padding-top:0; }

.dash-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; }
.mini-row { display:flex; flex-direction:column; padding:8px 0; border-bottom:1px dashed #E9ECF7; }
.mini-row:last-child { border-bottom:none; }
.mini-main { font-size:13px; font-weight:600; }
.mini-meta { font-size:12px; color:#6B7280; margin-top:2px; }
.mini-row.due .mini-main { color:#B3261E; }
.down-text { color:#C2402A; }
.empty { color:#9CA3B4; font-size:13px; padding:6px 0; }
.empty.big { text-align:center; padding:36px 16px; }

.project-head { display:flex; justify-content:space-between; align-items:center; gap:12px; cursor:pointer; }
.project-head-main { flex:1; min-width:0; }
.project-icon {
  flex:0 0 38px; width:38px; height:38px; border-radius:11px; background:#EEF0FB;
  display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; color:#3D4FA6;
}
.project-name { font-size:16px; font-weight:700; }
.project-icon-picker { display:flex; flex-wrap:wrap; gap:8px; }
.pi-option {
  width:38px; height:38px; border-radius:10px; border:1px solid #E1E4F0; background:#fff;
  font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:border-color .15s, background .15s, transform .12s;
}
.pi-option:hover { background:#F5F7FC; transform:translateY(-1px); }
.pi-option.active { border-color:#3D4FA6; background:#EEF0FB; box-shadow:0 0 0 2px #3D4FA633; }
.project-meta { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:#6B7280; margin-top:4px; }
.site { color:#2B5FA8; }
.expander { color:#9CA3B4; font-size:18px; }
.project-card.clickable { display:block; width:100%; text-align:right; font-family:inherit; cursor:pointer; transition:border-color .15s, transform .12s; }
.project-card.clickable:hover { border-color:#3D4FA6; transform:translateY(-1px); }
.goal { background:#EFF1FC; border-radius:10px; padding:9px 12px; font-size:13px; margin-bottom:14px; }
.kw-list { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.kw-chip {
  display:inline-flex; align-items:center; gap:6px;
  background:#E9ECFA; border-radius:8px; padding:4px 10px; font-size:13px;
}
.kw-rank { color:#3D4FA6; font-size:11px; }
.kw-x { background:none; border:none; cursor:pointer; color:#9CA3B4; font-size:14px; padding:0; }
.kw-x:hover { color:#B3261E; }

/* --- میز کار پروژه --- */
.back-btn {
  background:none; border:none; font-family:inherit; cursor:pointer;
  font-size:13px; font-weight:700; color:#3D4FA6; padding:0; margin-bottom:12px;
}
.back-btn:hover { text-decoration:underline; }
.section-card { margin-bottom:14px; }
.count-hint { font-size:11px; font-weight:500; color:#9CA3B4; margin-right:6px; }
.status-group { margin-top:14px; }
.status-group-head {
  font-size:11.5px; font-weight:800; padding:3px 10px; border-radius:7px;
  display:inline-block; margin-bottom:6px;
}
.sg-backlog { background:#F2EEE6; color:#8A7A5C; }
.sg-todo { background:#EDF0EC; color:#6B7280; }
.sg-in_progress { background:#E7EEF8; color:#2B5FA8; }
.sg-review { background:#FAF0DF; color:#C97B1B; }
.sg-done { background:#E7F3EC; color:#3D4FA6; }
.detail-task-row {
  display:flex; flex-direction:column; gap:6px;
  padding:9px 2px; border-bottom:1px dashed #E9ECF7;
}
.detail-task-row:last-child { border-bottom:none; }
.dt-row-top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dt-title { font-size:13px; font-weight:600; flex:1; min-width:140px; }
.dt-meta { font-size:11.5px; color:#6B7280; white-space:nowrap; }
.task-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin-top:10px; }
.task-grid .task-grid-item {
  border:1px solid #E1E4F0; border-radius:10px; padding:10px; background:#FBFCFA;
  align-items:flex-start;
}
.task-grid .task-grid-item .dt-meta { white-space:normal; }
.task-create-card {
  display:flex; flex-direction:column; gap:6px;
  border-style:dashed; background:#F7F8FD;
}
.task-create-card .input { width:100%; }
.task-create-card textarea.input { resize:vertical; }
.task-create-card .voice-row { margin-top:2px; }
.task-create-card .tcl-box { margin-top:2px; }
@media (max-width: 1100px) { .task-grid { grid-template-columns:repeat(3, 1fr); } }
@media (max-width: 820px) { .task-grid { grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 560px) { .task-grid { grid-template-columns:1fr; } }
.tcl-box { display:flex; flex-direction:column; gap:4px; padding-inline-start:4px; }
.tcl-item-label { display:flex; align-items:center; gap:8px; font-size:12.5px; cursor:pointer; }
.tcl-item-label input[type="checkbox"] { width:15px; height:15px; accent-color:#3D4FA6; cursor:pointer; flex-shrink:0; }
.tcl-add-row { margin-top:2px; }
.voice-row { flex-direction:column; align-items:flex-start; gap:6px; }
.voice-recording-indicator { color:#B3261E; font-weight:700; font-size:13px; animation:voice-pulse 1.1s ease-in-out infinite; }
@keyframes voice-pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
.task-voice-player { height:32px; max-width:220px; }
.voice-start-btn { position:relative; }
.voice-error { color:#B3261E; font-size:12px; background:#FCF1EF; border:1px solid #F3C9C3; border-radius:8px; padding:6px 10px; max-width:420px; }
.paste-shot-box { margin-top:2px; }
.paste-shot-hint {
  font-size:11.5px; color:#9CA3B4; border:1px dashed #D8DCEE; border-radius:10px;
  padding:8px 12px; text-align:center; background:#F7F8FD;
}
.paste-shot-preview {
  display:flex; align-items:center; gap:8px; padding:6px; border:1px solid #E1E4F0; border-radius:10px; background:#F7F8FD;
}
.paste-shot-preview img { width:44px; height:44px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.paste-shot-name { font-size:12px; color:#4B5566; flex:1; }
.voice-record-bar {
  display:flex; align-items:center; gap:10px; padding:6px 10px 6px 16px; border-radius:999px;
  background:linear-gradient(135deg,#1b2f6b,#0d1b3d); box-shadow:0 4px 14px rgba(13,27,61,.35);
}
.voice-record-bar::before {
  content:""; width:9px; height:9px; border-radius:50%; background:#ff5b5b;
  animation:voice-pulse 1.1s ease-in-out infinite; flex-shrink:0;
}
.voice-timer { color:#fff; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; min-width:38px; }
.voice-paused-label { color:#ffd27a; font-size:11px; font-weight:700; }
.voice-btn {
  width:30px; height:30px; border-radius:50%; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0;
}
.voice-btn-stop { background:#fff; color:#1b2f6b; }
.voice-btn-stop:hover { background:#e8ecfb; }
.voice-btn-pause { background:rgba(255,255,255,.18); color:#fff; }
.voice-btn-pause:hover { background:rgba(255,255,255,.3); }
.voice-ready-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.voice-ready-hint { font-size:12px; color:#6B7280; }
.voice-requesting-bar::before { display:none; }
.voice-spinner {
  width:14px; height:14px; border-radius:50%; border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff; animation:voice-spin .7s linear infinite; flex-shrink:0;
}
@keyframes voice-spin { to { transform:rotate(360deg); } }
.voice-requesting-label { color:#fff; font-size:12.5px; }
.voice-live-label { color:#ffb3b3; font-size:11px; font-weight:700; }

/* --- نمای کامل داشبورد --- */
.overview-card { margin-bottom:14px; }
.ov-table { overflow-x:auto; }
.ov-row {
  display:grid; grid-template-columns: 1.4fr .8fr 44px 44px 48px 90px 1.6fr;
  gap:10px; align-items:center; padding:9px 2px;
  border-bottom:1px solid #EEF0F8; font-size:13px;
  min-width:620px;
}
.ov-row:last-child { border-bottom:none; }
.ov-row.head { font-size:11px; font-weight:700; color:#6B7280; }
.ov-name { font-weight:700; }
.ov-owner { color:#6B7280; font-size:12px; }
.ov-bad { color:#C2402A; font-weight:800; }
.ov-warn { color:#C97B1B; font-weight:800; }
.ov-dim { color:#C5C9DC; }

/* --- داشبورد بازطراحی‌شده (پرمیوم) --- */
.dash-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.dash-head .page-title { margin-bottom:4px; }
.dash-updated { font-size:12px; color:#9CA3B4; }

.kpi-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; margin-bottom:18px; }
.kpi-card {
  display:flex; align-items:center; gap:12px; text-align:right; cursor:pointer; font-family:inherit;
  background:#fff; border:1px solid #E8EBF2; border-radius:16px; padding:16px;
  box-shadow:0 2px 10px rgba(30,35,80,.04); transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.kpi-card:hover { transform:translateY(-3px); box-shadow:0 12px 26px rgba(30,35,80,.1); border-color:#DDE1F2; }
.kpi-icon {
  flex:0 0 44px; width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:19px;
}
.kpi-icon.kpi-blue { background:#EAF1FB; color:#2B5FA8; }
.kpi-icon.kpi-navy { background:#EEF0FB; color:#3D4FA6; }
.kpi-icon.kpi-orange { background:#FDF3E4; color:#C97B1B; }
.kpi-icon.kpi-red { background:#FCECEA; color:#C2402A; }
.kpi-icon.kpi-green { background:#E9F6EE; color:#2E9E5B; }
.kpi-info { min-width:0; }
.kpi-num { font-size:24px; font-weight:800; color:#1E2350; line-height:1.2; }
.kpi-label { font-size:12px; color:#6B7280; margin-top:2px; }

.dash-priority-head { display:flex; align-items:center; justify-content:space-between; margin:4px 0 10px; }
.dash-section-title { font-size:15px; font-weight:800; color:#1E2350; }

.pro-table-card { margin-bottom:16px; }
.pro-table-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.pro-search-wrap { position:relative; }
.pro-search { padding-right:32px; min-width:220px; }
.pro-search-icon { position:absolute; top:50%; right:11px; transform:translateY(-50%); font-size:12px; color:#9CA3B4; pointer-events:none; }

.pro-table { overflow-x:auto; }
.pro-row {
  display:grid; grid-template-columns: 1.6fr .9fr .6fr .6fr 1.1fr 36px;
  gap:12px; align-items:center; padding:12px 6px;
  border-bottom:1px solid #F0F2F9; font-size:13px; min-width:680px;
  border-radius:10px; transition:background .15s;
}
.pro-row:hover { background:#F7F8FD; }
.pro-row:last-child { border-bottom:none; }
.pro-row.head { font-size:11px; font-weight:700; color:#9CA3B4; padding-bottom:10px; }
.pro-row.head:hover { background:none; }
.pro-name-cell { display:flex; flex-direction:column; gap:2px; min-width:0; }
.pro-name { font-weight:700; color:#1E2350; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pro-industry { font-size:11px; color:#9CA3B4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pro-count-cell { text-align:center; color:#4B5566; font-weight:700; }
.pro-count-cell.ov-bad, .pro-count-cell.ov-warn { font-weight:800; }

.status-badge { display:inline-flex; align-items:center; font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; white-space:nowrap; }
.status-badge.st-overdue { background:#FCECEA; color:#C2402A; }
.status-badge.st-progress { background:#EAF1FB; color:#2B5FA8; }
.status-badge.st-done { background:#E9F6EE; color:#2E9E5B; }

.progress-cell { display:flex; align-items:center; gap:8px; }
.progress-bar-track { flex:1; height:7px; border-radius:99px; background:#EEF0F8; overflow:hidden; }
.progress-bar-fill { height:100%; border-radius:99px; background:#3D4FA6; transition:width .3s ease; }
.progress-bar-fill.pf-low { background:#C97B1B; }
.progress-bar-fill.pf-verylow { background:#C2402A; }
.progress-pct { font-size:11px; color:#6B7280; font-weight:700; min-width:30px; text-align:left; }

.row-arrow-btn {
  width:28px; height:28px; border-radius:9px; border:1px solid #EEF0F8; background:#fff;
  color:#9CA3B4; cursor:pointer; font-size:13px; display:flex; align-items:center; justify-content:center;
  transition:background .15s, color .15s, border-color .15s;
}
.row-arrow-btn:hover { background:#3D4FA6; color:#fff; border-color:#3D4FA6; }

.pro-pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:14px; }
.page-btn {
  min-width:30px; height:30px; padding:0 8px; border-radius:9px; border:1px solid #EEF0F8; background:#fff;
  color:#4B5566; font-family:inherit; font-size:12px; cursor:pointer; transition:background .15s, color .15s;
}
.page-btn:hover:not(:disabled) { background:#F0F2FA; }
.page-btn:disabled { opacity:.4; cursor:default; }
.page-btn.active { background:#3D4FA6; color:#fff; border-color:#3D4FA6; font-weight:700; }

.dash-bottom-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
.dash-bottom-card { display:flex; flex-direction:column; }
.dash-bottom-card .card-title { margin-bottom:0; }
.db-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.db-view-all {
  background:none; border:none; cursor:pointer; font-family:inherit; font-size:11.5px; font-weight:700;
  color:#3D4FA6; padding:0; white-space:nowrap; transition:color .15s;
}
.db-view-all:hover { color:#1E2350; text-decoration:underline; }
.db-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:26px 10px; color:#B7BCD1; text-align:center; }
.db-empty-icon { font-size:26px; }
.db-empty-text { font-size:12.5px; }
.db-row { display:flex; align-items:center; gap:10px; padding:9px 2px; border-bottom:1px dashed #EEF0F8; cursor:pointer; transition:background .15s; border-radius:8px; }
.db-row:hover { background:#F7F8FD; }
.db-row:last-child { border-bottom:none; }
.db-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.db-dot.dot-red { background:#C2402A; }
.db-dot.dot-orange { background:#C97B1B; }
.db-dot.dot-blue { background:#2B5FA8; }
.db-row-main { flex:1; min-width:0; }
.db-row-title { font-size:12.5px; font-weight:700; color:#262A3D; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-row-meta { font-size:11px; color:#9CA3B4; margin-top:2px; }
.db-row-arrow { color:#C5C9DC; font-size:13px; }

@media (max-width: 1100px) { .kpi-grid { grid-template-columns:repeat(2, 1fr); } .dash-bottom-grid { grid-template-columns:1fr; } }
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns:1fr; }
  .pro-search { min-width:0; width:100%; }
  .pro-table-head { flex-direction:column; align-items:stretch; }
}
.ov-plan { font-size:12px; color:#4B5566; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.done-text { text-decoration:line-through; color:#9CA3B4; }
.pill { background:#E9ECFA; border-radius:6px; padding:2px 8px; font-size:11px; font-weight:600; color:#4B5566; }
.pill.autonomy-strict { background:#FCF1EF; color:#B3261E; }
.pill.autonomy-flexible { background:#E7EAFC; color:#2E3C82; }
.overdue { color:#B3261E; font-weight:700; }
.label-chip { font-size:11px; font-weight:700; border:1px solid; border-radius:6px; padding:1px 8px; }

/* --- بک‌لاگ (جدا از تسک‌های هفته جاری) --- */
.backlog-card { border-style:dashed; border-color:#C5C9DC; }
.backlog-toggle { background:none; border:none; cursor:pointer; font-family:inherit; font-size:13px; font-weight:700; color:#8A7A5C; padding:0; }
.proof-count { background:none; border:none; cursor:pointer; font-family:inherit; font-size:11px; color:#6B7280; padding:0; text-decoration:underline dotted; }
.proof-count:hover { color:#1E2350; }

/* --- بورد کانبان --- */
.board { display:flex; gap:12px; align-items:flex-start; overflow-x:auto; padding-bottom:16px; }
.col {
  flex:1; min-width:230px; background:#EAEEE8; border-radius:14px;
  padding:10px; border:2px dashed transparent;
  transition: border-color .15s, background .15s;
}
.col-hover { border-color:#3D4FA6; background:#E0EDE5; }
.col-delete-btn {
  background:none; border:none; cursor:pointer; font-size:13px; line-height:1;
  padding:3px 6px; border-radius:6px; color:#9CA3B4; flex-shrink:0;
}
.col-delete-btn:hover { background:#FCF1EF; color:#B3261E; }
.col-head {
  display:flex; justify-content:space-between; align-items:center;
  font-size:13px; font-weight:800; color:#1E2350;
  padding:2px 6px 8px; margin-bottom:8px;
}
.col-todo .col-head { border-bottom:3px solid #C5C9DC; }
.col-in_progress .col-head { border-bottom:3px solid #2B5FA8; }
.col-review .col-head { border-bottom:3px solid #C97B1B; }
.col-done .col-head { border-bottom:3px solid #3D4FA6; }
.col-count { background:#fff; border-radius:8px; padding:0 8px; font-size:11px; color:#6B7280; font-weight:600; }
.col-empty {
  border:1.5px dashed #C5C9DC; border-radius:10px; padding:18px 10px;
  text-align:center; font-size:12px; color:#9CA3B4;
}
.col-quick-add { margin-top:8px; }

/* --- کاروسل صفحات لندینگ --- */
.lp-page-head { margin-bottom:18px; }
.lp-carousel-outer { position:relative; padding:4px 46px; margin:0 -4px; }
.lp-carousel {
  display:flex; align-items:flex-start; gap:18px; overflow-x:auto; scroll-behavior:smooth;
  scroll-snap-type:x proximity; padding:6px 2px 10px;
}
.lp-nav {
  position:absolute; top:50%; transform:translateY(-50%); z-index:5;
  width:36px; height:36px; border-radius:50%; border:1px solid #E7E9F5;
  background:#fff; color:#3D4FA6; font-size:18px; line-height:1; cursor:pointer;
  box-shadow:0 6px 18px rgba(30,35,80,.14); transition:background .15s, box-shadow .15s, transform .15s;
  display:flex; align-items:center; justify-content:center;
}
.lp-nav:hover { background:#3D4FA6; color:#fff; box-shadow:0 8px 22px rgba(61,79,166,.32); transform:translateY(-50%) scale(1.06); }
.lp-nav-prev { right:0; }
.lp-nav-next { left:0; }

.lp-card {
  position:relative; flex:0 0 260px; width:260px; scroll-snap-align:start;
  background:#fff; border:1px solid #EEF0F8; border-radius:20px;
  box-shadow:0 2px 10px rgba(30,35,80,.05);
  display:flex; flex-direction:column; overflow:hidden;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.lp-card:hover { transform:translateY(-4px); box-shadow:0 14px 30px rgba(30,35,80,.12); border-color:#E1E4F5; }
.lp-card-del {
  position:absolute; top:8px; left:8px; z-index:3; width:22px; height:22px; border-radius:50%;
  border:none; background:rgba(255,255,255,.9); color:#9CA3B4; font-size:11px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(30,35,80,.12);
  opacity:0; transition:opacity .15s, background .15s, color .15s;
}
.lp-card:hover .lp-card-del { opacity:1; }
.lp-card-del:hover { background:#FCF1EF; color:#B3261E; }

.lp-card-media {
  position:relative; height:110px; margin:12px 12px 0; border-radius:14px;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.lp-card-media-icon { font-size:30px; transition:transform .3s ease; }
.lp-card:hover .lp-card-media-icon { transform:scale(1.12); }

.lp-card-body { padding:12px 14px 4px; display:flex; flex-direction:column; gap:7px; }
.lp-badge {
  align-self:flex-start; font-size:11px; font-weight:700; padding:3px 9px; border-radius:7px;
  border:1px solid; line-height:1.6;
}
.lp-card-title {
  font-size:14.5px; font-weight:800; color:#1E2350; line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.lp-card-url {
  font-size:11.5px; color:#9CA3B4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  text-align:left;
}
.lp-card-url-empty { font-style:italic; }
.lp-card-chips {
  display:flex; flex-direction:column; gap:5px; margin-top:2px;
}
.lp-chip {
  display:flex; align-items:center; justify-content:space-between; gap:6px;
  background:#F7F8FD; border:1px solid #EEF0F8; border-radius:9px; padding:6px 10px;
  font-family:inherit; font-size:12px; color:#4B5566; cursor:pointer; text-align:right;
  transition:background .15s;
}
.lp-chip:hover { background:#EEF0FB; color:#1E2350; }
.lp-chip-badge { background:#E8A94B; color:#1E2350; border-radius:8px; padding:0 6px; font-weight:700; font-size:10.5px; flex-shrink:0; }
.lp-chips-empty { font-size:11.5px; color:#C3C8DA; text-align:center; padding:6px 0; }

.lp-card-add {
  margin:10px 12px 12px; padding:9px 10px; border:none; border-radius:12px;
  background:#EEF0FB; color:#3D4FA6; font-family:inherit; font-size:12.5px; font-weight:700;
  cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px;
  transition:background .2s, box-shadow .2s, color .2s;
}
.lp-card-add:hover { background:#3D4FA6; color:#fff; box-shadow:0 8px 18px rgba(61,79,166,.28); }
.lp-plus { font-size:13px; line-height:1; }

.lp-dots { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:10px; }
.lp-dot {
  width:6px; height:6px; border-radius:50%; border:none; background:#D8DCEE; cursor:pointer; padding:0;
  transition:background .2s, width .2s;
}
.lp-dot.active { background:#3D4FA6; width:18px; border-radius:4px; }

@media (max-width: 1100px) { .lp-card { flex-basis:230px; width:230px; } }
@media (max-width: 720px) {
  .lp-carousel-outer { padding:4px 40px; }
  .lp-card { flex-basis:80vw; width:80vw; }
  .lp-nav { width:32px; height:32px; font-size:16px; }
}
.quick-add-open-btn { width:100%; background:#fff; }
.col-show-more {
  width:100%; margin-top:8px; padding:8px; border:1px dashed #3D4FA688; border-radius:10px;
  background:#F7F8FD; color:#3D4FA6; font-family:inherit; font-size:12px; font-weight:700; cursor:pointer;
}
.col-show-more:hover { background:#EEF0FB; }
.deadline-change-row { padding:7px 0; border-bottom:1px dashed #EEF0F8; font-size:12px; }
.deadline-change-row:last-child { border-bottom:none; }
.deadline-change-detail { display:block; color:#262A3D; }
.deadline-change-meta { display:block; color:#9CA3B4; font-size:11px; margin-top:2px; }
.deadline-req-form, .deadline-inline-reason { display:flex; flex-direction:column; gap:8px; margin-top:8px; padding:10px; border:1px dashed #3D4FA688; border-radius:10px; background:#F7F8FD; }
.deadline-inline-reason { margin-top:-4px; margin-bottom:10px; }
.quick-card-form { display:flex; flex-direction:column; gap:6px; }
.quick-card-actions { display:flex; gap:6px; }
.tcard {
  background:#fff; border:1px solid #E1E4F0; border-radius:12px;
  padding:10px 12px; margin-bottom:8px;
  box-shadow:0 1px 2px #1E235008;
}
.tcard-open { cursor:pointer; }
.tcard-open:hover { border-color:#3D4FA6; }
.list { display:flex; flex-direction:column; gap:8px; }
.list-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:#fff; border:1px solid #E1E4F0; border-radius:12px;
  padding:10px 14px; cursor:pointer; box-shadow:0 1px 2px #1E235008;
  transition: border-color .15s, background .15s;
}
.list-row:hover { border-color:#3D4FA6; background:#F5FAF6; }
.list-row-main { min-width:0; }
.list-row .link-btn { white-space:nowrap; }
.tcard.card-clickable { display:block; width:100%; text-align:right; font-family:inherit; cursor:pointer; border:1px solid #E1E4F0; transition:border-color .15s, transform .12s; }
.tcard.card-clickable:hover { border-color:#3D4FA6; transform:translateY(-1px); }
.tcard-lifting { opacity:.35; }
.tcard-top { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.drag-handle {
  margin-inline-start:auto; cursor:grab; touch-action:none; user-select:none;
  color:#9CA3B4; font-size:17px; line-height:1; padding:2px 6px; border-radius:6px;
}
.drag-handle:hover { background:#F0F2FA; color:#1E2350; }
.drag-handle:active { cursor:grabbing; }
.tcard-title { font-size:13px; font-weight:700; margin-bottom:6px; }
.tcard-meta { display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:11px; color:#6B7280; margin-bottom:4px; }
.tcard-criteria { font-size:11px; color:#2E3C82; background:#EFF1FC; border-radius:8px; padding:5px 8px; margin:6px 0 4px; }
.tcard-time { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:6px; font-size:11px; color:#6B7280; }
.timer-btn { white-space:nowrap; }
.timer-btn.running { background:#FCF1EF; color:#B3261E; }
.time-overrun { color:#B3261E; font-weight:800; }
.tcard-foot { display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.task-count-badge {
  display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700;
  color:#B3261E; background:#FCF1EF; border-radius:8px; padding:2px 8px;
}
.drag-ghost {
  position:fixed; z-index:999; pointer-events:none;
  transform:translate(-50%,-60%) rotate(-2deg);
  background:#1E2350; color:#fff; font-size:13px; font-weight:600;
  padding:9px 16px; border-radius:10px; max-width:230px;
  box-shadow:0 10px 28px #1E235055;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.time-table { overflow-x:auto; }
.time-row { display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px; align-items:center; padding:9px 2px; border-bottom:1px solid #EEF0F8; font-size:13px; }
.time-row.cols-2 { grid-template-columns: 1fr 1fr; }
.time-row:last-child { border-bottom:none; }
.time-row.head { font-size:11px; font-weight:700; color:#6B7280; }

.table-card { padding:6px 18px; overflow-x:auto; min-width:0; }
.rank-row {
  display:grid; grid-template-columns: 1fr 80px 70px 70px 150px;
  gap:10px; align-items:center; padding:11px 0;
  border-bottom:1px solid #EEF0F8; font-size:13px;
  min-width:380px;
}
.rank-row:last-child { border-bottom:none; }
.rank-row-editable { grid-template-columns: 1fr 80px 70px 70px 150px 90px; }
.rank-actions { display:flex; gap:8px; white-space:nowrap; }
.rank-row.head { font-size:11px; font-weight:700; color:#6B7280; }
.rank-kw { font-weight:600; }
.rank-entry { border-bottom:1px solid #EEF0F8; }
.rank-entry:last-child { border-bottom:none; }
.rank-entry .rank-row { border-bottom:none; padding-bottom:2px; }
.rank-history-row { display:flex; flex-wrap:wrap; gap:6px; padding:0 0 10px; }
.rank-history-chip { display:inline-flex; align-items:center; gap:5px; background:#F3F4FB; border-radius:8px; padding:3px 9px; font-size:11px; color:#4B5566; }
.rank-history-date { color:#9CA3B4; }
.rank-current { font-size:16px; font-weight:800; color:#1E2350; }
.rank-input-wrap { display:flex; gap:6px; align-items:center; }
.delta { font-size:12px; font-weight:700; }
.delta.up { color:#3D4FA6; }
.delta.down { color:#C2402A; }
.delta.flat { color:#9CA3B4; }
.spark { display:block; }
.spark-empty { color:#C9D2CB; }

.reminder-card { display:flex; align-items:center; gap:12px; padding:12px 16px; }
.reminder-main { display:flex; align-items:center; gap:10px; flex:1; font-size:14px; cursor:pointer; }
.reminder-main input { width:16px; height:16px; accent-color:#3D4FA6; cursor:pointer; }
.reminder-date { font-size:12px; color:#6B7280; }
.reminder-shared { font-size:11px; color:#C97B1B; white-space:nowrap; }
.reminder-shared.all { color:#9CA3B4; }
.done-card { opacity:.55; }

.reminder-share-picker { margin-top:10px; padding-top:10px; border-top:1px dashed #E9ECF7; }
.reminder-share-options { display:flex; flex-wrap:wrap; gap:12px; margin-top:6px; }
.reminder-share-option { display:flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; }
.reminder-share-option input { width:15px; height:15px; accent-color:#3D4FA6; cursor:pointer; }

/* --- مشاور هوشمند (غیرفعال) --- */
.ai-disabled { text-align:center; padding:40px 16px; color:#6B7280; }
.ai-disabled .lock { font-size:26px; display:block; margin-bottom:10px; }

/* --- حضور و غیاب --- */
.field-label { font-size:12px; font-weight:700; color:#4B5566; margin-top:8px; display:block; }
.checkin-form { display:flex; flex-direction:column; }
.checkin-form textarea.input { width:100%; resize:vertical; font-family:inherit; margin-top:4px; }
textarea.input.wide { width:100%; resize:vertical; font-family:inherit; }
.checkin-person-card { padding:12px 16px; }
.checkin-person-card.missing { opacity:.6; }
.checkin-person-head { font-size:13px; font-weight:700; margin-bottom:6px; }
.checkin-field { font-size:13px; color:#4B5566; margin-top:4px; line-height:1.7; }
.checkin-done-list { margin:4px 0 0; padding-inline-start:18px; }
.checkin-done-list li { margin-bottom:2px; }

.checkin-two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
@media (max-width:900px) { .checkin-two-col { grid-template-columns:1fr; } }

.cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-top:12px; text-align:center; font-size:11px; font-weight:700; color:#8891A0; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-top:6px; }
.cal-cell {
  aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  border-radius:8px; font-size:12px; font-weight:700; color:#4B5566;
}
.cal-cell.empty-cell { visibility:hidden; }
.cal-cell.has-note { background:#E7EAFC; color:#2E3C82; }
.cal-cell.missing-note { background:#FCF1EF; color:#B3261E; }
.cal-cell.future { background:#F3F4FB; color:#C5C9DC; }
.cal-cell.holiday { background:#EDEFEE; color:#8891A0; }
.cal-cell-clickable { cursor:pointer; transition:transform .1s, box-shadow .1s; }
.cal-cell-clickable:hover { transform:translateY(-1px); box-shadow:0 2px 6px rgba(30,35,80,.15); }
.cal-legend { display:flex; align-items:center; gap:6px; margin-top:10px; font-size:12px; color:#6B7280; }
.cal-dot { width:10px; height:10px; border-radius:3px; display:inline-block; background:#E7EAFC; }
.cal-dot.missing { background:#FCF1EF; margin-right:12px; }
.cal-dot.holiday { background:#EDEFEE; margin-right:12px; }

/* --- مودال (باکس رنک‌ترکر و مشابه) --- */
.modal-overlay {
  position:fixed; inset:0; background:rgba(30,35,80,.45);
  display:flex; align-items:center; justify-content:center;
  z-index:1000; padding:20px;
}
.modal-box {
  background:#fff; border-radius:16px; max-width:640px; width:100%;
  max-height:85vh; overflow-y:auto; box-shadow:0 20px 60px rgba(30,35,80,.35);
}
.modal-box-lg { max-width:960px; }
.modal-head {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:16px 20px; border-bottom:1px solid #E1E4F0;
  position:sticky; top:0; background:#fff; border-radius:16px 16px 0 0;
}
.lc-url-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.lc-gsc-btn { display:inline-flex; align-items:center; text-decoration:none; white-space:nowrap; }
.modal-close {
  background:none; border:none; font-size:22px; line-height:1; cursor:pointer;
  color:#6B7280; padding:2px 8px; border-radius:8px;
}
.modal-close:hover { background:#F0F2FA; color:#1E2350; }
.modal-body { padding:16px 20px; }

.checklist-box { margin-top:14px; border-top:1px solid #EEF0F8; padding-top:12px; }
.et-file-label { display:inline-block; }
.et-file-name { margin-top:6px; }
.checklist-item-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px dashed #E9ECF7; font-size:13px; }
.checklist-item-row:last-of-type { border-bottom:none; }
.checklist-item-label { display:flex; align-items:center; gap:8px; cursor:pointer; flex:1; }
.checklist-item-label input { width:15px; height:15px; accent-color:#3D4FA6; cursor:pointer; }

/* --- چک‌لیست تکنیکال سئو --- */
.cl-progress-bar { position:relative; height:8px; background:#E9ECFA; border-radius:5px; overflow:hidden; margin-top:6px; }
.cl-progress-bar.sm { width:70px; height:6px; margin-top:0; display:inline-block; vertical-align:middle; }
.cl-progress-bar.lg { height:12px; margin-top:10px; }
.cl-progress-fill { position:absolute; inset:0 auto 0 0; height:100%; background:#3D4FA6; border-radius:5px; transition:width .2s; }
.cl-percent { font-size:15px; font-weight:800; color:#1E2350; white-space:nowrap; }
.cl-overall-head { display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:700; color:#4B5566; }

.cl-category-grid { display:flex; flex-direction:column; gap:12px; }
.cl-category { margin-bottom:0; }
.cl-category-head {
  display:flex; align-items:center; justify-content:space-between; width:100%;
  background:none; border:none; cursor:pointer; font-family:inherit; padding:0; text-align:right;
}
.cl-category-title { font-size:14px; font-weight:800; color:#1E2350; }
.cl-category-meta { display:flex; align-items:center; gap:10px; }
.cl-chevron { color:#9CA3B4; font-size:13px; }
.cl-category-body { margin-top:12px; display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px 14px; align-items:start; }

.cl-item { border:1px solid #E9ECF7; border-radius:10px; padding:8px 10px; background:#FBFCFA; }
.cl-item-main { display:flex; align-items:center; gap:8px; }
.cl-item-title { font-size:13px; font-weight:600; }
.cl-check-label { display:flex; align-items:center; gap:8px; cursor:pointer; width:100%; }
.cl-check-input { width:16px; height:16px; accent-color:#3D4FA6; cursor:pointer; flex-shrink:0; }
.cl-item-done .cl-item-title { text-decoration:line-through; color:#9CA3B4; }
.cl-item-desc { font-size:12px; color:#6B7280; margin-top:2px; }
.cl-item-controls { display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; }
.cl-item-controls .cl-note-input { flex:1; min-width:160px; }

.cl-priority { font-size:10px; font-weight:800; border-radius:6px; padding:1px 7px; white-space:nowrap; }
.cl-priority-high { background:#FCF1EF; color:#B3261E; }
.cl-priority-medium { background:#FDF7EE; color:#C97B1B; }
.cl-priority-low { background:#E9ECFA; color:#6B7280; }

.cl-status-select.cl-status-not_checked { color:#6B7280; }
.cl-status-select.cl-status-in_progress { color:#2B5FA8; border-color:#B7CBEA; }
.cl-status-select.cl-status-done { color:#2E3C82; border-color:#C3CCF0; background:#EFF1FC; }
.cl-status-select.cl-status-not_applicable { color:#9CA3B4; }

.cl-admin-category { margin-bottom:10px; }
.cl-admin-category-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.cl-admin-category-head .cl-category-title { flex:1; }
.cl-admin-items { display:flex; flex-direction:column; gap:6px; min-height:6px; }
.cl-admin-item {
  display:flex; align-items:center; gap:10px; padding:7px 8px;
  border:1px solid #E1E4F0; border-radius:8px; background:#FBFCFA; font-size:13px;
}
.cl-admin-item-title { flex:1; }
.cl-admin-category.dragging, .cl-admin-item.dragging { opacity:.4; }

/* --- تقویم شمسی --- */
.jdate-display { cursor:pointer; background:#fff; }
.jdate-popover {
  position:fixed; z-index:1100; display:none;
  background:#fff; border:1px solid #E1E4F0; border-radius:12px;
  box-shadow:0 10px 30px rgba(30,35,80,.25); padding:10px; width:240px;
}
.jdate-popover.open { display:block; }
.jdate-popover-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.jdate-popover-title { font-size:13px; font-weight:700; color:#1E2350; }
.jdate-nav { background:#F0F2FA; border:none; border-radius:8px; width:26px; height:26px; cursor:pointer; font-size:14px; color:#1E2350; font-family:inherit; }
.jdate-nav:hover { background:#E1E4F0; }
.jdate-weekdays { display:grid; grid-template-columns:repeat(7,1fr); text-align:center; font-size:11px; color:#9CA3B4; margin-bottom:4px; }
.jdate-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.jdate-cell {
  background:none; border:none; border-radius:8px; padding:6px 0; font-size:12px; cursor:pointer;
  font-family:inherit; color:#262A3D; text-align:center;
}
.jdate-cell:hover { background:#F0F2FA; }
.jdate-cell.today { font-weight:800; color:#3D4FA6; }
.jdate-cell.selected { background:#3D4FA6; color:#fff; }
.jdate-cell.empty { cursor:default; }
.jdate-popover-foot { display:flex; justify-content:space-between; margin-top:8px; padding-top:8px; border-top:1px solid #EEF0F8; }

/* --- صفحه ورود --- */
.login-body {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:#F3F4FB;
  font-family:'Vazirmatn', Tahoma, sans-serif;
  padding:16px;
  position:relative;
}
.login-body::before {
  content: "";
  position: fixed; inset: 0;
  background: url('bg-watermark.png') center center / min(80vw, 700px) no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
.login-box {
  background:#fff; border:1px solid #E1E4F0; border-radius:16px;
  padding:32px 28px; width:100%; max-width:340px;
  display:flex; flex-direction:column; gap:12px;
  box-shadow:0 8px 30px #1E235014;
}
.login-brand { display:flex; align-items:center; gap:10px; justify-content:center; margin-bottom:10px; }
.login-error { background:#FCF1EF; color:#B3261E; border:1px solid #EBC5C1; border-radius:8px; padding:8px 12px; font-size:13px; }
.login-msg { background:#EFF1FC; color:#2E3C82; border:1px solid #C3CCF0; border-radius:8px; padding:8px 12px; font-size:13px; }

/* --- صفحه تنظیمات --- */
.settings-wrap { max-width:420px; margin:40px auto; padding:0 16px; }
.settings-back { display:inline-block; margin-bottom:14px; font-size:13px; color:#3D4FA6; text-decoration:none; font-weight:700; }

/* --- مدیریت کاربران --- */
.admin-wrap { max-width:820px; margin:40px auto; padding:0 16px 60px; }
.user-table { overflow-x:auto; }
.user-row {
  display:grid; grid-template-columns: 1fr 1.4fr .8fr .7fr 1.7fr;
  gap:10px; align-items:center; padding:10px 2px;
  border-bottom:1px solid #EEF0F8; font-size:13px;
  min-width:640px;
}
.user-row:last-child { border-bottom:none; }
.user-row.head { font-size:11px; font-weight:700; color:#6B7280; }
.user-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.user-actions form { display:flex; gap:4px; align-items:center; }
.user-reset-form .input { width:100px; }
.status-on { color:#3D4FA6; font-weight:700; }
.status-off { color:#9CA3B4; }

@media (max-width: 720px) {
  .app { grid-template-columns:1fr; grid-template-rows:56px auto 1fr; grid-template-areas:"top" "rail" "main"; }
  .rail { flex-direction:row; overflow-x:auto; border-left:none; border-bottom:1px solid #E1E4F0; padding:8px 10px; }
  .tab { white-space:nowrap; width:auto; }
  .main { padding:18px 14px 60px; }
  .col { min-width:78vw; }
  .rank-row { grid-template-columns: 1fr 60px 55px; }
  .rank-row .spark, .rank-row.head span:nth-child(4) { display:none; }
  .rank-input-wrap { grid-column: 1 / -1; }
  .rank-row.head span:nth-child(5) { display:none; }
  .priority-grid, .rank-grid { grid-template-columns:1fr; }
  .modal-box { max-width:100%; }
}
@media (max-width: 1000px) and (min-width: 721px) {
  .priority-grid, .rank-grid { grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar { padding:0 10px; }
  .brand-logo { height:30px; }
  .topbar-right { gap:8px; }
  .running-timer { padding:4px 8px; }
  .running-timer b { max-width:70px; }
  .user-name { display:none; }
  .topbar-link { width:26px; height:26px; font-size:15px; }

  .page-title { font-size:19px; }
  .page-head { flex-direction:column; align-items:stretch; }
  .page-head .btn { width:100%; }

  .stat-row { grid-template-columns:repeat(2, 1fr); gap:8px; }
  .stat { padding:12px; }

  .card { padding:14px; }
  .section-card { padding:14px; }

  .subnav { overflow-x:auto; flex-wrap:nowrap; padding-bottom:8px; }
  .subnav-tab { white-space:nowrap; flex:none; }

  .form-grid { grid-template-columns:1fr; }
  .input.wide { grid-column:auto; }

  .modal-overlay { padding:0; align-items:flex-end; }
  .modal-box { max-width:100%; width:100%; border-radius:16px 16px 0 0; max-height:92vh; }
  .modal-box-lg { max-width:100%; }

  .task-grid { grid-template-columns:1fr; }
  .filter-row { overflow-x:auto; flex-wrap:nowrap; }
  .filter-row .input, .filter-row select { min-width:130px; }

  table { font-size:12px; }
}

@media (max-width: 400px) {
  .stat-row { grid-template-columns:1fr; }
}
