/* Badge actions and settings have their own hierarchy; no nested title banners. */
#content .crm-badge-start{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 18px;box-sizing:border-box;min-height:86px;padding:14px 18px;margin:18px 0 12px;border:1px solid #e4deea;border-left:4px solid var(--crm-accent,#eb008b);border-radius:14px;background:linear-gradient(105deg,#fff2f9,#f7f8fc);color:#19283f;box-shadow:none}
#content .crm-badge-start>div:first-child{display:flex;align-items:center;gap:13px;min-width:0;flex:1 1 260px}
#content .crm-badge-start-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#fff0f7;color:var(--crm-accent,#eb008b);flex:none}
#content .crm-badge-start-icon .icon{width:23px;height:23px}
#content .crm-badge-start h2{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:#19283f;font-size:18px!important;line-height:1.25}
#content .crm-badge-start p{margin:0;color:#65738a;font-size:14px;line-height:1.45}
#content .crm-badge-start-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
html body.crm-clarity main #content .crm-badge-start-actions>button{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-height:40px!important;margin:0;padding:9px 13px!important;border:1px solid #dce1ec!important;border-radius:10px!important;background:#fff!important;color:#40546e!important;box-shadow:none!important;font:400 14px/1.3 Arial,sans-serif!important;white-space:nowrap}
html body.crm-clarity main #content .crm-badge-start-actions>[data-badge-single]{background:var(--crm-accent,#eb008b)!important;border-color:var(--crm-accent,#eb008b)!important;color:#fff!important}
#content .crm-badge-start-actions button .icon{width:18px;height:18px;flex:none}
html body.crm-clarity main #content .crm-badge-start-actions>.quiet:hover{border-color:var(--crm-accent,#eb008b)!important;background:#fff7fb!important;color:var(--crm-accent,#eb008b)!important}
#content .crm-badge-start-actions button:focus-visible,#content .crm-badge-settings-summary:focus-visible{outline:3px solid #cbb5e4;outline-offset:3px}
.crm-badge-picker{width:min(620px,calc(100vw - 28px));max-height:min(680px,calc(100vh - 36px));padding:22px;border:1px solid #e2e7ef;border-radius:18px;box-shadow:0 22px 65px rgba(10,20,42,.25)}
.crm-badge-picker::backdrop{background:rgba(8,16,33,.55)}
.crm-badge-picker-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.crm-badge-picker-head h2{margin:0;color:#111b2f}.crm-badge-picker-head p{margin:5px 0 15px;color:#647187}
.crm-badge-picker-search{display:grid;gap:6px;font-weight:650}.crm-badge-picker-search input{width:100%;font-size:16px}
.crm-badge-picker-results{display:grid;gap:5px;max-height:380px;overflow:auto;padding:4px 2px}
.crm-badge-person{display:flex;align-items:center;justify-content:space-between;width:100%;padding:11px 13px;border:1px solid #e5eaf2;border-radius:10px;background:#fff;color:#142039;text-align:left}
.crm-badge-person:hover,.crm-badge-person:focus-visible{border-color:var(--crm-accent,#eb008b);background:#fff5fa}
.crm-badge-person span:first-child{display:grid;gap:3px}.crm-badge-person small{color:#66758a}
@media(max-width:760px){#content .crm-badge-start{align-items:flex-start}#content .crm-badge-start>div:first-child{flex-basis:100%}}
@media(max-width:520px){.crm-badge-start{padding:16px}.crm-badge-start-actions button{flex:1 1 auto}.crm-badge-start-actions [data-badge-single]{width:100%;justify-content:center}}
.crm-badge-layout{margin:24px 0;overflow:hidden;padding:0!important;box-shadow:0 8px 26px rgba(14,27,51,.07)}
.crm-badge-band{padding:17px 23px;background:linear-gradient(105deg,var(--crm-accent,#eb008b),var(--crm-accent,#eb008b));color:#fff}
.crm-badge-band h2{margin:0;color:#fff;font-size:21px}
.crm-badge-band p{margin:3px 0 0;color:#fff4fa;font-size:13px}
.crm-badge-layout-body{padding:20px 23px 24px}
.crm-badge-subtitle{margin:18px 0 10px!important;padding:9px 13px;border-left:4px solid var(--crm-accent,#eb008b);background:#fff1f8;color:#152039;font-size:16px}
.crm-badge-layout-body>.crm-badge-subtitle:first-child{margin-top:0!important}
.crm-badge-common{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 13px;border:1px solid #e7ebf2;border-radius:10px}
.crm-badge-common>div:first-child{display:flex;align-items:center;gap:13px;min-width:0}
.crm-badge-common p{margin:0;color:#66758a}
.crm-badge-common>div:last-child,.crm-badge-category-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.crm-badge-categories{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.crm-badge-category{overflow:hidden;border:1px solid #e5eaf2;border-radius:11px;box-shadow:0 3px 12px rgba(17,26,44,.04)}
.crm-badge-category-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#f9e5ef;color:var(--crm-accent,#eb008b)}
.crm-badge-category-title strong{font-size:14px}.crm-badge-category-title small{font-size:12px;color:#9d315f}
.crm-badge-category-body{display:flex;align-items:center;gap:12px;padding:12px}
.crm-badge-category-body>div{display:grid;gap:8px;min-width:0}.crm-badge-category-body small{color:#66758a}
.crm-badge-category-actions .button,.crm-badge-category-actions button{margin:0}
.crm-badge-preview{width:48px;height:68px;object-fit:cover;border:1px solid #dce2ed;border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,.1)}
.crm-badge-empty{display:grid;place-items:center;width:48px;height:68px;border:1px dashed #d7dce7;border-radius:6px;color:#7b8798;font-size:9px;text-align:center}
.crm-badge-logos{margin-top:19px;border:1px solid #e5eaf2;border-radius:10px;padding:0 13px 12px}
.crm-badge-logos summary{cursor:pointer;margin:0 -13px;padding:12px 13px;background:#f5f7fb;font-weight:700;color:#101b2f}
.crm-badge-logo-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(160px,1fr) minmax(160px,1fr) auto;align-items:end;gap:12px;padding:12px 0;border-bottom:1px solid #edf0f5}
.crm-badge-logo-row>div{display:grid;gap:4px}.crm-badge-logo-row small{color:#69778a}
.crm-badge-logo-row label{display:grid;gap:5px;font-size:13px;font-weight:600}
.crm-badge-logo-row select{width:100%;min-width:0}
@media(max-width:800px){.crm-badge-common{align-items:flex-start;flex-direction:column}.crm-badge-logo-row{grid-template-columns:1fr 1fr}.crm-badge-logo-row>div{grid-column:1/-1}}
@media(max-width:520px){.crm-badge-layout-body{padding:16px}.crm-badge-categories{grid-template-columns:1fr}.crm-badge-logo-row{grid-template-columns:1fr}.crm-badge-logo-row>div{grid-column:auto}}
.crm-badge-design{padding:18px;border:1px solid #e7d9eb;border-top:3px solid var(--crm-accent,#eb008b);border-radius:14px;margin-bottom:20px;background:#fff}
.crm-badge-design h3{margin:0 0 14px;font-size:18px;color:#23324c}
.crm-badge-mode{display:grid;grid-template-columns:1fr 1fr;gap:12px}.crm-badge-mode>label{display:flex;align-items:center;gap:12px;padding:15px;border:1px solid #ddd8e8;border-radius:12px;cursor:pointer}.crm-badge-mode>label:has(:checked){background:#fff1f8;border-color:var(--crm-accent,#eb008b)}.crm-badge-mode input{width:20px;height:20px;flex:none;accent-color:var(--crm-accent,#eb008b)}.crm-badge-mode span{display:grid;gap:4px}.crm-badge-mode small{color:#64728b;font-size:13px}
.crm-badge-design-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.crm-badge-design-actions button{font-size:14px;min-height:40px;display:inline-flex;gap:8px;align-items:center}
.crm-badge-colors,.crm-badge-imported{margin:16px 0;border:1px solid #e5deed;border-radius:10px;padding:12px}.crm-badge-design summary,.crm-badge-imported summary{cursor:pointer;font-weight:600;color:#283750}
.crm-badge-color-head,.crm-badge-color-row{display:grid;grid-template-columns:minmax(120px,1fr) 90px 140px auto;align-items:center;gap:12px;padding:10px 6px;border-bottom:1px solid #eee8f0}.crm-badge-color-head{font-size:12px;color:#68748c}.crm-badge-color-row strong{font-size:14px}.crm-badge-color-row input[type=color]{padding:3px;width:58px;height:34px;cursor:pointer;border:1px solid #ded5e5;border-radius:7px}.crm-badge-color-row button{font-size:13px;min-height:35px}.crm-badge-design [role=status]{font-size:13px;color:#7b275b;margin:8px 0 0}.crm-badge-design .small{font-size:13px;margin:10px 0 0;color:#64728b}
@media(max-width:700px){.crm-badge-mode{grid-template-columns:1fr}.crm-badge-color-head,.crm-badge-color-row{grid-template-columns:1fr 65px 65px}.crm-badge-color-head span:last-child{display:none}.crm-badge-color-row button{grid-column:1/-1;justify-self:start}}

/* Keep configuration accessible without a second hero or a wall of settings. */
#content details.crm-badge-layout{margin:0 0 22px;padding:0!important;border:1px solid #e4deea;border-radius:14px;background:#fff;box-shadow:none;overflow:hidden}
#content .crm-badge-settings-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 22px;cursor:pointer;list-style:none;color:#293a52}
#content .crm-badge-settings-summary::-webkit-details-marker{display:none}
#content .crm-badge-settings-summary>span{display:grid;gap:3px}
#content .crm-badge-settings-summary strong{font-size:16px;line-height:1.35;font-weight:700}
#content .crm-badge-settings-summary small{font-size:13px;color:#718096}
#content .crm-badge-settings-summary>svg{width:20px;height:20px;flex:none;color:#78559b;transition:transform .15s}
#content .crm-badge-layout[open]>.crm-badge-settings-summary{border-bottom:1px solid #ebe5ef}
#content .crm-badge-layout[open]>.crm-badge-settings-summary>svg{transform:rotate(180deg)}
#content .crm-badge-layout-body{padding:20px 22px 22px}
#content .crm-badge-design{padding:0 0 18px;margin:0 0 18px;border:0;border-bottom:1px solid #ebe5ef;border-radius:0;box-shadow:none}
#content .crm-badge-design>h3{font-size:17px;margin-bottom:13px}
#content:has(.crm-badge-start) .sd-board{margin-bottom:16px}
#content:has(.crm-badge-start) .sd-board .sd-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:center;column-gap:12px!important;min-height:86px!important;padding:13px 16px!important;border-top-width:2px!important;border-radius:12px!important;background:#fff!important}
#content:has(.crm-badge-start) .sd-card-top{grid-area:1/1;gap:8px!important;font-size:13px;min-height:20px}
#content:has(.crm-badge-start) .sd-card-top>.sd-arrow{display:none}
#content:has(.crm-badge-start) .sd-icon{flex-basis:20px}
#content:has(.crm-badge-start) .sd-icon svg{width:20px;height:20px}
#content:has(.crm-badge-start) .sd-board .sd-card>strong{grid-area:1/2/3/3;align-self:center;margin:0;font-size:28px!important}
#content:has(.crm-badge-start) .sd-hint{grid-area:2/1;margin:3px 0 0 28px;font-size:11px!important;line-height:1.3}
#content:has(.crm-badge-start) .sd-caption{font-size:11px!important}

@media(max-width:600px){#content .crm-badge-start{padding:16px;gap:16px}#content .crm-badge-start>div:first-child{flex-basis:100%}#content .crm-badge-start-actions{display:grid;grid-template-columns:1fr 1fr}#content .crm-badge-start-actions>[data-badge-single]{grid-column:1/-1;width:100%}#content .crm-badge-start-actions>button{white-space:normal!important;min-width:0}#content .crm-badge-settings-summary{padding:15px 16px}#content .crm-badge-layout-body{padding:16px}#content:has(.crm-badge-start) .sd-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#content:has(.crm-badge-start) .sd-board .sd-card{min-height:82px!important;padding:11px!important;column-gap:7px!important}#content:has(.crm-badge-start) .sd-card-top{font-size:12px}#content:has(.crm-badge-start) .sd-board .sd-card>strong{font-size:23px!important}#content:has(.crm-badge-start) .sd-hint{margin-left:0}}

/* Compact matching bands for badge creation and portal availability. */
#content .crm-badge-release>form.crm-badge-release-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px 18px;width:100%;min-width:0;margin:0;padding:0;border:0;background:none;box-shadow:none;flex:1 1 100%}
#content .crm-badge-release-heading{display:flex;align-items:center;gap:13px;flex:1 1 360px;min-width:0}
#content .crm-badge-release-date{display:flex;flex-direction:column;gap:3px;flex:0 1 240px;min-width:210px;max-width:100%;margin:0;color:#65738a;font-size:11px;line-height:1.2}
html body.crm-clarity main #content .crm-badge-release-date>input{box-sizing:border-box;width:100%;min-width:0;min-height:40px;height:40px;margin:0;padding:8px 10px;border:1px solid #dce1ec;border-radius:10px;background:#fff;color:#40546e;font-size:14px;line-height:1.3}
html body.crm-clarity main #content .crm-badge-release-bar>button{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:40px;height:40px;margin:0;padding:9px 13px;border:1px solid var(--crm-accent,#eb008b);border-radius:10px;background:var(--crm-accent,#eb008b);color:#fff;box-shadow:none;font-size:14px;font-weight:600;line-height:1.3;white-space:nowrap}
#content .crm-badge-release-bar>button>.icon{width:18px;height:18px;flex:none}
#content .crm-badge-release-bar>button:focus-visible{outline:3px solid #f7a9d6;outline-offset:3px}
#content .crm-badge-release-error{flex-basis:100%;margin:0;color:#b42348;font-size:13px}
#content .crm-badge-release-error:empty{display:none}
@media(max-width:760px){#content .crm-badge-start-actions{width:100%}html body.crm-clarity main #content .crm-badge-start-actions>button{min-height:44px!important}#content .crm-badge-release-heading{flex-basis:100%}#content .crm-badge-release-date{flex:1 1 210px}html body.crm-clarity main #content .crm-badge-release-date>input,html body.crm-clarity main #content .crm-badge-release-bar>button{min-height:44px;height:44px}html body.crm-clarity main #content .crm-badge-release-date>input{font-size:16px}}
@media(max-width:420px){#content .crm-badge-release-date{flex-basis:100%;min-width:0}html body.crm-clarity main #content .crm-badge-release-bar>button{width:100%}#content .crm-badge-start h2{font-size:17px!important}}

/* Availability is a secondary setting; keep its actions in the same regular type. */
#content .crm-badge-release{min-height:70px;padding-top:10px;padding-bottom:10px}
#content .crm-badge-release .crm-badge-release-heading h2{font-size:15px!important;font-weight:500!important;line-height:1.3;color:#40546e}
#content .crm-badge-release .crm-badge-start-icon{width:32px;height:32px;border-radius:9px}
#content .crm-badge-release .crm-badge-start-icon .icon{width:20px;height:20px}
html body.crm-clarity main #content .crm-badge-start .crm-badge-start-actions>button,html body.crm-clarity main #content .crm-badge-release .crm-badge-release-bar>button{font-size:14px!important;font-weight:400!important}

/* Personal badge previews are separate from the editable registration form. */
.crm-badge-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:nowrap}
html body.crm-clarity main #content .table-wrap .crm-badge-row-actions>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;height:36px;margin:0;padding:7px 10px;border:1px solid #dce1ec;border-radius:9px;background:#fff;color:#40546e;font-size:13px!important;font-weight:400!important;line-height:1.3;white-space:nowrap;box-shadow:none}
html body.crm-clarity main #content .table-wrap .crm-badge-row-actions>.crm-badge-edit{width:36px;min-width:36px;padding:7px}
.crm-badge-row-actions .icon{width:18px;height:18px;flex:none}
.crm-badge-row-actions>button:focus-visible{outline:2px solid var(--crm-accent,#eb008b);outline-offset:3px}
html body dialog.crm-badge-person-preview{box-sizing:border-box;width:min(900px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:92vh;max-height:92dvh;padding:16px;border:1px solid #dce1ec;border-radius:16px;background:#fff;color:#19283f;box-shadow:0 20px 65px #14233e40;overflow:auto}
.crm-badge-person-preview::backdrop{background:#101b3399}
.crm-badge-person-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
html body .crm-badge-person-head h2{min-width:0;margin:0;padding:0;border:0;background:none;box-shadow:none;font-size:18px!important;line-height:1.3;color:#19283f}
.crm-badge-person-tools{display:flex;align-items:center;gap:8px;flex:none}
html body.crm-clarity dialog.crm-badge-person-preview .crm-badge-person-tools>button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;margin:0;padding:9px 12px;border:1px solid var(--crm-accent,#eb008b);border-radius:9px;background:var(--crm-accent,#eb008b);color:#fff;box-shadow:none;font-size:13px!important;font-weight:400!important;line-height:1.3;white-space:nowrap}
html body.crm-clarity dialog.crm-badge-person-preview .crm-badge-person-tools>[data-badge-preview-close]{width:40px;padding:0;border-color:#dce1ec;background:#fff;color:#40546e;font-size:23px!important}
.crm-badge-person-tools .icon{width:18px;height:18px}
.crm-badge-person-tools>button:focus-visible{outline:3px solid #f7a9d6;outline-offset:3px}
.crm-badge-person-status{margin:10px 0;color:#65738a;font-size:14px}
.crm-badge-person-status[role=alert]{color:#a82343}
.crm-badge-person-pages{display:grid;justify-items:center;gap:14px;min-width:0;background:#eef2f7;border-radius:10px}
.crm-badge-person-pages:not(:empty){padding:12px}
.crm-badge-person-pages canvas{display:block;width:auto;max-width:100%;height:auto;max-height:calc(92vh - 120px);max-height:calc(92dvh - 120px);box-shadow:0 2px 8px #14233e20;background:#fff}
@media(max-width:760px){html body.crm-clarity main #content .table-wrap .crm-badge-row-actions>button{min-height:44px;height:44px}html body.crm-clarity main #content .table-wrap .crm-badge-row-actions>.crm-badge-edit{width:44px;min-width:44px}html body dialog.crm-badge-person-preview{width:calc(100vw - 20px);max-width:calc(100vw - 20px);padding:12px}.crm-badge-person-head{align-items:flex-start;flex-wrap:wrap;gap:10px}.crm-badge-person-tools{margin-left:auto}html body.crm-clarity dialog.crm-badge-person-preview .crm-badge-person-tools>button{min-height:44px}html body.crm-clarity dialog.crm-badge-person-preview .crm-badge-person-tools>[data-badge-preview-close]{width:44px}.crm-badge-person-pages:not(:empty){padding:8px}.crm-badge-person-pages canvas{max-height:calc(92dvh - 165px)}}
