/* Shared action controls. Navigation cards and multi-line menu entries keep their layout. */
:root{
  --ui-control-height:40px;
  --ui-control-radius:8px;
  --ui-select-border:var(--c-border,#ccd9eb);
  --ui-select-bg:var(--c-card-2,#fff);
  --ui-select-color:var(--c-text,#34435b);
  --ui-select-focus:#24C1AE;
  --ui-select-disabled-bg:#eef2f6;
  --ui-select-disabled-color:#8a96a8;
  --ui-select-menu-shadow:0 14px 32px rgba(25,45,70,.2);
}
/* Native option sheets and arrows remain browser/OS owned; this only styles the closed control. */
html body select.ui-select{
  box-sizing:border-box!important;height:var(--ui-control-height)!important;min-height:var(--ui-control-height)!important;max-height:var(--ui-control-height)!important;
  padding:0 34px 0 11px!important;border:1px solid var(--ui-select-border)!important;border-radius:var(--ui-control-radius)!important;
  background-color:var(--ui-select-bg)!important;background-image:none!important;
  color:var(--ui-select-color)!important;font:inherit!important;line-height:1.2!important;outline:none!important;cursor:pointer;
}
html body select.ui-select:hover{border-color:color-mix(in srgb,var(--ui-select-focus) 48%,var(--ui-select-border))!important}
html body select.ui-select:focus-visible,html body .ui-select-trigger:focus-visible{border-color:var(--ui-select-focus)!important;box-shadow:0 0 0 3px rgba(36,193,174,.14)!important}
html body select.ui-select:disabled{border-color:var(--ui-select-border)!important;background-color:var(--ui-select-disabled-bg)!important;color:var(--ui-select-disabled-color)!important;cursor:not-allowed;opacity:1}
html body select.ui-select--filter{width:auto}
html body select.ui-select--compact{height:32px!important;min-height:32px!important;max-height:32px!important;padding-right:27px!important;border-radius:6px!important;font-size:11px!important}
html body .input-group>.ui-select{border-radius:0!important}
html body .input-group>:first-child.ui-select{border-radius:var(--ui-control-radius) 0 0 var(--ui-control-radius)!important}
html body .input-group>:last-child.ui-select{border-radius:0 var(--ui-control-radius) var(--ui-control-radius) 0!important}
html body .ui-select-trigger{
  box-sizing:border-box;width:100%;height:var(--ui-control-height);min-height:var(--ui-control-height);padding:0 11px;border:1px solid var(--ui-select-border);border-radius:var(--ui-control-radius);background:var(--ui-select-bg);color:var(--ui-select-color);outline:none;
}
html body .ui-select-menu{z-index:5100;border:1px solid var(--ui-select-border);border-radius:10px;background:var(--ui-select-bg);box-shadow:var(--ui-select-menu-shadow)}
html body .ui-select-option{min-height:40px;padding:10px 12px;border-bottom:1px solid color-mix(in srgb,var(--ui-select-border) 72%,transparent);color:var(--ui-select-color)}
html body .ui-select-option:last-child{border-bottom:0}
html body .ui-select-option:hover,html body .ui-select-option:focus-visible{background:rgba(36,193,174,.1);color:var(--ui-select-focus);outline:0}
html body .ui-filter-choice-trigger{width:auto;min-width:150px;display:inline-flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer}
html body .ui-filter-choice-trigger>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .ui-filter-choice-trigger>b{color:#718098;font-size:13px;font-weight:500}
html body .ui-single-choice-overlay{position:fixed;z-index:7200;inset:0;display:flex;align-items:center;justify-content:center;padding:32px;background:rgba(15,23,42,.48);backdrop-filter:blur(3px)}
html body .ui-single-choice-overlay[hidden]{display:none}
html body .ui-single-choice-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 64px));max-height:calc(100dvh - 64px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #d8e3ee;border-radius:16px;background:#fff;color:#17223b;box-shadow:0 24px 70px rgba(15,23,42,.3)}
html body .ui-single-choice-dialog>header{min-height:62px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #e4ebf3}
html body .ui-single-choice-dialog>header strong{font-size:17px}
html body .ui-single-choice-close{width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#68788d;font-size:24px;line-height:1;cursor:pointer}
html body .ui-single-choice-close:hover,html body .ui-single-choice-close:focus-visible{background:#eef8f6;color:#168f80;outline:0}
html body .ui-single-choice-search{box-sizing:border-box;width:calc(100% - 40px);height:40px;margin:12px 20px 4px;padding:0 11px;border:1px solid var(--ui-select-border);border-radius:var(--ui-control-radius);background:#fff;color:var(--ui-select-color);font:inherit;outline:0}
html body .ui-single-choice-search:focus{border-color:#24C1AE;box-shadow:0 0 0 3px rgba(36,193,174,.14)}
html body .ui-single-choice-options{min-height:0;overflow-y:auto;padding:8px 20px}
html body .ui-single-choice-option{width:100%;min-height:52px;padding:10px 0;display:flex;align-items:center;justify-content:space-between;gap:14px;border:0;border-bottom:1px solid #edf1f5;background:#fff;color:#34435b;font:inherit;font-size:14px;text-align:left;cursor:pointer}
html body .ui-single-choice-option:last-of-type{border-bottom:0}
html body .ui-single-choice-option[hidden]{display:none}
html body .ui-single-choice-option:hover,html body .ui-single-choice-option:focus-visible{color:#168f80;outline:0}
html body .ui-single-choice-option>i{width:20px;height:20px;flex:0 0 20px;border:1.5px solid #b9c8d6;border-radius:50%;background:#fff}
html body .ui-single-choice-option.is-selected{color:#168f80;font-weight:700}
html body .ui-single-choice-option.is-selected>i{border:6px solid #24C1AE}
html body .ui-single-choice-empty{margin:20px 0;color:#718098;font-size:13px;text-align:center}
html body .ui-single-choice-dialog>footer{padding:12px 20px 16px;display:grid;grid-template-columns:1fr 1fr;gap:10px;border-top:1px solid #e4ebf3;background:#fff}
html body .ui-single-choice-dialog>footer .btn{width:100%;height:40px}
@media(max-width:768px){html body select.ui-select--compact{height:var(--ui-control-height)!important;min-height:var(--ui-control-height)!important;max-height:var(--ui-control-height)!important;padding-right:34px!important;border-radius:var(--ui-control-radius)!important;font-size:16px!important}}
@media(max-width:768px){body.ui-single-choice-open{overflow:hidden}html body .ui-single-choice-overlay{padding:16px}html body .ui-single-choice-dialog{width:calc(100vw - 32px);max-height:calc(100dvh - 32px);border-radius:14px}html body .ui-single-choice-dialog>header{min-height:58px;padding:0 16px}html body .ui-single-choice-search{width:calc(100% - 32px);margin-left:16px;margin-right:16px}html body .ui-single-choice-options{padding:8px 16px}html body .ui-single-choice-dialog>footer{padding:12px 16px 16px}html body .ui-single-choice-option{min-height:52px;font-size:15px}}
html body :is(.btn,.console-button,.customer-toolbar-add,.project-toolbar-add,.quotation-add-customer,.topbar-btn,.primary,.danger-outline,.preview-secondary,input[type=button],input[type=submit]) {
  box-sizing:border-box!important;height:40px!important;min-height:40px!important;max-height:40px!important;
  padding-top:0!important;padding-bottom:0!important;border-radius:8px!important;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2!important;
}
html body #page-content :is(.customer-search-toolbar .customer-search-box,.project-search-toolbar .project-search-box,.quote-search,.fp-search>div,.fp-product-search,.warehouse-native-search,.warehouse-report-toolbar label),
html body :is(.project-toolbar-select,.customer-toolbar-add,.project-toolbar-add) {
  box-sizing:border-box!important;height:40px!important;min-height:40px!important;max-height:40px!important;border-radius:8px!important;
}
html body :is(.customer-toolbar-add,.project-toolbar-add){display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:13px!important;font-weight:600!important;white-space:nowrap}
html body .mobile-delete-confirm{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.48)}
html body .mobile-delete-confirm-card{box-sizing:border-box;width:min(340px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:22px 18px 16px;border:1px solid #e2e8f0;border-radius:14px;background:var(--c-card,#fff);color:var(--c-text,#17223b);text-align:center;box-shadow:0 22px 60px rgba(0,0,0,.22)}
html body .mobile-delete-confirm-icon{width:48px;height:48px;margin:0 auto 12px;display:grid;place-items:center;border-radius:50%;background:#fff0f0;color:#de4852;font-size:26px;font-weight:700}
html body .mobile-delete-confirm-card strong{display:block;font-size:16px;line-height:1.5}
html body .mobile-delete-confirm-card p{margin:10px 0 18px;font-size:13px;line-height:1.6;color:var(--c-text-2,#64748b)}
html body .mobile-delete-confirm-card>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:10px}
html body .mobile-delete-confirm-card .btn{width:100%;border:1px solid #dce3ed;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}
html body .mobile-delete-confirm-card .btn-secondary{background:#f1f4f8;color:#52617a}
html body .mobile-delete-confirm-card .btn-danger{background:#df4654;color:white;border-color:#df4654}
html body .mobile-delete-confirm-card .btn-primary{background:#24C1AE;color:white;border-color:#24C1AE}
html body .mobile-delete-confirm-input{box-sizing:border-box;width:100%;height:40px;margin:6px 0 12px;padding:0 10px;border:1px solid #dce3ed;border-radius:8px;background:var(--c-card,#fff);color:var(--c-text,#17223b);font:inherit}
html body .mobile-delete-confirm-card label{display:block;text-align:left;font-size:13px}
/* Opt-in only: fixed controls marked by a page disappear while a real mobile text keyboard is open. */
@media(max-width:768px){html.ui-keyboard-open [data-ui-hide-on-keyboard]{display:none!important}}
.ui-inline-form-overlay{position:fixed;inset:0;z-index:8000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.48);overscroll-behavior:contain}
.ui-inline-form-dialog{box-sizing:border-box;width:min(420px,100%);max-height:calc(100dvh - 40px);overflow-y:auto;padding:22px;border:1px solid #d9e3ee;border-radius:13px;background:#fff;color:#263e57;box-shadow:0 15px 50px #14203433}
.ui-inline-form-dialog:focus{outline:none}
.ui-inline-form-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.ui-inline-form-dialog h3{margin:0;font-size:17px;font-weight:600;color:inherit}
.ui-inline-form-dialog .ui-inline-form-close{width:36px;height:36px;padding:0;border:0;background:transparent;color:#63768b;font-size:22px;border-radius:8px;cursor:pointer}
.ui-inline-form-content>div{width:100%!important;padding:0!important;margin:0!important}
.ui-inline-form-content>#todo-category-custom{border:0}
.ui-inline-form-content .form-label{display:none}
.ui-inline-form-content label{display:block;color:inherit;font-size:13px}
.ui-inline-form-content input{box-sizing:border-box;width:100%!important;height:40px!important;min-height:40px!important;margin:0!important;padding:0 12px!important;border:1px solid #d7e1ee!important;border-radius:8px!important;background:#fff!important;color:#263e57!important;font:inherit}
.ui-inline-form-content input:focus{outline:2px solid rgba(36,193,174,.22);outline-offset:1px;border-color:#24c1ae!important}
.ui-inline-form-content .input-group{display:block}
.ui-inline-form-dialog>footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:16px}
.ui-inline-form-dialog>footer button{box-sizing:border-box;height:40px!important;min-height:40px!important;margin:0!important;padding:0 16px!important;border:1px solid #d2deea!important;border-radius:8px!important;background:#fff;color:#63768b;font:inherit;font-size:13px;cursor:pointer}
.ui-inline-form-dialog>footer button:last-child:not(:first-child){background:#24c1ae!important;border-color:#24c1ae!important;color:#fff!important}
body.ui-inline-form-open .position-fixed.bottom-0.end-0,body.ui-inline-form-open .toast-container{z-index:8100!important}

/* 弹窗遮罩统一模板：差异在 0.02 透明度、2px 模糊以内的弹窗一律复用这一份。
   改这里的值等于同时改 8 处；深色/浅色等刻意区分档位的弹窗不在此列，见各文件原规则。 */
.ui-mask{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);overscroll-behavior:contain}
.ui-confirm-card{box-sizing:border-box;width:min(340px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:22px 18px 16px;border:1px solid #d8e2ec;border-radius:14px;background:var(--c-card,#fff);color:var(--c-text,#17223b);box-shadow:0 22px 60px rgba(15,23,42,.22);text-align:center}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.ui-mask{background:rgba(15,23,42,.58)}}

/* 既有类名接入同一模板（不改 DOM）：删除确认、内联表单、备注冲突、现场审核建单、出库完成提示。 */
html body :is(.mobile-delete-confirm,.ui-inline-form-overlay,.warehouse-remark-conflict,.site-review-create-overlay,.warehouse-completion-panel){background:rgba(15,23,42,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){html body :is(.mobile-delete-confirm,.ui-inline-form-overlay,.warehouse-remark-conflict,.site-review-create-overlay,.warehouse-completion-panel){background:rgba(15,23,42,.58)}}

/* 确认型卡片接入同一模板：主应用删除确认、仓库删除确认。 */
html body :is(.mobile-delete-confirm-card,.warehouse-delete-confirm-card){box-sizing:border-box;width:min(340px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:22px 18px 16px;border:1px solid #d8e2ec;border-radius:14px;background:var(--c-card,#fff);color:var(--c-text,#17223b);box-shadow:0 22px 60px rgba(15,23,42,.22);text-align:center}

/* 设备出库完成弹层：由 warehouse/app.js 挂到 document.body，脱离 #stock-out 与
   #warehouse-integrated-root 的作用域，因此定位/卡片/按钮样式必须写在全局文件里，
   否则主应用内联仓库页时只剩一层背景色，且按钮回落到 Bootstrap 默认蓝。 */
.warehouse-completion-panel{position:fixed;inset:0;z-index:8100;display:grid;place-items:center;padding:24px;overflow:auto;overscroll-behavior:contain;background:rgba(15,23,42,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
@media(max-width:600px){.warehouse-completion-panel{padding:16px}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.warehouse-completion-panel{background:rgba(15,23,42,.58)}}
.warehouse-completion-card{box-sizing:border-box;width:min(430px,100%);max-height:calc(100dvh - 48px);overflow:auto;padding:30px 28px;text-align:center;border:1px solid #d7e5e2;border-radius:16px;background:#fff;box-shadow:0 18px 50px rgba(31,60,74,.16)}
.warehouse-completion-card>i{display:grid;width:52px;height:52px;margin:0 auto 14px;place-items:center;border-radius:50%;background:#e3f8f4;color:#24c1ae;font-size:27px}
.warehouse-completion-card h4{margin:0 0 8px;color:#17223b;font-size:20px;font-weight:700}
.warehouse-completion-card p{margin:0 0 22px;color:#66758c;font-size:14px;line-height:1.65}
.warehouse-completion-card>div{display:flex;justify-content:center;gap:10px}
.warehouse-completion-card .btn{min-width:108px;height:40px;border-radius:8px}
.warehouse-completion-panel .btn:focus-visible{outline:2px solid #24c1ae;outline-offset:2px}
.warehouse-completion-panel .btn-primary{border-color:#24c1ae!important;background:#24c1ae!important;color:#fff!important;box-shadow:0 7px 16px rgba(36,193,174,.2)!important}
.warehouse-completion-panel .btn-primary:hover{border-color:#1eaf9e!important;background:#1eaf9e!important;color:#fff!important}
.warehouse-completion-panel .btn-outline-secondary{border-color:#cbd8e8!important;background:#fff!important;color:#52617a!important}
.warehouse-completion-panel .btn-outline-secondary:hover{border-color:#24c1ae!important;background:#f0fbf9!important;color:#168f80!important}
/* bootstrap-icons 在主应用里是被 #warehouse-integrated-root 作用域化的，弹层挂在 body 上后
   图标 class 匹配不到，这里直接给完成弹层的图标补上字体与字形。 */
.warehouse-completion-card>i{font-family:bootstrap-icons!important;font-style:normal;font-weight:normal!important;line-height:1;display:grid;width:52px;height:52px;margin:0 auto 14px;place-items:center;border-radius:50%;background:#e3f8f4;color:#24c1ae;font-size:27px}
.warehouse-completion-card>i::before{content:"\f26a"}
