/*
 * Mobile system shell
 *
 * This stylesheet is intentionally namespaced.  It is a visual layer for the
 * mobile view of the existing system: it does not change desktop selectors or
 * the shape of the data returned by the application.
 */

.mobile-system-shell {
  --ms-brand: #0f766e;
  --ms-brand-dark: #115e59;
  --ms-ink: #142b43;
  --ms-muted: #6a7d92;
  --ms-soft: #f4f7fb;
  --ms-card: #ffffff;
  --ms-line: #dce5ef;
  --ms-blue: #245ca8;
  --ms-danger: #b42318;
  --ms-warning: #a66514;
  min-height: 100dvh;
  color: var(--ms-ink);
  background: #f3f6fa;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

.mobile-system-shell *,
.mobile-system-shell *::before,
.mobile-system-shell *::after {
  box-sizing: border-box;
}

.mobile-system-shell button,
.mobile-system-shell input,
.mobile-system-shell select,
.mobile-system-shell textarea {
  font: inherit;
}

.mobile-system-shell button {
  min-height: 38px;
  border: 1px solid var(--ms-line);
  border-radius: 9px;
  background: var(--ms-card);
  color: var(--ms-ink);
  padding: 7px 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.mobile-system-shell button:active {
  transform: translateY(1px);
}

.mobile-system-shell button:focus-visible,
.mobile-system-shell a:focus-visible,
.mobile-system-shell input:focus-visible,
.mobile-system-shell select:focus-visible,
.mobile-system-shell textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .22);
  outline-offset: 2px;
}

.mobile-system-shell .mobile-system-primary {
  border-color: var(--ms-brand);
  background: var(--ms-brand);
  color: #fff;
  font-weight: 700;
}

.mobile-system-shell .mobile-system-secondary {
  border-color: #cbd9e8;
  background: #f7fafd;
  color: #315984;
}

.mobile-system-shell .mobile-system-danger {
  border-color: #f0c3bd;
  background: #fff6f4;
  color: var(--ms-danger);
}

.mobile-system-shell .mobile-system-link {
  border: 0;
  background: transparent;
  color: var(--ms-blue);
  padding: 4px 0;
}

.mobile-system-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ms-line);
  backdrop-filter: blur(12px);
}

.mobile-system-topbar .mobile-system-back,
.mobile-system-topbar .mobile-system-icon-button {
  width: 38px;
  min-width: 38px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #385671;
  font-size: 20px;
}

.mobile-system-topbar .mobile-system-title {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
}

.mobile-system-topbar .mobile-system-subtitle {
  display: block;
  overflow: hidden;
  color: var(--ms-muted);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-system-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
}

.mobile-system-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 3px 0 13px;
}

.mobile-system-page-head h1,
.mobile-system-page-head h2,
.mobile-system-page-head h3 {
  min-width: 0;
  margin: 0;
  color: var(--ms-ink);
  font-size: 20px;
  line-height: 1.35;
}

.mobile-system-page-head p {
  margin: 4px 0 0;
  color: var(--ms-muted);
  font-size: 12px;
}

.mobile-system-page-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.mobile-system-card {
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  background: var(--ms-card);
  box-shadow: 0 2px 8px rgba(26, 52, 78, .035);
}

.mobile-system-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--ms-ink);
  font-size: 15px;
  font-weight: 800;
}

.mobile-system-card-title small {
  color: var(--ms-muted);
  font-size: 11px;
  font-weight: 400;
}

.mobile-system-card-title .mobile-system-card-title-more {
  flex: 0 0 auto;
  color: var(--ms-blue);
  font-size: 12px;
  font-weight: 600;
}

.mobile-system-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mobile-system-kpi {
  min-width: 0;
  padding: 11px;
  border: 1px solid #e3eaf2;
  border-radius: 10px;
  background: #f8fafd;
}

