/* Per-screen alignment with mock v25, group p. */

/* ---- participants / profile ---- */
.participants-workspace .pt-layout{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:18px;align-items:start}
@media(max-width:900px){.participants-workspace .pt-layout{grid-template-columns:minmax(0,1fr)}}
.participants-workspace .pt-row .r{max-width:150px}
.participants-workspace .pt-row .r b{margin-top:2px}
.participants-workspace .participant-toolbar{justify-content:flex-start}
.participant-profile .top{align-items:flex-start}
.participant-profile .participant-identity{flex:1 1 220px;min-width:0}
.participant-profile .participant-identity h2{margin:0;font-size:20px;line-height:1.25}
.participant-profile .participant-ndis{font-weight:400;font-size:15px}
.participant-profile .participant-access-note{margin:6px 0 0;color:#8A5300;font-size:12px}
.participant-profile .plan-figures{text-align:right;margin-left:auto;min-width:0;max-width:100%}
.participant-profile .plan-figures .remain{font-size:26px;font-weight:600;line-height:1.15;margin:2px 0}
.participant-profile .plan-figures .tiny{font-size:11.5px}
.participant-profile .plan-balance-note{margin:12px 0 0}
.participant-profile .fund .f .amt b{font-weight:600}
.participant-profile .docs{grid-template-columns:repeat(2,minmax(0,1fr))}
.participant-profile .docs>div{align-items:flex-start}
.participant-profile .docs>div>span:last-child{flex:none;text-align:right;font-size:12px}
.participant-profile .participant-team-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap;align-items:center}
.participant-profile .participant-actions{margin-top:18px;padding-top:14px;border-top:1px solid var(--line-2);display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.participant-profile .participant-agreement-lines{margin-top:10px}
.participant-profile .agreement-line-figures{max-width:100%;overflow-x:auto}
.participant-profile .plan-category-lines{margin-top:10px}
.participant-profile .plan-category-lines table{width:100%}
@media(max-width:700px){
  .participant-profile .plan-figures{text-align:left;margin-left:0;flex-basis:100%}
  .participant-profile .docs{grid-template-columns:minmax(0,1fr)}
  .participant-profile .fund .f{grid-template-columns:1fr 1fr 1fr}
  .participant-profile .fund .f .cat{grid-column:1/-1}
  .participant-profile .kvgrid{grid-template-columns:minmax(0,1fr)}
}
.participant-profile .participant-actions .btn.link,.participant-profile .participant-team-actions .btn.link{padding:5px 4px}
@media(max-width:700px){
  .participant-pagehead{flex-wrap:nowrap}
  .participant-pagehead .actions{flex-direction:row!important;width:auto!important;flex-wrap:wrap;gap:6px!important;margin:0}
  .participant-pagehead .actions .btn{max-width:none!important;white-space:nowrap!important;font-size:12px;padding:5px 8px;min-height:32px}
}
.record-form fieldset.form-section{border:1px solid var(--line);border-radius:8px;padding:6px 14px 4px;margin:0 0 16px;min-width:0}
.record-form fieldset.form-section>legend{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--ink-3);padding:0 6px;margin:0}
.record-form fieldset.form-section>div{margin:12px 0}
@media(min-width:700px){
  .record-form fieldset.form-section{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
  .record-form fieldset.form-section>legend{grid-column:1/-1}
  .record-form fieldset.form-section>div:has(textarea),.record-form fieldset.form-section>div:has(select[multiple]),.record-form fieldset.form-section>div:has(fieldset){grid-column:1/-1}
}
.record-form fieldset.form-section textarea{min-height:0;height:76px}

/* ---- plan overview ---- */
.plan-utilisation{margin:18px 0}
.plan-utilisation .plan-utilisation-row{padding:9px 0;border-bottom:1px solid var(--line-2)}
.plan-utilisation .plan-utilisation-label{font-size:12.5px;margin-bottom:5px;align-items:baseline}
.plan-utilisation .plan-utilisation-row .stack{margin-top:0}
.plan-utilisation .plan-utilisation-row.selected{background:none;padding-inline:0}
.plan-budget-breakdown{margin:0 0 18px}
.plan-budget-breakdown .plan-budget-table{min-width:0;margin-top:12px}
.plan-budget-breakdown .plan-budget-table th,.plan-budget-breakdown .plan-budget-table td{white-space:normal}
.plan-budget-breakdown .plan-budget-table td:not(:first-child){white-space:nowrap;min-width:0}
.plan-budget-breakdown .plan-budget-table td:nth-child(8){white-space:normal}
.plan-budget-breakdown .plan-edit-link{margin-left:8px;font-size:12px;padding:2px 8px}
@media(max-width:900px){
  .plan-budget-breakdown .plan-budget-table thead{display:none}
  .plan-budget-breakdown .plan-budget-table,.plan-budget-breakdown .plan-budget-table tbody,.plan-budget-breakdown .plan-budget-table tr,.plan-budget-breakdown .plan-budget-table td{display:block;width:100%;min-width:0}
  .plan-budget-breakdown .plan-budget-table tr{padding:10px 0;border-bottom:1px solid var(--line)}
  .plan-budget-breakdown .plan-budget-table td{display:flex;justify-content:space-between;gap:12px;border:0;padding:3px 0;text-align:right;white-space:normal!important}
  .plan-budget-breakdown .plan-budget-table td::before{content:attr(data-label);color:var(--ink-3);font-size:12px;text-align:left}
  .plan-budget-breakdown .plan-budget-table td:first-child{justify-content:flex-start;align-items:center;font-size:14px}
  .plan-budget-breakdown .plan-budget-table td:first-child::before{display:none}
}
.plan-summary-metrics .metric .d{margin-top:7px}
.plan-budget-breakdown td a:not(.btn){text-decoration:none;color:inherit}

/* ---- forms directory ---- */
.forms-directory .forms-participant-grid{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:14px;margin-top:14px}
.forms-directory .forms-participant-grid .pickrow{height:100%;margin:0}
.forms-directory .forms-participant-grid .track{height:8px;background:var(--line-2);border-radius:999px;overflow:hidden}
.forms-directory .forms-participant-grid .track i{display:block;height:100%}
.forms-directory .forms-directory-desktop-search{position:static;margin:0 0 8px}

/* ---- participant forms / medication chart ---- */
.medication-chart .medrow{grid-template-columns:1.6fr 1fr 1.4fr .6fr auto;align-items:start}
.medication-chart .medrow.medhead{font-weight:600;color:var(--ink-3);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.medication-chart .med-entry .med-detail{grid-column:1/-1;margin-top:-2px}
.medication-chart .med-entry .med-detail p{margin:3px 0}
.medication-chart .med-add{margin-top:10px;color:var(--brand);border-color:var(--line)}
.medication-chart .med-add:hover{background:var(--brand-tint)}
.medication-chart .medrow>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){.medication-chart .medrow{grid-template-columns:1fr 1fr}.medication-chart .medrow.medhead{display:none}.medication-chart .med-entry>span:first-child{grid-column:1/-1}}
.form-document-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.participant-form-fields details.more-terms,.participant-form-fields details.signing-panel{margin:12px 0;border:1px solid var(--line);border-radius:8px;padding:10px 14px}
.participant-form-fields details>summary{cursor:pointer;font-weight:600;font-size:13px}
.participant-form-fields details.field-help{margin-top:4px;font-size:12px}
.participant-form-fields details.field-help>summary{font-weight:500;color:var(--brand)}
@media(max-width:1000px){.participant-forms-workspace .forms-picker{max-height:none}}
.medication-chart .allergies{margin-bottom:16px}

/* ---- office reports ---- */
.report-workspace .report-heading-row{justify-content:flex-start}
.report-workspace .report-submit-link{margin-left:auto}
.report-workspace .report-results-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.report-workspace .report-results-head h3{margin:0}
.report-workspace .report-review-counts{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}
.report-workspace .report-review-counts a.revpill{text-decoration:none}
.report-workspace .report-review-counts a.revpill.on{outline:2px solid currentColor;outline-offset:1px}
.report-workspace .report-review-counts .lamp{width:8px;height:8px;margin:0}
.report-workspace .report-tag-form{margin:10px 0 0}
.report-workspace .report-links{display:flex;flex-wrap:wrap;gap:6px 22px;margin:16px 0;align-items:flex-start}
.report-workspace .report-link-detail{margin:0;font-size:13px}
.report-workspace .report-link-detail>summary{margin:0;color:var(--brand);font-weight:500;cursor:pointer}
.report-workspace .report-link-detail[open]{flex:1 1 100%}
.report-workspace .report-link-detail[open]>summary{margin-bottom:8px}
.report-workspace .rpitem .m{margin:5px 0 0}
@media(max-width:700px){.report-workspace .rpcat{grid-template-columns:1fr 1fr}.report-workspace .rpcat .rpbtn{min-height:0;padding:12px}.report-workspace .rpbtn .m{display:none}.report-workspace .report-heading-row .btn{max-width:none}}

/* ---- report dialog ---- */
.report-dialog .report-kv{margin:4px 0 14px}
.report-dialog .report-kv>span{padding:7px 0;border-bottom:1px solid var(--line-2)}
.report-dialog .report-kv>span:nth-last-child(-n+2){border-bottom:0}
.report-dialog .report-more{margin:12px 0}
.report-dialog .report-more>summary{cursor:pointer;font-weight:600;font-size:13px}
.report-dialog .report-followup{margin:10px 0}
.report-dialog .report-review-note{margin:10px 0}
.report-dialog-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 0 4px;margin-top:16px;background:#fff;border-top:1px solid var(--line);z-index:2}
.report-dialog-footer .dialog-only{display:inline-flex}

/* ---- evidence library ---- */
.evidence-workspace>.pagehead{align-items:flex-start}
.evidence-workspace .ev-head-actions{display:flex;gap:10px;align-items:center;flex:none}
.evidence-workspace .ev-menu{position:relative}
.evidence-workspace .ev-menu>summary{list-style:none;cursor:pointer;color:var(--brand);font-size:13px;font-weight:500;padding:6px 4px}
.evidence-workspace .ev-menu>summary::-webkit-details-marker{display:none}
.evidence-workspace .ev-menu-list{position:absolute;right:0;top:100%;z-index:6;min-width:230px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 20px rgba(0,0,0,.12);padding:6px;display:flex;flex-direction:column}
.evidence-workspace .ev-menu-list a{padding:8px 10px;border-radius:5px;font-size:13px;text-decoration:none;color:var(--ink)}
.evidence-workspace .ev-menu-list a:hover{background:var(--brand-tint)}
.evidence-workspace .contrast{grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr))}
.evidence-workspace .contrast .card h3{font-size:14px}
.evidence-workspace .contrast .explain{font-size:13px}
.evidence-workspace .ev-card-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.evidence-workspace .ev-footnote{margin-top:10px}
.evidence-workspace .ev-filters{gap:12px}
.evidence-workspace .ev-filters .ev-count{margin-left:2px}
.evidence-workspace .ev-more-filters{margin-top:8px;font-size:12px}
.evidence-workspace .ev-more-filters>summary{cursor:pointer;color:var(--brand);width:max-content}
.evidence-workspace .ev-more-filters .filterbar{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.evidence-workspace .ev-row.selected{background:#EEF6F1;border-color:var(--brand)}
.evidence-workspace .ev-row .tag{font-size:11px;border:1px solid var(--line);border-radius:4px;padding:2px 8px;background:#fff;justify-self:start;white-space:nowrap}
.evidence-workspace details.ev-cat>summary{cursor:pointer;list-style:none}
.evidence-workspace details.ev-cat>summary::-webkit-details-marker{display:none}
.evidence-workspace details.ev-cat>summary h3::before{content:"\25B8";color:var(--ink-3)}
.evidence-workspace details.ev-cat[open]>summary h3::before{content:"\25BE"}
.evidence-workspace .workspace-panel .ev-cols{margin-top:12px}
.evidence-workspace .workspace-panel .ev-cols .it{background:#fff}
.evidence-workspace .workspace-panel .ev-cols .it.empty{border-style:dashed;background:#FFFDF8;color:#8A5300}
.evidence-workspace .workspace-panel .notice{margin:14px 0 6px;font-size:13px}
.evidence-workspace .workspace-panel .ev-actions .btn{width:100%}
.requirement-linked .tbl .tag{font-size:11px;border:1px solid var(--line);border-radius:4px;padding:2px 8px;background:#fff;white-space:nowrap}
.requirement-linked .tbl td{vertical-align:top}
.requirement-linked .notice{margin:14px 0 8px}
@media(max-width:700px){
  .evidence-workspace>.pagehead{flex-direction:column;gap:10px}
  .evidence-workspace>.pagehead>.ev-head-actions{flex:none;max-width:none;width:100%;justify-content:space-between}
  .evidence-workspace>.pagehead>.ev-head-actions>.btn{flex:none;max-width:none;white-space:nowrap}
  .evidence-workspace .ev-menu-list{left:0;right:auto}
  .evidence-workspace .ev-filters{gap:8px}
  .evidence-workspace .ev-filters .seg{width:100%}
  .evidence-workspace .ev-filters .seg a{flex:1 1 auto;text-align:center}
}
