/* ==========================================================================
   هم‌پروژه — Design system v5
   یک زبان طراحی روشن، آرام و سریع: سطوح سفید، بنفش اصلی، سبز تأیید،
   تایپوگرافی واضح و فاصله‌گذاری منظم. همه اجزای سامانه از این توکن‌ها می‌آیند.
   ========================================================================== */

:root {
  --bg: #f4f5fa;
  --bg-deep: #eceef7;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --surface-3: #f1f3fa;
  --ink: #11162a;
  --ink-2: #59617a;
  --ink-3: #8b93a9;
  --line: #e8eaf3;
  --line-strong: #d8dcec;

  --brand: #5b4bff;
  --brand-deep: #4438d8;
  --brand-ink: #352bb0;
  --brand-soft: #edecff;
  --brand-faint: #f6f5ff;
  --accent: #0e9384;
  --accent-soft: #e4f6f3;
  --gold: #b5811f;
  --gold-soft: #fbf2dc;

  --ok: #0d9a63;
  --ok-soft: #e6f7ee;
  --warn: #b5761a;
  --warn-soft: #fcf2df;
  --danger: #d64545;
  --danger-soft: #fdecec;

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(17, 22, 42, .05);
  --shadow-sm: 0 1px 3px rgba(17, 22, 42, .05), 0 8px 22px -12px rgba(17, 22, 42, .12);
  --shadow-md: 0 24px 60px -24px rgba(30, 26, 90, .28);
  --sidebar-w: 266px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 100% -12%, #eae8ff 0%, rgba(234, 232, 255, 0) 60%),
    radial-gradient(760px 420px at -5% 105%, #e6f7f6 0%, rgba(230, 247, 246, 0) 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; }
img { max-width: 100%; }
::selection { background: #ddd9ff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 18px; height: 18px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic * { vector-effect: non-scaling-stroke; }

.hidden { display: none !important; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.num { font-variant-numeric: tabular-nums; }

/* ============================ shell ============================ */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 14px 14px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  border-inline-end: 1px solid var(--line);
  z-index: 30;
  overflow-y: auto;
  scrollbar-width: thin;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; padding: 2px 8px 8px;
}
.brand-mark { width: 40px; height: 40px; display: block; flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { color: var(--ink-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-3); padding: 14px 12px 6px; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.8px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  position: relative;
}
.nav a .nav-ic {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: var(--ink-3);
  background: transparent; transition: inherit;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.nav a.active .nav-ic { background: #fff; color: var(--brand); box-shadow: var(--shadow-xs); }
.nav-badge {
  margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 99px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700;
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.install-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 10px; border-radius: 11px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: var(--surface);
  color: var(--brand-ink); font-size: 12.5px; font-weight: 600;
}
.install-btn:hover { background: var(--brand-faint); border-color: var(--brand); }

.me-card {
  display: flex; align-items: center; gap: 9px;
  padding: 9px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.me-text { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; flex: 1; }
.me-text strong { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }

.route-progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 2.5px; width: 0;
  background: linear-gradient(90deg, var(--brand), #9b7bff, var(--accent));
  z-index: 100; opacity: 0; border-radius: 0 3px 3px 0;
  transition: width .3s ease, opacity .2s ease;
}
.route-progress.on { width: 72%; opacity: 1; }

.topbar {
  position: sticky; top: 0; z-index: 25;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  background: rgba(250, 251, 255, .78);
  backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--line);
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.crumb span { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.crumb small { font-size: 11.5px; color: var(--ink-3); }

.today-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.today-pill .ic { width: 15px; height: 15px; color: var(--brand); }

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.user-chip:hover { border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.3; text-align: start; }
.user-chip-text strong { font-size: 12px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { font-size: 10px; color: var(--ink-3); }

.container {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 26px 28px 64px;
}

.mobile-nav { display: none; }

/* ============================ page head ============================ */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.35; }
.eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 3px 10px; border-radius: 99px; margin-bottom: 8px;
}
.sub { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; max-width: 74ch; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 22px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* ============================ buttons & pills ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; font-size: 13px; font-weight: 600;
  background: var(--brand); color: #fff; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px -10px rgba(91, 75, 255, .9);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.small { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn.small .ic { width: 15px; height: 15px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--danger); }

.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--ink-3); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:active { transform: translateY(1px); }

.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--brand-ink); font-size: 12.5px; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 99px;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill.accent { background: var(--accent-soft); color: #0a6f64; }
.pill.ok { background: var(--ok-soft); color: #076b45; }
.pill.warn { background: var(--warn-soft); color: #8a5a13; }
.pill.danger { background: var(--danger-soft); color: #a92e2e; }
.pill.gold { background: var(--gold-soft); color: #7f5a13; }
.pill.soft { background: var(--surface-3); color: var(--ink-2); }
.pill.private { background: var(--surface-3); color: var(--ink-3); }

.badge-soft {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 7px;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 11.5px; font-weight: 500;
}
.badge-soft .ic { width: 13px; height: 13px; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; background: var(--surface-3);
  font-size: 11.5px; color: var(--ink-2);
}

.prio {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 1px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 700;
  background: var(--surface-3); color: var(--ink-2);
}
.prio::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.prio.low { background: #eef1f7; color: #616a80; }
.prio.medium { background: #e9effc; color: #3c5da8; }
.prio.high { background: var(--warn-soft); color: #94620f; }
.prio.urgent { background: var(--danger-soft); color: #b32c2c; }

/* ============================ avatars ============================ */

.avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: -.02em;
  border: 2px solid #fff; box-shadow: var(--shadow-xs);
}
.avatar.sm { width: 25px; height: 25px; font-size: 9.5px; border-radius: 8px; }
.avatar.md { width: 34px; height: 34px; font-size: 12px; border-radius: 11px; }
.avatar-stack { display: inline-flex; align-items: center; direction: ltr; }
.avatar-stack .avatar { margin-inline-start: -7px; }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }
.avatar-more {
  width: 25px; height: 25px; margin-inline-start: -7px; border-radius: 8px;
  display: inline-grid; place-items: center; background: var(--surface-3);
  color: var(--ink-2); font-size: 9.5px; font-weight: 700; border: 2px solid #fff;
}

/* ============================ panels & metrics ============================ */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px;
}
.panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-title > .ic { width: 20px; height: 20px; color: var(--brand); }
.panel-title h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.panel-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.panel-body { padding: 0 18px 18px; }
.panel.flush .panel-body { padding: 0; }
.panel.flush .panel-head { padding-bottom: 14px; }
.panel-body > .empty { border: 0; background: transparent; }

.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 4px;
}
.metric {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 15px 16px 14px;
  box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.metric::after {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-soft), transparent 70%);
  opacity: .65; transform: translate(28%, -40%); pointer-events: none;
}
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.metric-ic {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.metric-ic .ic { width: 16px; height: 16px; }
.metric-ic.accent { background: var(--accent-soft); color: #0a6f64; }
.metric-ic.ok { background: var(--ok-soft); color: #076b45; }
.metric-ic.danger { background: var(--danger-soft); color: #a92e2e; }
.metric-ic.gold { background: var(--gold-soft); color: #7f5a13; }
.metric-value { font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; line-height: 1.2; }
.metric-value small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.metric-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.metric-foot.danger { color: var(--danger); }
.metric-foot.ok { color: var(--ok); }

/* ============================ lists ============================ */

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-block-end: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.list-row:last-child { border-block-end: 0; }
.list-main { min-width: 0; flex: 1; }
.list-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.list-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; flex-wrap: wrap; }
.list-meta .ic { width: 13px; height: 13px; }
.list-end { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cell-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-person strong { font-size: 12.5px; font-weight: 600; }
.cell-person small { font-size: 10.5px; color: var(--ink-3); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 16px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--ink-2);
}
.empty strong { font-size: 13.5px; }
.empty span { font-size: 12px; color: var(--ink-3); max-width: 36ch; }
.empty-ic {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 2px;
}
.empty-ic .ic { width: 21px; height: 21px; }

/* ============================ dashboard ============================ */

.sec-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; margin-bottom: 18px;
  border-radius: var(--radius); border: 1px solid #f2d9a8; background: var(--warn-soft);
  color: #7c5511; font-size: 12.5px;
}
.sec-banner .ic { color: #a5761d; }
.sec-banner span { flex: 1; min-width: 200px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.quick-tile {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2);
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.quick-tile:hover { border-color: var(--brand); background: var(--brand-faint); transform: translateY(-1px); }
.quick-tile > span:last-child { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.quick-tile strong { font-size: 12.5px; font-weight: 700; }
.quick-tile small { font-size: 10.5px; color: var(--ink-3); }
.qt-ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand-ink);
}
.qt-ic .ic { width: 17px; height: 17px; }

/* focus board */
.focus-board {
  background: linear-gradient(135deg, #221d63 0%, #33279c 45%, #4b3ed6 100%);
  border-radius: var(--radius-xl); padding: 20px;
  color: #fff; box-shadow: 0 26px 50px -30px rgba(40, 30, 130, .85);
  position: relative; overflow: hidden;
}
.focus-board::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  inset-inline-end: -90px; top: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.focus-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.focus-heading { display: flex; align-items: center; gap: 12px; }
.focus-ic {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .2);
}
.focus-ic .ic { width: 20px; height: 20px; }
.focus-heading h2 { font-size: 17px; font-weight: 800; }
.focus-heading p { font-size: 12px; color: rgba(255, 255, 255, .72); margin-top: 1px; }
.focus-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.focus-tab {
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .82); border-radius: 99px; padding: 4px 10px;
  font-size: 11.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.focus-tab b { font-size: 10px; background: rgba(255, 255, 255, .18); border-radius: 99px; padding: 0 5px; }
.focus-tab.on { background: #fff; color: #2c2384; border-color: #fff; font-weight: 700; }
.focus-tab.on b { background: var(--brand-soft); }
.focus-board .link-btn { color: #fff; }

.attention-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
  position: relative; z-index: 1;
}
.attention-title { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.attention-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .14);
  color: #fff; text-decoration: none; font-size: 11px;
}
.attention-item .ic { width: 13px; height: 13px; }
.attention-item.danger { background: rgba(255, 120, 120, .3); }
.attention-item.warn { background: rgba(255, 195, 90, .26); }

.focus-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 10px; margin-top: 16px; position: relative; z-index: 1;
}
.focus-card {
  background: rgba(255, 255, 255, .96); border-radius: 14px; overflow: hidden;
  color: var(--ink); display: flex; flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .4);
}
.focus-card.warn { border-inline-start: 3px solid var(--warn); }
.focus-card.danger { border-inline-start: 3px solid var(--danger); }
.focus-card.info { border-inline-start: 3px solid var(--accent); }
.focus-hit { display: block; padding: 12px 13px 10px; text-decoration: none; color: inherit; flex: 1; }
.focus-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.focus-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.focus-kind .ic { width: 14px; height: 14px; }
.focus-when { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); }
.focus-card.danger .focus-when { background: var(--danger-soft); color: #a92e2e; }
.focus-card.warn .focus-when { background: var(--warn-soft); color: #8a5a13; }
.focus-msg { font-size: 12.8px; line-height: 1.75; margin: 8px 0 10px; color: var(--ink); }
.focus-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.focus-project { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-3); }
.focus-project .ic { width: 13px; height: 13px; }
.focus-who { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.focus-who.none { color: var(--ink-3); font-weight: 500; }
.focus-who.none .ic { width: 13px; height: 13px; }
.focus-actions { display: flex; gap: 0; border-block-start: 1px solid var(--line); }
.focus-act {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 6px; border: 0; background: var(--surface-2); cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--brand-ink);
}
.focus-act + .focus-act { border-inline-start: 1px solid var(--line); }
.focus-act:hover { background: var(--brand-soft); }
.focus-act .ic { width: 14px; height: 14px; }

.today-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 0;
  border-block-end: 1px solid var(--line); text-decoration: none; color: inherit;
}
.today-item:last-child { border-block-end: 0; }
.today-time {
  flex: 0 0 auto; min-width: 58px; text-align: center;
  padding: 2px 7px; border-radius: 7px; background: var(--brand-soft);
  color: var(--brand-ink); font-size: 10.5px; font-weight: 700;
}
.today-time.late { background: var(--danger-soft); color: #a92e2e; }
.today-main { min-width: 0; }
.today-main strong { display: block; font-size: 12.8px; font-weight: 600; }
.today-main small { font-size: 11px; color: var(--ink-3); }

/* ============================ progress & ring ============================ */

.progress {
  height: 7px; width: 100%; border-radius: 99px; background: var(--surface-3);
  overflow: hidden; flex: 1;
}
.progress.thick { height: 9px; }
.progress i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #6d5bff, #4f3ce0);
  transition: width .3s ease;
}
.progress[data-tone="ok"] i { background: linear-gradient(90deg, #16b57d, #0d9a63); }
.progress[data-tone="warn"] i { background: linear-gradient(90deg, #e9b949, #d19a1f); }
.progress[data-tone="danger"] i { background: linear-gradient(90deg, #f06a6a, #d64545); }
.progress-row { display: flex; align-items: center; gap: 9px; }
.progress-val { font-size: 11.5px; font-weight: 700; color: var(--ink-2); min-width: 34px; text-align: end; }

.ring {
  --val: 0;
  width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--brand) calc(var(--val) * 1%), var(--surface-3) 0);
}
.ring::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff;
}
.ring span { position: relative; font-size: 12.5px; font-weight: 800; }
.ring small { font-size: 8px; font-weight: 600; }
.donut-center { font-size: 12px; color: var(--ink-2); }

/* ============================ projects & tasks ============================ */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.search-field {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px; min-width: 240px; flex: 1; max-width: 380px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  color: var(--ink-3);
}
.search-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-field input {
  border: 0; outline: 0; background: none; width: 100%;
  font: inherit; font-size: 13px; color: var(--ink);
}
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 99px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 500;
}
.filter-chip:hover { border-color: var(--line-strong); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.project-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 17px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #dcd7ff; }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.project-card .desc {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.project-stats { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.project-stats b { color: var(--ink); font-weight: 700; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 11px; border-block-start: 1px solid var(--line); font-size: 11.5px;
}

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

.sub-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface-2); margin-bottom: 12px; }
.sub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sub-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-title h4 { font-size: 13.5px; font-weight: 700; }
.sub-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.sub-actions { display: flex; gap: 4px; flex: 0 0 auto; }

.task-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 11px; border: 1px solid transparent;
  text-decoration: none; color: inherit;
}
.task-row:hover { background: var(--surface-2); border-color: var(--line); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.task-sub { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); margin-top: 2px; flex-wrap: wrap; }
.task-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.task-state { font-size: 11px; font-weight: 700; color: var(--ink-2); min-width: 34px; text-align: end; }
.progress-row.compact { width: 90px; }
.task-actions { display: flex; gap: 2px; }
.task-actions .icon-btn { width: 28px; height: 28px; }
.task-actions .ic { width: 15px; height: 15px; }

.meeting-item {
  padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface-2); margin-bottom: 10px;
}
.meeting-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meeting-body { margin-top: 6px; }
.meeting-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.meeting-agenda { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.meeting-date { display: flex; flex-direction: column; align-items: center; line-height: 1.2; flex: 0 0 auto; }
.meeting-date strong { font-size: 15px; font-weight: 800; color: var(--brand); }
.meeting-date small { font-size: 10px; color: var(--ink-3); }
.outcome { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: var(--ok-soft); font-size: 12px; color: #076b45; }
.member-cell { display: flex; align-items: center; gap: 8px; }
.person-block { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-block-end: 1px solid var(--line); }
.person-block:last-child { border-block-end: 0; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kcol {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px; display: flex; flex-direction: column; min-height: 220px;
}
.kcol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; }
.kcol-head h3 { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.kdot.todo { background: #8b93a9; }
.kdot.doing { background: var(--brand); }
.kdot.review { background: var(--warn); }
.kdot.done { background: var(--ok); }
.count { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--surface-3); border-radius: 99px; padding: 0 7px; }
.kcol-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kcol-empty { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 18px 6px; }
.kcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px;
  box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.kcard-title { font-size: 12.8px; font-weight: 600; line-height: 1.6; }
.kcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--ink-3); }
.kcard-foot { display: flex; align-items: center; gap: 6px; }
.kcard-act { display: flex; gap: 12px; font-size: 11px; }
.kcard-act button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink-3); font-size: 11px; }
.kcard-act button:hover { color: var(--brand); }

/* ============================ calendar & week ============================ */

.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.calendar-head h3 { font-size: 15px; font-weight: 800; }
.cal-nav { display: flex; gap: 4px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 4px 0; }
.cal-cell {
  min-height: 74px; padding: 6px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); position: relative;
  transition: border-color .12s ease, background .12s ease;
}
.cal-cell:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cal-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.today { border-color: var(--brand); background: var(--brand-faint); }
.cal-cell.selected { box-shadow: 0 0 0 2px var(--brand); }
.cal-daynum { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.cal-cell.today .cal-daynum { color: var(--brand-ink); }
.cal-daynum.late { color: var(--danger); }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.cal-dot.meeting { background: var(--accent); }
.cal-dot.late { background: var(--danger); }
.cal-event {
  display: block; font-size: 9.5px; line-height: 1.5; margin-top: 3px;
  padding: 0 4px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-event.meeting { background: var(--accent-soft); color: #0a6f64; }
.cal-more { font-size: 9px; color: var(--ink-3); }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: var(--ink-3); margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }

.day-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface-2); }
.day-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.day-panel-head strong { font-size: 13px; }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-item {
  display: flex; gap: 9px; padding: 9px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
}
.day-item-main { min-width: 0; flex: 1; }
.day-item-title { font-size: 12.5px; font-weight: 600; }
.day-item-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.day-name { font-size: 11px; color: var(--ink-3); }
.day-empty { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 14px 0; }

.week-scroll { overflow-x: auto; padding-bottom: 6px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; min-width: 860px; }
.wday { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px; min-height: 150px; }
.wday.today { border-color: var(--brand); background: var(--brand-faint); }
.wday h4 { font-size: 11.5px; font-weight: 700; margin-bottom: 2px; }
.wday .date { font-size: 10px; color: var(--ink-3); }
.wchip {
  display: block; margin-top: 6px; padding: 5px 7px; border-radius: 8px;
  font-size: 10.5px; background: var(--surface); border: 1px solid var(--line);
  line-height: 1.5;
}
.wchip.overdue { border-color: #f3c9c9; background: var(--danger-soft); color: #a92e2e; }
.wbusy { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 6px; font-size: 9.5px; background: var(--surface-3); color: var(--ink-2); }
.week-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; }
.week-empty { font-size: 10.5px; color: var(--ink-3); margin-top: 8px; }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 16px; }
.tl-day-group { display: flex; flex-direction: column; gap: 8px; }
.tl-day-label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.tl-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); }
.tl-time { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 7px; padding: 1px 7px; height: fit-content; }
.tl-main { min-width: 0; flex: 1; }
.tl-head { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-who { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.tl-note { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.tl-change { font-size: 11px; color: var(--ok); font-weight: 700; }
.tl-target { font-size: 10.5px; color: var(--ink-3); }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; }

/* availability */
.avail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.avail-day { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.avail-day h4 { font-size: 12px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; }
.blocks { display: flex; flex-direction: column; gap: 6px; }
.block {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px; border-radius: 8px; font-size: 11px;
  background: var(--surface); border: 1px solid var(--line);
}
.block-row { display: flex; align-items: center; gap: 6px; }
.avail-add { margin-top: 8px; width: 100%; }
.free-day { padding: 8px 0; border-block-end: 1px solid var(--line); font-size: 12px; }
.free-day:last-child { border-block-end: 0; }
.slot { display: inline-block; margin: 3px 0 0 5px; padding: 1px 8px; border-radius: 6px; background: var(--ok-soft); color: #076b45; font-size: 11px; font-weight: 600; }
.slot.none { background: var(--surface-3); color: var(--ink-3); font-weight: 400; }

/* ============================ tables ============================ */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: start; font-size: 11px; font-weight: 700; color: var(--ink-3);
  padding: 10px 12px; border-block-end: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 11px 12px; border-block-end: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-block-end: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
.org-cell strong { display: block; font-size: 12.8px; font-weight: 700; }
.org-cell small { display: block; font-size: 10.5px; color: var(--ink-3); }

/* ============================ forms / modal / toast ============================ */

.form { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 11px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, .toolbar select {
  width: 100%; height: 38px; padding: 0 11px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 13px; color: var(--ink); outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* در نوار ابزار، منوی انتخاب هم‌ردیف بقیه فیلترها بماند و تمام عرض را نگیرد */
.toolbar select { width: auto; min-width: 170px; flex: 0 0 auto; }
.field textarea { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field-date { position: relative; display: flex; align-items: center; }
.field-date input { padding-inline-end: 54px; direction: ltr; text-align: right; }
.date-now {
  position: absolute; inset-inline-end: 5px; height: 28px; padding: 0 9px;
  border: 0; border-radius: 7px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 10.5px; font-weight: 700; cursor: pointer;
}
.hint { font-size: 10.5px; color: var(--ink-3); }
.form-section-title {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  padding-top: 4px; margin-top: 4px; border-block-start: 1px solid var(--line);
}
.form-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; font-size: 12.5px; cursor: pointer; }
.check-item:hover { background: var(--surface-2); }
.check-item input { accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.check input { accent-color: var(--brand); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-value { font-size: 12px; font-weight: 700; min-width: 44px; text-align: end; }
.add-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.steps { margin: 0; padding-inline-start: 18px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.steps code, .addr-box code { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.addr-box {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--line); margin-bottom: 6px;
}
.addr-box code { direction: ltr; overflow: hidden; text-overflow: ellipsis; }
.addr-box button { border: 0; background: none; color: var(--brand-ink); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.status-line { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 20px;
  background: rgba(16, 18, 40, .48); backdrop-filter: blur(4px);
  animation: fadeIn .16s ease;
}
.modal-card {
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); padding: 20px;
  animation: popIn .18s ease;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 16.5px; font-weight: 800; }
.modal-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

.toast {
  position: fixed; inset-block-end: 22px; inset-inline-start: 50%; transform: translateX(50%);
  z-index: 120; padding: 10px 18px; border-radius: 11px;
  background: #161a30; color: #fff; font-size: 12.5px; font-weight: 500;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5);
  animation: popIn .18s ease;
}
.toast.err { background: #a82828; }
[dir="rtl"] .toast { transform: translateX(50%); }

/* ============================ auth ============================ */

body.is-auth .sidebar,
body.is-auth .topbar,
body.is-auth .mobile-nav { display: none; }
body.is-auth .app-shell { grid-template-columns: 1fr; }

.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-art {
  display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  padding: 46px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #1d1850 0%, #372ba8 55%, #5b4bff 100%);
}
.auth-art::before, .auth-art::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 68%);
}
.auth-art::before { width: 460px; height: 460px; top: -140px; inset-inline-start: -120px; }
.auth-art::after { width: 360px; height: 360px; bottom: -120px; inset-inline-end: -80px; }
.auth-art > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-brand strong { display: block; font-size: 17px; font-weight: 800; }
.auth-brand small { font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.auth-art h2 { font-size: 31px; line-height: 1.45; font-weight: 800; letter-spacing: -.02em; max-width: 18ch; }
.auth-art p { font-size: 13.5px; color: rgba(255, 255, 255, .76); margin-top: 10px; max-width: 46ch; }
.auth-points { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; }
.auth-points span { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.auth-points .ic { color: #b9b2ff; }
.auth-foot { font-size: 11px; color: rgba(255, 255, 255, .55); }
.auth-form-side { display: grid; place-items: center; padding: 30px; }
.auth-card {
  width: min(382px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 30px 28px; box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .sub { font-size: 12.5px; margin-bottom: 18px; }
.auth-card .form { gap: 13px; }
.auth-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 14px; text-align: center; }

/* ============================ notifications ============================ */

.notif-wrap { position: relative; }
.notif-btn { position: relative; background: var(--surface); border: 1px solid var(--line); width: 36px; height: 36px; }
.notif-btn:hover { background: var(--surface-2); }
.notif-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.notif-panel {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-start: auto; inset-inline-end: 0;
  width: min(370px, calc(100vw - 32px)); max-height: 460px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); z-index: 60;
  animation: popIn .15s ease; overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-block-end: 1px solid var(--line);
}
.notif-head strong { font-size: 13px; font-weight: 700; }
.notif-list { overflow-y: auto; max-height: 350px; }
.notif-empty { padding: 30px 16px; text-align: center; font-size: 12px; color: var(--ink-3); }
.notif-item {
  display: flex; gap: 9px; padding: 11px 14px; border: 0; border-block-end: 1px solid var(--line);
  background: none; width: 100%; text-align: start; cursor: pointer; font: inherit;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--brand-faint); }
.notif-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink);
}
.notif-ic.meeting { background: var(--accent-soft); color: #0a6f64; }
.notif-ic.report { background: var(--ok-soft); color: #076b45; }
.notif-body { min-width: 0; flex: 1; }
.notif-body strong { display: block; font-size: 12px; font-weight: 700; }
.notif-body p { font-size: 11.5px; color: var(--ink-2); line-height: 1.65; margin-top: 1px; }
.notif-body small { font-size: 10px; color: var(--ink-3); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; margin-top: 6px; }
.notif-foot { padding: 9px 12px; border-block-start: 1px solid var(--line); display: flex; justify-content: center; }

.offline-note {
  position: fixed; inset-block-end: 14px; inset-inline-end: 14px; z-index: 70;
  padding: 8px 14px; border-radius: 10px; background: #161a30; color: #fff; font-size: 11.5px;
}

/* ============================ responsive ============================ */

/* تنها یک کار فوری: کارت به‌جای نوار کشیده، یک ردیف افقی می‌شود */
@media (min-width: 960px) {
  .focus-grid:has(> .focus-card:only-child) .focus-card {
    display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: stretch;
  }
  .focus-grid:has(> .focus-card:only-child) .focus-hit { grid-column: 1; }
  .focus-grid:has(> .focus-card:only-child) .focus-actions {
    grid-column: 2; grid-row: 1; flex-direction: column;
    border-block-start: 0; border-inline-start: 1px solid var(--line);
  }
  .focus-grid:has(> .focus-card:only-child) .focus-act { flex: 1; font-size: 12px; }
  .focus-grid:has(> .focus-card:only-child) .focus-act + .focus-act {
    border-inline-start: 0; border-block-start: 1px solid var(--line);
  }
  .focus-grid:has(> .focus-card:only-child) .focus-foot { justify-content: flex-start; gap: 16px; }
}

@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  :root { --sidebar-w: 0px; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: 272px; height: 100dvh;
    transform: translateX(100%); transition: transform .22s ease, visibility .22s;
    box-shadow: -18px 0 50px rgba(20, 18, 60, .18);
    background: #fff; visibility: hidden; pointer-events: none;
  }
  body.nav-open .sidebar { transform: translateX(0); visibility: visible; pointer-events: auto; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(16, 18, 40, .4); z-index: 29;
  }
  .topbar { padding: 0 16px; }
  .container { padding: 20px 16px 92px; }
  .today-pill, .user-chip-text { display: none; }
  .user-chip { padding: 4px; border: 0; background: none; }
  .mobile-nav {
    position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 28;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
    border-block-start: 1px solid var(--line);
  }
  .mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; border-radius: 10px; text-decoration: none;
    color: var(--ink-3); font-size: 9.5px; font-weight: 600;
  }
  .mobile-nav a.active { color: var(--brand-ink); background: var(--brand-soft); }
  .mobile-nav .ic { width: 19px; height: 19px; }
  body.is-auth .mobile-nav { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form-side { min-height: 100vh; padding: 20px; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 12px 13px; }
  .metric-value { font-size: 22px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .focus-board { padding: 15px; border-radius: 18px; }
  .focus-grid { grid-template-columns: minmax(0, 1fr); }
  .focus-heading h2 { font-size: 15px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .panel-head { padding: 14px 14px 10px; }
  .panel-body { padding: 0 14px 14px; }
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-event { display: none; }
  .search-field { max-width: none; }
  .toolbar { gap: 8px; }
  .modal-card { padding: 16px; border-radius: 18px; }
  .toast { inset-block-end: 78px; width: calc(100% - 32px); text-align: center; }
  .auth-card { padding: 24px 20px; }
  .notif-panel {
    position: fixed; inset-block-start: calc(var(--topbar-h) + 6px);
    inset-inline: 12px; width: auto; max-height: min(460px, calc(100dvh - 110px));
  }
  .notif-list { max-height: none; flex: 1; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table.data { min-width: 620px; }
}

/* ============================ print ============================ */

@media print {
  .sidebar, .topbar, .mobile-nav, .page-actions, .toolbar, .focus-actions { display: none !important; }
  body { background: #fff; }
  .app-shell { display: block; }
  .panel, .project-card { break-inside: avoid; box-shadow: none; }
}

/* ============================ project header / secondary components ============================ */

.menu-btn { display: none; }
@media (max-width: 960px) { .menu-btn { display: inline-grid; } }

.avatar.avatar-md { width: 34px; height: 34px; font-size: 12px; border-radius: 11px; }
.avatar.avatar-sm { width: 26px; height: 26px; font-size: 9.5px; border-radius: 8px; }

.hero {
  background: linear-gradient(135deg, #221d63 0%, #372ba6 52%, #5b4bff 100%);
  border-radius: var(--radius-xl); padding: 22px 24px; color: #fff;
  position: relative; overflow: hidden; margin-bottom: 18px;
  box-shadow: 0 22px 44px -30px rgba(40, 30, 130, .8);
}
.hero::after {
  content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  inset-block-start: -120px; inset-inline-end: -80px;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
  pointer-events: none;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-main { min-width: 0; flex: 1; }
.hero-main h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.4; }
.hero .desc { font-size: 12.5px; color: rgba(255, 255, 255, .78); margin-top: 6px; max-width: 72ch; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; color: rgba(255, 255, 255, .82); }
.hero-meta .item { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta .ic { width: 14px; height: 14px; opacity: .85; }
.hero-side { flex: 0 0 auto; }
.hero-progress {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16);
}
.hero-progress small { font-size: 10px; color: rgba(255, 255, 255, .72); }
.hero .ring { color: #fff; background: conic-gradient(#b9b2ff calc(var(--val) * 1%), rgba(255, 255, 255, .18) 0); }
.hero .ring::before { background: #2c2485; }
.ring.lg { width: 74px; height: 74px; }
.ring.lg span { font-size: 16px; }
.hero .pill { background: rgba(255, 255, 255, .16); color: #fff; }
.hero-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; position: relative; z-index: 1;
  border-block-start: 1px solid rgba(255, 255, 255, .15);
}
.hero .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .22); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .22); }
.hero .btn.danger { background: rgba(255, 110, 110, .18); border-color: rgba(255, 120, 120, .4); color: #ffd7d7; box-shadow: none; }
.hero .breadcrumb { color: rgba(255, 255, 255, .6); }
.hero + .breadcrumb, .breadcrumb { margin-bottom: 10px; }

.tabs {
  display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px;
  border-block-end: 1px solid var(--line); scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 9px 12px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  border-block-end: 2px solid transparent; margin-block-end: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-ink); border-color: var(--brand); }
.tab .ic { width: 16px; height: 16px; }
.tab .count { font-size: 10px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); border-radius: 99px; padding: 0 6px; }
.tab.active .count { background: var(--brand-soft); color: var(--brand-ink); }

.chart-wrap { position: relative; width: 100%; height: 250px; }
.chart-wrap.tall { height: 330px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.seg button {
  border: 0; background: none; cursor: pointer; border-radius: 8px;
  padding: 5px 11px; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-xs); }

.scope-switch { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--surface-3); }
.scope-switch button {
  border: 0; background: none; cursor: pointer; border-radius: 8px;
  padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
}
.scope-switch button.on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-xs); }

.tl-meeting { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; border-block-end: 1px solid var(--line); }
.tl-meeting:last-child { border-block-end: 0; }
.tm-time { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; }
.tm-main { min-width: 0; flex: 1; }
.tm-main strong { display: block; font-size: 12px; font-weight: 600; }
.tm-main small { font-size: 10px; color: var(--ink-3); }
.tm-mine { font-size: 9.5px; font-weight: 700; color: #0a6f64; background: var(--accent-soft); border-radius: 99px; padding: 0 6px; align-self: center; }
.tl-item { position: relative; }
.tl-dot .ic { width: 12px; height: 12px; }

/* availability block row */
.block-row { display: flex; align-items: center; gap: 6px; font-size: 11px; flex-wrap: wrap; }
.block-row .time { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.block-row .kind { border-radius: 5px; padding: 0 5px; font-size: 9.5px; background: var(--surface-3); color: var(--ink-2); }
.block-row .kind.busy { background: #eef1f7; color: #4b5468; }
.block-row .kind.meeting { background: var(--brand-soft); color: var(--brand-ink); }
.block-row .kind.focus { background: var(--accent-soft); color: #0a6f64; }
.block-row .kind.leave { background: var(--gold-soft); color: #7f5a13; }
.block-row .kind.private { background: var(--danger-soft); color: #a92e2e; }
.block-row .note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 10.5px; }
.block-row .mini-icon { display: inline-flex; gap: 2px; }
.block-row .mini-icon button { border: 0; background: none; padding: 1px; cursor: pointer; color: var(--ink-3); }
.block-row .mini-icon button:hover { color: var(--brand); }
.block-row .mini-icon .ic { width: 13px; height: 13px; }
.avail-day.is-today { border-color: var(--brand); background: var(--brand-faint); }
.avail-add { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px dashed var(--line-strong); background: none; color: var(--brand-ink); border-radius: 8px; padding: 5px; font-size: 11px; cursor: pointer; }
.avail-add:hover { background: var(--brand-soft); border-color: var(--brand); }

/* week table inside panel */
.week { border-collapse: separate; border-spacing: 6px; }
.week th { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-align: center; padding: 4px; }
.week td { vertical-align: top; padding: 8px; }
.week .wday { min-height: 0; }
.week .todayWd { color: var(--brand-ink); }

/* report / history inside timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-day-group { gap: 2px; }
