.contact-directory-tabs,.customer-tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.contact-directory-tabs [aria-current=page],.customer-tabs [aria-pressed=true]{background:var(--blue-soft);border-color:var(--blue)}
.project-directory{min-width:0;max-width:1600px;margin:0 auto}
.project-directory-filters,.customer-project-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}
.project-directory-filters label,.customer-project-filters label{display:flex;flex-direction:column;gap:7px;flex:1 1 190px;color:var(--muted);font-size:12px}
.project-directory-filters label:first-child,.customer-project-filters label:first-child{flex:2 1 300px}
.project-directory input,.project-directory select,.customer-project-filters input,.customer-project-filters select{font:inherit;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--ink);min-width:0;width:100%}
.project-directory td small{display:block;margin-top:6px;color:var(--muted);max-width:460px;white-space:pre-line}
.project-directory td button{font-size:12px;white-space:normal;text-align:left}
.project-directory-child{background:var(--soft)}
.project-directory-child td:first-child{padding-left:36px}
.project-directory{--blue:var(--green);--blue-soft:color-mix(in srgb,var(--green) 15%,transparent)}
.project-directory .page-header{align-items:flex-start;gap:1rem;flex-wrap:wrap}
.project-directory .doc-actions{display:flex;gap:.6rem;flex-wrap:wrap}
.project-directory .project-directory-filters{display:grid;grid-template-columns:minmax(15rem,2fr) minmax(13rem,1.3fr) repeat(3,minmax(8rem,1fr)) auto;align-items:end}
.project-directory-filters label{min-width:0;max-width:100%}
.project-directory table{width:100%;table-layout:fixed}
.project-directory th:first-child{width:31%}.project-directory th:nth-child(2){width:10%}.project-directory th:nth-child(3){width:17%}.project-directory th:nth-child(4){width:20%}.project-directory th:nth-child(5){width:11%}.project-directory th:last-child{width:11%}
.project-directory td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.project-directory td>button{max-width:100%;font-size:.85rem}
.project-directory td small button{padding:0;border:0;background:transparent;color:var(--muted)}
.project-directory .customer-site-summary p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:.3rem 0;font-size:.75rem}
.project-directory .customer-site-summary strong{font-size:.75rem;font-weight:normal;color:var(--muted)}
.project-directory-description{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.project-directory .project-attention{color:var(--warning,#dca74b)}
.project-directory-match td:first-child{border-left:3px solid var(--green)}
.project-contact-summary{padding:.8rem;border:1px solid var(--line);border-radius:.5rem;margin:.6rem 0}
.project-contact-summary small{display:block;overflow-wrap:anywhere;margin-top:.35rem;color:var(--muted)}
.project-details-editor{max-width:100%}.project-details-editor input,.project-details-editor select,.project-details-editor textarea{width:100%;min-width:0}
@media(max-width:1350px){.project-directory .project-directory-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.project-directory-filters label:first-child{grid-column:span 2}}
@media(max-width:700px){
 .project-directory .project-directory-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.project-directory-filters label:first-child{grid-column:1/-1}
 .project-directory input,.project-directory select,.project-details-editor input,.project-details-editor select,.project-details-editor textarea{font-size:16px;min-height:44px}
 .project-directory .table-wrap{overflow:visible}.project-directory table,.project-directory tbody{display:block;width:100%;min-width:0;table-layout:auto}
 .project-directory thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .project-directory tr{display:block;border:1px solid var(--line);border-radius:9px;padding:1rem;margin-bottom:1rem;min-width:0;background:var(--panel)}
 .project-directory td,.project-directory-child td:first-child{display:block;width:100%;padding:.4rem 0;border:0;min-width:0}
 .project-directory td[data-label]::before{content:attr(data-label);display:block;font-size:.7rem;color:var(--muted);margin-bottom:.35rem}
 .project-directory td:first-child::before{display:none}.project-directory td:first-child>button{font-size:1rem}
 .project-directory td:last-child button{width:100%;min-height:44px;margin-top:.4rem}
 .project-directory-child{margin-left:1rem;border-left:3px solid var(--line)!important}.project-directory-match{border-left-color:var(--green)!important}
 .project-directory .panel{padding:.7rem}.project-directory .customer-site-summary p{display:block}.project-directory .project-directory-description{-webkit-line-clamp:3}
 .project-details-editor .customer-edit-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:400px){.project-directory .project-directory-filters{grid-template-columns:minmax(0,1fr)}.project-directory .page-header .doc-actions{width:100%}.project-directory .page-header .doc-actions button{flex:1}}
.customer-compact-details{display:flex;gap:12px 28px;flex-wrap:wrap;padding:16px 20px;margin-bottom:18px;align-items:center}
.customer-compact-details span{font-size:12px;color:var(--muted)}
.customer-overview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.customer-overview-grid .panel{min-width:0;padding:20px}
.customer-project-list{display:grid;gap:12px}
.customer-project-row{display:flex;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid var(--line)}
.customer-project-row small{display:block;color:var(--muted);margin-top:7px}
.customer-project-row .doc-actions{align-self:center;flex-wrap:wrap}
.customer-project-info{min-width:0;flex:1}
.customer-subprojects{margin-top:12px}
.customer-subprojects>strong{display:block;font-size:11px;color:var(--muted);font-weight:600}
.customer-subproject-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
.customer-subproject-link{display:inline-flex;gap:5px;align-items:center;max-width:100%;font-size:12px;overflow-wrap:anywhere}
.customer-subproject-link button{font-size:11px;padding:6px 9px;text-align:left;white-space:normal;max-width:100%;overflow-wrap:anywhere}
.customer-subproject-status{font-size:10px;color:var(--muted)}
.customer-subprojects-toggle{font-size:11px;margin-top:7px;padding:5px 0;border:0;background:transparent;color:var(--blue)}
.customer-subprojects-empty{font-size:11px;color:var(--muted);margin:10px 0 0}
.customer-summary-counts{display:flex;gap:24px;flex-wrap:wrap;margin:15px 0}
.customer-summary-counts strong{display:block;font-size:23px}
.customer-summary-counts span{font-size:12px;color:var(--muted)}
@media(max-width:700px){.customer-overview-grid{grid-template-columns:1fr}.customer-project-row{flex-direction:column}.customer-compact-details{align-items:flex-start;flex-direction:column}.project-directory-filters,.customer-project-filters{align-items:stretch}.project-directory-filters label,.project-directory-filters label:first-child,.customer-project-filters label,.customer-project-filters label:first-child{flex-basis:100%}}

/* Customer workspace: one identity, four stable views, existing actions. */
.customer-workspace{min-width:0;max-width:1600px;margin:0 auto}
.customer-workspace>.cycle-breadcrumb{margin-bottom:1rem}
.customer-page-heading .page-header{align-items:flex-start;gap:1rem}
.customer-page-heading h1{overflow-wrap:anywhere}
.customer-page-heading .page-header>div{min-width:0}
.customer-page-heading .page-header p{overflow-wrap:anywhere}
.customer-header-actions,.customer-page-secondary{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.customer-page-tools{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin:0 0 1.1rem}
.customer-contact-details{min-width:0;flex:1}
.customer-contact-details>summary,.customer-switcher>summary{cursor:pointer;list-style:none;color:var(--blue,var(--green));font-size:.85rem;font-weight:600;padding:.65rem 0}
.customer-contact-details>summary::-webkit-details-marker,.customer-switcher>summary::-webkit-details-marker,.customer-new-document>summary::-webkit-details-marker{display:none}
.customer-contact-details>summary::after,.customer-switcher>summary::after{content:' ▾'}
.customer-contact-details[open]>summary::after,.customer-switcher[open]>summary::after{content:' ▴'}
.customer-contact-details>div{border:1px solid var(--line);background:var(--soft);border-radius:.65rem;padding:1rem;max-width:44rem}
.customer-contact-details .customer-details{margin-top:0}
.customer-contact-details dd{white-space:pre-wrap;overflow-wrap:anywhere}
.customer-switcher{position:relative}
.customer-switcher>div,.customer-switcher>.customer-picker{position:absolute;z-index:5;right:0;top:100%;width:min(30rem,calc(100vw - 3rem));padding:1rem;border:1px solid var(--line);border-radius:.65rem;background:var(--paper,var(--soft));box-shadow:0 10px 28px #0002}
.customer-switcher #customerChoiceHost{display:grid;gap:.75rem}
.customer-switcher label{display:grid;gap:.4rem;font-size:.8rem;color:var(--muted)}
.customer-switcher input,.customer-switcher select{width:100%;min-width:0;font:inherit;padding:.65rem;border:1px solid var(--line);border-radius:.45rem;color:var(--ink);background:var(--paper,var(--soft))}
.customer-new-document{position:relative}
.customer-new-document>summary{display:block;cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--ink);padding:11px 15px;font-size:inherit;white-space:nowrap}
.customer-document-menu{position:absolute;z-index:6;top:calc(100% + .4rem);right:0;min-width:11rem;padding:.45rem;display:grid;gap:.35rem;background:var(--paper,var(--soft));border:1px solid var(--line);border-radius:.65rem;box-shadow:0 10px 28px #0002}
.customer-document-menu button{width:100%;text-align:left}
.customer-new-document:not([open])>.customer-document-menu,.customer-switcher:not([open])>#customerChoiceHost{display:none}
.customer-workspace>.customer-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;border-bottom:1px solid var(--line);padding-bottom:.5rem;margin-bottom:1.4rem}
.customer-workspace>.customer-tabs button[aria-pressed=true]{background:var(--soft);border-color:var(--green);color:var(--green)}
.customer-tabs button{min-width:0;font-weight:600}
.customer-overview-grid .panel-title{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}
.customer-overview-grid h2{margin-top:0}
.customer-overview-grid .panel-title p{margin:.35rem 0;color:var(--muted);font-size:.8rem}
.customer-recent-documents{display:grid;gap:.25rem}
.customer-recent-documents article{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.75rem 0;border-bottom:1px solid var(--line)}
.customer-recent-documents article>div{min-width:0}
.customer-recent-documents small{display:block;color:var(--muted);margin-top:.4rem;font-size:.75rem}
.customer-invoice-register{min-width:0}
.customer-invoice-register>.panel-title h3{margin-bottom:.3rem}
.customer-invoice-register>.panel-title p{color:var(--muted);font-size:.85rem;margin-top:0}
.customer-invoice-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;background:var(--soft);border:1px solid var(--line);border-radius:.65rem;padding:1rem}
.customer-invoice-summary>div{min-width:0}
.customer-invoice-summary small{display:block;color:var(--muted);margin-bottom:.4rem}
.customer-invoice-summary strong{font-size:1.1rem;overflow-wrap:anywhere}
.customer-invoice-list{display:grid;gap:.85rem}
.customer-invoice-card{border:1px solid var(--line);border-radius:.7rem;padding:1rem;min-width:0}
.customer-invoice-identity{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.customer-invoice-identity>div:first-child{min-width:0}
.customer-invoice-identity small{display:block;color:var(--muted);margin-top:.4rem}
.customer-invoice-identity p{font-size:.85rem;color:var(--muted);margin:.5rem 0 0;overflow-wrap:anywhere}
.customer-invoice-dates{font-size:.8rem;color:var(--muted);text-align:right;white-space:nowrap}
.customer-invoice-amounts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.7rem;margin:1rem 0;padding-top:.9rem;border-top:1px solid var(--line)}
.customer-invoice-amounts>div{min-width:0}
.customer-invoice-amounts dt{font-size:.7rem;color:var(--muted);margin-bottom:.35rem}
.customer-invoice-amounts dd{margin:0;font-weight:600;font-size:.9rem;overflow-wrap:anywhere}
.customer-invoice-amounts>div:last-child dd{color:var(--blue)}
.customer-invoice-actions{display:flex;justify-content:flex-end}
@media(max-width:900px){.customer-invoice-amounts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.customer-page-tools{flex-direction:column;align-items:stretch}.customer-page-secondary{justify-content:space-between}.customer-page-heading .page-header{flex-wrap:wrap}.customer-header-actions{width:100%}.customer-switcher>div,.customer-switcher>.customer-picker{right:0}.customer-contact-details>div{max-width:none}.customer-overview-grid .panel{padding:1rem}}
@media(max-width:520px){.customer-workspace>.customer-tabs{gap:.25rem}.customer-tabs button{font-size:.8rem;padding:.65rem .3rem}.customer-header-actions>button,.customer-header-actions>.customer-new-document{flex:1}.customer-new-document>summary{text-align:center}.customer-invoice-summary{gap:.5rem;padding:.8rem}.customer-invoice-summary small{font-size:.7rem}.customer-invoice-summary strong{font-size:.95rem}.customer-invoice-identity{flex-wrap:wrap}.customer-invoice-dates{text-align:left}.customer-invoice-amounts{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-invoice-actions button{width:100%}}

/* Customer directory and profile: keep identity and actions together at every width. */
.customer-directory{min-width:0;max-width:1600px;margin:0 auto}
.customer-directory .toolbar{gap:12px;flex-wrap:wrap;align-items:end}
.customer-directory .toolbar label{display:grid;gap:6px;font-size:12px;color:var(--muted);min-width:140px}
.customer-directory .toolbar select{width:100%;font:inherit;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--ink)}
.customer-directory td{white-space:normal;overflow-wrap:anywhere}
.customer-directory td:first-child{width:45%}.customer-name-link{text-align:left;white-space:normal}
.customer-directory td small{display:block;color:var(--muted);margin-top:.35rem}
.customer-address-summary{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.customer-contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.8rem;margin:1rem 0}
.customer-contact-cards article{min-width:0;border:1px solid var(--line);border-radius:.6rem;padding:.9rem;background:var(--soft)}
.customer-contact-cards p,.customer-contact-cards small{display:block;overflow-wrap:anywhere;margin:.45rem 0}
.customer-contact-cards small{color:var(--muted)}
.customer-contact-actions{display:flex;flex-wrap:wrap;gap:.5rem .9rem;align-items:center;margin-top:.8rem}
.customer-contact-actions a{color:var(--blue);font-size:.8rem;text-decoration:underline;text-underline-offset:.2rem}
.customer-contact-actions button{font-size:.8rem;min-height:36px}
.customer-overview-contacts{margin-top:1rem;min-width:0}.customer-overview-contacts>.panel-title{display:flex;gap:1rem;justify-content:space-between;align-items:center;flex-wrap:wrap}
.customer-overview-contacts>p>small,.customer-overview-contacts>p>strong{display:block;overflow-wrap:anywhere}
.customer-internal-notes{margin:1rem 0;border-top:1px solid var(--line);padding-top:.8rem}
.customer-internal-notes p{white-space:pre-wrap;overflow-wrap:anywhere}.customer-internal-notes small{color:var(--muted)}
#customerCopyStatus:empty{display:none}#customerCopyFallback{width:100%;min-height:7rem;margin-bottom:1rem}
.customer-invoice-balance{display:grid;gap:.3rem;text-align:right;min-width:0}.customer-invoice-balance small{margin:0}.customer-invoice-balance strong{font-size:1.2rem;overflow-wrap:anywhere}.customer-invoice-balance .badge{justify-self:end}
.customer-invoice-footer{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:.8rem 0 .2rem}.customer-invoice-footer .customer-invoice-dates{text-align:left}
.customer-invoice-dates small{display:block;margin-top:.25rem}
.customer-invoice-breakdown>summary{cursor:pointer;color:var(--muted);font-size:.8rem;padding:.5rem 0}.customer-invoice-breakdown .customer-invoice-amounts{margin:.4rem 0}
.customer-record-form,.customer-record-form fieldset,.customer-record-form label,.customer-record-form .form-grid{min-width:0;max-width:100%}
.customer-record-form .form-grid,.customer-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.customer-record-form label{display:grid;gap:7px;font-size:12px;color:var(--muted)}
.customer-record-form input:not([type=radio]):not([type=checkbox]),.customer-record-form select,.customer-record-form textarea{min-width:0;max-width:100%;width:100%;font:inherit;font-size:16px;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--ink)}
.customer-record-form .date-controls>input[type=text][data-date]{flex:1 1 0;min-width:0;width:0;min-height:44px}
.customer-record-form .date-controls>input[type=date][data-date-calendar]{flex:0 0 38px;width:38px;min-width:38px;max-width:38px;min-height:44px;padding:7px;color:transparent}
.customer-record-form .date-controls>button{flex:0 0 auto;width:auto;min-height:44px}
.customer-record-form .supplier-address-mode label{display:flex;align-items:center;gap:.5rem}.customer-record-form .supplier-address-mode input{width:auto}
.customer-form-section{border:1px solid var(--line);padding:16px;border-radius:9px;margin:1rem 0;min-width:0}
.customer-form-section>summary{cursor:pointer;font-weight:600}.customer-form-section[open]>summary{margin-bottom:1rem}
.customer-edit-grid .wide{grid-column:1/-1}.customer-contact-row{margin:1rem 0;border:1px solid var(--line);border-radius:8px;padding:14px;min-width:0}
.customer-record-footer{position:sticky;bottom:-1px;z-index:3;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:14px 0;background:var(--panel,var(--paper,var(--soft)));border-top:1px solid var(--line);margin-top:18px}
.customer-record-footer button{min-height:44px}.customer-record-footer [hidden]{display:none!important}
.customer-record-form [data-record-save-notice]:empty,.customer-record-form [data-customer-compare-status]:empty{display:none}
.customer-duplicate-list{display:grid;gap:1rem}.customer-duplicate-list article{border:1px solid var(--line);border-radius:8px;padding:1rem;min-width:0}.customer-duplicate-list dd{margin:.3rem 0 .8rem;overflow-wrap:anywhere;white-space:pre-wrap}.customer-duplicate-list dt{font-size:.8rem;color:var(--muted)}
.customer-financial-overview{min-width:0;max-width:100%}.customer-financial-overview .metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.customer-financial-overview .metric{min-width:0}.customer-financial-overview .metric strong{overflow-wrap:anywhere;max-width:100%}
.customer-financial-overview td{white-space:normal;overflow-wrap:anywhere}.customer-financial-overview button{white-space:normal;overflow-wrap:anywhere;text-align:left}
@media(max-width:1000px){.customer-financial-overview .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen and (max-width:700px){
 .customer-directory .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.customer-directory .toolbar>.search{grid-column:1/-1;width:100%;max-width:none}.customer-directory .toolbar label{min-width:0}
 .customer-directory .table-wrap,.customer-doc-table,.customer-financial-overview .table-wrap{overflow:visible}
 .customer-doc-table{max-height:none}
 .customer-directory table,.customer-directory tbody,.customer-doc-table table,.customer-doc-table tbody,.customer-financial-overview table,.customer-financial-overview tbody{display:block;width:100%;min-width:0}
 .customer-directory thead,.customer-doc-table thead,.customer-financial-overview thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .customer-directory tr,.customer-doc-table tr,.customer-financial-overview tr{display:block;padding:14px;border:1px solid var(--line);border-radius:9px;margin-bottom:12px;min-width:0}
 .customer-directory td,.customer-directory td:first-child,.customer-doc-table td,.customer-financial-overview td{display:block;width:100%;min-width:0;padding:7px 0;border:0;white-space:normal;overflow-wrap:anywhere}
 .customer-directory td::before,.customer-doc-table td::before,.customer-financial-overview td::before{content:attr(data-label);display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
 .customer-directory td:last-child::before{display:none}.customer-directory td:last-child button{width:100%;margin-top:.4rem}.customer-directory .customer-name-link{font-size:1rem}
 .customer-record-form .form-grid,.customer-edit-grid,.customer-record-form .supplier-country-picker,.customer-record-form .supplier-country-fields{grid-template-columns:minmax(0,1fr)}
 .customer-record-form .form-grid label,.customer-record-form .form-grid .wide{grid-column:1/-1}
 .customer-record-footer button{flex:1}.customer-form-section{padding:12px}.customer-contact-row{padding:10px}
 .customer-overview-contacts{padding:1rem}.customer-project-row .doc-actions{width:100%}.customer-project-row .doc-actions button{flex:1}
}
@media(max-width:520px){.customer-financial-overview .metrics{grid-template-columns:minmax(0,1fr)}.customer-invoice-identity{flex-wrap:nowrap;gap:.6rem}.customer-invoice-balance strong{font-size:1rem}.customer-invoice-footer{align-items:stretch;flex-direction:column;gap:.65rem}.customer-invoice-footer>button{width:100%}.customer-invoice-identity>div:first-child{flex:1}.customer-invoice-balance{max-width:47%}.customer-contact-cards{grid-template-columns:minmax(0,1fr)}}
.customer-workflow-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1rem 0}
.customer-workflow-summary dt{color:var(--muted);font-size:.8rem}.customer-workflow-summary dd{margin:.3rem 0;overflow-wrap:anywhere}
.customer-address-book>summary,.customer-terms-summary>summary{cursor:pointer;font-weight:600;padding:.5rem 0}
.customer-address-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:.8rem;margin:.8rem 0}
.customer-address-cards article{min-width:0;border:1px solid var(--line);border-radius:.6rem;padding:1rem;background:var(--soft)}
.customer-address-cards strong,.customer-address-cards small{display:block;overflow-wrap:anywhere}.customer-address-cards small{color:var(--muted);margin-top:.35rem}
.customer-address-cards p,.customer-terms-summary p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem}
.customer-address-cards .doc-actions{display:flex;gap:.6rem;flex-wrap:wrap}.customer-address-cards button{min-height:40px}
.customer-address-default,.customer-contact-default{color:var(--blue)!important;font-weight:600}
.customer-record-form .customer-address-uses{display:flex;gap:.7rem 1.2rem;flex-wrap:wrap;margin:1rem 0;border:1px solid var(--line);border-radius:.5rem;padding:1rem}
.customer-record-form .customer-address-uses label{display:flex;align-items:center;gap:.5rem}
.customer-record-form .customer-address-uses input[type=checkbox]{width:18px;min-height:18px}
@media(max-width:650px){.customer-workflow-summary dl{grid-template-columns:minmax(0,1fr)}.customer-address-cards .doc-actions button{flex:1}}
.customer-document-views{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 1rem;min-width:0}
.customer-document-views button{min-height:40px;border-radius:7px;padding:9px 16px}
#customerDocumentCycles,.cdc-results,.cdc-cycle,.cdc-stage,.cdc-stage-items{min-width:0;max-width:100%}
.cdc-cycle{margin:0 0 1rem;border:1px solid var(--line);border-radius:11px;background:var(--panel,var(--paper,var(--soft)));overflow-wrap:anywhere}
.cdc-cycle-header{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:10px;padding:16px 18px 12px}
.cdc-cycle-header h3{margin:0;font-size:1rem}.cdc-cycle-scope{color:var(--muted);font-size:.8rem;margin-top:.35rem}
.cdc-cycle-scope button{font-size:inherit;white-space:normal;text-align:left}
.cdc-flow{display:grid;grid-template-columns:repeat(var(--cdc-stages,1),minmax(0,1fr));gap:24px;padding:0 18px 16px}
.cdc-flow.cdc-stages-1{--cdc-stages:1}.cdc-flow.cdc-stages-2{--cdc-stages:2}.cdc-flow.cdc-stages-3{--cdc-stages:3}.cdc-flow.cdc-stages-4{--cdc-stages:4}
.cdc-stage{position:relative}.cdc-stage-label{color:var(--muted);font-size:.8rem;margin:0 0 7px}
.cdc-stage.cdc-connected::after{content:'→';position:absolute;right:-20px;top:48px;color:var(--muted);font-size:18px;pointer-events:none}
.cdc-stage-items{display:grid;gap:9px;align-content:start}
.cdc-document,.cdc-receipt{background:var(--soft);border:1px solid var(--line);border-radius:7px;padding:11px;min-width:0;display:flex;flex-direction:column;gap:6px}
.cdc-document-link{color:var(--green);white-space:normal;text-align:left;overflow-wrap:anywhere;font-size:.82rem;max-width:100%}
.cdc-document-date,.cdc-document-status,.cdc-source-link,.cdc-receipt-allocation,.cdc-receipt-status{font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}
.cdc-document-status .badge{max-width:100%;white-space:normal}
.cdc-document-amount{font-weight:600;font-variant-numeric:tabular-nums}
.cdc-source-link button,.cdc-receipt-allocation button{font-size:inherit;white-space:normal;text-align:left;overflow-wrap:anywhere}
.cdc-cycle-summary{display:flex;gap:10px 20px;flex-wrap:wrap;border-top:1px solid var(--line);padding:12px 18px;color:var(--muted);font-size:.8rem}
.cdc-cycle-summary>span{display:flex;gap:7px;flex-wrap:wrap}.cdc-cycle-summary strong{color:var(--ink);font-variant-numeric:tabular-nums}
.cdc-related{border-top:1px solid var(--line);padding:11px 18px;font-size:.82rem}
.cdc-related>summary,.cdc-unlinked>summary{cursor:pointer;overflow-wrap:anywhere}.cdc-related-items{display:grid;gap:9px;margin-top:10px}
.cdc-related-items .cdc-document{display:flex;flex-direction:row;align-items:center;gap:10px;flex-wrap:wrap}
.cdc-unlinked{margin:1rem 0;min-width:0}.cdc-unlinked-list{display:grid;gap:10px;margin-top:12px}
.cdc-unlinked-list article{display:flex;gap:8px 18px;align-items:center;justify-content:space-between;flex-wrap:wrap;min-width:0;padding:12px;border:1px solid var(--line);border-radius:8px}
.cdc-filters .related-document-filters{display:grid;grid-template-columns:minmax(0,2fr) repeat(4,minmax(0,1fr)) auto;gap:10px;align-items:end;margin:1rem 0}
.cdc-filters .related-document-filters label{display:grid;gap:5px;min-width:0;color:var(--muted);font-size:.8rem}
.cdc-filters .related-document-filters input,.cdc-filters .related-document-filters select{width:100%;max-width:100%;min-width:0;min-height:40px;padding:9px;border:1px solid var(--line);border-radius:7px;background:var(--soft);color:var(--ink);font:inherit}
.cdc-filters .related-document-filters button{min-height:40px}
@media(max-width:1000px){.cdc-flow{gap:20px}.cdc-stage.cdc-connected::after{right:-17px}}
@media(max-width:1000px){.cdc-filters .related-document-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.cdc-flow{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}.cdc-stage.cdc-connected::after{display:none}.cdc-cycle-header,.cdc-cycle-summary,.cdc-related{padding-left:13px;padding-right:13px}.cdc-flow{padding-left:13px;padding-right:13px}.cdc-filters .related-document-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.cdc-flow{grid-template-columns:minmax(0,1fr);gap:13px}.cdc-stage-label{margin-bottom:5px}.customer-document-views button{flex:1;min-height:44px}.cdc-document-link{min-height:32px}.cdc-cycle-summary{gap:8px 14px}.cdc-related-items .cdc-document{align-items:flex-start;flex-direction:column}.cdc-filters .related-document-filters{grid-template-columns:minmax(0,1fr)}.cdc-filters .related-document-filters input,.cdc-filters .related-document-filters select{min-height:44px;font-size:16px}}
