/* Reset & Base */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --fs-xxs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-xxl: 20px;
  --fs-display: 24px;
}
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  font-size: var(--fs-md);
}

/* Layout */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 480px; /* 限制最大宽度，模拟移动端 */
  margin: 0 auto;
  background: #f9f9f9; /* 整体背景偏灰白 */
  position: relative;
  overflow: hidden;
}

#app-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 0;
}

.page {
  min-height: 100%;
}

.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(88vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(30, 33, 40, 0.92);
  color: #fff;
  font-size: var(--fs-sm, 13px);
  line-height: 1.4;
  text-align: center;
  z-index: 3000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  word-break: break-word;
}

/* Buttons */
.btn { border: none; border-radius: 6px; padding: 12px 20px; font-size: var(--fs-md); cursor: pointer; text-align: center; font-weight: 500; }
.btn-primary { background: #FF6B35; color: #fff; }
.btn-secondary { background: #fff; border: 1px solid #ddd; color: #333; }
.btn-block { display: flex; width: 100%; justify-content: center; align-items: center; }

/* Unified Info Card Style */
.info-card .card-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
  border-left: 4px solid #FF6B35;
  padding-left: 10px;
}

/* Home Page specific */
.card {
  background: #fff;
  border-radius: 8px; /* Match list page */
  padding: 15px; /* Standardize padding */
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* User Info Card - Modified to Orange Theme */
.user-info-card {
  background: linear-gradient(135deg, #FF6B35 0%, #FF9C6E 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}
.user-info-card .user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff; /* White text on orange */
}
.user-info-card .user-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Stats Card */
.stats-card .card-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 500;
  border-left: 3px solid #FF6B35; /* Orange accent */
  padding-left: 8px;
}
.stats-grid {
  display: flex;
  justify-content: space-around; /* Changed from space-between to reduce spacing gaps visually */
  padding: 0 10px; /* Add padding to bring items closer */
  text-align: center;
  margin-bottom: 20px;
}
.stat-col .num {
  font-size: 20px;
  font-weight: bold;
  color: #FF6B35; /* Changed from #333 to Orange */
  margin-bottom: 8px;
}
.stat-col .label {
  font-size: 12px;
  color: #666;
}
.card-footer {
  text-align: center;
}
.btn-outline {
  background: #fff;
  border: 1.5px solid #FF6B35; /* Slightly thicker border */
  border-radius: 16px; /* Capsule shape for 32px height */
  padding: 0 20px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #FF6B35;
  cursor: pointer;
  font-weight: bold;
}

/* Contact Bar */
.contact-bar {
  background: #fff;
  border-radius: 20px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.contact-bar .label {
  font-size: 13px;
  color: #333;
}
.contact-bar .action {
  font-size: 13px;
  color: #FF6B35; /* Orange text */
  cursor: pointer;
  font-weight: bold;
}

/* Brand Footer */
.brand-footer {
  text-align: center;
  padding-bottom: 20px;
}
.brand-logo {
  font-size: 14px;
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}
.brand-logo .icon {
  font-size: 16px;
  filter: grayscale(100%);
  opacity: 0.5;
}
.brand-slogan {
  font-size: 10px;
  color: #ddd;
  letter-spacing: 2px;
}

/* Report Page Styles */
.report-content {
  padding: 15px;
}
.clickable-row {
  cursor: pointer;
}
.clickable-row .arrow {
  color: #ccc;
  font-size: 18px;
  margin-left: 5px;
}

.photo-card {
  padding: 15px;
}
.photo-tip {
  font-size: 12px;
  color: #999;
  margin-bottom: 15px;
  line-height: 1.4;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.photo-item {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px dashed #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
}
.photo-item .icon {
  font-size: 24px;
  color: #ccc;
  margin-bottom: 5px;
}
.photo-item .text {
  font-size: 14px;
  color: #666;
  font-weight: bold;
  margin-bottom: 4px;
}
.photo-item .sub-text {
  font-size: 11px;
  color: #999;
}
.photo-item.upload-btn:active {
  background: #f9f9f9;
}

/* Income Page Styles */
.income-v2-page {
  margin: 0;
  min-height: 100%;
  background: #f2f3f5;
  display: flex;
  flex-direction: column;
}

.income-content {
  padding: 15px;
  padding-bottom: 130px; /* Space for bottom bar + batch actions */
}

.income-v2-page .income-empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #9fa3ac;
}

.income-v2-page .income-empty-state .icon {
  line-height: 1;
}

.income-v2-page .income-empty-icon-img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  display: block;
}

.income-v2-page .income-empty-state .text {
  margin-top: 10px;
  font-size: var(--fs-sm, 13px);
}

.account-card {
  padding: 15px;
}
.account-card .user-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.account-card .user-name {
  font-size: 16px;
  font-weight: bold;
}
.account-card .user-detail {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.month-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 10px;
  padding: 0 5px;
}
.month-bar .month-text {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}
.month-bar .show-all {
  font-size: 12px;
  color: #666;
}

.income-date-wheel-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.income-date-wheel-column {
  min-width: 0;
}

.income-date-wheel-head {
  font-size: var(--fs-xs, 12px);
  color: #999;
  margin-bottom: 6px;
}

.income-date-wheel-box {
  position: relative;
  height: 200px;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
}

.income-date-wheel {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.income-date-wheel::-webkit-scrollbar {
  display: none;
}

.income-date-wheel-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md, 14px);
  color: #999;
  scroll-snap-align: center;
  user-select: none;
}

.income-date-wheel-item.active {
  color: #333;
  font-weight: 600;
  font-size: var(--fs-lg, 16px);
}

.income-date-wheel-item.placeholder {
  color: transparent;
  pointer-events: none;
}

.income-date-wheel-mask {
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  z-index: 3;
}

.income-date-wheel-mask.top {
  top: 0;
  background: linear-gradient(to bottom, #fff 20%, rgba(255, 255, 255, 0));
}

.income-date-wheel-mask.bottom {
  bottom: 0;
  background: linear-gradient(to top, #fff 20%, rgba(255, 255, 255, 0));
}

.income-date-wheel-indicator {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 80px;
  height: 40px;
  border-radius: 8px;
  background: #f5f5f5;
  pointer-events: none;
  z-index: 1;
}

.income-item-card {
  padding: 12px 15px;
  margin-bottom: 10px;
}
.income-item-card .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.income-item-card .item-title {
  font-size: 14px;
  font-weight: bold;
}
.income-item-card .item-status-text {
  font-size: 12px;
  color: #666;
}
.income-item-card .item-body .info-row {
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}
.income-item-card .item-body .value {
  color: #666;
}
.income-item-card .item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f9f9f9;
}
.income-item-card .amount-row {
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
}
.income-item-card .amount-row .val {
  font-weight: bold;
}
.income-item-card .extra-tip {
  font-size: 10px;
  color: #FF4D4F;
  background: #FFF1F0;
  border: 1px solid #FFCCC7;
  border-radius: 2px;
  padding: 0 4px;
  margin-left: 10px;
}
.income-item-card .arrow-right {
  color: #ccc;
  font-size: 18px;
}

.income-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 100;
  font-size: 13px;
  color: #333;
}
.income-bottom-bar .summary-total .val {
  font-weight: bold;
}
.income-bottom-bar .summary-details {
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.income-bottom-bar .summary-line {
  line-height: 1.2;
}

.income-bottom-bar.income-bottom-bar-actions {
  align-items: flex-start;
}

.income-batch-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.income-batch-tip {
  color: #666;
  font-size: 12px;
}

.income-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f3f3f3;
}

.income-item-actions .btn-action {
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  font-size: 13px;
}

.income-bottom-bar button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Schedule / Calendar Page Styles */
.calendar-card {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  margin: 10px 10px 0;
  box-shadow: 0 1px 4px rgba(25, 29, 38, 0.04);
  border: 1px solid #f2f2f4;
}
.calendar-header {
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}
.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 10px 6px 8px;
  color: #8f939c;
  font-size: 12px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px 12px;
}
.calendar-day {
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.calendar-day.empty { cursor: default; }
.calendar-day .day-num {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border-radius: 50%;
  margin-bottom: 3px;
  color: #3f434c;
  border: 1px solid #eceff4;
  background: #fff;
}
.calendar-day.status-all .day-num {
  background: #fff;
  border-color: #eceff4;
  color: #3f434c;
}
.calendar-day.status-none .day-num {
  background: #ffe1e7;
  border-color: #ffc1cd;
  color: #c7384f;
}
.calendar-day.status-morning_unavailable .day-num {
  background: #fff1de;
  border-color: #ffd9ae;
  color: #ba6b12;
}
.calendar-day.status-afternoon_unavailable .day-num {
  background: #efe4ff;
  border-color: #d8c2ff;
  color: #7147c8;
}
.calendar-day.selected .day-num {
  background: #fff;
  border-color: #ffbf8b;
  color: #3f434c;
}
.calendar-day.selected.selected-all .day-num {
  background: #fff;
  border-color: #ffbf8b;
  color: #3f434c;
}
.calendar-day.selected.selected-none .day-num {
  background: #e64a63;
  border-color: #e64a63;
}
.calendar-day.selected.selected-morning_unavailable .day-num {
  background: #f08b1a;
  border-color: #f08b1a;
}
.calendar-day.selected.selected-afternoon_unavailable .day-num {
  background: #7a4de0;
  border-color: #7a4de0;
}
.calendar-day .lunar {
  font-size: 11px;
  color: #8f939c;
  line-height: 1;
  min-height: 12px;
}
.calendar-day.selected .lunar {
  color: #FF7E24;
  font-weight: 500;
}

.schedule-action-container {
  padding: 18px 18px 22px;
  background: #f5f6f8;
}
.schedule-btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.btn-schedule {
  height: 44px;
  border-radius: 22px;
  border: 1px solid #dfe2e7;
  background: #fff;
  color: #666d78;
  font-size: var(--fs-md, 14px);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
/* Distinct colors for different options - High contrast */
.btn-schedule.active-none { background: #e64a63; border-color: #e64a63; color: #fff; }
.btn-schedule.active-morning-unavailable { background: #f08b1a; border-color: #f08b1a; color: #fff; }
.btn-schedule.active-afternoon-unavailable { background: #7a4de0; border-color: #7a4de0; color: #fff; }

.btn-schedule:active { opacity: 0.8; }


/* Profile Page Styles */
.profile-page {
  padding: 0 12px 16px;
  background: #f6f7f9;
}

.profile-page .app-main-topbar {
  margin: 0 -12px 10px;
}

.profile-user-card,
.profile-metrics-card,
.profile-section-card,
.profile-menu-card {
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  box-shadow: none;
}

.profile-user-card {
  padding: 14px 12px;
  margin-bottom: 10px;
}

.profile-user-info {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff9d5c 0%, #ff7e24 100%);
  border-radius: 50%;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
}

.profile-info-main {
  min-width: 0;
}
.profile-info-main .name {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: #2f3440;
  margin-bottom: 4px;
}
.profile-info-main .id {
  font-size: var(--fs-sm);
  color: #8f96a3;
}

.profile-metrics-card {
  padding: 12px 8px;
  margin-bottom: 10px;
}
.profile-stats-row {
  display: flex;
  justify-content: space-between;
  text-align: center;
}
.profile-stats-item {
  flex: 1;
  position: relative;
}
.profile-stats-item + .profile-stats-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #f2f2f2;
}
.profile-stats-item .val {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  color: #2f3440;
  margin-bottom: 6px;
}
.profile-stats-item .lab {
  font-size: var(--fs-sm);
  color: #8f96a3;
}

.profile-section-card {
  padding: 12px;
  margin-bottom: 10px;
}
.profile-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #f2f2f2;
  padding-bottom: 10px;
}
.profile-page .section-header .title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: #2f3440;
}
.profile-page .section-header .more {
  font-size: var(--fs-sm);
  color: #8f96a3;
  cursor: pointer;
}
.profile-page .grid-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.profile-page .grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-page .grid-item .icon-box.profile-icon {
  width: 30px;
  height: 30px;
  border-radius: 0;
  margin-bottom: 7px;
  border: none;
  background: transparent;
  color: #ff7e24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.profile-page .grid-item .icon-box.profile-icon .profile-pending-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-pending-service-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-completed-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-in-service-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-settled-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-unsettled-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-bonus-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .icon-box.profile-icon .profile-deduction-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.profile-page .grid-item .text {
  font-size: var(--fs-sm);
  color: #5e6472;
}

.profile-menu-card {
  margin-bottom: 6px;
}

.profile-menu-card .menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 2px;
  border-bottom: 1px solid #f5f5f5;
  font-size: var(--fs-md);
  color: #333;
  cursor: pointer;
}
.profile-menu-card .menu-row:last-child { border-bottom: none; }
.profile-menu-card .menu-row .lab {
  color: #2f3440;
  font-size: var(--fs-md);
}
.profile-menu-card .menu-row .val-sub {
  flex: 1;
  text-align: right;
  margin-right: 10px;
  color: #8f96a3;
  font-size: var(--fs-sm);
}
.profile-menu-card .menu-row .arr {
  color: #c5c9d3;
  font-size: 18px;
  line-height: 1;
}

/* Tab Bar */
.tab-bar { 
  background: #fff; border-top: 1px solid #eee; height: 50px; display: flex; flex-shrink: 0; 
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
}
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; cursor: pointer; }
.tab-item.active { color: #FF6B35; font-weight: 500; } /* Orange active state */
.tab-item .tab-icon { font-size: 20px; margin-bottom: 2px; line-height: 1; }
.tab-item .tab-label { font-size: 10px; line-height: 1; }

/* Login Page Styles (retained) */
.login-page { padding: 40px 30px; background: #fff; min-height: 100%; }
.login-logo { text-align: center; margin-bottom: 50px; }
.login-logo .icon { font-size: 48px; }
.login-logo .title { font-size: 24px; font-weight: bold; color: #FF6B35; margin: 10px 0; }
.login-logo .subtitle { color: #999; font-size: 14px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; color: #666; }
.input-group input { width: 100%; padding: 14px; border: 1px solid #eee; border-radius: 6px; font-size: 18px; background: #f9f9f9; }
.login-tips { margin-top: 40px; font-size: 14px; color: #999; text-align: center; line-height: 1.6; }

/* Dialog Styles (retained) */
.dialog { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.dialog-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.dialog-content { position: relative; width: calc(100% - 40px); max-width: 360px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.dialog-title { padding: 16px 16px 0; font-size: 16px; font-weight: bold; }
.dialog-body { padding: 12px 16px 16px; color: #666; line-height: 1.5; }
.dialog-footer { display: flex; border-top: 1px solid #eee; }
.dialog-btn { flex: 1; height: 48px; border: none; background: #fff; font-size: 16px; font-weight: bold; cursor: pointer; }
.dialog-confirm { color: #FF6B35; font-weight: 600; }
.modal-overlay .reset-card { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Workorder List (retained) */
.filter-bar { display: flex; background: #fff; border-bottom: 1px solid #eee; overflow-x: auto; flex-shrink: 0; white-space: nowrap; }
.filter-item { padding: 12px 15px; font-size: 14px; color: #666; position: relative; cursor: pointer; }
.filter-item.active { color: #FF6B35; font-weight: bold; }
.filter-item.active::after { content: ''; position: absolute; bottom: 0; left: 15px; right: 15px; height: 2px; background: #FF6B35; }
.list-container { flex: 1; overflow-y: auto; padding: 10px; }
.workorder-item { background: #fff; border-radius: 8px; padding: 15px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); cursor: pointer; }
.wo-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; }
.tag { padding: 2px 6px; border-radius: 4px; }
.tag-orange { background: #FFF7E6; color: #FA8C16; }
.tag-blue { background: #E6F7FF; color: #1890FF; }
.tag-green { background: #F6FFED; color: #52C41A; }
.tag-gray { background: #F5F5F5; color: #999; }
.tag-red { background: #FFF1F0; color: #F5222D; }
.wo-body .info-row { display: flex; margin-bottom: 6px; font-size: 14px; }
.wo-body .label { color: #999; width: 45px; flex-shrink: 0; }
.wo-body .val { color: #333; }
.wo-footer { border-top: 1px solid #f0f0f0; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.wo-footer .price { font-size: 16px; color: #FF4D4F; font-weight: bold; }

/* Segment Control (Top Tabs) - Refined Size */
.segment-control {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 6px 0;
}
.segment-item {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 14px;
  color: #FF6B35;
  border: 2px solid #FF6B35;
  cursor: pointer;
  background: #fff;
  transition: all 0.3s;
  font-weight: bold;
}
.segment-item:first-child {
  border-right: none;
  border-radius: 16px 0 0 16px;
}
.segment-item:last-child {
  border-left: none;
  border-radius: 0 16px 16px 0;
}
.segment-item.active {
  background: #FF6B35;
  color: #fff;
}

/* Refined Button Styles for Detail Pages - Large Accessible Capsule */
.btn-detail-primary, .btn-detail-secondary, .btn-detail-gray, .btn-action {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px !important;
  border-radius: 24px !important; /* Half height */
  font-size: 18px;
  cursor: pointer;
  box-sizing: border-box;
  font-weight: bold;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1; 
  margin: 0;
}

.btn-detail-primary {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}

.btn-detail-secondary, .btn-action.secondary {
  background: #fff;
  border-color: #FF6B35;
  color: #FF6B35;
}

.btn-detail-gray {
  background: #f5f5f5;
  color: #666;
  border-color: #ddd;
}

/* Specific override for List Page action buttons to match proportions */
.card-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

/* Nav Bar */
.app-main-topbar {
  min-height: 44px;
  background: #fff;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d4f55;
  font-size: var(--fs-lg, 16px);
  font-weight: 600;
  flex-shrink: 0;
}

.nav-bar {
  display: flex;
  align-items: center;
  min-height: 44px;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0 15px;
  flex-shrink: 0;
}
.nav-bar .back-btn {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  width: 60px;
}
.nav-bar .title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-right: 60px; /* Offset back button width to center title */
}

/* Detail Status Text (Simple) */
.detail-status-text {
  font-size: 12px;
  color: #666;
}

/* Middle Action Area */
.middle-action-area {
  padding: 10px 0;
  text-align: center;
}

/* Base class overrides for legacy support or specific needs */
.btn-round, .btn-action-small {
  border-radius: 15px !important;
}

.btn-disabled {
  background: #ccc !important;
  color: #fff !important;
  border: none !important;
  cursor: not-allowed !important;
}

/* Bottom Actions Fixed Bar */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  padding: 8px 15px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
}

/* Workorder Detail - Pending Accept */
.detail-list { padding: 0; overflow: hidden; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: #999; width: 85px; flex-shrink: 0; white-space: nowrap; }
.detail-row .value { color: #333; text-align: left; margin-left: 0; flex: 1; }
.detail-row-top { padding: 10px 15px; border-bottom: 1px solid #f5f5f5; }
.detail-meta { color: #999; font-size: 12px; }
.detail-status-text { color: #666; font-size: 13px; }
.detail-remark { padding: 15px; }
.detail-remark .label { color: #999; font-size: 14px; margin-bottom: 10px; display: block; }
.remark-box { padding: 12px; border: 1px solid #ffccc7; background: #fff2f0; border-radius: 4px; color: #d4380d; font-size: 13px; line-height: 1.5; }

/* Detail/Report page tune-up (minimal visual alignment) */
.report-page-modern .report-content {
  padding: 12px;
}

.report-page-modern .card-title {
  margin-bottom: 10px;
}

.report-page-modern .detail-row {
  align-items: center;
  flex-wrap: nowrap;
}

.report-page-modern .detail-row .label {
  width: 108px;
  flex: 0 0 108px;
  white-space: nowrap;
}

.report-page-modern .detail-row .value {
  min-width: 0;
  word-break: break-all;
}

.report-page-modern .photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-page-modern .photo-item {
  height: 108px;
  min-height: 108px;
  aspect-ratio: auto;
  border-radius: 6px;
  padding: 8px;
}

.report-page-modern .photo-item.upload-btn {
  background: #fff7ef;
  border: 1px solid #ffe0bf;
}

.report-page-modern .photo-item.upload-btn .icon,
.report-page-modern .photo-item.upload-btn .text {
  color: #ff8a2a;
}

.report-page-modern .photo-item .text {
  font-size: var(--fs-xs);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.report-page-modern .photo-item .sub-text {
  font-size: var(--fs-xxs);
}

.report-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-action-stack .btn-detail-primary,
.report-action-stack .btn-detail-secondary {
  width: 100%;
  height: 40px;
  border-radius: 20px !important;
  font-size: var(--fs-md);
  font-weight: 600;
}

.detail-service-name {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #333;
}

.detail-report-card .photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.detail-report-card .detail-photo-item {
  border: none;
  background: #eee;
  overflow: hidden;
  padding: 0;
}

.detail-report-card .detail-row .label {
  width: 108px;
  flex: 0 0 108px;
  white-space: nowrap;
}

.detail-report-card .detail-row {
  flex-wrap: nowrap;
}

.detail-report-card .detail-row .value {
  min-width: 0;
  word-break: break-all;
}

.income-detail-amount-row .label {
  width: auto;
  flex: 0 0 auto;
  margin-right: 6px;
}

.income-detail-amount-row .value {
  word-break: keep-all;
  white-space: nowrap;
}

.income-detail-page .report-content > .card.info-card:first-child .detail-row .label {
  width: auto;
  flex: 0 0 auto;
  margin-right: 6px;
}

.income-detail-page .report-content > .card.info-card:first-child .detail-row .value {
  word-break: keep-all;
  white-space: nowrap;
}

.photo-placeholder {
  border: 1px dashed #d9d9d9;
  background: #fafafa;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-placeholder span {
  font-size: var(--fs-xs);
}

/* Typography Normalization */
.nav-bar .title,
.month-bar .month-text,
.section-header .title,
.info-card .card-title {
  font-size: var(--fs-lg);
}

.nav-bar .back-btn,
.btn-round,
.btn-action-small,
.btn-outline,
.segment-item,
.detail-row,
.filter-item,
.wo-body .info-row,
.account-card .user-name,
.user-info-card .user-name {
  font-size: var(--fs-md);
}

.btn-action,
.btn-detail-primary,
.btn-detail-secondary,
.btn-detail-gray,
.dialog-title,
.dialog-btn {
  font-size: var(--fs-md);
}

.user-detail,
.detail-meta,
.detail-status-text,
.info-line,
.income-batch-tip,
.contact-bar .label,
.contact-bar .action,
.tab-item .tab-label,
.stat-col .label,
.brand-logo {
  font-size: var(--fs-sm);
}

.brand-slogan,
.extra-tip {
  font-size: var(--fs-xs);
}

input,
textarea,
select {
  font-size: var(--fs-md);
}
