/* Customer profiles and the index share the notebook's work-area geometry. */
body:has(.customer-workspace) :is(.page-header,#app) {
  padding-inline:var(--work-inset-inline);
  container:customer-frame / inline-size;
}
body:has(.customer-workspace) .page-header {padding-block:var(--work-inset-top) 0;border:0;}
body:has(.customer-workspace) .main-shell {display:flex;flex-direction:column;}
body:has(.customer-workspace) #app {
  flex:1;display:flex;flex-direction:column;
  padding-block:24px var(--work-action-inset);
}
@container customer-frame (width > 880px) {
  body:has(.customer-workspace) .page-header > div:first-child,.customer-workspace {
    margin-inline-start:var(--work-content-offset);
  }
}
.customer-workspace {flex:1;display:flex;flex-direction:column;gap:32px;font:400 var(--text-body)/1.5 var(--ui-font);}
.customer-workspace:is(.customer-index,.customer-profile[data-client-id],.team-index) {
  font-family:var(--work-body-font);
  line-height:1.55;
}
.customer-workspace :is(h2,summary) {font:550 var(--work-section-size)/1.35 var(--ui-font);margin-block:0;}
.customer-muted {color:var(--muted);font-size:var(--text-body);}
body:has(:is(.workspace-register,.customer-profile)) .page-header:empty {display:none;}
body:has(:is(.workspace-register,.customer-profile)) #app {padding-block-start:var(--work-inset-top);}
.customer-profile {position:relative;}
.customer-profile .sheet-content {width:100%;max-height:none;overflow:visible;}
.customer-profile .sheet-title {padding-inline-end:60px;}
.customer-profile > .workspace-back {position:absolute;inset:0 0 auto auto;}
.customer-profile .sheet-section-body > address:not(:first-child) {margin-block-start:var(--sheet-heading-gap);}
.customer-sheet-project {display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding-block:6px;min-width:0;text-align:start;text-wrap:pretty;overflow-wrap:anywhere;color:inherit;}
.customer-sheet-project + .customer-sheet-project {border-block-start:1px solid var(--line);}
.customer-sheet-project small {text-align:end;font:inherit;color:var(--muted);}
.customer-sheet-project:hover,.customer-sheet-project:focus-visible {text-decoration:underline;text-underline-offset:3px;}
.customer-disclosure summary {list-style:none;cursor:pointer;}
.customer-disclosure summary::-webkit-details-marker {display:none;}
.customer-disclosure summary .ui-icon {flex:none;width:30px;height:18px;color:var(--icon-muted);}
.customer-disclosure[open] > summary .ui-icon {transform:rotate(180deg);}
.customer-disclosure[open] > summary {margin-block-end:var(--sheet-heading-gap);}
.customer-workspace .customer-actions {align-self:flex-end;margin-block-start:auto;padding-block-start:12px;}
.customer-workspace:is(.customer-index,.customer-profile[data-client-id],.team-index) .customer-actions,
:is(.customer-editor,.team-editor) .project-review__actions .home-action-pair {
  --pair-tile:var(--work-action-size);
}
.customer-profile[data-client-id] :is(.sheet-facts dt,.invoice-ledger tbody,.invoice-ledger tbody a) {font-family:var(--work-body-font);}
.customer-profile[data-client-id] .customer-disclosure summary .ui-icon {color:var(--ink);}
/* Directory and register share one frame. Only the records scroll.
   On wide screens the last track leaves space for the bottom action. */
