@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url("vendor/fonts/Vazirmatn-Regular.cdc140628f11.woff2") format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url("vendor/fonts/Vazirmatn-Medium.dd2193b32cbe.woff2") format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url("vendor/fonts/Vazirmatn-Bold.7958481fe611.woff2") format('woff2'); }

:root {
  --brand: #433c8c;
  --brand-2: #5b52b5;
  --brand-soft: #eeedf8;
  --bg: #f5f5fa;
  --surface: #fff;
  --card-border: #e4e4ee;
  --muted: #6b6f80;
  --ink: #1d1f2b;
  --good: #0a7a0a;
  --warn: #b27500;
  --bad: #c0302f;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --st-todo: #86b6ef; --st-doing: #3987e5; --st-review: #1c5cab; --st-done: #0d366b;
  --bs-body-font-family: Vazirmatn, Tahoma, sans-serif;
  --bs-body-color: var(--ink);
  --bs-primary: #433c8c;
  --bs-primary-rgb: 67, 60, 140;
  --bs-link-color: #433c8c;
  --bs-link-color-rgb: 67, 60, 140;
  --bs-link-hover-color: #5b52b5;
}

body { background: var(--bg); font-family: var(--bs-body-font-family); font-size: .92rem; color: var(--ink); }
input, select, textarea, button, .btn, .form-control { font-family: inherit !important; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2); --bs-btn-active-bg: #352f72; --bs-btn-disabled-bg: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--card-border); }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(91, 82, 181, .15); }

