/* AURA ERP INTELLIGENCE OS v0.9.19 — Global Sandstone Select Runtime
   Replaces browser-native option popups so every dropdown follows Theme 04
   in both light and dark mode. Native <select> remains the form data source. */
.aura-native-select{
  position:absolute!important;
  width:1px!important;height:1px!important;
  min-width:1px!important;min-height:1px!important;
  margin:0!important;padding:0!important;
  opacity:0!important;pointer-events:none!important;
  clip-path:inset(50%)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
.aura-select{position:relative;display:block;width:100%;min-width:0}
.aura-select-trigger{
  width:100%;min-height:40px;box-sizing:border-box;
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;
  border:1px solid var(--border);border-radius:9px;
  background:var(--surface-solid);color:var(--text);
  padding:9px 11px;font:inherit;text-align:left;cursor:pointer;
  transition:border-color var(--transition),box-shadow var(--transition),background var(--transition),color var(--transition);
}
.aura-select-trigger:hover{border-color:color-mix(in srgb,var(--primary) 34%,var(--border));background:color-mix(in srgb,var(--surface-solid) 96%,var(--primary) 4%)}
.aura-select-trigger:focus-visible,.aura-select.open .aura-select-trigger{outline:none;border-color:var(--primary);box-shadow:var(--focus)}
.aura-select-trigger:disabled{cursor:not-allowed;background:var(--surface-soft);color:var(--text-3);opacity:1}
.aura-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit}
.aura-select.placeholder .aura-select-value{color:var(--text-3)}
.aura-select-chevron{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);color:var(--text-3);transition:transform var(--transition),color var(--transition)}
.aura-select.open .aura-select-chevron{transform:rotate(225deg) translate(-1px,-1px);color:var(--primary)}
.aura-select-menu{
  position:fixed;z-index:12050;display:none;box-sizing:border-box;
  min-width:120px;max-height:min(340px,44vh);overflow:auto;overscroll-behavior:contain;
  padding:6px;border:1px solid var(--border-strong);border-radius:10px;
  background:var(--surface-solid);color:var(--text);box-shadow:var(--shadow);
  scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent;
}
.aura-select-menu.open{display:block}
.aura-select-menu::-webkit-scrollbar{width:7px}.aura-select-menu::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:999px}
.aura-select-option{
  width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;
  border:0;border-radius:7px;background:transparent;color:var(--text-2);
  padding:9px 10px;font:inherit;text-align:left;cursor:pointer;line-height:1.25;
}
.aura-select-option:hover,.aura-select-option.focused{background:var(--surface-hover);color:var(--text)}
.aura-select-option.selected{background:var(--primary-soft);color:var(--text);font-weight:700;box-shadow:inset 3px 0 var(--primary)}
.aura-select-option.selected::after{content:'✓';color:var(--primary);font-weight:900}
.aura-select-option:disabled{cursor:not-allowed;opacity:.45;background:transparent;color:var(--text-3)}
.aura-select-optgroup{padding:9px 10px 5px;color:var(--text-3);font-size:.72em;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
html[data-theme="light"] .aura-select-menu{background:#fffdf9}
html[data-theme="dark"] .aura-select-menu{background:#242522}
/* Fallback if a select is intentionally excluded from enhancement. */
select option{background:var(--surface-solid);color:var(--text)}
select option:checked{background:var(--primary-soft);color:var(--text)}
/* Preserve layout contracts where the original native select was a direct flex/grid child. */
.crm-register-tools>.aura-select{width:auto;min-width:150px;flex:0 0 auto}
.compact-control>.aura-select,.admin-field>.aura-select,.project-form label>.aura-select,.design-field>.aura-select{width:100%}
@media(max-width:700px){.crm-register-tools>.aura-select{width:100%;min-width:0}}

/* v0.9.19 — searchable enterprise dropdowns for long governed lists. */
.aura-select-search-wrap{position:sticky;top:-6px;z-index:2;margin:-6px -6px 5px;padding:7px;background:var(--surface-solid);border-bottom:1px solid var(--border)}
.aura-select-search{width:100%;min-height:38px;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;background:var(--bg-elevated);color:var(--text);padding:8px 10px;font:inherit;font-size:.86rem}
.aura-select-search::placeholder{color:var(--text-3)}
.aura-select-search:focus{outline:none;border-color:var(--primary);box-shadow:var(--focus)}
html[data-theme="light"] .aura-select-search-wrap{background:#fffdf9}
html[data-theme="dark"] .aura-select-search-wrap{background:#242522}
