/* 全页面收口层：复用现有颜色和控件变量，只处理排版、可操作性与短反馈。 */
:root { --ui-motion-fast: 140ms; --ui-motion-enter: 180ms; }
.skip-workspace-link { position: fixed; left: 16px; top: -100px; z-index: 1400; padding: 12px 16px; border-radius: 8px; background: var(--panel); color: var(--ink); }
.skip-workspace-link:focus { top: 12px; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; }
.workspace, .panel, .topbar > *, .module-detail > *, .workflow-heading > *, .management-page-head > * { min-width: 0; }
.property-workbench { grid-template-columns: minmax(0, 1fr); }
.global-tools { min-width: 0; width: 100%; }
.global-tools input { width: 100%; }
.property-search-toolbar, .property-search-topline, .property-search-main, .property-search-utilities, .property-filter-panel, .property-filter-cluster { min-width: 0; max-width: 100%; }
.property-search-main input { min-width: 0; width: 100%; }
.panel-header, .workflow-heading, .management-page-head { gap: 12px; }
.panel-header h2, .workflow-heading h3, .management-page-head h3 { overflow-wrap: anywhere; }
.inline-actions, .property-actions, .confirm-actions { flex-wrap: wrap; }
.inline-action, .confirm-cancel, .confirm-danger, .property-actions button {
  max-width: 100%;
  border-radius: var(--radius);
  transition: background-color var(--ui-motion-fast), border-color var(--ui-motion-fast), color var(--ui-motion-fast), transform var(--ui-motion-fast);
}
.primary-action { box-shadow: var(--shadow-sm); }
@media (hover: hover) {
  :is(.inline-action, .confirm-cancel, .confirm-danger, .property-actions button):not(:disabled):active { transform: translateY(1px); }
}
.status-badge, .status-chip, .tag { max-width: 100%; overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.page-tabs { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
.station-two-column, .station-two-column > section { min-width: 0; }
.station-boundary-grid p { overflow-wrap: anywhere; }
.workspace-boundary-note { border-color: var(--line-soft); background: var(--panel-muted); color: var(--muted-strong); font-size: 12px; line-height: 1.6; }
.table-wrap :is(th, td), .settlement-readiness, .summary-chip strong { font-variant-numeric: tabular-nums; }
.customer-create-form > .form-actions {
  position: static;
  background: transparent;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.action-dialog, .confirm-dialog, .entity-drawer, .esign-drawer {
  overscroll-behavior: contain;
  animation: ui-surface-enter var(--ui-motion-enter) ease-out;
}
.action-dialog { max-height: calc(100dvh - 32px); }
.action-dialog > header { align-items: start; }
.action-dialog > header > div { min-width: 0; }
.action-dialog h2, .confirm-dialog h2 { margin: 4px 0 0; overflow-wrap: anywhere; }
.action-dialog .confirm-actions { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 16px; }
.action-dialog-fields :is(input, select, textarea) { width: 100%; min-width: 0; }
.action-dialog-fields textarea { resize: vertical; }
.toast-host:not(.hidden) { animation: ui-surface-enter var(--ui-motion-enter) ease-out; max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
@keyframes ui-surface-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1080px) {
  .sidebar { grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: start; }
  .module-nav.agent-primary-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: 4px; }
  .agent-primary-nav > .nav-group { min-width: 0; }
  .agent-primary-nav .nav-group-button, .agent-nav-more > summary { display: flex; justify-content: center; gap: 5px; padding: 8px 4px; }
  .agent-primary-nav .nav-group-button strong, .agent-nav-more > summary strong { font-size: 12px; }
  .agent-primary-nav .nav-children { margin: 4px 0 0; padding: 0; border: 0; }
  .agent-primary-nav .nav-child-button { padding: 6px 4px; white-space: normal; line-height: 1.4; }
  .agent-nav-more { min-width: 0; }
  .agent-nav-more-menu { max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 720px) {
  .sidebar { position: relative; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .sidebar > .brand { grid-column: 1; }
  .sidebar > .sidebar-mobile-account { grid-column: 2; grid-row: 1; }
  .sidebar > .module-nav { grid-column: 1 / -1; grid-row: 2; }
  .agent-primary-nav .nav-group-button .nav-icon, .agent-nav-more > summary .nav-icon { display: none; }
  body[data-workspace-role="agent"] .topbar, .topbar { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .global-tools { grid-template-columns: minmax(0, 1fr) 40px; }
  .workspace { padding: 12px; }
  .panel-header { flex-wrap: wrap; }
  .action-dialog-overlay, .confirm-overlay { padding: 12px; }
  .action-dialog, .confirm-dialog { padding: 18px; width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; }
  .action-dialog-fields { grid-template-columns: minmax(0, 1fr); }
  .confirm-actions > button { flex: 1 1 110px; min-height: 44px; }
  .inline-action, .property-actions button { white-space: normal; min-height: 40px; padding-block: 8px; }
  .customer-create-form { padding: 14px; }
  .property-search-main, .property-search-label { min-width: 0; width: 100%; }
  .property-search-main { grid-template-columns: minmax(0, 1fr) auto; }
  .property-search-label { grid-column: 1 / -1; }
  .property-search-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .property-search-row .property-thumb { width: 96px; height: 76px; }
  .property-search-row .property-search-price { grid-column: 2; }
  .property-search-row .property-search-status, .property-search-row .property-search-actions-row { grid-column: 1 / -1; }
  .property-search-actions-row { justify-content: flex-start; }
  .station-two-column, .station-boundary-grid { grid-template-columns: minmax(0, 1fr); }
  .station-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-create-form > .form-actions { gap: 8px; }
  .download-page { padding: 20px 14px; }
  .download-hero h1 { font-size: clamp(26px, 8vw, 36px); }
}
/* 官方原始品牌资产：保持比例和安全留白，不对标志施加滤镜、描边或动画。 */
.brand-mark img { display: block; width: 30px; height: auto; object-fit: contain; }
.login-brand-mark.official-brand-lockup { width: min(300px, 100%); height: auto; padding: 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.official-brand-lockup img { display: block; width: 100%; height: auto; }
.login-mobile-logo { display: none; }
@media (max-width: 720px) {
  .login-screen { grid-template-columns: minmax(0, 1fr); background: #f3f5f7; }
  .login-visual { display: none; }
  .login-panel { min-width: 0; width: 100%; justify-self: center; }
  .login-mobile-logo { display: block; width: 220px; max-width: 100%; height: auto; padding: 12px; }
}
.download-brand-logo { display: block; width: 240px; max-width: 100%; height: auto; padding: 14px; margin-bottom: 24px; }
@media (prefers-reduced-motion: reduce) {
  :root { --ui-motion-fast: 0ms; --ui-motion-enter: 0ms; }
  .action-dialog, .confirm-dialog, .entity-drawer, .esign-drawer, .toast-host:not(.hidden) { animation: none; }
}