body:has(.workspace-register) .main-shell {block-size:100dvh;min-block-size:0;}
body:has(.workspace-register) #app {min-block-size:0;padding-block-end:var(--work-inset-bottom);}
.workspace-register {
  display:grid;min-block-size:0;min-width:0;
  grid-template-columns:minmax(0,1fr) max-content;
  grid-template-rows:auto auto minmax(0,1fr);
  grid-template-areas:"title title" "tools tools" "records action";
  align-content:stretch;gap:0 var(--work-column-gap);
  --title-rule:var(--work-title-rule);
}
.workspace-register > .sheet-title {grid-area:title;margin:0 0 var(--work-heading-gap);}
.workspace-toolbar {
  grid-area:tools;display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;
  gap:8px 24px;min-width:0;
  margin:0 var(--work-section-inset) var(--work-heading-gap);
}
.workspace-register :is([data-customer-directory],.register-scroll) {
  grid-area:records;min-block-size:0;min-width:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;
  padding-inline-end:12px;scrollbar-width:thin;
}
.customer-index [data-customer-directory],.customer-index [data-customer-no-matches] {padding-inline-start:var(--work-section-inset);}
.customer-index [data-customer-no-matches] {grid-area:records;align-self:start;margin:0;}
.customer-index {container:customer-directory / inline-size;}
.workspace-register > .customer-actions {grid-area:action;place-self:end;margin:0 0 var(--work-action-lift);padding:0;}
[data-customer-directory]:focus-visible {outline:2px solid var(--focus);outline-offset:2px;}
.workspace-toolbar .customer-search {width:min(100%,19rem);}
@container customer-frame (max-width:880px) {
  .workspace-register {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    grid-template-areas:"title" "tools" "records" "action";
  }
  .workspace-register > .customer-actions {margin:16px 0 0;}
}
.customer-search {display:flex;align-items:center;gap:8px;width:min(100%,240px);border-bottom:1px solid var(--line);color:var(--muted);}
.customer-search svg {flex:none;width:18px;height:18px;}
.customer-search input {width:100%;padding:8px 0;color:var(--ink);font:inherit;border:0;background:transparent;}
.customer-grid {display:grid;align-content:start;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:6px;}
.customer-card {
  align-self:start;min-width:0;border-radius:10px;color:var(--ink);background:#f3f2ef;
}
.customer-card-face {
  position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;
  gap:24px;min-height:160px;padding:18px 20px;border-radius:inherit;
}
.customer-card[hidden] {display:none;}
.customer-card-heading {display:grid;gap:4px;max-width:100%;}
.customer-profile-link {color:inherit;text-decoration:none;font:550 var(--work-section-size)/1.3 var(--ui-font);text-wrap:balance;overflow-wrap:anywhere;}
.customer-profile-link::after {content:"";position:absolute;inset:0;border-radius:inherit;}
.customer-card-heading small {font:400 var(--text-body)/1.3 var(--ui-font);color:var(--muted);}
.customer-card .customer-project-action {
  position:relative;display:inline-flex;align-items:center;gap:8px;align-self:start;
  padding:3px 0;margin:0;min-height:32px;max-width:100%;border:0;border-radius:0;
  background:transparent;color:var(--ink);font:400 var(--text-body)/1.35 var(--ui-font);
  text-decoration:none;text-align:start;text-wrap:balance;overflow-wrap:anywhere;
}
.customer-project-action svg {width:16px;height:16px;flex:none;}
.customer-project-action[aria-expanded="true"] svg {transform:rotate(180deg);}
.customer-count {font:500 32px/1 var(--ui-font);letter-spacing:-.045em;margin-inline-end:4px;font-variant-numeric:tabular-nums;color:var(--ink);}
.customer-card:is(:hover,:focus-within,:has([aria-expanded="true"])) {background:var(--blue);}
.customer-card:is(:hover,:focus-within,:has([aria-expanded="true"])) small {color:inherit;}
.customer-profile-link:focus-visible::after,.customer-project-action:focus-visible {outline:2px solid var(--focus);outline-offset:3px;}
.customer-profile-link:focus-visible {outline:0;}
.customer-project-detail {list-style:none;margin:0 20px;padding:0 0 12px;min-width:0;}
.customer-project-detail[hidden] {display:none;}
.customer-project-detail li {border-block-start:1px solid rgb(0 0 0 / 16%);}
.customer-project-row {
  display:block;padding:10px 0;color:inherit;font:400 var(--text-body)/1.4 var(--ui-font);
  text-decoration:none;text-wrap:pretty;overflow-wrap:anywhere;
}
.customer-project-row small {font:inherit;margin-inline-end:4px;}
.customer-project-row:is(:hover,:focus-visible) {text-decoration:underline;text-underline-offset:3px;}

