.custom-select { position: relative; display: inline-flex; width: 100%; min-width: 0; max-width: 100%; vertical-align: middle; }
.custom-select[hidden] { display: none !important; }
.custom-select > select[data-custom-select-native] { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; max-height: 1px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0 !important; clip-path: inset(50%) !important; pointer-events: none !important; }
.custom-select .custom-select__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box;
  padding: 8px 12px; border: 1px solid var(--border, #d1d5db); border-radius: 8px;
  background: var(--card, #fff); color: var(--foreground, #111827);
  font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer;
}
.custom-select__value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: inherit; }
.custom-select__chevron { flex-shrink: 0; width: 16px; height: 16px; color: var(--muted-foreground, #64748b); }
.custom-select__trigger[aria-expanded="true"] .custom-select__chevron { transform: rotate(180deg); }
.custom-select .custom-select__trigger:focus-visible, .custom-select .custom-select__trigger[aria-expanded="true"] { outline: 2px solid var(--primary, #4285f4); outline-offset: 2px; }
.custom-select .custom-select__trigger[aria-invalid="true"] { border-color: var(--danger, #b42318); }
.custom-select .custom-select__trigger:disabled { background: var(--muted, #f3f4f6); color: var(--muted-foreground, #64748b); cursor: not-allowed; opacity: .65; }
.custom-select-panel[hidden] { display: none !important; }
.custom-select-panel {
  position: fixed; inset: auto; z-index: 2147483000; display: flex; flex-direction: column;
  box-sizing: border-box; margin: 0; padding: 6px; min-width: 0; max-width: calc(100vw - 16px);
  border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  background: var(--card, #fff); color: var(--foreground, #111827);
  box-shadow: 0 12px 36px #0f172a26; overflow: hidden;
  font-family: var(--font-sans, system-ui, sans-serif); font-size: 14px;
}
.custom-select-panel .custom-select__search {
  width: 100%; min-width: 0; flex-shrink: 0; box-sizing: border-box; margin: 0 0 6px;
  height: 40px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border, #d1d5db);
  border-radius: 6px; background: var(--background, #f9fafb); color: var(--foreground, #111827); font: inherit;
}
.custom-select__search:focus-visible { outline: 2px solid var(--primary, #4285f4); outline-offset: -2px; }
.custom-select__list { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.custom-select__option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 8px 10px; border-radius: 6px; cursor: pointer; line-height: 1.4; overflow-wrap: anywhere; }
.custom-select__option > span { font: inherit; }
.custom-select__option.is-highlighted { background: var(--muted, #f3f4f6); }
.custom-select__option[aria-selected="true"] { color: var(--primary, #4285f4); font-weight: 600; }
.custom-select__option[aria-disabled="true"] { color: var(--muted-foreground, #64748b); cursor: not-allowed; opacity: .55; }
.custom-select__option > svg { width: 16px; height: 16px; flex-shrink: 0; }
.custom-select__group { padding: 10px 10px 4px; color: var(--muted-foreground, #64748b); font-size: 11px; font-weight: 600; }
.custom-select__empty { padding: 18px 10px; text-align: center; color: var(--muted-foreground, #64748b); }
@media (max-width: 640px) { .custom-select-panel .custom-select__search { font-size: 16px; } }
@media print { .custom-select-panel { display: none !important; } }
