:root {
  --sidebar-w: 250px;
  --brand: #1e3a5f;
  --brand-2: #274b78;
  --bs-body-font-family: "Kantumruy Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-bg: #f4f6fa;
}

html { font-size: 15px; }
body { background: var(--bs-body-bg); line-height: 1.65; }

/* ---------- sidebar / layout ---------- */
.sidebar { background: var(--brand) !important; color: #fff; }
.sidebar .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.sidebar .nav-link,
.sidebar button.nav-link { color: rgba(255,255,255,.8); border-radius: .5rem; padding: .55rem .85rem; margin-bottom: 2px; background: none; border: 0; display: flex; gap: .6rem; align-items: center; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { color: #fff; background: var(--brand-2); font-weight: 600; }
.sidebar .nav-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.5); margin: 1rem .85rem .35rem; }
.sidebar .offcanvas-body { display: flex; padding: .75rem; }

@media (min-width: 992px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w); overflow-y: auto; display: flex; flex-direction: column; }
  .sidebar .offcanvas-header { display: flex !important; padding: 1.25rem 1.1rem .5rem; }
  .has-sidebar .content { margin-left: var(--sidebar-w); padding: 1.75rem 2rem; }
}
@media (max-width: 991.98px) {
  .sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--brand); --bs-offcanvas-color: #fff; }
  .has-sidebar .content { padding: 1rem; padding-top: calc(56px + 1rem); }
}

.topbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 1030; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* ---------- components ---------- */
.page-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.card { border: 0; border-radius: .75rem; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: .75rem .75rem 0 0 !important; }

