.enhanced-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.enhanced-select-native + .smart-select { width: 100%; }
.select-wrap > .enhanced-select-native ~ .icon { display: none; }
.filter-control > .enhanced-select-native ~ .icon,
.field-control > .enhanced-select-native ~ .select-chevron { display: none; }
.smart-select { position: relative; min-width: 0; }
.smart-select-trigger {
    display: grid;
    width: 100%;
    min-height: 41px;
    grid-template-columns: 17px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    color: var(--ink);
    background: #fbfcfe;
    text-align: left;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 250ms var(--spring);
}
.smart-select-trigger:hover { border-color: #b9cbe3; background: #fff; }
.smart-select-trigger:focus-visible, .smart-select.is-open .smart-select-trigger { border-color: #78aafa; outline: 0; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.09); }
.smart-select-trigger > .icon:first-child { width: 15px; height: 15px; color: #8d9bb0; }
.smart-select-trigger > .icon:last-child { width: 14px; height: 14px; color: #8290a4; transition: transform 280ms var(--spring); }
.smart-select.is-open .smart-select-trigger > .icon:last-child { transform: rotate(180deg); }
.smart-select-value { overflow: hidden; font-size: 11px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.smart-select-trigger.is-placeholder .smart-select-value { color: var(--muted-2); }
.smart-select-trigger:disabled { cursor: not-allowed; opacity: .62; }
.smart-select-trigger.has-error { border-color: #ef9b96; box-shadow: 0 0 0 4px rgba(228,81,74,.08); }
.filter-control .smart-select { min-width: 165px; }
.filter-control .smart-select-trigger { height: 36px; min-height: 36px; border: 0; background: transparent; }
.compact-select .smart-select { min-width: 155px; }
.compact-select .smart-select-trigger { height: 34px; min-height: 34px; }
.line-table .smart-select { min-width: 110px; }
.line-table .smart-select-trigger { height: 36px; min-height: 36px; padding-block: 5px; }
.smart-select-popover {
    position: fixed;
    z-index: 310;
    max-height: min(390px, calc(100dvh - 22px));
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 14px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 22px 60px rgba(15,38,76,.2), 0 4px 12px rgba(15,23,42,.08);
    animation: smartSelectIn 220ms var(--spring) both;
    backdrop-filter: blur(18px);
}
.smart-select-mobile-head { display: none; }
.smart-select-search { position: relative; display: block; padding: 10px 10px 8px; border-bottom: 1px solid #edf1f6; }
.smart-select-search .icon { position: absolute; left: 22px; top: 50%; width: 15px; height: 15px; color: #91a0b5; transform: translateY(-50%); }
.smart-select-search input { width: 100%; height: 38px; padding: 0 11px 0 35px; border: 1px solid #dce4ee; border-radius: 10px; outline: 0; color: var(--ink); background: #f7f9fc; font-size: 11px; }
.smart-select-search input:focus { border-color: #85b1f9; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.smart-select-options { max-height: 276px; overflow-y: auto; padding: 6px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d4e2 transparent; }
.smart-select-option { display: grid; width: 100%; min-height: 39px; grid-template-columns: minmax(0,1fr) 17px; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; color: var(--text); background: transparent; text-align: left; transition: color 140ms ease, background 140ms ease, transform 180ms var(--spring); }
.smart-select-option > span { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.smart-select-option .icon { width: 14px; height: 14px; color: transparent; }
.smart-select-option:hover, .smart-select-option.is-active { color: var(--blue-700); background: #eff6ff; transform: translateX(2px); }
.smart-select-option.is-selected { color: #174ea6; background: #e7f1ff; font-weight: 750; }
.smart-select-option.is-selected .icon { color: #2563eb; }
.smart-select-option:disabled { cursor: not-allowed; opacity: .45; }
.smart-select-empty { display: grid; justify-items: center; gap: 7px; padding: 28px 16px; color: var(--muted); text-align: center; }
.smart-select-empty .icon { width: 21px; height: 21px; color: var(--blue-500); }
.smart-select-empty span { font-size: 10px; }
.smart-select-backdrop { position: fixed; z-index: 305; inset: 0; background: rgba(4,16,39,.28); opacity: 0; pointer-events: none; }
@keyframes smartSelectIn { from { opacity:0; transform:translateY(-5px) scale(.985); } to { opacity:1; transform:none; } }

@media (max-width:640px) {
    .has-smart-select { overflow:hidden; }
    .smart-select-backdrop { opacity:1; pointer-events:auto; backdrop-filter:blur(2px); animation:smartBackdropIn 180ms ease both; }
    .smart-select-popover { top:auto !important; right:0 !important; bottom:0 !important; left:0 !important; width:100% !important; max-height:min(72dvh,620px); border-width:1px 0 0; border-radius:20px 20px 0 0; animation:smartSheetIn 320ms var(--spring) both; }
    .smart-select-mobile-head { display:flex; min-height:55px; align-items:center; justify-content:space-between; padding:10px 15px; border-bottom:1px solid var(--line-soft); }
    .smart-select-mobile-head strong { color:var(--ink); font-size:13px; }
    .smart-select-mobile-head button { display:grid; width:34px; height:34px; place-items:center; border-radius:10px; color:var(--muted); background:#f1f4f8; font-size:22px; }
    .smart-select-search { padding:10px 13px; }
    .smart-select-search .icon { left:26px; }
    .smart-select-search input { height:43px; border-radius:11px; }
    .smart-select-options { max-height:calc(72dvh - 125px); padding:7px 10px max(12px,env(safe-area-inset-bottom)); }
    .smart-select-option { min-height:46px; padding:9px 11px; }
    .smart-select-option > span { font-size:12px; }
}
@keyframes smartBackdropIn { from { opacity:0; } }
@keyframes smartSheetIn { from { opacity:.5; transform:translateY(100%); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .smart-select-popover,.smart-select-backdrop { animation:none; } }