@container customer-directory (max-width:540px) {
  .customer-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .customer-card-face {min-height:148px;padding:14px 12px;gap:20px;}
  .customer-profile-link {font-size:16px;}
  .customer-project-detail {margin-inline:12px;}
  .customer-directory-tools {justify-content:flex-start;}
}
@container customer-directory (max-width:270px) {
  .customer-grid {grid-template-columns:minmax(0,1fr);}
}


/* The project names sit directly below their customer, on the same reading axis. */
.customer-directory-entry {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;
  gap:8px 24px;padding:18px 0;border-block-start:1px solid var(--line);
}
.customer-directory-entry:first-child {border-block-start:0;}
.customer-directory-entry:last-child {border-block-end:1px solid var(--line);}
.customer-directory-entry[hidden] {display:none;}
.customer-directory-entry h2 {min-width:0;grid-column:1;line-height:1.25;}
.customer-directory-entry .customer-profile-link {
  font:550 var(--work-section-size)/1.35 var(--ui-font);letter-spacing:-.015em;
}
.customer-directory-entry .customer-profile-link::after {content:none;}
.customer-directory-place {grid-column:2;color:var(--muted);font-size:var(--text-body);text-align:end;}
.customer-entry-projects,.customer-extra-projects {grid-column:1/-1;}
.customer-entry-projects {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px;min-width:0;}
.customer-entry-links,.customer-extra-projects {list-style:none;padding:0;margin:0;}
.customer-entry-links {display:inline;max-width:100%;line-height:1.55;text-wrap:pretty;}
.customer-entry-links li {display:inline;}
.customer-entry-links li:not(:last-child)::after {content:"  ·  ";color:var(--muted);}
.customer-project-link {
  color:var(--ink);text-decoration:none;font:400 var(--text-body)/1.55 var(--work-body-font);overflow-wrap:anywhere;
}
.customer-directory-entry :is(.customer-project-link,.customer-profile-link):hover {text-decoration:underline;text-underline-offset:3px;}
.customer-directory-entry :is(a,button):focus-visible {outline:2px solid var(--focus);outline-offset:3px;}
.customer-directory-entry .customer-project-action {
  display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:0 4px;background:transparent;border:0;color:var(--ink);font:inherit;
}
.customer-extra-projects:not([hidden]) {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));
  gap:0 24px;max-inline-size:58rem;
}
.customer-extra-projects li {border-block-start:1px solid var(--line);padding:8px 0;}
@container customer-directory (max-width:540px) {
  .customer-directory-entry {gap:4px 12px;padding-block:16px;}
  .customer-directory-entry .customer-profile-link {font-size:var(--work-section-size);}
  .customer-directory-place {grid-row:3;grid-column:1/-1;text-align:start;}
  .customer-extra-projects {grid-row:4;}
}

@media (max-height:600px) {
  .workspace-register > .customer-actions {margin-block-end:0;}
  .workspace-register > :is(.sheet-title,.workspace-toolbar) {margin-block-end:8px;}
}

body:has(:is(.customer-editor,.team-editor)) .main-shell {display:flex;flex-direction:column;}
body:has(:is(.customer-editor,.team-editor)) #app {flex:1;}
:is(.customer-editor,.team-editor) .project-review__body {max-inline-size:58rem;}
.customer-editor .project-review__sections {margin-block-end:20px;}
.customer-editor .project-review .project-dialog__field {
  min-height:42px;
  font:400 var(--text-body)/1.55 var(--work-body-font);
}
.customer-editor .project-review .project-dialog__section {padding-block:14px;}
.customer-name-field {max-inline-size:44rem;padding-block-end:20px;}
:is(.customer-name-field p,.customer-editor .workspace-help,.customer-editor .profile-import-result) {
  color:var(--muted);
  font:400 var(--text-body)/1.55 var(--work-body-font);
}
.customer-name-field p {margin:8px 0 0;}
.profile-import-result [data-source-feedback]:not(:empty) {display:block;margin:0 0 12px;color:var(--muted);}
.profile-import-result [data-recipient-options]:not(:empty) {display:grid;justify-items:start;gap:8px;margin-bottom:16px;}
.profile-import-result [data-recipient-options] button {border:0;background:transparent;padding:4px 0;text-align:start;text-decoration:underline;}