.stat-card { padding: 1rem 1.15rem; display: flex; flex-direction: row; align-items: center; gap: .9rem; }
.stat-card .icon { width: 46px; height: 46px; border-radius: .7rem; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .label { color: #6c757d; font-size: .88rem; }

.status-badge { background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 80%, black); border: 1px solid color-mix(in srgb, var(--c) 35%, white); font-weight: 600; padding: .35em .7em; }
.color-dot { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; vertical-align: middle; }

.table > :not(caption) > * > * { padding: .7rem .75rem; vertical-align: middle; }
.table thead th { font-size: .85rem; color: #6c757d; font-weight: 600; background: #f8f9fb; white-space: nowrap; }
.table-report td.num, .table-report th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-report tfoot td { font-weight: 700; background: #f1f3f7; }

.form-label { font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: .5rem; }
.btn { border-radius: .5rem; }

/* Mobile cards list */
.case-card { display: block; color: inherit; text-decoration: none; padding: .9rem 1rem; border-bottom: 1px solid #eef0f4; }
.case-card:last-child { border-bottom: 0; }
.case-card:active { background: #f4f6fa; }
.case-card .meta { color: #6c757d; font-size: .85rem; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.5rem; border-left: 2px solid #e3e7ee; margin-left: .4rem; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #0d6efd); border: 2px solid #fff; box-shadow: 0 0 0 1px #d0d6e0; }

.filter-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
.chart-box { position: relative; height: 300px; }

@media (max-width: 575.98px) {
  .page-header h1 { font-size: 1.2rem; }
  .btn-mobile-block { width: 100%; }
  .stat-card .value { font-size: 1.35rem; }
}

@media print {
  .sidebar, .topbar, .no-print, .alert { display: none !important; }
  .has-sidebar .content { margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none; }
  body { background: #fff; }
}

/* ---------- login ---------- */
.auth-page { min-height: 100vh; background: linear-gradient(160deg, var(--brand) 0%, #2d5a8c 100%); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 16px; }
.auth-brand { color: #fff; text-align: center; margin-bottom: 1.25rem; }
.auth-logo { width: 64px; height: 64px; border-radius: 1rem; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 2rem; margin: 0 auto .75rem; }
.auth-card { width: 100%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* ---------- appointments ---------- */
.appt-item { display: flex; gap: .9rem; padding: .8rem 1rem; border-bottom: 1px solid #eef0f4; border-left: 4px solid var(--c); }
.appt-item:last-child { border-bottom: 0; }
.appt-time { width: 52px; flex-shrink: 0; text-align: center; }
.min-w-0 { min-width: 0; }
.appt-date-box { width: 68px; text-align: center; border-radius: .6rem; background: #eef3fb; color: var(--brand); padding: .45rem 0; flex-shrink: 0; }

/* ---------- documents ---------- */
.upload-drop { border: 2px dashed #c5cfdd; border-radius: .75rem; padding: 1.1rem; text-align: center; background: #fff; transition: .15s; }
.upload-drop.drag { border-color: #0d6efd; background: #eef4ff; }
.doc-item { display: flex; gap: .85rem; padding: .75rem 1rem; border-bottom: 1px solid #eef0f4; align-items: center; }
.doc-item:last-child { border-bottom: 0; }
.doc-thumb { width: 52px; height: 52px; border-radius: .5rem; background: #f1f4f9; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: 1.7rem; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 575.98px) {
  .doc-item { flex-wrap: wrap; }
  .doc-item > .flex-grow-1 { flex-basis: calc(100% - 52px - .85rem); }
  .doc-item > .d-flex { width: 100%; justify-content: flex-end; }
}

/* ---------- parties ---------- */
.party-row { border: 1px solid #e3e7ee; border-radius: .6rem; padding: .75rem; margin-bottom: .75rem; background: #fbfcfe; }
.party-row:last-child { margin-bottom: 0; }
#parties:empty::before { content: "មិនទាន់មានភាគី — ចុចប៊ូតុងខាងក្រោមដើម្បីបន្ថែម"; color: #6c757d; font-size: .9rem; }
.party-view { padding: .5rem 1rem .6rem 2.1rem; border-bottom: 1px solid #f0f2f6; }
.party-view:last-child { border-bottom: 0; }

/* =====================================================================
   Responsive system-wide
   ===================================================================== */
img, svg, video, canvas { max-width: 100%; height: auto; }
body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
.content { min-height: 100vh; }

/* Large screens: cap reading width so lines don't stretch on ultrawide */
@media (min-width: 1600px) {
  .has-sidebar .content { padding-left: max(2rem, calc((100vw - var(--sidebar-w) - 1440px) / 2)); padding-right: max(2rem, calc((100vw - var(--sidebar-w) - 1440px) / 2)); }
}

/* Topbar respects iPhone notch / home bar */
.topbar { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.topbar > span { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .75rem; }
@media (max-width: 991.98px) {
  .has-sidebar .content { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

/* Page header actions wrap instead of overflowing */
.page-header > div:first-child { flex: 1 1 260px; }
.page-header > .d-flex,
.page-header > div:last-child:not(:first-child) { flex-wrap: wrap; }
.page-header h1 { overflow-wrap: anywhere; }

/* Card headers with actions wrap on narrow widths */
.card-header.d-flex { flex-wrap: wrap; gap: .5rem; }

/* Horizontal scroll pills: hide scrollbar, keep swipe */
.nav-pills.overflow-auto { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav-pills.overflow-auto::-webkit-scrollbar { display: none; }

/* Fluid width forms (replace inline max-width) */
.form-narrow { max-width: 480px; width: 100%; }
.form-medium { max-width: 560px; width: 100%; }
.form-wide   { max-width: 720px; width: 100%; }

/* Stack list rows: text + amount, wraps on phones */
.list-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; padding: .55rem 1rem; border-bottom: 1px solid #eef0f4; }
.list-row:last-child { border-bottom: 0; }
.list-row > :first-child { flex: 1 1 200px; }

/* Long words (emails, file names, IDs) never break the layout */
.text-break-any, .doc-item, .case-card, .list-row, .table-stack td { overflow-wrap: anywhere; }

/* ---------- table → cards on phones: <table class="table table-stack"> ---------- */
@media (max-width: 767.98px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tfoot, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .6rem .9rem; border-bottom: 1px solid #eef0f4; }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack > :not(caption) > * > * { padding: .15rem 0; border: 0; box-shadow: none !important; background: transparent; }
  .table-stack td { display: flex; justify-content: space-between; gap: 1rem; text-align: right !important; }
  .table-stack td::before { content: attr(data-label); color: #6c757d; font-size: .82rem; text-align: left; flex-shrink: 0; max-width: 45%; }
  .table-stack td:not([data-label])::before, .table-stack td[data-label=""]::before { display: none; }
  .table-stack td:not([data-label]), .table-stack td[data-label=""] { justify-content: flex-start; text-align: left !important; }
  .table-stack td[colspan] { justify-content: center; text-align: center !important; }
  .table-stack td.text-nowrap { white-space: normal !important; }
  .table-stack tfoot tr { background: #f1f3f7; }
}

/* ---------- phones ---------- */
@media (max-width: 575.98px) {
  /* 16px inputs stop iOS Safari from zooming on focus */
  .form-control, .form-select, .input-group-text { font-size: 16px; }
  .form-control-sm, .form-select-sm { font-size: 16px; }
  .has-sidebar .content { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: .9rem; }
  .card-header { padding: .65rem .9rem; }
  .card-footer { display: flex; flex-wrap: wrap; gap: .5rem; }
  .card-footer > .btn, .form-actions > .btn { flex: 1 1 auto; }
  .page-header > .d-flex > .btn, .page-header > .d-flex > a.btn { flex: 1 1 auto; }
  .modal-dialog { margin: .5rem; }
  .chart-box { height: 240px; }
  .appt-date-box { width: 56px; }
  .table > :not(caption) > * > * { padding: .55rem .5rem; }
  .btn-touch, .table .btn-sm { min-height: 36px; }
}

/* Coarse pointers (touch): comfortable hit targets */
@media (pointer: coarse) {
  .sidebar .nav-link { padding-top: .7rem; padding-bottom: .7rem; }
  .dropdown-item { padding-top: .6rem; padding-bottom: .6rem; }
}

/* Date column beside list items */
.date-col { width: 96px; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .date-col { width: 78px; font-size: .78rem; padding-left: .6rem !important; padding-right: .4rem !important; }
}
/* Very small phones: stat cards stack icon over value */
@media (max-width: 399.98px) {
  .stat-card { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .85rem; }
  .stat-card .icon { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* =====================================================================
   Dashboard (phase 1)
   ===================================================================== */
.dash-hero { background: linear-gradient(135deg, var(--brand) 0%, #2d5a8c 100%); color: #fff; border-radius: .9rem; padding: 1.25rem 1.4rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); grid-template-areas: "hello search" "actions actions"; gap: 1rem 1.5rem; align-items: center;
  box-shadow: 0 4px 14px rgba(30, 58, 95, .18); }
.dash-hello { grid-area: hello; min-width: 0; }
.dash-hello h1 { font-size: 1.4rem; font-weight: 700; margin: .1rem 0 0; overflow-wrap: anywhere; }
.dash-date { color: rgba(255,255,255,.72); }
.dash-search { grid-area: search; position: relative; display: flex; gap: .5rem; }
.dash-search > .bi-search { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #6c757d; pointer-events: none; }
.dash-search .form-control { padding-left: 2.3rem; border: 0; height: 44px; border-radius: .6rem; }
.dash-search .btn { border-radius: .6rem; white-space: nowrap; }
.dash-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-actions .btn { border-radius: .6rem; }
.dash-actions .btn-light { color: var(--brand); font-weight: 600; }
@media (max-width: 991.98px) {
  .dash-hero { grid-template-columns: 1fr; grid-template-areas: "hello" "search" "actions"; padding: 1rem; }
  .dash-hello h1 { font-size: 1.2rem; }
}
@media (max-width: 575.98px) {
  .dash-search .btn { display: none; }
  .dash-actions .btn { flex: 1 1 auto; font-size: .88rem; padding-left: .5rem; padding-right: .5rem; }
}

/* attention tiles */
.attn-tile { --tone: #0d6efd; --tone-bg: #eef4ff; display: flex; gap: .85rem; align-items: flex-start; height: 100%; padding: 1rem 1.1rem; border-radius: .8rem;
  background: #fff; color: inherit; text-decoration: none; border: 1px solid #e7ebf2; border-left: 4px solid var(--tone); box-shadow: 0 1px 3px rgba(16,24,40,.06);
  transition: transform .12s ease, box-shadow .12s ease; }
.attn-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.1); color: inherit; }
.attn-tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--tone) 45%, transparent); outline-offset: 2px; }
.attn-icon { width: 42px; height: 42px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.25rem; background: var(--tone-bg); color: var(--tone); flex-shrink: 0; }
.attn-body { min-width: 0; }
.attn-value { font-size: 1.55rem; font-weight: 700; line-height: 1.15; color: var(--tone); }
.attn-money-value { font-size: 1.3rem; }
.attn-label { font-weight: 600; font-size: .92rem; }
.attn-sub { color: #6c757d; font-size: .8rem; }
.attn-danger { --tone: #dc3545; --tone-bg: #fdecee; }
.attn-warn   { --tone: #d97706; --tone-bg: #fff4e0; }
.attn-info   { --tone: #0d6efd; --tone-bg: #eef4ff; }
.attn-money  { --tone: #7c3aed; --tone-bg: #f3edff; }
.attn-ok     { --tone: #198754; --tone-bg: #e8f6ee; }
.attn-ok .attn-value { font-size: 1.2rem; }
@media (max-width: 575.98px) {
  .attn-tile { flex-direction: column; gap: .5rem; padding: .85rem; }
  .attn-icon { width: 36px; height: 36px; font-size: 1.05rem; }
  .attn-value { font-size: 1.3rem; } .attn-money-value { font-size: 1.05rem; }
}

/* agenda */
.agenda { display: flex; flex-direction: column; }
.agenda-day { display: flex; gap: .4rem; align-items: center; padding: .45rem 1rem; font-size: .82rem; font-weight: 700; color: #475569; background: #f8f9fb;
  border-top: 1px solid #eef0f4; border-bottom: 1px solid #eef0f4; position: sticky; top: 0; z-index: 1; }
.agenda-day:first-child { border-top: 0; }
.agenda-day.is-today { color: var(--brand); background: #eef3fb; }
.agenda-day.is-overdue { color: #b42318; background: #fdecee; }
.agenda-item { display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; color: inherit; text-decoration: none; border-bottom: 1px solid #f1f3f7; }
.agenda-item:hover { background: #f8fafc; color: inherit; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item.is-overdue { background: #fffafa; }
.agenda-time { width: 3.1rem; flex-shrink: 0; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .9rem; color: #334155; }
.agenda-kind { width: 34px; height: 34px; border-radius: .55rem; display: grid; place-items: center; flex-shrink: 0; font-size: 1rem; }
.kind-hearing  { background: #eef3fb; color: var(--brand); }
.kind-deadline { background: #fff4e0; color: #b45309; }
.kind-appt     { background: #e8f6ee; color: #15803d; }
.agenda-main { flex: 1; }
.agenda-title { font-weight: 600; }
.agenda-meta { color: #6c757d; font-size: .8rem; }
.agenda-meta span + span { margin-left: .2rem; }
.agenda-badge { flex-shrink: 0; font-weight: 600; }
@media (min-width: 1200px) { .agenda { max-height: 560px; overflow-y: auto; } }
@media (max-width: 575.98px) {
  .agenda-item { gap: .6rem; padding: .6rem .75rem; align-items: flex-start; flex-wrap: wrap; }
  .agenda-time { width: 2.7rem; font-size: .82rem; padding-top: .45rem; }
  .agenda-kind { width: 30px; height: 30px; font-size: .9rem; }
  .agenda-main { flex-basis: calc(100% - 2.7rem - 30px - 1.2rem); }
  .agenda-badge { margin-left: calc(2.7rem + 30px + 1.2rem); }
  .agenda-title { white-space: normal !important; }
}
.dash-empty > .bi { font-size: 2.4rem; color: #94a3b8; }

/* stages */
.stage-row { display: flex; gap: .75rem; align-items: center; padding: .45rem .35rem; margin: 0 -.35rem; border-radius: .5rem; color: inherit; text-decoration: none; }
.stage-row:hover { background: #f4f6fa; color: inherit; }
.stage-row.is-empty { opacity: .55; }
.stage-row + .stage-row { margin-top: .2rem; }
.stage-icon { width: 30px; height: 30px; border-radius: .5rem; display: grid; place-items: center; background: #eef3fb; color: var(--brand); flex-shrink: 0; }
.stage-bar { height: 7px; background: #eef0f4; border-radius: 99px; overflow: hidden; margin-top: .25rem; }
.stage-bar > span { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; min-width: 2px; }

/* kpis */
.kpi { padding: 1rem 1.1rem; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: .2rem; transition: box-shadow .12s ease; }
a.kpi:hover { box-shadow: 0 6px 16px rgba(16,24,40,.1); color: inherit; }
.kpi-label { color: #6c757d; font-size: .85rem; }
.kpi-value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-foot { font-size: .78rem; color: #6c757d; margin-top: auto; }
@media (max-width: 575.98px) { .kpi { padding: .85rem; } .kpi-value { font-size: 1.15rem; } }

/* ---------- dashboard phase 2 ---------- */
.section-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin: .25rem 0 .35rem; }
.section-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.period-switch { display: inline-flex; background: #e9edf3; border-radius: .6rem; padding: 3px; gap: 2px; }
.period-switch a { padding: .3rem .85rem; border-radius: .45rem; color: #475569; text-decoration: none; font-size: .88rem; white-space: nowrap; }
.period-switch a:hover { color: var(--brand); }
.period-switch a.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.panel-sub { padding: .45rem 1rem; font-size: .78rem; font-weight: 700; color: #6c757d; background: #f8f9fb; border-top: 1px solid #eef0f4; border-bottom: 1px solid #eef0f4; }
.wl-cell { display: flex; align-items: center; gap: .6rem; min-width: 140px; }
.wl-bar { flex: 1; height: 8px; background: #eef0f4; border-radius: 99px; overflow: hidden; max-width: 160px; }
.wl-bar > span { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; min-width: 2px; }
.wl-bar.wl-hours > span { background: #0d9488; }
.workload td.num, .workload th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) { .wl-cell { min-width: 0; justify-content: flex-end; } .wl-bar { max-width: 90px; } }

/* ---------- dashboard phase 3: layout editing, activity ---------- */
.dash-sections { display: flex; flex-direction: column; }
.dash-section.is-hidden { display: none; }
.dash-section-tools { display: none; }
.dash-customize { text-decoration: none; }
.dash-customize:hover { color: #fff !important; }
.dash-editbar { position: sticky; top: 0; z-index: 1020; background: var(--brand); color: #fff; border-radius: .7rem; padding: .6rem .9rem; margin-bottom: .75rem; box-shadow: 0 6px 18px rgba(30,58,95,.25); }
@media (max-width: 991.98px) { .dash-editbar { top: 60px; } }
.dash-editing .dash-section { display: block; position: relative; border: 2px dashed #b9c4d6; border-radius: .9rem; padding: .5rem .5rem 0; margin-bottom: .75rem; background: rgba(255,255,255,.5); }
.dash-editing .dash-section.is-hidden { opacity: .45; }
.dash-editing .dash-section.is-hidden > :not(.dash-section-tools) { max-height: 110px; overflow: hidden; pointer-events: none; }
.dash-editing .dash-section-tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .25rem .5rem; }
.dash-editing .dash-section > :not(.dash-section-tools) a { pointer-events: none; }
.dst-title { font-weight: 600; font-size: .9rem; color: #475569; }

.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-item { display: flex; gap: .75rem; padding: .65rem 1rem; border-bottom: 1px solid #f1f3f7; position: relative; }
.activity-item:last-child { border-bottom: 0; }
.act-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; }
.act-create { background: #e8f6ee; color: #15803d; }
.act-edit   { background: #eef3fb; color: var(--brand); }
.act-delete { background: #fdecee; color: #b42318; }
.act-text { font-size: .9rem; overflow-wrap: anywhere; }
.act-time { display: block; font-size: .78rem; color: #6c757d; }

/* =====================================================================
   Forms
   ===================================================================== */
.form-label.required::after, .req-dot { content: " *"; color: #dc3545; font-weight: 700; }
.req-dot::after { content: ""; }
.form-hint { font-size: .8rem; color: #6c757d; }
.form-hint kbd { font-size: .72rem; padding: .1rem .3rem; background: #e9edf3; color: #334155; border-radius: .25rem; box-shadow: none; }
.form-text { font-size: .8rem; }

/* inputs */
.form-control, .form-select { border-color: #d5dbe5; min-height: 42px; transition: border-color .12s ease, box-shadow .12s ease; }
.form-control-sm, .form-select-sm { min-height: 34px; }
textarea.form-control { min-height: 0; }
.form-control:hover:not(:focus):not(:disabled), .form-select:hover:not(:focus):not(:disabled) { border-color: #b9c4d6; }
.form-control:focus, .form-select:focus { border-color: #5b84bd; box-shadow: 0 0 0 .2rem rgba(39, 75, 120, .15); }
.form-control::placeholder { color: #a0aab8; }
.form-control:disabled, .form-select:disabled { background-color: #f1f3f7; }
.input-group-text { background: #f4f6fa; border-color: #d5dbe5; color: #475569; }
textarea.autosize { resize: vertical; overflow-y: hidden; }

/* validation — classes emitted by ASP.NET Core tag helpers and jQuery unobtrusive */
.input-validation-error, .input-validation-error:focus {
  border-color: #dc3545 !important;
  padding-right: calc(1.5em + .75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right calc(.375em + .1875rem) center; background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
select.input-validation-error { background-position: right 2.25rem center, right .75rem center; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"), var(--bs-form-select-bg-img); background-size: calc(.75em + .375rem) calc(.75em + .375rem), 16px 12px; }
.input-validation-error:focus { box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .18) !important; }
.field-validation-error { display: block; color: #dc3545; font-size: .82rem; margin-top: .3rem; font-weight: 500; }
.field-validation-valid { display: none; }
.validation-summary-valid { display: none !important; }
.validation-summary-errors { border-radius: .6rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.validation-summary-errors:not(.alert) { color: #dc3545; font-size: .9rem; margin-bottom: .75rem; }

/* section cards inside forms */
.form-card > .card-header { display: flex; align-items: center; gap: .5rem; }
.form-card > .card-header .card-sub { font-weight: 400; color: #6c757d; font-size: .8rem; margin-left: auto; }

/* actions bar */
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.25rem; }
.form-actions .btn { min-height: 42px; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; vertical-align: -.15em; }
@media (max-width: 767.98px) {
  .form-actions.sticky-mobile { position: sticky; bottom: 0; z-index: 1010; margin: 1.25rem -12px 0; padding: .7rem 12px calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(244, 246, 250, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid #e3e7ee; }
  .form-actions.sticky-mobile .btn-primary { flex: 1 1 auto; }
  .form-actions .form-hint { width: 100%; order: 3; text-align: center; margin-left: 0 !important; }
}

/* segmented radio group (btn-check) */
.btn-check + .btn-outline-primary { border-color: #d5dbe5; color: #334155; }
.btn-check:checked + .btn-outline-primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

/* Tom Select (searchable selects). The bootstrap5 theme draws the box on the wrapper (.ts-wrapper.form-select). */
.ts-wrapper.form-select { border-color: #d5dbe5; border-radius: .5rem; min-height: 42px; display: flex; align-items: center; }
.ts-wrapper.form-select .ts-control { background: transparent; padding-top: .1rem; padding-bottom: .1rem; }
.ts-wrapper.form-select.focus { border-color: #5b84bd; box-shadow: 0 0 0 .2rem rgba(39, 75, 120, .15); }
.ts-wrapper.single .ts-control input { min-width: 4rem; }
select.input-validation-error + .ts-wrapper.form-select { border-color: #dc3545 !important; }
select.input-validation-error + .ts-wrapper.form-select.focus { box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .18); }
.ts-dropdown { border-radius: .5rem; border-color: #d5dbe5; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); font-size: inherit; margin-top: 4px; }
.ts-dropdown .active { background: #eef3fb; color: var(--brand); }
.ts-dropdown .no-results { padding: .5rem .75rem; color: #6c757d; }
@media (max-width: 575.98px) { .ts-wrapper .ts-control, .ts-wrapper .ts-control input { font-size: 16px; } }

/* ---------- users page ---------- */
.users-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .85rem 1rem; }
.users-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.users-chip { border: 1px solid #dfe3ea; background: #fff; color: #344054; border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; display: inline-flex; align-items: center; gap: .35rem; line-height: 1.4; }
.users-chip span { background: #eef1f6; color: #475467; border-radius: 999px; padding: 0 .45rem; font-size: .78rem; font-weight: 600; min-width: 1.5rem; text-align: center; }
.users-chip:hover { border-color: #b9c3d3; }
.users-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.users-chip.active span { background: rgba(255,255,255,.2); color: #fff; }
.users-chip.chip-warn:not(.active) span { background: #fff4e5; color: #b54708; }
.users-chip.chip-danger:not(.active) span { background: #fef3f2; color: #b42318; }
.users-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.users-search .bi { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.users-search .form-control { padding-left: 2.2rem; border-radius: 999px; }

.users-list { overflow: visible; }
.users-head, .users-row { --actions-w: 5.5rem; display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, 1.1fr) var(--actions-w); gap: 1rem; align-items: center; padding: .8rem 1.1rem; }
.users-head { color: #667085; font-size: .8rem; font-weight: 600; border-bottom: 1px solid #eef0f4; padding-top: .65rem; padding-bottom: .65rem; }
.users-row { border-bottom: 1px solid #eef0f4; }
.users-row:last-of-type { border-bottom: 0; }
.users-row:hover { background: #fafbfd; }
.users-row.is-locked .users-person, .users-row.is-locked .users-org { opacity: .6; }
.users-person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  background: hsl(var(--h) 70% 93%); color: hsl(var(--h) 55% 32%); }
.users-name { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; overflow-wrap: anywhere; }
.users-sub { color: #667085; font-size: .82rem; display: flex; flex-wrap: wrap; gap: .25rem .85rem; overflow-wrap: anywhere; }
.users-sub a { color: inherit; text-decoration: none; }
.users-sub a:hover { color: var(--brand); }
.users-org { font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.users-status { display: flex; flex-direction: column; gap: .1rem; font-size: .88rem; }
.users-actions { display: flex; gap: .35rem; justify-content: flex-end; }
@media (min-width: 1200px) { .users-head, .users-row { --actions-w: 8.5rem; } }
.users-actions .dropdown-item { display: flex; gap: .55rem; align-items: center; }
.users-actions .dropdown-item .bi { width: 1rem; text-align: center; }
.role-badge { display: inline-block; border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.role-admin { background: #eef3fb; color: var(--brand); border-color: #cfdcf0; }
.role-lawyer { background: #ecfdf3; color: #067647; border-color: #c4ecd5; }
.role-clerk { background: #f4f3ff; color: #5925dc; border-color: #ddd6fe; }
.status-dot { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.status-dot::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.dot-ok { color: #079455; }
.dot-danger { color: #d92d20; }

@media (max-width: 991.98px) {
  .users-head { display: none; }
  .users-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "person actions" "role role" "org org" "status status"; gap: .35rem .75rem; padding: .9rem 1rem; }
  .users-person { grid-area: person; }
  .users-actions { grid-area: actions; align-self: start; }
  .users-role { grid-area: role; padding-left: 52px; }
  .users-org { grid-area: org; padding-left: 52px; display: flex; flex-wrap: wrap; gap: .1rem .75rem; align-items: center; }
  .users-org:has(> .text-muted:only-child) { display: none; }
  .users-status { grid-area: status; padding-left: 52px; flex-direction: row; flex-wrap: wrap; gap: .25rem .9rem; }
  .users-search { max-width: none; }
}

/* ---------- cases list ---------- */
.cases-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.cases-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .85rem; border-radius: 999px; background: #fff; border: 1px solid #dfe3ea;
  color: #344054; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.cases-tab:hover { border-color: #b9c3d3; color: #101828; }
.cases-tab > span { background: #eef1f6; color: #475467; border-radius: 999px; padding: 0 .45rem; font-size: .78rem; font-weight: 600; min-width: 1.5rem; text-align: center; }
.cases-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cases-tab.active > span { background: rgba(255,255,255,.2); color: #fff; }
.cases-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--c, #98a2b3); display: inline-block; }
.cases-tab.active .cases-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.cases-tab-sep { flex-shrink: 0; width: 1px; background: #dfe3ea; margin: .25rem .15rem; }
.cases-search { position: relative; }
.cases-search .bi { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.cases-search .form-control { padding-left: 2.3rem; }
.cases-pills { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cases-pill { display: inline-flex; align-items: center; gap: .4rem; background: #eef3fb; color: var(--brand); border: 1px solid #cfdcf0; border-radius: 999px;
  padding: .22rem .7rem; font-size: .85rem; text-decoration: none; }
.cases-pill:hover { background: #e2ebf8; color: var(--brand); }
.cases-pill .bi-x-lg { font-size: .7rem; opacity: .7; }
.cases-pill-clear { font-size: .85rem; color: #667085; margin-left: .25rem; }

.cases-list { overflow: visible; }
.cases-table { --bs-table-bg: transparent; }
.cases-table thead th { color: #667085; font-size: .8rem; font-weight: 600; border-bottom: 1px solid #eef0f4; padding: .7rem .75rem; white-space: nowrap; }
.cases-table thead th:first-child, .cases-table tbody td:first-child { padding-left: 1.1rem; }
.cases-table tbody td { padding: .75rem; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.cases-table tbody tr { cursor: pointer; transition: background-color .12s; }
.cases-table tbody tr:hover { background: #f8fafd; }
.cases-table tbody tr:last-child td { border-bottom: 0; }
.cases-number { font-weight: 700; text-decoration: none; }
.cases-sub { color: #667085; font-size: .82rem; }
.cases-title { font-weight: 600; line-height: 1.45; }
.cases-title a { color: inherit; text-decoration: none; }
.cases-title a:hover { color: var(--brand); text-decoration: underline; }
.cases-clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.col-title { min-width: 16rem; }
.col-title .cases-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cases-priority { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 700; border-radius: .35rem; padding: .05rem .4rem; margin-right: .3rem; vertical-align: .1em; }
.p-urgent { background: #fef3f2; color: #b42318; }
.p-high { background: #fff4e5; color: #b54708; }
.cases-lawyer { font-size: .9rem; }
.cases-due { color: #b42318; font-weight: 600; }
.cases-paid { color: #067647; font-size: .88rem; font-weight: 500; }
.cases-kebab { border-color: transparent; background: transparent; }
.cases-kebab:hover, .cases-kebab[aria-expanded="true"] { background: #eef1f6; }
.cases-table .dropdown-item { display: flex; gap: .55rem; align-items: center; }
.cases-footer { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 1.1rem; border-top: 1px solid #eef0f4; }

/* medium widths: drop secondary columns so the table never overflows */
@media (min-width: 768px) and (max-width: 991.98px) { .cases-table .col-type { display: none; } }
@media (min-width: 768px) and (max-width: 1199.98px) { .cases-table .col-lawyer { display: none; } }

/* phones: each row becomes a card */
@media (max-width: 767.98px) {
  .cases-header-actions { width: 100%; }
  .cases-header-actions .btn-primary { flex-grow: 1; }
  .page-header > .cases-header-actions > a.btn-outline-secondary { flex: 0 0 auto; padding-left: .9rem; padding-right: .9rem; }
  .cases-table thead { display: none; }
  .cases-table, .cases-table tbody { display: block; }
  .cases-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas:
      "title actions" "number number" "status due" "type type" "lawyer lawyer"; gap: .2rem .75rem; padding: .85rem 1rem; border-bottom: 1px solid #eef0f4; }
  .cases-table tbody td { display: block; padding: 0 !important; border: 0 !important; }
  .cases-table .col-title { grid-area: title; min-width: 0; }
  .cases-table .col-actions { grid-area: actions; }
  .cases-table .col-number { grid-area: number; display: flex !important; gap: .6rem; align-items: baseline; font-size: .85rem; }
  .cases-table .col-number .cases-number { font-weight: 600; }
  .cases-table .col-status { grid-area: status; display: flex !important; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .25rem; }
  .cases-table .col-status .cases-sub { margin-top: 0 !important; }
  .cases-table .col-due { grid-area: due; align-self: center; text-align: right; }
  .cases-table .col-due .cases-sub { display: none; }
  .cases-table .col-type { grid-area: type; display: flex !important; flex-wrap: wrap; gap: 0 .75rem; color: #667085; font-size: .82rem; }
  .cases-table .col-lawyer { grid-area: lawyer; font-size: .82rem; color: #667085; }
  .cases-table .col-lawyer::before { content: "\F4E1"; font-family: bootstrap-icons; margin-right: .3rem; }
  .cases-table .col-lawyer:has(.text-muted) { display: none !important; }
  .cases-footer { justify-content: center; }
}

/* ---------- appointments agenda ---------- */
.appt-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.appt-kpi { display: flex; align-items: center; gap: .8rem; background: #fff; border-radius: .75rem; padding: .85rem 1rem; text-decoration: none; color: inherit;
  box-shadow: 0 1px 3px rgba(16,24,40,.08); border: 1px solid transparent; transition: border-color .12s, transform .12s; }
.appt-kpi:hover { border-color: #cfdcf0; color: inherit; transform: translateY(-1px); }
.appt-kpi.active { border-color: var(--brand); }
.appt-kpi-icon { width: 40px; height: 40px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.k-blue { background: #eef3fb; color: var(--brand); } .k-indigo { background: #f4f3ff; color: #5925dc; }
.k-amber { background: #fff4e5; color: #b54708; } .k-rose { background: #fef3f2; color: #b42318; }
.appt-kpi-value { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.appt-kpi-label { display: block; color: #667085; font-size: .82rem; }
.appt-kpi:not(.attention) .k-amber, .appt-kpi:not(.attention) .k-rose { background: #f2f4f7; color: #98a2b3; }

.appt-views { display: flex; gap: .3rem; overflow-x: auto; background: #f2f4f7; border-radius: .6rem; padding: .25rem; width: fit-content; max-width: 100%; }
.appt-view { flex-shrink: 0; padding: .35rem .85rem; border-radius: .45rem; color: #475467; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.appt-view:hover { color: #101828; background: rgba(255,255,255,.6); }
.appt-view.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.appt-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.appt-filter-q { flex: 1 1 260px; }
.appt-filter-sel { width: auto; flex: 0 1 200px; }

.appt-agenda { overflow: visible; }
.appt-day { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); border-bottom: 1px solid #eef0f4; }
.appt-day:last-child { border-bottom: 0; }
.appt-day-head { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-right: 1px solid #eef0f4; }
.appt-date { width: 46px; flex-shrink: 0; text-align: center; border-radius: .55rem; background: #f2f4f7; color: #344054; padding: .3rem 0; line-height: 1.1; }
.appt-date-num { display: block; font-size: 1.25rem; font-weight: 700; }
.appt-date-mon { display: block; font-size: .7rem; color: #667085; }
.appt-day.is-today .appt-date { background: var(--brand); color: #fff; }
.appt-day.is-today .appt-date-mon { color: rgba(255,255,255,.8); }
.appt-day.is-past .appt-date { opacity: .7; }
.appt-day-title { min-width: 0; font-size: .9rem; }
.appt-day-date { display: none; }
.appt-rows > .appt-now:last-child { margin-bottom: .6rem; }
.appt-rows { min-width: 0; }
.appt-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .75rem 1rem .75rem .9rem;
  border-left: 3px solid var(--c); border-bottom: 1px solid #f2f4f7; cursor: pointer; transition: background-color .12s; }
.appt-row:last-child { border-bottom: 0; }
.appt-row:hover { background: #f8fafd; }
.appt-row.is-muted { opacity: .62; }
.appt-row.needs-outcome { background: #fffcf5; }
.appt-row.needs-outcome:hover { background: #fff8eb; }
.appt-start { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt-dur { color: #667085; font-size: .78rem; }
.appt-who { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; font-weight: 600; }
.appt-who a { color: inherit; text-decoration: none; }
.appt-who a:hover { color: var(--brand); text-decoration: underline; }
.appt-flag { background: #fff4e5; color: #b54708; border: 1px solid #fedf89; font-weight: 600; }
.appt-what { font-size: .9rem; color: #344054; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-meta { display: flex; flex-wrap: wrap; gap: .15rem 1rem; color: #667085; font-size: .82rem; margin-top: .1rem; }
.appt-meta a { color: inherit; text-decoration: none; }
.appt-meta a:hover { color: var(--brand); }
.appt-actions { display: flex; gap: .35rem; align-items: center; }
.appt-icon-btn { border-color: transparent; background: transparent; }
.appt-icon-btn:hover, .appt-icon-btn[aria-expanded="true"] { background: #eef1f6; }
.appt-actions .dropdown-item { display: flex; gap: .55rem; align-items: center; }
.appt-now { position: relative; height: 0; border-top: 2px solid #d92d20; margin: 0 0 0 .9rem; }
.appt-now span { position: absolute; top: -.7rem; left: 4.6rem; background: #d92d20; color: #fff; font-size: .7rem; font-weight: 600; border-radius: 999px; padding: 0 .5rem; line-height: 1.3rem; }
.appt-now::before { content: ""; position: absolute; left: -.35rem; top: -.4rem; width: .7rem; height: .7rem; border-radius: 50%; background: #d92d20; }

@media (max-width: 991.98px) {
  .appt-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appt-day { grid-template-columns: minmax(0, 1fr); }
  .appt-day-head { border-right: 0; border-bottom: 1px solid #f2f4f7; padding: .6rem 1rem; background: #fafbfc; position: sticky; top: 56px; z-index: 2; align-items: center; }
  .appt-date { width: 40px; padding: .2rem 0; }
  .appt-date-num { font-size: 1.05rem; }
  .appt-day-date { display: inline; }
}
@media (max-width: 575.98px) {
  .appt-header-actions { width: 100%; }
  .page-header > .appt-header-actions > a.btn-primary { flex: 1 1 auto; }
  .page-header > .appt-header-actions > a.btn-outline-secondary { flex: 0 0 auto; }
  .appt-summary { gap: .5rem; }
  .appt-kpi { padding: .65rem .75rem; gap: .6rem; }
  .appt-kpi-icon { width: 34px; height: 34px; font-size: 1rem; }
  .appt-kpi-value { font-size: 1.2rem; }
  .appt-views { width: 100%; }
  .appt-filter-sel { flex: 1 1 45%; }
  .appt-row { grid-template-columns: minmax(0, 1fr) auto; }
  .appt-when { display: none; }
  .appt-now span { left: .5rem; }
}

/* Tasks */
.task-item .task-check { width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.task-item .task-title { word-break: break-word; }
.task-item .task-title:hover { text-decoration: underline !important; }
.task-item.is-closed .task-title { text-decoration: line-through; color: var(--bs-secondary-color) !important; }
.task-item:last-child { border-bottom: 0 !important; }
