/* Shared control skin. Keep business states and click timing owned by each page. */
:root { --suite-control-ease:cubic-bezier(.2,.8,.2,1); }
.suite-select,.suite-date { position:relative; display:inline-block; width:100%; min-width:0; vertical-align:middle; }
body .suite-select-native,body .suite-date-native {
  position:absolute !important; left:0 !important; bottom:0 !important;
  width:1px !important; min-width:0 !important; height:1px !important; min-height:0 !important;
  margin:0 !important; padding:0 !important; border:0 !important; opacity:0 !important; pointer-events:none !important;
}
body .suite-select-trigger,body .suite-date-trigger {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; min-width:0; min-height:38px; padding:8px 12px;
  border:1px solid var(--suite-line,#e4e7ef); border-radius:8px;
  background:#fff; color:var(--suite-text,#243044); box-shadow:0 1px 2px #24304404;
  font:inherit; font-size:13px; font-weight:500; line-height:20px; text-align:left; cursor:pointer;
  transition:border-color 160ms var(--suite-control-ease),background-color 160ms var(--suite-control-ease),box-shadow 160ms var(--suite-control-ease);
}
body .suite-select-trigger:hover:not(:disabled),body .suite-date-trigger:hover:not(:disabled) { border-color:#b9afea; background:#fdfcff; }
body .suite-select-trigger:focus-visible,body .suite-date-trigger:focus-visible,
body .suite-select.is-open .suite-select-trigger,body .suite-date.is-open .suite-date-trigger {
  outline:0; border-color:var(--suite-primary,#6255d9); box-shadow:0 0 0 3px #6255d917;
}
body .suite-select-trigger.is-invalid,body .suite-date-trigger.is-invalid { border-color:#cf4e45; box-shadow:0 0 0 3px #cf4e4517; }
body .suite-select-trigger:disabled,body .suite-date-trigger:disabled { cursor:not-allowed; background:#f5f6fa; color:#949baa; opacity:.65; box-shadow:none; }
.suite-select-value,.suite-date-value { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
body .suite-select-trigger.is-placeholder .suite-select-value,body .suite-date-trigger.is-placeholder { color:var(--suite-muted,#748096); font-weight:400; }
.suite-select-chevron { flex:none; width:6px; height:6px; margin:-3px 2px 0 6px; border-right:1.5px solid #8590a5; border-bottom:1.5px solid #8590a5; transform:rotate(45deg); transition:transform 160ms var(--suite-control-ease); }
.suite-select.is-open .suite-select-chevron { margin-top:3px; transform:rotate(225deg); }
.suite-date-icon { width:14px; height:14px; flex:none; color:#8992a7; }
body .suite-select-portal,body .suite-date-portal {
  box-sizing:border-box; position:fixed; inset:auto; z-index:30000; margin:0;
  padding:6px; border:1px solid var(--suite-line,#e4e7ef); border-radius:10px;
  background:#fff; color:var(--suite-text,#243044); box-shadow:0 12px 32px #29345016,0 2px 6px #29345008;
  font:13px/1.4 "Microsoft YaHei",system-ui,sans-serif;
  animation:suite-control-enter 150ms var(--suite-control-ease) both; overscroll-behavior:contain;
}
body .suite-select-portal { display:grid; gap:3px; max-height:var(--suite-select-max-height,280px); overflow:auto; }
body .suite-select-portal[hidden],body .suite-date-portal[hidden] { display:none !important; }
body .suite-select-option {
  display:flex; align-items:center; gap:10px; width:100%; min-height:36px; padding:8px 10px;
  border:0; border-radius:6px; background:transparent; color:#47536a; font:inherit; font-weight:400; text-align:left; cursor:pointer;
  transition:background-color 120ms ease,color 120ms ease;
}
body .suite-select-option.is-active:not(:disabled),body .suite-select-option:hover:not(:disabled) { background:#f5f3ff; color:#5144bf; outline:none; }
body .suite-select-option.is-selected,body .suite-select-option.is-selected:not(:disabled) { background:var(--suite-primary-soft,#f0edff); color:var(--suite-primary,#6255d9); font-weight:600; }
body .suite-select-option:focus-visible { outline:1px solid #c5bcf1; outline-offset:-1px; }
body .suite-select-option:disabled { cursor:not-allowed; opacity:.45; }
body .suite-select-check { order:2; margin-left:auto; flex:none; display:grid; place-items:center; width:18px; height:18px; background:none; color:transparent; font-size:14px; }
body .suite-select-option.is-selected .suite-select-check { background:none; color:var(--suite-primary,#6255d9); }
.suite-select-option-label { min-width:0; overflow-wrap:anywhere; }
body .suite-select-group { padding:8px 10px 4px; color:#8b94a6; font-size:11px; font-weight:500; }
body .suite-select-portal::-webkit-scrollbar { width:7px; }
body .suite-select-portal::-webkit-scrollbar-thumb { border:2px solid #fff; border-radius:8px; background:#d5d2e3; }
.agent-shell .suite-select-trigger { min-height:34px; }
.agent-shell .field .suite-select-trigger { min-height:38px; }
.agent-shell :is(.pagination,footer) > .suite-select { width:auto; min-width:82px; }
.agent-shell :is(.summary-pagination,.manual-pagination,.support-pagination,.warehouse-pagination) > .suite-select { width:auto; min-width:100px; }
body select[multiple] { accent-color:var(--suite-primary); border:1px solid var(--suite-line); border-radius:8px; padding:6px; background:#fff; color:var(--suite-text); }
body select[multiple] option { padding:7px 10px; border-radius:5px; }
body select[multiple] option:checked { color:#6255d9; background:#f0edff linear-gradient(#f0edff,#f0edff); }
body :is(.date-range,.summary-date-range,.manual-date-range) .suite-date-trigger { border:0; min-height:30px; padding:2px 4px; background:transparent; box-shadow:none; font-size:12px; }
body :is(.date-range,.summary-date-range,.manual-date-range):focus-within { border-color:var(--suite-primary); box-shadow:0 0 0 3px #6255d917; }
body :is(.date-range,.summary-date-range,.manual-date-range) .suite-date-trigger:focus-visible { background:var(--suite-primary-soft); }
body .suite-date-portal { width:296px; max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); padding:12px; overflow:auto; }
.suite-date-heading { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:10px; }
body .suite-date-heading input { box-sizing:border-box; width:68px; height:30px; padding:3px 5px; background:#f8f9fc; border:1px solid #e4e7ef; border-radius:5px; color:#243044; font:inherit; }
body .suite-date-heading input[data-month] { width:48px; }
.suite-date-title { display:flex; align-items:center; gap:3px; font-size:12px; }
body .suite-date-portal button { font:inherit; cursor:pointer; border:0; border-radius:6px; color:#47536a; background:transparent; }
body .suite-date-heading button { width:28px; height:30px; font-size:20px; }
.suite-date-week,.suite-date-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
.suite-date-week span { text-align:center; color:#8a94a6; font-size:11px; padding:6px 0; }
body .suite-date-grid button { height:32px; padding:0; font-size:12px; }
body .suite-date-grid .is-outside { color:#a4acba; }
body .suite-date-grid .is-today { box-shadow:inset 0 0 0 1px #d9d2fa; color:#6255d9; }
body .suite-date-portal button:hover:not(:disabled) { background:#f0edff; color:#6255d9; }
body .suite-date-grid .is-selected,body .suite-date-grid .is-selected:hover { color:#fff; background:#6255d9; box-shadow:none; }
body .suite-date-portal button:disabled { opacity:.3; cursor:not-allowed; }
body .suite-date-portal :is(button,input):focus-visible { outline:2px solid #b6a9ef; outline-offset:1px; }
.suite-date-footer { display:flex; justify-content:space-between; margin-top:10px; padding-top:10px; border-top:1px solid #eef0f5; }
body .suite-date-footer button { padding:6px 12px; color:#6255d9; }
/* Existing two-month range picker keeps its selection logic. */
body .erp-order-date-popover { border-color:#e4e7ef; background:#fff; box-shadow:0 12px 32px #29345016; border-radius:10px; }
body .erp-order-date-presets { background:#f8f9fc; border-color:#e4e7ef; }
body .erp-order-date-presets button:hover { background:#f0edff; color:#6255d9; }
body .erp-order-calendar-nav button:hover,body .erp-order-calendar-days button:hover,body .erp-order-calendar-days button.in-range { color:#6255d9; background:#f0edff; }
body .erp-order-calendar-days button.range-start,body .erp-order-calendar-days button.range-end { color:#fff; background:#6255d9; }
body .erp-order-command-bar > .suite-select .suite-select-trigger { background:#fff; border-color:#e4e7ef; color:#243044; box-shadow:0 1px 2px #24304404; font-weight:500; }
body .erp-order-command-bar > .suite-select.is-open .suite-select-trigger,body .erp-order-command-bar > .suite-select .suite-select-trigger:focus-visible { border-color:#6255d9; box-shadow:0 0 0 3px #6255d917; outline:0; }
/* No timers, synthetic loading or transition:all. Click handlers fire immediately. */
body :is(.agent-shell,.workspace,dialog) button:not(.suite-select-trigger):not(.suite-date-trigger) {
  transition:background-color 160ms var(--suite-control-ease),border-color 160ms var(--suite-control-ease),color 160ms ease,box-shadow 160ms ease,opacity 160ms ease,scale 100ms var(--suite-control-ease);
}
@media (hover:hover) {
  body :is(.agent-workspace,.workspace,dialog) :is(.button,.primary-button,.secondary-button,.manual-search-button):hover:not(:disabled):not([aria-disabled="true"]) { box-shadow:0 3px 9px #5542aa18; }
}
body :is(.agent-shell,.workspace,dialog) button:active:not(:disabled):not([aria-disabled="true"]):not(.suite-select-trigger):not(.suite-date-trigger) { scale:.975; transition-duration:65ms; }
body :is(.agent-shell,.workspace,dialog) button:disabled { cursor:not-allowed; scale:1; }
body :is(.agent-shell,.workspace) :is(input,textarea):not([type="checkbox"]):not([type="radio"]):focus-visible { outline:none; border-color:#8f80e5; box-shadow:0 0 0 3px #6255d917; }
body :is(.agent-shell,.workspace) :is(input,textarea)::selection { background:#ded7fc; color:#342568; }
@keyframes suite-control-enter { from { opacity:0; translate:0 -4px; } to { opacity:1; translate:0 0; } }
@media (prefers-reduced-motion:reduce) {
  body :is(.agent-shell,.workspace,dialog) button,body .suite-select-trigger,body .suite-date-trigger,body .suite-select-chevron,body .suite-select-option,body .suite-select-portal,body .suite-date-portal { animation:none !important; transition:none !important; scale:1 !important; }
}
