/* Scoped, optional company connection panels. Never styles the personal workspace or host dialog. */
.epcd{--epcd-navy:#173c4c;--epcd-green:#087b64;--epcd-line:#dce8e7;color:var(--epcd-navy);font-family:inherit;font-size:14px;line-height:1.65;width:100%;max-width:760px;margin:0 auto;padding:20px;box-sizing:border-box;background:#fff;border:1px solid var(--epcd-line);border-radius:20px;overflow-wrap:anywhere;text-align:left}
.epcd *{box-sizing:border-box}.epcd [hidden]{display:none!important}.epcd h2,.epcd h3,.epcd p{margin:0}.epcd button,.epcd input{font:inherit}.epcd button{min-height:44px;border-radius:11px;padding:10px 15px;cursor:pointer;line-height:1.4;white-space:normal}.epcd button:disabled{opacity:.55;cursor:not-allowed}.epcd button:focus-visible,.epcd input:focus-visible{outline:3px solid #6ebdab;outline-offset:3px}.epcd-header{padding-bottom:18px;border-bottom:1px solid var(--epcd-line);margin-bottom:16px}.epcd-eyebrow{display:block;font-size:10px;letter-spacing:.15em;font-weight:800;color:var(--epcd-green);margin-bottom:7px}.epcd-header h2{font-size:23px;letter-spacing:-.03em;line-height:1.4}.epcd-header p{color:#657b86;font-size:12px;margin-top:8px}.epcd h3{font-size:16px;line-height:1.5}
.epcd-primary{border:1px solid var(--epcd-green);background:var(--epcd-green);color:white;font-weight:700}.epcd-secondary{border:1px solid #cedfde;background:#fff;color:var(--epcd-navy);font-weight:600}.epcd-danger{border:1px solid #e9d8d0;background:#fff8f4;color:#8b5039}.epcd-private{padding:14px 16px;border-radius:13px;background:#edf8f2;border:1px solid #d4ebdd;margin:16px 0}.epcd-private strong{font-size:13px;color:#237355}.epcd-private p{font-size:12px;color:#5c7b6b;margin-top:3px}.epcd-field{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;min-width:0}.epcd-field input{width:100%;min-width:0;border:1px solid #c9dcda;border-radius:10px;background:#fff;padding:12px;min-height:46px;font-size:16px;color:var(--epcd-navy);box-shadow:none}.epcd-field input::placeholder{color:#83969e;font-size:13px;font-weight:400}.epcd-field input:disabled{background:#f3f6f5}.epcd-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-top:20px}.epcd-search .epcd-help{grid-column:1/-1}.epcd-help{font-size:12px!important;line-height:1.7;color:#667e87;font-weight:400;margin:8px 0!important}.epcd-help.warning{color:#916039}.epcd-results{display:grid;gap:10px;margin-top:16px}.epcd-company{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:14px;border:1px solid var(--epcd-line);border-radius:13px;background:#fcfdfd}.epcd-company.selected{border-color:#65a999;background:#f1faf6}.epcd-company-identity strong{font-size:15px;line-height:1.5}.epcd-company-identity p{font-size:12px;color:#6a808a;margin-top:4px}.epcd-company .epcd-help{grid-column:1/-1}.epcd-company button{font-size:12px;padding:10px 12px}.epcd-request{margin-top:20px;border:1px solid #a7cabe;border-radius:16px;padding:18px;background:#f8fcfa;display:flex;flex-direction:column;gap:12px}.epcd-selected{font-weight:800;color:var(--epcd-navy);font-size:15px;border-radius:9px;background:#edf3f5;padding:12px}.epcd-identity{font-size:12px;word-break:break-all;color:#536e7a}.epcd-consent{display:flex!important;align-items:flex-start;gap:10px;font-size:12px;font-weight:500;line-height:1.75;cursor:pointer;min-height:44px;padding:8px 0}.epcd-consent input[type=checkbox]{width:20px!important;height:20px!important;min-width:20px;min-height:20px;flex:0 0 20px;margin:2px 0 0!important;accent-color:var(--epcd-green);cursor:pointer}.epcd-mine{margin-top:25px;border-top:1px solid var(--epcd-line);padding-top:18px}.epcd-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.epcd-section-heading button{font-size:12px;padding:9px 12px}.epcd-empty{padding:20px 12px!important;text-align:center;font-size:12px;color:#7a8e97;background:#f6f9f9;border-radius:10px}.epcd-request-row{padding:15px 0;border-top:1px solid #e7eeed;display:flex;align-items:center;justify-content:space-between;gap:12px}.epcd-request-row>div{min-width:0}.epcd-request-row strong{display:block;font-size:13px}.epcd-request-row small{display:block;font-size:11px;color:#7b8e96;margin-top:5px}.epcd-request-row button{font-size:12px;flex-shrink:0}.epcd-badge{display:inline-block;border-radius:6px;padding:3px 7px;margin-top:7px;background:#edf2f5;color:#5c7888;font-size:10px;font-weight:700}.epcd-badge.pending{background:#fff1d5;color:#876620}.epcd-badge.approved{background:#e2f4e8;color:#2b7851}.epcd-badge.rejected{background:#faede7;color:#9a6044}.epcd-notice{font-size:12px;border:1px solid #d7e6ed;background:#eef6fa;color:#446a80;border-radius:11px;padding:12px 14px;margin:14px 0;white-space:pre-wrap}.epcd-notice.error{color:#965b3e;background:#fff4ee;border-color:#ebd7ca}.epcd-notice.success{color:#247451;background:#edf8f0;border-color:#d0e9da}.epcd-owner-form{display:grid;gap:12px;margin-top:16px}.epcd-owner-queue{margin-top:24px;padding-top:20px;border-top:1px solid var(--epcd-line)}.epcd-applicant{border:1px solid var(--epcd-line);border-radius:13px;padding:15px;margin-top:12px}.epcd-applicant-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.epcd-applicant h4{font-size:14px;margin:0}.epcd-applicant p{font-size:12px;color:#667e87}.epcd-review{margin-top:13px;padding:14px;border-radius:10px;background:#f3f8f6}.epcd-review fieldset{border:0;padding:0;margin:12px 0;min-width:0}.epcd-review legend{font-size:12px;font-weight:700;margin-bottom:6px}.epcd-review fieldset .epcd-consent{padding:4px 0;min-height:38px}.epcd-review-actions{display:flex;flex-wrap:wrap;gap:8px}.epcd-review-actions button{flex:1 1 125px}.epcd-review .epcd-primary{background:var(--epcd-navy);border-color:var(--epcd-navy)}
@media(max-width:520px){.epcd{padding:16px 13px;border-radius:16px}.epcd-header h2{font-size:21px}.epcd-search{grid-template-columns:minmax(0,1fr)}.epcd-search button{width:100%}.epcd-company{grid-template-columns:minmax(0,1fr)}.epcd-company button{width:100%}.epcd-request{padding:15px 12px}.epcd-company .epcd-help{grid-column:auto}.epcd-section-heading{flex-wrap:wrap}.epcd-selected{font-size:14px}.epcd-request-row{align-items:flex-start}.epcd-applicant-top{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.epcd *{scroll-behavior:auto!important}}

/* Company panels can be nested in the personal screen: isolate their header
   and action colors from the host app's global header/button presentation. */
.epcd .epcd-header{display:block;position:static;top:auto;z-index:auto;width:auto;height:auto;min-height:0;padding:0 0 18px;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
.epcd .epcd-header h2{margin:0;font-size:23px;word-break:keep-all;overflow-wrap:break-word}
.epcd .epcd-header p{margin:8px 0 0}
.epw-screen .epcd button.epcd-primary{color:#fff;border:1px solid var(--epcd-green);font-weight:700;line-height:1.4}
.epw-screen .epcd button.epcd-secondary{color:var(--epcd-navy);border:1px solid #cedfde;font-weight:600;line-height:1.4}
.epw-screen .epcd button.epcd-danger{color:#8b5039;border:1px solid #e9d8d0;line-height:1.4}
@media(max-width:520px){.epcd .epcd-header h2{font-size:21px}}
/* List-first discovery: scoped, no global header/button rules. */
.epcd-region-filters{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.epcd-region-filters button{border-radius:24px;min-width:60px;padding:9px 16px}.epcd-region-filters button[aria-pressed="true"]{background:#087f70;color:#fff;border-color:#087f70}.epcd-search{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.epcd-results+[data-action="more"]{width:100%;margin-top:12px}.epcd [data-action="invite"]{width:100%;margin-top:18px;background:#eaf5ef;color:#276d5b}.epcd [data-action="list"]{margin:8px 0 16px}.epcd [data-action="open-company"]{background:#eaf5ef;color:#276d5b}.epcd-company:has([data-action="select"]:disabled){background:#f7faf8}@media(max-width:520px){.epcd-search{grid-template-columns:minmax(0,1fr)}.epcd-company{padding:17px}.epcd-company-identity strong{font-size:20px}.epcd-company button{min-height:44px}}

/* Hierarchical public-region selection: scoped, no global select styling. */
.epcd-region-selects{border:0;padding:0;margin:0;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/-1}
.epcd-region-selects legend{font-weight:700;padding:0;margin-bottom:8px}
.epcd-region-selects select{width:100%;max-width:100%;min-width:0;min-height:44px;font:inherit;color:inherit;background:#fff;border:1px solid #cfdfda;border-radius:12px;padding:10px 8px;box-sizing:border-box}
.epcd-region-selects .epcd-help{grid-column:1/-1;margin:0}
@media(max-width:360px){.epcd-region-selects{grid-template-columns:1fr}}

/* Company search is primary; existing invitation entry remains optional. */
.epcd-invite-alternative,.ewn-invite-alternative{margin:12px 0;border:1px solid #dce5df;border-radius:12px;padding:0 12px;background:#fafbf8}.epcd-invite-alternative>summary,.ewn-invite-alternative>summary{min-height:44px;display:list-item;padding:12px 4px;cursor:pointer;font-size:13px;color:#365747}.epcd-invite-alternative>button,.ewn-invite-alternative>button{min-height:44px;margin-bottom:12px}
