/* Team workload, steps/history, recurring rules, renewals, monthly report, digest settings. */

/* ---------- Team workload ---------- */
.content.team-content { max-width: none; width: 100%; margin: 0; padding: 26px 32px 40px; overflow: auto; }
.tm { display: grid; gap: 16px; }
.tm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.tm-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.tm-head h1 { margin: 6px 0 4px; font-size: 28px; letter-spacing: -.6px; }
.tm-head p { margin: 0; max-width: 720px; font-size: 13px; color: var(--muted); }
.tm-controls { display: flex; gap: 8px; align-items: center; }
.tm-controls select { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.tm-seg { display: flex; padding: 3px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); }
.tm-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tm-seg button.on { background: var(--soft); color: var(--accent); }
.tm-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tm-summary > div { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; }
.tm-summary strong { font-size: 20px; letter-spacing: -.4px; }
.tm-summary small { font-size: 12px; color: var(--muted); }
.tm-summary .warn strong { color: #ef5b5b; } .tm-summary .warn.soft strong { color: #e0a23a; }
.tm-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.tm-col { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.tm-col.drop { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.tm-col > header { display: flex; align-items: center; gap: 10px; }
.tm-col > header > div { flex: 1; min-width: 0; display: grid; }
.tm-col > header strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-col > header small { font-size: 11.5px; color: var(--muted); }
.tm-col > header > em { font-style: normal; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface2); }
.tm-pool { border-style: dashed; background: color-mix(in srgb, var(--surface2) 40%, var(--surface)); }
.tm-pool-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #e0a23a; background: rgba(224, 162, 58, .14); }
.tm-cap { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
button.tm-cap:hover { color: var(--accent); border-color: var(--accent); }
.tm-meter { display: grid; gap: 5px; }
.tm-bar { position: relative; height: 9px; border-radius: 999px; background: var(--surface2); overflow: hidden; display: flex; }
.tm-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fb380, #1b8a5f); }
.tm-bar b { position: absolute; right: 0; top: 0; height: 100%; background: repeating-linear-gradient(45deg, #ef5b5b 0 6px, #c94141 6px 12px); }
.tm-person.busy .tm-bar i { background: linear-gradient(90deg, #e0a23a, #c98516); }
.tm-person.over .tm-bar i { background: linear-gradient(90deg, #ef6b6b, #c94141); }
.tm-person.over { border-color: rgba(239, 91, 91, .45); }
.tm-meter span { font-size: 12px; color: var(--muted); }
.tm-meter strong { color: var(--ink); font-size: 13px; }
.tm-person.over .tm-meter strong { color: #ef5b5b; } .tm-person.busy .tm-meter strong { color: #e0a23a; }
.tm-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-stats span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: var(--surface2); font-size: 11.5px; font-weight: 700; }
.tm-stats span.late { color: #ef5b5b; } .tm-stats span.muted { color: var(--muted); }
.tm-list { display: grid; gap: 6px; max-height: 360px; overflow: auto; scrollbar-width: thin; }
.tm-task { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: grab; }
.tm-task.locked { cursor: default; }
.tm-task.dragging { opacity: .45; }
.tm-task.late { border-left: 3px solid #ef5b5b; }
.tm-task > button { flex: 1; min-width: 0; display: grid; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tm-task strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-task small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-task-meta { display: grid; justify-items: end; flex: none; }
.tm-task-meta b { font-size: 11px; color: var(--accent); }
.tm-task-meta em { font-style: normal; font-size: 11px; color: var(--muted); }
.tm-task.late .tm-task-meta em { color: #ef5b5b; font-weight: 700; }
.tm-prio { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #e0a23a; }
.tm-prio.high { background: #ef5b5b; } .tm-prio.low { background: #2fb380; }
.tm-empty { margin: 6px 2px; font-size: 12px; color: var(--muted); }
.tm-empty.wide { grid-column: 1 / -1; }

/* ---------- Steps & history (task dialog) ---------- */
.st-box { display: grid; gap: 8px; }
.st-head { display: flex; align-items: center; gap: 10px; }
.st-progress { flex: 1; height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.st-progress i { display: block; height: 100%; background: linear-gradient(90deg, #2fb380, #1b8a5f); transition: width .2s; }
.st-head small { font-size: 12px; font-weight: 700; color: var(--muted); }
.st-list { display: grid; gap: 2px; }
.st-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; }
.st-item:hover { background: var(--surface2); }
.st-item > span { flex: 1; font-size: 13px; }
.st-item.done > span { color: var(--muted); text-decoration: line-through; }
.st-check { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.st-item.done .st-check { color: #2fb380; }
.st-del { border: 0; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; display: grid; place-items: center; }
.st-item:hover .st-del { opacity: 1; } .st-del:hover { color: #d84a4a; }
.st-add { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); }
.st-add input { flex: 1; height: 36px; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; color: var(--ink); font: inherit; font-size: 13px; padding: 0 !important; }
.st-add:focus-within { border-color: var(--accent); border-style: solid; }
.st-empty { margin: 2px 4px; font-size: 12.5px; color: var(--muted); }
.hs-list { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; gap: 10px; border-left: 2px solid var(--line); max-height: 260px; overflow: auto; }
.hs-list li { position: relative; display: flex; gap: 10px; padding-left: 14px; }
.hs-icon { position: absolute; left: -15px; top: 0; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: var(--soft); }
.hs-icon.status { color: #4882e2; } .hs-icon.assign, .hs-icon.claim { color: #2fb380; background: rgba(47, 179, 128, .14); } .hs-icon.unassign { color: #ef5b5b; background: rgba(239, 91, 91, .12); }
.hs-list div { padding-left: 14px; }
.hs-list p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.hs-list time { font-size: 11px; color: var(--muted); }

/* ---------- Board card additions ---------- */
.flow-steps { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-size: 11px; color: var(--muted); }
.flow-steps-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.flow-steps-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2fb380, #1b8a5f); }
.flow-steps b { color: var(--ink); }
.flow-recurring { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 6px; color: #2fb380; background: rgba(47, 179, 128, .14); }

/* ---------- Recurring rules ---------- */
.rc-intro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: rgba(47, 179, 128, .1); color: #2fb380; }
.rc-intro p { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.rc-list { display: grid; gap: 6px; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.rc-row.paused { opacity: .6; }
.rc-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #2fb380; background: rgba(47, 179, 128, .14); }
.rc-text { flex: 1; min-width: 0; display: grid; }
.rc-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-next { display: grid; justify-items: end; font-size: 10.5px; color: var(--muted); flex: none; }
.rc-next b { font-size: 12.5px; color: var(--ink); }

/* ---------- Renewals ---------- */
.rn-list { display: grid; }
.rn-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rn-row:last-child { border-bottom: 0; }
.rn-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--soft); }
.rn-row.urgent .rn-icon, .rn-row.expired .rn-icon { color: #ef5b5b; background: rgba(239, 91, 91, .13); }
.rn-row.soon .rn-icon { color: #e0a23a; background: rgba(224, 162, 58, .14); }
.rn-text { flex: 1; min-width: 0; display: grid; }
.rn-text strong { font-size: 13.5px; }
.rn-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rn-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rn-badge { flex: none; font-style: normal; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; color: #2fb380; background: rgba(47, 179, 128, .14); }
.rn-badge.soon { color: #c98516; background: rgba(224, 162, 58, .16); }
.rn-badge.urgent { color: #ef5b5b; background: rgba(239, 91, 91, .14); }
.rn-badge.expired { color: #fff; background: #c94141; }
.home-row-icon.renewal.urgent, .home-row-icon.renewal.expired { color: #ef5b5b; background: rgba(239, 91, 91, .13); }
.home-row-icon.renewal.soon { color: #e0a23a; background: rgba(224, 162, 58, .14); }
.home-row-icon.renewal { color: #2fb380; background: rgba(47, 179, 128, .14); }
.nb-notice-icon.renewal { color: #e0a23a; background: rgba(224, 162, 58, .14); }

/* ---------- Monthly report ---------- */
.mr-top { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: end; margin-bottom: 14px; }
.mr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mr-stats div { padding: 10px 12px; border-radius: 12px; background: var(--surface2); display: grid; }
.mr-stats strong { font-size: 17px; }
.mr-stats small { font-size: 11.5px; color: var(--muted); }
.mr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mr-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mr-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mr-table td small { display: block; font-size: 11.5px; color: var(--muted); }
.mr-table .num { text-align: right; white-space: nowrap; }
.mr-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mr-people span { display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface2); font-size: 12px; }
.mr-hint { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Settings ---------- */
.setting-note { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.setting-note.warn { color: #e0a23a; }
.option-row button[disabled] { opacity: .5; cursor: not-allowed; }

@media (max-width: 900px) {
  .content.team-content { padding: 18px 16px 30px; }
  .tm-summary { grid-template-columns: repeat(2, 1fr); }
  .mr-top { grid-template-columns: 1fr; }
  .rn-date { display: none; }
}

/* ---------- Board: fixed-height layout, one-line toolbar, columns scroll on their own ---------- */
.content.board-content { overflow: hidden; display: flex; }
.content.board-content .flow-screen { flex: 1; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px clamp(16px, 2vw, 28px) 16px; }
.flow-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); flex: none; }
.flow-bar .flow-search { flex: 1 1 220px; min-width: 180px; max-width: 360px; height: 36px; margin: 0; }
.flow-bar select, .flow-bar .flow-week { height: 36px; max-width: 190px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); font: inherit; font-size: 12.5px; }
.flow-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.flow-chip em { font-style: normal; font-weight: 800; }
.flow-chip.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, #3976d8, #214fa6); }
.flow-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.flow-icon:hover, .flow-chip:hover { border-color: var(--accent); color: var(--accent); }
.flow-icon.on { color: var(--accent); border-color: var(--accent); background: var(--soft); }
.flow-spacer { flex: 1; }
.flow-stats { display: inline-flex; gap: 6px; }
.flow-stats span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 10px; background: var(--surface2); font-size: 12px; color: var(--muted); white-space: nowrap; }
.flow-stats b { font-size: 14px; color: var(--ink); }
.flow-stats .soon b { color: #e0a23a; }
.flow-bar .flow-new { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; }
.content.board-content .flow-columns { flex: 1; min-height: 0; align-items: stretch; overflow-x: auto; overflow-y: hidden; }
.content.board-content .flow-column { min-height: 0; overflow: hidden; }
.content.board-content .flow-card-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 6px 2px; margin-right: -4px; scrollbar-width: thin; }
.content.board-content .flow-column-head, .content.board-content .flow-add { flex: none; }

/* Compact cards: title, people, date and company in a few lines */
.flow-screen.compact .flow-card { padding: 10px 12px; }
.flow-screen.compact .flow-card-title { margin: 4px 0 2px; font-size: 13px; }
.flow-screen.compact .flow-mine-ribbon { margin: -2px 0 6px; padding: 2px 8px; font-size: 10px; }
.flow-screen.compact .flow-card-bottom { margin-top: 6px; padding-top: 6px; }
.flow-screen.compact .flow-claim { margin: 4px 0; }
.flow-firm { display: inline-flex; align-items: center; gap: 5px; max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.flow-firm::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--firm); flex: none; }

@media (max-width: 900px) {
  .content.board-content { overflow: auto; display: block; }
  .content.board-content .flow-screen { height: auto; }
  .content.board-content .flow-columns { overflow: visible; }
  .content.board-content .flow-card-list { overflow: visible; }
  .flow-stats { display: none; }
}
/* ---------- Team workload: tidy header, equal cards ---------- */
.tm { gap: 14px; }
.tm-head { align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.tm-head h1 { margin: 0; font-size: 20px; letter-spacing: -.3px; }
.tm-head small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tm-help { display: inline-grid; color: var(--muted); cursor: help; font-style: normal; }
.tm-kpis { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.tm-kpis span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 11px; border-radius: 10px; background: var(--surface2); font-size: 12px; color: var(--muted); white-space: nowrap; }
.tm-kpis b { font-size: 15px; color: var(--ink); }
.tm-kpis .warn b { color: #ef5b5b; } .tm-kpis .soft b { color: #e0a23a; }
.tm-board { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: stretch; }
.tm-col { min-height: 300px; }
.tm-col .tm-list { flex: 1; max-height: 300px; }
.tm-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; margin: -4px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tm-who:hover { background: var(--surface2); }
.tm-who > span:not(.ch-avatar) { flex: 1; min-width: 0; display: grid; }
.tm-who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-who small { font-size: 11.5px; color: var(--muted); }
.tm-who > svg { color: var(--muted); }
.tm-meter span { display: flex; gap: 6px; align-items: baseline; }

/* ---------- Person detail dialog ---------- */
.pd-profile { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pd-profile h3 { margin: 0; font-size: 19px; }
.pd-profile p { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.pd-contact { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-contact a, .pd-contact span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface2); color: var(--ink); font-size: 12px; text-decoration: none; }
.pd-contact a:hover { color: var(--accent); }
.pd-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px 0; }
.pd-stats > div { display: grid; align-content: start; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.pd-stats b { font-size: 20px; letter-spacing: -.3px; }
.pd-stats small { font-size: 11.5px; color: var(--muted); }
.pd-stats em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pd-stats .tm-bar { margin-top: 6px; }
.pd-stats .warn b { color: #ef5b5b; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.pd-grid h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pd-group + .pd-group { margin-top: 10px; }
.pd-group h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12px; }
.pd-group h4 i { font-style: normal; font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.pd-task { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pd-task:hover { background: var(--surface2); }
.pd-task-text { flex: 1; min-width: 0; display: grid; }
.pd-task-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-task-text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-steps { font-style: normal; font-size: 11px; font-weight: 700; color: #2fb380; }
.pd-due { width: 60px; text-align: right; font-size: 12px; color: var(--muted); }
.pd-due.late { color: #ef5b5b; font-weight: 700; }
.pd-side { display: grid; align-content: start; gap: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.pd-side h3:not(:first-child) { margin-top: 12px; }
.pd-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pd-timeline li { display: flex; gap: 8px; font-size: 12.5px; }
.pd-timeline b { width: 52px; flex: none; color: var(--accent); }
.pd-timeline span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface2); font-size: 12px; }
.pd-chips span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--firm); }
.pd-chips b { color: var(--muted); }
.pd-muted { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .pd-stats { grid-template-columns: repeat(2, 1fr); } .pd-grid { grid-template-columns: 1fr; } .pd-side { padding-left: 0; border-left: 0; } }
.tm-col .tm-list { align-content: start; }

/* Tasks list: status marker (not a checkbox) — ring in the status colour, half-filled while in progress, green tick when done. */
.task-state { position: relative; width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid #8aa0c4; background: transparent; }
.task-state.backlog { border-color: #94a3b8; border-style: dashed; }
.task-state.todo { border-color: #4882e2; }
.task-state.progress { border-color: #2f7de0; }
.task-state.progress i { position: absolute; inset: 2px; border-radius: 50%; background: conic-gradient(#2f7de0 0 50%, transparent 50% 100%); }
.task-state.review { border-color: #8a72f0; background: rgba(138, 114, 240, .18); }
.task-state.done { border-color: #2fb380; background: #2fb380; color: #fff; }
/* Tasks list: own tasks stand out */
.task-table-row.mine { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-bright) 12%, transparent), transparent 55%); box-shadow: inset 3px 0 0 var(--accent-bright); }
.task-mine { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #3976d8, #214fa6); vertical-align: 1px; }
.task-people { display: flex !important; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); }
.task-faces { display: inline-flex; }
.task-faces i { width: 20px; height: 20px; margin-left: -5px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 8.5px; font-weight: 800; color: var(--ink); background: var(--surface2); border: 2px solid var(--surface); }
.task-faces i:first-child { margin-left: 0; }
.task-faces i.me { color: #fff; background: linear-gradient(135deg, #4882e2, #214fa6); }
.task-pool { color: #c98516; font-weight: 700; }
.task-mine-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.task-mine-toggle em { font-style: normal; font-weight: 800; }
.task-mine-toggle.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, #3976d8, #214fa6); }
/* Tasks list: dedicated "Assigned" column */
.table-head, .task-table-row { grid-template-columns: minmax(230px, 2.1fr) minmax(170px, 1.3fr) minmax(130px, 1.1fr) 90px 115px 48px; }
.task-assignees { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ta-person { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--surface2); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-person i { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; background: #64748b; }
.ta-person.me { background: color-mix(in srgb, var(--accent-bright) 18%, transparent); color: var(--accent); }
.ta-person.me i { background: linear-gradient(135deg, #4882e2, #214fa6); }
.ta-more { font-size: 11px; font-weight: 800; color: var(--muted); padding-left: 6px; }
.ta-none { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #c98516; background: rgba(224, 162, 58, .14); }
@media (max-width: 900px) { .task-table-row > .task-assignees { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
/* ======================================================================
   Calendar v2
   ====================================================================== */
.cal2 { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.cal2-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cal2-title h1 { margin: 0 8px 0 0; font-size: 24px; letter-spacing: -.4px; text-transform: capitalize; }
.cal2-spacer { flex: 1; }
.cal-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cal-toggle.on { color: var(--accent); border-color: var(--accent); background: var(--soft); }
.cal-toggle[data-key=mineOnly].on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--mine), var(--mine-2)); }
.cal2-bar .primary { display: inline-flex; align-items: center; gap: 6px; height: 36px; }
.cal2-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--muted); }
.cal2-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal2-legend small { margin-left: auto; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg.mine { background: var(--mine); } .lg.late { background: #ef5b5b; } .lg.done { background: #8aa0c4; opacity: .55; } .lg.note { background: #e0a23a; }
.cal2-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; }
.cal2-main { padding: 12px; min-height: 0; overflow: auto; }
.cal2-side { padding: 16px; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.cal2-side h2 { margin: 0; font-size: 18px; text-transform: capitalize; }
.cal2-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.cal-month2 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(108px, auto); gap: 6px; }
.cal-month2 .cal-weekday { grid-row: auto; align-self: end; }
.cal-cell2 { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface2); cursor: pointer; transition: border-color .12s, background .12s; }
.cal-cell2:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cal-cell2 > b { font-size: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell2.weekend { background: color-mix(in srgb, var(--surface2) 70%, var(--bg)); }
.cal-cell2.outside { opacity: .4; }
.cal-cell2.past > b { color: var(--muted); }
.cal-cell2.today > b { color: #fff; background: var(--accent); }
.cal-cell2.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface2)); }
.cal-cell2.cal-drop, .cal-wday.cal-drop { border-color: var(--mine); border-style: dashed; background: var(--mine-soft); }
.cal-items { display: grid; gap: 3px; min-width: 0; }
.cal-chip2 { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 6px; border: 0; border-left: 3px solid #8aa0c4; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); font: inherit; font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; }
.cal-chip2 span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-chip2 > i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #8aa0c4; }
.cal-chip2.high { border-left-color: #ef5b5b; } .cal-chip2.medium { border-left-color: #e0a23a; } .cal-chip2.low { border-left-color: #2fb380; }
.cal-chip2.progress > i { background: #2f7de0; } .cal-chip2.review > i { background: #8a72f0; } .cal-chip2.todo > i { background: #4882e2; }
.cal-chip2.mine { background: var(--mine-soft); box-shadow: inset 0 0 0 1px var(--mine-line); }
.cal-chip2.late { color: #ef5b5b; background: rgba(239, 91, 91, .12); }
.cal-chip2.done { opacity: .55; } .cal-chip2.done span { text-decoration: line-through; } .cal-chip2.done > i { background: #2fb380; }
.cal-chip2.note { border-left-color: #e0a23a; background: rgba(224, 162, 58, .13); color: var(--ink); }
.cal-chip2.note svg { color: #e0a23a; flex: none; }
.cal-chip2[draggable=true] { cursor: grab; }
.cal-chip2.dragging { opacity: .4; }
.cal-more { align-self: flex-start; padding: 1px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.cal-more:hover { background: var(--soft); }
.cal-week2 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-height: 100%; }
.cal-wday { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); cursor: pointer; }
.cal-wday header { display: flex; align-items: baseline; justify-content: space-between; }
.cal-wday header small { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.cal-wday header b { font-size: 18px; }
.cal-wday.today header b { color: var(--accent); }
.cal-wday.selected { border-color: var(--accent); }
.cal-none { color: var(--muted); font-size: 12px; }
.cal-dayview { display: grid; gap: 10px; max-width: 720px; }
.cal-sec { display: grid; gap: 4px; }
.cal-sec h3 { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cal-sec h3 i { font-style: normal; padding: 0 6px; border-radius: 999px; background: var(--surface2); }
.cal-row2 { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cal-row2:hover { border-color: var(--accent); }
.cal-row2 > span { flex: 1; min-width: 0; display: grid; }
.cal-row2 strong { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-row2 small { font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-row2.mine { border-color: var(--mine-line); background: var(--mine-soft); }
.cal-row2.done strong { text-decoration: line-through; color: var(--muted); }
.cal-row2 .badge { flex: none; font-size: 10.5px; }
.cal-row2 .badge.late { color: #fff; background: #ef5b5b; }
.cal-row2 .mine-badge { flex: none; }
.cal-row2.note svg { color: #e0a23a; flex: none; }
.cal-note-row { display: flex; gap: 6px; }
.cal-note-row input { flex: 1; min-width: 0; }
@media (max-width: 1180px) { .cal2-split { grid-template-columns: 1fr; } .cal2-legend small { display: none; } }
@media (max-width: 900px) {
  .cal2-bar { gap: 6px; } .cal2-title { flex-basis: 100%; } .cal2-spacer { display: none; }
  .cal-month2 { grid-auto-rows: minmax(64px, auto); gap: 3px; }
  .cal-cell2 { padding: 3px; } .cal-chip2 { padding: 2px 3px; font-size: 9.5px; } .cal-chip2 > i { display: none; }
  .cal-week2 { grid-template-columns: 1fr; }
}
.cal-month2 { grid-template-rows: auto; }
.cal-month2 .cal-weekday { padding: 0 6px 2px; }