.team-directory {max-inline-size:66rem;}
.team-group + .team-group {margin-block-start:28px;}
.team-group > header,.team-entry {
  display:grid;grid-template-columns:minmax(0,1.4fr) minmax(9rem,.8fr) minmax(0,1fr);
  column-gap:24px;align-items:baseline;
}
.team-group > header {
  padding-block-end:10px;border-block-end:1px solid var(--line);
}
.team-access-label {grid-column:3;color:var(--muted);font-family:var(--ui-font);}
.team-group > ul {list-style:none;margin:0;padding:0;}
.team-entry {border-block-end:1px solid var(--line);padding:16px 0;overflow-wrap:anywhere;}
.team-entry :is(h3,p) {margin:0;}
.team-entry h3 {font:550 var(--text-body)/1.4 var(--ui-font);}
.team-entry-person p,.team-entry-role small {display:block;color:var(--muted);font:inherit;margin-block-start:4px;}
.team-entry-role > span,.team-rights summary {font-family:var(--ui-font);}
.team-entry-access .text-link {display:inline-block;margin-block-start:4px;padding:0;}
.team-invite-fields {display:grid;gap:16px;max-inline-size:38rem;}
.team-invite-form :is(.field,fieldset) {margin:0;}
.team-invite-form .field {
  display:grid;gap:6px;color:var(--muted);
  font:400 var(--text-body)/1.55 var(--work-body-font);
}
.team-invite-form .field :is(input,select) {
  width:100%;min-height:38px;padding:6px 0;min-width:0;
  border:0;border-block-end:1px solid var(--line);border-radius:0;
  background:transparent;color:var(--ink);font:inherit;
}
.team-invite-form .field :is(input,select):focus-visible {outline:0;border-color:var(--focus);}
.team-invite-form .workspace-help {margin:20px 0 0;font-family:var(--work-body-font);}
.team-invite-form .entity-field .inline-action {margin-block-start:5px;}
.team-index .team-invite-form {display:grid;gap:16px;}
.team-invite-form fieldset {display:grid;gap:8px;padding:0;border:0;min-width:0;}
.team-invite-form fieldset > label:not(.field) {font:400 var(--text-body)/1.5 var(--work-body-font);}
.team-invite-form legend {font-family:var(--ui-font);padding:0;margin-block-end:6px;}
.team-invite-form input[type="checkbox"] {accent-color:var(--ink);}
.team-invite-form [role="status"]:empty {display:none;}
.team-index .team-invite-form .home-action-pair {--pair-tile:var(--work-action-size);}
.team-rights {margin-block-start:8px;}
.team-rights summary {cursor:pointer;}
.team-rights .team-invite-form {margin-block-start:12px;}
.project-team-dialog[data-project-team] {
  font:400 var(--text-body)/1.55 var(--work-body-font);
}
.project-team-assignment {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;
  gap:12px;max-inline-size:30rem;margin-block-start:20px;
}
.project-team-assignment .project-drawer-add {margin-block-end:6px;}
@media (max-width:600px) {
  .project-team-dialog[data-project-team] :is(.team-group > header,.team-entry) {grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;}
  .project-team-dialog[data-project-team] .team-access-label {display:none;}
  .project-team-dialog[data-project-team] .team-entry-access {grid-column:1/-1;}
}
@container customer-frame (max-width:580px) {
  .team-group > header,.team-entry {grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;}
  .team-access-label {display:none;}
  .team-entry-access {grid-column:1/-1;}
}

.issued-document-actions {display:grid;justify-items:start;gap:8px;}
.issued-document-actions .text-link {padding:0;text-align:start;}

.invoice-register .sheet-columns {display:block;}

