*{box-sizing:border-box}.access-page{margin:0;background:#edf1f7;color:#18243c;font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5}.access-shell{max-width:700px;margin:6vh auto;padding:32px;background:#fff;border:1px solid #dbe3ef;border-radius:24px;box-shadow:0 16px 50px #23385810}.staff-shell{max-width:1150px;margin:auto;padding:28px}.access-page h1{font-size:28px;margin:0}.access-page h2{font-size:21px}.access-page label{display:block;margin:16px 0}.access-page input,.access-page select{display:block;width:100%;padding:12px;border:1px solid #c5d0e0;border-radius:10px;font:inherit;background:#fff}.access-page button,.access-link{display:inline-block;padding:10px 16px;border:1px solid #c5d0e0;border-radius:10px;background:#fff;color:#174891;font:inherit;cursor:pointer;margin:4px}.access-page button[type=submit]{background:#2767ed;color:#fff;border:0}.access-page button:disabled{opacity:.5;cursor:wait}.access-page a{color:#1754ad}.access-page table{border-collapse:collapse;width:100%;font-size:14px}.access-page th,.access-page td{text-align:left;padding:11px 8px;border-bottom:1px solid #e0e6ef;vertical-align:top}.access-page .table-wrap{overflow:auto}.access-page small{display:block;color:#60708b}.access-card{background:white;border:1px solid #dbe3ef;border-radius:16px;padding:20px;margin:18px 0}.access-notice{border-left:3px solid #dfa330;padding:10px 15px;background:#fff6e8}.access-page details{border-bottom:1px solid #dbe3ef;padding:14px 0}.access-page summary{cursor:pointer;font-weight:600}.access-page [role=alert]{color:#a42424;white-space:pre-line}.access-bar{position:relative;display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#fff;padding:10px 16px;margin-bottom:12px;border:1px solid #dbe3ef;border-radius:12px;font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.access-bar a{color:#1754ad}.access-bar button{margin-left:auto}body.access-readonly #new-operation,body.access-readonly #backup{display:none}.access-page :focus-visible{outline:3px solid #89b0ff;outline-offset:3px}@media(max-width:600px){.access-shell{margin:12px;padding:22px}.staff-shell{padding:16px}.access-page h1{font-size:24px}.access-page td,.access-page th{padding:8px 6px}.access-page button{min-height:44px}}
.staff-heading{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.staff-heading label{margin:0}.staff-nav{display:flex;gap:4px;overflow:auto;padding:12px 0}.staff-nav button{white-space:nowrap}.staff-nav [aria-current=page]{background:#2767ed;color:white;border-color:#2767ed}.staff-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.access-page .staff-tile{margin:0;padding:20px;text-align:left;color:#18243c;border:1px solid #dbe3ef;border-radius:18px;box-shadow:0 8px 22px #23385806}.staff-tile strong{display:block;font-size:23px;margin:10px 0;overflow-wrap:anywhere}.staff-tile small{min-height:21px}.staff-muted{color:#60708b}.staff-attention{color:#9b5a00!important}.access-page td{white-space:pre-line}.access-page dialog{width:min(1000px,94vw);max-height:90dvh;overflow:auto;border:1px solid #dbe3ef;border-radius:20px;padding:22px;color:#18243c;scrollbar-width:thin;box-shadow:0 24px 100px #14233d40}.access-page dialog::backdrop{background:#14233d66;backdrop-filter:blur(3px)}.access-page dialog header{display:flex;justify-content:flex-end;position:sticky;top:-22px;background:white;z-index:1}.staff-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.staff-wide{grid-column:1/-1}.access-page textarea{display:block;width:100%;padding:12px;border:1px solid #c5d0e0;border-radius:10px;font:inherit;resize:vertical}@media(max-width:850px){.staff-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.staff-fields{grid-template-columns:1fr}.staff-tile strong{font-size:19px}.access-page .staff-tile{padding:14px}.access-page dialog{padding:14px}.access-page dialog header{top:-14px}}
.access-page .remember-login{display:flex;align-items:flex-start;gap:12px;margin:18px 0 22px;cursor:pointer}.access-page .remember-login input{width:20px;height:20px;flex:none;margin:3px 0 0;accent-color:#2767ed}.remember-login span{line-height:1.35}.remember-login small{margin-top:3px}
body.access-readonly [data-action="receivable-date"],body.access-readonly [data-action="receivable-clear"]{display:none}
body.access-readonly [data-action="edit-contacts"]{display:none}
body.access-readonly .invoice-lifecycle-actions{display:none}
#settlement-form .allocation-totals{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px;border:1px solid var(--theme-line,#dbe3ef);border-radius:12px;background:var(--theme-surface,#fff)}
#settlement-form .allocation-totals strong{display:block;overflow-wrap:anywhere}#settlement-form .allocation-row{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid var(--theme-line,#dbe3ef)}#settlement-form .allocation-row small,#settlement-form .allocation-row [data-after]{display:block}#settlement-form .allocation-row .field{min-width:0}#settlement-form .allocation-row input{width:100%;min-width:0}#settlement-form .allocation-row button{margin-top:8px}#settlement-form .allocation-row>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){#settlement-form .allocation-totals{gap:6px;padding:10px;font-size:12px}#settlement-form .allocation-row{grid-template-columns:1fr;gap:8px}#settlement-form .allocation-row .field{margin:0}#settlement-form .allocation-row button{display:block}}

/* Same system palette as the owner workspace. This stylesheet is also injected
   by the server into the owner page, so all component rules are access-scoped. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme:dark;
    --theme-bg:#101722;
    --theme-surface:#192332;
    --theme-raised:#223044;
    --theme-hover:#293b54;
    --theme-text:#e5edf7;
    --theme-muted:#a8b8ce;
    --theme-line:#3c506a;
    --theme-link:#9dbfff;
    --theme-primary:#285cc6;
    --theme-warning:#f2cb83;
    --theme-warning-bg:#3b3020;
    --theme-negative:#ffaaa2;
    --theme-focus:#a8c7ff;
    background:var(--theme-bg);
    color:var(--theme-text);
  }
  :root .access-page {background:var(--theme-bg);color:var(--theme-text);accent-color:var(--theme-link)}
  :root .access-page :is(.access-shell,.access-card,.staff-tile,dialog,dialog header) {background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-line);box-shadow:none}
  :root .access-page :is(input,select,textarea) {background:var(--theme-bg);color:var(--theme-text);border-color:var(--theme-line)}
  :root .access-page :is(input,textarea)::placeholder {color:var(--theme-muted);opacity:1}
  :root .access-page :is(button,.access-link) {background:var(--theme-raised);color:var(--theme-link);border-color:var(--theme-line)}
  :root .access-page :is(button,.access-link):hover {background:var(--theme-hover);border-color:var(--theme-link)}
  :root .access-page :is(button[type=submit],.staff-nav [aria-current=page]) {background:var(--theme-primary);color:#fff;border-color:#6f9cff}
  :root .access-page :is(a,.access-link) {color:var(--theme-link)}
  :root .access-page :is(small,.staff-muted) {color:var(--theme-muted)}
  :root .access-page .staff-attention {color:var(--theme-warning)!important}
  :root .access-page .access-notice {background:var(--theme-warning-bg);color:var(--theme-warning);border-color:#cba15b}
  :root .access-page [role=alert] {color:var(--theme-negative)}
  :root .access-page :is(th,td,details) {border-color:var(--theme-line)}
  :root .access-page th {background:var(--theme-raised);color:var(--theme-muted)}
  :root .access-page dialog::backdrop {background:#020916b3}
  :root .access-page :focus-visible {outline-color:var(--theme-focus)}
  :root .access-page .remember-login input {accent-color:var(--theme-link)}
  :root .access-page dialog {scrollbar-color:#7188a5 var(--theme-bg)}
}
