/*
  Shared interaction fixes for Qizhi work pages.
  Keep clinical/product pages compact and prevent dropdowns from being clipped.
  Current visual direction: sharp sub-page controls, no rounded-card look.
*/
:root {
  --radius: 0 !important;
  --radius-xs: 0 !important;
  --radius-sm: 0 !important;
  --radius-lg: 0 !important;
  --qz-corner: 0px;
}

body :where(
  .card,
  .panel,
  .kpi,
  .hero-card,
  .module,
  .dash-panel,
  .content-box,
  .code-box,
  .paper-box,
  .side-card,
  .status-board,
  .dataset-card,
  .topic-card,
  .output-card,
  .step-card,
  .sub-card,
  .landing-brief,
  .landing-score,
  .landing-domain,
  .landing-feature,
  .landing-flow-step,
  .landing-mini-row,
  .care-summary-card,
  .care-stage-card,
  .care-mode-card,
  .quality-card,
  .alert-card,
  .admin-live-head,
  .admin-monitor-card,
  .endpoint-row,
  .activity-card,
  .mini-row,
  .entry-card,
  .entry,
  .feedback-card,
  .feedback-plan,
  .knowledge-search-shell,
  .knowledge-detail,
  .relation-card,
  .compat-warning,
  .compat-hit,
  .shop-card,
  .shop-cart,
  .shop-order,
  .cart-row,
  .shop-detail-modal,
  .service-card,
  .service-status,
  .sys-info,
  .result-card,
  .priority-hint-card,
  .intent-panel,
  .analysis-progress-card,
  .review-status-card,
  .record-item,
  .profile-card,
  .med-section,
  .dx-module,
  .about-card,
  .history-section,
  .history-card,
  .care-hero,
  .care-tile,
  .hc-top,
  .hc-action,
  .hc-panel,
  .hc-row,
  .life-card,
  .life-metric,
  .life-recent-item,
  .doc-reader-hero,
  .doc-card,
  .doc-upload-card,
  .doc-field-summary,
  .companion-dock,
  .task-card,
  .latest-record-card,
  .page-head,
  .history-card,
  .history-detail-block,
  .record-modal,
  .history-sheet,
  .comp-hero,
  .co-item,
  .comp-section,
  .sync-panel,
  .sync-step,
  .publication-qc,
  .followup-box,
  .file-box,
  .file-item,
  .node-check,
  .framework-panel,
  .axis-box,
  .check-row,
  .manual-copy-panel textarea
) {
  border-radius: var(--qz-corner) !important;
}

body :where(
  button,
  .btn,
  .btn-mini,
  .rc-btn,
  .rc-link,
  .chip,
  .care-badge,
  .care-tags span,
  .entry-pills span,
  .pill,
  .risk-badge,
  .status-badge,
  .shop-in-cart,
  .shop-category-tabs button,
  .shop-cart-open,
  .shop-card-actions button,
  .shop-cart button,
  .shop-drawer button,
  .shop-detail-modal button,
  .service-actions button,
  .feedback-actions button,
  .knowledge-presets button,
  .portal-quickbar button,
  .landing-actions button,
  .msk-model-switch button,
  .msk-segment-buttons button,
  .msk-spine-toolstrip button,
  .msk-spine-case-filters button,
  .msk-spine-suggestions button,
  .msk-meridian-list button,
  .history-filter,
  .hc-tab,
  .hc-pill,
  .hc-row-tag,
  .hc-inline-actions button,
  .task-action,
  .dock-action,
  .care-quick,
  .g-action,
  .input-wrapper,
  .send-btn,
  .mic-btn,
  .main-input-area,
  .nav-item,
  .quick-tag,
  .sug-tag,
  .f-chip,
  .dx-chip,
  .dx-opt,
  .dx-nav-btn,
  .di-btn,
  .qz-auth-bar,
  .qz-auth-link,
  .qz-auth-logout,
  .qz-auth-toggle,
  .qz-logo,
  .qz-logo-core,
  .toast
) {
  border-radius: var(--qz-corner) !important;
}

body :where(
  .upload-zone,
  .workflow-step,
  .ocr-status-card,
  .preview-item,
  .qc-panel,
  .lead-result,
  .login-box,
  .role-card,
  .btn-login,
  .demo-hint,
  .session-card,
  .session-actions button,
  .portal-command-trigger,
  .portal-command-head input,
  .portal-command-item,
  .sidebar,
  .topbar,
  .modal,
  .drawer,
  .sheet
) {
  border-radius: var(--qz-corner) !important;
}

body :where(input, select, textarea, .form-input, .di-input, .field-input, .pf-input) {
  border-radius: var(--qz-corner) !important;
}

body select:not([multiple]) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  line-height: 1.35;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-appearance: menulist !important;
  appearance: auto !important;
  background-image: none !important;
  padding-right: 30px !important;
  position: relative;
  z-index: 1200;
}

body select:focus,
body input:focus,
body textarea:focus,
body .combobox input:focus {
  outline: none;
  border-color: var(--jade, var(--green, var(--pri, #0f766e))) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12) !important;
}

body :where(
  .field,
  .input-field,
  .form-grid,
  .toolbar,
  .care-toolbar,
  .dashboard-toolbar,
  .feedback-toolbar,
  .feedback-mini-toolbar,
  .knowledge-toolbar,
  .knowledge-search-shell,
  .knowledge-layout,
  .shop-toolbar,
  .shop-layout,
  .shop-cart,
  .shop-drawer-body,
  .service-toolbar,
  .doc-type-row,
  .record-modal .di-fields,
  .record-modal .input-field
) {
  overflow: visible !important;
}

body .record-modal {
  overflow: hidden !important;
}

body .record-modal .rm-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body :where(
  .portal-command,
  .shop-detail-modal,
  .shop-drawer,
  .record-modal-overlay,
  .sidebar,
  .chat-area,
  .sub-view,
  .scroll-panel,
  .table-wrap
) {
  isolation: isolate;
}

body :where(
  select,
  .di-select,
  .field-input,
  .pf-input,
  .record-modal select,
  .doc-type-row select
) {
  -webkit-tap-highlight-color: rgba(15, 91, 77, .12);
  user-select: auto;
  pointer-events: auto !important;
  touch-action: manipulation;
  min-height: 44px;
}

body .combobox {
  position: relative !important;
  z-index: 1200 !important;
  overflow: visible !important;
}

body .combobox:focus-within,
body .combobox.open {
  z-index: 10060 !important;
}

body .combobox-dropdown {
  border-radius: var(--qz-corner) !important;
  z-index: 10080 !important;
  max-height: min(360px, 56vh) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

body .combobox-dropdown.show {
  display: block !important;
}

body .combobox-option {
  min-height: 40px;
  display: flex;
  align-items: center;
}

body :where(.portal-command, .shop-detail-modal) {
  border-radius: var(--qz-corner) !important;
}

body .qz-auth-bar,
body .qz-auth-toggle {
  top: auto !important;
  right: 14px !important;
  bottom: 14px !important;
  border-radius: var(--qz-corner) !important;
}

body .qz-auth-bar {
  max-width: min(420px, calc(100vw - 28px));
}

@media (max-width: 720px) {
  body select:not([multiple]),
  body input,
  body textarea,
  body .combobox input {
    min-height: 44px;
    font-size: 16px;
  }

  body .combobox-dropdown {
    max-height: min(420px, 62vh) !important;
  }
}