/* A date, a document number and an amount always have their own reading axis. */
[data-invoice-list] [hidden] {display:none!important;}
.invoice-register .sheet-columns > div > [data-invoice-empty]::before {content:none;}
.invoice-register-tools .invoice-filter-tools {flex:1 1 16rem;}
.invoice-view-switch {display:flex;align-items:center;gap:16px;}
.invoice-view-switch :is(a,button) {border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent;color:var(--muted);font:inherit;text-decoration:none;padding:7px 0;}
.invoice-view-switch :is(a[aria-current],button[aria-pressed="true"]) {color:var(--ink);border-block-end:1px solid currentColor;}
.invoice-view-switch :is(a,button):is(:focus-visible,:hover) {color:var(--ink);}
.invoice-register .sheet-section-body > .invoice-project-group {gap:12px;}
.invoice-register .invoice-project-group:not([hidden]) ~ .invoice-project-group:not([hidden]) {margin-block-start:16px;}
.client-invoice-list {container:invoice-history / inline-size;display:grid;gap:20px;align-content:start;text-align:start;}
.client-invoice-list .sheet-invoice-history__total {line-height:1.5;}
.invoice-project-group,.client-invoice-drafts {display:grid;gap:8px;min-width:0;}
.invoice-project-group h3,.client-invoice-drafts h3 {font:550 var(--text-body)/1.45 var(--ui-font);margin:0;overflow-wrap:anywhere;text-wrap:pretty;text-align:start;}
.invoice-project-group {gap:12px;}
.invoice-project-group:not([hidden]) ~ .invoice-project-group:not([hidden]) {
  padding-block-start:20px;border-block-start:1px solid var(--line);
}
.invoice-project-group .invoice-project-heading {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:6px 12px;
  font:550 var(--work-section-size)/1.4 var(--ui-font);text-align:start;
}
.invoice-project-heading > span {justify-self:start;max-width:100%;overflow-wrap:anywhere;text-wrap:balance;}
.invoice-register .invoice-project-heading .project-name-tag {
  box-sizing:border-box; inline-size: min(100%, 16.25rem); font-size:var(--text-body);
  overflow-wrap:anywhere; text-wrap:wrap;
}
.invoice-project-heading .project-name-tag {padding:2px 8px;}
.invoice-project-heading small {
  color:var(--muted);font:400 var(--text-body)/1.4 var(--ui-font);text-align:end;max-width:9ch;overflow-wrap:anywhere;
}
.client-invoice-drafts {gap:16px;}
.invoice-filter-tools {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 16px;max-width:25rem;min-width:0;line-height:1.4;text-align:start;}
.invoice-filter-tools .customer-search {grid-column:1;width:100%;max-width:none;min-width:0;}
.invoice-filter-tools input {min-width:0;font:inherit;}
.invoice-filter-tools .customer-search:focus-within {border-color:var(--focus);box-shadow:0 1px 0 var(--focus);}
.invoice-filter-tools .customer-search input:focus-visible {outline:0;}
.invoice-filter-tools :is(.invoice-filter-period,.invoice-filter-clear) {border:0;background:transparent;border-radius:0;font:inherit;line-height:1.4;padding:5px 0;color:var(--ink);}
.invoice-filter-period {display:contents;}
.invoice-filter-period[open]::details-content {display:contents;}
.customer-workspace .invoice-filter-period summary {grid-column:2;grid-row:1;display:flex;gap:5px;align-items:center;cursor:pointer;list-style:none;font:inherit;}
.invoice-filter-period summary::-webkit-details-marker {display:none;}
.invoice-filter-period .ui-icon {width:16px;height:16px;vertical-align:middle;color:var(--icon-muted);}
.invoice-filter-period[open] .ui-icon--down {transform:rotate(180deg);}
.invoice-filter-clear {grid-column:1/-1;justify-self:start;text-decoration:underline;text-underline-offset:3px;}
.invoice-filter-dates {grid-column:1/-1;display:flex;flex-wrap:wrap;width:100%;gap:8px 16px;}
.invoice-filter-dates label {display:grid;grid-template-columns:2em auto;align-items:center;gap:6px;color:var(--muted);}
.invoice-filter-dates input {border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);padding:4px 0;}
.invoice-filter-message {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.invoice-ledger {border-collapse:collapse;table-layout:fixed;width:100%;font:400 var(--text-body)/1.45 var(--ui-font);text-align:start;}
.invoice-ledger :is(td,th) {background:transparent;text-align:start;border:0;vertical-align:baseline;font:inherit;padding:10px 12px 10px 0;overflow-wrap:anywhere;}
.invoice-ledger th {padding-block:0 6px;color:var(--muted);border-bottom:1px solid var(--line);font-weight:400;}
.invoice-ledger td:last-child,.invoice-ledger th:last-child {padding-inline-end:0;}
.invoice-ledger .invoice-date,.invoice-ledger .invoice-amount {font-variant-numeric:tabular-nums;white-space:nowrap;}
.invoice-ledger .invoice-amount,.invoice-ledger th:last-child,.invoice-ledger--register th:nth-last-child(2) {text-align:end;}
.invoice-ledger tbody tr {position:relative;}
.invoice-ledger tbody tr+tr td {border-top:1px solid var(--line);}
.invoice-ledger :is(a,button) {color:var(--ink);font:550 var(--text-body)/1.45 var(--ui-font);text-decoration:none;padding:0;border:0;background:transparent;text-align:start;}
.invoice-ledger :is(a,button)::after {content:"";position:absolute;inset:0;}
.invoice-ledger tr:is(:hover,:focus-within) .invoice-number :is(a,button) {text-decoration:underline;text-underline-offset:3px;}
.ledger-col-date {width:7.25rem;}
.ledger-col-number {width:9rem;}
.ledger-col-net,.ledger-col-gross {width:6rem;}
.invoice-ledger--client .ledger-col-date {width:31%;}
.invoice-ledger--client .ledger-col-number {width:auto;}
.invoice-ledger--client .ledger-col-net {width:27%;}
@container project-content (max-width:780px) {
 .invoice-ledger--register thead {position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;}
 .invoice-ledger--register,.invoice-ledger--register tbody {display:block;}
 .invoice-ledger--register colgroup {display:none;}
 .invoice-ledger--register tbody tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding-block:14px;}
 .invoice-ledger--register tbody tr+tr {border-top:1px solid var(--line);}
 .invoice-ledger--register td {display:block;padding:0;text-align:start;border:0!important;}
 .invoice-ledger--register td::before {content:attr(data-label);display:block;color:var(--muted);font-weight:400;}
}
@container invoice-history (max-width:290px) {
 .invoice-ledger--client {table-layout:auto;}
 .invoice-ledger--client :is(td,th) {padding-inline-end:6px;}
 .invoice-ledger--client .ledger-col-date,.invoice-ledger--client .ledger-col-net {width:auto;}
}

