.crm-agency-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}.crm-agency-metrics .panel{padding:16px;margin:0;display:flex;flex-direction:column;gap:7px}.crm-agency-metrics span{font-size:12px;color:#66758b}.crm-agency-metrics strong{font-size:23px;letter-spacing:-.6px;color:#17202e}.crm-agency-metrics small{font-size:11px;color:#66758b}.crm-agency-obligations h2{display:flex;align-items:center;gap:8px}.crm-agency-alerts{display:grid;gap:8px}.crm-agency-alert{display:grid;grid-template-columns:48px minmax(140px,1fr) minmax(140px,auto) auto;align-items:center;gap:14px;padding:12px;border-radius:9px;background:#f5f8fc}.crm-agency-alert small{display:block;margin-top:4px;color:#66758b;font-size:12px}.crm-agency-alert-indicator{font-weight:700;font-size:12px;border-radius:7px;text-align:center;padding:8px 2px;color:#336cb2;background:#e4efff}.crm-agency-alert.j30{background:#fff9ef}.crm-agency-alert.j30 .crm-agency-alert-indicator{color:#a76500;background:#fff0d3}.crm-agency-alert.j7,.crm-agency-alert.overdue{background:#fff0f5}.crm-agency-alert.j7 .crm-agency-alert-indicator,.crm-agency-alert.overdue .crm-agency-alert-indicator{color:var(--crm-accent,#eb008b);background:#ffdce9}.crm-agency-alert .text-button{padding:0;text-align:left}.crm-agency-list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.crm-agency-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.crm-agency-card{padding:20px;margin:0;display:flex;flex-direction:column;gap:12px;min-width:0}.crm-agency-card-head{display:flex;gap:12px;align-items:center}.crm-agency-card-head h3{font-size:17px;margin:0}.crm-agency-card-head p{margin:4px 0 0}.crm-agency-card-icon{flex:0 0 36px;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:var(--crm-accent,#eb008b);background:#fff0f8}.crm-agency-tags{display:flex;gap:5px;flex-wrap:wrap}.crm-agency-tags .pill{font-size:10px}.crm-agency-contact>small{display:block;margin-top:4px;color:#66758b}.crm-agency-coordinates{display:grid;gap:6px;margin-top:9px}.crm-agency-coordinates a{display:flex;gap:7px;align-items:center;color:#40536e;font-size:13px;text-decoration:none;overflow-wrap:anywhere}.crm-agency-coordinates .icon{width:15px;height:15px;flex-shrink:0;color:var(--crm-accent,#eb008b)}.crm-agency-card-facts{display:grid;gap:7px;margin:0;font-size:12px}.crm-agency-card-facts>div{display:flex;justify-content:space-between;gap:10px}.crm-agency-card-facts dt{color:#66758b}.crm-agency-card-facts dd{margin:0;text-align:right}.crm-agency-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:8px;border-top:1px solid #e6e9ef}.crm-agency-card footer button{font-size:12px}.crm-agency-archive{color:#66758b}.crm-agency-empty{grid-column:1/-1;text-align:center;padding:30px}.crm-agency-categories{padding:14px;border:1px solid #e6e9ef;border-radius:9px;min-width:0}.crm-agency-categories legend{font-weight:700;padding:0 5px}.crm-agency-categories>div{display:flex;gap:10px 16px;flex-wrap:wrap}.crm-agency-categories label,.crm-agency-check{display:flex!important;align-items:center;gap:8px!important;font-size:13px}.crm-agency-categories input,.crm-agency-check input{width:17px;height:17px;margin:0;accent-color:var(--crm-accent,#eb008b)}.crm-agency-contact-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;background:#f7f8fb;border-radius:9px;margin-bottom:12px}.crm-agency-contact-fields .full{grid-column:1/-1}.crm-agency-contact-fields .toolbar h4{margin:0}.crm-agency-documents{padding-top:16px;margin-top:20px;border-top:1px solid #e6e9ef}.crm-agency-document{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #e6e9ef}.crm-agency-document small{display:block;color:#66758b;margin-top:4px}.crm-agency-documents form{margin-top:16px}@media(max-width:1100px){.crm-agency-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.crm-agency-metrics{grid-template-columns:1fr 1fr;gap:8px}.crm-agency-metrics .panel{padding:12px}.crm-agency-metrics strong{font-size:20px}.crm-agency-alert{grid-template-columns:42px 1fr;gap:10px}.crm-agency-alert-date{grid-column:2}.crm-agency-alert>span:last-child{grid-column:2}.crm-agency-cards{grid-template-columns:1fr}.crm-agency-contact-fields{grid-template-columns:1fr}.crm-agency-document{display:block}.crm-agency-document .actions{margin-top:10px}.crm-agency-card-facts>div{display:block}.crm-agency-card-facts dd{text-align:left;margin-top:3px}}


.crm-agency-page{display:grid;gap:24px}
.crm-agency-directory{min-width:0}
.crm-agency-directory-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:3px 2px 16px}
.crm-agency-directory-head h2{font-size:clamp(22px,2.2vw,28px);line-height:1.15;letter-spacing:-.025em;color:#101b2b;margin:4px 0 0}
.crm-agency-eyebrow{color:var(--crm-accent,#eb008b);font-size:10px;font-weight:800;letter-spacing:.13em}
.crm-agency-count{flex:none;padding:7px 11px;border-radius:99px;background:#fff0f7;color:var(--crm-accent,#eb008b);font-size:12px;font-weight:700}
.crm-agency-directory-filter{margin:0 0 16px}
.crm-agency-directory .crm-agency-cards+details{margin-top:16px}
.crm-agency-page>.crm-agency-obligations{margin:0}
.crm-agency-page>.crm-agency-metrics{margin:0}
.crm-agency-address{display:flex;align-items:flex-start;gap:7px;margin-top:9px;color:#40536e;font-size:13px;line-height:1.45;text-decoration:none;overflow-wrap:anywhere}
.crm-agency-address:hover{text-decoration:underline;color:var(--crm-accent,#eb008b)}
.crm-agency-address .icon{width:15px;height:15px;flex:none;margin-top:2px;color:var(--crm-accent,#eb008b)}
#page-actions [data-agency-new],#page-actions .crm-inventory-entry{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:164px;min-width:0;min-height:38px;padding:7px 11px;border:1px solid var(--crm-accent,#eb008b);border-radius:10px;background:var(--crm-accent,#eb008b);color:#fff;text-decoration:none;text-transform:none;font-size:12px;font-weight:700;letter-spacing:0;line-height:1.25;box-shadow:none;transition:background .15s,transform .15s;cursor:pointer}
#page-actions [data-agency-new] .icon,#page-actions .crm-inventory-entry .icon{width:16px;height:16px;color:#fff;flex:none}
#page-actions [data-agency-new]:hover,#page-actions .crm-inventory-entry:hover{background:var(--crm-accent,#eb008b);border-color:var(--crm-accent,#eb008b);transform:translateY(-1px)}
#page-actions [data-agency-new]:focus-visible,#page-actions .crm-inventory-entry:focus-visible{outline:3px solid #ff56ae;outline-offset:3px}
@media(max-width:650px){.crm-agency-directory-head{align-items:flex-start}.crm-agency-count{margin-top:5px}.crm-agency-page{gap:18px}#page-actions [data-agency-new],#page-actions .crm-inventory-entry{width:auto;min-width:142px;min-height:38px;padding:7px 11px}}

/* The agency directory uses the same roomy two-column rhythm as the provider directory. */
.crm-agency-directory .crm-agency-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.crm-agency-directory .crm-agency-card{min-height:278px;padding:24px;gap:14px;border-radius:15px}
.crm-agency-directory .crm-agency-card-head{gap:14px}
.crm-agency-directory .crm-agency-card-icon{flex-basis:44px;width:44px;height:44px;border-radius:12px}
.crm-agency-directory .crm-agency-card-head h3{font-size:20px;line-height:1.25;letter-spacing:-.02em}
.crm-agency-directory .crm-agency-card-head p{font-size:13px}
.crm-agency-directory .crm-agency-tags .pill{font-size:11px;padding:4px 9px}
.crm-agency-directory .crm-agency-contact>b{font-size:15px}
.crm-agency-directory .crm-agency-contact>small{font-size:13px}
.crm-agency-directory .crm-agency-coordinates a,.crm-agency-directory .crm-agency-address{font-size:14px;line-height:1.45}
.crm-agency-directory .crm-agency-card-facts{font-size:13px;gap:9px}
.crm-agency-directory .crm-agency-card footer{padding-top:13px}
.crm-agency-directory .crm-agency-card footer button{font-size:13px}
@media(max-width:1000px){.crm-agency-directory .crm-agency-cards{grid-template-columns:1fr}}
@media(max-width:650px){.crm-agency-directory .crm-agency-cards{gap:13px}.crm-agency-directory .crm-agency-card{min-height:0;padding:18px;gap:12px}.crm-agency-directory .crm-agency-card-head h3{font-size:18px}}

/* Directory banner and card depth match the other CRM modules. */
.crm-agency-directory .crm-agency-directory-head{position:relative;overflow:hidden;align-items:center;padding:21px 25px;margin-bottom:16px;border-radius:17px;background:linear-gradient(112deg,#141b2b 0%,#2b253c 63%,var(--crm-accent,#eb008b) 100%);box-shadow:0 10px 25px rgba(32,24,50,.15);color:#fff}
.crm-agency-directory .crm-agency-directory-head:after{content:"";position:absolute;width:210px;height:210px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:85px;top:-130px;pointer-events:none}
.crm-agency-directory .crm-agency-directory-head h2{font-size:clamp(24px,2.4vw,30px);color:#fff;margin:4px 0 0}
.crm-agency-directory .crm-agency-eyebrow{color:#ffacd4}
.crm-agency-directory .crm-agency-count{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);color:#fff;font-size:12px;position:relative;z-index:1}
.crm-agency-directory .crm-agency-card{border:1px solid #e5e6ee;box-shadow:0 9px 25px rgba(26,33,54,.10),0 2px 5px rgba(26,33,54,.05)}
.crm-agency-directory .crm-agency-card{border-top:5px solid #3283a3;padding-top:20px}
@media(max-width:650px){.crm-agency-directory .crm-agency-directory-head{padding:17px 18px;border-radius:14px}.crm-agency-directory .crm-agency-directory-head h2{font-size:22px}.crm-agency-directory .crm-agency-directory-head:after{right:-75px}.crm-agency-directory .crm-agency-count{font-size:11px}}

.crm-agency-website,.crm-agency-map{display:block;margin-top:7px;color:var(--crm-accent,#eb008b);font-size:13px;font-weight:600;text-decoration:none;overflow-wrap:anywhere}.crm-agency-website:hover,.crm-agency-map:hover{text-decoration:underline}.crm-agency-map{margin-left:22px;margin-top:3px}

.crm-agency-price-pair{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:3px 10px}.crm-agency-price-pair b{font-weight:700;white-space:nowrap}.crm-agency-price-legacy{color:#9a5a13;font-weight:700}.crm-agency-legacy-note{padding:10px 12px;border-radius:8px;background:#fff6e8;color:#83500c;font-size:12px}.crm-agency-metrics .panel strong{font-size:18px}.crm-agency-metrics .panel strong small{font-size:11px;font-weight:700;color:#728097}.crm-agency-alert .crm-agency-price-pair{flex-direction:column;align-items:flex-end}
