/* Final scoped fixes for the ten reported UI/data-loading issues. */
.hero-search .tool-search-row{display:grid!important;grid-template-columns:minmax(0,1fr) 72px!important;gap:8px!important;align-items:stretch!important;width:100%!important}
.hero-search #toolSearch{min-width:0!important;width:100%!important;margin:0!important}
.hero-search #toolSearchButton{width:72px!important;min-width:72px!important;margin:0!important;padding:7px!important;line-height:1.2!important;white-space:normal!important;color:#07506b!important;background:#fff!important;border:1px solid #0b88b4!important}
#create>.tabs button,.creation-mode-tabs button{pointer-events:auto!important;position:relative!important;z-index:3!important}
.create-extra-field{margin-top:8px!important}.create-extra-field textarea{min-height:72px!important;padding:9px 11px!important}
.smart-description-option{display:flex!important;align-items:center;flex-wrap:wrap;gap:7px 10px;margin:6px 0 11px;font-size:13px;color:var(--text)!important}
.smart-description-option label{display:inline-flex!important;align-items:center;gap:6px;margin:0!important;color:var(--text)!important;font-weight:800!important}
.smart-description-option small{color:var(--muted)!important;font-weight:600}.smart-description-option input{accent-color:var(--primary)!important}

/* The sidebar is always dark. Never inherit the light-panel button foreground. */
#app>aside nav button,#app>aside nav button .nav-menu-label,#app>aside nav button .nav-label{color:#f2fbff!important;opacity:1!important;filter:none!important;text-shadow:0 1px 1px rgba(0,30,46,.42)!important}
#app>aside nav button.active,#app>aside nav button.active .nav-menu-label,#app>aside nav button.active .nav-label{color:#fff!important}

/* Inputs and light controls use theme variables instead of a global fixed colour. */
input,select,textarea{color:var(--control-text,var(--text))!important}
input::placeholder,textarea::placeholder{color:color-mix(in srgb,var(--control-text,var(--text)) 68%,transparent)!important;opacity:1!important}
.panel button:not(.primary):not(.active):not(.danger),.cloud-box button:not(.primary):not(.active):not(.danger),.settings-panel button:not(.primary):not(.active):not(.danger),.account-format-box button:not(.primary):not(.active):not(.danger),.service-catalog button:not(.primary):not(.active):not(.danger){color:var(--control-text,var(--text))!important}
button.primary:not(:disabled),button.active:not(:disabled),.tabs button.active:not(:disabled),.tool-v2-run:not(:disabled){color:var(--on-primary,#fff)!important}
button.danger:not(:disabled){color:#a63832!important}
button:disabled{color:#334f59!important;background:#d4e1e5!important;border-color:#95adb5!important;opacity:1!important;text-shadow:none!important}
#tools .tool-v2-command-row .tool-v2-run:disabled,#tools .tool-v2-command-row .tool-v2-download:disabled{color:#334f59!important;background:#d4e1e5!important;border:1px solid #95adb5!important;opacity:1!important;filter:none!important}
body[data-appearance="star"] button:disabled,body[data-appearance="tech"] button:disabled{color:#d7e6ec!important;background:#40525d!important;border-color:#718791!important}
body[data-appearance="star"] #tools .tool-v2-command-row button:disabled,body[data-appearance="tech"] #tools .tool-v2-command-row button:disabled{color:#d7e6ec!important;background:#40525d!important;border-color:#718791!important}

/* Move the resize/tool command row upward without changing the hit area. */
#tools .tool-v2-command-row{transform:translateY(-10px)!important;margin-bottom:0!important}

/* Dynamic admin/data panels must expand to their rendered content. */
#admin .admin-grid,#openaiKeyPanel,#accountFormatBox,#savedAccountFormats,#shareGroupsPanel,#shareGroupsList{height:auto!important;max-height:none!important;overflow:visible!important}
#openaiKeyPanel.admin-section-hidden{display:none!important}#openaiKeyPanel:not(.admin-section-hidden){display:block!important;grid-column:1/-1!important}
.saved-account-formats:empty::after{content:'正在读取已保存格式…';display:block;padding:14px;color:var(--muted)}
#serviceCatalog:empty::after{content:'正在读取服务配置…';display:block;padding:32px;text-align:center;color:var(--muted)}

/* Shared-material cards and their action buttons stay above the ocean decorations. */
#materials,#materials .material-grid-v2,#materials .asset-card{position:relative!important;z-index:2!important}#materials .material-grid-v2{min-height:240px!important}