@container project-content (max-width:340px) {
 .invoice-ledger--register tbody tr {grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);}
 .invoice-ledger--register :is(.invoice-party,.invoice-job) {grid-column:1/-1;}
}
@container customer-frame (max-width:340px) {
 .invoice-register-tools .invoice-filter-tools {grid-template-columns:minmax(0,1fr);width:100%;}
 .invoice-register-tools .invoice-filter-period summary {grid-column:1;grid-row:auto;}
}

.customer-workspace.workspace-register {
  margin-inline-start:0;
  width:min(100%,56rem);
  grid-template: "tools" auto "records" minmax(0,1fr) / minmax(0,1fr);
  gap:0;
}
.register-head {
  grid-area:tools;display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:12px 24px;padding-block-end:12px;
  border-block-end:1px solid var(--work-title-rule);
}
.register-head .workspace-toolbar {margin:0;flex:1;align-items:center;}
.register-actions {margin-inline-start:auto;display:flex;align-items:center;gap:16px;}
.workspace-register :is([data-customer-directory],.register-scroll) {padding-inline:0;}
.workspace-register .sheet-content {width:100%;margin:0;}
.workspace-register .customer-directory-entry {padding-block:12px;gap:4px 16px;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto;}
.workspace-register .customer-directory-place {grid-column:3;grid-row:1;}
.register-email {grid-column:2;grid-row:1;justify-self:start;overflow-wrap:anywhere;user-select:text;}
.workspace-register .customer-profile-link {font-size:var(--text-body);}
.workspace-register .team-entry {padding-block:12px;}
.workspace-register .team-group > header {padding-block:12px 8px;}

