:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #1c2330; --muted: #5d6676; --line: #dfe3ea; --soft: #eef1f5;
  --accent: #1a2b4a; --accent-soft: #e8ecf3; --gold: #b8902a; --gold-soft: #f7f0de; --red: #c0352b; --red-soft: #fbeaea; --amber: #b46a00; --amber-soft: #fff4e0;
  --green: #1f7a3d; --green-soft: #e7f5ec; --radius: 8px; --shadow: 0 1px 2px rgba(20, 30, 50, .06);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* layout */
.shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { padding: 2px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 10px; text-align: center; }
.brand img { width: 96px; height: 96px; border-radius: 50%; }
.brand .bn { font-weight: 700; letter-spacing: .08em; color: var(--accent); font-size: .95rem; }
.brand .bt { font-size: .62rem; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.login-logo { display: block; width: 130px; height: 130px; margin: 0 auto 10px; border-radius: 50%; }
.print-logo { width: 54px; height: 54px; float: left; margin-right: 10px; border-radius: 50%; }
.nav a.cta { border: 1px solid var(--gold); }
.btn.gold, button.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.mapping td { vertical-align: top; }
.mapping textarea { min-height: 54px; }
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); }
.review-flag { outline: 2px solid #e0a100 !important; outline-offset: 1px; }
.thumb { max-width: 160px; max-height: 90px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px; }
.nav a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); margin-bottom: 2px; }
.nav a:hover { background: var(--soft); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a.cta { border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; margin: 6px 0; }
.side .me { margin-top: 18px; padding: 10px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.main { padding: 18px 24px 60px; min-width: 0; }
.topbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1; max-width: 640px; }
.search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 14px; }
.search .results { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 30; max-height: 360px; overflow: auto; }
.search .results a { display: block; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--soft); }
.search .results a:hover { background: var(--soft); text-decoration: none; }
.menu-btn { display: none; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card .label { color: var(--muted); font-size: .86rem; }
.card .value { font-size: 1.5rem; font-weight: 700; margin-top: 2px; }
.card .sub { font-size: .8rem; color: var(--muted); }
.card.danger { border-color: var(--red); background: var(--red-soft); }
.card.warn { border-color: var(--amber); background: var(--amber-soft); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { background: none; border: none; padding: 9px 14px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tabs button .count { background: var(--soft); border-radius: 10px; padding: 0 7px; margin-left: 6px; font-size: .8rem; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.filters select, .filters input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; font-size: 13px; max-width: 220px; }

/* tables */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--soft); vertical-align: top; }
th { background: #f8f9fb; font-size: .82rem; color: var(--muted); font-weight: 600; position: sticky; top: 0; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f8fafd; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* badges */
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .78rem; background: var(--soft); color: var(--ink); white-space: nowrap; border: 1px solid transparent; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: #f0c4c0; }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: #f2d9a6; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: #bfe3cb; }
.badge.grey { background: #eef0f3; color: #5b6472; border-color: #d6dae0; }
.badge.blue { background: var(--accent-soft); color: var(--accent); border-color: #c4d6ef; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.grey { background: #9aa3b2; }
.date-overdue { color: var(--red); font-weight: 700; }
.date-soon { color: var(--red); }
.date-week { color: var(--amber); }

/* buttons & forms */
button, .btn { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
button:hover, .btn:hover { border-color: #b8c1d0; text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #183f73; }
button.danger { color: var(--red); border-color: #e9b8b3; }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .55; cursor: not-allowed; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { font: inherit; width: 100%; padding: 7px 9px; border: 1px solid #cfd5df; border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox] { width: auto; }
textarea { min-height: 70px; resize: vertical; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.grid .wide { grid-column: 1 / -1; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 2px; min-height: 1em; }
.field .hint.err { color: var(--red); }
.check { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: .9rem; margin-top: 22px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0 0 14px; background: #fff; }
legend { font-weight: 600; padding: 0 6px; }
.formnav { position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; }
.formnav a { padding: 4px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.money-grid td, .money-grid th { padding: 4px 6px; }
.money-grid input { min-width: 100px; text-align: right; }
.money-grid select { min-width: 160px; }
.alert { padding: 10px 12px; border-radius: 6px; margin: 8px 0; font-size: .9rem; }
.alert.warn { background: var(--amber-soft); border: 1px solid #f2d9a6; }
.alert.err { background: var(--red-soft); border: 1px solid #f0c4c0; color: var(--red); }
.alert.info { background: var(--accent-soft); border: 1px solid #c4d6ef; }
.alert.ok { background: var(--green-soft); border: 1px solid #bfe3cb; }

/* matter page */
.mhead { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.mhead .stats { display: flex; gap: 18px; margin-left: auto; }
.mhead .stat .k { font-size: .78rem; color: var(--muted); }
.mhead .stat .v { font-weight: 700; font-size: 1.05rem; }
.timeline { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 4px; overflow-x: auto; }
.tl-row { display: flex; align-items: stretch; gap: 0; }
.tl-node { min-width: 170px; max-width: 200px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; text-align: center; flex-shrink: 0; }
.tl-node:hover { border-color: var(--accent); }
.tl-node.sel { border: 2px solid var(--accent); background: var(--accent-soft); }
.tl-node .t { font-weight: 600; font-size: .92rem; }
.tl-node .f { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.tl-arrow { align-self: center; width: 28px; height: 2px; background: #b8c1d0; position: relative; flex-shrink: 0; }
.tl-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 7px solid #b8c1d0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.tl-spacer { min-width: 198px; flex-shrink: 0; }
.tl-branch { align-self: center; font-size: .75rem; color: var(--muted); width: 28px; text-align: center; flex-shrink: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.kv .k { font-size: .78rem; color: var(--muted); }
.kv .v { word-break: break-word; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(20, 28, 40, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 40px 12px; overflow: auto; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 760px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal .mh { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .mh h2 { margin: 0; }
.modal .mb { padding: 14px 18px; }
.modal .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.calcbox { background: var(--soft); border-radius: 6px; padding: 10px 12px; margin: 10px 0; }
.calcbox .big { font-size: 1.1rem; font-weight: 700; }

/* calendar */
.cal-day { margin-bottom: 14px; }
.cal-day h3 { margin: 0 0 6px; }
.cause-forum { font-weight: 600; margin: 10px 0 4px; }

/* toasts */
#toasts { position: fixed; bottom: 16px; right: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1c2330; color: #fff; padding: 10px 14px; border-radius: 6px; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--red); }

/* login */
.login { max-width: 380px; margin: 10vh auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px; box-shadow: var(--shadow); }
.login h1 { margin-bottom: 14px; }
.login .field { margin-bottom: 12px; }

/* print */
.print-only { display: none; }
@media print {
  .side, .topbar, .tabs, .filters, .actions, .no-print, #toasts, button { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .print-only { display: block; }
  body { background: #fff; font-size: 11px; }
  .panel, .tablewrap, fieldset { border: none; box-shadow: none; }
  th { position: static; }
  a { color: inherit; }
}

/* phones */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 240px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.2); }
  .tabs button { padding: 9px 10px; }
  .menu-btn { display: inline-flex; }
  .main { padding: 12px 12px 60px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mhead .stats { margin-left: 0; flex-wrap: wrap; gap: 10px 18px; }
  .stat-prog .prog { min-width: 0; }
  table.cardify thead { display: none; }
  table.cardify tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.cardify td { display: flex; gap: 8px; border: none; padding: 3px 10px; }
  table.cardify td::before { content: attr(data-l); color: var(--muted); min-width: 110px; font-size: .8rem; }
  table.cardify td.num { text-align: left; }
}

/* 1.8: case rows coloured by status, serial numbers, remarks typed in place, status dropdown */
table tr[class*="row-"] > td { border-bottom: 1px solid var(--line); }
tr.row-red > td { background: #fdf1f0; } tr.row-red > td:first-child { box-shadow: inset 5px 0 0 var(--red); }
tr.row-amber > td { background: #fff8ec; } tr.row-amber > td:first-child { box-shadow: inset 5px 0 0 var(--amber); }
tr.row-green > td { background: #eef8f1; } tr.row-green > td:first-child { box-shadow: inset 5px 0 0 var(--green); }
tr.row-blue > td { background: #eef3fa; } tr.row-blue > td:first-child { box-shadow: inset 5px 0 0 var(--accent); }
tr.row-grey > td { background: #f6f7f9; } tr.row-grey > td:first-child { box-shadow: inset 5px 0 0 #9aa3ae; }
table.cases tr[class*="row-"]:hover > td { filter: brightness(0.97); }
tr[class*="row-"] > td { transition: background-color .25s ease; }
.sno { font-weight: 600; color: var(--muted); }
td.remarks { min-width: 190px; }
textarea.remark { width: 100%; min-height: 30px; resize: vertical; font: inherit; font-size: .86rem; padding: 4px 6px; border: 1px dashed #c9ced6; border-radius: 6px; background: rgba(255,255,255,.75); }
textarea.remark:focus { border-style: solid; background: #fff; }
textarea.remark.saving { opacity: .6; } textarea.remark.saved { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.remark-who { font-size: .72rem; margin-top: 2px; }
select.status-sel { font-size: .85rem; padding: 3px 4px; max-width: 170px; }
.legend { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 10px; }
.legend .lg { padding: 1px 8px 1px 10px; border-radius: 4px; font-size: .75rem; }
.legend .lg.row-red { background: #fdf1f0; box-shadow: inset 4px 0 0 var(--red); } .legend .lg.row-amber { background: #fff8ec; box-shadow: inset 4px 0 0 var(--amber); }
.legend .lg.row-green { background: #eef8f1; box-shadow: inset 4px 0 0 var(--green); } .legend .lg.row-blue { background: #eef3fa; box-shadow: inset 4px 0 0 var(--accent); }
.dropzone { border: 2px dashed #c4cbd6; border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; margin-top: 8px; background: #fafbfc; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { table.cardify tr[class*="row-"] { box-shadow: inset 5px 0 0 var(--line); } td.remarks { min-width: 0; } }
@media print { select.status-sel, textarea.remark { display: none; } tr[class*="row-"] > td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
table.cases { font-size: .9rem; }
table.cases td, table.cases th { padding-left: 7px; padding-right: 7px; }
table.cases td[data-l="Forum / Case No."] { min-width: 150px; max-width: 220px; word-break: break-word; }
table.cases td.remarks { min-width: 170px; width: 200px; }
table.cases td[data-l="Matter"] { max-width: 200px; }
table.cases td[data-l="Party"] { max-width: 120px; }
table.cases td[data-l="Associate"] { max-width: 90px; }
table.cases select.status-sel { max-width: 150px; }
table.cases td.remarks { min-width: 150px; width: 170px; }
table.cases td[data-l="Next date"] .nowrap, table.cases td[data-l="Deadline"] .nowrap { white-space: normal; }
table.cases td[data-l="Next date"], table.cases td[data-l="Deadline"] { max-width: 120px; }
.client-name { font-weight: 700; color: #1a2b4a; background: #f7e7b4; padding: 1px 6px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: 1.6; }
@media print { .client-name { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* 1.9 two-step sign-in */
.login.wide-login { max-width: 560px; }
.qr { width: 220px; height: 220px; margin: 10px 0; background: #fff; border: 1px solid #ddd; }
.qr svg { width: 100%; height: 100%; display: block; }
code.secret { font-size: 14px; letter-spacing: 1px; background: #f3f3f3; padding: 2px 6px; user-select: all; }
.recovery .codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; }
.recovery .codes code { font-size: 15px; letter-spacing: 1px; }
ol.steps { padding-left: 18px; }
@media print { body * { visibility: hidden; } .recovery, .recovery * { visibility: visible; } .recovery { position: absolute; left: 0; top: 0; } .recovery button { display: none; } }

/* 2.0 client login (portal) */
body.portal .login { max-width: 420px; }
body.portal .login form button.primary { width: 100%; justify-content: center; margin-top: 4px; }
.pshell { min-height: 100vh; }
.ptop { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.pbrand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent); letter-spacing: .5px; }
.pbrand img { width: 40px; height: 40px; border-radius: 50%; }
.pwho { margin-left: auto; text-align: right; line-height: 1.25; }
.ptop nav { display: flex; gap: 14px; }
.pmain { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.pcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--ink); box-shadow: var(--shadow); }
.pcard:hover { border-color: var(--accent); text-decoration: none; }
.pupdate { background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 6px; padding: 8px 10px; margin-top: 8px; white-space: pre-wrap; }
.pupdate.latest { background: #fff6dc; }
.pgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; margin-top: 12px; }
.pstage { border-left: 3px solid var(--accent); padding: 4px 0 8px 10px; margin-bottom: 8px; }
.pstage.done { border-left-color: #c9ced8; opacity: .8; }
.chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 10px; }
.msg { max-width: 82%; border-radius: 10px; padding: 8px 11px; background: var(--soft); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); }
.msg .meta { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.msg .text { white-space: pre-wrap; word-wrap: break-word; }
.msg .att { display: inline-block; margin-top: 4px; font-size: .88rem; }
.compose { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.compose textarea { min-height: 64px; }
.portal-tag { font-size: .75rem; padding: 1px 6px; border-radius: 8px; background: var(--gold-soft); color: #7a5a10; }
@media (max-width: 800px) { .pgrid { grid-template-columns: 1fr; } .pwho { margin-left: 0; text-align: left; } .msg { max-width: 92%; } .pcards { grid-template-columns: 1fr; } }
.navcount { background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 6px; font-size: .78rem; font-weight: 600; }

/* 2.1 progress bar, to-do list, internal deadline */
.progress-box { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.prog { min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.prog.click { cursor: pointer; }
.prog-head { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.prog-head b.g { color: var(--green); } .prog-head b.r { color: var(--red); }
.prog-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--soft); }
.prog-done { background: #2e9e5b; } .prog-pend { background: #d9483b; }
.stat-prog .prog { border: none; padding: 0; min-width: 200px; background: transparent; }
.internal-dl { margin-top: 3px; color: #7a5a10; }
.edit-internal { margin-left: 4px; }
table.todo .todo-day td { background: var(--soft); font-weight: 600; padding-top: 8px; }
table.todo .todo-day.over td { background: var(--red-soft); color: var(--red); }
table.todo .todo-day.today td { background: var(--accent-soft); }
.todo-row.st-done td { color: var(--muted); } .todo-row.st-done td:nth-child(3) { text-decoration: line-through; }
select.todo-sel { width: auto; min-width: 118px; font-weight: 600; }
select.todo-sel.st-pending { background: var(--red-soft); color: var(--red); border-color: #e9b8b3; }
select.todo-sel.st-in_progress { background: var(--amber-soft); color: var(--amber); border-color: #f0d29b; }
select.todo-sel.st-done { background: var(--green-soft); color: var(--green); border-color: #bfe3cb; }
@media print { .progress-box { display: none; } }

/* 2.2: send documents by type */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.grid2 .field select, .field input[type=file] { width: 100%; max-width: 100%; }
.hint.src { background: #f6f7fb; border-left: 3px solid #b08d3c; padding: 6px 8px; margin: 2px 0 10px; border-radius: 4px; }
.upres td { vertical-align: top; } .upres tr.skip td { color: #a33; } .warn-t { color: #9a6400; }
.ckwrap { margin-top: 12px; } .ckwrap summary { cursor: pointer; font-weight: 600; }
.checklist .ck { padding: 2px 0; } .ck .ck-mark { display: inline-block; width: 1.2em; text-align: center; }
.ck.ok .ck-mark { color: #1d8a4a; } .ck.part .ck-mark { color: #c58a00; } .ck.no .ck-mark { color: #b33; }

/* 2.3: case ladder and stage history */
.ladder { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 10px 0 6px; }
.lad { flex: 1 1 120px; min-width: 110px; border: 1px solid var(--line, #dde2ea); border-radius: 8px; padding: 8px; background: #fafbfc; font-size: 13px; }
.lad-name { font-weight: 700; } .lad-sub { color: #5b6574; font-size: 12px; margin-top: 2px; } .lad-out { font-size: 12px; margin-top: 2px; }
.lad-arrow { align-self: center; color: #9aa3b0; font-size: 18px; }
.lad.ahead { opacity: .55; border-style: dashed; } .lad.skip { opacity: .55; background: #f3f4f6; }
.lad.before { background: #f1f1f4; border-color: #c9ccd4; } .lad.done { background: #eef7f1; border-color: #bfe3cb; }
.lad.now { background: #eaf1fb; border: 2px solid #2b5fab; box-shadow: 0 0 0 3px #2b5fab22; }
.lad-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag-before, .tag-eng, .tag-now { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.tag-before { background: #e4e5ea; color: #555c69; } .tag-eng { background: #f7ecd3; color: #8a6413; } .tag-now { background: #2b5fab; color: #fff; }
.tl-node.earlier { background: #f3f3f6; border-style: dashed; } .tl-node.engaged { box-shadow: inset 0 3px 0 #b08d3c; }
.tl-node .tag-before, .tl-node .tag-eng { margin-top: 4px; }
tr.doc-stage td { background: #f3f5f9; font-weight: 600; font-size: 13px; }
.earlier-wrap { margin-top: 12px; border-top: 1px dashed #ccd2dc; padding-top: 8px; } .earlier-wrap h3 { margin: 4px 0; }
.earlier-panel { background: #fafbfc; }
@media (max-width: 700px) { .lad-arrow { display: none; } .lad { flex-basis: 45%; } }
.lad.pre { opacity: .45; background: #f6f7f9; }

/* 2.4: the dashboard at a glance */
.cards.tiles { gap: 10px; }
.cards.tiles .card { padding: 10px 12px; } .cards.tiles .card .value { font-size: 1.35rem; } .cards.tiles .card .sub { font-size: .74rem; }
.nudges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.nudge { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .82rem; cursor: pointer; }
.nudge.blue { color: #1f4f96; border-color: #c4d6ef; background: #f1f6fd; } .nudge.amber { color: #8a5a00; border-color: #f2d9a6; background: #fff8ea; } .nudge.red { color: #a61b1b; border-color: #f0c2c2; background: #fdf1f1; font-weight: 600; }
.cases-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 8px; }
.cases-q { flex: 1 1 260px; max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .82rem; cursor: pointer; }
.chip.on { background: #1a2b4a; color: #fff; border-color: #1a2b4a; } .chip-n { margin-left: 6px; opacity: .7; font-size: .75rem; }
.cases-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.lg::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; background: var(--c); }
.st-red { --c: #d64545; } .st-amber { --c: #e0a321; } .st-blue { --c: #2b5fab; } .st-green { --c: #2f9e5b; } .st-grey, .st-none { --c: #b7bec9; }
.cgroup { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.cg-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #f7f8fb; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .95rem; text-align: left; }
.cgroup.folded .cg-head { border-bottom: 0; }
.cg-label { font-weight: 700; } .cg-caret { width: 1em; color: #6b7685; }
.cg-n { margin-left: auto; min-width: 26px; text-align: center; border-radius: 999px; padding: 1px 8px; font-size: .8rem; font-weight: 700; background: #e6e9ef; color: #3a4556; }
.tone-red .cg-n { background: #fbe3e3; color: #b42323; } .tone-amber .cg-n { background: #fdf0d3; color: #8a5a00; } .tone-blue .cg-n { background: #e2ecfa; color: #1f4f96; }
.tone-red .cg-label { color: #b42323; }
.case-line { display: grid; grid-template-columns: minmax(200px, 2.2fr) minmax(130px, 1.2fr) minmax(150px, 1.3fr) minmax(150px, 1.2fr) 40px; gap: 12px; align-items: center;
  padding: 9px 12px 9px 14px; border-bottom: 1px solid #eef0f4; color: inherit; text-decoration: none; position: relative; }
.case-line:last-child { border-bottom: 0; }
.case-line::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 0 3px 3px 0; background: var(--c); }
.case-line:hover { background: #f8fafd; }
.cl-client { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-hi { display: inline-block; margin-left: 6px; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: #d64545; color: #fff; font-size: 11px; }
.cl-title, .cl-forum, .cl-code, .cl-what { font-size: .8rem; color: #6b7685; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ref .mono { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: #2d3a4f; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lvl-0 { background: #f1ecfa; color: #5b3d99; } .lvl-1 { background: #e9f1fb; color: #1f4f96; } .lvl-2 { background: #e6f5ee; color: #1d6e45; }
.lvl-3 { background: #fdf2dc; color: #8a5a00; } .lvl-4 { background: #fde8e3; color: #9b3419; } .lvl-5 { background: #f3e4ef; color: #7d2462; }
.avatar { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: #1a2b4a; color: #fff; font-size: .75rem; font-weight: 700; }
@media (max-width: 760px) {
  .case-line { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .case-line .cl-who { grid-column: 1 / 2; } .case-line .cl-person { grid-column: 2; grid-row: 1; }
  .case-line .cl-ref { grid-column: 1 / 3; display: flex; gap: 8px; } .case-line .cl-stage { grid-column: 1 / 2; display: flex; gap: 6px; align-items: center; min-width: 0; }
  .case-line .cl-next { grid-column: 2 / 3; grid-row: 3; text-align: right; } .cl-what { display: none; }
  .cases-q { max-width: none; }
}
@media print { .cgroup.folded .cg-body { display: block; } }
/* 2.4: keep the case list near the top on a phone */
@media (max-width: 760px) {
  .cards.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cards.tiles .card { padding: 7px 8px; } .cards.tiles .card .label { font-size: .7rem; line-height: 1.2; }
  .cards.tiles .card .value { font-size: 1.1rem; } .cards.tiles .card .sub { display: none; }
  .progress-box { width: 100%; flex-wrap: nowrap; gap: 6px; } .progress-box > * { flex: 1 1 0; min-width: 0; }
  .cases-legend { display: none; }
}
@media (max-width: 760px) {
  .case-line { grid-template-columns: minmax(0, 1fr) auto; }
  .case-line .cl-who { min-width: 0; }
  .case-line .cl-stage, .case-line .cl-next { grid-column: 1 / 3; grid-row: auto; text-align: left; }
  .case-line .cl-next { display: flex; gap: 8px; align-items: baseline; } .case-line .cl-next .cl-what { display: block; }
  .cases-bar .spacer { display: none; }
}

/* ===================== 2.4 client login: colourful, graphic look (navy, gold, peacock) ===================== */
body.portal {
  --navy: #13235c; --navy-deep: #0c173f; --pgold: #a9802f; --pgold-l: #e9dcc0; --teal: #0d6b70; --teal-l: #1fa3a8;
  --t-teal: #0d8a8f; --t-navy: #2b3f8f; --t-emerald: #1f8a5b; --t-plum: #7b3f8c; --t-coral: #c2553d; --t-blue: #2867b2; --t-gold: #a9802f;
  --display: "Marcellus", "Trajan Pro", Georgia, "Times New Roman", serif;
  background: #f4f6fb; font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px;
}
body.portal h1, body.portal h2, body.portal .ptile-t, body.portal .pcard-title { font-family: var(--display); font-weight: 400; letter-spacing: .2px; }
body.portal .eyebrow { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--pgold); }
body.portal .ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
body.portal .t-teal { --tc: var(--t-teal); } body.portal .t-navy { --tc: var(--t-navy); } body.portal .t-emerald { --tc: var(--t-emerald); }
body.portal .t-plum { --tc: var(--t-plum); } body.portal .t-coral { --tc: var(--t-coral); } body.portal .t-blue { --tc: var(--t-blue); } body.portal .t-gold { --tc: var(--t-gold); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(-2deg); } }
@keyframes sway2 { 0%, 100% { transform: rotate(14deg) scale(.8); } 50% { transform: rotate(8deg) scale(.8); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -16px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(233, 220, 192, .55); } 50% { box-shadow: 0 0 0 10px rgba(233, 220, 192, 0); } }
@media (prefers-reduced-motion: reduce) { body.portal *, body.portal *::before { animation: none !important; transition: none !important; } }

/* landing (sign in, forgot, set password) */
.land { min-height: 100vh; }
.land-top { background: var(--navy-deep); color: #f3f1ea; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100vw - 1160px) / 2)); border-bottom: 1px solid rgba(169, 128, 47, .45); position: relative; z-index: 3; }
.land-brand { display: flex; align-items: center; gap: 10px; color: #f3f1ea; text-decoration: none !important; }
.land-brand img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--pgold); }
.land-brand span { display: flex; flex-direction: column; line-height: 1.15; } .land-brand b { font-family: var(--display); font-weight: 400; letter-spacing: .14em; }
.land-brand small { color: var(--pgold-l); font-size: .72rem; letter-spacing: .08em; }
.land-top nav { margin-left: auto; display: flex; gap: 18px; } .land-top nav a { color: #c3c8db; } .land-top nav a:hover { color: var(--pgold-l); }
.land-hero { position: relative; overflow: hidden; color: #f3f1ea; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 400px); gap: 40px; align-items: center;
  padding: 56px max(16px, calc((100vw - 1160px) / 2)) 64px;
  background: radial-gradient(circle at 85% 10%, rgba(31, 163, 168, .35), transparent 45%), radial-gradient(circle at 10% 100%, rgba(123, 63, 140, .35), transparent 45%), linear-gradient(135deg, #0c173f 0%, #13235c 55%, #0d4a63 100%); }
.land-hero .feather { position: absolute; pointer-events: none; opacity: .5; }
.land-hero .feather.f1 { width: 230px; right: 33%; top: -40px; transform-origin: 50% 100%; animation: sway 9s ease-in-out infinite; opacity: .28; }
.land-hero .feather.f2 { width: 180px; left: -40px; bottom: -160px; transform-origin: 50% 100%; animation: sway2 11s ease-in-out infinite; opacity: .35; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; animation: drift 14s ease-in-out infinite; }
.orb.o1 { width: 120px; height: 120px; right: 6%; bottom: 8%; background: radial-gradient(circle, rgba(201, 160, 69, .5), transparent 70%); }
.orb.o2 { width: 70px; height: 70px; left: 46%; top: 12%; background: radial-gradient(circle, rgba(31, 163, 168, .6), transparent 70%); animation-delay: -5s; }
.orb.o3 { width: 40px; height: 40px; left: 8%; top: 22%; background: radial-gradient(circle, rgba(233, 220, 192, .7), transparent 70%); animation-delay: -9s; }
.land-copy { position: relative; z-index: 1; animation: rise .7s ease both; }
.land-copy h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); line-height: 1.1; margin: 10px 0 14px; color: #fff; }
.land-copy h1 em { font-style: normal; background: linear-gradient(90deg, #e9dcc0, #c9a045 40%, #5fd0c9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-copy .lede { font-size: 1.12rem; color: #d5d9e8; max-width: 54ch; margin: 0; }
.journey { display: flex; gap: 0; margin-top: 30px; position: relative; max-width: 620px; }
.journey::before { content: ''; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: linear-gradient(90deg, #c9a045, #1fa3a8, #7b3f8c); opacity: .8; }
.jstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; animation: rise .6s ease both; animation-delay: calc(.3s + var(--k) * .12s); }
.jdot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #0c173f; border: 2px solid var(--pgold-l); color: var(--pgold-l); }
.jstep:nth-child(2) .jdot { animation: pulse 2.6s ease-in-out infinite; background: var(--pgold); color: #0c173f; }
.jlab { font-size: .78rem; color: #c3c8db; text-align: center; line-height: 1.2; }
.land-card { position: relative; z-index: 1; background: rgba(255, 255, 255, .97); color: var(--ink); border-radius: 18px; padding: 30px 28px 22px; box-shadow: 0 24px 60px rgba(5, 10, 30, .45); border-top: 4px solid var(--pgold); animation: rise .7s .15s ease both; }
.land-card-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--teal), var(--navy)); margin-bottom: 12px; }
.land-card-ico .ico { width: 26px; height: 26px; }
.land-card h2 { font-size: 1.7rem; margin: 0 0 4px; color: var(--navy); }
.land-card input { border-radius: 10px; padding: 10px 12px; }
.land-card button.primary { width: 100%; justify-content: center; padding: 11px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), #1d3b8f); border: 0; font-weight: 700; font-size: 1rem; }
.land-card button.primary:hover { background: linear-gradient(135deg, #0c173f, var(--teal)); }
.land-sec { padding: 54px max(16px, calc((100vw - 1160px) / 2)) 10px; }
.sec-head { max-width: 720px; margin-bottom: 22px; } .sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); margin: 6px 0; }
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feat { background: #fff; border-radius: 16px; padding: 22px 20px; border: 1px solid #e3e7f1; box-shadow: 0 6px 22px rgba(19, 35, 92, .06); transition: transform .2s, box-shadow .2s; animation: rise .6s ease both; animation-delay: calc(var(--i) * .08s); }
.feat:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(19, 35, 92, .13); }
.feat-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.feat:nth-child(1) .feat-ico { background: linear-gradient(135deg, #1fa3a8, #0d6b70); } .feat:nth-child(2) .feat-ico { background: linear-gradient(135deg, #d2ad62, #a9802f); }
.feat:nth-child(3) .feat-ico { background: linear-gradient(135deg, #9a5bb0, #7b3f8c); } .feat:nth-child(4) .feat-ico { background: linear-gradient(135deg, #3b5bc4, #13235c); }
.feat-ico .ico { width: 24px; height: 24px; } .feat h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--navy); } .feat p { margin: 0; color: var(--muted); font-size: .93rem; }
.land-foot { margin-top: 50px; background: var(--navy-deep); color: #c3c8db; padding: 22px max(16px, calc((100vw - 1160px) / 2)); display: flex; gap: 6px 24px; flex-wrap: wrap; justify-content: space-between; font-size: .85rem; }
.land-foot a { color: var(--pgold-l); }

/* practice tiles */
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.ptile { position: relative; background: #fff; border-radius: 16px; padding: 20px 18px 14px; border: 1px solid #e3e7f1; overflow: hidden; box-shadow: 0 6px 22px rgba(19, 35, 92, .06);
  transition: transform .2s, box-shadow .2s; animation: rise .6s ease both; animation-delay: calc(var(--i) * .06s); }
.ptile::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 40%, #e9dcc0)); }
.ptile::after { content: ''; position: absolute; width: 140px; height: 140px; right: -50px; top: -50px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 10%, transparent); }
.ptile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(19, 35, 92, .14); }
.ptile-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 75%, #fff), var(--tc)); margin-bottom: 12px; position: relative; z-index: 1; }
.ptile-ico .ico { width: 26px; height: 26px; }
.ptile-t { font-size: 1.2rem; color: var(--navy); line-height: 1.2; } .ptile-law { font-size: .76rem; color: var(--tc); font-weight: 700; margin: 4px 0 8px; }
.ptile-line { margin: 0; color: var(--muted); font-size: .92rem; }
.ptile-pts { display: none; margin: 10px 0 0; padding-left: 18px; font-size: .9rem; } .ptile-pts li { margin: 3px 0; } .ptile-pts li::marker { color: var(--tc); }
.ptile.open .ptile-pts { display: block; animation: rise .3s ease both; }
.ptile-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e7f1; }
.ptile-more { background: none; border: 0; padding: 0; color: var(--tc); font-weight: 700; cursor: pointer; font-size: .88rem; }
.ptile .m-close, .ptile.open .m-open { display: none; } .ptile.open .m-close { display: inline; }
.ptile-link { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--navy); }
.ptiles.compact .ptile-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* did you know */
.facts { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 22px; align-items: center; color: #f3f1ea; border-radius: 18px; padding: 22px 24px; margin: 26px 0 10px;
  background: radial-gradient(circle at 100% 0, rgba(31, 163, 168, .45), transparent 50%), linear-gradient(120deg, #0c173f, #2a2470 60%, #7b3f8c); overflow: hidden; }
.fact-badge { display: flex; align-items: center; gap: 8px; background: rgba(233, 220, 192, .15); border: 1px solid rgba(233, 220, 192, .4); color: var(--pgold-l); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.fact-t { font-family: var(--display); font-size: 1.25rem; color: #fff; } .fact-b { color: #d5d9e8; min-height: 2.8em; }
.fact-nav { display: flex; align-items: center; gap: 8px; } .fact-nav > button { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.fact-dots { display: flex; gap: 5px; } .fact-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .3); cursor: pointer; } .fact-dots button.on { background: var(--pgold-l); width: 20px; border-radius: 4px; }
.fact-note { grid-column: 1 / -1; font-size: .75rem; color: #a9b0c8; }

/* signed-in shell */
body.portal .ptop { background: linear-gradient(90deg, #0c173f, #13235c 60%, #0d4a63); color: #f3f1ea; border-bottom: 2px solid var(--pgold); padding: 8px max(16px, calc((100vw - 1160px) / 2)); gap: 14px 22px; }
body.portal .pbrand { color: #f3f1ea; } body.portal .pbrand img { width: 42px; height: 42px; border: 1px solid var(--pgold); }
body.portal .pbrand span { display: flex; flex-direction: column; line-height: 1.1; } body.portal .pbrand b { font-family: var(--display); font-weight: 400; letter-spacing: .1em; font-size: 1.05rem; }
body.portal .pbrand small { color: var(--pgold-l); font-weight: 400; font-size: .72rem; letter-spacing: .08em; }
body.portal .ptop nav { gap: 6px; flex-wrap: wrap; }
body.portal .ptop nav a { color: #c3c8db; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; text-decoration: none; }
body.portal .ptop nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; } body.portal .ptop nav a.on { background: rgba(233, 220, 192, .16); color: var(--pgold-l); }
body.portal .pwho { display: flex; align-items: center; gap: 10px; text-align: left; } body.portal .pwho .small { color: #a9b0c8; }
.pav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #0c173f; background: linear-gradient(135deg, #e9dcc0, #c9a045); }
body.portal .pmain { max-width: 1160px; padding: 20px 16px 30px; }
.pfoot { text-align: center; color: var(--muted); font-size: .82rem; padding: 20px 16px 30px; }
.phero { position: relative; overflow: hidden; border-radius: 20px; padding: 28px 28px; color: #f3f1ea; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 30px; align-items: center;
  background: radial-gradient(circle at 90% 0, rgba(31, 163, 168, .45), transparent 50%), radial-gradient(circle at 0 100%, rgba(123, 63, 140, .35), transparent 50%), linear-gradient(130deg, #0c173f, #13235c 55%, #0d4a63); animation: rise .5s ease both; }
.phero .feather { position: absolute; width: 150px; right: 34%; top: -70px; opacity: .22; transform-origin: 50% 100%; animation: sway 10s ease-in-out infinite; pointer-events: none; }
.phero h1 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 6px 0 4px; } .phero p { margin: 0; color: #d5d9e8; }
.phero .eyebrow { color: var(--pgold-l); } .phero-copy { position: relative; z-index: 1; min-width: 0; }
.phero.slim { grid-template-columns: 1fr; margin-bottom: 18px; }
.phero.mhero { background: radial-gradient(circle at 92% 0, color-mix(in srgb, var(--tc) 70%, transparent), transparent 55%), linear-gradient(130deg, #0c173f, #13235c 60%, color-mix(in srgb, var(--tc) 60%, #13235c)); }
.pstats { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.pstat { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 12px 16px; min-width: 150px; backdrop-filter: blur(4px); }
.pstat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tc); color: #fff; }
.pstat-v { font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.1; } .pstat-l { font-size: .8rem; color: #c3c8db; }
.psec { font-size: 1.45rem; color: var(--navy); margin: 26px 0 12px; display: flex; align-items: center; gap: 12px; }
.psec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--pgold-l), transparent); }
body.portal .pcards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin: 0 0 8px; }
body.portal .pcard { padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid #e3e7f1; box-shadow: 0 6px 22px rgba(19, 35, 92, .07); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; animation: rise .5s ease both; animation-delay: calc(var(--i) * .07s); text-decoration: none; }
body.portal .pcard:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(19, 35, 92, .15); border-color: color-mix(in srgb, var(--tc) 50%, #e3e7f1); }
.pcard-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; background: linear-gradient(110deg, var(--tc), color-mix(in srgb, var(--tc) 55%, #13235c)); }
.pcard-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.pcard-area { font-weight: 700; letter-spacing: .04em; } .pcard-code { font-size: .8rem; opacity: .85; margin-left: auto; }
.pcard-new { background: #fff; color: var(--t-coral); font-weight: 700; font-size: .75rem; border-radius: 999px; padding: 2px 9px; animation: pulse 2.4s infinite; }
.pcard-body { padding: 14px 16px 6px; flex: 1; }
.pcard-title { font-size: 1.2rem; color: var(--navy); line-height: 1.25; } .pcard-stage { font-size: .88rem; color: var(--muted); margin: 4px 0 10px; }
.pcard-stage .mono { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--ink); }
.pcard-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: .8rem; background: #eef1f8; color: var(--ink); }
.pchip.date { background: #fff6dc; color: #7a5a10; } .pchip.st-red { background: #fbeaea; color: #a2291f; } .pchip.st-amber { background: #fff4e0; color: #8a5200; }
.pchip.st-green { background: #e7f5ec; color: #1f7a3d; } .pchip.st-blue { background: #e8effc; color: #1d4fa8; }
.pchip.light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.pcard .pupdate { border-radius: 10px; margin: 10px 0 8px; font-size: .9rem; } .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-go { padding: 10px 16px; border-top: 1px solid #eef1f8; color: var(--tc); font-weight: 700; font-size: .88rem; display: flex; align-items: center; gap: 4px; }
.ltrack { margin: 4px 0 2px; } .ltrack-bar { display: flex; align-items: center; gap: 0; }
.ltrack-dot { flex: 1; height: 6px; background: #e3e7f1; position: relative; } .ltrack-dot:first-child { border-radius: 3px 0 0 3px; } .ltrack-dot:last-child { border-radius: 0 3px 3px 0; }
.ltrack-dot + .ltrack-dot { margin-left: 3px; }
.ltrack-dot.past { background: color-mix(in srgb, var(--tc, #0d8a8f) 45%, #e3e7f1); } .ltrack-dot.now { background: var(--tc, #0d8a8f); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, #0d8a8f) 22%, transparent); }
.ltrack.closed .ltrack-dot { background: #b9e0c6; } .ltrack-lab { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.phero .ltrack { max-width: 520px; margin-top: 12px; } .phero .ltrack-dot { background: rgba(255, 255, 255, .2); } .phero .ltrack-dot.past { background: rgba(233, 220, 192, .55); }
.phero .ltrack-dot.now { background: var(--pgold-l); box-shadow: 0 0 0 3px rgba(233, 220, 192, .3); } .phero .ltrack-lab { color: #d5d9e8; } .phero .ltrack-lab b { color: #fff; }
.pquick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 4px; }
.pq { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid #e3e7f1; }
.pq-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.pq:nth-child(1) .pq-ico { background: linear-gradient(135deg, #9a5bb0, #7b3f8c); } .pq:nth-child(2) .pq-ico { background: linear-gradient(135deg, #1fa3a8, #0d6b70); } .pq:nth-child(3) .pq-ico { background: linear-gradient(135deg, #d2ad62, #a9802f); } .pq:nth-child(4) .pq-ico { background: linear-gradient(135deg, #3d63c9, #23408f); }
body.portal .panel { border-radius: 14px; border-color: #e3e7f1; box-shadow: 0 4px 16px rgba(19, 35, 92, .05); }
body.portal .panel h2 { color: var(--navy); }
body.portal button.primary { background: linear-gradient(135deg, var(--navy), #1d3b8f); border-color: transparent; }
body.portal .crumb { margin-bottom: 10px; }

@media (max-width: 900px) {
  .land-hero { grid-template-columns: 1fr; padding-top: 34px; gap: 28px; } .land-hero .feather.f1 { right: -30px; width: 170px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pquick { grid-template-columns: 1fr; }
  .phero { grid-template-columns: 1fr; padding: 22px 18px; }
}
@media (max-width: 560px) {
  .land-top nav a:first-child { display: none; } .land-brand small { display: none; }
  .feats { grid-template-columns: 1fr; } .journey { flex-wrap: wrap; row-gap: 14px; } .jstep { flex: 0 0 33.33%; } .journey::before { display: none; }
  .land-card { padding: 24px 18px 16px; } .land-sec { padding-top: 38px; }
  .facts { grid-template-columns: 1fr; padding: 18px; } .fact-nav { justify-content: space-between; }
  .pstat { min-width: 0; flex: 1 1 100%; } body.portal .pcards { grid-template-columns: 1fr; }
  body.portal .ptop nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; } body.portal .ptop nav a { white-space: nowrap; padding: 5px 10px; }
  body.portal .pwho { margin-left: auto; } body.portal .pwho > div { display: none; }
}
/* 2.4.2: show / hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 42px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; padding: 0 !important; margin: 0;
  background: none !important; border: 0 !important; box-shadow: none !important; color: #6b7685; cursor: pointer; border-radius: 8px; min-width: 0; }
.pw-eye:hover { color: #1a2b4a; }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye .pw-slash { display: none; } .pw-eye.on .pw-slash { display: inline; } .pw-eye.on { color: #1a2b4a; }
.pw-eye, .pw-eye:focus, .pw-eye:active { background: none !important; outline: none; -webkit-tap-highlight-color: transparent; }
.pw-eye:focus-visible { outline: 2px solid #b8902a; outline-offset: -2px; }
@media (hover: hover) { .pw-eye:hover { background: rgba(26, 43, 74, .06) !important; } }
/* 2.5: client login details, phone sign-in layouts */
.welcome-note { width: 100%; margin-top: 10px; font: .9rem/1.5 ui-monospace, Menlo, monospace; background: #f7f8fb; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.alert.warn { background: var(--amber-soft); color: #7a4a00; border: 1px solid #f0d49a; }
@media (max-width: 560px) {
  form.login { margin: 6vh 16px; padding: 20px 18px; }
  .login-logo { width: 96px; height: 96px; }
  .land-hero { padding-top: 26px; padding-bottom: 34px; gap: 18px; }
  .land-copy h1 { font-size: 2rem; margin: 6px 0 8px; }
  .land-copy .lede { font-size: .98rem; }
  .land-hero .journey { display: none; }
}

/* 2.7 reconciliation statement panel */
.recon-box { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line, #dfe3ea); border-radius: 10px; background: var(--soft); }
.recon-box h3 { margin: 0 0 8px; }
.recon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.recon-head { font-weight: 600; margin: 4px 0; }
.recon-t { width: 100%; border-collapse: collapse; }
.recon-t td { padding: 3px 6px; border-bottom: 1px solid var(--line, #e6e9ef); vertical-align: top; }
.recon-t td.num { text-align: right; white-space: nowrap; }
.recon-t tr.strong td { font-weight: 600; }
.recon-t tr.warn td { background: #fff4ce; font-weight: 600; color: #7a5200; }
.recon-t tr.ok td { color: #1d7a3a; font-weight: 600; }

/* 2.7 view as client */
.view-as-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 16px; background: #fff4ce; color: #5b3d00; border-bottom: 2px solid #e0b100; font-size: .92rem; }
.view-as-bar button { background: #5b3d00; color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; }

/* 2.8: the client's review list before sending, and grouped documents for the firm */
.rv-top { justify-content: space-between; margin: 8px 0; }
.rv-sec { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 6px 10px; background: #fff; }
.rv-sec.need { border-color: #d9a400; background: #fffaf0; }
.rv-sec > summary { cursor: pointer; padding: 4px 0; list-style-position: outside; }
.rv-bulk { gap: 6px; margin: 4px 0 6px; flex-wrap: wrap; }
.rv-grp { margin: 6px 0 4px; }
.rv-ghead { padding: 4px 0; border-bottom: 1px solid var(--line); }
.rv-row { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rv-row.off { opacity: .55; }
.rv-pick { padding-top: 2px; }
.rv-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rv-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rv-edit label { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.rv-edit select, .rv-edit input { max-width: 100%; }
.rv-sum td { vertical-align: top; }
.dg-fy { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; background: #fff; }
.dg-fy > summary { padding: 8px 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--soft); border-radius: 8px; }
.dg-grp { margin: 6px 10px 10px; }
.dg-grp > summary { padding: 4px 0; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dg-bar { position: sticky; top: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.dg-bar .count { font-weight: 600; margin-right: auto; }
.dg-src { font-size: 11px; color: #666; }
.pk-list { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.pk-row { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.pk-row .why { font-size: 12px; }
.pk-row.aside { opacity: .6; }
.rv-ghead, .rv-sec > summary, .dg-fy > summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-ghead label, .rv-top label, .rv-bulk { display: inline-flex; align-items: center; gap: 6px; margin: 0; width: auto; }
.rv-edit label { white-space: nowrap; margin: 0; width: auto; }
.rv-bulk select, .rv-edit select { width: auto; max-width: 100%; }
.rv-bulk { display: flex; }

/* ---------------- 2.9: client cases, key dates, what we need, timeline, photos, folders, notes ---------------- */
.cd { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.cd.near { background: var(--amber-soft); color: var(--amber); } .cd.soon { background: var(--red-soft); color: var(--red); } .cd.late { background: #eef0f3; color: #5b6472; }
.kd-list { display: grid; gap: 8px; margin-top: 10px; }
.kd-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.kd-row.past { opacity: .6; }
.kd-date { text-align: center; border-radius: 8px; background: var(--gold-soft); color: #6e5212; padding: 4px 0; line-height: 1.1; }
.kd-date b { display: block; font-size: 1.3rem; } .kd-date small { font-size: .7rem; }
.kd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.kd-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: .88rem; }
.kd-chip { border-radius: 999px; padding: 3px 10px; background: var(--accent-soft); color: var(--accent); }
.kd-chip.near { background: var(--amber-soft); color: var(--amber); } .kd-chip.soon { background: var(--red-soft); color: var(--red); font-weight: 600; }
.needs { border-left: 4px solid var(--gold); } .needs.ok { border-left-color: var(--green); }
.nd { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; background: #fff; }
.nd-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.nd-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: #6e5212; flex: none; }
.nd-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.nd-act textarea { flex: 1 1 100%; }
.nd-cam { flex: 1 1 100%; } .nd-cam > summary { cursor: pointer; color: var(--accent); }
.plain { border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; background: var(--accent-soft); border: 1px solid #c4d6ef; }
.plain.t-act { background: var(--amber-soft); border-color: #f2d9a6; } .plain.t-good, .plain.t-done { background: var(--green-soft); border-color: #bfe3cb; }
.plain-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .plain-t { font-size: 1.05rem; font-weight: 600; margin-top: 2px; }
.tl29 { display: grid; gap: 10px; }
.tl29-stage { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; } .tl29-stage.now { border-left-color: var(--gold); } .tl29-stage.done { border-left-color: var(--green); }
.tl29-head { display: flex; gap: 10px; align-items: flex-start; }
.tl29-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; }
.tl29-ev { list-style: none; margin: 6px 0 0 34px; padding: 0; font-size: .88rem; }
.tl29-ev li { padding: 2px 0; } .tl29-ev li.up { font-weight: 600; color: var(--accent); } .tl29-ev li.order { color: #6e5212; }
.tl29-d { display: inline-block; min-width: 92px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cam { margin-top: 6px; } .cam-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cam-t { position: relative; width: 64px; height: 84px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #f3f3f3; }
.cam-t img { width: 100%; height: 100%; object-fit: cover; }
.cam-t span { position: absolute; left: 3px; bottom: 3px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .7rem; border-radius: 4px; padding: 0 4px; }
.cam-t button { position: absolute; right: 2px; top: 2px; padding: 0 6px; min-height: 0; line-height: 1.4; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; border: 0; }
.dropzone { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 2px dashed #c9cfdb; border-radius: 12px; padding: 14px; margin: 8px 0; background: #fafbfd; }
.dropzone.over { border-color: var(--gold); background: var(--gold-soft); } .dropzone.off { opacity: .55; }
.dropzone > div { flex: 1 1 200px; } .dropzone .ico { width: 28px; height: 28px; color: var(--muted); }
.kinds { display: grid; gap: 8px; } .kind { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.kind.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
input.from-read, textarea.from-read, select.from-read { border-color: #7cc29a; background: #f3fbf6; }
input.changed, textarea.changed { border-color: #e0b35a; background: #fffaf0; }
.kvt { width: 100%; border-collapse: collapse; margin: 10px 0; table-layout: fixed; } .kvt th, .kvt td { overflow-wrap: anywhere; } .kvt th { text-align: left; width: 40%; font-weight: 600; color: var(--muted); padding: 6px 8px 6px 0; vertical-align: top; } .kvt td { padding: 6px 0; }
.kvt tr + tr th, .kvt tr + tr td { border-top: 1px solid var(--line); }
.panel.send { border: 1px solid var(--gold); }
ol.steps { padding-left: 18px; } ol.steps li { margin: 4px 0; }
.lang-btn { min-height: 0; padding: 4px 10px; font-size: .85rem; border-radius: 999px; }
.land-top .lang-btn { background: transparent; color: inherit; border: 1px solid rgba(255, 255, 255, .45); }
.install-btn.light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.btn.gold, button.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.pcard-id { color: var(--muted); margin-top: 2px; } .pcard-plain { margin-top: 6px; color: var(--ink); }
tr.changed-row td { background: #fffaf0; }
.note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: #fff; } .note.pinned { border-color: var(--gold); background: var(--gold-soft); }
.note-b { white-space: pre-wrap; margin-top: 4px; }
.ok-t { color: var(--green); }
@media (max-width: 640px) {
  .kd-row { grid-template-columns: 48px 1fr; } .kd-right { grid-column: 2; flex-direction: row; align-items: center; }
  .tl29-ev { margin-left: 0; } .tl29-d { min-width: 0; display: block; }
}

/* ---------- 2.10 ---------- */
@media (min-width: 761px) { .case-line { grid-template-columns: minmax(200px, 2.2fr) minmax(130px, 1.2fr) minmax(150px, 1.3fr) minmax(150px, 1.2fr) minmax(110px, .9fr) 40px; } }
.cl-status { background: none; border: 0; padding: 2px 0; text-align: left; cursor: pointer; font: inherit; color: var(--muted); white-space: nowrap; }
button.cl-status:hover .badge, .status-btn:hover .badge { outline: 2px solid var(--accent); outline-offset: 1px; }
.status-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--muted); }
@media (max-width: 760px) { .case-line .cl-status { grid-column: 1 / 3; } }
/* the warning pop-up */
.warn-back { z-index: 1200; }
.warn-modal { max-width: 640px; border-top: 6px solid #c62828; }
.warn-h h2 { color: #b71c1c; }
.warn-list { margin: 4px 0 12px; padding-left: 26px; }
.warn-list li { color: #b71c1c; font-weight: 600; margin: 6px 0; line-height: 1.4; }
.warn-list li::marker { color: #b71c1c; font-weight: 700; }
.warn-list .warn-t { color: #b71c1c; }
.warn-more summary { font-weight: 400; color: var(--muted); font-size: 12px; cursor: pointer; }
.warn-tick { margin-top: 8px; font-weight: 600; }
/* 2.10: "Now at" – the stage the case is at today */
.now-at { border-left: 4px solid var(--gold, #b08d3c); }
.now-at .row { gap: 8px; flex-wrap: wrap; align-items: center; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.now-kv { display: flex; flex-direction: column; }
.now-kv .k { font-size: 12px; color: var(--muted, #666); }
.now-kv .v { font-weight: 600; }
.cl-against { font-size: 11px; color: var(--muted, #666); }
.cl-status { min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 2px; }
.cl-status .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
/* 2.10: client login – Vakalatnama first */
.vak-mail { margin-top: 10px; }
.vak-mail a { font-weight: 700; }
.vak-first { border: 2px solid var(--amber, #d98b00); }
.vak-parties ul { margin: 4px 0 0 18px; padding: 0; }
.locked-up { background: #fafafa; }
.pmodal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pmodal { background: #fff; border-radius: 12px; max-width: 520px; width: 100%; padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.25); border-top: 5px solid var(--amber, #d98b00); }
.pmodal h2 { margin-top: 0; }
.warn-chip { background: #fde8e8; color: #9b1c1c; border: 1px solid #f5b5b5; border-radius: 999px; padding: 4px 12px; font-weight: 600; cursor: pointer; margin: 0 8px 8px 0; }
.warn-chip:hover { background: #fbd5d5; }
.warn-inline { border: 1px solid #f5b5b5; background: #fff5f5; border-radius: 8px; padding: 8px 12px; margin: 8px 0; color: #9b1c1c; }
.warn-inline .warn-list { margin: 4px 0 0 18px; }
.earlier-levels { margin-top: 14px; border-top: 1px solid var(--line, #e5e7eb); padding-top: 10px; }
.el-block { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 8px 12px; margin: 8px 0; background: #fbfcfe; }
.el-block input.filled { outline: 2px solid #f0c36d; }
.perm-table td.changed { background: #fff6dd; }
.perm-table td, .perm-table th { padding: 6px 10px; }
.nt-table input { min-width: 0; }
.nt-table td { vertical-align: top; }
.nt-table td input + input { margin-top: 4px; }
.act-warn td { color: #9b1c1c; }

.panel.vak-signed { margin-bottom: 14px; }
.panel.vak-waiting { border: 2px solid #d64545; box-shadow: 0 0 0 3px #fdecec; }

/* 2.11: notifications */
.bell { position: relative; margin-left: auto; }
.bell-btn { position: relative; font-size: 20px; line-height: 1; padding: 8px 10px; background: #fff; border: 1px solid var(--line, #dcdcd6); border-radius: 10px; cursor: pointer; }
.bell-btn.ring { animation: bellring .5s ease-in-out 2; }
@keyframes bellring { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d64545; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #dcdcd6; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); z-index: 60; }
.bp-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; }
.bp-f { padding: 10px 12px; border-top: 1px solid #eee; font-size: 13px; }
.notif { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0efe9; color: inherit; text-decoration: none; }
.notif:hover { background: #f7f6f1; }
.notif.unread { background: #fdf6e6; }
.notif.unread .nf-h { font-weight: 600; }
.notif .nf-i { font-size: 18px; width: 24px; text-align: center; flex: none; }
.notif .nf-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif .nf-b { font-size: 12.5px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif .nf-d { font-size: 11.5px; color: #888; }
.notif-page { padding: 0; overflow: hidden; }
.seen-line { font-size: 11.5px; color: #6b6b6b; margin-top: 2px; }
.seen-line.ack { color: #2e7d32; }
.btn-ack { font-size: 12px; padding: 2px 8px; margin-top: 3px; }
.vak-signed-btn[disabled] { opacity: .55; }
tr.doc-hi td { background: #fff4cc !important; transition: background 1s; }
/* 2.11: the client login's bell (in the dark header) */
.ptop nav .bell { position: relative; display: inline-flex; margin-left: 0; }
.ptop .pbell { position: relative; font-size: 18px; text-decoration: none; }
.ptop .bell-panel { color: #1f2937; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); }
.ptop .bell-panel .bp-h b, .ptop .bell-panel button { color: #1f2937; }
.ptop .bell-panel a.notif, .ptop .bell-panel a.notif * { color: #1f2937 !important; opacity: 1; font-weight: normal; }
.ptop .bell-panel a.notif.unread .nf-h { font-weight: 600; }
.ptop .bell-panel a.notif .nf-d { color: #777 !important; font-size: 11.5px; }
.ptop .bell-panel .empty { color: #555; }
.hidden.bell-panel, .hidden.bell-count { display: none; }
body.portal .ptop .bell-panel a.notif { display: flex; border-radius: 0; padding: 10px 12px; white-space: normal; gap: 10px; align-items: flex-start; }
body.portal .ptop .bell-panel a.notif:hover { background: #f7f6f1; }
body.portal .ptop .bell-panel a.notif.unread { background: #fdf6e6; }
body.portal .ptop .bell-count { right: -2px; top: -4px; }
@media (max-width: 760px) { body.portal .ptop .bell-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; } }