.navbar-pm { background: var(--brand); }
.navbar-pm .navbar-brand { font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: .45rem; }
.navbar-pm .navbar-brand .logo { width: 1.6rem; height: 1.6rem; border-radius: .45rem; background: rgba(255,255,255,.16); display: inline-grid; place-items: center; font-size: .9rem; }
.navbar-pm .nav-link { color: rgba(255,255,255,.82); border-radius: .4rem; padding: .4rem .75rem !important; }
.navbar-pm .nav-link:hover, .navbar-pm .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-search { max-width: 15rem; }
.nav-search .form-control { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.nav-search .form-control::placeholder { color: rgba(255,255,255,.65); }
.nav-search .form-control:focus { background: #fff; color: var(--ink); }
.timer-pill { background: #fff3; color: #fff; border-radius: 99px; padding: .2rem .35rem .2rem .7rem; font-size: .8rem; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; white-space: nowrap; max-width: 17rem; }
.timer-pill:hover { color: #fff; background: #fff4; }
.timer-pill .dot { width: .5rem; height: .5rem; border-radius: 50%; background: #ff8a8a; animation: blink 1.2s infinite; flex: none; }
.timer-pill .t-title { overflow: hidden; text-overflow: ellipsis; }
.timer-pill button { border: 0; background: #fff; color: var(--bad); border-radius: 99px; font-size: .72rem; padding: .05rem .5rem; }
@keyframes blink { 50% { opacity: .3; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 1rem; }
.page-head h1 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .85rem; }

.card { border-color: var(--card-border); border-radius: .75rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom-color: var(--card-border); font-weight: 700; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-radius: .75rem .75rem 0 0 !important; }
.card-header .small { font-weight: 400; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .55rem .7rem; vertical-align: middle; }
.table thead th { color: var(--muted); font-weight: 500; font-size: .8rem; background: #f8f8fc; white-space: nowrap; }
tr.row-link { cursor: pointer; }
.badge { font-weight: 500; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small-2 { font-size: .78rem; }
.fw-500 { font-weight: 500; }

/* status / priority / health */
.status-badge { border: 1px solid transparent; }
.st-todo { background: #eef4fd; color: #1c5cab; border-color: #cfe0f8 !important; }
.st-doing { background: #3987e5; color: #fff; }
.st-review { background: #1c5cab; color: #fff; }
.st-done { background: #0d366b; color: #fff; }
.st-muted { background: #eceef2; color: var(--muted); }
.prio { font-size: .72rem; border-radius: .3rem; padding: .05rem .35rem; white-space: nowrap; font-weight: 500; }
.prio-low { color: var(--muted); background: #f1f2f5; }
.prio-high { color: #9a4a00; background: #fff1e0; }
.prio-urgent { color: #fff; background: var(--bad); }
.health { font-size: .8rem; white-space: nowrap; font-weight: 500; }
.health i { font-style: normal; font-size: .7rem; }
.health-good { color: var(--good); }
.health-warning { color: var(--warn); }
.health-critical { color: var(--bad); }
.health-done { color: #0d366b; }
.health-muted { color: var(--muted); }
.due-late { color: var(--bad); font-weight: 500; }
.due-today { color: var(--warn); font-weight: 500; }

.avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-size: .7rem; font-weight: 700; flex: none; }
.avatar.sm { width: 1.4rem; height: 1.4rem; font-size: .6rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-inline-start: -.45rem; }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }

.bar { height: .45rem; background: #e9e9f3; border-radius: 99px; overflow: hidden; position: relative; }
.bar > span { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }
.bar .plan { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .55; }
.progress-line { display: flex; align-items: center; gap: .5rem; }
.progress-line .bar { flex: 1; }
.progress-line .pct { font-size: .78rem; min-width: 2.6rem; text-align: end; font-variant-numeric: tabular-nums; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; }
.stat { background: #fff; border: 1px solid var(--card-border); border-radius: .7rem; padding: .75rem .9rem; }
.stat .label { color: var(--muted); font-size: .78rem; }
.stat .value { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.stat .hint { color: var(--muted); font-size: .72rem; }
.stat.is-bad .value { color: var(--bad); }
.stat.is-link { text-decoration: none; color: inherit; display: block; }
.stat.is-link:hover { border-color: var(--brand-2); }

/* project header & tabs */
.project-head { background: #fff; border-bottom: 1px solid var(--card-border); }
.project-head .inner { padding-top: 1rem; }
.project-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.project-title h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.project-dot { width: .8rem; height: .8rem; border-radius: .25rem; flex: none; }
.project-meta { color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .3rem; }
.ptabs { display: flex; gap: .15rem; overflow-x: auto; margin-top: .75rem; scrollbar-width: none; }
.ptabs a { padding: .55rem .9rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.ptabs a:hover { color: var(--ink); }
.ptabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* project cards */
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.pcard { background: #fff; border: 1px solid var(--card-border); border-radius: .8rem; padding: .9rem 1rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .55rem; border-top: 3px solid var(--pc, var(--brand)); transition: box-shadow .15s; }
.pcard:hover { box-shadow: 0 4px 16px rgba(16,24,40,.08); color: inherit; }
.pcard .name { font-weight: 700; font-size: 1rem; }
.pcard .meta { color: var(--muted); font-size: .78rem; display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.pcard .counts { display: flex; gap: .9rem; font-size: .78rem; color: var(--muted); }
.pcard .counts b { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1px solid var(--card-border); background: #fff; color: var(--muted); border-radius: 99px; padding: .2rem .75rem; font-size: .8rem; text-decoration: none; }
.chip:hover { border-color: var(--brand-2); color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .x { margin-inline-start: .3rem; opacity: .7; }
.label-tag { font-size: .7rem; border-radius: .3rem; padding: .05rem .4rem; color: #fff; white-space: nowrap; }

/* task list (WBS) */
.wbs td { vertical-align: middle; }
.wbs .phase-row td { background: #f3f2fb; font-weight: 700; color: var(--brand); border-top: 2px solid #e2e0f3; }
.wbs .task-title { display: flex; align-items: center; gap: .35rem; min-width: 14rem; }
.wbs .task-title a { color: var(--ink); text-decoration: none; }
.wbs .task-title a:hover { color: var(--brand); }
.wbs .summary .task-title a { font-weight: 700; }
.wbs .tnum { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; min-width: 2rem; }
.wbs .is-done .task-title a { color: var(--muted); text-decoration: line-through; text-decoration-color: #c5c8d6; }
.wbs .crit { color: var(--bad); font-size: .7rem; }
.wbs .tools { white-space: nowrap; opacity: 0; transition: opacity .1s; }
.wbs tr:hover .tools, .wbs tr:focus-within .tools { opacity: 1; }
@media (hover: none) { .wbs .tools { opacity: 1; } }
.icon-btn { border: 0; background: none; padding: .1rem .3rem; color: var(--muted); border-radius: .3rem; line-height: 1.2; font-size: .85rem; }
.icon-btn:hover { background: #eceaf7; color: var(--brand); }
.inline-select { border: 1px solid transparent; background: transparent; border-radius: .35rem; padding: .1rem .3rem; font-size: .82rem; max-width: 10rem; cursor: pointer; }
.inline-select:hover, .inline-select:focus { border-color: var(--card-border); background: #fff; }
.inline-date { border: 1px solid transparent; background: transparent; border-radius: .35rem; width: 6.6rem; font-size: .8rem; padding: .1rem .3rem; text-align: center; }
.inline-date:hover, .inline-date:focus { border-color: var(--card-border); background: #fff; }
.quick-add { display: flex; gap: .4rem; }
.quick-add input { border: 1px dashed #cfcde4; background: transparent; }
.quick-add input:focus { border-style: solid; background: #fff; }
.mini-progress { width: 4.5rem; display: inline-block; vertical-align: middle; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(15rem, 1fr)); gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.kcol { background: #ececf5; border-radius: .8rem; padding: .6rem; min-height: 8rem; display: flex; flex-direction: column; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: .1rem .3rem .55rem; font-weight: 700; font-size: .88rem; }
.kcol-head .count { background: #fff; border-radius: 99px; padding: 0 .55rem; font-size: .75rem; color: var(--muted); font-weight: 500; }
.kcol-head .swatch { width: .6rem; height: .6rem; border-radius: 2px; display: inline-block; margin-inline-end: .4rem; }
.klist { display: flex; flex-direction: column; gap: .5rem; min-height: 3rem; flex: 1; }
.kcard { background: #fff; border: 1px solid var(--card-border); border-radius: .6rem; padding: .6rem .7rem; cursor: grab; box-shadow: 0 1px 1px rgba(16,24,40,.04); }
.kcard:hover { border-color: #cbc8e6; }
.kcard .ktitle { font-weight: 500; color: var(--ink); text-decoration: none; display: block; margin-bottom: .35rem; line-height: 1.5; }
.kcard .ktitle:hover { color: var(--brand); }
.kcard .kmeta { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .75rem; color: var(--muted); flex-wrap: wrap; }
.kcard .kmeta .icons { display: flex; gap: .55rem; }
.kcard .kparent { font-size: .7rem; color: var(--muted); margin-bottom: .15rem; }
.kcard.sortable-ghost { opacity: .35; }
.kcard.sortable-chosen { box-shadow: 0 8px 24px rgba(16,24,40,.16); }
.kcol .quick-add input { font-size: .82rem; }
.kcol.drop-hint { outline: 2px dashed var(--brand-2); outline-offset: -2px; }

/* task page */
.task-head h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.side-props dt { color: var(--muted); font-weight: 400; font-size: .78rem; margin-bottom: .15rem; }
.side-props dd { margin-bottom: .8rem; }
.status-switch { display: flex; flex-wrap: wrap; gap: .3rem; }
.status-switch button { border: 1px solid var(--card-border); background: #fff; border-radius: 99px; padding: .2rem .75rem; font-size: .8rem; }
.status-switch button.on { border-color: transparent; }
.status-switch button.on.s-todo { background: #eef4fd; color: #1c5cab; border-color: #cfe0f8; }
.status-switch button.on.s-doing { background: #3987e5; color: #fff; }
.status-switch button.on.s-review { background: #1c5cab; color: #fff; }
.status-switch button.on.s-done { background: #0d366b; color: #fff; }
.desc { white-space: pre-wrap; line-height: 1.85; }
.checklist .item { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed #ececf4; }
.checklist .item.done .txt { color: var(--muted); text-decoration: line-through; }
.checklist .item .icon-btn { margin-inline-start: auto; visibility: hidden; }
.checklist .item:hover .icon-btn { visibility: visible; }
.comment { display: flex; gap: .65rem; margin-bottom: 1rem; }
.comment .bubble { background: #f6f6fb; border: 1px solid #ecebf5; border-radius: .2rem .8rem .8rem .8rem; padding: .55rem .8rem; flex: 1; }
.comment .who { font-size: .8rem; font-weight: 700; }
.comment .when { font-size: .72rem; color: var(--muted); }
.comment .text { white-space: pre-wrap; margin-top: .2rem; line-height: 1.8; }
.comment .mention { color: var(--brand); font-weight: 500; }
.file-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #f0f0f5; }
.file-ext { width: 2.3rem; height: 2.3rem; border-radius: .45rem; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; flex: none; }
.dropzone { border: 1.5px dashed #cfcde4; border-radius: .6rem; padding: .8rem; text-align: center; color: var(--muted); font-size: .82rem; cursor: pointer; }
.dropzone.over { border-color: var(--brand-2); background: var(--brand-soft); }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { padding: .4rem 0; border-bottom: 1px solid #f1f1f6; font-size: .83rem; }
.activity-list .when { color: var(--muted); font-size: .72rem; }
.mention-menu { position: absolute; z-index: 1050; background: #fff; border: 1px solid var(--card-border); border-radius: .5rem; box-shadow: 0 8px 24px rgba(16,24,40,.12); max-height: 14rem; overflow: auto; min-width: 12rem; }
.mention-menu button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: .35rem .7rem; font-size: .83rem; }
.mention-menu button.on, .mention-menu button:hover { background: var(--brand-soft); }

/* gantt */
.gantt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.gantt-toolbar .btn-group .btn { font-size: .8rem; }
.gantt-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .75rem; color: var(--muted); align-items: center; }
.gantt-legend .sw { display: inline-block; width: 1.1rem; height: .55rem; border-radius: 2px; vertical-align: middle; margin-inline-end: .3rem; }
.gantt { display: flex; border: 1px solid var(--card-border); border-radius: .75rem; background: #fff; overflow: hidden; height: calc(100vh - 17rem); min-height: 26rem; position: relative; user-select: none; }
.g-left { flex: none; width: 24rem; border-inline-end: 1px solid var(--card-border); display: flex; flex-direction: column; background: #fff; z-index: 2; }
.g-right { flex: 1; overflow: auto; position: relative; }
.g-head { height: 56px; flex: none; border-bottom: 1px solid var(--card-border); background: #fafafd; }
.g-left .g-head { display: grid; grid-template-columns: 1fr 5.5rem 3.3rem; align-items: end; padding: 0 .6rem .4rem; font-size: .75rem; color: var(--muted); }
.g-left-body { overflow: hidden; flex: 1; }
.g-row { height: 34px; display: grid; grid-template-columns: 1fr 5.5rem 3.3rem; align-items: center; padding: 0 .6rem; border-bottom: 1px solid #f3f3f8; font-size: .8rem; gap: .3rem; }
.g-row.phase { background: #f6f5fc; font-weight: 700; color: var(--brand); }
.g-row.summary { font-weight: 700; }
.g-row .gt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .3rem; }
.g-row .gt a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.g-row .gt a:hover { color: var(--brand); }
.g-row .gn { color: var(--muted); font-size: .7rem; font-weight: 400; }
.g-row .ga { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-row .gp { font-size: .72rem; text-align: end; font-variant-numeric: tabular-nums; }
.g-row.hl, .g-bar-row.hl { background: #f0eefc; }
.g-toggle { border: 0; background: none; padding: 0; width: 1rem; color: var(--muted); font-size: .7rem; flex: none; }
.g-timeline-head { position: sticky; top: 0; z-index: 3; background: #fafafd; }
.g-scale { display: flex; height: 28px; border-bottom: 1px solid #ececf3; }
.g-scale div { flex: none; font-size: .72rem; color: var(--muted); border-inline-start: 1px solid #ececf3; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; }
.g-scale.top div { font-weight: 700; color: var(--ink); justify-content: flex-start; padding-inline-start: .4rem; }
.g-scale div.fri { background: #f6f3ee; }
.g-scale.top div { overflow: visible; }
.g-scale.top div span { position: sticky; right: .4rem; }
.g-scale div.today { background: var(--brand); color: #fff; border-radius: .3rem; }
.g-canvas { position: relative; }
.g-grid { position: absolute; inset: 0; pointer-events: none; }
.g-grid .col { position: absolute; top: 0; bottom: 0; border-inline-start: 1px solid #f3f3f8; }
.g-grid .col.fri { background: #fbf9f5; }
.g-grid .today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); opacity: .7; z-index: 1; }
.g-bar-row { height: 34px; border-bottom: 1px solid #f3f3f8; position: relative; }
.g-bar { position: absolute; top: 7px; height: 20px; border-radius: .35rem; background: #c9c5ec; cursor: grab; z-index: 2; display: flex; align-items: center; }
.g-bar .fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--brand-2); border-radius: .35rem; pointer-events: none; }
.g-bar .lbl { position: absolute; inset-inline-start: calc(100% + .4rem); white-space: nowrap; font-size: .72rem; color: var(--muted); pointer-events: none; }
.g-bar .h { position: absolute; top: 0; bottom: 0; width: .55rem; cursor: ew-resize; z-index: 3; }
.g-bar .h.s { inset-inline-start: -.15rem; }
.g-bar .h.e { inset-inline-end: -.15rem; }
.g-bar .link { position: absolute; top: 50%; inset-inline-end: -.85rem; width: .7rem; height: .7rem; margin-top: -.35rem; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2); cursor: crosshair; opacity: 0; z-index: 4; }
.g-bar:hover .link, .g-bar .link.on { opacity: 1; }
.g-bar.done { background: #b9c6dd; }
.g-bar.done .fill { background: #0d366b; }
.g-bar.late { box-shadow: 0 0 0 2px var(--bad); }
.g-bar.critical { background: #f6c9c9; }
.g-bar.critical .fill { background: #c0302f; }
.g-bar.summary { height: 9px; top: 12px; border-radius: 0; background: var(--ink); cursor: grab; }
.g-bar.summary .fill { display: none; }
.g-bar.summary::before, .g-bar.summary::after { content: ''; position: absolute; bottom: -.35rem; border: .35rem solid transparent; border-top-color: var(--ink); }
.g-bar.summary::before { inset-inline-start: 0; border-inline-start-color: var(--ink); }
.g-bar.summary::after { inset-inline-end: 0; border-inline-end-color: var(--ink); }
.g-bar.phase { height: 8px; top: 13px; background: var(--brand); border-radius: 99px; cursor: default; opacity: .8; }
.g-bar.phase .fill { display: none; }
.g-bar.milestone { width: 16px !important; height: 16px; top: 9px; transform: rotate(45deg); border-radius: 2px; background: #eda100; margin-inline-start: -8px; }
.g-bar.milestone.done { background: #0d366b; }
.g-bar.milestone .lbl { transform: rotate(-45deg); inset-inline-start: 1.3rem; top: .35rem; }
.g-bar.ro { cursor: default; }
.g-bar.dragging { opacity: .85; z-index: 5; box-shadow: 0 4px 14px rgba(16,24,40,.25); }
.g-svg { position: absolute; top: 0; inset-inline-start: 0; pointer-events: none; z-index: 1; overflow: visible; }
.g-svg path.dep { fill: none; stroke: #8f8ab8; stroke-width: 1.4; }
.g-svg path.dep.crit { stroke: #c0302f; }
.g-svg path.hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; }
.g-svg path.hit:hover + path.dep, .g-svg path.dep.sel { stroke: var(--brand); stroke-width: 2.4; }
.g-svg path.temp { fill: none; stroke: var(--brand-2); stroke-width: 2; stroke-dasharray: 4 3; }
.g-tip { position: fixed; z-index: 1080; background: #1d1f2b; color: #fff; padding: .45rem .65rem; border-radius: .45rem; font-size: .76rem; pointer-events: none; max-width: 18rem; line-height: 1.7; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.g-tip b { font-weight: 700; }
.g-tip .k { color: #b8bacb; }
.g-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 2rem; z-index: 4; pointer-events: none; }
@media (max-width: 767.98px) {
  .g-left { width: 11rem; }
  .g-left .g-head, .g-row { grid-template-columns: 1fr; }
  .g-row .ga, .g-row .gp, .g-left .g-head span:not(:first-child) { display: none; }
  .gantt { height: calc(100vh - 14rem); }
}

/* timesheet */
.ts-table td, .ts-table th { text-align: center; white-space: nowrap; }
.ts-table td.tname, .ts-table th.tname { text-align: start; white-space: normal; min-width: 14rem; }
.ts-cell { width: 4.2rem; text-align: center; border: 1px solid transparent; border-radius: .35rem; padding: .2rem; background: transparent; font-variant-numeric: tabular-nums; }
.ts-cell:hover { border-color: var(--card-border); }
.ts-cell:focus { border-color: var(--brand-2); background: #fff; outline: none; }
.ts-cell.has { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.ts-cell.saved { animation: saved 1s; }
@keyframes saved { from { background: #d6f5dd; } }
.ts-table .fri { background: #fbf9f5; }
.ts-table tfoot td, .ts-table tfoot th { font-weight: 700; background: #f8f8fc; }

/* reports */
.viz-root { --surface-1: #fcfcfb; --text-primary: #0b0b0b; --text-secondary: #52514e; --muted-ink: #898781; --grid: #e1e0d9; --axis: #c3c2b7; }
.viz-card .card-body { background: var(--surface-1); border-radius: 0 0 .75rem .75rem; }
.viz-card canvas { width: 100% !important; }
.viz-wrap { position: relative; height: 16rem; }
.viz-wrap.tall { height: 20rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: .75rem; padding: .6rem .8rem; margin-bottom: 1rem; position: sticky; top: 0; z-index: 10; }
.filter-bar .form-select, .filter-bar .form-control { width: auto; font-size: .82rem; }
.xf-chips:empty { display: none; }
.xf-chip { background: var(--brand); color: #fff; border: 0; border-radius: 99px; padding: .15rem .7rem; font-size: .78rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .76rem; color: var(--text-secondary, var(--muted)); margin-bottom: .4rem; }
.legend .sw { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-inline-end: .3rem; vertical-align: -1px; }
.legend .sw.line { height: 2px; vertical-align: 3px; width: 1rem; }
.legend .sw.dash { height: 0; border-top: 2px dashed currentColor; background: none !important; width: 1rem; vertical-align: 3px; }
.viz-table { font-size: .8rem; }
.pivot th, .pivot td { white-space: nowrap; }
.pivot thead th { position: sticky; top: 0; }
.pivot tbody th { background: #fff; position: sticky; inset-inline-start: 0; font-weight: 500; }
.pivot .total { background: #f3f3f9 !important; font-weight: 700; }
.pivot tfoot th, .pivot tfoot td { border-top: 2px solid var(--card-border); }
.pivot td.cell { position: relative; }
.pivot td.cell .heat { position: absolute; inset: 2px; border-radius: 3px; background: #2a78d6; z-index: 0; }
.pivot td.cell span { position: relative; z-index: 1; }
.report-sentence { font-size: .95rem; line-height: 2.6; }
.report-sentence .form-select { display: inline-block; width: auto; font-size: .9rem; }
.report-sentence .step { display: inline-flex; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .75rem; align-items: center; justify-content: center; }
.preset { display: block; background: #fff; border: 1px solid var(--card-border); border-radius: .6rem; padding: .45rem .8rem; text-decoration: none; color: inherit; font-size: .82rem; }
.preset:hover { border-color: var(--brand-2); color: var(--brand); }
.filter-menu { max-height: 320px; overflow-y: auto; min-width: 14rem; }

/* templates */
.tpl-card { background: #fff; border: 1px solid var(--card-border); border-radius: .8rem; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; height: 100%; }
.tpl-card .name { font-weight: 700; }
.tpl-steps { counter-reset: step; }

/* home */
.bucket-title { font-size: .8rem; font-weight: 700; color: var(--muted); margin: .9rem 0 .35rem; display: flex; align-items: center; gap: .4rem; }
.bucket-title.late { color: var(--bad); }
.task-line { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; border-bottom: 1px solid #f1f1f6; }
.task-line:last-child { border-bottom: 0; }
.task-line .t { flex: 1; min-width: 0; }
.task-line .t a { color: var(--ink); text-decoration: none; font-weight: 500; }
.task-line .t a:hover { color: var(--brand); }
.task-line .t .sub { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-btn { width: 1.15rem; height: 1.15rem; border: 1.5px solid #a9a6cf; border-radius: .3rem; background: #fff; flex: none; padding: 0; color: #fff; font-size: .7rem; line-height: 1; }
.check-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.check-btn.on { background: var(--brand); border-color: var(--brand); }

.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }
.form-text { font-size: .76rem; }
.errorlist { list-style: none; padding: 0; margin: .25rem 0 0; color: var(--bad); font-size: .8rem; }
.section-title { font-weight: 700; font-size: .95rem; color: var(--brand); margin: .25rem 0 .75rem; }
.empty-state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty-state .big { font-size: 2rem; margin-bottom: .4rem; }

.bell-count { position: absolute; top: 2px; inset-inline-end: -2px; font-size: .62rem; }
.bell-menu { width: 22rem; max-width: calc(100vw - 32px); }
.bell-list { max-height: 60vh; overflow-y: auto; }
.bell-item { white-space: normal; border-bottom: 1px solid var(--card-border); padding: .5rem .85rem; font-size: .83rem; display: block; color: inherit; text-decoration: none; }
.bell-item:hover { background: #f6f6fb; }
.bell-item.unread { background: #f4f3fd; border-inline-start: 3px solid var(--brand-2); }
.bell-item .when { color: var(--muted); font-size: .72rem; }
.toast-zone { position: fixed; bottom: 1rem; inset-inline-start: 1rem; z-index: 1100; display: flex; flex-direction: column; gap: .5rem; }
.toast-zone .tz { background: #1d1f2b; color: #fff; padding: .55rem .9rem; border-radius: .5rem; font-size: .84rem; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 22rem; }
.toast-zone .tz.err { background: var(--bad); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(160deg, #433c8c 0%, #2b2766 100%); }
.login-card { width: 100%; max-width: 380px; }

@media (max-width: 575.98px) {
  .page-head h1 { font-size: 1.1rem; }
  .kanban { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; }
}
@media print {
  .navbar, .no-print, .messages, .ptabs { display: none !important; }
  body { background: #fff; }
  .card { border: none; box-shadow: none; }
}