body:has(.customer-index--rows) #app { padding-inline: var(--work-gutter-end); }
.customer-index--rows.workspace-register { width:min(100%, 720px); }
.customer-index--rows .customer-directory-tools { justify-content:flex-start; gap:var(--work-heading-gap); }
.customer-index--rows .customer-directory-tools h1 { margin:0; font:var(--workspace-page-title); }
.customer-index--rows .register-head { padding-bottom:var(--work-heading-gap); }
.customer-index--rows .customer-directory-entry {
  display:block; padding:0;
}
.customer-index--rows .customer-directory-entry[hidden] { display:none; }
.customer-row-heading {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:24px; padding:12px;
}
.customer-row-heading:has([aria-expanded="true"]) { background:var(--blue); }
.customer-row-heading:has([aria-expanded="true"]) .customer-row-place { color:var(--ink); }
.customer-index--rows .customer-extra-projects {
  padding-inline:24px 12px;
}
.customer-index--rows .customer-directory-entry .customer-profile-link {
  font:700 14px/1.4 var(--work-body-font); letter-spacing:normal;
}
.customer-index--rows .customer-row-place { display:block; color:var(--muted); font:400 14px/1.4 var(--work-body-font); }
.customer-index--rows .customer-directory-entry .text-action-chip {
  justify-self:end; box-sizing:border-box; inline-size:104px; block-size:28px; white-space:nowrap;
}

/* Customer detail and entry share the directory’s left edge and reading width. */
body:has(.customer-profile) #app,
body:has(.customer-editor) :is(#app,.page-header) { padding-inline:var(--work-gutter-end); }
.customer-workspace.customer-profile, .project-editor-page.customer-editor {
  width:min(100%,720px); margin-inline:0;
}
.customer-profile .sheet-title { align-items:center; padding-inline-end:0; }
.customer-profile .sheet-section h2,
.customer-editor .project-dialog__section button[aria-expanded] {
  font:550 18px/1.3 var(--system-font); letter-spacing:normal;
}
.customer-profile .sheet-columns { gap:24px; }
.customer-profile .project-name-tag {
  font:550 14px/1.4 var(--work-body-font); padding:2px 6px;
  overflow-wrap:anywhere; box-decoration-break:clone;
}
.customer-profile .customer-actions { margin-top:auto; padding-top:24px; }
body:has(.customer-editor) .page-header > div:first-child { margin-inline-start:0; }
body:has(.customer-editor) .page-header {
  align-items:center; justify-content:space-between;
  width:100%; max-width:none;
}
body:has(.customer-editor) .main-shell { height:100dvh; min-height:0; }
body:has(.customer-editor) .page-header:empty { display:none; }
body:has(.customer-editor) #app {
  min-height:0; padding-block:var(--work-inset-top) var(--work-inset-bottom);
}
.project-editor-page.customer-editor { width:100%; min-height:0; }
.customer-editor .project-dialog-mount { min-height:0; }
.customer-editor .project-dialog-mount > form.project-review {
  position:relative; min-height:0; grid-template-columns:minmax(0,1fr) max-content;
  grid-template-areas:"sections actions"; grid-template-rows:minmax(0,1fr);
  gap:var(--work-column-gap);
}
.customer-editor .project-review__body { min-height:0; overflow:visible; }
.customer-editor .project-review__sections {
  flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; margin:0;
}
.customer-editor .project-review__actions { position:static; margin-bottom:var(--work-action-lift); }
.customer-create-back { grid-area:actions; justify-self:end; align-self:start; }
.customer-editor .project-review__help { flex:none; margin:0; padding-top:16px; }
.customer-identity {
  display:grid; grid-template-columns:minmax(184px,24%) minmax(0,1fr) 18px;
  column-gap:clamp(12px,2vw,32px); padding-bottom:24px;
}
.customer-identity h1 { margin:0; padding-top:8px; font:var(--workspace-page-title); }
.customer-identity-fields { grid-column:2; }
.customer-editor .project-review .project-dialog__section { padding-block:24px; }
.customer-editor .project-dialog__section-toggle > span { top:24px; }
.customer-editor .project-dialog__section:has([aria-expanded="false"]) { padding-block:6px; }
.customer-editor .project-dialog__section-toggle[aria-expanded="false"] > span { top:6px; }

