.crm-search{box-sizing:border-box;width:min(880px,calc(100vw - 40px));max-width:none;max-height:86dvh;padding:0;margin:6dvh auto 0;border:1px solid #d9dce6;border-radius:24px;background:#f8f9fc;color:#20232d;box-shadow:0 28px 90px #18214435;overflow:hidden}
.crm-search[open]{display:flex;flex-direction:column}.crm-search::backdrop{background:#181d3a65;backdrop-filter:blur(3px)}
.crm-search *{box-sizing:border-box}.crm-search button,.crm-search input{font:inherit}.crm-search button{cursor:pointer}
.crm-search-top{display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid #dfe2eb;flex:none;margin:0}
.crm-search-icon{font-size:32px;color:#5d667c;line-height:1}.crm-search-top input{width:100%;min-width:0;height:44px;background:transparent;border:0;outline:0;font-size:18px;color:inherit;padding:0;box-shadow:none;border-radius:0}
.crm-search-top input::placeholder{color:#7a8190}.crm-search-close{border:1px solid #d9dde8;background:#fff;border-radius:12px;color:#5e6473;padding:8px 12px;font-size:13px;white-space:nowrap}
.crm-search-filters{display:flex;gap:7px;padding:14px 22px 0;overflow-x:auto;flex:none;scrollbar-width:thin}
.crm-search-filters:empty{display:none}.crm-search-filters button{border:1px solid #dce0eb;color:#535d71;background:#fff;border-radius:20px;white-space:nowrap;padding:7px 12px;font-size:13px;min-height:36px}
.crm-search-filters button.is-active{color:#fff;background:#3c52db;border-color:#3c52db}.crm-search-status{padding:12px 22px 6px;margin:0;font-size:13px;color:#737a8a;flex:none}
.crm-search-results{overflow-y:auto;overscroll-behavior:contain;padding:0 14px 18px;min-height:120px;scrollbar-width:thin}
.crm-search-group{margin:8px 0 18px}.crm-search-group>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 10px}
.crm-search h3{font-size:13px;font-weight:650;color:#60697d;margin:0}.crm-search-group>header button{background:none;color:#3c52db;border:0;padding:4px;font-size:13px}
.crm-search-row{border:1px solid #e0e3ec;background:#fff;border-radius:13px;margin:6px 0;overflow:hidden}
.crm-search-hit{display:block;text-decoration:none!important;color:inherit!important;padding:13px 15px;overflow-wrap:anywhere;outline-offset:-3px}
.crm-search-hit:hover,.crm-search-hit:focus-visible{background:#edf0ff}.crm-search-hit strong{display:block;font-size:15px;font-weight:650;line-height:1.45}
.crm-search-subtitle,.crm-search-snippet{display:block;font-size:13px;line-height:1.5;margin-top:4px;color:#788091}.crm-search-snippet{color:#485266}
.crm-search-related{display:inline-block;margin:0 15px 12px;font-size:12px;color:#3c52db!important;text-decoration:none}.crm-search-related:hover{text-decoration:underline}
.crm-search-empty{font-size:14px;line-height:1.7;margin:24px 10px;color:#70798a;max-width:580px}
.crm-search-sections{padding:12px 10px}.crm-search-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.crm-search-shortcuts a{font-size:13px;color:#525e76;padding:8px 12px;border:1px solid #e0e3eb;border-radius:10px;text-decoration:none;background:#fff}
.crm-search-more{display:block;margin:12px auto;border:1px solid #d5dbef;border-radius:20px;padding:10px 22px;background:#fff;color:#3c52db}
.crm-search-foot{padding:13px 22px;border-top:1px solid #e1e4ed;font-size:11px;line-height:1.5;color:#858c9c;flex:none;background:#f3f5fa}
.crm-search :focus-visible{outline:2px solid #3c52db;outline-offset:2px}.crm-search-message{outline:3px solid #5266ee!important;outline-offset:4px;background:#e9edff!important;border-radius:12px;scroll-margin:60px}
@media(max-width:640px){.crm-search{width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.crm-search-top{padding:12px 14px;gap:8px;padding-top:max(12px,env(safe-area-inset-top))}.crm-search-top input{font-size:16px}.crm-search-close{font-size:12px;padding:9px}.crm-search-icon{font-size:26px}.crm-search-filters{padding:12px 14px 0}.crm-search-status{padding:12px 14px 6px}.crm-search-results{padding:0 8px 20px}.crm-search-foot{padding:10px 14px;padding-bottom:max(10px,env(safe-area-inset-bottom))}.crm-search-hit{padding:13px 12px}}
@media(prefers-reduced-motion:reduce){.crm-search *{scroll-behavior:auto!important}}
/* Keep the title flexible beside the four compact mobile controls. */
@media(max-width:380px){[data-app-header] h1{min-width:0!important}}

/* The invisible label tracks the native input font and personal field size. */
[data-head-search] .crm-search-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:pre;font-size:13.5px;line-height:1.5}
[data-display-on] [data-head-search] .crm-search-measure{font-size:calc(13.5px * var(--display-fields))}
[data-app-header]>[data-head-search]{flex:0 1 var(--crm-search-width,200px)!important;max-width:var(--crm-search-width,200px)}
