:root {
  color-scheme: light;
  --bg: #f4f5f6;
  --panel: #ffffff;
  --panel-soft: #f8f8f7;
  --text: #25282b;
  --muted: #687078;
  --line: #e2e5e8;
  --brand: #a91f1f;
  --brand-dark: #711717;
  --brand-2: #d3a04a;
  --danger: #b3262d;
  --warning: #8d5c04;
  --shadow: 0 2px 8px rgba(35, 40, 45, 0.045);
  --focus-ring: 0 0 0 3px rgba(169, 31, 31, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: light;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  gap: 16px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  box-shadow: none;
}

.brand h1 {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
}

.brand p,
.store-card label,
.store-meta,
.side-note span {
  color: var(--muted);
}

.store-card,
.side-note {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.store-card select {
  min-height: 40px;
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.side-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.nav-tabs {
  gap: 3px;
}

.nav-group-label {
  margin: 12px 8px 4px;
  color: #81878d;
  font-size: 11px;
  font-weight: 700;
}

.nav-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #4d5359;
  font-size: 14px;
  font-weight: 500;
}

.nav-tab:hover {
  background: #f6f7f8;
}

.nav-tab.active {
  border-color: #f2d8d8;
  background: #fbf0f0;
  color: var(--brand);
  font-weight: 650;
}

.nav-tab.active::before {
  top: 9px;
  bottom: 9px;
  left: 7px;
  width: 2px;
  background: var(--brand);
}

.side-note strong {
  color: var(--text);
}

.side-link {
  color: var(--brand);
}

.main {
  min-width: 0;
  padding: 26px 30px;
  overflow-x: hidden;
  background: var(--bg);
}

.topbar {
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  max-width: 820px;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
}

.view,
.view > section,
.panel,
.workspace-grid,
.settings-grid {
  min-width: 0;
}

.workspace-grid,
.settings-grid {
  gap: 14px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f1;
}

.panel h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.list,
.compact-list,
.alert-list,
.comment-list,
.check-list,
.template-items-list,
.members-list,
.task-mobile-list {
  display: grid;
  gap: 10px;
}

.log-item,
.check-item,
.compact-item,
.alert-item,
.comment-item,
.member-item,
.template-item,
.task-mobile-card,
.task-pc-card,
.task-detail-panel,
.task-summary-item,
.limit-card,
.price-card,
.upgrade-box,
.handover-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.log-item,
.check-item,
.compact-item,
.alert-item,
.comment-item,
.member-item,
.template-item,
.task-mobile-card,
.task-pc-card {
  padding: 13px;
}

.item-head,
.item-foot,
.task-card-topline,
.task-card-meta,
.task-column-head,
.platform-customer-meta {
  gap: 8px;
}

.item-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.item-content,
.task-detail-description,
.task-done-note {
  color: #41474c;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.muted,
.item-foot,
.task-card-meta,
.task-person,
.task-source {
  color: var(--muted);
}

.pill,
.task-status-label,
.task-category,
.task-detail-status,
.task-inline-state,
.platform-risk-pill,
.platform-renewal-tag {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.pill {
  border: 1px solid #e3e6e8;
  background: #f7f8f9;
  color: #50565c;
}

.pill.gold {
  border-color: #f0dfbb;
  background: #fff8e9;
  color: #80570d;
}

.pill.red,
.task-inline-error {
  border-color: #f0d0d0;
  background: #fff1f1;
  color: #9f2026;
}

.empty,
.task-state-card,
.task-detail-empty,
.task-column-empty {
  border: 1px dashed #d9dde0;
  border-radius: 8px;
  background: #fafbfb;
  color: var(--muted);
}

.empty {
  padding: 20px 14px;
  line-height: 1.55;
}

.quick-record button,
.template-quick-add button,
.log-category-options button,
.segment,
.member-role-chip,
.template-summary-chip {
  min-height: 38px;
  border: 1px solid #e0e3e5;
  border-radius: 7px;
  background: #fff;
  color: #4a5056;
  font-size: 13px;
  font-weight: 550;
}

.quick-record button:hover,
.template-quick-add button:hover,
.log-category-options button:hover,
.segment:hover {
  border-color: #d6b2b2;
  background: #fffafa;
}

.segment.active,
.log-category-options button.is-selected,
.member-role-chip.active {
  border-color: #e9c7c7;
  background: #fbefef;
  color: var(--brand);
}

.log-mobile-header,
.checks-mobile-header,
.expenses-mobile-header,
.handover-mobile-header,
.admin-mobile-header,
.mine-mobile-header {
  color: var(--text);
}

.log-mobile-heading h3,
.checks-mobile-header h3,
.expenses-mobile-header h3,
.handover-mobile-header h3,
.admin-mobile-header h3,
.mine-mobile-header h3 {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.log-mobile-heading p,
.checks-mobile-header p,
.expenses-mobile-header p,
.handover-mobile-header p,
.admin-mobile-header p,
.mine-mobile-header p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.log-template-row button {
  border-radius: 7px;
  font-weight: 550;
}

.log-media-action {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3f454a;
}

.log-media-action img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.log-category-picker {
  border-color: var(--line);
  border-radius: 8px;
}

.log-category-picker legend {
  color: #41474c;
  font-weight: 650;
}

.log-category-options button {
  justify-content: flex-start;
  gap: 7px;
  padding: 6px 9px;
}

.log-category-options img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.log-bottom-actions {
  padding-top: 12px;
  border-top: 1px solid #eef0f1;
}

.task-page-title h3 {
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
}

.task-toolbar {
  align-items: center;
  gap: 8px;
}

.task-summary {
  gap: 8px;
}

.task-summary-item {
  padding: 10px 12px;
}

.task-pc-layout {
  gap: 12px;
}

.task-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  box-shadow: none;
}

.task-column-head {
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.task-mobile-card,
.task-pc-card {
  border-left-width: 3px;
}

.task-mobile-card.is-overdue,
.task-pc-card.is-overdue {
  border-left-color: var(--danger);
}

.task-detail-panel {
  padding: 16px;
}

.task-controls button {
  min-height: 40px;
}

.checks-page-panel .check-calendar {
  position: static;
  height: auto;
  min-height: 0;
  margin: 10px 0 14px;
  padding: 14px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.check-calendar-head {
  align-items: center;
  color: var(--text);
}

.check-calendar-week,
.check-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.check-calendar-day {
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: #454b51;
}

.check-calendar-day.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.check-calendar-day.selected .calendar-day-num,
.check-calendar-day.selected .calendar-rate {
  color: inherit;
}

.check-stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
}

.check-stage-tabs .segment {
  min-height: 40px;
}

.check-item.is-done {
  border-left: 3px solid #2f8f5b;
}

.check-item.is-abnormal {
  border-left: 3px solid var(--danger);
}

.handover-grid {
  gap: 12px;
}

.handover-grid > section,
.handover-grid > article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.handover-metric {
  padding: 12px;
}

.mine-hero {
  padding: 20px;
  background: #fff;
}

.mine-grid {
  gap: 10px;
}

.mine-card {
  padding: 14px;
  cursor: pointer;
}

.mine-card:focus-visible {
  box-shadow: var(--focus-ring);
}

.mine-card p,
.mine-account-line {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.price-card.is-current {
  border-color: #d7a34b;
  background: #fffaf0;
}

.limit-card.is-danger {
  border-color: #efcaca;
  background: #fff6f6;
}

.upgrade-box {
  border-color: #eeddb9;
  background: #fffbf3;
}

.member-item,
.template-item {
  display: grid;
  gap: 10px;
}

.member-actions,
.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-actions .ghost-btn,
.template-actions .ghost-btn {
  min-height: 36px;
}

.member-item.is-disabled,
.template-item.is-disabled {
  background: #f8f9fa;
  opacity: 0.78;
}

.platform-kpi,
.platform-risk-card,
.platform-breakdown-block,
.platform-operation-card,
.platform-operation-group,
.platform-customer,
.platform-reminder-item,
.platform-alert-event {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}

.platform-kpi-grid,
.platform-ops-grid,
.platform-risk-panel,
.platform-operation-groups,
.platform-alert-events {
  gap: 10px;
}

.platform-operation-card:hover,
.platform-customer:hover {
  border-color: #cfd4d8;
  box-shadow: none;
}

.platform-filter-row,
.platform-reminder-toolbar,
.platform-timeline-toolbar {
  gap: 8px;
}

.platform-filter-row input,
.platform-filter-row select,
.platform-reminder-toolbar input,
.platform-reminder-toolbar select,
.platform-timeline-toolbar input,
.platform-timeline-toolbar select {
  min-height: 40px;
}

.photo-hint,
.fine-print,
.task-page-subhead {
  color: var(--muted);
  line-height: 1.5;
}

.primary-btn,
.ghost-btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.primary-btn {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

.primary-btn:hover:not(:disabled) {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.ghost-btn {
  border: 1px solid #d7dade;
  background: #fff;
  color: #33383d;
}

.ghost-btn:hover:not(:disabled) {
  border-color: #b9bec3;
  background: #f8f9fa;
}

.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.55;
}

input,
select,
textarea {
  max-width: 100%;
  border-color: #d9dde0;
  border-radius: 6px;
  background-color: #fff;
  color: var(--text);
  font-size: 14px;
}

input::placeholder,
textarea::placeholder {
  color: #8a9096;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: var(--focus-ring);
}

label {
  color: #41474c;
  font-size: 13px;
  font-weight: 600;
}

.mobile-app-head {
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.mobile-head-avatar {
  border: 1px solid #f0d5d5;
  background: #fbefef;
  color: var(--brand);
}

.mobile-head-main span,
.mobile-head-main strong {
  color: var(--text);
}

.mobile-head-main p {
  color: var(--muted);
}

.mobile-head-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--brand);
}

.workbench-hero,
.mine-hero,
.home-ops-panel,
.home-flow-card,
.stat,
.mine-card,
.platform-operation-card,
.platform-operation-group,
.platform-customer,
.platform-reminder-item,
.platform-alert-event {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.workbench-hero,
.mine-hero,
.home-ops-panel,
.mine-card,
.platform-operation-card,
.platform-operation-group,
.platform-customer,
.platform-reminder-item,
.platform-alert-event {
  background: #fff;
}

.home-flow-card {
  background: var(--panel-soft);
}

.login-screen {
  background: var(--bg);
  color: var(--text);
}

.login-screen::before,
.login-screen::after {
  display: none !important;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(35, 40, 45, 0.07);
  color: var(--text);
}

.login-panel h3,
.login-panel label {
  color: var(--text);
}

.login-brand h1,
.login-hero h2 {
  color: var(--text);
}

.login-brand p,
.login-lead {
  color: var(--muted);
}

.login-kicker,
.login-points span {
  border-color: #ead2d2;
  background: #fff;
  color: var(--brand);
}

.login-phone-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 40, 45, 0.06);
  filter: none;
}

.login-panel input,
.login-panel select {
  min-height: 44px;
  border: 1px solid #d9dde0;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.report-preview,
.platform-grid,
.platform-kpi,
.platform-risk-card,
.platform-breakdown-block,
.report-send-history {
  border-radius: 8px;
}

.platform-section-title,
.platform-operation-card strong,
.platform-operation-group strong,
.platform-customer strong,
.platform-alert-event strong {
  color: var(--text);
}

.table-wrap,
.table-scroll,
.report-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 24, 28, 0.16);
}

@media (max-width: 1100px) and (min-width: 761px) {
  .app-shell {
    grid-template-columns: 214px minmax(0, 1fr);
  }

  .main {
    padding: 22px;
  }

  .workspace-grid,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body:not(.is-home):not(.is-locked) {
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
  }

  body:not(.is-home):not(.is-locked) .app-shell {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
  }

  body:not(.is-home):not(.is-locked) .sidebar {
    display: none !important;
  }

  body:not(.is-home):not(.is-locked) .main {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 14px calc(84px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
  }

  body:not(.is-home):not(.is-locked) .mobile-app-head {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 72px;
    margin: 0 -14px 12px;
    padding: max(10px, env(safe-area-inset-top, 0px)) 14px 10px;
    border-radius: 0;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
  }

  body:not(.is-home):not(.is-locked) .mobile-tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 10px rgba(35, 40, 45, 0.04);
    transform: none;
    overflow: hidden;
    backdrop-filter: blur(12px);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    height: auto;
    padding: 3px 2px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #70767c;
    transform: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab.active {
    background: transparent;
    color: var(--brand);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: grayscale(1) opacity(0.66);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab.active .tab-icon {
    background: transparent;
    filter: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon img {
    display: block;
    width: 21px;
    height: 21px;
    margin: 0;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::before,
  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::after {
    display: none !important;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab strong {
    max-width: 100%;
    color: inherit;
    font-size: 11px;
    font-weight: 550;
    line-height: 1.2;
    white-space: nowrap;
  }

  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid,
  body:not(.is-home):not(.is-locked) .form {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid {
    gap: 12px;
  }

  body:not(.is-home):not(.is-locked) .panel {
    padding: 14px;
  }

  body:not(.is-home):not(.is-locked) .topbar {
    display: none;
  }

  .login-screen {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 12px;
    min-height: 100vh;
    min-height: 100svh;
    padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
  }

  .login-hero {
    display: none;
  }

  .login-panel {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 20px;
  }

  #tasksView .task-page-panel {
    margin: 0 -14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #tasksView .task-page-header {
    min-height: 60px;
    padding: 10px 14px;
    background: #fff;
    color: var(--text);
  }

  #tasksView .task-page-header div span {
    color: var(--muted);
  }

  #tasksView .task-header-count {
    border: 1px solid #f0d8d8;
    background: #fbf0f0;
    color: var(--brand);
  }
}

/* WeCom may report a desktop viewport inside its WebView. Keep its signed-in
   experience on the same compact operating surface as ordinary H5. */
body.is-wecom-login:not(.is-home):not(.is-locked) {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

body.is-wecom-login:not(.is-home):not(.is-locked) .app-shell {
  display: block;
  min-height: 100vh;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .sidebar,
body.is-wecom-login:not(.is-home):not(.is-locked) .topbar {
  display: none !important;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .main {
  min-height: 100vh;
  padding: 0 14px calc(84px + env(safe-area-inset-bottom, 0px));
  overflow: visible;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-app-head {
  display: grid !important;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 80;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  min-height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -2px 10px rgba(35, 40, 45, 0.04);
  transform: none;
  overflow: hidden;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  height: auto;
  padding: 3px 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #70767c;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab.active {
  color: var(--brand);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  background: transparent;
  box-shadow: none;
  filter: grayscale(1) opacity(0.66);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab.active .tab-icon {
  filter: none;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab strong {
  color: inherit;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 380px) {
  body:not(.is-home):not(.is-locked) .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  body:not(.is-home):not(.is-locked) .mobile-app-head {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .login-panel {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  body:not(.is-home):not(.is-locked) .mobile-work-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status > div {
    width: 100%;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status::after {
    grid-column: 1;
    margin-top: 4px;
  }
}

/* Direction 2 cascade: align earlier, higher-specificity page rules. */
:root {
  --bg: #f4f5f6;
  --panel: #ffffff;
  --panel-soft: #f8f9fa;
  --text: #25282b;
  --muted: #687078;
  --line: #e2e5e8;
  --brand: #a91f1f;
  --brand-dark: #781818;
  --brand-2: #c99a4a;
  --danger: #b3262d;
  --warning: #8d5c04;
  --shadow: 0 2px 8px rgba(35, 40, 45, 0.045);
  --h5-bg: #f4f5f6;
  --h5-surface: #ffffff;
  --h5-line: #e2e5e8;
  --h5-ink: #25282b;
  --h5-muted: #687078;
  --h5-brand: #a91f1f;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: 0;
}

.nav-tab[data-view="home"],
.nav-tab[data-view="workbench"] { --nav-icon: url("/assets/figma-tab-today.svg"); }
.nav-tab[data-view="logs"] { --nav-icon: url("/assets/figma-action-log.svg"); }
.nav-tab[data-view="tasks"] { --nav-icon: url("/assets/figma-tab-task.svg"); }
.nav-tab[data-view="checks"] { --nav-icon: url("/assets/figma-tab-check.svg"); }
.nav-tab[data-view="expenses"],
.nav-tab[data-view="billing"] { --nav-icon: url("/assets/figma-status-expense.svg"); }
.nav-tab[data-view="handover"],
.nav-tab[data-view="report"] { --nav-icon: url("/assets/figma-recent-log.svg"); }
.nav-tab[data-view="mine"] { --nav-icon: url("/assets/figma-tab-mine.svg"); }
.nav-tab[data-view="settings"] { --nav-icon: url("/assets/figma-log-category.svg"); }
.nav-tab[data-view="trial"] { --nav-icon: url("/assets/figma-status-check.svg"); }
.nav-tab[data-view="platform"] { --nav-icon: url("/assets/figma-task-assignee.svg"); }

@media (min-width: 761px) {
  body:not(.is-home):not(.is-locked) {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bg);
  }

  body:not(.is-home):not(.is-locked) .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    gap: 14px;
    padding: 18px 12px;
    border-right: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .brand {
    padding: 2px 4px 8px;
  }

  body:not(.is-home):not(.is-locked) .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 8px;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .brand h1 {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
  }

  body:not(.is-home):not(.is-locked) .brand p,
  body:not(.is-home):not(.is-locked) .store-card label,
  body:not(.is-home):not(.is-locked) .store-meta,
  body:not(.is-home):not(.is-locked) .side-note span {
    color: var(--muted);
  }

  body:not(.is-home):not(.is-locked) .store-card,
  body:not(.is-home):not(.is-locked) .side-note {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .store-card select {
    min-height: 38px;
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .side-btn {
    min-height: 36px;
    border-color: var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .nav-tabs {
    gap: 3px;
  }

  body:not(.is-home):not(.is-locked) .nav-group-label {
    margin: 12px 8px 4px;
    color: #81878d;
    font-size: 11px;
    font-weight: 650;
  }

  body:not(.is-home):not(.is-locked) .nav-tab {
    position: relative;
    min-height: 39px;
    padding: 8px 8px 8px 39px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #50565c;
    font-size: 13px;
    font-weight: 550;
    text-align: left;
  }

  body:not(.is-home):not(.is-locked) .nav-tab::after {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    background: currentColor;
    -webkit-mask-image: var(--nav-icon);
    mask-image: var(--nav-icon);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    content: "";
  }

  body:not(.is-home):not(.is-locked) .nav-tab:hover {
    background: #f6f7f8;
    color: #343a40;
  }

  body:not(.is-home):not(.is-locked) .nav-tab.active {
    border-color: #f0d8d8;
    background: #fbf1f1;
    color: var(--brand);
    font-weight: 650;
  }

  body:not(.is-home):not(.is-locked) .nav-tab.active::before {
    top: 9px;
    bottom: 9px;
    left: 5px;
    width: 2px;
    background: var(--brand);
  }

  body:not(.is-home):not(.is-locked) .main {
    min-width: 0;
    padding: 20px 28px 28px;
    overflow-x: hidden;
    background: var(--bg);
  }

  body:not(.is-home):not(.is-locked) .topbar {
    align-items: center;
    min-height: 70px;
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
  }

  body:not(.is-home):not(.is-locked) .topbar h2 {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) .topbar .eyebrow {
    color: var(--muted);
  }

  body:not(.is-home):not(.is-locked) .view {
    width: 100%;
    max-width: 1520px;
    margin-inline: auto;
  }

  body:not(.is-home):not(.is-locked) .mobile-app-head {
    display: none !important;
  }

  body:not(.is-home):not(.is-locked) .panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  body:not(.is-home):not(.is-locked) .panel-head {
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f1;
  }

  body:not(.is-home):not(.is-locked) .panel h3 {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
  }

  body:not(.is-home):not(.is-locked) .stats-grid,
  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid,
  body:not(.is-home):not(.is-locked) .platform-kpi-grid,
  body:not(.is-home):not(.is-locked) .platform-ops-grid {
    gap: 12px;
  }

  body:not(.is-home):not(.is-locked) .stat,
  body:not(.is-home):not(.is-locked) .platform-kpi,
  body:not(.is-home):not(.is-locked) .platform-risk-card,
  body:not(.is-home):not(.is-locked) .platform-breakdown-block,
  body:not(.is-home):not(.is-locked) .platform-operation-card,
  body:not(.is-home):not(.is-locked) .platform-operation-group,
  body:not(.is-home):not(.is-locked) .platform-customer,
  body:not(.is-home):not(.is-locked) .platform-reminder-item,
  body:not(.is-home):not(.is-locked) .platform-alert-event,
  body:not(.is-home):not(.is-locked) .report-preview,
  body:not(.is-home):not(.is-locked) .report-send-history {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-tabbar {
    display: none !important;
  }

  body.is-locked .login-screen {
    min-height: 100vh;
    min-height: 100svh;
    padding: 48px clamp(32px, 7vw, 112px);
    background: var(--bg);
    color: var(--text);
  }

  body.is-locked .login-panel {
    width: min(100%, 460px);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(35, 40, 45, 0.07);
  }
}

@media (max-width: 960px) and (min-width: 761px) {
  body:not(.is-home):not(.is-locked) .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  body:not(.is-home):not(.is-locked) .main {
    padding: 18px;
  }

  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body:not(.is-home):not(.is-locked) {
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .app-shell {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
  }

  body:not(.is-home):not(.is-locked) .sidebar,
  body:not(.is-home):not(.is-locked) .topbar {
    display: none !important;
  }

  body:not(.is-home):not(.is-locked) .main {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 14px calc(84px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
    background: var(--bg);
  }

  body:not(.is-home):not(.is-locked) .mobile-app-head {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
    margin: 0 -14px 8px;
    padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
    backdrop-filter: blur(12px);
  }

  body:not(.is-home):not(.is-locked) .mobile-head-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    border: 1px solid #f0d5d5;
    border-radius: 50%;
    background: #fbefef;
    color: var(--brand);
    font-size: 15px;
    font-weight: 700;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-main {
    min-width: 0;
    gap: 1px;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-main span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-main strong {
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-main p {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.is-home):not(.is-locked) .mobile-head-action {
    min-width: 52px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-surface {
    display: block;
    padding: 0;
    background: transparent;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 0;
    margin: 0;
    padding: 16px 0 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status > div {
    min-width: 0;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status > div > span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-title {
    display: block;
    margin: 7px 0 0;
    color: var(--text);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.32;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-status strong,
  body:not(.is-home):not(.is-locked) .mobile-work-status p {
    display: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-mini-btn {
    min-width: 44px;
    min-height: 34px;
    margin: 0;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    align-content: center;
    min-width: 0;
    min-height: 96px;
    padding: 11px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card-main {
    grid-column: 1 / -1;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 11px;
    min-height: 68px;
    padding: 12px 14px;
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card em {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 7px;
    background: #fbefef;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card em img {
    display: block;
    width: 21px;
    height: 21px;
    object-fit: contain;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card strong {
    max-width: 100%;
    color: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card span {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card-main span {
    color: rgba(255, 255, 255, 0.82);
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(2),
  body:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(3),
  body:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(4) {
    background: #ffffff;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(2) em,
  body:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(4) em {
    background: #fff8e9;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 68px;
    margin-top: 10px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-prompt > div:first-child {
    min-width: 0;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-prompt strong,
  body:not(.is-home):not(.is-locked) .mobile-capture-prompt span {
    display: block;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-prompt strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-prompt span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-action {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid #f0d8d8;
    border-radius: 7px;
    background: #fbf1f1;
  }

  body:not(.is-home):not(.is-locked) .mobile-capture-action img {
    display: block;
    width: 21px;
    height: 21px;
    object-fit: contain;
  }

  body:not(.is-home):not(.is-locked) .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 12px 0 0;
  }

  body:not(.is-home):not(.is-locked) .stat {
    min-width: 0;
    min-height: 66px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .stat span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
  }

  body:not(.is-home):not(.is-locked) .stat strong {
    margin-top: 5px;
    color: var(--text);
    font-size: 19px;
    line-height: 1.1;
  }

  body:not(.is-home):not(.is-locked) .workbench-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  body:not(.is-home):not(.is-locked) .workbench-role-grid article,
  body:not(.is-home):not(.is-locked) .workflow-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .workbench-role-grid article span,
  body:not(.is-home):not(.is-locked) .workflow-card em {
    color: var(--brand);
    font-size: 11px;
  }

  body:not(.is-home):not(.is-locked) .workbench-role-grid article strong,
  body:not(.is-home):not(.is-locked) .workflow-card strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) .workbench-role-grid article p,
  body:not(.is-home):not(.is-locked) .workflow-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) .simple-workflow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  body:not(.is-home):not(.is-locked) .view > section,
  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid {
    min-width: 0;
  }

  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid,
  body:not(.is-home):not(.is-locked) .form {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.is-home):not(.is-locked) .workspace-grid,
  body:not(.is-home):not(.is-locked) .settings-grid {
    gap: 10px;
  }

  body:not(.is-home):not(.is-locked) .panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .panel-head {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-color: #eef0f1;
  }

  body:not(.is-home):not(.is-locked) .panel h3 {
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) .log-mobile-header,
  body:not(.is-home):not(.is-locked) .checks-mobile-header,
  body:not(.is-home):not(.is-locked) .expenses-mobile-header,
  body:not(.is-home):not(.is-locked) .handover-mobile-header,
  body:not(.is-home):not(.is-locked) .admin-mobile-header,
  body:not(.is-home):not(.is-locked) .mine-mobile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 0 10px;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) .log-mobile-heading h3,
  body:not(.is-home):not(.is-locked) .checks-mobile-header h3,
  body:not(.is-home):not(.is-locked) .expenses-mobile-header h3,
  body:not(.is-home):not(.is-locked) .handover-mobile-header h3,
  body:not(.is-home):not(.is-locked) .admin-mobile-header h3,
  body:not(.is-home):not(.is-locked) .mine-mobile-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
  }

  body:not(.is-home):not(.is-locked) .log-mobile-heading p,
  body:not(.is-home):not(.is-locked) .checks-mobile-header p,
  body:not(.is-home):not(.is-locked) .expenses-mobile-header p,
  body:not(.is-home):not(.is-locked) .handover-mobile-header p,
  body:not(.is-home):not(.is-locked) .admin-mobile-header p,
  body:not(.is-home):not(.is-locked) .mine-mobile-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
  }

  body:not(.is-home):not(.is-locked) .admin-mobile-back,
  body:not(.is-home):not(.is-locked) .expenses-back-btn {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
  }

  body:not(.is-home):not(.is-locked) .admin-mobile-back img,
  body:not(.is-home):not(.is-locked) .expenses-back-btn img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  body:not(.is-home):not(.is-locked) input,
  body:not(.is-home):not(.is-locked) select,
  body:not(.is-home):not(.is-locked) textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d9dde0;
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
  }

  body:not(.is-home):not(.is-locked) textarea {
    min-height: 116px;
    resize: vertical;
  }

  body:not(.is-home):not(.is-locked) input::placeholder,
  body:not(.is-home):not(.is-locked) textarea::placeholder {
    color: #7b8288;
    opacity: 1;
  }

  body:not(.is-home):not(.is-locked) label {
    color: #41474c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }

  body:not(.is-home):not(.is-locked) .primary-btn,
  body:not(.is-home):not(.is-locked) .ghost-btn {
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
  }

  body:not(.is-home):not(.is-locked) .primary-btn {
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .ghost-btn {
    border: 1px solid #d7dade;
    background: #ffffff;
    color: #33383d;
  }

  body:not(.is-home):not(.is-locked) .log-media-action,
  body:not(.is-home):not(.is-locked) .quick-record button,
  body:not(.is-home):not(.is-locked) .template-quick-add button,
  body:not(.is-home):not(.is-locked) .log-category-options button,
  body:not(.is-home):not(.is-locked) .segment {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: #454b51;
  }

  body:not(.is-home):not(.is-locked) .segment.active,
  body:not(.is-home):not(.is-locked) .log-category-options button.is-selected {
    border-color: #e9c7c7;
    background: #fbefef;
    color: var(--brand);
  }

  body:not(.is-home):not(.is-locked) .log-category-picker {
    border-color: var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  body:not(.is-home):not(.is-locked) .log-media-action img {
    width: 22px;
    height: 22px;
    object-fit: contain;
  }

  body:not(.is-home):not(.is-locked) #tasksView .task-page-panel {
    margin: 0 -14px;
    padding: 0 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) #tasksView .task-page-header {
    min-height: 58px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
  }

  body:not(.is-home):not(.is-locked) #tasksView .task-page-header div span,
  body:not(.is-home):not(.is-locked) .task-page-subhead {
    color: var(--muted);
  }

  body:not(.is-home):not(.is-locked) .task-summary-item,
  body:not(.is-home):not(.is-locked) .task-mobile-card,
  body:not(.is-home):not(.is-locked) .task-state-card,
  body:not(.is-home):not(.is-locked) .task-detail-panel {
    border-color: var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .task-status-label,
  body:not(.is-home):not(.is-locked) .task-category,
  body:not(.is-home):not(.is-locked) .task-inline-state {
    border-radius: 999px;
  }

  body:not(.is-home):not(.is-locked) .checks-page-panel .check-calendar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 10px 0 14px;
    padding: 12px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .check-calendar-grid,
  body:not(.is-home):not(.is-locked) .check-calendar-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  body:not(.is-home):not(.is-locked) .check-calendar-day {
    min-width: 0;
    min-height: 38px;
    padding: 3px 1px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #ffffff;
    color: #454b51;
  }

  body:not(.is-home):not(.is-locked) .check-calendar-day.selected {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
  }

  body:not(.is-home):not(.is-locked) .check-stage-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f9fa;
  }

  body:not(.is-home):not(.is-locked) .check-stage-tabs .segment {
    min-width: 0;
    min-height: 42px;
    padding: 6px 3px;
    font-size: 12px;
  }

  body:not(.is-home):not(.is-locked) .check-item,
  body:not(.is-home):not(.is-locked) .log-item,
  body:not(.is-home):not(.is-locked) .compact-item,
  body:not(.is-home):not(.is-locked) .expense-item,
  body:not(.is-home):not(.is-locked) .handover-metric {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) .mine-mobile-header {
    justify-content: space-between;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-hero {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #f0d5d5;
    border-radius: 50%;
    background: #fbefef;
    color: var(--brand);
    font-size: 18px;
    font-weight: 700;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-card {
    min-width: 0;
    min-height: 112px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-card:nth-child(4) {
    grid-column: 1 / -1;
    min-height: 0;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-card > span,
  body:not(.is-home):not(.is-locked) #mineView .mine-card-heading span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-card strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
  }

  body:not(.is-home):not(.is-locked) #mineView .mine-actions .primary-btn,
  body:not(.is-home):not(.is-locked) #mineView .mine-actions .ghost-btn {
    min-width: 0;
    min-height: 42px;
    padding: 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  body:not(.is-home):not(.is-locked) .mine-logout-btn {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: #4f555b;
    font-size: 12px;
  }

  body:not(.is-home):not(.is-locked) .mobile-tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 10px rgba(35, 40, 45, 0.04);
    transform: none;
    overflow: hidden;
    backdrop-filter: blur(12px);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    height: auto;
    padding: 3px 2px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #70767c;
    transform: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab.active {
    background: transparent;
    color: var(--brand);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon {
    display: grid;
    place-items: center;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    min-width: 23px;
    min-height: 23px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: grayscale(1) opacity(0.72);
  }

  body:not(.is-home):not(.is-locked) .mobile-tab.active .tab-icon {
    background: transparent;
    filter: none;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon img {
    display: block;
    width: 21px;
    height: 21px;
    margin: 0;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::before,
  body:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::after {
    display: none !important;
  }

  body:not(.is-home):not(.is-locked) .mobile-tab strong {
    max-width: 100%;
    color: inherit;
    font-size: 11px;
    font-weight: 550;
    line-height: 1.2;
    white-space: nowrap;
  }

  body.is-locked .login-screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 10px;
    min-height: 100vh;
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top, 0px)) 14px max(18px, env(safe-area-inset-bottom, 0px));
    overflow: visible;
    background: var(--bg);
    color: var(--text);
  }

  body.is-locked .login-hero {
    display: none;
  }

  body.is-locked .login-panel {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(35, 40, 45, 0.05);
  }

  body.is-locked .login-panel h3 {
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
  }

  body.is-locked .login-panel label {
    color: #41474c;
    font-size: 13px;
    font-weight: 600;
  }

  body.is-locked .login-panel input,
  body.is-locked .login-panel select {
    min-height: 44px;
    border: 1px solid #d9dde0;
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font-size: 16px;
  }

  body.is-locked .login-kicker,
  body.is-locked .login-points span {
    border-color: #ead2d2;
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand);
  }

  body.is-locked .login-tip,
  body.is-locked .login-home-hint {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8f9fa;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
  }

  .table-wrap,
  .table-scroll,
  .report-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

/* WeCom can report a desktop-sized viewport while rendering on a phone. */
body.is-wecom-login:not(.is-home):not(.is-locked) {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .app-shell {
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .sidebar,
body.is-wecom-login:not(.is-home):not(.is-locked) .topbar {
  display: none !important;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .main {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 14px calc(84px + env(safe-area-inset-bottom, 0px));
  overflow: visible;
  background: var(--bg);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-app-head {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  margin: 0 -14px 8px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-status {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 0;
  margin: 0;
  padding: 16px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-title {
  display: block;
  margin: 7px 0 0;
  color: var(--text);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.32;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-status strong,
body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-status p {
  display: none;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-content: center;
  min-width: 0;
  min-height: 96px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card-main {
  grid-column: 1 / -1;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 11px;
  min-height: 68px;
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card em {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 7px;
  background: #fbefef;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card em img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.3;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card-main span {
  color: rgba(255, 255, 255, 0.82);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(2),
body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(3),
body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card:nth-child(4) {
  background: #ffffff;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-capture-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-capture-prompt strong {
  color: var(--text);
  font-size: 13px;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-capture-prompt span {
  color: var(--muted);
  font-size: 11px;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-capture-action {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid #f0d8d8;
  border-radius: 7px;
  background: #fbf1f1;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-capture-action img {
  display: block;
  width: 21px;
  height: 21px;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 12px 0 0;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .stat {
  min-height: 66px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .stat span {
  color: var(--muted);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .stat strong {
  color: var(--text);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 80;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  min-height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -2px 10px rgba(35, 40, 45, 0.04);
  transform: none;
  overflow: hidden;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: #70767c;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab.active {
  color: var(--brand);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  margin: 0;
  background: transparent;
  box-shadow: none;
  filter: grayscale(1) opacity(0.72);
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab.active .tab-icon {
  filter: none;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon img {
  display: block;
  width: 21px;
  height: 21px;
  margin: 0;
  object-fit: contain;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::before,
body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab .tab-icon::after {
  display: none !important;
}

body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tab strong {
  color: inherit;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 380px) {
  body:not(.is-home):not(.is-locked) .mobile-work-actions-grid,
  body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-actions-grid {
    gap: 6px;
  }

  body:not(.is-home):not(.is-locked) .mobile-work-card,
  body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-work-card {
    padding-right: 7px;
    padding-left: 7px;
  }

  body:not(.is-home):not(.is-locked) .mobile-tabbar,
  body.is-wecom-login:not(.is-home):not(.is-locked) .mobile-tabbar {
    padding-right: 5px;
    padding-left: 5px;
  }
}