.customer-editor .project-review .project-dialog__field {
  display:grid; grid-template-columns:minmax(0,16rem) minmax(0,18rem);
  align-items:baseline; width:100%; min-height:32px; gap:12px;
}
.customer-editor .project-dialog__field > span { color:var(--ink); font-weight:600; }
.customer-editor .project-review .project-dialog__field > input {
  width:100%; min-width:0; margin:0; height:26px; min-height:26px; padding-block:2px;
}
.customer-editor .customer-identity-fields,
.customer-editor .project-review .project-dialog__grid {
  display:grid; grid-template-columns:minmax(0,1fr); gap:4px;
}

@media (min-width: 881px) {
  body:has(.customer-profile) .main-shell { height:100dvh; min-height:0; }
  body:has(.customer-profile) #app { min-height:0; padding-block-end:var(--work-inset-bottom); }
  .customer-workspace.customer-profile {
    display:grid; width:100%; min-height:0;
    grid-template-columns:minmax(0,720px) minmax(max-content,1fr);
    grid-template-rows:minmax(0,1fr); gap:var(--work-column-gap);
  }
  .customer-profile > .sheet-content { grid-area:1 / 1; min-height:0; overflow:auto; }
  .customer-profile > [data-component="C08"] { grid-area:1 / 2; place-self:start end; }
  .customer-profile > .customer-actions {
    grid-area:1 / 2; place-self:end; margin:0 0 var(--work-action-lift); padding:0;
  }
}
@media (max-width: 880px) {
  .customer-profile > [data-component="C08"] { position:absolute; inset:0 0 auto auto; }
  .customer-profile .sheet-title { padding-inline-end:48px; }
}

body:has(.work-register) #app {padding-inline:var(--work-gutter-end);}
.customer-workspace.work-register {
  position:relative; width:100%; min-height:0;
  grid-template:"heading actions" auto "records actions" minmax(0,1fr) / minmax(0,var(--register-width)) minmax(max-content,1fr);
  column-gap:var(--work-column-gap); --register-width:720px;
}
.work-register.invoice-register {--register-width:64rem;}
.work-register-heading {grid-area:heading; display:grid; gap:var(--work-heading-gap); padding-bottom:12px; border-bottom:1px solid var(--line);}
.work-register .sheet-section h2,.work-register .team-group h2 {margin:0;font:550 18px/1.3 var(--system-font);}
.work-register .workspace-toolbar {grid-area:auto;margin:0;}
.work-register .register-scroll {grid-area:records;min-height:0;max-height:100%;overflow:auto;overscroll-behavior:contain;}
.work-register-actions {grid-area:actions;place-self:end;display:flex;gap:var(--work-action-gap);margin:0 0 var(--work-action-lift);}
.register-back {grid-area:actions;place-self:start end;}
.register-switch {display:flex;flex-wrap:wrap;gap:6px;}
.register-switch .text-action-chip {min-width:104px;}
.team-index .team-entry h3,.invoice-register .invoice-number :is(a,button) {font:700 14px/1.4 var(--work-body-font);}
.team-index .team-project-access {border-bottom:1px solid var(--line);}
.team-project-access summary {display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px;cursor:pointer;font:400 14px/1.4 var(--work-body-font);}
.team-project-access summary strong {font-weight:700;}
.team-project-access[open] summary {background:var(--blue);}
.team-project-access :is(ul,p) {list-style:none;padding:8px 24px;margin:0;}
.team-project-access li {padding:4px 0;}
.work-register .invoice-ledger {font-family:var(--work-body-font);}
@media(max-width:880px){
 .customer-workspace.work-register {grid-template:"heading" auto "records" minmax(0,1fr) "actions" auto / minmax(0,1fr);}
 .work-register-actions {margin:12px 0 0;}
 .register-back {position:absolute;inset:0 0 auto auto;}
}

.team-empty-assignment { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }

.work-register-heading h1 {margin:0;font:var(--workspace-page-title);}
.main-shell:has(.customer-editor) .page-header h1 {font:var(--workspace-page-title);}
