/* API-backed identity review and advertising-sharing dialogs. */
#modal.cw-dialog::backdrop{background:rgba(12,49,56,.35)}
#modal.cw-dialog .modal-head{display:flex;justify-content:space-between;align-items:center}
#modal.cw-dialog .modal-head h2{font-size:24px;font-weight:700;letter-spacing:-.5px;line-height:1.3}
#modal.cw-dialog .modal-body p{color:#6E7BA4;font-size:14px;line-height:1.65;margin:0 0 20px}
#modal.cw-dialog .notice{margin:20px 0;padding:16px 18px;border-radius:11px;font-size:13px;line-height:1.6}
#modal.cw-dialog .notice b{font-size:13px;margin-bottom:4px}
#modal.cw-dialog .check{font-size:12px;line-height:1.65;align-items:flex-start}
#modal.cw-dialog .check input{margin-top:4px;accent-color:#007E7F;flex-shrink:0}
#modal.cw-dialog .field{display:flex;flex-direction:column;gap:8px;margin:20px 0}
#modal.cw-dialog .field label{font-size:13px;font-weight:500;margin:0;color:#435685}
#modal.cw-dialog .field input,#modal.cw-dialog .field select,#modal.cw-dialog .field textarea{width:100%;height:46px;border:1px solid #DBE5F1;border-radius:10px;padding:11px 13px;font-size:14px;color:#334675;background:#fff}
#modal.cw-dialog .field textarea{height:72px;resize:vertical}
#modal.cw-dialog .keyvalue{font-size:14px;padding:15px 0;color:#7483A7;border-color:#E4ECF4;gap:14px}
#modal.cw-dialog .keyvalue b{font-size:14px;text-align:right;font-weight:500;color:#213968}
#modal.cw-duplicate{width:670px;margin:0;left:calc((100vw - 670px)/2);top:150px;max-height:calc(100dvh - 175px)}
#modal.cw-duplicate table{width:100%;table-layout:fixed;white-space:normal}
#modal.cw-duplicate th{padding:15px 18px;font-size:11px;text-align:left;color:#7180A6;background:#F8FAFD;letter-spacing:.7px}
#modal.cw-duplicate td{padding:18px;font-size:14px;color:#50638E;overflow-wrap:anywhere;border-color:#EAF0F7}
#modal.cw-duplicate th:first-child{width:25%}
#modal.cw-duplicate td b{color:#0E1D4D}
#modal.cw-merge{width:510px;margin:0;left:calc((100vw - 510px)/2);top:130px;max-height:calc(100dvh - 155px)}
.cw-additional-fields{margin:4px 0 20px;color:#435685;font-size:13px}
.cw-additional-fields summary{cursor:pointer;padding:10px 0;font-weight:500}
.cw-field-options{padding-top:2px}
#modal.cw-sharing{position:fixed;inset:0 0 0 auto;width:530px;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid #E0E9F3;border-radius:0}
#modal.cw-sharing .modal-head{min-height:104px;padding:25px 27px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #E3EBF4}
#modal.cw-sharing .modal-head h2{font-size:25px;font-weight:700;letter-spacing:-.7px;line-height:1.3}
#modal.cw-sharing .modal-head p{font-size:12px;color:#7E8CAF;margin-top:7px}
#modal.cw-sharing .modal-body{padding:26px 27px 0;display:flex;flex-direction:column;flex:1;min-height:0}
#modal.cw-sharing form{display:flex;flex-direction:column;min-height:100%;flex:1}
#modal.cw-sharing .notice{padding:16px 18px;border-radius:11px;font-size:13px;line-height:1.6;margin:0 0 20px;flex-shrink:0}
#modal.cw-sharing .notice b{font-size:13px;margin-bottom:4px}
#modal.cw-sharing .notice p{margin:0;font-size:13px;line-height:1.6}
.cw-source-record{background:#F2FBF8;border-color:#DCEEEA;color:#487B79}
.cw-source-record>div{flex:1;min-width:0}.cw-source-record details{margin-top:8px}.cw-source-record summary{cursor:pointer;font-size:12px}
.cw-source-record .field{margin:12px 0 0}.cw-source-record textarea{min-height:65px}.cw-source-record small{font-size:11px}
#modal.cw-sharing .settings-row{padding:22px 0;gap:15px;flex-shrink:0;border-color:#E4ECF4}
#modal.cw-sharing .settings-row h3,#modal.cw-sharing .cw-sharing-fields{font-size:14px;font-weight:600;color:#080D40}
#modal.cw-sharing .settings-row p{font-size:12px;color:#7181A6;line-height:1.65;margin:5px 0 0}
.cw-sharing-switch{appearance:none;width:34px;height:20px;border-radius:12px;background:#C5D9D1;flex:0 0 34px;position:relative;cursor:pointer;border:0}
.cw-sharing-switch:before{content:'';position:absolute;width:14px;height:14px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 1px 3px #0002}
.cw-sharing-switch:checked{background:#007F7E}.cw-sharing-switch:checked:before{left:17px}.cw-sharing-switch:focus-visible{outline:3px solid #65C8B9;outline-offset:3px}
#modal.cw-sharing .cw-sharing-fields{margin:22px 0 10px}
#modal.cw-sharing .keyvalue{font-size:14px;padding:15px 0;color:#7483A7;border-color:#E4ECF4;flex-shrink:0}
#modal.cw-sharing .keyvalue b{font-size:14px;font-weight:500;color:#213968;text-align:right}
#modal.cw-sharing .cw-sharing-warning{margin-top:22px;margin-bottom:24px}
#modal.cw-sharing .form-actions{position:sticky;bottom:0;margin:auto -27px 0;padding:20px 27px;background:#FCFDFE;border-top:1px solid #E2EAF4;flex-shrink:0}
@media(max-width:700px){#modal.cw-duplicate,#modal.cw-merge{left:12px;top:24px;width:calc(100vw - 24px);max-height:calc(100dvh - 48px)}#modal.cw-dialog .modal-head{padding:22px 20px 0}#modal.cw-dialog .modal-head h2{font-size:21px}#modal.cw-dialog .modal-body{padding:20px}#modal.cw-dialog .form-actions{margin-left:-20px;margin-right:-20px;margin-bottom:-20px;padding:18px 20px}#modal.cw-duplicate td,#modal.cw-duplicate th{padding:12px 8px;font-size:12px}#modal.cw-sharing{width:100vw}}

/* Compact final review retains the complete field choices and irreversible confirmation. */
#modal.cw-merge{top:170px;max-height:calc(100dvh - 195px)}
#modal.cw-merge .modal-head{padding:25px 28px 0;border-bottom:0}
#modal.cw-merge .modal-body{padding-top:18px}
#modal.cw-merge .modal-body>form>p{margin-bottom:14px}
#modal.cw-merge .field{margin:14px 0;gap:7px}
#modal.cw-merge .field textarea{height:62px;min-height:62px}
#modal.cw-merge .cw-additional-fields{margin:0 0 14px}
#modal.cw-merge .cw-additional-fields summary{padding:7px 0}
#modal.cw-merge .notice{margin:14px 0;padding:14px 16px}
#modal.cw-merge .keyvalue{padding:12px 0}
#modal.cw-merge .form-actions{margin-top:18px}
#modal.cw-sharing .modal-head{height:104px;min-height:104px}
#modal.cw-sharing .cw-source-record details:not([open]){margin-top:5px}
@media(max-width:700px){#modal.cw-merge{top:24px;max-height:calc(100dvh - 48px)}}
/* Existing permission evidence stays compact; its editor remains discoverable. */
#modal.cw-sharing .cw-source-record{position:relative}
#modal.cw-sharing .cw-source-record details:not([open]){margin:0}
#modal.cw-sharing .cw-source-record details:not([open]) summary{position:absolute;top:17px;right:18px}
#modal.cw-sharing .settings-row{padding:18px 0}
#modal.cw-sharing .keyvalue{padding:13px 0}
@media(min-width:701px){#modal.cw-merge{top:200px;max-height:calc(100dvh - 225px)}}

/* Contact list: omit meaningless selection; compact badges retain accessible names. */
/* The authored shared toolbar has an 11px gap and 22px table separation. */
@media(min-width:601px){.core-contact-toolbar{gap:11px;margin-bottom:22px}}
.core-contact-toolbar .searchbox{flex:0 1 270px;max-width:270px}
.ct-contact-table{width:100%;table-layout:fixed;min-width:860px}
.ct-contact-table .ct-col-contact{width:21%}.ct-contact-table .ct-col-email{width:26%}.ct-contact-table .ct-col-phone{width:19%}.ct-contact-table .ct-col-company{width:14%}.ct-contact-table .ct-col-leads{width:12%}.ct-contact-table .ct-col-owner{width:8%}
.ct-contact-table th,.ct-contact-table td{padding-left:18px;padding-right:18px;overflow-wrap:anywhere;white-space:normal}
.ct-contact-table td{height:71px}.ct-contact-table td .sub{margin-top:5px;font-size:11px}
.ct-contact-table td .pill{display:block;max-width:122px;padding:5px 9px;font-size:12px;font-weight:400;line-height:18px}
.ct-owner-badge{width:32px;height:32px;flex:0 0 32px;font-size:11px}
/* These scoped drawers keep their actions reachable without hiding required safeguards. */
#modal.ct-drawer .modal-head{height:104px;min-height:104px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}
#modal.ct-drawer .modal-head h2{line-height:1.3;letter-spacing:-.7px}
#modal.ct-drawer .modal-head p{font-size:12px;line-height:18px;margin-top:7px}
#modal.ct-drawer .modal-head>button,#modal.cw-duplicate .modal-head>button,#modal.cw-merge .modal-head>button{width:36px;height:38px;min-height:38px;border:1px solid #DBE5F1;border-radius:11px;display:flex;align-items:center;justify-content:center;flex:0 0 36px}
#modal.ct-drawer .modal-body{display:flex;flex-direction:column;min-height:0;padding:26px 27px 0}
#modal.ct-drawer .modal-body>form{display:flex;flex-direction:column;flex:1;min-height:min-content}
#modal.ct-drawer .form-grid{gap:18px 16px}
#modal.ct-drawer .field{margin:0;gap:8px}
#modal.ct-drawer .field label{font-size:13px;line-height:18px}
#modal.ct-drawer .field input,#modal.ct-drawer .field select{height:46px}
#modal.ct-drawer .field textarea{height:98px;min-height:98px}
#modal.ct-drawer .ct-owner-context small{font-size:11px;line-height:16px}
#modal.ct-drawer .ct-owner-context input{background:#F8FBFD;cursor:default}
#modal.ct-drawer .form-actions{position:sticky;bottom:0;flex-shrink:0;margin:auto -27px 0;padding:20px 27px;border-top:1px solid #E2EAF4}
#modal.ct-drawer .form-actions .btn{min-height:40px}
#modal.ct-drawer .ct-duplicate-guidance{margin:18px 0 24px;padding:16px 18px;line-height:1.5;font-size:13px}
#modal.ct-drawer .ct-duplicate-guidance b{font-size:13px;margin-bottom:5px}
.ct-identity-options{font-size:12px;color:#50638E;margin-top:16px}.ct-identity-options summary{cursor:pointer;min-height:24px}.ct-identity-options .check-field{margin:10px 0}.ct-identity-options p{font-size:11px;line-height:17px;margin:7px 0}
#modal.ct-note-form .notice{margin:20px 0 24px;font-size:13px;line-height:1.6;padding:16px 18px}
#modal.ct-company-view .detail-facts{gap:22px}#modal.ct-company-view .fact{font-size:14px;line-height:20px}#modal.ct-company-view .fact label{font-size:11px}
#modal.ct-company-view .divider{margin:22px 0}#modal.ct-company-view h3{font-size:14px;margin:0 0 12px}
#modal.ct-company-view .keyvalue{padding:14px 0;font-size:14px}#modal.ct-company-view .keyvalue:last-of-type{margin-bottom:24px}
#modal.ct-company-view .form-actions{margin-top:auto}
#modal.ct-company-form .ct-company-owner .field{margin:0}
/* Compact review copy and required reason fit above the anchored action footer. */
#modal.cw-duplicate .modal-head{padding:27px 28px 0;border-bottom:0}
#modal.cw-duplicate .modal-body{padding-top:19px}
#modal.cw-duplicate .modal-body p{line-height:1.55;margin-bottom:20px}
#modal.cw-duplicate .notice{margin:18px 0;padding:15px 18px}
#modal.cw-duplicate .check-field{font-size:11px;line-height:17px;margin:12px 0}
#modal.cw-duplicate .form-actions{margin-top:20px}
#modal.cw-merge .modal-head{padding-top:24px}
#modal.cw-merge .modal-body{padding-top:16px}
#modal.cw-merge .field{margin:12px 0;gap:6px}
#modal.cw-merge .notice{margin:12px 0;padding:12px 14px;font-size:12px;line-height:1.5}
#modal.cw-merge .keyvalue{padding:10px 0;font-size:13px}#modal.cw-merge .keyvalue b{font-size:13px}
#modal.cw-merge .check-field{font-size:11px;line-height:16px;margin:12px 0 0;align-items:flex-start}
#modal.cw-merge .check-field input{flex-shrink:0;margin-top:2px}
#modal.cw-merge .form-actions{margin-top:16px;padding-top:18px;padding-bottom:18px}
@media(max-width:700px){#modal.ct-drawer .modal-head{height:auto;min-height:104px;gap:12px}#modal.ct-drawer .modal-head h2{font-size:23px}.core-contact-toolbar .searchbox{max-width:none;flex:1 1 100%}#modal.cw-duplicate .modal-head{padding:22px 20px 0}}
