/* Partner and admin workspace. Quieter than the public site: the data is the design. */
.portal { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 57px); background: var(--mist); }
.p-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
.p-who { padding: 0 10px 14px; border-bottom: 1px solid var(--line); }
.p-who b { display: block; }
.p-who span { font-size: 13px; color: var(--ink-3); }
.p-nav { display: grid; gap: 2px; }
.p-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.p-nav a:hover { background: var(--mist); color: var(--ink); }
.p-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.p-nav em { font-style: normal; font-size: 12px; font-weight: 700; background: var(--saffron); color: var(--ink); border-radius: 99px; padding: 1px 8px; }
.p-logout { margin-top: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px; font: 500 14px var(--ui); color: var(--ink-2); cursor: pointer; }
.p-main { padding: 24px clamp(16px, 3vw, 36px) 64px; min-width: 0; }
.p-head h1 { font: 500 clamp(28px, 3vw, 38px)/1.1 var(--display); margin: 0 0 18px; }
@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; }
  .p-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 8px; }
  .p-who { border: 0; padding: 0; flex: 1; }
  .p-nav { display: flex; overflow-x: auto; width: 100%; order: 3; }
  .p-nav a { white-space: nowrap; }
  .p-logout { margin: 0; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 20px; }
.kpi { background: #fff; box-shadow: 0 0 0 1px var(--line); padding: 16px 18px; display: grid; gap: 2px; text-decoration: none; color: var(--ink); }
a.kpi:hover { background: #f8faff; }
.kpi b { font: 600 26px/1.1 var(--ui); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13.5px; color: var(--ink-3); }

.p-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.p-grid .span-2 { grid-column: span 2; }
@media (max-width: 1200px) { .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .p-grid { grid-template-columns: 1fr; } .p-grid .span-2 { grid-column: auto; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font: 600 16px/1.2 var(--ui); margin: 0; }
.panel-head a { font-size: 14px; }
.panel .empty { padding: 20px; }

.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ptable th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 10px; border-bottom: 1px solid #edf0f6; vertical-align: top; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .r { text-align: right; white-space: nowrap; }
.ptable a { color: var(--ink); }
.ptable a:hover { color: var(--cobalt); }
.ptable select { width: auto; padding: 6px 8px; font-size: 14px; }
.outcome { margin-top: 6px; font-size: 13.5px; background: var(--mist); padding: 6px 8px; border-radius: 3px; }
.outcome.admin { background: #fff4d1; }
.msgtext { max-width: 48ch; white-space: pre-line; }
.late { color: var(--red); font-weight: 600; }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--mist); color: var(--ink-2); white-space: nowrap; }
.st-pending, .st-draft, .st-submitted, .st-uploaded, .st-queued { background: #fff4d1; color: #6a4d00; }
.st-active, .st-live, .st-verified, .st-approved, .st-sent, .st-received, .st-in_progress { background: #e5f3e7; color: #1f6a2c; }
.st-won { background: var(--ink); color: #fff; }
.st-assigned, .st-open { background: #e8eefc; color: var(--cobalt-deep); }
.st-vetoed, .st-rejected, .st-failed, .st-suspended, .st-lost { background: #fdeceb; color: #9c2118; }
.st-sold, .st-withdrawn, .st-on_hold, .st-closed, .st-converted, .st-new { background: #eef0f5; color: var(--ink-2); }
.st-new { background: #e8eefc; color: var(--cobalt-deep); }

.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #edf0f6; }
.queue li:first-child { border-top: 0; }
.q-main { display: grid; min-width: 0; }
.q-main a { color: var(--ink); }
.q-main .muted { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-kind { font-size: 12px; font-weight: 700; padding: 3px 0; border-left: 3px solid; padding-left: 8px; }
.k-partner, .k-services { border-color: var(--green); color: #1f6a2c; }
.k-mandate { border-color: var(--cobalt); color: var(--cobalt-deep); }
.k-property { border-color: var(--saffron); color: #6a4d00; }
.k-task { border-color: var(--copper); color: #8a3d12; }
.k-document { border-color: var(--red); color: #9c2118; }
.q-at { font-size: 13px; white-space: nowrap; }
@media (max-width: 760px) { .queue li { grid-template-columns: 1fr; gap: 6px; } }
.dec { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.barlist a, .barlist span:first-child { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist .bar { height: 10px; background: var(--mist); border-radius: 2px; overflow: hidden; }
.barlist .bar i { display: block; height: 100%; background: var(--cobalt); border-radius: 2px; }
.barlist b { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); }

.m-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.m-status .spacer { flex: 1; }
.notice { background: #fff4d1; border-left: 4px solid var(--saffron); padding: 10px 14px; border-radius: 3px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.inline-form { display: flex; gap: 8px; margin-top: 16px; }
.inline-form select { flex: 1; }
.doccheck { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.doccheck li { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; border: 1px dashed var(--line); color: var(--ink-3); }
.doccheck li.have { border: 1px solid #b9dcbf; background: #e5f3e7; color: #1f6a2c; }
.doccheck li.have::before { content: "✓ "; }
.thread { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; margin-bottom: 12px; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.bubble p { margin: 0 0 2px; white-space: pre-line; }
.bubble span { font-size: 11.5px; color: var(--ink-3); }
.bubble.out { justify-self: end; background: #dff3dc; border-bottom-right-radius: 2px; }
.bubble.in { justify-self: start; background: var(--mist); border-bottom-left-radius: 2px; }
.wa-form { display: grid; gap: 8px; }
.wa-form textarea { min-height: 70px; }
.toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.services-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.checks.one-col { grid-template-columns: 1fr; }
.thumbs-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs-row img { width: 80px; height: 60px; object-fit: cover; border-radius: 3px; }
code { background: var(--mist); padding: 1px 5px; border-radius: 3px; font-size: .92em; }