.mobile-system-kpi-label {
  display: block;
  overflow: hidden;
  color: var(--ms-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-system-kpi-value {
  display: block;
  margin-top: 3px;
  color: var(--ms-ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.2;
}

.mobile-system-kpi-value.is-danger { color: var(--ms-danger); }
.mobile-system-kpi-value.is-warning { color: var(--ms-warning); }
.mobile-system-kpi-value.is-brand { color: var(--ms-brand-dark); }

.mobile-system-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.mobile-system-shortcut {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 70px;
  padding: 8px 4px;
  border: 1px solid #e1e9f1;
  border-radius: 10px;
  background: #fff;
  color: #31516f;
  font-size: 11px;
  text-align: center;
}

.mobile-system-shortcut-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #e9f5f3;
  color: var(--ms-brand-dark);
  font-size: 16px;
  font-weight: 800;
}

.mobile-system-filterbar {
  display: flex;
  gap: 8px;
  margin: 0 -2px 12px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.mobile-system-filterbar::-webkit-scrollbar { display: none; }

.mobile-system-filter {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 18px;
  padding: 5px 12px;
  background: #fff;
  color: #5b7189;
  font-size: 12px;
}

.mobile-system-filter.is-active {
  border-color: #b6ddd8;
  background: #e9f5f3;
  color: var(--ms-brand-dark);
  font-weight: 700;
}

.mobile-system-search {
  position: relative;
  margin-bottom: 12px;
}

.mobile-system-search input,
.mobile-system-form input,
.mobile-system-form select,
.mobile-system-form textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px solid #ccd9e7;
  border-radius: 9px;
  background: #fff;
  color: var(--ms-ink);
  padding: 9px 11px;
}

.mobile-system-search input {
  padding-left: 37px;
}

.mobile-system-search::before {
  position: absolute;
  top: 9px;
  left: 13px;
  color: #7c8fa4;
  content: "⌕";
  font-size: 20px;
  line-height: 22px;
  pointer-events: none;
}

.mobile-system-search input::placeholder,
.mobile-system-form input::placeholder,
.mobile-system-form textarea::placeholder {
  color: #97a6b7;
}

.mobile-system-list {
  display: grid;
  gap: 9px;
}

.mobile-system-list-item {
  display: block;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--ms-line);
  border-radius: 11px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.mobile-system-list-item:active {
  border-color: #b5d8d4;
  background: #fbfefe;
}

.mobile-system-list-item-head,
.mobile-system-list-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-system-list-item-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ms-ink);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-system-list-item-subtitle {
  display: -webkit-box;
  margin: 4px 0 8px;
  overflow: hidden;
  color: var(--ms-muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-system-list-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-width: 0;
  color: var(--ms-muted);
  font-size: 11px;
}

.mobile-system-list-item-arrow {
  flex: 0 0 auto;
  color: #7b91a8;
  font-size: 18px;
}

.mobile-system-badge,
.mobile-system-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 12px;
  padding: 2px 8px;
  background: #edf3fa;
  color: #3e628b;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.mobile-system-badge.is-danger,
.mobile-system-status.is-danger { background: #fff0ee; color: var(--ms-danger); }
.mobile-system-badge.is-warning,
.mobile-system-status.is-warning { background: #fff7e9; color: var(--ms-warning); }
.mobile-system-badge.is-success,
.mobile-system-status.is-success { background: #eaf7f1; color: #20714f; }

.mobile-system-detail-section {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--ms-line);
  border-radius: 11px;
  background: #fff;
}

.mobile-system-detail-section > h2,
.mobile-system-detail-section > h3 {
  margin: 0 0 11px;
  color: var(--ms-ink);
  font-size: 15px;
}

.mobile-system-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.mobile-system-detail-field {
  min-width: 0;
}

.mobile-system-detail-field.is-wide {
  grid-column: 1 / -1;
}

.mobile-system-detail-label {
  display: block;
  color: var(--ms-muted);
  font-size: 11px;
}

.mobile-system-detail-value {
  display: block;
  margin-top: 2px;
  color: var(--ms-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.mobile-system-form {
  display: grid;
  gap: 13px;
}

.mobile-system-form-row {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-system-form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mobile-system-form-field.is-wide {
  grid-column: 1 / -1;
}

.mobile-system-form-field > label {
  color: #42617f;
  font-size: 12px;
  font-weight: 700;
}

.mobile-system-form textarea {
  min-height: 96px;
  resize: vertical;
}

.mobile-system-form-help {
  margin: 0;
  color: var(--ms-muted);
  font-size: 11px;
}

.mobile-system-form-actions {
  display: flex;
  gap: 8px;
  padding-top: 3px;
}

.mobile-system-form-actions > button {
  flex: 1 1 0;
}

.mobile-system-sticky-actions {
  position: sticky;
  bottom: calc(62px + env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  gap: 8px;
  margin: 0 -2px 12px;
  padding: 9px;
  border: 1px solid var(--ms-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 18px rgba(21, 46, 71, .1);
  backdrop-filter: blur(12px);
}

.mobile-system-sticky-actions > button {
  flex: 1 1 0;
}

.mobile-system-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 62px;
  padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ms-line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -5px 20px rgba(19, 50, 78, .06);
  backdrop-filter: blur(14px);
}

.mobile-system-bottom-nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #718398;
  font-size: 10px;
}

.mobile-system-bottom-nav-icon {
  display: block;
  min-height: 22px;
  font-size: 20px;
  line-height: 22px;
}

.mobile-system-bottom-nav-item.is-active {
  background: #e9f5f3;
  color: var(--ms-brand-dark);
  font-weight: 750;
}

.mobile-system-bottom-nav-badge {
  position: absolute;
  margin: -18px 0 0 20px;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  background: #c9343e;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.mobile-system-drawer-backdrop,
.mobile-system-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(18, 38, 60, .44);
}

.mobile-system-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  display: flex;
  width: min(88vw, 390px);
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  overflow: auto;
  background: #fff;
  box-shadow: -12px 0 35px rgba(14, 39, 62, .18);
}

.mobile-system-drawer-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 15px;
}

.mobile-system-drawer-head h2 {
  margin: 0;
  font-size: 18px;
}

.mobile-system-drawer-menu {
  display: grid;
  gap: 4px;
}

.mobile-system-drawer-menu button,
.mobile-system-drawer-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  background: transparent;
  color: #284967;
  padding: 8px 3px;
  text-align: left;
  text-decoration: none;
}

.mobile-system-modal {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 81;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(12, 37, 60, .22);
}

.mobile-system-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8eef4;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}

.mobile-system-modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.mobile-system-modal-body {
  padding: 14px;
}

.mobile-system-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  background: #fff;
}

.mobile-system-table-wrap table {
  min-width: 620px;
  width: 100%;
  border-collapse: collapse;
  color: var(--ms-ink);
  font-size: 12px;
}

.mobile-system-table-wrap th,
.mobile-system-table-wrap td {
  min-width: 100px;
  padding: 10px;
  border-bottom: 1px solid #e7edf3;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.mobile-system-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fb;
  color: #61768c;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-system-table-wrap tr:last-child td { border-bottom: 0; }

.mobile-system-empty {
  padding: 28px 14px;
  color: var(--ms-muted);
  text-align: center;
}

.mobile-system-loading {
  display: grid;
  place-items: center;
  min-height: 130px;
  color: var(--ms-muted);
}

.mobile-system-shell [hidden] { display: none !important; }

@media (max-width: 420px) {
  .mobile-system-content { padding-right: 11px; padding-left: 11px; }
  .mobile-system-card,
  .mobile-system-detail-section { padding: 12px; }
  .mobile-system-shortcuts { gap: 6px; }
  .mobile-system-shortcut { min-height: 66px; font-size: 10px; }
  .mobile-system-detail-grid,
  .mobile-system-form-row { grid-template-columns: minmax(0, 1fr); }
  .mobile-system-detail-field.is-wide,
  .mobile-system-form-field.is-wide { grid-column: auto; }
}

@media (min-width: 769px) {
  /* Keep the mobile view visually distinct when used in a desktop preview. */
  .mobile-system-shell { max-width: 760px; margin: 0 auto; border-right: 1px solid var(--ms-line); border-left: 1px solid var(--ms-line); }
  .mobile-system-bottom-nav { right: auto; left: 50%; width: min(760px, 100%); transform: translateX(-50%); }
}

/* Integration overrides for the existing application shell. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body .mobile-system-shell { padding-bottom: 0; overflow-x: clip; }
  body .mobile-system-shell .mobile-system-topbar { position: sticky; top: 0; z-index: 120; min-height: 58px; padding: 8px 12px; }
  body .mobile-system-shell #content.mobile-system-content { width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-metric { width: 100%; min-width: 0; min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; gap: 3px 10px; align-items: center; margin: 0; padding: 10px 11px; border: 1px solid #dfe7f1; border-radius: 8px; background: #f6f9fd; color: #233a54; text-align: left; }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-label { grid-column: 1; grid-row: 1; min-width: 0; overflow-wrap: anywhere; color: #233a54; font-size: 13px; font-weight: 700; }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-metric strong { grid-column: 2; grid-row: 1 / span 2; color: #173d62; font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-metric small { grid-column: 1; grid-row: 2; min-width: 0; color: #74839a; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
  body .mobile-system-shell .dashboard-workbench .cw-dashboard-arrow { grid-column: 3; grid-row: 1 / span 2; color: #7a93b0; font-size: 17px; }
  body .mobile-system-shell .mobile-system-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 121; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 62px; padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ms-line); background: rgba(255, 255, 255, .97); box-shadow: 0 -5px 20px rgba(19, 50, 78, .06); }
  body .mobile-system-shell .mobile-system-bottom-nav .mobile-system-bottom-nav-item { position: relative; display: grid; min-width: 0; min-height: 50px; place-items: center; align-content: center; gap: 1px; padding: 3px 2px; border: 0; border-radius: 9px; color: #718398; background: transparent; font-size: 10px; }
  body .mobile-system-shell .mobile-system-bottom-nav .mobile-system-bottom-nav-item.active { color: var(--ms-brand-dark); background: #e9f5f3; font-weight: 750; }
  body .mobile-system-shell .mobile-system-bottom-nav .mobile-system-bottom-nav-item b { position: absolute; top: 0; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; color: #fff; background: #c9343e; font-size: 10px; line-height: 16px; }
  body .mobile-system-shell #tabBar:not(.mobile-nav-expanded) { display: none !important; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded { position: fixed; top: 10px !important; right: 10px !important; bottom: auto !important; left: 10px !important; width: auto !important; height: calc(100vh - 20px) !important; min-height: 0 !important; max-height: calc(100vh - 20px) !important; z-index: 130 !important; display: block !important; overflow: auto !important; box-sizing: border-box; margin: 0; padding: 12px 12px 18px; border: 1px solid #d9e3ee; border-radius: 16px; background: #fff; box-shadow: 0 16px 34px rgba(31, 52, 78, .22); }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .desktop-sidebar-brand { display: none; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .mobile-system-drawer-head { display: flex; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tab-group { min-width: 0; margin: 0; padding: 6px 0; border: 0; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tab-group-title { padding: 8px 2px 5px; color: #74849a; font-size: 11px; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tabs button,
  body .mobile-system-shell #tabBar.mobile-nav-expanded button { width: 100%; min-height: 42px; text-align: left; }
  body .mobile-system-shell .mobile-system-drawer-head { display: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 7px; padding: 2px 1px 10px; border-bottom: 1px solid #edf1f5; }
  body .mobile-system-shell .mobile-system-drawer-head > div:first-child { min-width: 0; flex: 1 1 auto; }
  body .mobile-system-shell .mobile-system-drawer-head strong { display: block; color: #183454; font-size: 16px; }
  body .mobile-system-shell .mobile-system-drawer-head small { display: block; margin-top: 2px; color: #718398; font-size: 11px; }
  body .mobile-system-shell .mobile-system-drawer-close { width: 38px; min-width: 38px; min-height: 38px; padding: 0; border: 0; border-radius: 9px; color: #58718a; background: #f1f5f9; font-size: 22px; line-height: 1; }
  body .mobile-system-shell .mobile-system-drawer-tools { display: grid; flex: 1 1 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-top: 2px; }
  body .mobile-system-shell .mobile-system-drawer-tools button { min-height: 36px; padding: 6px 5px; border: 1px solid #dbe5ef; border-radius: 8px; color: #315984; background: #f7fafd; font-size: 11px; }
  body .mobile-system-shell .mobile-client-card-list { display: grid; gap: 10px; }
  body .mobile-system-shell .mobile-client-card { display: grid; gap: 10px; padding: 13px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .mobile-client-card.dashboard-highlight-row { border-color: #8fc8be; box-shadow: 0 0 0 2px rgba(31, 143, 123, .08); }
  body .mobile-system-shell .mobile-client-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  body .mobile-system-shell .mobile-client-card-title { min-width: 0; display: grid; gap: 3px; }
  body .mobile-system-shell .mobile-client-card-title strong { color: #173b5e; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
  body .mobile-system-shell .mobile-client-card-title span,
  body .mobile-system-shell .mobile-client-card-meta { color: #718398; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
  body .mobile-system-shell .mobile-client-card-badges { display: flex; flex: 0 0 auto; max-width: 46%; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  body .mobile-system-shell .mobile-client-card-badges .badge { margin: 0; white-space: nowrap; }
  body .mobile-system-shell .mobile-client-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 9px; border-bottom: 1px solid #edf1f5; }
  body .mobile-system-shell .mobile-client-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  body .mobile-system-shell .mobile-client-card-grid > div { min-width: 0; display: grid; gap: 3px; padding: 8px; border-radius: 8px; background: #f6f9fc; }
  body .mobile-system-shell .mobile-client-card-grid small { color: #718398; font-size: 10px; }
  body .mobile-system-shell .mobile-client-card-grid b { color: #1b466e; font-size: 13px; overflow-wrap: anywhere; }
  body .mobile-system-shell .mobile-client-card-grid span { color: #6b8094; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
  body .mobile-system-shell .mobile-client-card-alert { display: flex; flex-wrap: wrap; gap: 4px; }
  body .mobile-system-shell .mobile-client-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  body .mobile-system-shell .mobile-client-card-actions .tiny { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell .mobile-client-detail-row { padding-top: 2px; border-top: 1px solid #e8eef4; }
  body .mobile-system-shell .mobile-client-detail-row .client-detail-panel { margin-top: 8px; }
  body .mobile-system-shell .mobile-client-card .client-row-more { width: 100%; }
  body .mobile-system-shell .mobile-client-card .client-row-more-menu { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 7px; }
  body .mobile-system-shell .project-contract-list-panel .table-scroll { overflow: visible; border: 0; background: transparent; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-board-table { display: block; width: 100%; min-width: 0; border-collapse: separate; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-board-table thead { display: none; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-board-table tbody { display: grid; gap: 10px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-board-table .project-contract-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .project-contract-list-panel .project-contract-board-table .project-contract-row.dashboard-highlight-row { border-color: #8fc8be; box-shadow: 0 0 0 2px rgba(31, 143, 123, .08); }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td { display: none; min-width: 0; padding: 0; border: 0; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(2),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(3),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(4),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(6),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(7),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(9),
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) { display: block; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 15px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; color: #61768c; font-size: 11px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 9px; padding: 8px; border-radius: 8px; background: #f6f9fc; color: #315984; font-size: 12px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; display: grid; gap: 3px; color: #b04b32; font-size: 11px; line-height: 1.4; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(9) { grid-column: 1 / -1; grid-row: 5; display: flex; justify-content: space-between; gap: 8px; color: #61768c; font-size: 11px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) { grid-column: 1 / -1; grid-row: 6; padding-top: 2px; border-top: 1px solid #edf1f5; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) .tiny { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-detail-row { display: block; margin: -2px 0 0; padding: 0; border: 0; }
  body .mobile-system-shell .project-contract-list-panel .project-contract-detail-row > td { display: block; padding: 0; border: 0; }
  body .mobile-system-shell .quote-list-panel .table-scroll { overflow: visible; border: 0; background: transparent; }
  body .mobile-system-shell .quote-list-panel .quote-list-table { display: block; width: 100%; min-width: 0; border-collapse: separate; }
  body .mobile-system-shell .quote-list-panel .quote-list-table thead { display: none; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody { display: grid; gap: 10px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id].dashboard-highlight-row { border-color: #8fc8be; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td { display: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(2),
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(3),
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(5),
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(6),
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) { display: block; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; color: #61768c; font-size: 11px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; font-size: 11px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 8px; border-radius: 8px; background: #f6f9fc; color: #315984; font-size: 11px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; padding-top: 8px; border-top: 1px solid #edf1f5; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) .tiny { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr.client-detail-row { display: block; padding: 0; border: 0; box-shadow: none; background: transparent; }
  body .mobile-system-shell .quote-list-panel .quote-list-table tbody > tr.client-detail-row > td { display: block; padding: 0; border: 0; }
  body .mobile-system-shell .maintenance-project-table-wrap { overflow: visible; }
  body .mobile-system-shell .maintenance-project-table { display: block; width: 100%; min-width: 0; }
  body .mobile-system-shell .maintenance-project-table thead { display: none; }
  body .mobile-system-shell .maintenance-project-table tbody { display: grid; gap: 10px; }
  body .mobile-system-shell .maintenance-project-table tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td { display: none; min-width: 0; padding: 0; border: 0; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(1),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(2),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(3),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(4),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(5),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(6) { display: block; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(2) { grid-column: 1; grid-row: 2; color: #61768c; font-size: 11px; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(3),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(4),
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(5) { grid-column: 1 / -1; font-size: 11px; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  body .mobile-system-shell .maintenance-project-table tbody > tr > td:nth-child(6) .tiny { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell .maintenance-record-table-wrap { overflow: visible; }
  body .mobile-system-shell .maintenance-record-table-wrap > table { display: block; width: 100%; min-width: 0; }
  body .mobile-system-shell .maintenance-record-table-wrap > table thead { display: none; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody { display: grid; gap: 10px; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td { display: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(3),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(4),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(5),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(6),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(9),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(10),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(12),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(13) { display: block; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(3) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(12) { grid-column: 2; grid-row: 1; text-align: right; font-size: 11px; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(4),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(5),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(6),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(9),
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(10) { grid-column: 1 / -1; font-size: 11px; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(13) { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid #edf1f5; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(13) .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr:not(.maintenance-detail-row) > td:nth-child(13) .tiny { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr.maintenance-detail-row { display: block; padding: 0; border: 0; background: transparent; }
  body .mobile-system-shell .maintenance-record-table-wrap > table tbody > tr.maintenance-detail-row > td { display: block; padding: 0; border: 0; }
  body .mobile-finance-sheet[hidden] { display: none !important; }
  body .mobile-finance-sheet { position: fixed; inset: 0; z-index: 140; display: grid; align-items: end; }
  body .mobile-finance-sheet-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(18, 38, 60, .42); }
  body .mobile-finance-sheet-card { position: relative; width: 100%; max-height: min(76vh, 620px); overflow: auto; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -16px 36px rgba(14, 39, 62, .18); }
  body .mobile-finance-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  body .mobile-finance-sheet-head strong { display: block; color: #173b5e; font-size: 18px; }
  body .mobile-finance-sheet-head small { display: block; margin-top: 3px; color: #718398; font-size: 11px; }
  body .mobile-finance-sheet-close { width: 38px; min-width: 38px; height: 38px; border: 0; border-radius: 9px; color: #58718a; background: #f1f5f9; font-size: 22px; line-height: 1; }
  body .mobile-finance-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  body .mobile-finance-sheet-item { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 12px; border: 1px solid #dce6f0; border-radius: 10px; color: #315984; background: #f7fafd; font-size: 13px; font-weight: 650; text-align: left; }
  body .mobile-finance-sheet-item:active { background: #e9f5f3; }
  body .mobile-finance-sheet-item b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; color: #fff; background: #c9343e; font-size: 10px; line-height: 18px; text-align: center; }
}

/* Final mobile product shell: four work areas and one focused action per page. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body .mobile-system-shell .topbar-product { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
  body .mobile-system-shell .topbar-product .mobile-app-back { display: grid; place-items: center; width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 10px; color: #1f5b75; background: #eaf6f3; font-size: 26px; line-height: 1; }
  body .mobile-system-shell .topbar-product .mobile-app-back:not(.visible) { color: #fff; background: #0f766e; font-size: 14px; font-weight: 800; }
  body .mobile-system-shell .mobile-app-topbar-copy { min-width: 0; display: grid; gap: 0; }
  body .mobile-system-shell .mobile-app-topbar-copy strong { overflow: hidden; color: #173b5e; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  body .mobile-system-shell .mobile-app-topbar-copy small { color: #7b8da1; font-size: 10px; line-height: 1.25; }
  body .mobile-system-shell .topbar .meta,
  body .mobile-system-shell .topbar .actions,
  body .mobile-system-shell .desktop-page-heading { display: none !important; }
  body .mobile-system-shell #content.mobile-system-content { padding-top: 12px; }
  body .mobile-system-shell .mobile-hub { display: grid; gap: 12px; padding-bottom: 10px; }
  body .mobile-system-shell .mobile-hub-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 2px 2px; }
  body .mobile-system-shell .mobile-hub-eyebrow { display: block; margin-bottom: 5px; color: #6b7f96; font-size: 11px; letter-spacing: .05em; }
  body .mobile-system-shell .mobile-hub-header h1 { margin: 0; color: #153653; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
  body .mobile-system-shell .mobile-hub-header p { margin: 5px 0 0; color: #718398; font-size: 11px; }
  body .mobile-system-shell .mobile-hub-profile { display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 13px; background: #173b5e; color: #fff; font-size: 16px; font-weight: 750; }
  body .mobile-system-shell .mobile-hub-panel { display: grid; gap: 10px; padding: 13px; border: 1px solid #dce6f0; border-radius: 15px; background: #fff; box-shadow: 0 4px 15px rgba(29, 58, 88, .04); }
  body .mobile-system-shell .mobile-hub-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  body .mobile-system-shell .mobile-hub-panel-head span { display: block; color: #75879b; font-size: 10px; }
  body .mobile-system-shell .mobile-hub-panel-head h2 { margin: 2px 0 0; color: #173b5e; font-size: 16px; line-height: 1.25; }
  body .mobile-system-shell .mobile-hub-panel-head small { color: #93a1b1; font-size: 10px; }
  body .mobile-system-shell .mobile-hub-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body .mobile-system-shell .mobile-hub-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 12px; align-items: center; gap: 8px; width: 100%; min-height: 62px; padding: 9px 9px 9px 8px; border: 1px solid #dce6f0; border-radius: 12px; background: #fbfdff; color: #1b3858; text-align: left; }
  body .mobile-system-shell .mobile-hub-card:active { background: #f0f9f7; }
  body .mobile-system-shell .mobile-hub-card.emphasis { border-color: #b9ded8; background: #f1fbf8; }
  body .mobile-system-shell .mobile-hub-card.warn { border-color: #efd0d0; background: #fff8f7; }
  body .mobile-system-shell .mobile-hub-card-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eaf2fb; color: #2463a4; font-size: 13px; font-weight: 800; }
  body .mobile-system-shell .mobile-hub-card.emphasis .mobile-hub-card-icon { background: #d9f1eb; color: #0f766e; }
  body .mobile-system-shell .mobile-hub-card.warn .mobile-hub-card-icon { background: #ffe8e5; color: #b7434e; }
  body .mobile-system-shell .mobile-hub-card-copy { min-width: 0; display: grid; gap: 2px; }
  body .mobile-system-shell .mobile-hub-card-copy strong { overflow: hidden; color: #1b3659; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  body .mobile-system-shell .mobile-hub-card-copy small { overflow: hidden; color: #76869a; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  body .mobile-system-shell .mobile-hub-card-count { min-width: 20px; padding: 2px 5px; border-radius: 10px; color: #2b679f; background: #edf4fc; font-size: 11px; line-height: 17px; text-align: center; }
  body .mobile-system-shell .mobile-hub-card.warn .mobile-hub-card-count { color: #fff; background: #c94250; }
  body .mobile-system-shell .mobile-hub-card-arrow { color: #9aacbd; font-size: 20px; line-height: 1; }
  body .mobile-system-shell .mobile-hub-today { background: linear-gradient(135deg, #f4fbfa, #fff); }
  body .mobile-system-shell .mobile-hub-focus-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body .mobile-system-shell .mobile-hub-focus { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px; border: 1px solid #dce6f0; border-radius: 11px; background: #fff; text-align: left; }
  body .mobile-system-shell .mobile-hub-focus b { grid-row: 1 / span 2; align-self: center; color: #0f766e; font-size: 24px; line-height: 1; }
  body .mobile-system-shell .mobile-hub-focus span { color: #244564; font-size: 12px; font-weight: 700; }
  body .mobile-system-shell .mobile-hub-focus small { color: #7a8ca0; font-size: 10px; }
  body .mobile-system-shell .mobile-hub-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body .mobile-system-shell .mobile-hub-service-grid .mobile-hub-card { min-height: 58px; }
  body .mobile-system-shell .mobile-hub-page-title { padding: 4px 2px 2px; }
  body .mobile-system-shell .mobile-hub-page-title > span { color: #718398; font-size: 11px; }
  body .mobile-system-shell .mobile-hub-page-title h1 { margin: 2px 0 3px; color: #173b5e; font-size: 22px; line-height: 1.25; }
  body .mobile-system-shell .mobile-hub-page-title p { margin: 0; color: #76869a; font-size: 11px; }
  body .mobile-system-shell .mobile-hub-card-list { display: grid; gap: 8px; }
}

/* Attendance is a phone action screen: choose one action, then confirm location. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body .mobile-system-shell .attendance-page { padding-bottom: 24px; }
  body .mobile-system-shell .attendance-page > h3 { margin-bottom: 10px; font-size: 20px; }
  body .mobile-system-shell .attendance-page > .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  body .mobile-system-shell .attendance-page > .cards .card { min-height: 68px; padding: 10px 8px; }
  body .mobile-system-shell .attendance-page > .cards .card strong { font-size: 18px; }
  body .mobile-system-shell .attendance-summary-line { margin: 9px 0 12px; line-height: 1.45; }
  body .mobile-system-shell .attendance-mobile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body .mobile-system-shell .attendance-mobile-action { display: grid; gap: 3px; min-height: 66px; padding: 10px; border: 1px solid #d8e3ef; border-radius: 12px; background: #f8fbff; color: #1c385b; text-align: left; }
  body .mobile-system-shell .attendance-mobile-action strong { font-size: 14px; line-height: 1.25; }
  body .mobile-system-shell .attendance-mobile-action small { color: #718398; font-size: 10px; line-height: 1.35; }
  body .mobile-system-shell .attendance-mobile-action.selected { border-color: #2aa198; background: #eaf8f5; box-shadow: 0 0 0 2px rgba(42, 161, 152, .1); }
  body .mobile-system-shell .attendance-mobile-action.selected strong { color: #0f766e; }
  body .mobile-system-shell .attendance-project-wrap { display: grid; gap: 5px; padding: 10px; border: 1px solid #bfe2dc; border-radius: 10px; background: #f3fbf9; }
  body .mobile-system-shell .attendance-project-wrap label { color: #0f766e; font-size: 12px; font-weight: 700; }
  body .mobile-system-shell #attForm { gap: 9px; }
  body .mobile-system-shell #attForm .attendance-photo-picker { margin: 0; }
  body .mobile-system-shell #attForm > button[type="submit"] { min-height: 46px; margin-top: 2px; font-size: 15px; font-weight: 750; }
  body .mobile-system-shell .attendance-geo-note { padding: 9px 10px; border-radius: 9px; background: #f4f7fb; color: #5f7390; line-height: 1.45; }
  body .mobile-system-shell .attendance-site-note { margin-top: 0; font-size: 11px; }
  body .mobile-system-shell .attendance-page .attendance-filter-strip { display: none; }
  body .mobile-system-shell .attendance-page .attendance-filter-note { margin-top: 16px; }
  body .mobile-system-shell .attendance-page .table-scroll { overflow: visible; border: 0; background: transparent; }
  body .mobile-system-shell .attendance-page .table-scroll > table { display: block; width: 100%; min-width: 0; border-collapse: separate; }
  body .mobile-system-shell .attendance-page .table-scroll > table thead { display: none; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody { display: grid; gap: 9px; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(29, 58, 88, .05); }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td { display: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(2),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(3),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(4),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(5),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(6),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(8) { display: block; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(8) { grid-column: 2; grid-row: 1; color: #718398; font-size: 10px; text-align: right; white-space: nowrap; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(3),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(4) { grid-row: 2; font-size: 11px; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(3) { grid-column: 1; color: #315984; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(4) { grid-column: 2; text-align: right; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(5),
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(6) { grid-column: 1 / -1; font-size: 11px; color: #61768c; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr:not(.attendance-empty-row) > td:nth-child(6) { padding-top: 7px; border-top: 1px solid #edf1f5; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr.attendance-empty-row { display: block; }
  body .mobile-system-shell .attendance-page .table-scroll > table tbody > tr.attendance-empty-row td { display: block; padding: 18px 10px; }
}

@media (max-width: 420px) {
  body .mobile-system-shell .mobile-client-card-grid { grid-template-columns: minmax(0, 1fr); }
  body .mobile-system-shell .mobile-client-card-badges { max-width: 42%; }
}

/* The mobile home is an app launcher, not a compressed desktop dashboard. */
body .mobile-system-shell .mobile-home-menu {
  display: grid;
  gap: 16px;
  padding: 4px 0 92px;
}
body .mobile-system-shell .mobile-home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 2px;
}
body .mobile-system-shell .mobile-home-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #5f7390;
  font-size: 12px;
  letter-spacing: .04em;
}
body .mobile-system-shell .mobile-home-header h1 {
  margin: 0;
  color: #172f50;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
body .mobile-system-shell .mobile-home-header p { margin: 5px 0 0; color: #6e7f95; font-size: 12px; line-height: 1.5; }
body .mobile-system-shell .mobile-home-status { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #b8d9d5; border-radius: 999px; background: #f2fbfa; color: #16756e; font-size: 12px; white-space: nowrap; }
body .mobile-system-shell .mobile-menu-section { display: grid; gap: 9px; }
body .mobile-system-shell .mobile-menu-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; }
body .mobile-system-shell .mobile-menu-section-head h2 { margin: 0; color: #1d385c; font-size: 16px; line-height: 1.3; }
body .mobile-system-shell .mobile-menu-section-head span { color: #8795a7; font-size: 11px; }
body .mobile-system-shell .mobile-menu-list { display: grid; gap: 8px; }
body .mobile-system-shell .mobile-menu-entry { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px 10px 10px; border: 1px solid #d9e3ef; border-radius: 14px; background: #fff; color: #1c385b; text-align: left; box-shadow: 0 2px 6px rgba(28, 56, 91, .04); transition: transform .15s ease, border-color .15s ease, background .15s ease; }
body .mobile-system-shell .mobile-menu-entry:active { transform: scale(.985); border-color: #9ebce0; background: #f7faff; }
body .mobile-system-shell .mobile-menu-entry.warn { border-color: #efd1d1; }
body .mobile-system-shell .mobile-menu-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #edf4fc; color: #2061a2; font-size: 15px; font-weight: 700; }
body .mobile-system-shell .mobile-menu-entry.warn .mobile-menu-icon { background: #fff0f0; color: #b7434e; }
body .mobile-system-shell .mobile-menu-copy { min-width: 0; display: grid; gap: 3px; }
body .mobile-system-shell .mobile-menu-copy strong { overflow: hidden; color: #1b3659; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
body .mobile-system-shell .mobile-menu-copy small { overflow: hidden; color: #76869a; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
body .mobile-system-shell .mobile-menu-count { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #edf4fc; color: #26609a; font-size: 12px; line-height: 1.2; text-align: center; }
body .mobile-system-shell .mobile-menu-count.warn { background: #c94250; color: #fff; }
body .mobile-system-shell .mobile-menu-arrow { color: #9aabbd; font-size: 22px; line-height: 1; text-align: right; }
body .mobile-system-shell .mobile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body .mobile-system-shell .mobile-section-head h3 { margin: 0; color: #173b5e; font-size: 16px; }
body .mobile-system-shell .mobile-section-head p { margin: 3px 0 0; font-size: 11px; }
body .mobile-system-shell .mobile-action-panel { padding: 12px; }
body .mobile-system-shell .task-dispatch-form.execution-form-collapsed { display: none !important; }
body .mobile-system-shell .task-list-filter-form.mobile-filter-collapsed { display: none !important; }
body .mobile-system-shell .task-board-filters { margin: 12px 0 10px; overflow-x: auto; flex-wrap: nowrap; }
body .mobile-system-shell .task-board-filters .task-board-filter { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; font-size: 12px; }
body .mobile-system-shell .project-contract-overview-panel { display: none; }
body .mobile-system-shell .project-contract-list-panel #toggleProjectContractTable { display: none; }
body .mobile-system-shell .project-contract-list-panel .section-head-note { display: none; }
body .mobile-system-shell .project-contract-page-shell > .page-hero { padding: 4px 0 2px; border: 0; background: transparent; box-shadow: none; }
body .mobile-system-shell .project-contract-page-shell > .page-hero .page-hero-subtitle { display: none; }
body .mobile-system-shell .project-contract-page-shell > .page-hero .page-hero-title { font-size: 20px; }
body .mobile-system-shell .project-contract-filters { margin: 8px 0 12px; }
body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(6) { display: none !important; }
body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(7) { max-height: 32px; overflow: hidden; }
body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) .close-contract,
body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) .del-project,
body .mobile-system-shell .project-contract-list-panel .project-contract-row > td:nth-child(10) .restore-project { display: none !important; }
body .mobile-system-shell .client-create-panel:not(.is-open) { display: none !important; }
body .mobile-system-shell .client-filter-grid.mobile-filter-collapsed { display: none !important; }
body .mobile-system-shell .mobile-form-collapsed { display: none !important; }
body .mobile-system-shell .purchase-overview-panel { display: none; }
body .mobile-system-shell .fund-overview-panel { display: none; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) { display: flex; flex-direction: column; gap: 10px; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) > .page-hero { order: 0; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) > .fund-list-panel { order: 1; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) > .fund-invoice-panel { order: 2; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) > .fund-history-panel { order: 3; }
body .mobile-system-shell .page-shell:has(> .fund-list-panel) > .fund-create-panel { order: 4; }
body .mobile-system-shell .fund-list-panel .fund-request-filter-strip.mobile-filter-collapsed { display: none !important; }
body .mobile-system-shell .fund-list-panel .table-scroll { overflow: visible; }
body .mobile-system-shell .fund-list-panel .table-scroll > table { display: block; min-width: 0 !important; width: 100%; border-collapse: separate; }
body .mobile-system-shell .fund-list-panel .table-scroll > table thead { display: none; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody { display: grid; gap: 10px; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(29, 58, 88, .05); }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td { display: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(2),
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(3),
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(5),
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(6),
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(7) { display: block; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #315984; font-size: 12px; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(3) { grid-column: 2; grid-row: 1; color: #173b5e; font-size: 15px; font-weight: 750; text-align: right; white-space: nowrap; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(5) { grid-column: 1 / -1; grid-row: 2; color: #647990; font-size: 11px; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; color: #1d456d; font-size: 13px; font-weight: 700; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; padding-top: 8px; border-top: 1px solid #edf1f5; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(7) .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
body .mobile-system-shell .fund-list-panel .table-scroll > table tbody > tr[data-row-id] > td:nth-child(7) .tiny { min-height: 34px; padding: 7px 10px; }
@media (max-width: 350px) {
  body .mobile-system-shell .mobile-home-header h1 { font-size: 20px; }
  body .mobile-system-shell .mobile-menu-entry { grid-template-columns: 34px minmax(0, 1fr) auto 12px; gap: 8px; padding-right: 8px; }
  body .mobile-system-shell .mobile-menu-icon { width: 34px; height: 34px; border-radius: 10px; }
}

/* Materials use cards and on-demand forms on a phone. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body .mobile-system-shell #material-create-section,
  body .mobile-system-shell #material-usage-section,
  body .mobile-system-shell #material-return-form-section { scroll-margin-top: 12px; }
  body .mobile-system-shell .material-mobile-form-toggle { min-height: 34px; padding: 7px 10px; }
  body .mobile-system-shell #material-stock-table-section .material-filter-strip,
  body .mobile-system-shell #material-usage-table-section .usage-record-filter-strip,
  body .mobile-system-shell #material-flow-section .material-flow-filter-strip { gap: 7px; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table,
  body .mobile-system-shell #material-usage-table-section > table,
  body .mobile-system-shell #material-return-table-section table,
  body .mobile-system-shell #material-flow-section .material-flow-table { display: block; width: 100%; min-width: 0; border-collapse: separate; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table thead,
  body .mobile-system-shell #material-usage-table-section > table thead,
  body .mobile-system-shell #material-return-table-section table thead,
  body .mobile-system-shell #material-flow-section .material-flow-table thead { display: none; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody,
  body .mobile-system-shell #material-usage-table-section > table tbody,
  body .mobile-system-shell #material-return-table-section table tbody,
  body .mobile-system-shell #material-flow-section .material-flow-table tbody { display: grid; gap: 9px; }

  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row,
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row,
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row,
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px;
    padding: 12px; border: 1px solid #dce6f0; border-radius: 12px; background: #fff;
    box-shadow: 0 3px 12px rgba(29, 58, 88, .05); min-width: 0;
  }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td,
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td,
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td,
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td {
    display: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere;
  }

  /* inventory: name, management mode, stock/status, actions */
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(2),
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(5),
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(7),
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(9),
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(11) { display: block; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(5) { grid-column: 1 / -1; grid-row: 2; color: #657990; font-size: 11px; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(7) { grid-column: 1; grid-row: 3; color: #1d456d; font-size: 16px; font-weight: 750; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(9) { grid-column: 2; grid-row: 3; align-self: center; color: #a45a20; font-size: 11px; text-align: right; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(11) { grid-column: 1 / -1; grid-row: 4; padding-top: 8px; border-top: 1px solid #edf1f5; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row > td:nth-child(11) .material-action-group,
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(8) .table-action-group,
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(8) .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-row .tiny,
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row .tiny,
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row .tiny { min-height: 34px; padding: 7px 10px; }

  /* usage and return history: identify the record by material and current state */
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(2),
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(3),
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(4),
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(6),
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(7),
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(8),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(3),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(4),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(6),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(7),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(8) { display: block; }
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(2),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(3) { grid-column: 1; grid-row: 1; color: #61768c; font-size: 11px; }
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(4),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(6),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; padding: 8px; border-radius: 8px; background: #f6f9fc; color: #315984; font-size: 12px; }
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(7),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(7) { grid-column: 2; grid-row: 1; color: #a45a20; font-size: 11px; text-align: right; }
  body .mobile-system-shell #material-usage-table-section > table tbody > tr.material-usage-row > td:nth-child(8),
  body .mobile-system-shell #material-return-table-section table tbody > tr.material-return-row > td:nth-child(8) { grid-column: 1 / -1; grid-row: 4; padding-top: 8px; border-top: 1px solid #edf1f5; }

  /* flow history is available on demand and each row remains readable without horizontal scrolling */
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(1),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(2),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(3),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(4),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(5),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(6) { display: block; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(1) { grid-column: 2; grid-row: 1; color: #718398; font-size: 10px; text-align: right; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(2) { grid-column: 1; grid-row: 1; color: #a45a20; font-size: 11px; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; color: #173b5e; font-size: 14px; font-weight: 750; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; color: #61768c; font-size: 11px; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(5),
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(6) { grid-row: 4; padding: 7px 8px; border-radius: 8px; background: #f6f9fc; color: #315984; font-size: 12px; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(5) { grid-column: 1; }
  body .mobile-system-shell #material-flow-section .material-flow-table tbody > tr.material-flow-row > td:nth-child(6) { grid-column: 2; text-align: right; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-detail-row { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; }
  body .mobile-system-shell #material-stock-table-section .material-inventory-table tbody > tr.material-detail-row > td { display: block; padding: 0; border: 0; }
}

/* 396: phone shell only; individual business screens are audited separately. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body.mobile-ui-active {
    --brand: #175fc6; --brand-dark: #124b9c;
    background: #f3f6fa;
  }
  body .mobile-system-shell#mainView {
    --ms-brand: #175fc6; --ms-brand-dark: #124b9c;
    display: block; width: 100%; max-width: none; min-width: 0;
    margin: 0; padding: 0; border: 0;
  }
  body .mobile-system-shell .mobile-system-topbar {
    margin: 0; padding: max(6px, env(safe-area-inset-top)) 12px 6px;
    min-height: 56px; border: 0; border-bottom: 1px solid var(--ms-line);
    border-radius: 0; box-shadow: none; flex-wrap: nowrap;
  }
  body .mobile-system-shell .topbar-main { width: 100%; min-width: 0; }
  body .mobile-system-shell .topbar-product { width: 100%; gap: 8px; }
  body .mobile-system-shell .mobile-app-topbar-copy { flex: 1 1 auto; }
  body .mobile-system-shell .topbar-product .mobile-app-back {
    width: 44px; min-width: 44px; min-height: 44px; height: 44px; margin: 0; border-radius: 8px;
    color: #175fc6; background: #eef4fd;
  }
  body .mobile-system-shell .topbar-product .mobile-app-back:not(.visible) { background: #175fc6; color: #fff; }
  body .mobile-system-shell .topbar-product .mobile-app-menu {
    width: auto; flex: 0 0 auto; min-height: 44px; margin: 0; padding: 8px 12px;
    font-size: 14px; border-radius: 8px; color: #175fc6; background: #fff; border: 1px solid #dce5ef;
  }
  body .mobile-system-shell .mobile-app-topbar-copy strong { font-size: 16px; }
  body .mobile-system-shell .mobile-app-topbar-copy small { font-size: 11px; }
  body .mobile-system-shell #content.mobile-system-content { padding: 12px 10px calc(76px + env(safe-area-inset-bottom)); }
  body .mobile-system-shell .mobile-system-bottom-nav {
    display: grid !important;
    width: 100%; max-width: none; left: 0; right: 0; transform: none;
    min-height: 60px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px #20344b0a;
  }
  body .mobile-system-shell .mobile-system-bottom-nav .mobile-system-bottom-nav-item { min-height: 50px; margin: 0; font-size: 12px; }
  body .mobile-system-shell .mobile-system-bottom-nav .mobile-system-bottom-nav-item.active { background: #eef4fd; color: #175fc6; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded {
    top: max(8px, env(safe-area-inset-top)) !important; left: 8px !important; right: 8px !important;
    height: min(calc(100dvh - 16px), calc(var(--mobile-visible-height, 100dvh) - 16px)) !important;
    max-height: min(calc(100dvh - 16px), calc(var(--mobile-visible-height, 100dvh) - 16px)) !important;
    padding: 0 12px 16px; border-radius: 12px; overscroll-behavior: contain;
  }
  body .mobile-system-shell #tabBar .mobile-system-drawer-head {
    position: sticky; top: 0; z-index: 1; padding: 12px 0 10px; margin: 0;
    background: #fff; gap: 8px;
  }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .mobile-system-drawer-close {
    width: 44px; min-width: 44px; height: 44px; min-height: 44px;
    text-align: center; padding: 0; margin: 0;
  }
  body .mobile-system-shell .mobile-system-drawer-search { flex: 1 0 100%; margin: 0; font-weight: 400; }
  body .mobile-system-shell .mobile-system-drawer-search input {
    height: 44px; min-height: 44px; margin: 0; font-size: 16px; border-radius: 8px;
  }
  body .mobile-system-shell .mobile-system-drawer-tools { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .mobile-system-drawer-tools button {
    width: auto; flex: 1 1 auto; min-height: 36px; padding: 5px 8px; margin: 0; font-size: 12px; text-align: center;
  }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tab-group {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px;
    margin: 0; padding: 10px 0 0; white-space: normal;
  }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tab-group[hidden],
  body .mobile-system-shell #tabBar.mobile-nav-expanded button[data-tab][hidden] { display: none !important; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded .tab-group-title { grid-column: 1 / -1; margin: 0; padding: 0; font-size: 13px; }
  body .mobile-system-shell #tabBar.mobile-nav-expanded button[data-tab] {
    display: flex; justify-content: space-between; align-items: center; gap: 4px; min-width: 0;
    min-height: 44px; margin: 0; padding: 8px; border: 1px solid #dce5ef; border-radius: 8px;
    font-size: 13px; color: #20344b; background: #f8fafc; white-space: normal;
  }
  body .mobile-system-shell #tabBar.mobile-nav-expanded button[data-tab].active { color: #175fc6; border-color: #a8c6ed; background: #eef4fd; }
  body .mobile-system-shell [data-mobile-menu-empty] { margin: 14px 0; color: #64748b; font-size: 14px; }
}

/* 397: phone dashboard only */
@media (max-width:768px), (hover:none) and (pointer:coarse) and (max-width:1024px) {
 body .mobile-system-shell .mobile-hub {gap:10px;padding:0 0 12px;min-width:0}
 body .mobile-system-shell .mobile-hub [hidden] {display:none!important}
 body .mobile-system-shell .mobile-hub-header {align-items:center;padding:0 2px}
 body .mobile-system-shell .mobile-hub-header h1 {font-size:16px;line-height:1.4;overflow-wrap:anywhere}
 body .mobile-system-shell .mobile-hub-header p {font-size:12px;margin-top:2px}
 body .mobile-system-shell .mobile-hub-profile {min-width:48px;width:auto;height:44px;min-height:44px;margin:0;padding:0 8px;border:1px solid #d4e0ee;border-radius:8px;background:#fff;color:#175fc6;font-size:14px}
 body .mobile-system-shell .mobile-hub-panel {gap:10px;padding:12px;border-radius:10px;box-shadow:none;min-width:0}
 body .mobile-system-shell .mobile-hub-panel-head {align-items:center;flex-wrap:wrap;gap:8px}
 body .mobile-system-shell .mobile-hub-panel-head h2,body .mobile-system-shell .mobile-hub-workflows h2 {font-size:15px;line-height:1.4;margin:0}
 body .mobile-system-shell .mobile-hub button {margin:0;min-height:44px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
 body .mobile-system-shell .mobile-hub .secondary {width:auto;min-width:44px;padding:8px 10px;border-radius:7px}
 body .mobile-system-shell .mobile-hub-card {grid-template-columns:28px minmax(0,1fr) 10px;gap:8px;padding:10px;min-height:68px;border-radius:8px}
 body .mobile-system-shell .mobile-hub-card:has(.mobile-hub-card-count) {grid-template-columns:28px minmax(0,1fr) auto 10px}
 body .mobile-system-shell .mobile-hub-card-icon {width:28px;height:28px;border-radius:7px}
 body .mobile-system-shell .mobile-hub-card-copy strong {font-size:14px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.4}
 body .mobile-system-shell .mobile-hub-card-copy small {font-size:12px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.5}
 body .mobile-system-shell .mobile-hub-quick-grid {gap:8px}
 body .mobile-system-shell .mobile-hub-quick-grid .mobile-hub-card {grid-template-columns:28px minmax(0,1fr);align-items:start;padding:10px 8px;min-height:80px}
 body .mobile-system-shell .mobile-hub-quick-grid .mobile-hub-card-arrow {display:none}
 body .mobile-system-shell .mobile-hub-workflow-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body .mobile-system-shell [data-mobile-home-followups] {display:grid;gap:10px;min-width:0}
 body .mobile-system-shell [data-mobile-home-followups] .is-empty {background:#f8fafc}
 body .mobile-system-shell [data-mobile-home-followups] .is-empty h2 {color:#62758b;font-size:13px;font-weight:400}
 body .mobile-system-shell .mobile-hub .purchase-arrival-reminders {margin:0;padding:12px;border-radius:10px}
 body .mobile-system-shell [data-mobile-home-followups] .purchase-arrival-reminders-host.is-empty .purchase-arrival-header {align-items:center;flex-wrap:wrap;gap:8px}
 body .mobile-system-shell [data-mobile-home-followups] .purchase-arrival-reminders-host.is-empty .purchase-arrival-header p,
 body .mobile-system-shell [data-mobile-home-followups] .purchase-arrival-reminders-host.is-empty .purchase-arrival-empty {display:none}
 body .mobile-system-shell [data-mobile-home-followups] .purchase-arrival-reminders-host.is-empty .purchase-arrival-header h3 {font-size:13px;font-weight:400;color:#62758b}
 body .mobile-system-shell [data-mobile-home-followups] .purchase-arrival-reminders-host.is-empty .purchase-arrival-tools {margin:0}
 body .mobile-system-shell .mobile-hub .purchase-arrival-row {min-width:0;overflow-wrap:anywhere}
 body .mobile-system-shell .mobile-hub .purchase-arrival-actions {flex-wrap:wrap}
 body:has(.mobile-hub) .cw-modal {position:fixed;inset:0;z-index:160;display:flex!important;align-items:center;justify-content:center;padding:8px!important;background:#15263b88;color:#20344b;box-sizing:border-box;height:var(--mobile-visible-height,100dvh)}
 body:has(.mobile-hub) .cw-modal .cw-shell {display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(var(--mobile-visible-height,100dvh) - 16px);min-width:0;overflow:hidden;background:#fff;border-radius:12px}
 body:has(.mobile-hub) .cw-modal .cw-header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-bottom:1px solid #dce5ef;flex:none}
 body:has(.mobile-hub) .cw-modal .cw-header h2 {font-size:17px;margin:2px 0;line-height:1.4}
 body:has(.mobile-hub) .cw-modal .cw-kicker {font-size:12px;color:#62758b}
 body:has(.mobile-hub) .cw-modal button {width:auto;min-height:44px;margin:0;padding:8px 12px;font-size:14px;line-height:1.4;border-radius:7px;white-space:normal;overflow-wrap:anywhere}
 body:has(.mobile-hub) .cw-modal .cw-header button {flex:none;background:#f5f8fc;border:1px solid #d4e0ee;color:#175fc6}
 body:has(.mobile-hub) .cw-modal .cw-body {padding:12px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;font-size:14px}
 body:has(.mobile-hub) .cw-modal .cw-message:not(:empty) {padding:10px 12px;border-bottom:1px solid #dce5ef;overflow-wrap:anywhere}
 body:has(.mobile-hub) .cw-modal .cw-error {color:#b42318;background:#fff5f3}
 body:has(.mobile-hub) .cw-modal .cw-body>details {margin:0 0 8px;border:1px solid #dce5ef;border-radius:8px;padding:0 10px}
 body:has(.mobile-hub) .cw-modal summary {min-height:44px;box-sizing:border-box;padding:12px 0;line-height:1.5;cursor:pointer}
 body:has(.mobile-hub) .cw-modal .cw-inbox>div {display:grid;gap:6px;padding:10px 0;border-top:1px solid #e5ebf3;overflow-wrap:anywhere}
 body:has(.mobile-hub) .cw-modal .cw-inbox>div>span {color:#62758b;font-size:12px}
 body:has(.mobile-hub) .cw-modal .cw-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 body:has(.mobile-hub) .cw-modal .cw-field {display:grid;min-width:0;gap:5px;font-size:14px}
 body:has(.mobile-hub) .cw-modal :is(input:not([type=checkbox]),select,textarea) {box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px}
 body:has(.mobile-hub) .cw-modal .cw-footer {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding:12px 0 0;border-top:1px solid #dce5ef}
 body:has(.mobile-hub) .cw-modal button:not([type=submit]) {background:#fff;color:#175fc6;border:1px solid #d4e0ee}
 body:has(.mobile-hub) .cw-modal .cw-actions {display:flex;flex-wrap:wrap;gap:8px;overflow:visible;margin-bottom:12px}
 body:has(.mobile-hub) .cw-modal .cw-detail {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
 body:has(.mobile-hub) .cw-modal .cw-detail>div {min-width:0;overflow-wrap:anywhere}
 body:has(.mobile-hub) .cw-modal .cw-detail dt {font-size:12px;color:#62758b;margin-bottom:4px}
 body:has(.mobile-hub) .cw-modal .cw-detail dd {margin:0;font-size:14px;line-height:1.5;white-space:pre-wrap}
 body:has(.mobile-hub) .cw-modal h3 {font-size:15px;line-height:1.5;margin:12px 0}
 body:has(.mobile-hub) .cw-modal .cw-status {display:inline-block;padding:2px 6px;font-size:12px;font-weight:400;background:#eef4fd;border-radius:4px}
 body:has(.mobile-hub) .bf-modal {z-index:160;padding:8px;height:var(--mobile-visible-height,100dvh)}
 body:has(.mobile-hub) .bf-modal .bf-shell {width:min(680px,100%);height:auto;max-height:calc(var(--mobile-visible-height,100dvh) - 16px);border-radius:12px}
 body:has(.mobile-hub) .bf-modal .bf-header {padding:12px;border-bottom:1px solid #dce5ef}
 body:has(.mobile-hub) .bf-modal h2 {font-size:17px}
 body:has(.mobile-hub) .bf-modal .bf-content {min-height:0;padding:12px}
 body:has(.mobile-hub) .bf-modal .bf-button {min-height:44px;font-size:14px}
 body:has(.mobile-hub) .bf-modal .bf-primary {background:#175fc6;border-color:#175fc6;color:#fff}
 body:has(.mobile-hub) .bf-modal .bf-page-heading {margin-bottom:10px;gap:8px;align-items:center;flex-wrap:wrap}
 body:has(.mobile-hub) .bf-modal .bf-filters {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
 body:has(.mobile-hub) .bf-modal .bf-filters>button {grid-column:1/-1}
 body:has(.mobile-hub) .bf-modal .bf-field {min-width:0;font-size:12px}
 body:has(.mobile-hub) .bf-modal :is(input:not([type=checkbox]),select,textarea) {min-width:0;min-height:44px;font-size:16px}
 body:has(.mobile-hub) .bf-modal .business-list-sort-inline {min-width:0;max-width:100%}
}

/* 398: only the mobile reports workspace, including its own native dialogs. */
@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
  body.mobile-ui-active .report-workspace { padding:12px; margin:0; min-width:0; color:#203b56; font-size:14px; }
  body.mobile-ui-active .report-workspace :is(button,input,select,summary) { box-sizing:border-box; min-height:44px; margin:0; font:inherit; line-height:1.5; }
  body.mobile-ui-active .report-workspace button { width:auto; padding:8px 10px; border:1px solid #d8e3ef; border-radius:7px; background:#fff; color:#235b96; white-space:normal; overflow-wrap:anywhere; }
  body.mobile-ui-active .report-workspace :is(input,select) { width:100%; min-width:0; max-width:100%; padding:8px; background:#fff; border:1px solid #cbd8e6; border-radius:7px; }
  body.mobile-ui-active .report-workspace :is(button,input,select,summary):focus-visible { outline:2px solid #1762c7; outline-offset:2px; }
  body.mobile-ui-active .report-workspace button:disabled { opacity:.5; }
  body.mobile-ui-active .report-workspace .rw-header { display:block; margin:0 0 10px; border:0; }
  body.mobile-ui-active .report-workspace .rw-header h2 { display:none; }
  body.mobile-ui-active .report-workspace .rw-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:3px; border-radius:9px; background:#edf2f8; }
  body.mobile-ui-active .report-workspace .rw-tabs button { min-width:0; padding:7px 3px; border:0; background:transparent; color:#536b85; }
  body.mobile-ui-active .report-workspace .rw-tabs button[aria-current="page"] { color:#145bc3; background:white; font-weight:700; box-shadow:0 1px 4px #203b5620; }
  body.mobile-ui-active .report-workspace .rw-mobile-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:6px; margin-bottom:10px; }
  body.mobile-ui-active .report-workspace .rw-mobile-period { grid-column:1/-1; padding:0; margin:0; border:1px solid #dce5f0; border-radius:7px; background:#f6f9fc; }
  body.mobile-ui-active .report-workspace .rw-mobile-period > summary { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px; cursor:pointer; list-style:none; color:#235b96; }
  body.mobile-ui-active .report-workspace .rw-mobile-period > summary::-webkit-details-marker { display:none; }
  body.mobile-ui-active .report-workspace [data-rw-mobile-range] { color:#334e6d; overflow-wrap:anywhere; }
  body.mobile-ui-active .report-workspace .rw-mobile-tools #rwExplain { grid-column:1; grid-row:2; justify-self:start; padding-left:0; border-color:transparent; font-size:13px; color:#60748c; }
  body.mobile-ui-active .report-workspace .rw-mobile-tools #rwExport { grid-column:2; grid-row:2; }
  body.mobile-ui-active .report-workspace .rw-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:8px; border:0; background:transparent; }
  body.mobile-ui-active .report-workspace .rw-dates label { display:grid; gap:4px; margin:0; min-width:0; font-weight:400; font-size:13px; }
  body.mobile-ui-active .report-workspace .rw-dates input { font-size:14px; }
  body.mobile-ui-active .report-workspace #rwQuery { grid-column:1/-1; background:#155ec5; color:white; }
  body.mobile-ui-active .report-workspace .rw-presets { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
  body.mobile-ui-active .report-workspace .rw-presets button { padding-inline:2px; font-size:13px; }
  body.mobile-ui-active .report-workspace .rw-presets button[aria-pressed="true"] { background:#e7f0ff; color:#145bc3; border-color:#a9c6ec; }
  body.mobile-ui-active .report-workspace #rwPending { color:#926024; margin:8px 0; font-size:13px; }
  body.mobile-ui-active .report-workspace #rwPending:empty, body.mobile-ui-active .report-workspace:has(.rw-mobile-period) .rw-result-head { display:none; }
  body.mobile-ui-active .report-workspace .rw-metric-group { margin:0 0 12px; }
  body.mobile-ui-active .report-workspace h3 { font-size:15px; margin:8px 0; line-height:1.5; }
  body.mobile-ui-active .report-workspace .rw-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  body.mobile-ui-active .report-workspace .rw-metric { position:relative; display:flex; flex-direction:column; align-items:flex-start; min-width:0; gap:5px; padding:10px; text-align:left; background:#f8fafd; }
  body.mobile-ui-active .report-workspace .rw-metric:last-child { grid-column:1/-1; background:#edf4fe; }
  body.mobile-ui-active .report-workspace .rw-metric-label { font-size:13px; color:#526b84; }
  body.mobile-ui-active .report-workspace .rw-metric strong { font-size:21px; font-variant-numeric:tabular-nums; line-height:1.3; overflow-wrap:anywhere; }
  body.mobile-ui-active .report-workspace .rw-currency { font-size:14px; margin-right:3px; }
  body.mobile-ui-active .report-workspace .rw-metric small { font-size:12px; color:#5f738b; }
  body.mobile-ui-active .report-workspace .rw-metric-arrow { position:absolute; right:8px; top:7px; color:#8297ad; }
  body.mobile-ui-active .report-workspace .rw-cash-group .rw-metric:last-child { background:#edf7f6; }
  body.mobile-ui-active .report-workspace .rw-negative { color:#b23b31; }
  body.mobile-ui-active .report-workspace .rw-positive { color:#16776a; }
  body.mobile-ui-active .report-workspace .rw-section-head,body.mobile-ui-active .report-workspace .rw-legend,body.mobile-ui-active .report-workspace .rw-secondary { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; }
  body.mobile-ui-active .report-workspace .rw-legend { font-size:12px; }
  body.mobile-ui-active .report-workspace .rw-trend-desktop { display:none; }
  body.mobile-ui-active .report-workspace .rw-trend-mobile { display:block; }
  body.mobile-ui-active .report-workspace .rw-chart-scroll { overflow:auto; max-width:100%; margin:8px 0; }
  body.mobile-ui-active .report-workspace .rw-chart { display:block; width:700px; max-width:none; height:180px; }
  body.mobile-ui-active .report-workspace .rw-chart-empty { padding:18px 8px; color:#637a92; background:#f7f9fc; border-radius:7px; margin:8px 0; }
  body.mobile-ui-active .report-workspace .rw-secondary { border-top:1px solid #dce5ef; padding-top:10px; }
  body.mobile-ui-active .report-workspace .rw-local-filters,body.mobile-ui-active .report-workspace .project-report-detail-filter-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:8px 0; padding:0; }
  body.mobile-ui-active .report-workspace .rw-local-filters > input[type="search"],body.mobile-ui-active .report-workspace .project-report-detail-filter-strip > input { grid-column:1/-1; }
  body.mobile-ui-active .report-workspace .rw-local-filters label { display:flex; align-items:center; gap:6px; min-height:44px; margin:0; font-weight:400; }
  body.mobile-ui-active .report-workspace .rw-local-filters label:has(select) { display:grid; font-size:13px; }
  body.mobile-ui-active .report-workspace input[type="checkbox"] { width:20px; min-height:20px; height:20px; flex:none; }
  body.mobile-ui-active .report-workspace .rw-outstanding-filter { grid-column:1/-1; }
  body.mobile-ui-active .report-workspace .rw-project-list-head { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:10px 0; font-size:13px; }
  body.mobile-ui-active .report-workspace .rw-project-list-head > span:nth-child(2) { order:3; flex-basis:100%; color:#667e97; }
  body.mobile-ui-active .report-workspace .rw-project-list-head button { margin-left:auto; }
  body.mobile-ui-active .report-workspace .table-scroll { margin:8px 0; overflow:visible; max-height:none; border:0; min-width:0; }
  body.mobile-ui-active .report-workspace table { display:block; min-width:0; width:100%; margin:0; font-size:14px; }
  body.mobile-ui-active .report-workspace table thead { display:none; }
  body.mobile-ui-active .report-workspace table :is(tbody,tfoot) { display:grid; gap:8px; }
  body.mobile-ui-active .report-workspace table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:8px; gap:4px 8px; border:1px solid #dce5ef; border-radius:8px; background:#fff; }
  body.mobile-ui-active .report-workspace table tbody tr:nth-child(even) { background:#f7f9fc; }
  body.mobile-ui-active .report-workspace table td { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:3px 0; border:0; text-align:left; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
  body.mobile-ui-active .report-workspace table td::before { content:attr(data-label); display:block; color:#71839a; font-size:12px; }
  body.mobile-ui-active .report-workspace table td:first-child,body.mobile-ui-active .report-workspace table td[colspan] { grid-column:1/-1; }
  body.mobile-ui-active .report-workspace table td[colspan]::before { display:none; }
  body.mobile-ui-active .report-workspace table tfoot { margin-top:8px; }
  body.mobile-ui-active .report-workspace table tfoot tr { background:#edf4fe; }
  body.mobile-ui-active .report-workspace table td button { min-width:44px; max-width:100%; padding:5px 0; border:0; background:transparent; text-align:left; }
  body.mobile-ui-active .report-workspace .rw-project-meta { display:block; color:#6c8098; font-size:12px; }
  body.mobile-ui-active .report-workspace .rw-project-link { font-weight:700; }
  body.mobile-ui-active .report-workspace .rw-project-heading,body.mobile-ui-active .report-workspace .rw-project-section-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; margin:10px 0; }
  body.mobile-ui-active .report-workspace .rw-project-funds { padding:10px; border:1px solid #dce5ef; border-radius:8px; background:#f7faff; margin:10px 0; }
  body.mobile-ui-active .report-workspace :is(.rw-period-amount,.rw-funds-actions) { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  body.mobile-ui-active .report-workspace .rw-project-funds button { margin:4px 0; }
  body.mobile-ui-active .report-workspace .rw-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(var(--mobile-visible-height,100dvh) - 16px); margin:auto; padding:0; border:1px solid #d5e0ee; border-radius:10px; color:#203b56; overflow:hidden; }
  body.mobile-ui-active .report-workspace .rw-dialog[open] { display:flex; flex-direction:column; }
  body.mobile-ui-active .report-workspace .rw-dialog::backdrop { background:#152b4766; }
  body.mobile-ui-active .report-workspace .rw-dialog > header { flex:none; display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:10px; border-bottom:1px solid #e2e9f2; background:#fff; }
  body.mobile-ui-active .report-workspace .rw-dialog > header h3 { flex:1 1 130px; margin:0; overflow-wrap:anywhere; }
  body.mobile-ui-active .report-workspace .rw-dialog-actions { display:flex; flex-wrap:wrap; gap:6px; margin-left:auto; }
  body.mobile-ui-active .report-workspace .rw-dialog-body { overflow:auto; overscroll-behavior:contain; min-height:0; padding:12px; }
  body.mobile-ui-active .report-workspace .rw-dialog dd { margin:0 0 12px; line-height:1.7; }
  body.mobile-ui-active .report-workspace .rw-dialog dt { font-weight:700; margin:10px 0 6px; }
  body.mobile-ui-active .report-workspace .rw-dialog p { line-height:1.7; overflow-wrap:anywhere; }
  body.mobile-ui-active .report-workspace summary { padding:8px 0; cursor:pointer; }
  body.mobile-ui-active .report-workspace .report-error { padding:12px; background:#fff2ef; color:#a5372b; border-radius:7px; }
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
  body.mobile-ui-active .report-workspace .rw-project-filters { grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active .report-workspace .rw-mobile-filters { border:1px solid #dce5ef; border-radius:7px; padding:0 8px; margin:0; }
  body.mobile-ui-active .report-workspace .rw-mobile-filter-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:0 0 8px; }
  body.mobile-ui-active .report-workspace .rw-mobile-filter-fields button { grid-column:2; }
  body.mobile-ui-active .report-workspace .rw-project-funds { padding:10px; }
  body.mobile-ui-active .report-workspace .rw-project-funds h4 { font-size:15px; margin:0 0 6px; }
  body.mobile-ui-active .report-workspace .rw-funds-ranges { display:grid; gap:3px; font-size:12px; color:#617991; line-height:1.5; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:8px 0 0; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics > div { min-width:0; padding:8px; background:#fff; border:1px solid #e0e8f2; border-radius:7px; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics dt { color:#627a92; font-size:13px; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics dd { margin:0; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics .rw-fund-link { border:0; padding:4px 0; font-size:17px; font-weight:700; background:transparent; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics .rw-period-amount { border:0; border-top:1px solid #e3eaf2; padding:6px 0; border-radius:0; text-align:left; background:transparent; font-size:12px; }
  body.mobile-ui-active .report-workspace .rw-funds-metrics small { font-size:12px; color:#627a92; line-height:1.5; }
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
  body.mobile-ui-active .report-workspace table:has(thead tr:only-child th:nth-child(2):last-child) tr { grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); }
  body.mobile-ui-active .report-workspace table:has(thead tr:only-child th:nth-child(2):last-child) td:first-child { grid-column:auto; color:#627a92; }
  body.mobile-ui-active .report-workspace table:has(thead tr:only-child th:nth-child(2):last-child) td::before { display:none; }
}

/* 399: mobile client workspace and dialogs opened from this workspace only. */
@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
  body.mobile-ui-active .client-page-panel { padding:12px; margin:0; font-size:14px; }
  body.mobile-ui-active .client-page-panel :is(button,summary,input:not([type=checkbox]),select,textarea,[role=button]),
  body.mobile-ui-active:has(.client-page-panel) :is(#clientEditModal,#clientFollowProjectEditModal,#clientSurveyModal,#clientTransferModal,#clientDeleteResolverModal,#clientPoolModal,.cip-modal,.cw-modal) :is(button,summary,input:not([type=checkbox]),select,textarea) { min-height:44px; font-size:14px; line-height:1.5; box-sizing:border-box; }
  body.mobile-ui-active .client-page-panel button { margin:0; padding:8px 10px; border-radius:7px; white-space:normal; }
  body.mobile-ui-active .client-page-panel :is(input,select,textarea) { min-width:0; width:100%; max-width:100%; }
  body.mobile-ui-active .client-page-panel .client-page-head { gap:6px; margin:0 0 10px; padding:0; }
  body.mobile-ui-active .client-page-panel .client-page-head > h3 { display:none; }
  body.mobile-ui-active .client-page-panel .client-page-actions { display:flex; flex-wrap:wrap; gap:6px; width:100%; }
  body.mobile-ui-active .client-page-panel .client-page-actions > button { flex:1 1 auto; }
  body.mobile-ui-active .client-page-panel .client-page-actions #clientCreateToggle { order:-1; background:#155ec5; color:white; border-color:#155ec5; }
  body.mobile-ui-active .client-page-panel .client-list-controls > .cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; gap:4px; margin:8px 0; padding:0; border:0; background:transparent; }
  body.mobile-ui-active .client-page-panel .client-list-controls > .cards .stat { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; min-width:0; min-height:44px; padding:6px; border:1px solid #e1e8f1; border-radius:6px; background:#f7f9fc; }
  body.mobile-ui-active .client-page-panel .client-list-controls > .cards .stat-label { font-size:12px; line-height:1.3; white-space:normal; }
  body.mobile-ui-active .client-page-panel .client-list-controls > .cards .num { font-size:17px; line-height:1.2; }
  body.mobile-ui-active .client-page-panel .client-list-controls > .cards .stat:last-child { grid-column:span 3; flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; }
  body.mobile-ui-active .client-page-panel .client-filter-grid,body.mobile-ui-active .mobile-system-shell .client-page-panel .client-filter-grid.mobile-filter-collapsed { display:grid !important; grid-template-columns:minmax(0,1fr); gap:6px; padding:0; margin:10px 0; background:transparent; border:0; }
  body.mobile-ui-active .client-page-panel .client-filter-primary,body.mobile-ui-active .client-page-panel .client-filter-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  body.mobile-ui-active .client-page-panel .client-filter-primary > label:first-child { grid-column:1/-1; }
  body.mobile-ui-active .client-page-panel .client-filter-field { min-width:0; margin:0; font-size:12px; }
  body.mobile-ui-active .client-page-panel .client-filter-grid.mobile-filter-collapsed .client-filter-primary > label:not(:first-child),body.mobile-ui-active .client-page-panel .client-filter-grid.mobile-filter-collapsed .client-filter-secondary { display:none; }
  body.mobile-ui-active .client-page-panel .client-filter-grid.mobile-filter-collapsed .client-filter-primary > label:first-child > span { display:none; }
  body.mobile-ui-active .client-page-panel .client-filter-actions { display:flex; grid-column:1/-1; flex-wrap:wrap; gap:6px; }
  body.mobile-ui-active .client-page-panel .client-filter-actions button { flex:1; }
  body.mobile-ui-active .client-page-panel .client-filter-summary { margin:8px 0; font-size:13px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card { gap:7px; padding:10px; border-radius:9px; box-shadow:none; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card:nth-child(even) { background:#f7f9fc; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-head { flex-wrap:wrap; gap:5px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-title { flex:1 1 150px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-badges { max-width:100%; text-align:left; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-grid > div { padding:6px; gap:2px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-grid > div:last-child { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px 8px; align-items:baseline; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-grid :is(small,span),body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-meta,body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-title > span { font-size:12px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-grid b { font-size:14px; }
  body.mobile-ui-active .mobile-system-shell .client-page-panel .mobile-client-card-meta { padding-bottom:6px; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; width:100%; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-actions > button { width:100%; font-size:13px; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-actions > .client-expand-button { background:#155ec5; color:#fff; border-color:#155ec5; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-more { width:100%; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-more summary { padding:8px; box-sizing:border-box; text-align:center; border-radius:7px; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-more[open] { grid-column:1/-1; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-more-menu { position:static; display:flex; flex-wrap:wrap; width:auto; margin:0; box-shadow:none; }
  body.mobile-ui-active .client-page-panel .mobile-client-card .client-row-more-menu button { flex:1 1 75px; }
  body.mobile-ui-active .client-page-panel .client-form-a { display:flex; flex-direction:column; gap:12px; padding:0; }
  body.mobile-ui-active .client-page-panel .client-form-section,body.mobile-ui-active:has(.client-page-panel) #clientEditModal .client-form-section { min-width:0; padding:10px; border:1px solid #dce5ef; border-radius:8px; background:#f8fafd; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-section h4 { margin:0 0 8px; font-size:14px; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-section-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 8px; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-field { display:grid; min-width:0; gap:4px; margin:0; font-size:13px; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-field:has(.hidden) { display:none; }
  body.mobile-ui-active:has(.client-page-panel) :is(.client-form-field-name,.client-form-field-address,.client-form-field-siteLocations,.client-form-field-cooperationHistory,.client-form-field-notes,.client-form-field-sourceName,.client-form-field-sourceUserId,[data-client-cooperation-summary],#clientDuplicateHint) { grid-column:1/-1; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-field textarea { min-height:76px; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-field small { font-size:12px; line-height:1.5; color:#6e8196; }
  body.mobile-ui-active:has(.client-page-panel) .client-form-actions-a,body.mobile-ui-active:has(.client-page-panel) [data-client-draft-tools] { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  body.mobile-ui-active .client-page-panel .client-detail-view { padding:0; }
  body.mobile-ui-active .client-page-panel .client-detail-header,body.mobile-ui-active .client-page-panel .client-detail-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  body.mobile-ui-active .client-page-panel .client-detail-actions > button { flex:1 1 130px; }
  body.mobile-ui-active .client-page-panel .client-detail-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; margin:10px 0; }
  body.mobile-ui-active .client-page-panel .client-detail-tabs > button { padding:8px 3px; }
  body.mobile-ui-active .client-page-panel .client-detail-panel { padding:0; }
  body.mobile-ui-active .client-page-panel .client-detail-panel .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  body.mobile-ui-active .client-page-panel .client-detail-panel .grid > :is(textarea,button[type=submit],.form-span-2) { grid-column:1/-1; }
  body.mobile-ui-active .client-page-panel .client-detail-panel :is(.client-detail-title,h3,h4) { overflow-wrap:anywhere; }
  body.mobile-ui-active:has(.client-page-panel) :is(#clientEditModal,#clientFollowProjectEditModal,#clientSurveyModal,#clientTransferModal,#clientDeleteResolverModal) { z-index:160; padding:8px; }
  body.mobile-ui-active:has(.client-page-panel) :is(#clientEditModal,#clientFollowProjectEditModal,#clientSurveyModal,#clientTransferModal,#clientDeleteResolverModal) > .preview-modal-card { width:100%; max-width:620px; max-height:calc(var(--mobile-visible-height,100dvh) - 16px); margin:auto; padding:12px; overflow:auto; box-sizing:border-box; }
  body.mobile-ui-active:has(.client-page-panel) :is(#clientEditModal,#clientFollowProjectEditModal,#clientSurveyModal,#clientTransferModal,#clientDeleteResolverModal) .preview-modal-close { position:sticky; top:0; margin:0 0 8px auto; display:block; min-width:52px; background:white; color:#235b96; border-color:#d5e2f1; z-index:2; }
  body.mobile-ui-active:has(.client-page-panel) #clientEditForm { display:flex; flex-direction:column; gap:10px; }
  body.mobile-ui-active:has(.client-page-panel) :is(#clientFollowProjectEditForm,#clientSurveyForm) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  body.mobile-ui-active:has(.client-page-panel) :is(#clientFollowProjectEditForm,#clientSurveyForm) > :is(textarea,.form-span-2,.modal-actions) { grid-column:1/-1; }
  body.mobile-ui-active:has(.client-page-panel) .modal-actions { display:flex; flex-wrap:wrap; gap:6px; }
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
 body.mobile-ui-active:has(.client-page-panel) .cw-modal {position:fixed;inset:0;z-index:160;display:flex!important;align-items:center;justify-content:center;padding:8px!important;background:#15263b88;color:#20344b;box-sizing:border-box;height:var(--mobile-visible-height,100dvh)}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-shell {display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(var(--mobile-visible-height,100dvh) - 16px);min-width:0;overflow:hidden;background:#fff;border-radius:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-bottom:1px solid #dce5ef;flex:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-header h2 {font-size:17px;margin:2px 0;line-height:1.4}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-kicker {font-size:12px;color:#62758b}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal button {width:auto;min-height:44px;margin:0;padding:8px 12px;font-size:14px;line-height:1.4;border-radius:7px;white-space:normal;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-header button {flex:none;background:#f5f8fc;border:1px solid #d4e0ee;color:#175fc6}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-body {padding:12px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;font-size:14px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-message:not(:empty) {padding:10px 12px;border-bottom:1px solid #dce5ef;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-error {color:#b42318;background:#fff5f3}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-body>details {margin:0 0 8px;border:1px solid #dce5ef;border-radius:8px;padding:0 10px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal summary {min-height:44px;box-sizing:border-box;padding:12px 0;line-height:1.5;cursor:pointer}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-inbox>div {display:grid;gap:6px;padding:10px 0;border-top:1px solid #e5ebf3;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-inbox>div>span {color:#62758b;font-size:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-field {display:grid;min-width:0;gap:5px;font-size:14px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal :is(input:not([type=checkbox]),select,textarea) {box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-footer {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding:12px 0 0;border-top:1px solid #dce5ef}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal button:not([type=submit]) {background:#fff;color:#175fc6;border:1px solid #d4e0ee}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-actions {display:flex;flex-wrap:wrap;gap:8px;overflow:visible;margin-bottom:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-detail {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-detail>div {min-width:0;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-detail dt {font-size:12px;color:#62758b;margin-bottom:4px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-detail dd {margin:0;font-size:14px;line-height:1.5;white-space:pre-wrap}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal h3 {font-size:15px;line-height:1.5;margin:12px 0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-status {display:inline-block;padding:2px 6px;font-size:12px;font-weight:400;background:#eef4fd;border-radius:4px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal :is(.cw-header h2,.cw-body h3,.cw-body strong) {overflow-wrap:anywhere;min-width:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-filters {display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-filters>input {flex:1 1 100%}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-filters>select {flex:1;width:auto}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-table-wrap {max-width:100%;overflow:auto}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal table {border-collapse:collapse;width:100%;font-size:13px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal :is(th,td) {padding:8px;text-align:left;border-bottom:1px solid #e0e7ef;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list :is(table,tbody) {display:block;min-width:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list thead {display:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #dce5ef;border-radius:8px;padding:8px;margin-bottom:8px;gap:6px;background:#f7f9fc}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td {display:grid;gap:3px;border:0;padding:0;min-width:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:first-child,body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:last-child {grid-column:1/-1}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:last-child {display:flex;flex-wrap:wrap;gap:6px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:nth-child(2)::before {content:'核对期间';color:#6e8196;font-size:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:nth-child(3)::before {content:'状态';color:#6e8196;font-size:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-finance-list td:nth-child(4)::before {content:'最近办理';color:#6e8196;font-size:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-finance-pagination {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-finance-pagination>div {display:flex;gap:6px}
 body.mobile-ui-active:has(.client-page-panel) :is(#clientPoolModal,.cip-modal) {padding:8px;height:var(--mobile-visible-height,100dvh)}
 body.mobile-ui-active:has(.client-page-panel) :is(.cp-shell,.cip-dialog) {max-height:calc(var(--mobile-visible-height,100dvh) - 16px)}
 body.mobile-ui-active:has(.client-page-panel) :is(.cip-heading,.cip-content,.cip-footer,.cp-header,.cp-content) {padding:12px;gap:8px}
 body.mobile-ui-active:has(.client-page-panel) .cip-heading>div {display:block}
 body.mobile-ui-active:has(.client-page-panel) .cip-heading h3 {white-space:normal;font-size:16px}
 body.mobile-ui-active:has(.client-page-panel) .cip-heading button {flex:none}
 body.mobile-ui-active:has(.client-page-panel) .cip-form {grid-template-columns:minmax(0,1fr)}
 body.mobile-ui-active:has(.client-page-panel) .cip-footer {flex-wrap:wrap}
 body.mobile-ui-active:has(.client-page-panel) .cip-status {flex:1 0 100%;max-width:100%}
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
 body.mobile-ui-active .client-page-panel #clientViewHost :is(button,summary),body.mobile-ui-active .client-page-panel #clientForm :is(button,input,select),body.mobile-ui-active:has(.client-page-panel) #clientEditModal :is(button,input,select) {min-height:44px}
 body.mobile-ui-active .client-page-panel :is(input:not([type=checkbox]),select,textarea),body.mobile-ui-active:has(.client-page-panel) :is(#clientEditModal,#clientFollowProjectEditModal,#clientSurveyModal,#clientTransferModal,#clientDeleteResolverModal,#clientPoolModal,.cip-modal,.cw-modal) :is(input:not([type=checkbox]),select,textarea) {font-size:16px}
 body.mobile-ui-active:has(.client-page-panel) .client-form-section-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
 body.mobile-ui-active .client-page-panel :is(#clientExport,#clientClearFilters,#clientFilterToggle) {min-height:44px}
   body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table { display: block; width: 100%; min-width: 0; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table thead { display: none; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table tbody { display: block; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #e6ebed;
  }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table tr:last-child { border-bottom: 0; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td:first-child,
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td:nth-child(n + 4) { grid-column: 1 / -1; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: #697983;
    font-size: 12px;
  }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td:first-child::before,
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table td:last-child::before { display: none; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table .table-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
  body.mobile-ui-active .client-page-panel .client-detail-workspace .client-follow-project-table .table-action-group > button { min-height: 44px; }
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
 body.mobile-ui-active .client-page-panel .client-list-controls:has(#clientCreatePanel.is-open) > .cards {display:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind=reconciliations] .cw-list-actions {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1.15fr);align-items:center;gap:6px;margin-bottom:8px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind=reconciliations] .cw-list-actions>button {padding:8px 6px;font-size:13px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .business-list-sort {min-width:0;width:100%;margin:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .business-list-sort label {display:block;min-width:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .business-list-sort label>span {display:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .business-list-sort select {min-width:0;width:100%;padding:6px;font-size:16px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-pagination-controls {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal :is(.list-page-size,.list-page-turns,.list-page-jump) {display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0;margin:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-page-size>span {white-space:nowrap;font-size:12px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-page-size select {width:100px;font-size:16px;padding:6px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-page-turns button {padding:8px;font-size:13px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-page-jump input {width:72px}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .list-page-jump button {white-space:nowrap}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-finance-pagination:has([data-page-target][max="1"]) .list-page-jump {display:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-summary {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-summary>span {display:grid;gap:5px;min-width:0;padding:10px;background:#f4f7fc;border:1px solid #dfe7f1;border-radius:7px;font-size:12px;color:#61758b}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-summary strong {display:block;font-size:17px;color:#20344b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-detail>.cw-wide {grid-column:1/-1}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-warning {padding:10px;background:#fff7e9;color:#8c5714;border-radius:7px;font-size:13px;line-height:1.5}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-form .cw-field {margin:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal .cw-body h4 {margin:10px 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
}

@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) :is(table,tbody) {display:block;width:100%;min-width:0}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) thead {display:none}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;margin:0 0 8px;border:1px solid #dce5ef;border-radius:7px;background:#f8fafd}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) td {display:grid;gap:4px;min-width:0;width:auto;padding:0;border:0;position:static!important;box-shadow:none!important;background:transparent!important;white-space:normal;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) td:first-child,body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) td[colspan],body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(2) {grid-column:1/-1}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) td::before {color:#61758b;font-size:12px;line-height:1.4}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(1)::before {content:'日期'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(2)::before {content:'事项 / 凭据'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(3)::before {content:'增加'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(4)::before {content:'减少'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement td:nth-child(5)::before {content:'未结'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement+details td:nth-child(1)::before {content:'业务名称 / 票号'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement+details td:nth-child(2)::before {content:'类型'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement+details td:nth-child(3)::before {content:'金额（元）'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] .cw-statement+details td:nth-child(4)::before {content:'已结 / 说明'}
 body.mobile-ui-active:has(.client-page-panel) .cw-modal[data-workflow-kind="reconciliations"] :is(.cw-statement,.cw-statement+details) td[colspan]::before {display:none}
}

/* 400: mobile quotation workspace; other modules and desktop retain their styles. */
@media (max-width:768px), (hover: none) and (pointer: coarse) and (max-width:1024px) {
  body.mobile-ui-active .quote-page-stack { display:flex; flex-direction:column; gap:10px; min-width:0; }
  body.mobile-ui-active .quote-page-stack > :is(.panel,.quote-page-head-panel) { margin:0; padding:12px; min-width:0; }
  body.mobile-ui-active .quote-page-stack .quote-page-head-panel { order:0; padding:0; border:0; box-shadow:none; }
  body.mobile-ui-active .quote-page-stack .quote-page-head { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-page-head-panel:not(:has(.quote-draft-notice)) { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-draft-notice { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:10px; border:1px solid #dbe4ef; border-radius:8px; background:#f2f7fc; }
  body.mobile-ui-active .quote-page-stack .quote-draft-notice-text { white-space:normal; overflow:visible; text-overflow:clip; font-size:13px; }
  body.mobile-ui-active .quote-page-stack .quote-draft-notice-actions { display:flex; flex-wrap:wrap; gap:6px; }
  body.mobile-ui-active .quote-page-stack :is(.quote-page-title,.quote-page-subtitle,.quote-list-toggle,#quoteLayoutLegacyBtn) { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-page-actions { margin-left:auto; }
  body.mobile-ui-active .quote-page-stack .quote-create-panel { order:1; }
  body.mobile-ui-active .quote-page-stack :is(.quote-create-panel,#quoteForm,[data-quote-step-owner]) { scroll-margin-top:calc(72px + env(safe-area-inset-top)); }
  body.mobile-ui-active .quote-page-stack .quote-list-panel { order:2; }
  body.mobile-ui-active .quote-page-stack .quote-base-panel { order:3; }
  body.mobile-ui-active .quote-page-stack :is(button,summary,input:not([type=checkbox]),select,textarea,.quote-form-step-nav a),
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-overlay,#quoteExportModal,#quoteActionModal,.customer-list-history-dialog) :is(button,summary,input:not([type=checkbox]),select,textarea) { min-height:44px; box-sizing:border-box; font-size:14px; line-height:1.45; }
  body.mobile-ui-active .quote-page-stack :is(button,summary) { white-space:normal; margin:0; padding:8px 10px; border-radius:7px; }
  body.mobile-ui-active .quote-page-stack button { min-width:44px; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-drag-handle { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-mobile-attachment-order { display:flex; gap:6px; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-check { min-height:44px; box-sizing:border-box; white-space:normal; overflow:visible; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-check > span { white-space:normal; overflow:visible; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-row { grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-check { grid-column:1; grid-row:1; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-actions { grid-column:1; grid-row:2; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,max(6.5em,calc(50% - 3px))),1fr)); gap:6px; min-width:0; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-actions button { width:100%; white-space:nowrap; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-actions:not(:has(.remove-quote-attachment)) > .clear-quote-attachment-selection { grid-column:1 / -1; }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-actions .quote-mobile-attachment-order { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.mobile-ui-active .quote-page-stack .quote-proposal-attachment-content { grid-column:1; grid-row:3; display:grid; grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active .quote-page-stack :is(.quote-proposal-attachment-selected-files,.quote-proposal-attachment-images) { grid-column:1; }
  body.mobile-ui-active .quote-page-stack :is(input:not([type=checkbox]),select,textarea),
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-overlay,#quoteExportModal,#quoteActionModal,.customer-list-history-dialog) :is(input:not([type=checkbox]),select,textarea) { font-size:16px; min-width:0; width:100%; max-width:100%; }
  body.mobile-ui-active .quote-page-stack :is(.section-head,.quote-form-head,.quote-form-head-actions,.quote-editor-head,.quote-editor-actions) { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 8px; padding:0; }
  body.mobile-ui-active .quote-page-stack :is(.section-head h3,.quote-form-head h3) { margin:0; font-size:15px; }
  body.mobile-ui-active .quote-page-stack .quote-list-count { font-size:12px; color:#5b6e82; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel > .section-head > h3 { display:none; }
  body.mobile-ui-active .quote-page-stack #quoteCreateToggle { width:auto; background:#155ec5; color:#fff; border-color:#155ec5; }
  body.mobile-ui-active .quote-page-stack .quote-search-toolbar { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px; padding:0; margin:0 0 8px; border:0; background:transparent; }
  body.mobile-ui-active .quote-page-stack #quoteListKeywordFilter { grid-column:1 / -1; }
  body.mobile-ui-active .quote-page-stack #quoteMobileFilters { display:contents; border:0; margin:0; padding:0; }
  body.mobile-ui-active .quote-page-stack #quoteMobileFilters > summary { width:fit-content; color:#245b99; }
  body.mobile-ui-active .quote-page-stack .quote-mobile-filter-fields { grid-column:1 / -1; grid-row:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:4px 0; }
  body.mobile-ui-active .quote-page-stack #quoteMobileFilters:not([open]) > div { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-search-toolbar [data-app-list-sort] { grid-column:2; grid-row:2; display:flex; align-items:center; justify-content:flex-end; min-width:0; width:auto; margin:0; }
  body.mobile-ui-active .quote-page-stack .quote-search-toolbar [data-app-list-sort] label { display:flex; align-items:center; gap:4px; width:100%; max-width:210px; margin:0; }
  body.mobile-ui-active .quote-page-stack .quote-search-toolbar [data-app-list-sort] label > span { flex:none; }
  body.mobile-ui-active .quote-page-stack .quote-search-toolbar [data-list-sort] { min-width:0; width:100%; }
  body.mobile-ui-active .quote-page-stack .list-sort-control { display:flex; align-items:center; gap:6px; margin:0; width:auto; }
  body.mobile-ui-active .quote-page-stack .list-sort-control select { width:180px; max-width:100%; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel > .section-head { justify-content:space-between; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table { display:block; width:100%; min-width:0; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table thead { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody { display:grid; gap:10px; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; border:1px solid #dce5ef; border-radius:8px; box-shadow:none; padding:10px; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id]:nth-child(even) { background:#f5f8fc; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td { display:block; grid-column:1; grid-row:auto; width:auto; min-width:0; max-width:none; border:0; padding:0; white-space:normal; overflow-wrap:anywhere; text-align:left; font-size:13px; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(4) { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:first-child { display:flex; gap:8px; font-size:12px; color:#61768c; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(5) { display:flex; flex-wrap:wrap; gap:4px 8px; }
  body.mobile-ui-active .quote-page-stack .quote-row-compact-meta { display:block; font-size:12px; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(6) { grid-template-columns:repeat(2,minmax(0,1fr)); font-size:13px; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(6) .cell-main { grid-column:1 / -1; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) .table-action-group { display:flex; gap:6px; flex-wrap:wrap; }
  body.mobile-ui-active .quote-page-stack .quote-list-panel .quote-list-table tbody > tr[data-row-id] > td:nth-child(7) .tiny { min-height:44px; padding:8px 10px; }
  body.mobile-ui-active .quote-page-stack .quote-status-control { display:flex; gap:6px; width:100%; }
  body.mobile-ui-active .quote-page-stack .quote-status-control select { flex:1; }
  body.mobile-ui-active .quote-page-stack .quote-list-table .table-action-group button { width:auto; flex:1 1 auto; }
  body.mobile-ui-active .quote-page-stack .quote-list-table .quote-status-control button { flex:0 0 60px; }
  body.mobile-ui-active .quote-page-stack .quote-list-table .quote-status-control select { width:auto; }
  body.mobile-ui-active .quote-page-stack .quote-list-table .quote-status-action-select { min-width:110px; }
  body.mobile-ui-active .quote-page-stack .list-page-jump button { min-width:50px; white-space:nowrap; }
  body.mobile-ui-active .quote-page-stack .list-page-jump input { min-width:44px; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-a { position:static; margin:0; padding:0; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-a > summary { display:flex; align-items:center; justify-content:center; border:1px solid #d6e0ed; color:#245b99; background:#fff; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-a[open] { flex:1 1 100%; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-content-a { position:static !important; display:flex; flex-wrap:wrap; gap:6px; width:100%; min-width:0; max-width:100%; max-height:none; margin:6px 0 0; padding:6px; box-shadow:none; border:1px solid #dde5ef; border-radius:7px; background:#fff; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-a:not([open]) > .quote-row-more-content-a { display:none; }
  body.mobile-ui-active .quote-page-stack .quote-row-more-content-a button { flex:1 1 110px; }
  body.mobile-ui-active .quote-page-stack .customer-fixed-table { height:auto !important; min-height:0 !important; max-height:none; overflow:visible; }
  body.mobile-ui-active .quote-page-stack .customer-fixed-pagination { padding:8px 0 0; margin-top:8px; gap:8px; }
  body.mobile-ui-active .quote-page-stack .quote-settings-panel { margin:8px 0 0; }
  body.mobile-ui-active .quote-page-stack .quote-settings-content { display:flex; flex-wrap:wrap; gap:8px; padding:8px; }
  body.mobile-ui-active .quote-page-stack #quoteForm { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin:0; min-width:0; }
  body.mobile-ui-active .quote-page-stack #quoteForm .quote-step-hidden { display:none !important; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:0; padding:0 0 8px; border-bottom:1px solid #dbe4ef; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav a { display:flex; align-items:center; justify-content:center; flex:1 1 70px; padding:8px; border:1px solid #d5e0ed; border-radius:7px; color:#315b88; font-size:14px; text-align:center; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav a[aria-current=step] { color:#fff; background:#155ec5; border-color:#155ec5; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav a { text-decoration:none; gap:4px; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav a strong { font-size:14px; }
  body.mobile-ui-active .quote-page-stack .quote-form-step-nav a span { flex:none; font-size:11px; }
  body.mobile-ui-active .quote-page-stack .quote-venue-select-wrap select { padding-right:24px; }
  body.mobile-ui-active .quote-page-stack .quote-venue-select-wrap .quote-venue-status { position:static; height:auto; max-width:none; flex-wrap:wrap; padding:4px 0; white-space:normal; }
  body.mobile-ui-active .quote-page-stack :is(.quote-service-system-option,.quote-assessment-instrument-option) { height:auto; min-height:44px; box-sizing:border-box; white-space:normal; align-items:center; }
  body.mobile-ui-active .quote-page-stack :is(.quote-service-system-option,.quote-assessment-instrument-option) > span { min-width:0; white-space:normal; overflow-wrap:anywhere; }
  body.mobile-ui-active .quote-page-stack .quote-service-system-option > em { flex:none; }
  body.mobile-ui-active .quote-page-stack :is(.quote-basic-info-fields,.quote-service-plan-fields,.quote-cost-grid,.quote-base-form,.quote-summary-layout,.quote-cost-summary-field,.quote-export-form) { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  body.mobile-ui-active .quote-page-stack :is(.quote-form-section,.quote-editor-block,.quote-cost-box,.quote-service-plan-block,.quote-summary-sheet) { min-width:0; max-width:100%; padding:10px; }
  body.mobile-ui-active .quote-page-stack #quoteForm > * { min-width:0; max-width:100%; }
  body.mobile-ui-active .quote-page-stack :is(.quote-form-save-actions,.quote-column-inline-editor,.quote-column-toolbar) { display:flex; flex-wrap:wrap; gap:6px; }
  body.mobile-ui-active .quote-page-stack .quote-form-save-actions { background:#fff; border-top:1px solid #dbe4ef; margin:0; padding:10px 0 0; position:static; }
  body.mobile-ui-active .quote-page-stack .quote-form-save-actions button { flex:1 1 100px; }
  body.mobile-ui-active .quote-page-stack .quote-draft-save-state { flex:1 1 100%; font-size:12px; }
  body.mobile-ui-active .quote-page-stack .quote-mobile-base-field { display:grid; gap:4px; font-size:13px; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-block,.quote-base-panel,.customer-list-history-dialog) .table-scroll { overflow:visible; min-width:0; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table) { display:block; width:100%; min-width:0 !important; table-layout:auto; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table) thead { display:none; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table) tbody { display:grid; gap:10px; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table) tbody > tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border:1px solid #dce5ef; border-radius:7px; background:#f7f9fc; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table) tbody > tr > td { display:block; min-width:0; width:auto; max-width:none; padding:0; border:0; text-align:left; white-space:normal; overflow-wrap:anywhere; }
  body.mobile-ui-active .quote-page-stack :is(.quote-editor-table,.quote-base-panel table,.customer-list-history-dialog table,.quote-list-table) td { background:transparent; }
  body.mobile-ui-active .quote-page-stack [data-mobile-quote-label]::before { content:attr(data-mobile-quote-label); display:block; color:#617389; font-size:12px; margin-bottom:4px; }
  body.mobile-ui-active .quote-page-stack .quote-line-row > td:has([data-field=itemName],[data-field=spec],[data-field=remark]),
  body.mobile-ui-active .quote-page-stack :is(.quote-base-panel table,.customer-list-history-dialog table) td:last-child { grid-column:1 / -1; }
  body.mobile-ui-active .quote-page-stack .quote-editor-table :is(.quote-group-row,.quote-settlement-row) { grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active .quote-page-stack .quote-summary-table { width:100%; min-width:0; }
  body.mobile-ui-active .quote-page-stack :is(.quote-cost-summary-inline,.quote-column-chip) { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-overlay,#quoteExportModal,#quoteActionModal) { padding:8px; z-index:1500; }
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-dialog,#quoteExportModal .preview-modal-card,#quoteActionModal .preview-modal-card,.customer-list-history-dialog) { width:100%; max-width:700px; min-width:0; max-height:calc(100dvh - 16px); margin:auto; box-sizing:border-box; border-radius:10px; }
  body.mobile-ui-active:has(.quote-page-stack) :is(#quoteExportModal .preview-modal-card,#quoteActionModal .preview-modal-card,.customer-list-history-dialog) { overflow:auto; padding:12px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-header { padding:10px 12px; gap:8px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-header h2 { font-size:17px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-header button { margin:0; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-body { padding:12px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-version { justify-content:flex-start; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-version select { flex:1; max-width:none; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-summary { flex-direction:column; align-items:flex-start; gap:6px; margin:10px 0; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-summary h3 { font-size:16px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-summary > strong { font-size:22px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-meta { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-section { margin-top:12px; padding-top:12px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-table-wrap { border:0; overflow:visible; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines { display:block; min-width:0; width:100%; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines thead { display:none; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines tbody { display:grid; gap:8px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border:1px solid #dce5ef; border-radius:7px; background:#f6f8fc; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines td { min-width:0; max-width:none; padding:0; border:0; white-space:normal; overflow-wrap:anywhere; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines :is(td:first-child,.qd-line-note) { grid-column:1 / -1; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-lines [data-mobile-quote-label]::before { content:attr(data-mobile-quote-label); display:block; color:#617389; font-size:12px; margin-bottom:2px; }
  body.mobile-ui-active:has(.quote-page-stack) .qd-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-extra-form,.quote-export-layout,#quoteExportForm,#quoteActionFields) { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  body.mobile-ui-active:has(.quote-page-stack) :is(.qd-extra-footer,.system-dialog-actions,.quote-export-actions,.customer-list-history-dialog > header) { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  body.mobile-ui-active:has(.quote-page-stack) .customer-list-history-dialog > header { justify-content:space-between; margin-bottom:10px; }
  body.mobile-ui-active:has(.quote-page-stack) #quoteExportClose { position:sticky; top:0; z-index:3; display:block; width:auto; margin:0 0 6px auto; background:#fff; }
  body.mobile-ui-active:has(.quote-page-stack) .quote-export-preview { min-width:0; width:100%; }
  body.mobile-ui-active:has(.quote-page-stack) #quoteExportPreviewFrame { width:100% !important; min-width:0 !important; max-width:100%; height:350px; }
  body.mobile-ui-active .quote-page-stack .customer-list-history-dialog :is(table,thead,tbody) { min-width:0 !important; width:100%; }
  body.mobile-ui-active .quote-page-stack .customer-list-history-dialog thead { display:none !important; }
  body.mobile-ui-active .quote-page-stack .customer-list-history-dialog td:last-child button { width:auto; min-width:60px; }
}

/* Round 401 scoped project detail base. */

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view:has(> .project-contract-detail-panel[data-detail-refined="true"]) {
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    margin-inline: auto;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view:has(> .project-contract-detail-panel[data-detail-refined="true"]) > .project-detail-navigation {
    gap: 14px;
    min-height: 40px;
    padding: 4px 0;
    margin: 0 0 8px;
    color: #748091;
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view:has(> .project-contract-detail-panel[data-detail-refined="true"]) > .project-detail-navigation .project-back-to-list {
    width: auto;
    min-height: 32px;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid #d9dfe7;
    border-radius: 6px;
    background: #fff;
    color: #245eb5;
    font-size: 13px;
    line-height: 20px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] {
    --detail-ink: #242d3a;
    --detail-muted: #747e8d;
    --detail-line: #e5e8ed;
    --detail-action: #245eb5;
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    scroll-margin-top: 122px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] *,
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] *::before,
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] *::after {
    box-sizing: border-box;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-hero, .receivable-detail-block, .project-detail-workflow, .project-detail-costs, .project-detail-documents) {
    min-width: 0;
    margin: 0;
    padding: 13px 16px;
    border: 1px solid var(--detail-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(23 36 52 / 2%);
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.receivable-detail-title, .project-detail-section-heading h4) {
    margin: 0 0 8px;
    color: var(--detail-ink);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.5;
    letter-spacing: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-block-head, .project-detail-section-heading) {
    gap: 6px 14px;
    margin: 0 0 8px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-block-head :is(.receivable-detail-title, .project-detail-section-heading, h4),
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-section-heading h4 {
    margin: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.muted, .project-detail-section-heading > span) {
    color: var(--detail-muted);
    font-size: 12px;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] button:not([hidden]):not(.hidden) {
    width: auto;
    max-width: 100%;
    min-height: 32px;
    height: auto;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid #d9e2ee;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    color: var(--detail-action);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    white-space: normal;
    cursor: pointer;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] button:not([hidden]):not(.hidden):hover {
    border-color: #b5c8e4;
    background: #f4f7fc;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(button, a, summary):focus-visible {
    outline: 2px solid #377ed6;
    outline-offset: 3px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] button:disabled {
    opacity: .55;
    cursor: default;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] a {
    color: var(--detail-action);
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-actions:not([hidden]) {
    gap: 8px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview {
    gap: 10px;
    margin: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-eyebrow {
    margin: 0 0 3px;
    color: var(--detail-muted);
    font-size: 12px;
    font-weight: 400;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview-title h3 {
    margin: 0;
    color: #192434;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-current-status {
    padding: 2px 8px;
    border-radius: 5px;
    background: #f1f6f4;
    color: #3c7164;
    font-size: 12px;
    font-weight: 500;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-current-status::before {
    width: 5px;
    height: 5px;
    background: currentColor;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-current-status[data-status="closed"] { color: #4f6887; background: #f0f3f7; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-current-status[data-status="paused"] { color: #96712f; background: #fbf6ec; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-current-status[data-status="archived"] { color: #727b86; background: #f1f2f4; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview-meta {
    gap: 4px 18px;
    margin-top: 4px;
    color: var(--detail-muted);
    font-size: 12px;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview-meta > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview-actions button.edit-project {
    border-color: #2866bd;
    background: #2866bd;
    color: #fff;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-overview-actions button.edit-project:hover {
    border-color: #1f55a3;
    background: #1f55a3;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts {
    grid-template-columns: 1fr 1fr .8fr;
    gap: 0;
    margin: 12px 0 10px;
    padding: 10px 0;
    border-top: 1px solid var(--detail-line);
    border-bottom: 1px solid var(--detail-line);
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts > div {
    gap: 3px;
    padding: 0 22px;
    border: 0;
    border-right: 1px solid var(--detail-line);
    border-radius: 0;
    background: transparent;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts > div:first-child { padding-left: 0; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts > div:last-child { border-right: 0; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts span {
    color: var(--detail-muted);
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts strong {
    color: #253346;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.3px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-keyfacts > div:last-child strong {
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-reminders {
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--detail-muted);
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-reminders > strong {
    color: #626e7e;
    font-weight: 500;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-reminder-action:not([hidden]) {
    gap: 8px;
    margin: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-reminder {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.6;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .business-link-toolbar {
    gap: 10px 18px;
    margin: 9px 0 0;
    padding: 8px 0 0;
    border: 0;
    border-top: 1px solid var(--detail-line);
    border-radius: 0;
    background: transparent;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .business-link-title {
    color: #626e7e;
    font-size: 12px;
    font-weight: 500;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .business-link-actions {
    gap: 8px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .receivable-detail-panel {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .receivable-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 10px;
    align-items: stretch;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-fields, .project-detail-entities):not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px 16px;
    margin: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .client-detail-item {
    min-width: 0;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-fields, .project-detail-entities) .client-detail-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: baseline;
    gap: 6px 12px;
    padding: 2px 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.client-detail-item strong, .project-detail-field-label) {
    min-width: 0;
    color: var(--detail-muted);
    font-size: 13px;
    font-weight: 400;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-field-value {
    min-width: 0;
    color: var(--detail-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-field-label { word-break: keep-all; overflow-wrap: normal; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-field-wide { grid-column: 1 / -1; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-term {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 3px 12px;
    margin: 8px 0;
    padding: 8px 0;
    border: 0;
    border-top: 1px solid var(--detail-line);
    border-bottom: 1px solid var(--detail-line);
    border-radius: 0;
    background: transparent;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-term > strong {
    color: var(--detail-muted);
    font-size: 13px;
    font-weight: 400;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-term > small {
    grid-column: 2;
    color: var(--detail-muted);
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-optional, .project-cost-estimates) {
    margin: 8px 0 0;
    color: var(--detail-muted);
    font-size: 13px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.project-detail-optional, .project-cost-estimates, .project-finance-details) > summary {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 4px 0;
    color: var(--detail-action);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    cursor: pointer;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-optional > summary {
    color: #697789;
    font-weight: 400;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-optional[open] > :not(summary) { margin-top: 7px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-finance-details > .client-detail-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 20px;
    margin-top: 8px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-finance-block { scroll-margin-top: 128px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-finance-details > .client-detail-list > .client-detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 5px 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] [data-project-finance-key] {
    color: #253346;
    font-variant-numeric: tabular-nums;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-finance-details [data-project-finance-key] {
    font-size: 15px;
    font-weight: 600;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table {
    max-width: 100%;
    margin-top: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--detail-line);
    border-radius: 6px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table > table {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: auto;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.6;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table :is(th, td) {
    width: auto;
    min-width: 0;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table th {
    background: #f6f7f9;
    color: #748091;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table td { background: #fff; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table tbody > tr:last-child > td { border-bottom: 0; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table tbody > tr:hover > td { background: #fafbfc; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-table .project-detail-plan-amount { text-align: right; white-space: nowrap; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-plan-empty { margin: 8px 0 0; color: var(--detail-muted); font-size: 13px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-workflow .project-delivery-entry-actions {
    padding: 0;
    margin: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-section, .par-section) {
    min-width: 0;
    margin: 10px 0 0;
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid var(--detail-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--detail-ink);
    font-size: 13px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-heading, .par-heading) {
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 6px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-heading, .par-heading) h4 {
    margin: 0;
    color: #404c5b;
    font-size: 14px;
    font-weight: 600;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-heading, .par-heading) p {
    margin: 3px 0 0;
    color: var(--detail-muted);
    font-size: 12px;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-record, .par-record) {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: transparent;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-record, .par-record):last-child { border-bottom: 0; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-time, .par-source) {
    min-width: 0;
    color: #566474;
    font-size: 12px;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-time > span, .par-source > strong) {
    display: block;
    color: #566474;
    font-size: 12px;
    font-weight: 500;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-time, .par-source) :is(time, small) {
    display: block;
    margin-top: 3px;
    color: #8a939f;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-content, .par-content) { min-width: 0; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-record-title, .par-title) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    min-width: 0;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-record-title, .par-title) > strong {
    color: var(--detail-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .pcr-record-title > b {
    color: #253346;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-record-title, .par-title) > span {
    color: #7e8998;
    font-size: 12px;
    font-weight: 400;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-content p, .par-content p) {
    margin: 3px 0 0;
    color: #566474;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-meta, .par-evidence, .par-evidence p) {
    color: #7e8998;
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .par-content .par-key-line {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .par-evidence { margin-top: 4px; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .par-evidence > summary { color: var(--detail-action); font-size: 12px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-empty, .par-empty) {
    margin: 8px 0 0;
    color: var(--detail-muted);
    font-size: 13px;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-more, .par-more) { margin-top: 8px; gap: 12px; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is(.pcr-more, .par-more) > span { color: #8a939f; font-size: 12px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-estimates > .client-detail-list:not([hidden]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 22px;
    margin-top: 8px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-costs .project-cost-analysis-panel {
    margin: 10px 0 0;
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid var(--detail-line);
    background: transparent;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-head strong {
    color: #404c5b;
    font-size: 14px;
    font-weight: 600;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-head span {
    color: var(--detail-muted);
    font-size: 12px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-empty {
    gap: 10px 16px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #f7f8fa;
    box-shadow: none;
    color: #747e8d;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-empty > span { flex: 1 1 260px; min-width: 0; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-empty > button:not([hidden]):not(.hidden) {
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid #d9e2ee;
    border-radius: 6px;
    background: #fff;
    color: var(--detail-action);
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-analysis-empty > button:not([hidden]):not(.hidden):hover {
    border-color: #b5c8e4;
    background: #f4f7fc;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 10px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-summary-grid > div {
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: #f7f8fa;
    box-shadow: none;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-summary-grid > div:last-child { grid-column: auto; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-summary-grid span { color: var(--detail-muted); font-size: 12px; line-height: 1.6; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-summary-grid strong { margin-top: 5px; color: #253346; font-size: 18px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-costs .table-scroll {
    min-width: 0;
    max-width: 100%;
    margin: 8px 0 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--detail-line);
    border-radius: 6px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: auto;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table.project-cost-target-table { min-width: 1080px; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table :is(th, td) {
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table th { background: #f6f7f9; color: #748091; font-size: 12px; font-weight: 500; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table td { background: #fff; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table tbody > tr:last-child > td { border-bottom: 0; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table tbody > tr:hover > td { background: #fafbfc; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-table :is(input, select) {
    min-height: 32px;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid #d9dfe7;
    border-radius: 5px;
    background: #fff;
    color: var(--detail-ink);
    font-size: 13px;
    line-height: 20px;
    font-variant-numeric: tabular-nums;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-target-panel { padding: 10px 12px; border: 0; border-radius: 6px; background: #f7f8fa; }
  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-cost-section-title { margin: 10px 0 6px; color: #404c5b; font-size: 14px; font-weight: 600; }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-document-grid:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-document-item {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #566474;
    font-size: 13px;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] .project-detail-document-item > .project-detail-block-head > strong {
    color: #566474;
    font-size: 13px;
    font-weight: 500;
  }

  body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined="true"] :is([hidden], .hidden) { display: none !important; }

/* Round 401: mobile project contracts only. */
body.mobile-ui-active .project-contract-page-shell { gap:10px!important; width:100%;min-width:0; }
body.mobile-ui-active .project-contract-page-shell > :is(.page-hero,.project-contract-overview-panel) {display:none!important;}
body.mobile-ui-active .project-contract-page-shell .panel {padding:12px;min-width:0;margin:0;}
body.mobile-ui-active .project-contract-page-shell :is(button,summary,.business-link) {min-height:44px;min-width:44px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:14px;}
body.mobile-ui-active .project-contract-page-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {min-height:44px;font-size:16px;min-width:0;max-width:100%;box-sizing:border-box;}
body.mobile-ui-active .project-contract-page-shell :is(input[type=checkbox],input[type=radio]) {min-width:20px;min-height:20px;width:20px;flex:0 0 20px;}
body.mobile-ui-active .project-contract-page-shell :is(.project-contract-list-panel>.section-head,.project-contract-filters) {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel>.section-head>h3 {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel>.section-head>.table-action-group {display:flex;flex:1;gap:6px;align-items:stretch;flex-wrap:wrap;}
body.mobile-ui-active .project-contract-page-shell #projectContractCreateToggle {flex:1;min-width:130px;margin:0;}
body.mobile-ui-active .project-contract-page-shell .open-contract-renewals {width:auto;flex:1;min-width:110px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel .cd-toolbar {display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:6px;flex:1 0 100%;width:100%;align-items:stretch!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel .cd-toolbar>button {width:100%;margin:0;min-width:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel>.section-head>.table-action-group>#projectContractCreateToggle {flex:1 0 100%;width:100%;background:#175cc3;color:#fff;border-color:#175cc3;}
body.mobile-ui-active .project-contract-page-shell #projectContractKeyword {flex:1 0 100%;width:100%;margin:0;}
body.mobile-ui-active .project-contract-page-shell #projectMobileFilters {flex:0 0 auto;position:relative;margin:0;border:0;padding:0;}
body.mobile-ui-active .project-contract-page-shell #projectMobileFilters>summary {padding:8px 12px;border:1px solid #d5deeb;border-radius:7px;background:#fff;color:#245eb5;}
body.mobile-ui-active .project-contract-page-shell #projectMobileFilters[open] {flex-basis:100%;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-filter-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 0;}
body.mobile-ui-active .project-contract-page-shell #projectMobileFilters:not([open])>.project-mobile-filter-fields {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-filter-fields>* {width:100%;margin:0;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-sort {flex:1;min-width:150px;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-sort .business-list-sort {display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:nowrap;margin:0;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-sort select {width:100%;max-width:230px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel>.table-scroll {overflow:visible;border:0;min-height:0!important;height:auto!important;max-height:none!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table {display:block;width:100%;min-width:0!important;border:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>thead {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody {display:grid;grid-template-columns:1fr;gap:10px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;padding:12px;border:1px solid #dfe6ef;border-radius:10px;background:#fff;min-width:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row:nth-child(even) {background:#f6f9fc;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td {display:block!important;position:static!important;grid-row:auto!important;grid-column:auto!important;border:0!important;padding:0!important;width:auto!important;max-width:100%;min-width:0;height:auto!important;max-height:none!important;overflow:visible!important;white-space:normal;overflow-wrap:anywhere;font-size:14px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td:nth-child(1) {grid-column:1/-1!important;font-weight:600;font-size:16px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td:nth-child(2) {grid-column:1/-1!important;font-weight:400;}
body.mobile-ui-active .project-contract-page-shell .project-contract-narrow-meta {display:none!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td:nth-child(6) {grid-column:1/-1!important;display:flex!important;gap:5px;flex-wrap:wrap;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td:nth-child(7) {grid-column:1/-1!important;display:flex!important;flex-wrap:wrap;gap:5px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row>td:nth-child(8) {grid-column:1/-1!important;padding-top:7px!important;border-top:1px solid #e3e9f1!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(2)::before {content:'客户：';color:#77879a;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(3)::before {content:'业务：';color:#77879a;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(4)::before {content:'负责人：';color:#77879a;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(5)::before {content:'金额：';color:#77879a;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(6)::before {content:'项目周期：';color:#77879a;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table td:nth-child(6)>span:first-child::after {content:' 至';}
body.mobile-ui-active .project-contract-page-shell .project-contract-compact-actions {display:flex;align-items:stretch;gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-compact-actions>button {flex:1;margin:0;width:auto;}
body.mobile-ui-active .project-contract-page-shell .project-contract-more-actions {position:relative;margin:0;padding:0;border:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-more-actions>summary {border:1px solid #d4deeb;border-radius:7px;background:white;color:#245eb5;padding:6px 12px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-more-menu {position:absolute;right:0;top:calc(100% + 4px);z-index:12;min-width:140px;padding:6px;background:#fff;border:1px solid #d5deeb;border-radius:8px;box-shadow:0 7px 22px #20365425;}
body.mobile-ui-active .project-contract-page-shell .project-contract-more-actions:not([open])>.project-contract-more-menu {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-contract-more-menu>button {display:flex!important;width:100%;margin:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-alert {padding:3px 6px;border-radius:4px;font-size:12px;background:#eff4f9;}
body.mobile-ui-active .project-contract-page-shell .project-contract-alert.danger {color:#af3333;background:#fff0f0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-alert.warning {color:#946119;background:#fff7e8;}
body.mobile-ui-active .project-contract-page-shell .project-contract-result-line {font-size:12px;color:#728198;margin:8px 0;}
body.mobile-ui-active .project-contract-page-shell .customer-fixed-pagination {position:static;display:flex;flex-wrap:wrap;gap:8px;min-height:0;padding:10px 0 0;margin:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-create-panel:not(.is-open) {display:none!important;}
body.mobile-ui-active .project-contract-page-shell:has(.project-contract-create-panel.is-open)>.project-contract-list-panel {display:none;}
body.mobile-ui-active .project-contract-page-shell.is-detail-view>:is(.project-contract-list-panel,.project-contract-create-panel) {display:none!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-create-panel>.section-head {margin-bottom:10px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-create-panel>.section-head>.section-head-note {display:none;}
body.mobile-ui-active .project-contract-page-shell :is(.workspace-columns,.workspace-block,.workspace-full,.project-form-organized) {display:block;min-width:0;width:100%;margin:0;padding:0;}
body.mobile-ui-active .project-contract-page-shell :is(#projectContractForm.project-form-organized,#projectEditForm.project-form-organized) {display:block!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;max-width:100%!important;}
body.mobile-ui-active .project-contract-page-shell :is(#projectContractForm.project-form-organized,#projectEditForm.project-form-organized)>* {min-width:0!important;max-width:100%!important;box-sizing:border-box;}
body.mobile-ui-active .project-contract-page-shell .project-form-nav {display:flex;gap:6px;overflow:auto;max-width:100%;padding:4px 0 10px;scroll-margin-top:65px;}
body.mobile-ui-active .project-contract-page-shell .project-form-nav-button {flex:0 0 auto;padding:7px 10px;width:auto;margin:0;background:#fff;color:#55708d;border:1px solid #d9e2ed;white-space:nowrap;}
body.mobile-ui-active .project-contract-page-shell .project-form-nav-button[aria-current=step] {background:#eaf2ff;color:#175cc3;border-color:#8eb6ed;}
body.mobile-ui-active .project-contract-page-shell .project-form-section:not(.project-mobile-step-active) {display:none!important;}
body.mobile-ui-active .project-contract-page-shell .project-form-section-head {display:flex;align-items:center;gap:8px;margin:8px 0 14px;}
body.mobile-ui-active .project-contract-page-shell .project-form-section-head h4 {margin:0;font-size:16px;}
body.mobile-ui-active .project-contract-page-shell .project-form-section-head p {font-size:12px;color:#728198;line-height:1.6;margin:3px 0 0;}
body.mobile-ui-active .project-contract-page-shell .project-form-section-index {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-form-milestone-toggle {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-form-fields {display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
body.mobile-ui-active .project-contract-page-shell .project-form-fields>* {grid-column:auto!important;min-width:0;width:100%;margin:0;box-sizing:border-box;}
body.mobile-ui-active .project-contract-page-shell .project-form-field>label,body.mobile-ui-active .project-contract-page-shell label.project-form-field>span {display:block;font-size:13px;color:#52677f;margin-bottom:5px;}
body.mobile-ui-active .project-contract-page-shell .project-form-field :is(input,select,textarea) {width:100%;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-head>button {background:#fff;color:#175cc3;border:1px solid #c6d8ef;}
body.mobile-ui-active .project-contract-page-shell .project-form-actions {display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #e1e7f0;margin:16px 0 0;padding-top:12px;}
body.mobile-ui-active .project-contract-page-shell .project-form-actions>button {flex:1;margin:0;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-table {display:block!important;width:100%;min-width:0!important;border:0;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-table>thead {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-table>tbody {display:grid;gap:10px;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-table>tbody>tr {display:grid;grid-template-columns:minmax(0,1fr);padding:10px;border:1px solid #dce5f0;border-radius:8px;background:#f7faff;gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-form-organized .quote-editor-table td {display:block;border:0;padding:0;min-width:0;width:auto!important;}
body.mobile-ui-active .project-contract-page-shell .project-permission-toggle {height:auto!important;min-height:44px!important;white-space:normal!important;overflow:visible!important;text-align:left;justify-content:flex-start;}
body.mobile-ui-active .project-contract-page-shell .project-permission-toggle-text {white-space:normal;overflow:visible;text-overflow:clip;min-width:0;overflow-wrap:anywhere;}
body.mobile-ui-active .project-contract-page-shell [data-mobile-project-label]::before {content:attr(data-mobile-project-label);display:block;font-size:12px;color:#718299;margin:0 0 4px;}
body.mobile-ui-active .project-contract-page-shell #projectEditModal {position:fixed;inset:0;z-index:4200;padding:8px;display:flex;align-items:center;justify-content:center;}
body.mobile-ui-active .project-contract-page-shell #projectEditModal .project-edit-modal-card {position:relative;inset:auto!important;transform:none!important;width:min(720px,100%)!important;min-width:0!important;max-width:100%!important;height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important;padding:14px;border-radius:12px;box-sizing:border-box;}
body.mobile-ui-active .project-contract-page-shell #projectEditTitle {padding:0 62px 0 0;margin:0 0 12px;min-height:44px;display:flex;align-items:center;font-size:16px;overflow-wrap:anywhere;}
body.mobile-ui-active .project-contract-page-shell #projectEditClose {position:absolute;inset:12px 12px auto auto;z-index:5;min-height:44px;min-width:52px;margin:0;}
body.mobile-ui-active .project-contract-page-shell #projectEditForm :is(a,.link-button) {display:inline-flex;align-items:center;min-height:44px;max-width:100%;width:auto;white-space:normal;overflow-wrap:anywhere;overflow:visible;line-height:1.45;}
body.mobile-ui-active .project-contract-page-shell .modal-resize-handle {display:none;}
body.mobile-ui-active .project-contract-page-shell :is([hidden],.hidden),body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody>.project-contract-row.hidden {display:none!important;}

/* Round 401 detail cards share the established project typography. */
body.mobile-ui-active .project-contract-page-shell .project-detail-navigation {display:flex;gap:8px;align-items:center;margin:0 0 10px;}
body.mobile-ui-active .project-contract-page-shell .project-detail-navigation button {min-height:44px!important;min-width:44px!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view button {min-height:44px!important;min-width:44px!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view a {display:inline-flex;align-items:center;min-height:44px!important;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
body.mobile-ui-active .project-contract-page-shell .project-detail-navigation>span {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] {scroll-margin-top:65px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-hero,.receivable-detail-block,.project-detail-workflow,.project-detail-costs,.project-detail-documents) {padding:12px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-overview,.project-detail-block-head,.project-detail-hero-main) {flex-wrap:wrap;gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-keyfacts,.receivable-detail-grid,.project-detail-document-grid,.project-finance-details>.client-detail-list,.project-cost-summary-grid,.project-cost-estimates>.client-detail-list,.project-detail-fields,.project-detail-entities) {grid-template-columns:minmax(0,1fr);gap:10px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] .project-detail-keyfacts>div {padding:8px 0;border:0;border-bottom:1px solid #e5eaf0;}
body.mobile-ui-active .project-contract-page-shell .project-detail-overview-meta {display:grid;grid-template-columns:minmax(0,1fr);gap:5px;line-height:1.6;margin:8px 0;}
body.mobile-ui-active .project-contract-page-shell .project-detail-overview-meta>span {display:block;min-width:0;overflow-wrap:anywhere;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] .project-finance-details>.client-detail-list {gap:0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] .project-finance-details>.client-detail-list>.client-detail-item {display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 8px;padding:7px 0;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] .project-detail-keyfacts>div {display:grid;grid-template-columns:minmax(0,1fr);gap:4px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-fields,.project-detail-entities) .client-detail-item,body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] .project-detail-term {grid-template-columns:minmax(80px,30%) minmax(0,1fr);column-gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(button,summary,.business-link,.project-cost-amount-link,.project-cost-category-link) {min-height:44px!important;min-width:44px!important;font-size:14px;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.pcr-record,.par-record) {grid-template-columns:minmax(0,1fr);gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.pcr-time,.par-source) {display:flex;flex-wrap:wrap;gap:4px 8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-actions,.project-detail-hero-actions,.project-detail-quick-actions) {display:flex;flex-wrap:wrap;gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-actions,.project-detail-hero-actions,.project-detail-quick-actions)>button {flex:1 1 auto;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view .table-scroll {max-width:100%;overflow:auto;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view table:has(td[data-mobile-project-label]) {display:block;min-width:0!important;width:100%;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view table:has(td[data-mobile-project-label])>thead {display:none;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view table:has(td[data-mobile-project-label])>tbody {display:grid;gap:8px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view table:has(td[data-mobile-project-label])>tbody>tr {display:grid;grid-template-columns:minmax(0,1fr);border:1px solid #dfe7ef;border-radius:8px;padding:10px;}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-view td[data-mobile-project-label] {display:block;border:0;padding:5px 0;white-space:normal;overflow-wrap:anywhere;}
@media(min-width:700px){
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel>.section-head>.table-action-group {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;}
body.mobile-ui-active .project-contract-page-shell .project-contract-list-panel .cd-toolbar {display:contents;}
body.mobile-ui-active .project-contract-page-shell #projectContractKeyword {flex:2 1 220px;width:auto;min-width:220px;}
body.mobile-ui-active .project-contract-page-shell .project-mobile-sort {flex:1 1 190px;}
body.mobile-ui-active .project-contract-page-shell .project-form-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
body.mobile-ui-active .project-contract-page-shell .project-form-fields>.project-form-wide {grid-column:1/-1!important;}
body.mobile-ui-active .project-contract-page-shell .project-contract-board-table>tbody {grid-template-columns:repeat(2,minmax(0,1fr));}
body.mobile-ui-active .project-contract-page-shell .project-contract-detail-panel[data-detail-refined=true] :is(.project-detail-keyfacts,.receivable-detail-grid,.project-detail-document-grid,.project-cost-summary-grid) {grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* 401: project-contract secondary views only; imported after the main mobile project styles. */
@media (max-width:768px), (hover:none) and (pointer:coarse) and (max-width:1024px) {
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.pd-modal,.bf-modal,.cw-modal) { box-sizing:border-box; inset:0; padding:8px; height:var(--mobile-visible-height,100dvh); z-index:160; align-items:center; justify-content:center; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cw-modal { display:flex!important; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-modal { z-index:170; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.cw-modal) ~ .bf-modal { z-index:180; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-shell,.pd-shell,.bf-shell,.cw-shell) { box-sizing:border-box; width:min(760px,100%); height:calc(var(--mobile-visible-height,100dvh) - 16px); max-height:calc(var(--mobile-visible-height,100dvh) - 16px); min-width:0; overflow:hidden; border-radius:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-header,.pd-header,.bf-header,.cw-header) { padding:10px 12px; gap:10px; align-items:center; flex:none; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-header,.pd-header,.bf-header,.cw-header) > div { min-width:0; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-header,.pd-header,.bf-header,.cw-header) h2 { font-size:17px; line-height:1.4; margin:0; overflow-wrap:anywhere; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-header,.pd-header,.bf-header,.cw-header) button { flex:none; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-body,.pd-content,.bf-content,.cw-body) { flex:1 1 auto; min-height:0; min-width:0; padding:12px; overflow:auto; overscroll-behavior:contain; font-size:14px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.pd-modal,.bf-modal,.cw-modal,.pca-dialog,.pcd-dialog,.pcc-dialog,.pca-confirm) :is(button,summary) { box-sizing:border-box; min-height:44px; min-width:44px; max-width:100%; padding:8px 10px; margin:0; font-size:14px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; touch-action:manipulation; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.pd-modal,.bf-modal,.cw-modal,.pca-dialog,.pcd-dialog,.pcc-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { box-sizing:border-box; min-height:44px; min-width:0; max-width:100%; width:100%; padding:9px 10px; font-size:16px; line-height:1.5; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.pd-modal,.bf-modal,.cw-modal,.pca-dialog,.pcd-dialog,.pcc-dialog) :is(p,dd,h3,h4,small,strong,.muted) { overflow-wrap:anywhere; min-width:0; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-grid,.cd-template-layout,.pd-form-grid,.bf-form-grid,.cw-form,.cw-acceptance-fields,.cw-line) { grid-template-columns:minmax(0,1fr); gap:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-details,.bf-details,.cw-detail) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-wide,.bf-wide,.cw-wide,.cd-wide) { grid-column:1/-1; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-check,.cd-check,.bf-check,.cw-files label) { box-sizing:border-box; display:flex; align-items:center; gap:8px; min-height:44px; line-height:1.6; overflow-wrap:anywhere; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-check,.cd-check,.bf-check,.cw-files label) input:is([type=checkbox],[type=radio]) { flex:none; width:20px!important; height:20px; min-width:20px; min-height:20px; margin:0!important; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-tabs,.bf-tabs) { padding:0 12px; gap:12px; overflow-x:auto; flex:none; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-tabs,.bf-tabs) button { flex:0 0 auto; white-space:nowrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-page-heading,.pd-section-heading,.bf-page-heading,.bf-section-heading,.cd-list-top,.cd-editor-top,.cd-section-title,.cd-list-summary) { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:10px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-toolbar,.bf-toolbar,.cd-actions,.cd-source-links,.cd-preview-actions,.cw-actions) { display:flex; align-items:center; flex-wrap:wrap; gap:8px; overflow:visible; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-form-footer,.bf-form-footer,.cw-footer) { display:flex; flex-wrap:wrap; gap:8px; position:static; padding:12px 0 0; margin:12px 0 0; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-form-footer,.bf-form-footer,.cw-footer) button { flex:1 1 110px; width:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.bf-filters,.cw-filters,.cd-list-filters) { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; max-width:none; align-items:end; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-table-wrap,.bf-table-wrap,.cw-table-wrap) { max-width:100%; overflow:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pd-table,.bf-table) { min-width:620px; width:100%; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pd-table :is(th,td):nth-child(4) { display:table-cell; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pd-deliverable { grid-template-columns:minmax(0,1fr); gap:8px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pd-delivered-list li { grid-template-columns:minmax(0,1fr); gap:3px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .bf-renewal-due-list article { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-message { padding:10px 12px; margin:8px 12px 0; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-save-state { max-width:100%; text-align:left; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-bottom:12px; padding-bottom:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-steps .cd-button { padding:8px 4px; font-size:13px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-payment-lines > [data-cd-payment],
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-payment-lines > [data-cd-payment]:not(:has([name$=".invoiceDate"])) { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; padding:12px; margin:10px 0; border:1px solid #dce5ef; border-radius:8px; background:#f7f9fc; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-payment-lines > [data-cd-payment] > .cd-button { justify-self:end; min-height:44px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-footer { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; position:static; padding:12px 0 0; margin:16px 0 0; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-footer > .cd-actions { display:contents; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-footer .cd-button { width:100%; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-template-layout aside { border-right:0; border-bottom:1px solid #e3eaf1; padding:0 0 12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-template-item { min-height:44px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-placeholders { grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-confirm { box-sizing:border-box; padding:12px; overflow:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-confirm section { box-sizing:border-box; width:100%; max-height:100%; padding:16px; overflow:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-preview { min-height:240px; height:65dvh; max-width:100%; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-sign-form { padding:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page :is(.cd-table,.cd-table tbody) { display:block; width:100%; min-width:0; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table thead { display:none; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:8px; padding:12px; border:1px solid #dce5ef; border-radius:8px; background:#f7f9fc; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table td { display:grid; gap:4px; position:static; min-width:0; padding:0; border:0; background:transparent; white-space:normal; overflow-wrap:anywhere; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table td:is(:first-child,:last-child,[colspan]) { grid-column:1/-1; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table td:nth-child(2)::before { content:'业务类型'; color:#6c7f93; font-size:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table td:nth-child(3)::before { content:'状态'; color:#6c7f93; font-size:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table td:nth-child(4)::before { content:'最近保存'; color:#6c7f93; font-size:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-table strong { min-width:0; }
  body.mobile-ui-active:has(.project-contract-page-shell) .cd-list-page .cd-row-actions { flex-wrap:wrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.bf-modal,.pd-modal,.cw-modal) :is(.customer-fixed-pagination,.business-list-sort) { display:flex; align-items:center; flex-wrap:wrap; gap:8px; max-width:100%; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.bf-modal,.pd-modal,.cw-modal) .customer-fixed-pagination :is(button,label,.customer-page-indicator) { white-space:nowrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.bf-modal,.pd-modal,.cw-modal) .business-list-sort select { width:min(210px,100%); min-height:44px; font-size:16px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-dialog,.pcd-dialog,.pcc-dialog) { box-sizing:border-box; width:calc(100vw - 16px); max-width:calc(100vw - 16px); height:calc(var(--mobile-visible-height,100dvh) - 16px); max-height:calc(var(--mobile-visible-height,100dvh) - 16px); margin:auto; border-radius:12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-head,.pcd-head,.pcc-head) { padding:10px 12px; gap:8px; flex-wrap:wrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-head,.pcd-head,.pcc-head) h3 { font-size:17px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-head,.pcd-head,.pcc-head) > div { min-width:0; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-actions { flex-wrap:wrap; gap:8px; width:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-body.project-cost-analysis-panel,.pcd-results,.pcc-results) { min-width:0; min-height:0; padding:12px; overflow:auto; flex:1 1 auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pca-status,.pcd-status,.pcc-status) { padding:0 12px; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.pcd-toolbar,.pcd-footer,.pcc-toolbar) { padding:10px 12px; gap:8px; flex-wrap:wrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcd-row { flex-wrap:wrap; gap:8px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcd-row-main { flex-basis:100%; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcd-row-value { width:100%; min-width:0; flex-direction:row; justify-content:space-between; align-items:center; }
  body.mobile-ui-active:has(.project-contract-page-shell) .project-cost-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.mobile-ui-active:has(.project-contract-page-shell) .project-cost-summary-grid > div { display:block; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-dialog .project-cost-summary-grid .project-cost-amount-link { min-height:44px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-dialog .project-cost-comparison > .table-scroll { max-height:none; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-dialog .project-cost-candidate-table button { white-space:normal; min-height:44px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcc-projects { grid-template-columns:minmax(0,1fr); }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcc-table-wrap { max-width:100%; overflow:auto; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcc-table-wrap > table { min-width:620px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pcc-dialog button:is(.pcc-money,.pcc-expand) { min-height:44px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-confirm { max-height:calc(var(--mobile-visible-height,100dvh) - 24px); overflow:auto; padding:16px; }
  body.mobile-ui-active:has(.project-contract-page-shell) .pca-confirm > div { flex-wrap:wrap; }
  body.mobile-ui-active:has(.project-contract-page-shell) :is(.cd-modal,.pd-modal,.bf-modal,.cw-modal,.pca-dialog,.pcd-dialog,.pcc-dialog) [hidden] { display:none!important; }
}

/* Round 402: task work orders, mobile layout only. */
body.mobile-ui-active .task-workspace {min-width:0;width:100%;color:#20364f;font-size:14px;line-height:1.6;}
body.mobile-ui-active .task-workspace :is(button,summary,a.business-link,a.link-button) {min-height:44px;min-width:44px;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;}
body.mobile-ui-active .task-workspace :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {min-height:44px;font-size:16px;min-width:0;max-width:100%;width:100%;box-sizing:border-box;}
body.mobile-ui-active .task-workspace :is(input[type=checkbox],input[type=radio]) {width:20px;height:20px;min-width:20px;flex:0 0 20px;}
body.mobile-ui-active .task-workspace :is(.hidden,[hidden]) {display:none!important;}
body.mobile-ui-active .task-workspace-header {display:flex;gap:10px;align-items:center;justify-content:space-between;margin:0 0 10px;}
body.mobile-ui-active .task-workspace-header h2 {display:none;}
body.mobile-ui-active .task-workspace-counts {font-size:13px;color:#718299;}
body.mobile-ui-active .task-workspace-header button {margin:0;width:auto;background:#175cc3;color:white;border-color:#175cc3;}
body.mobile-ui-active .task-workspace .panel {margin:0;padding:12px;min-width:0;}
body.mobile-ui-active .task-workspace:has(.task-workspace-create:not(.hidden)) .task-workspace-board {display:none;}
body.mobile-ui-active .task-workspace .task-board-filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 10px;overflow:visible;}
body.mobile-ui-active .task-workspace .task-board-filter {min-width:0;min-height:44px;margin:0;padding:7px 5px;font-size:13px;background:#f3f6fa;color:#546d88;border:1px solid #dce5ef;}
body.mobile-ui-active .task-workspace .task-board-filter.active {background:#eaf2ff;color:#175cc3;border-color:#8db7ed;font-weight:600;}
body.mobile-ui-active .task-workspace .task-list-filter-form {display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;}
body.mobile-ui-active .task-workspace .task-list-filter-form>[name=keyword] {flex:1 1 120px;width:0;}
body.mobile-ui-active .task-workspace .task-list-filter-form>button {flex:0 0 auto;margin:0;width:auto;}
body.mobile-ui-active .task-workspace .task-mobile-filter-details {flex:0 0 auto;padding:0;border:0;margin:0;}
body.mobile-ui-active .task-workspace .task-mobile-filter-details>summary {display:flex;align-items:center;justify-content:center;border:1px solid #d8e2ef;border-radius:7px;padding:7px 10px;color:#175cc3;background:#fff;}
body.mobile-ui-active .task-workspace .task-mobile-filter-details[open] {flex-basis:100%;}
body.mobile-ui-active .task-workspace .task-mobile-filter-details[open]>summary {width:fit-content;}
body.mobile-ui-active .task-workspace .task-mobile-filter-fields {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 0;}
body.mobile-ui-active .task-workspace .task-mobile-filter-details:not([open])>.task-mobile-filter-fields {display:none;}
body.mobile-ui-active .task-workspace .task-attention-filter {min-height:44px;display:flex;align-items:center;gap:8px;margin:0;}
body.mobile-ui-active .task-workspace .app-list-sort-summary {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;margin:10px 0;}
body.mobile-ui-active .task-workspace .task-workspace-list-summary {font-size:12px;color:#718299;margin:0;}
body.mobile-ui-active .task-workspace .business-list-sort-inline {margin:0;min-width:0;flex:1 1 180px;}
body.mobile-ui-active .task-workspace .business-list-sort {display:flex;align-items:center;justify-content:flex-end;gap:6px;}
body.mobile-ui-active .task-workspace .business-list-sort select {width:auto;max-width:220px;flex:1;}
body.mobile-ui-active .task-workspace-columns {display:none;}
body.mobile-ui-active .task-workspace .task-board-page-wrap {overflow:visible;min-height:0!important;height:auto!important;max-height:none!important;}
body.mobile-ui-active .task-workspace .task-board-list {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
body.mobile-ui-active .task-workspace .task-board-list>.task-card {padding:0;margin:0;border:1px solid #dfe6ef;border-radius:9px;overflow:visible;background:#fff;}
body.mobile-ui-active .task-workspace .task-board-list>.task-card:nth-child(even) {background:#f5f8fc;}
body.mobile-ui-active .task-workspace .task-workspace-row {display:grid;grid-template-columns:minmax(0,1fr);gap:5px;width:100%;margin:0;padding:12px;text-align:left;background:transparent;color:#20364f;border:0;}
body.mobile-ui-active .task-workspace .task-workspace-row>span {display:block;min-width:0;white-space:normal;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace .task-workspace-task>:is(strong,span) {display:block;}
body.mobile-ui-active .task-workspace .task-workspace-task strong {font-size:16px;}
body.mobile-ui-active .task-workspace .task-workspace-task .task-card-title {font-size:15px;color:#20364f;font-weight:600;line-height:1.5;}
body.mobile-ui-active .task-workspace .task-workspace-task>span {font-size:12px;color:#728198;}
body.mobile-ui-active .task-workspace .task-workspace-assignee::before {content:'处理人：';color:#728198;}
body.mobile-ui-active .task-workspace .task-workspace-time {font-size:12px;color:#728198;}
body.mobile-ui-active .task-workspace .task-workspace-time>span {display:block;}
body.mobile-ui-active .task-workspace .task-workspace-status {display:flex!important;gap:5px;flex-wrap:wrap;}
body.mobile-ui-active .task-workspace .task-workspace-open {color:#175cc3;text-align:right;}
body.mobile-ui-active .task-workspace .customer-fixed-pagination {position:static;display:flex;flex-wrap:wrap;gap:8px;min-height:0;margin:0;padding:10px 0 0;}
body.mobile-ui-active .task-workspace .list-page-size {display:flex;align-items:center;gap:6px;min-width:0;}
body.mobile-ui-active .task-workspace .list-page-size>span {white-space:nowrap;flex:none;}
body.mobile-ui-active .task-workspace #taskForm {display:block;width:100%;min-width:0;margin:0;padding:0;}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-section {margin:0 0 16px;padding:0 0 12px;border-bottom:1px solid #e5ebf2;}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-section-heading {font-size:16px;margin:0 0 10px;color:#20364f;}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-section-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
body.mobile-ui-active .task-workspace #taskForm .execution-form-field {display:block;grid-column:auto!important;min-width:0;}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-span-all {grid-column:1/-1!important;}
body.mobile-ui-active .task-workspace #taskForm label {display:block;font-size:13px;margin:0 0 4px;}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-hint {font-size:12px;color:#718299;line-height:1.6;}
body.mobile-ui-active .task-workspace .project-permission-toggle {min-height:44px;height:auto;white-space:normal;text-align:left;}
body.mobile-ui-active .task-workspace .project-permission-toggle-text {white-space:normal;overflow:visible;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace .project-permission-option {display:flex!important;align-items:center;gap:8px;min-height:44px;}
body.mobile-ui-active .task-workspace .task-detail-view {font-size:14px;line-height:1.6;}
body.mobile-ui-active .task-workspace .task-detail-view>.task-card {padding:0;border:0;background:transparent;overflow:visible;}
body.mobile-ui-active .task-workspace .task-detail-view .task-card-detail {padding:0;border:0;background:none;}
body.mobile-ui-active .task-workspace .task-detail-view .task-workspace-row {display:none;}
body.mobile-ui-active .task-workspace :is(.task-detail-header,.task-detail-section) {padding:12px;background:#fff;border:1px solid #dfe6ef;border-radius:10px;margin:0 0 10px;min-width:0;}
body.mobile-ui-active .task-workspace .task-detail-header .task-detail-section {border:0;padding:0;margin:10px 0 0;}
body.mobile-ui-active .task-workspace .task-detail-nav {margin:0 0 10px;}
body.mobile-ui-active .task-workspace .task-detail-back {width:auto;margin:0;}
body.mobile-ui-active .task-workspace .task-detail-heading {display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;}
body.mobile-ui-active .task-workspace .task-detail-heading h2 {font-size:17px;margin:3px 0 5px;overflow-wrap:anywhere;line-height:1.5;}
body.mobile-ui-active .task-workspace .task-detail-heading-meta {font-size:12px;color:#728198;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace .task-detail-fields {margin:0;display:grid;gap:7px;}
body.mobile-ui-active .task-workspace .task-detail-fields>div {display:grid;grid-template-columns:minmax(70px,30%) minmax(0,1fr);gap:6px;}
body.mobile-ui-active .task-workspace .task-detail-fields :is(dt,dd) {margin:0;min-width:0;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace .task-detail-fields dt {color:#728198;font-size:13px;}
body.mobile-ui-active .task-workspace :is(.task-detail-layout,.task-detail-main,.task-detail-sidebar) {display:block;min-width:0;}
body.mobile-ui-active .task-workspace .task-detail-section :is(h3,h4) {font-size:16px;margin:0 0 10px;}
body.mobile-ui-active .task-workspace :is(.task-detail-actions,.task-card-actions,.task-detail-submit-actions) {display:flex;flex-wrap:wrap;gap:8px;}
body.mobile-ui-active .task-workspace :is(.task-detail-actions,.task-card-actions,.task-detail-submit-actions)>button {flex:1 1 auto;margin:0;}
body.mobile-ui-active .task-workspace .task-detail-auxiliary {padding:0;margin:0 0 10px;border:1px solid #dfe6ef;border-radius:9px;background:#fff;}
body.mobile-ui-active .task-workspace .task-detail-auxiliary>summary {padding:8px 12px;color:#526c89;display:flex;align-items:center;justify-content:space-between;}
body.mobile-ui-active .task-workspace .task-detail-auxiliary:not([open])>:not(summary) {display:none!important;}
body.mobile-ui-active .task-workspace .task-detail-auxiliary>.task-detail-section {border:0;margin:0;}
body.mobile-ui-active .task-workspace :is(.task-result-form,.task-reassign-form,.task-reminder-form,.task-cancel-form,.task-history-item,.task-result-fields) {min-width:0;max-width:100%;}
body.mobile-ui-active .task-workspace :is(.task-result-form,.task-reassign-form,.task-reminder-form,.task-cancel-form) {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
body.mobile-ui-active .task-workspace :is(.task-result-form,.task-reassign-form,.task-reminder-form,.task-cancel-form)>* {grid-column:auto!important;min-width:0;max-width:100%;}
body.mobile-ui-active .task-workspace .task-result-form>:not(input):not(select):not(textarea):not(button) {height:auto;min-height:0;}
body.mobile-ui-active .task-workspace .task-detail-submit-actions {position:static;height:auto;min-height:0;margin:0;padding:8px 0 0;}
body.mobile-ui-active .task-workspace :is(.task-detail-submit-actions,.task-card-actions) button.secondary {background:white;color:#175cc3;border:1px solid #c8d8ed;}
body.mobile-ui-active .task-workspace .task-history-item {padding:10px;margin:0 0 8px;border:1px solid #e2e8f1;border-radius:8px;background:#f7f9fc;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace :is(.task-history-head,.task-history-meta) {display:flex;flex-wrap:wrap;gap:4px 10px;}
body.mobile-ui-active .task-workspace :is(.task-dispatch-file-list,.task-photo-draft-preview,.task-photo-grid) {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
body.mobile-ui-active .task-workspace .task-dispatch-file {display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px;border:1px solid #dfe6ef;border-radius:7px;min-width:0;}
body.mobile-ui-active .task-workspace .task-dispatch-file-name {flex:1;min-width:0;overflow-wrap:anywhere;}
body.mobile-ui-active .task-workspace .task-dispatch-file :is(img,button img) {max-width:80px;max-height:80px;object-fit:contain;}
body.mobile-ui-active .task-workspace .task-dispatch-file a {display:inline-flex;align-items:center;min-height:44px;}
body.mobile-ui-active .task-workspace #taskPhotoModal:not(.hidden) {display:flex!important;position:fixed;inset:0;z-index:4200;align-items:center;justify-content:center;padding:8px;}
body.mobile-ui-active .task-workspace #taskPhotoModal .preview-modal-card {position:relative;inset:auto;transform:none;width:min(720px,100%);max-height:calc(100dvh - 16px);min-width:0;padding:14px;box-sizing:border-box;overflow:auto;}
body.mobile-ui-active .task-workspace #taskPhotoModal h3 {padding-right:58px;min-height:44px;}
body.mobile-ui-active .task-workspace #taskPhotoModalClose {position:absolute;top:12px;right:12px;margin:0;}
body.mobile-ui-active .task-workspace #taskPhotoModal img {max-width:100%;max-height:calc(100dvh - 120px);object-fit:contain;}
body.mobile-ui-active:has(.task-workspace) #inlineHtmlPreviewModal:not(.hidden) {display:flex!important;position:fixed;inset:0;z-index:4300;padding:8px;align-items:center;justify-content:center;}
body.mobile-ui-active:has(.task-workspace) .inline-html-preview-card {width:100%;max-width:100%;min-width:0;max-height:calc(100dvh - 16px);margin:0;padding:12px;box-sizing:border-box;}
body.mobile-ui-active:has(.task-workspace) #inlineHtmlPreviewModal button {min-height:44px;min-width:44px;font-size:14px;}
body.mobile-ui-active:has(.task-workspace) .inline-html-preview-frame {width:100%;max-height:calc(100dvh - 110px);}
body.mobile-ui-active .task-workspace :is(.task-mobile-information,.task-mobile-attachments) {border:1px solid #dfe6ef;border-radius:8px;margin:10px 0;background:#fff;}
body.mobile-ui-active .task-workspace :is(.task-mobile-information,.task-mobile-attachments)>summary {padding:10px;color:#175cc3;}
body.mobile-ui-active .task-workspace :is(.task-mobile-information,.task-mobile-attachments):not([open])>:not(summary) {display:none!important;}
body.mobile-ui-active .task-workspace :is(.task-mobile-information,.task-mobile-attachments)>.task-detail-section {padding:10px;margin:0;border:0;}
body.mobile-ui-active .task-workspace .task-mobile-go-work {width:100%;margin:10px 0 0;background:#175cc3;color:white;border-color:#175cc3;}
body.mobile-ui-active .task-workspace :is(.task-detail-compose,.task-detail-acceptance,.task-mobile-steps) {scroll-margin-top:70px;}
body.mobile-ui-active .task-workspace .task-mobile-steps {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0 0 16px;}
body.mobile-ui-active .task-workspace .task-mobile-steps button {margin:0;padding:8px 3px;font-size:12px;background:#f4f7fb;color:#61758b;border-color:#dfe6ef;}
body.mobile-ui-active .task-workspace .task-mobile-steps button.active {color:#175cc3;background:#eaf2ff;border-color:#8db7ed;}
body.mobile-ui-active .task-workspace .task-mobile-step-actions {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;}
body.mobile-ui-active .task-workspace .task-mobile-step-actions .task-dispatch-note {flex-basis:100%;order:-1;}
body.mobile-ui-active .task-workspace .task-mobile-step-actions button {flex:1;margin:0;}
body.mobile-ui-active .task-workspace .task-mobile-step-actions .secondary {background:white;color:#175cc3;}
body.mobile-ui-active .task-workspace #taskForm .execution-form-field {font-weight:400;}
body.mobile-ui-active .task-workspace #taskForm .execution-form-field>span {font-weight:600;}
body.mobile-ui-active .task-workspace .task-business-details {display:block!important;}
@media(min-width:700px){
body.mobile-ui-active .task-workspace .task-board-filters {grid-template-columns:repeat(4,minmax(0,1fr));}
body.mobile-ui-active .task-workspace .task-board-list {grid-template-columns:repeat(2,minmax(0,1fr));}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-section-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
body.mobile-ui-active .task-workspace #taskForm .task-dispatch-span-all {grid-column:1/-1!important;}
}

/* Task-bound secondary business forms. */
 body.mobile-ui-active:has(.task-workspace) .cw-modal {position:fixed;inset:0;z-index:160;display:flex!important;align-items:center;justify-content:center;padding:8px!important;background:#15263b88;color:#20344b;box-sizing:border-box;height:var(--mobile-visible-height,100dvh)}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-shell {display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(var(--mobile-visible-height,100dvh) - 16px);min-width:0;overflow:hidden;background:#fff;border-radius:12px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-bottom:1px solid #dce5ef;flex:none}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-header h2 {font-size:17px;margin:2px 0;line-height:1.4}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-kicker {font-size:12px;color:#62758b}
 body.mobile-ui-active:has(.task-workspace) .cw-modal button {width:auto;min-height:44px;margin:0;padding:8px 12px;font-size:14px;line-height:1.4;border-radius:7px;white-space:normal;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-header button {flex:none;background:#f5f8fc;border:1px solid #d4e0ee;color:#175fc6}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-body {padding:12px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;font-size:14px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-message:not(:empty) {padding:10px 12px;border-bottom:1px solid #dce5ef;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-error {color:#b42318;background:#fff5f3}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-body>details {margin:0 0 8px;border:1px solid #dce5ef;border-radius:8px;padding:0 10px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal summary {min-height:44px;box-sizing:border-box;padding:12px 0;line-height:1.5;cursor:pointer}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-inbox>div {display:grid;gap:6px;padding:10px 0;border-top:1px solid #e5ebf3;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-inbox>div>span {color:#62758b;font-size:12px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-field {display:grid;min-width:0;gap:5px;font-size:14px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal :is(input:not([type=checkbox]),select,textarea) {box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-footer {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding:12px 0 0;border-top:1px solid #dce5ef}
 body.mobile-ui-active:has(.task-workspace) .cw-modal button:not([type=submit]) {background:#fff;color:#175fc6;border:1px solid #d4e0ee}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-actions {display:flex;flex-wrap:wrap;gap:8px;overflow:visible;margin-bottom:12px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-detail {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-detail>div {min-width:0;overflow-wrap:anywhere}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-detail dt {font-size:12px;color:#62758b;margin-bottom:4px}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-detail dd {margin:0;font-size:14px;line-height:1.5;white-space:pre-wrap}
 body.mobile-ui-active:has(.task-workspace) .cw-modal h3 {font-size:15px;line-height:1.5;margin:12px 0}
 body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-status {display:inline-block;padding:2px 6px;font-size:12px;font-weight:400;background:#eef4fd;border-radius:4px}
body.mobile-ui-active .task-workspace .task-mobile-legacy {margin:12px 0 0;padding:8px;border:1px solid #dfe6ef;border-radius:8px;background:#f7f9fc;}
body.mobile-ui-active .task-workspace .task-mobile-legacy>summary {padding:8px 0;color:#175cc3;}
body.mobile-ui-active .task-workspace .task-mobile-legacy>button {display:block;width:100%;text-align:left;margin:8px 0;background:white;color:#20364f;}
body.mobile-ui-active .task-workspace .task-mobile-legacy:not([open])>:not(summary) {display:none!important;}
body.mobile-ui-active:has(.task-workspace) .device-scope-dialog {width:calc(100% - 16px);max-width:640px;max-height:calc(100dvh - 16px);padding:12px;box-sizing:border-box;}
body.mobile-ui-active:has(.task-workspace) .device-scope-dialog :is(input,select,button) {min-height:44px;min-width:44px;max-width:100%;font-size:16px;box-sizing:border-box;}
body.mobile-ui-active:has(.task-workspace) .device-scope-dialog button {font-size:14px;white-space:normal;overflow-wrap:anywhere;}
body.mobile-ui-active:has(.task-workspace) .cw-modal :is(.cw-filters,.cw-list-actions) {display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0;}
body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-filters>* {flex:1 1 120px;min-width:0;}
body.mobile-ui-active:has(.task-workspace) .cw-modal .cw-table-wrap {overflow:visible;min-width:0;width:100%;}
body.mobile-ui-active:has(.task-workspace) .cw-modal :is(table,tbody) {display:block;width:100%;min-width:0;}
body.mobile-ui-active:has(.task-workspace) .cw-modal thead {display:none;}
body.mobile-ui-active:has(.task-workspace) .cw-modal tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;margin:8px 0;border:1px solid #dce5ef;border-radius:8px;background:#fff;}
body.mobile-ui-active:has(.task-workspace) .cw-modal tr:nth-child(even) {background:#f5f8fc;}
body.mobile-ui-active:has(.task-workspace) .cw-modal td {display:block;min-width:0;width:auto;padding:0;border:0;position:static!important;white-space:normal;overflow-wrap:anywhere;}
body.mobile-ui-active:has(.task-workspace) .cw-modal td[data-mobile-task-label]::before {content:attr(data-mobile-task-label);display:block;margin-bottom:4px;font-size:12px;color:#718299;}
body.mobile-ui-active:has(.task-workspace) .cw-modal td:first-child,body.mobile-ui-active:has(.task-workspace) .cw-modal td:last-child,body.mobile-ui-active:has(.task-workspace) .cw-modal td[colspan] {grid-column:1/-1;}
body.mobile-ui-active:has(.task-workspace) .cw-modal td:last-child {display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
body.mobile-ui-active:has(.task-workspace) .cw-modal td:last-child::before {width:100%;}

/* Stored attachments share this viewer across mobile business screens. */
body.mobile-ui-active .af-header {
  flex:0 0 auto; align-items:center; gap:12px; padding:10px 12px;
}
body.mobile-ui-active .af-header h3 {
  flex:1 1 auto; min-width:0; margin:0; padding:0;
  font-size:14px; line-height:20px; font-weight:600; color:#203b59;
  overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical;
  -webkit-line-clamp:2; overflow:hidden;
}
body.mobile-ui-active .af-header [data-af-close] {
  position:static; flex:0 0 44px; width:44px; min-width:44px; max-width:44px;
  height:36px; min-height:36px; margin:0; padding:0; border:1px solid #d7e2ef;
  border-radius:7px; background:#fff; color:#315b88; font-size:12px;
  font-weight:500; line-height:20px; box-shadow:none;
}
body.mobile-ui-active .af-header [data-af-close]:hover {background:#f3f7fc;}
body.mobile-ui-active .af-header [data-af-close]:focus-visible {outline:2px solid #4484df;outline-offset:2px;}
body.mobile-ui-active .af-dialog .af-body {min-height:0;min-width:0;}
