/* UNITY shared presentation. Supplied reference mapped to real Blade pages. */
:root {
 --brand:#315be8; --brand-hover:#2448c6; --brand-soft:#edf2ff;
 --nav:#111d32; --nav-text:#b9c5d9; --canvas:#f5f7fb; --surface:#fff;
 --text-strong:#182336; --text-body:#344157; --text-muted:#687589; --border:#e3e8ef;
 --success:#157454; --success-soft:#eaf7f0; --warning:#8b590d; --warning-soft:#fff5e4;
 --danger:#b23846; --danger-soft:#fff0f2; --radius:12px;
 --motion-fast:160ms; --motion-normal:200ms;
 /* Existing module aliases share these tokens; no second theme. */
 --unity-blue:var(--brand); --unity-bg:var(--canvas); --unity-muted:var(--text-muted);
 --unity-border:var(--border); --unity-radius:var(--radius); --unity-ink:var(--text-strong);
 --unity-accent:var(--brand); --unity-line:var(--border);
}
* { box-sizing:border-box; }
body { margin:0; background:var(--canvas); color:var(--text-body); font:15px/1.65 system-ui,-apple-system,"Segoe UI","Noto Sans Thai",Tahoma,sans-serif; }
a { color:var(--brand); text-decoration:none; }
a:hover { text-decoration:underline; }
h1,h2,h3,h4 { color:var(--text-strong); line-height:1.5; overflow-wrap:anywhere; }
h1 { font-size:28px; margin:0 0 20px; font-weight:650; }
h2 { font-size:19px; margin:0 0 12px; font-weight:650; }
h3 { font-size:16px; }
p { margin:8px 0 14px; overflow-wrap:anywhere; }
small,.note { color:var(--text-muted); font-size:13px; line-height:1.65; }
input,select,textarea,button,.button { font:inherit; max-width:100%; border:1px solid #cdd5e0; border-radius:8px; padding:9px 12px; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=hidden])),select,textarea { width:100%; background:var(--surface); color:var(--text-strong); min-height:42px; }
textarea { resize:vertical; }
input[type=checkbox],input[type=radio] { width:18px; height:18px; vertical-align:middle; accent-color:var(--brand); }
button,.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--brand); border-color:var(--brand); color:#fff; min-height:42px; cursor:pointer; line-height:1.5; text-align:center; }
button:hover,.button:hover { background:var(--brand-hover); text-decoration:none; }
button.secondary,.button.secondary { background:var(--surface); color:var(--text-body); border-color:var(--border); }
button.secondary:hover,.button.secondary:hover { background:var(--canvas); }
button:disabled { opacity:.55; cursor:not-allowed; }
button,.button,input,select,textarea { transition:background-color var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast); }
button:active:not(:disabled),.button:active { transform:translateY(1px); }
form>button { margin-top:16px; }
:focus-visible { outline:3px solid #315be85c; outline-offset:3px; }
label { display:block; margin-bottom:6px; font-size:14px; color:var(--text-body); }
label>input,label>select,label>textarea { margin-top:6px; }
label>input[type=checkbox],label>input[type=radio] { margin-top:0; }
fieldset { border:0; padding:0; min-width:0; }
legend { font-weight:650; color:var(--text-strong); margin-bottom:14px; }
details { min-width:0; }
summary { cursor:pointer; padding:8px 0; }
pre,.pre-wrap,.preserve-text,.task-prose { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; }
pre { font-size:13px; }
[hidden] { display:none!important; }
.grid,.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.field { margin-bottom:16px; }
.business-form { max-width:1000px; }
.business-form .field { margin-bottom:0; }
.field-error { color:var(--danger); font-size:14px; margin:6px 0 0; }
[aria-invalid=true] { border-color:var(--danger); }
.field-help-link { display:inline-flex; align-items:center; min-height:44px; font-size:14px; }
.choice-more { margin-top:4px; }
.field [data-choice-status]:empty { display:none; }
.field input[type=search]+select { margin-top:8px; }
.inline,.toolbar,.page-actions,.filter-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.toolbar { margin-bottom:18px; }
.inline { margin:0; }
.inline select { width:auto; }
.card { min-width:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; margin-bottom:20px; box-shadow:0 2px 8px #18233603; }
details.card>summary { font-weight:600; padding:0; }
details.card[open]>summary { margin-bottom:16px; }
.form-section { margin:0 0 24px; padding-bottom:20px; border-bottom:1px solid var(--border); }
.form-section>summary { font-weight:600; }
.form-section[open]>.grid { margin-top:16px; }
.form-footer { display:flex; align-items:center; gap:12px; padding-top:8px; }
.notice,.error { padding:12px 16px; margin:0 0 18px; border-radius:8px; border:1px solid #cde8d9; background:var(--success-soft); color:var(--success); overflow-wrap:anywhere; }
.error { border-color:#f0cdd2; background:var(--danger-soft); color:var(--danger); }
.notice-warning,[data-demo-banner] { background:var(--warning-soft); border-color:#eed9ae; color:var(--warning); }
[data-demo-banner] { padding:6px 12px; font-size:12px; margin-bottom:16px; }
.table { max-width:100%; overflow-x:auto; border-radius:10px; }
table { border-collapse:collapse; width:100%; font-size:14px; }
th,td { padding:14px 16px; text-align:left; border-bottom:1px solid var(--border); overflow-wrap:anywhere; vertical-align:top; }
th { background:#f8f9fc; color:var(--text-muted); font-weight:600; font-size:13px; white-space:nowrap; }
td p { margin:4px 0; }
tr:last-child>td { border-bottom:0; }
.numeric,.record-money,.record-key,.metric strong,.task-stats strong,[data-stock-quantity] { font-variant-numeric:tabular-nums; }
.numeric { text-align:right; }
.record-money { color:var(--text-strong); font-size:26px; font-weight:650; line-height:1.4; }
.record-money small { font-size:14px; font-weight:500; margin-left:6px; }
.record-key { font-size:13px; color:var(--text-muted); }
.status-badge,.task-badge,.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:5px; background:#eef1f6; color:#596578; font-size:12px; line-height:1.6; }
.status-badge[data-status=APPROVING],.status-badge[data-status=SUBMITTED],.status-badge[data-status=PENDING],.status-badge[data-status=IN_PROGRESS],.status-badge[data-status=ACTIVE] { background:var(--brand-soft); color:var(--brand-hover); }
.status-badge[data-status=APPROVED],.status-badge[data-status=PARTIALLY_PAID] { background:var(--warning-soft); color:var(--warning); }
.status-badge[data-status=SIGNED],.status-badge[data-status=PAID],.status-badge[data-status=COMPLETED],.status-badge[data-status=GREEN],.status-badge[data-status=DONE] { background:var(--success-soft); color:var(--success); }
.status-badge[data-status=RETURNED],.status-badge[data-status=REJECTED],.status-badge[data-status=RED],.task-overdue { background:var(--danger-soft); color:var(--danger); }
.status-badge[data-status=YELLOW] { background:var(--warning-soft); color:var(--warning); }
.record-top,.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
[data-period-summary] .record-top { flex-wrap:wrap; align-items:baseline; }
[data-period-summary] .numeric { white-space:nowrap; margin-left:auto; }
.section-heading h2 { margin:0; }
.section-heading>a { font-size:13px; flex-shrink:0; }
.page-heading { display:flex; align-items:start; justify-content:space-between; gap:20px; margin:0 0 24px; flex-wrap:wrap; }
.page-heading h1,.toolbar h1 { margin:0; }
.page-heading p { margin:6px 0 0; max-width:75ch; }
.page-heading>.page-actions:empty { display:none; }
.record-list,.task-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.record-list>.card,.task-list>.card { margin-bottom:0; }
.record-list h2,.task-card h2 { font-size:18px; margin:6px 0; }
.project-card-title a,.compact-record h3 a,.document-record h2 a,.project-table td:first-child>a,.approval-record h3 a { color:var(--text-strong); }
.project-card-title a:hover,.compact-record h3 a:hover,.document-record h2 a:hover,.project-table td:first-child>a:hover,.approval-record h3 a:hover { color:var(--brand); }
.task-card,.task-detail,.notice-card { overflow-wrap:anywhere; }
.notice-card h2 { margin:0; font-size:17px; }
.task-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:16px; margin-bottom:24px; }
.task-stats .card { margin:0; padding:16px 20px; color:inherit; }
.task-stats span { display:block; font-size:13px; color:var(--text-muted); }
.task-stats strong { display:block; margin-top:6px; font-size:28px; font-weight:650; color:var(--text-strong); }
.task-urgent { border-left:3px solid var(--danger); }
.task-meta,dl { display:grid; grid-template-columns:minmax(110px,1fr) minmax(0,2fr); gap:8px 20px; }
.task-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
dt { color:var(--text-muted); } dd { margin:0; overflow-wrap:anywhere; }
.task-comment,.task-event,.checklist-item { border-top:1px solid var(--border); padding:12px 0; overflow-wrap:anywhere; }
.task-event time { color:var(--text-muted); }
.task-detail form { margin-top:20px; }
.task-filters { width:100%; }
.pagination { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:24px; }
.pagination a { padding:8px 14px; background:var(--surface); border:1px solid var(--border); border-radius:8px; }
.empty-state { padding:36px 24px; border:1px dashed #cdd5e0; border-radius:var(--radius); background:var(--surface); text-align:center; }
.empty-state p { color:var(--text-muted); margin:6px 0 16px; }
.empty-state p:last-child { margin-bottom:0; }
.empty-state h2 { font-size:18px; }
.filter-bar,form[method=get].card { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:14px 16px; }
.filter-bar label,form[method=get].card>label { flex:1 1 180px; max-width:360px; margin:0; }
.filter-bar details { flex-basis:100%; }
.filter-bar .grid { margin:12px 0; }
.filter-bar>button,form[method=get].card>button { margin-top:0; }
.search-toolbar { display:flex; align-items:center; gap:10px; margin:0 0 18px; }
.search-field { display:flex; flex:1; min-width:0; margin:0; position:relative; }
.search-field>input { margin:0; padding-left:38px; }
.search-field>.unity-icon { position:absolute; top:12px; left:12px; color:var(--text-muted); pointer-events:none; }
.search-toolbar>button { margin:0; }
.advanced-filters { flex-shrink:0; }
.advanced-filters>summary { display:flex; align-items:center; gap:6px; min-height:42px; padding:9px 12px; border:1px solid var(--border); background:var(--surface); border-radius:8px; list-style:none; }
.advanced-filters>summary::-webkit-details-marker { display:none; }
.advanced-filters[open] { flex:1 1 100%; }
.advanced-filters[open]>.filter-panel-content { background:var(--surface); padding:16px; margin-top:12px; border:1px solid var(--border); border-radius:var(--radius); }
.filter-dialog { padding:0; width:min(620px,calc(100% - 32px)); max-height:calc(100dvh - 48px); border:1px solid var(--border); border-radius:14px; color:var(--text-body); box-shadow:0 18px 70px #111d3233; }
.filter-dialog::backdrop { background:#111d326b; }
.filter-panel-content { padding:24px; }
.filter-panel-content>header,.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.filter-panel-content h2 { margin:0; }
.filter-panel-content>footer { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.filter-chips { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 16px; }
.filter-chips a { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--border); padding:4px 10px; border-radius:20px; background:var(--surface); font-size:13px; overflow-wrap:anywhere; }
.status-tabs,.workbench-shortcuts,.project-tabs { display:flex; gap:8px; margin:0 0 18px; }
.status-tabs a,.workbench-shortcuts a,.project-tabs a { display:inline-flex; align-items:center; padding:8px 12px; border:1px solid var(--border); background:var(--surface); border-radius:8px; min-height:40px; }
a[aria-current=page] { background:var(--brand-soft); color:var(--brand-hover); font-weight:600; }
.workbench-shortcuts,.project-tabs { flex-wrap:wrap; }
.workbench-columns { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:24px; align-items:start; }
.workbench-columns>.card { margin-bottom:0; }
.compact-record { border-top:1px solid var(--border); padding:14px 0; overflow-wrap:anywhere; }
.compact-record:first-child { border-top:0; padding-top:0; }
.compact-record:last-child { padding-bottom:0; }
.compact-record h3 { margin:4px 0; font-size:16px; }
.compact-record p { margin:4px 0; }
.compact-record .record-top { margin-bottom:2px; }
.workbench-more { margin-top:24px; }
.workbench-records-more { border-top:1px solid var(--border); margin-top:12px; }
.workbench-records-more>summary { color:var(--brand); min-height:44px; }
.overview-section { margin-bottom:20px; }
.overview-metrics { grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:12px; margin:12px 0 0; }
.overview-toolbar { align-items:center; gap:8px 16px; }
.overview-toolbar>label { display:flex; align-items:center; gap:8px; margin:0; }
.overview-toolbar input { width:76px; margin:0; }
.overview-toolbar>button { margin:0; }
.overview-currencies { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px; }
.overview-currency,.currency-summary { min-width:0; border:1px solid var(--border); border-radius:var(--radius); padding:16px; }
.overview-currency>h3,.currency-summary>h3 { margin:0 0 12px; }
.overview-currency .record-top,.currency-summary .record-top { align-items:baseline; flex-wrap:wrap; margin:8px 0; }
.overview-currency .record-top>span { flex:1 1 140px; }
.currency-summary .record-top>span:first-child { flex:1 1 90px; min-width:0; }
.overview-currency .numeric,.currency-summary .numeric { margin-left:auto; white-space:nowrap; }
.overview-notes { margin:8px 0; }
.overview-notes>summary { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--brand); }
.overview-notes>summary::before { content:'›'; }
.overview-notes[open]>summary::before { transform:rotate(90deg); }
.overview-notes>p { margin:4px 0 12px; }
.overview-toolbar .overview-notes { margin:0; flex:1 1 140px; }
.project-table { padding:0; }
.project-table table { table-layout:fixed; min-width:1000px; }
.project-table col:nth-child(1) { width:22%; }
.project-table col:nth-child(2) { width:14%; }
.project-table col:nth-child(3) { width:24%; }
.project-table col:nth-child(4) { width:16%; }
.project-table col:nth-child(5) { width:14%; }
.project-table col:nth-child(6) { width:10%; }
.project-table th,.project-table .status-badge { white-space:normal; }
.project-mobile-list { display:none; }
.project-card .project-card-title { font-size:18px; margin:8px 0; }
.project-card .project-next { padding:12px; margin-top:12px; background:var(--canvas); border-radius:8px; }
.project-card .project-next p { margin:4px 0; }
.project-card .project-next>.note { font-size:12px; }
.project-card-footer { display:flex; justify-content:space-between; gap:12px; margin-top:12px; font-size:13px; }
.document-list-filters { flex-wrap:wrap; align-items:end; }
.document-list-filters>.search-field { flex:2 1 240px; }
.document-list-filters>label:not(.search-field) { flex:1 1 140px; min-width:0; margin:0; }
.document-list-filters>label>select { margin-bottom:0; }
div.document-list { display:grid; grid-template-columns:1fr; gap:0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.document-list .document-record { display:grid; grid-template-columns:44px minmax(0,2fr) minmax(0,1.3fr) minmax(0,1.2fr) auto; gap:12px; align-items:center; margin:0; padding:12px 16px; border:0; border-bottom:1px solid var(--border); border-radius:0; }
.document-list .document-record:last-child { border-bottom:0; }
.document-list .document-select { margin:0; display:flex; align-items:center; justify-content:center; min-height:44px; }
.document-list .document-record-heading,.document-list .document-record-context,.document-list .document-record-version { min-width:0; }
.document-list .document-record-heading h2 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.document-list .filename { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.document-list .document-record-context,.document-list .document-record-version { color:var(--text-muted); font-size:13px; overflow-wrap:anywhere; }
.document-list .document-record p { margin:2px 0; }
.document-list .document-record-context>a { display:block; }
.document-list .document-record-actions { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.document-list .document-record-actions>a { display:inline-flex; align-items:center; min-height:44px; white-space:nowrap; }
.file-mark { display:grid; place-items:center; flex-shrink:0; width:42px; height:46px; border:1px solid #d8e2fa; border-radius:8px; background:var(--brand-soft); color:var(--brand-hover); font-size:11px; font-weight:650; }
.document-record h2 { font-size:16px; margin:0 0 4px; }
.document-record .filename { font-size:13px; overflow-wrap:anywhere; margin:4px 0; }
.document-record p { margin:6px 0; }
.document-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.document-actions a { display:inline-flex; align-items:center; min-height:44px; }
.attachment-heading { display:flex; align-items:start; gap:12px; }
.attachment-heading>div { min-width:0; }
.attachment-title { color:var(--text-strong); font-weight:600; overflow-wrap:anywhere; }
.attachment-record .filename { margin:4px 0; overflow-wrap:anywhere; }
.attachment-record .note { margin:4px 0; }
.attachment-actions form,.attachment-actions form>button { margin:0; }
.attachment-editor { margin-top:12px; border:1px solid var(--border); border-radius:8px; }
.attachment-editor>summary { padding:10px 14px; min-height:44px; font-weight:600; color:var(--brand-hover); }
.attachment-editor[open]>summary { border-bottom:1px solid var(--border); background:var(--canvas); border-radius:8px 8px 0 0; }
.attachment-editor-form { padding:16px; }
.attachment-editor-form .note { margin:8px 0; }
.document-bulk-toolbar { display:flex; justify-content:space-between; align-items:center; margin:12px 0; gap:10px; }
.transaction-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:20px; }
.transaction-summary .record-money { text-align:right; margin:0; overflow-wrap:anywhere; }
.transaction-summary h2 { margin:0 0 10px; }
.task-stats.finance-balance-summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.finance-balance-summary .card { padding:12px 16px; }
.finance-balance-summary strong { font-size:22px; overflow-wrap:anywhere; }
.finance-balance-summary small { font-weight:400; font-size:12px; }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.detail-grid p { margin:0; }
.detail-label { display:block; color:var(--text-muted); font-size:13px; }
.settings-shell { display:grid; grid-template-columns:210px minmax(0,1fr); gap:24px; align-items:start; }
.settings-navigation>summary { display:none; }
.settings-nav { display:grid; gap:4px; }
.settings-nav a { display:block; padding:10px 12px; border-radius:8px; color:var(--text-body); font-size:14px; }
.settings-nav a:hover { background:var(--brand-soft); text-decoration:none; }
.settings-nav a[aria-current=page] { color:var(--brand-hover); }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.settings-grid .card { margin:0; display:flex; flex-direction:column; align-items:start; }
.settings-grid h2 { font-size:17px; margin:0 0 8px; }
.settings-grid p { margin:0 0 14px; }
.settings-grid a.button { margin-top:auto; }
.setup-list { list-style:none; margin:0; padding:0; }
.setup-list li { display:flex; align-items:start; justify-content:space-between; gap:16px; border-bottom:1px solid var(--border); padding:14px 0; }
.setup-list strong { display:block; }
.settings-links { display:flex; flex-wrap:wrap; gap:10px; }
.settings-links a { display:inline-flex; padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:var(--canvas); }
.dictionary-entry { display:block; padding:16px 0; border-bottom:1px solid var(--border); }
.dictionary-entry>strong { display:block; overflow-wrap:anywhere; }
.dictionary-entry>.grid { margin:12px 0; }
.dictionary-entry.grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.permission-group small { display:block; overflow-wrap:anywhere; font-size:12px; }
.duration-input { display:flex; align-items:center; gap:8px; }
.duration-input input { max-width:120px; }
.duration-input select { max-width:150px; }
.select-search { margin-bottom:6px; }
.shell { display:grid; grid-template-columns:248px minmax(0,1fr); min-height:100vh; }
.body { min-width:0; }
.shell>aside { position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; min-width:0; background:var(--nav); color:var(--nav-text); }
.nav-brand { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; min-height:64px; border-bottom:1px solid #ffffff12; gap:8px; }
.nav-brand>a { display:flex; align-items:center; gap:10px; color:#fff; min-width:0; }
.nav-brand strong { font-size:15px; font-weight:600; overflow-wrap:anywhere; line-height:1.5; }
.brand-mark,.auth-mark { display:grid; place-items:center; flex-shrink:0; width:32px; height:34px; background:var(--brand); color:#fff; border-radius:8px; font-size:20px; font-weight:650; }
.brand-image { flex-shrink:0; object-fit:contain; background:#fff; border-radius:6px; }
#main-navigation { flex:1; min-height:0; overflow-y:auto; padding:12px; overscroll-behavior:contain; scrollbar-width:thin; }
#main-navigation a { color:var(--nav-text); font-size:13px; padding:10px 12px; line-height:1.55; border-radius:8px; overflow-wrap:anywhere; }
#main-navigation a:hover,.nav-group summary:hover { background:#ffffff0a; color:#fff; text-decoration:none; }
#main-navigation a[aria-current=page] { background:#315be82f; color:#c2d1ff; box-shadow:inset 3px 0 #6486ff; }
.nav-home,.nav-group-label { display:flex; align-items:center; gap:10px; }
.unity-icon { flex-shrink:0; }
.nav-search { margin:14px 4px 16px; color:var(--nav-text); font-size:12px; }
.nav-search input { background:#1c2a41; border-color:#34425a; color:#f5f7fb; font-size:13px; min-height:38px; padding:7px 10px; }
.nav-group { margin:4px 0; }
.nav-group>summary { display:flex; align-items:center; justify-content:space-between; gap:8px; list-style:none; padding:10px; font-size:13px; font-weight:500; color:var(--nav-text); border-radius:8px; }
.nav-group>summary::-webkit-details-marker { display:none; }
.nav-group[data-current-group]>summary { color:#fff; }
.nav-chevron { font-size:15px; }
.nav-group[open] .nav-chevron { transform:rotate(180deg); }
.nav-children { margin:2px 0 8px 17px; border-left:1px solid #34425a; padding-left:8px; }
.nav-children a { display:block; }
.nav-footer { flex-shrink:0; border-top:1px solid #ffffff12; padding:10px 16px; }
.nav-footer a { display:flex; justify-content:space-between; color:var(--nav-text); padding:8px 0; font-size:13px; }
.nav-footer small { display:block; color:#8a9bb7; font-size:10px; }
#navigation-toggle,#navigation-close,.mobile-quick-nav { display:none; }
.app-header { min-height:64px; padding:8px 28px; display:flex; justify-content:space-between; align-items:center; gap:12px; background:var(--surface); border-bottom:1px solid var(--border); }
.header-context,.header-actions { display:flex; align-items:center; gap:16px; min-width:0; }
.breadcrumb { font-size:13px; color:var(--text-muted); overflow-wrap:anywhere; }
.header-actions { flex-shrink:0; }
.header-search,.notification-bell { display:inline-flex; align-items:center; justify-content:center; gap:4px; min-width:44px; min-height:44px; color:var(--text-body); }
.notification-bell b { font-size:11px; border-radius:10px; background:var(--brand-soft); color:var(--brand-hover); padding:0 5px; }
.account-menu { position:relative; }
.account-menu>summary { display:flex; align-items:center; gap:8px; list-style:none; min-height:44px; padding:0; }
.account-menu>summary::-webkit-details-marker { display:none; }
.avatar { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border-radius:50%; background:var(--brand-soft); color:var(--brand-hover); font-size:13px; font-weight:600; }
.account-name { max-width:180px; overflow-wrap:anywhere; font-size:13px; }
.account-menu-panel { position:absolute; right:0; top:50px; z-index:30; min-width:220px; max-width:calc(100vw - 32px); padding:10px; background:var(--surface); border:1px solid var(--border); border-radius:12px; box-shadow:0 8px 32px #111d3226; }
.account-menu-panel>a { display:block; padding:9px 12px; }
.account-menu-panel form { padding:0 12px; }
.account-menu-panel button { width:100%; }
main { padding:24px 28px 48px; max-width:1480px; margin:0 auto; }
main>header { background:transparent; border:0; padding:0 0 18px; }
.skip-link { position:fixed; top:8px; left:12px; z-index:100; background:#fff; padding:10px 14px; }
.skip-link:not(:focus) { width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; clip:rect(0,0,0,0); overflow:hidden; white-space:nowrap; border:0; }
.auth-page { min-height:100vh; background:var(--surface); }
.auth { max-width:1440px; margin:0 auto; padding:0; }
.auth-frame { display:grid; grid-template-columns:minmax(320px,.95fr) minmax(440px,1fr); min-height:100vh; min-height:100svh; }
.auth-story { position:relative; display:flex; flex-direction:column; justify-content:space-between; padding:48px clamp(32px,5vw,72px); color:var(--nav-text); background:linear-gradient(155deg,#182c4d,var(--nav) 70%); }
.auth-story-brand,.auth-brand { display:flex; align-items:center; gap:12px; overflow-wrap:anywhere; }
.auth-story-brand { color:#fff; font-size:20px; }
.auth-story-copy { padding:64px 0; max-width:440px; }
.auth-eyebrow { font-size:13px; letter-spacing:.06em; margin-bottom:16px; }
.auth-story h2 { color:#fff; font-size:clamp(28px,3vw,42px); line-height:1.35; margin:0 0 24px; font-weight:600; }
.auth-story-copy>p:not(.auth-eyebrow) { font-size:17px; line-height:1.8; }
.auth-story-topics { display:flex; flex-wrap:wrap; gap:12px; padding:0; margin:32px 0 0; list-style:none; }
.auth-story-topics li { border:1px solid #ffffff24; border-radius:8px; padding:8px 12px; font-size:14px; }
.auth-story-footer { font-size:13px; margin:0; }
.auth-content { display:flex; flex-direction:column; align-items:center; padding:32px 48px 48px; }
.auth-toolbar { display:flex; justify-content:flex-end; width:100%; max-width:440px; margin-bottom:clamp(32px,8vh,80px); }
.auth-locale { display:flex; align-items:center; gap:8px; }
.auth-locale select { width:auto; min-width:112px; min-height:44px; background:var(--canvas); border-color:var(--border); }
.auth-locale button { margin:0; }
.auth-card { width:100%; max-width:440px; animation:auth-enter var(--motion-normal) ease-out; }
.auth-brand { color:var(--text-strong); font-size:18px; margin-bottom:32px; }
.auth-page h1 { font-size:28px; margin:0 0 8px; }
.auth-intro { color:var(--text-muted); margin:0 0 32px; }
.auth-page input { font-size:16px; min-height:48px; }
.auth-page .field { margin-bottom:24px; }
.auth-page small { display:block; margin-top:8px; }
.auth-password-label { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:6px; }
.auth-password-label label { margin:0; }
.auth-password-label a { display:inline-flex; align-items:center; min-height:32px; font-size:13px; }
.auth-password { display:flex; align-items:stretch; gap:8px; }
.auth-password input { flex:1; min-width:0; }
.auth-password button { flex-shrink:0; min-width:60px; padding:8px 12px; font-size:14px; }
.auth-page [data-auth-submit] { width:100%; min-height:48px; margin:8px 0 0; }
.auth-signin-help { font-size:13px; color:var(--text-muted); margin:24px 0 0; }
.auth-back { margin:24px 0 0; }
.auth-feedback { width:100%; max-width:440px; color:var(--danger); padding:12px 0; }
@keyframes auth-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.account-card { max-width:780px; }

/* Retained domain-specific workflow, file and A4 print rules. */
.decision-choice{display:flex;align-items:center;gap:10px;padding:10px 0}.decision-choice input{width:auto;flex:none}.decision-option{margin:18px 0;padding:18px;border:1px solid #d5dde5;border-radius:8px;min-width:0}.decision-response{border-top:1px solid #d5dde5;padding:10px 0}.preserve-text{white-space:pre-wrap;overflow-wrap:anywhere}fieldset{min-width:0}textarea{max-width:100%}

.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-step label { display: block; }
.approver-row { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin-bottom: .5rem; }
.approver-row label { flex: 1; min-width: 160px; }
.approval-response .toolbar { gap: .5rem; }

.approval-metadata { margin: .75rem 0; overflow-wrap: anywhere; }
.approval-summary h2 { margin-top: 0; }
.approval-summary p { margin-bottom: 0; }

.version-picker-list{max-height:20rem;overflow-y:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--border);border-radius:var(--radius)}.version-choice{display:flex;align-items:flex-start;gap:12px;padding:10px;margin:0;border-bottom:1px solid var(--border)}.version-choice[hidden]{display:none}.version-choice input{flex:0 0 auto;margin-top:3px}.version-choice span{min-width:0;overflow-wrap:anywhere}.version-choice small{display:block;color:var(--text-muted);margin-top:4px}.document-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem}.document-thumbnail{display:block;max-width:160px;max-height:120px;object-fit:contain;margin:1rem 0}.document-image{max-width:100%;height:auto;display:block}.document-hash{overflow-wrap:anywhere}.document-list h2,.activity-timeline p{overflow-wrap:anywhere}#pdf-preview{max-width:100%;overflow:hidden}#pdf-canvas{max-width:100%;height:auto;display:block;background:white}.pdf-print-frame{position:fixed;width:1px;height:1px;bottom:0;border:0}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1rem}input[type=file]{max-width:100%}input[type=checkbox]{width:auto}fieldset{min-width:0}fieldset label.inline{display:flex;margin:.5rem 0;overflow-wrap:anywhere}

.meeting-actions{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;margin:1rem 0}.meeting-actions form{margin:0}.minutes-print{max-width:210mm;margin:auto;background:white;padding:1.5rem;overflow-wrap:anywhere}.minutes-print header{display:block;border-bottom:2px solid #19394d;padding-bottom:1rem}.minutes-print footer{margin-top:2rem;border-top:1px solid #aaa;padding-top:1rem}.minutes-print h2{margin-top:1.5rem}.minutes-print h4{margin-bottom:.3rem}.minutes-print p{margin-top:.3rem}.minutes-toolbar{display:flex;gap:1rem;margin:1rem 0}.meeting-workbench{margin-bottom:1rem}
@media print{@page{size:A4;margin:16mm}.shell>aside,.body>header,.minutes-toolbar,main>.messages{display:none!important}.shell,.body,main{display:block!important;width:auto!important;margin:0!important;padding:0!important;background:white!important}.minutes-print{max-width:none;margin:0;padding:0;font-size:10pt;line-height:1.5}.minutes-print h1{font-size:19pt}.minutes-print h2{font-size:14pt}.minutes-print h3{font-size:12pt}.minutes-print h1,.minutes-print h2,.minutes-print h3,.minutes-print h4{break-after:avoid}.minutes-print p{orphans:3;widows:3}.minutes-print a{color:inherit;text-decoration:none}}

/* Project Operations Hub: bounded cards and wrapping tab navigation. */
.project-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:16px; margin:16px 0; }
.project-metrics > .metric { margin:0; padding:16px; }
.project-header h1 { margin:.3rem 0; }
.project-meta,.project-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:16px; }
.project-overview .project-summary-grid h2 { margin:0 0 8px; font-size:1rem; line-height:1.5; }
.project-overview .project-summary-grid p { margin:0; }
.project-overview .project-summary-grid .project-next-meta { margin-top:8px; }
.project-overview .project-meta { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 0; padding-top:16px; border-top:1px solid var(--border); }
.project-overview .project-meta > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; min-width:0; }
.project-overview .project-meta dt { color:var(--text-muted); font-size:.875rem; }
.project-overview .project-meta dd { margin:0; text-align:start; }
.metric strong { font-size:1.7rem; display:block; }
.metric span { display:block; }
.health-green { color:#146c43; }
.health-yellow { color:#895600; }
.health-red { color:#ad2331; }
.important-update { border-left:4px solid #bf7100; }
.project-card,.project-overview { overflow-wrap:anywhere; }
.project-card h2 { margin:.4rem 0; }
details.card > summary { cursor:pointer; font-weight:600; }
details.card[open] > summary { margin-bottom:1rem; }
.project-tabs + a.button { display:inline-block; margin-bottom:1rem; }
.project-finance-filter { padding:0; margin:16px 0; }
.project-finance-filter label { flex:1 1 150px; min-width:0; max-width:300px; margin:0; }
.project-finance-filter>button { margin:0; }
.project-finance-currencies { display:grid; gap:16px; margin:16px 0; }
.project-currency-summary { border:1px solid var(--border); border-radius:var(--radius); padding:16px; }
.project-currency-summary>h3 { margin:0 0 12px; }
.project-finance-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; }
.project-finance-metrics>div { min-width:0; }
.project-finance-metrics dt { font-size:13px; }
.project-finance-metrics dd { margin:6px 0 0; font-size:24px; font-weight:650; text-align:left; color:var(--text-strong); }
.project-finance-metrics dd[data-available=false] { font-size:16px; font-weight:400; color:var(--text-muted); }
.project-finance-breakdown { margin-top:12px; }
.project-finance-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; margin:12px 0 0; }
.project-finance-secondary>div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); }
.project-finance-secondary dd { margin:0; white-space:nowrap; }
.project-finance-details { margin:12px 0; border-bottom:1px solid var(--border); padding-bottom:8px; }
.project-finance-details>summary,.project-finance-breakdown>summary { font-weight:600; }

/* Responsive shell and component rules: one coordinated breakpoint. */
@media(max-width:1100px) {
 .settings-shell { grid-template-columns:1fr; }
 .settings-navigation>summary { display:flex; justify-content:space-between; padding:12px 16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
 .settings-nav { display:flex; flex-wrap:wrap; padding-top:12px; }
 .settings-nav a { background:var(--surface); border:1px solid var(--border); }
 .dictionary-entry.grid { grid-template-columns:1fr; }
 .workbench-columns { grid-template-columns:1fr; }
}
@media(max-width:860px) {
 body { font-size:16px; }
 label,input,select,textarea { font-size:16px; }
 button,.button,.advanced-filters>summary { min-height:44px; }
 h1,.page-heading h1,.toolbar h1 { font-size:23px; }
 h2 { font-size:18px; }
 .note,small { font-size:13px; }
 .shell { display:block; }
 .shell>aside { position:fixed; inset:0 auto 0 0; width:min(304px,88vw); height:100dvh; z-index:61; transform:translateX(-100%); visibility:hidden; transition:transform .18s ease,visibility .18s; }
 body.navigation-open { overflow:hidden; overscroll-behavior:none; }
 .navigation-open .shell>aside { transform:translateX(0); visibility:visible; }
 button.navigation-overlay,button.navigation-overlay:hover { position:fixed; inset:0; z-index:60; width:100%; height:100%; background:#111d326b; border:0; padding:0; border-radius:0; }
 #main-navigation { padding:10px 12px; }
 #main-navigation a,.nav-group>summary { min-height:44px; font-size:15px; }
 .nav-search input { font-size:16px; }
 .nav-brand { min-height:56px; padding:10px 14px; }
 .nav-footer { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
 #navigation-close { display:inline-flex; min-width:44px; min-height:44px; background:transparent; color:#fff; border:0; padding:0; }
 #navigation-toggle { display:inline-flex; min-width:44px; min-height:44px; background:transparent; color:var(--text-body); border:0; padding:0; }
 .app-header { min-height:56px; padding:6px 16px; }
 .header-context,.header-actions { gap:8px; }
 .breadcrumb { max-width:150px; font-size:13px; line-height:1.5; }
 .account-name { display:none; }
 main { padding:16px 16px calc(88px + env(safe-area-inset-bottom)); }
 .mobile-quick-nav { position:fixed; bottom:0; left:0; right:0; z-index:40; display:flex; justify-content:space-around; background:var(--surface); border-top:1px solid var(--border); padding:6px 8px max(6px,env(safe-area-inset-bottom)); }
 .mobile-quick-nav>a,.mobile-quick-nav>button { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:48px; font-size:12px; line-height:1.5; color:var(--text-muted); background:transparent; border:0; border-radius:8px; padding:4px; }
 .mobile-quick-nav>[aria-current=page] { color:var(--brand); background:var(--brand-soft); }
 .mobile-quick-nav .unity-icon { width:20px; height:20px; }
 .page-heading { margin-bottom:18px; gap:12px; align-items:center; }
 .page-actions { gap:8px; }
 .page-actions .button { padding:8px 12px; font-size:14px; }
 .card { padding:16px; margin-bottom:16px; }
 .section-heading>a,.record-top>a,.document-record .record-top label { display:inline-flex; align-items:center; min-height:44px; }
 .grid,.form-grid,.record-list,.task-list,.detail-grid { grid-template-columns:1fr; }
 .task-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
 .task-stats .card { padding:12px 16px; }
 .task-stats strong { font-size:26px; }
 .overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .overview-metrics span { font-size:14px; }
 .overview-toolbar>label { font-size:14px; }
 .task-stats.workbench-priority { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
 .workbench-priority .card { padding:10px 8px; }
 .workbench-columns { gap:16px; margin-bottom:16px; }
 .workbench-columns [data-workbench-projects] { grid-row:1; }
 .workbench-columns .compact-record { padding:10px 0; }
 dl { grid-template-columns:1fr; gap:4px; }
 dd { margin-bottom:10px; }
 .task-meta { grid-template-columns:1fr; }
 .search-toolbar { gap:8px; flex-wrap:wrap; margin-bottom:16px; }
 .search-toolbar>button { min-width:44px; padding:8px; }
 .search-toolbar>button .search-button-label { display:none; }
 .advanced-filters>summary { padding:8px 10px; font-size:14px; }
 .filter-panel-content { padding:20px 16px; }
 .filter-dialog { max-height:calc(100dvh - 32px - env(safe-area-inset-bottom)); }
 .filter-panel-content>footer { padding-bottom:env(safe-area-inset-bottom); }
 .task-stats.finance-balance-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .finance-balance-summary>.card:first-child { grid-column:1/-1; }
 .status-tabs,.project-tabs { overflow-x:auto; flex-wrap:nowrap; overscroll-behavior-x:contain; scrollbar-width:thin; padding-bottom:4px; gap:6px; }
 .status-tabs a,.project-tabs a { white-space:nowrap; flex-shrink:0; min-height:44px; font-size:14px; }
 .project-table { display:none; }
 .project-mobile-list { display:grid; gap:16px; }
 .project-mobile-list>.card { margin:0; }
 .project-header p { margin:6px 0; }
 .project-grid:has(.metric) { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .project-overview .project-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .project-overview [data-project-meta=activity] { grid-column:1/-1; }
 .project-finance-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .project-finance-metrics>div:first-child { grid-column:1/-1; }
 .project-finance-metrics dd { font-size:24px; }
 .project-finance-metrics dt { font-size:14px; }
 .project-finance-secondary { grid-template-columns:1fr; }
 .document-list-filters>.search-field { flex-basis:100%; }
 .document-list .document-record { grid-template-columns:44px minmax(0,1fr) auto; gap:6px 10px; padding:10px 12px; align-items:start; }
 .document-list .document-record-context,.document-list .document-record-version { grid-column:2/-1; }
 .document-list .document-record-version { display:flex; flex-wrap:wrap; gap:4px 12px; }
 .document-list .document-record-actions { grid-column:3; grid-row:1; }
 .document-bulk-toolbar button { min-height:44px; padding:8px 10px; font-size:13px; }
 .settings-grid { grid-template-columns:1fr; }
 .transaction-summary { grid-template-columns:1fr; gap:12px; }
 .transaction-summary .record-money { text-align:left; }
 .setup-list li { flex-wrap:wrap; }
 .pagination { justify-content:space-between; }
 .empty-state { padding:28px 16px; }
 .filter-bar:not(.project-finance-filter)>label,form[method=get].card>label { max-width:none; flex-basis:100%; }
 .duration-input input { max-width:110px; }
 .auth { padding-top:32px; }
 .auth-frame { display:block; }
 .auth-story { display:none; }
 .auth-content { padding:16px 24px 32px; }
 .auth-toolbar { margin-bottom:24px; }
 .auth-brand { margin-bottom:24px; }
 .auth-intro { margin-bottom:24px; }
 .auth-page .field { margin-bottom:20px; }
 .auth-page label { font-size:16px; }
 .auth-password-label a { font-size:14px; min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { :root { --motion-fast:0s; --motion-normal:0s; } * { scroll-behavior:auto; transition:none; } .auth-card { animation:none; } }
@media print { .app-header,.navigation-overlay,.mobile-quick-nav,.skip-link { display:none!important; } }
