/* === CSS Variables === */
:root {
  --green: #07c160;
  --green-light: #e8f5e9;
  --green-dark: #06ad56;
  --orange: #e65100;
  --orange-light: #fff3e0;
  --orange-dark: #bf360c;
  --blue: #1a73e8;
  --blue-light: #e3f2fd;
  --blue-dark: #1557b0;
  --red: #f44336;
  --red-light: #fce4ec;
  --bg: #f5f6fa;
  --card-bg: #fff;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
a { color: var(--blue); text-decoration: none; }

/* === App Container === */
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; overflow-x: hidden; }

/* === Utility === */
.hidden { display: none !important; }

/* === Page === */
.page { min-height: 100vh; padding-bottom: 70px; }
.page-content { padding-bottom: 16px; }

/* === Page Header === */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: #fff; font-size: 17px; font-weight: 600; position: sticky; top: 0; z-index: 50; }
.green-header { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.blue-header { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.orange-header { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.btn-back { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.btn-back:active { background: rgba(255,255,255,0.15); }

/* === Login Page === */
.login-header { text-align: center; padding: 60px 20px 30px; background: linear-gradient(135deg, var(--green), #00b894); color: #fff; border-radius: 0 0 40px 40px; }
.login-logo { font-size: 64px; margin-bottom: 12px; }
.login-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.login-header p { font-size: 14px; opacity: 0.85; }
.login-card { margin: -20px 16px 0; background: var(--card-bg); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }

/* === Form === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: border-color 0.2s; background: #fafafa; }
.form-group input:focus, .form-group select:focus { border-color: var(--green); background: #fff; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: var(--radius-sm); padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; min-height: 44px; }
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-block { width: 100%; display: flex; }
.btn-lg { padding: 14px 20px; font-size: 16px; border-radius: 12px; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:active { background: var(--blue-dark); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:active { background: var(--orange-dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; min-height: 32px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; min-height: 28px; }

/* === Cards === */
.card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin: 12px 16px; box-shadow: var(--shadow); }
.card-sm { padding: 12px; }

/* === User Card (green) === */
.user-card-green { background: linear-gradient(135deg, var(--green), #00b894); color: #fff; margin: 16px; padding: 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 16px rgba(7,193,96,0.3); }
.user-card-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.user-card-info { flex: 1; }
.user-card-name { font-size: 18px; font-weight: 600; }
.user-card-role { font-size: 13px; opacity: 0.85; margin-top: 2px; }

/* === Stats Grid === */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px; }
.stat-item { padding: 16px 14px; border-radius: var(--radius); text-align: center; }
.stat-item .num { font-size: 24px; font-weight: 700; display: block; }
.stat-item .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* === Stats Row (3 columns) === */
.stats-row { display: flex; gap: 10px; margin: 16px; }
.stats-row .stat-mini { flex: 1; text-align: center; padding: 12px 8px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.stats-row .stat-mini .num { font-size: 18px; font-weight: 700; color: var(--green); }
.stats-row .stat-mini .label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Stats line for purchase */
.stats-line { display: flex; gap: 10px; margin: 16px; background: var(--card-bg); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stats-line .stat-col { flex: 1; text-align: center; }
.stats-line .stat-col .num { font-size: 20px; font-weight: 700; }
.stats-line .stat-col .label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* === Menu Grid === */
.section-title { padding: 16px 16px 10px; font-size: 16px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.section-title .more { font-size: 13px; color: var(--green); cursor: pointer; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 16px; }
.menu-item { background: var(--card-bg); border-radius: var(--radius); padding: 18px 10px; text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; }
.menu-item:active { transform: scale(0.95); }
.menu-icon { font-size: 28px; margin-bottom: 6px; }
.menu-name { font-size: 13px; color: var(--text-secondary); }

/* === Card List === */
.card-list { margin: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.card-list .card-item { background: var(--card-bg); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; }
.card-list .card-item:active { transform: scale(0.98); }
.card-item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-item-title { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.card-item-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.card-item-row .amount { font-weight: 600; color: var(--orange); }
.card-item-actions { display: flex; gap: 8px; margin-top: 10px; }

/* === Status Tags === */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.tag-green { background: var(--green-light); color: var(--green); }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-orange { background: var(--orange-light); color: var(--orange); }
.tag-red { background: var(--red-light); color: var(--red); }
.tag-gray { background: #f0f0f0; color: var(--text-muted); }

/* === Inline Tabs === */
.inline-tabs { display: flex; background: var(--card-bg); margin: 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.inline-tab { flex: 1; text-align: center; padding: 12px 4px; font-size: 13px; cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all 0.2s; }
.inline-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }

/* PM Tab Badge */
.pm-tab-badge { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 5px; margin-left: 3px; background: #f44336; color: #fff; font-size: 10px; font-weight: 600; border-radius: 8px; text-align: center; vertical-align: middle; }

/* PM Dashboard stats (matches mini-program) */
.pm-stats-line { display: flex; gap: 10px; margin: 16px; }
.pm-stats-line .stat-mini { flex: 1; background: var(--card-bg); border-radius: 10px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; }
.pm-stats-line .stat-mini:active { transform: scale(0.95); }
.pm-stats-line .stat-mini .num { font-size: 22px; font-weight: 700; display: block; }
.pm-stats-line .stat-mini .label { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

/* PM Announcement Card */
.ann-card { background: var(--card-bg); border-radius: 12px; padding: 16px; margin: 0 16px 16px; box-shadow: var(--shadow); }
.ann-card .card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.ann-textarea { width: 100%; height: 120px; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; resize: none; box-sizing: border-box; background: #fafafa; }

/* === PM Workbench Optimized Styles === */

/* PM Project Picker */
.pm-project-picker { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 10px 14px; background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.pm-project-picker .pm-picker-icon { font-size: 14px; }
.pm-project-picker select { flex: 1; border: none; background: transparent; font-size: 14px; font-weight: 500; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
.pm-project-picker .pm-picker-arrow { font-size: 10px; color: var(--text-muted); }

/* PM Check-in Section (on dashboard) */
.pm-checkin-card { border-radius: var(--radius-card); padding: 16px; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; }
.pm-checkin-card.idle { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border: 1px solid #FFCC80; }
.pm-checkin-card.active { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); border: 1px solid #A5D6A7; }
.pm-checkin-card.done { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border: 1px solid #90CAF9; }
.pm-checkin-card .pm-ci-icon { font-size: 32px; flex-shrink: 0; }
.pm-checkin-card .pm-ci-info { flex: 1; min-width: 0; }
.pm-checkin-card .pm-ci-title { font-size: 16px; font-weight: 700; }
.pm-checkin-card.idle .pm-ci-title { color: var(--orange); }
.pm-checkin-card.active .pm-ci-title { color: var(--green); }
.pm-checkin-card.done .pm-ci-title { color: #1976D2; }
.pm-checkin-card .pm-ci-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.pm-checkin-card .pm-ci-time { font-size: 24px; font-weight: 800; text-align: right; }
.pm-checkin-card.idle .pm-ci-time { color: var(--orange); }
.pm-checkin-card.active .pm-ci-time { color: var(--green); }
.pm-checkin-card.done .pm-ci-time { color: #1976D2; }
.pm-checkin-card .pm-ci-time-label { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: 2px; }

.pm-checkin-btn { width: 100%; box-sizing: border-box; padding: 14px; border-radius: var(--radius-card); font-size: 15px; font-weight: 700; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: none; transition: transform 0.15s; }
.pm-checkin-btn:active { transform: scale(0.97); }
.pm-checkin-btn.signin { background: linear-gradient(135deg, #43A047, #2E7D32); color: #fff; box-shadow: 0 2px 8px rgba(46,125,50,0.3); }
.pm-checkin-btn.signout { background: linear-gradient(135deg, #E53935, #C62828); color: #fff; box-shadow: 0 2px 8px rgba(198,40,40,0.3); }
.pm-checkin-btn.disabled { background: var(--surface-muted); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.pm-checkin-btn .pm-ci-btn-sub { font-size: 11px; font-weight: 400; opacity: 0.85; }

/* PM Mini Stats (compact 3-col) */
.pm-mini-stats { display: flex; gap: 8px; margin: 10px 16px; }
.pm-mini-stat { flex: 1; background: var(--card-bg); border-radius: var(--radius); padding: 10px 8px; text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; }
.pm-mini-stat:active { transform: scale(0.95); }
.pm-mini-stat .pm-ms-num { font-size: 18px; font-weight: 700; display: block; }
.pm-mini-stat .pm-ms-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* PM Expense Stats */
.pm-expense-stats { display: flex; gap: 8px; margin: 10px 0; }
.pm-exp-stat { flex: 1; background: var(--card-bg); border-radius: var(--radius); padding: 12px 6px; text-align: center; box-shadow: var(--shadow); }
.pm-exp-stat .pm-exp-num { font-size: 16px; font-weight: 700; display: block; }
.pm-exp-stat .pm-exp-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; display: block; }

/* PM Reminder Bar (reuse installer pattern) */
.pm-reminder { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-card); margin: 0 16px 8px; cursor: pointer; transition: transform 0.15s; }
.pm-reminder:active { transform: scale(0.98); }
.pm-reminder.orange { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-left: 3px solid var(--orange); }
.pm-reminder.blue { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border-left: 3px solid #2196F3; }
.pm-reminder .pm-r-icon { font-size: 20px; flex-shrink: 0; }
.pm-reminder .pm-r-text { flex: 1; min-width: 0; }
.pm-reminder .pm-r-title { font-size: 14px; font-weight: 600; }
.pm-reminder.orange .pm-r-title { color: var(--orange); }
.pm-reminder.blue .pm-r-title { color: #1976D2; }
.pm-reminder .pm-r-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.pm-reminder .pm-r-btn { flex-shrink: 0; padding: 6px 16px; color: #fff; border: none; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }
.pm-reminder.orange .pm-r-btn { background: var(--orange); }
.pm-reminder.blue .pm-r-btn { background: #2196F3; }

/* PM Quick Actions (4-col grid) */
.pm-qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 16px 10px; }
.pm-qa-item { background: var(--card-bg); border-radius: var(--radius); padding: 12px 4px; text-align: center; cursor: pointer; transition: transform 0.15s; position: relative; box-shadow: var(--shadow); }
.pm-qa-item:active { transform: scale(0.94); }
.pm-qa-item .pm-qa-icon { font-size: 22px; }
.pm-qa-item .pm-qa-label { font-size: 11px; font-weight: 500; margin-top: 4px; color: var(--text); }
.pm-qa-item .pm-qa-badge { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; background: #f44336; color: #fff; border-radius: 8px; text-align: center; font-weight: 600; }

/* PM Announcement Preview (collapsed) */
.pm-ann-preview { background: var(--card-bg); border-radius: var(--radius-card); padding: 12px 14px; margin: 0 16px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s; }
.pm-ann-preview:active { transform: scale(0.98); }
.pm-ann-preview .pm-ann-icon { font-size: 20px; flex-shrink: 0; }
.pm-ann-preview .pm-ann-text { flex: 1; min-width: 0; overflow: hidden; }
.pm-ann-preview .pm-ann-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-ann-preview .pm-ann-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.pm-ann-preview .pm-ann-expand { font-size: 12px; color: var(--blue); font-weight: 500; flex-shrink: 0; }

/* PM Review Tab - Filter Chips */
.pm-review-chips { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pm-review-chips::-webkit-scrollbar { display: none; }
.pm-review-chip { font-size: 13px; padding: 6px 14px; border-radius: 999px; background: var(--card-bg); color: var(--text-secondary); font-weight: 500; white-space: nowrap; cursor: pointer; border: 1px solid var(--border); transition: all 0.2s; }
.pm-review-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pm-review-chip .pm-chip-count { font-size: 11px; margin-left: 3px; opacity: 0.8; }

/* PM Review - Unified Card */
.pm-review-card { background: var(--card-bg); border-radius: var(--radius-card); margin: 0 16px 8px; overflow: hidden; box-shadow: var(--shadow); }
.pm-review-card.type-checkin { border-left: 3px solid var(--orange); }
.pm-review-card.type-purchase { border-left: 3px solid #2196F3; }
.pm-review-card.type-user { border-left: 3px solid var(--green); }
.pm-review-card .pm-rc-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pm-review-card .pm-rc-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0; }
.pm-review-card .pm-rc-avatar.checkin { background: linear-gradient(135deg, #667eea, #764ba2); }
.pm-review-card .pm-rc-avatar.purchase { background: linear-gradient(135deg, #43A047, #2E7D32); }
.pm-review-card .pm-rc-avatar.user { background: linear-gradient(135deg, #2196F3, #1976D2); }
.pm-review-card .pm-rc-info { flex: 1; min-width: 0; }
.pm-review-card .pm-rc-name { font-size: 14px; font-weight: 600; }
.pm-review-card .pm-rc-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.pm-review-card .pm-rc-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; flex-shrink: 0; }
.pm-review-card .pm-rc-tag.pending { background: #FFF3E0; color: var(--orange); }
.pm-review-card .pm-rc-body { padding: 0 12px 10px; }
.pm-review-card .pm-rc-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.pm-review-card .pm-rc-row .pm-rc-label { color: var(--text-muted); }
.pm-review-card .pm-rc-row .pm-rc-val { font-weight: 500; }
.pm-review-card .pm-rc-actions { display: flex; gap: 8px; padding: 0 12px 10px; }
.pm-review-card .pm-rc-btn { flex: 1; padding: 8px; text-align: center; border-radius: var(--radius); font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.pm-review-card .pm-rc-btn.approve { background: var(--green); color: #fff; }
.pm-review-card .pm-rc-btn.reject { background: #f44336; color: #fff; }

/* PM Batch Toolbar */
.pm-batch-bar { display: flex; gap: 8px; align-items: center; padding: 8px 16px; }
.pm-batch-bar .pm-batch-cb { width: 18px; height: 18px; }
.pm-batch-bar .pm-batch-label { font-size: 13px; color: var(--text-secondary); flex: 1; }
.pm-batch-bar .pm-batch-btn { font-size: 12px; padding: 5px 12px; border-radius: var(--radius); color: #fff; font-weight: 600; border: none; cursor: pointer; }
.pm-batch-bar .pm-batch-btn.approve { background: var(--green); }
.pm-batch-bar .pm-batch-btn.reject { background: #f44336; }

/* PM More Tab - Grouped Grid */
.pm-more-back { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue); font-weight: 600; padding: 12px 16px; cursor: pointer; }
.pm-more-group { margin-bottom: 16px; }
.pm-more-group-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; padding: 0 16px; }
.pm-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.pm-more-item { background: var(--card-bg); border-radius: var(--radius-card); padding: 16px 12px; text-align: center; cursor: pointer; transition: transform 0.15s; position: relative; box-shadow: var(--shadow); }
.pm-more-item:active { transform: scale(0.95); }
.pm-more-item .pm-mi-icon { font-size: 28px; }
.pm-more-item .pm-mi-label { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--text); }
.pm-more-item .pm-mi-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pm-more-item .pm-mi-badge { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; background: #f44336; color: #fff; border-radius: 9px; text-align: center; font-weight: 600; }
.pm-more-item.highlight { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border: 1px solid #90CAF9; }

/* === Admin Workbench Styles === */
#admin-header.installer-header { background: linear-gradient(135deg, #6c5ce7, #5a4bd1); box-shadow: 0 4px 16px rgba(108,92,231,0.3); }

/* Admin dual status cards */
.admin-status-cards { display: flex; gap: 10px; margin: 12px 16px 0; }
.admin-status-card { flex: 1; border-radius: var(--radius-card); padding: 16px 14px; position: relative; cursor: pointer; transition: transform 0.15s; overflow: hidden; }
.admin-status-card:active { transform: scale(0.97); }
.admin-status-card.orange { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border: 1px solid #FFCC80; }
.admin-status-card.blue { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border: 1px solid #90CAF9; }
.admin-status-card .asc-icon { font-size: 22px; }
.admin-status-card .asc-num { font-size: 28px; font-weight: 800; margin-top: 4px; }
.admin-status-card.orange .asc-num { color: #e65100; }
.admin-status-card.blue .asc-num { color: #1976D2; }
.admin-status-card .asc-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.admin-status-card .asc-arrow { position: absolute; right: 12px; bottom: 12px; font-size: 16px; color: var(--text-muted); }

/* Admin project overview card */
.admin-proj-card { background: var(--card-bg); border-radius: var(--radius-card); padding: 14px; margin: 0 16px 8px; box-shadow: var(--shadow); }
.admin-proj-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.admin-proj-name { font-size: 14px; font-weight: 600; }
.admin-proj-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.admin-proj-status.active { background: #E8F5E9; color: #07c160; }
.admin-proj-status.pending { background: #FFF3E0; color: #e65100; }
.admin-proj-bar { height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
.admin-proj-bar-fill { height: 100%; background: linear-gradient(90deg, #6c5ce7, #8364e8); border-radius: 3px; transition: width 0.3s; }
.admin-proj-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Admin review user card (reuse pm-review-card pattern) */
.admin-user-card { background: var(--card-bg); border-radius: var(--radius-card); margin: 0 16px 8px; overflow: hidden; box-shadow: var(--shadow); border-left: 3px solid #07c160; }
.admin-user-card .auc-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.admin-user-card .auc-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #07c160, #06ad56); flex-shrink: 0; }
.admin-user-card .auc-info { flex: 1; min-width: 0; }
.admin-user-card .auc-name { font-size: 14px; font-weight: 600; }
.admin-user-card .auc-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.admin-user-card .auc-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; background: #FFF3E0; color: #e65100; }
.admin-user-card .auc-body { padding: 0 12px 8px; }
.admin-user-card .auc-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.admin-user-card .auc-row .auc-label { color: var(--text-muted); }
.admin-user-card .auc-row .auc-val { font-weight: 500; }
.admin-user-card .auc-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
.admin-user-card .auc-btn { flex: 1; padding: 8px; text-align: center; border-radius: var(--radius); font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.admin-user-card .auc-btn.approve { background: var(--green); color: #fff; }
.admin-user-card .auc-btn.reject { background: #f44336; color: #fff; }

/* Admin manage group grid (reuse pm-more-grid pattern) */
.admin-manage-group { margin-bottom: 16px; }
.admin-manage-group-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; padding: 0 16px; }
.admin-manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.admin-manage-item { background: var(--card-bg); border-radius: var(--radius-card); padding: 16px 12px; text-align: center; cursor: pointer; transition: transform 0.15s; box-shadow: var(--shadow); }
.admin-manage-item:active { transform: scale(0.95); }
.admin-manage-item .ami-icon { font-size: 28px; }
.admin-manage-item .ami-label { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--text); }
.admin-manage-item .ami-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.admin-manage-item.highlight { background: linear-gradient(135deg, #EDE7F6, #D1C4E9); border: 1px solid #B39DDB; }

/* Admin section title */
.admin-section-title { font-size: 14px; font-weight: 600; color: var(--text); padding: 12px 16px 8px; }

/* === Supplier Header === */
.supplier-header { background: linear-gradient(135deg, #1565c0, #1a73e8); color: #fff; margin: 16px; padding: 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 16px rgba(26,115,232,0.3); }
.supplier-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.supplier-info { flex: 1; }
.supplier-name { font-size: 18px; font-weight: 600; }
.supplier-contact { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.supplier-badge { background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; font-size: 12px; }

/* === Installer Header === */
.installer-header { background: linear-gradient(135deg, var(--orange), #f57c00); color: #fff; margin: 16px; padding: 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 16px rgba(230,81,0,0.3); }
.installer-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.installer-info { flex: 1; }
.installer-name { font-size: 18px; font-weight: 600; }
.installer-clock { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.installer-date { font-size: 12px; opacity: 0.75; }

/* === Tab Bar === */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; border-top: 1px solid var(--border); z-index: 100; padding-bottom: var(--safe-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; cursor: pointer; color: var(--text-muted); transition: color 0.2s; }
.tab-item.active { color: var(--green); }
.tab-icon { font-size: 22px; }
.tab-label { font-size: 10px; margin-top: 2px; }

/* === Bottom Button Bar === */
.bottom-btn-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; border-top: 1px solid var(--border); z-index: 99; }
.bottom-btn-bar .btn { flex: 1; }

/* === Empty State === */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* === Loading Spinner === */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 200; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { margin-top: 12px; color: var(--text-muted); font-size: 13px; }

/* === Toast === */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.78); color: #fff; padding: 10px 24px; border-radius: 20px; font-size: 14px; z-index: 300; white-space: nowrap; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.hidden { opacity: 0; }

/* === Modal === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 150; display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; padding: 20px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 16px; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; width: 36px; height: 36px; }

/* === Search Bar === */
.search-bar { margin: 12px 16px; }
.search-bar input { width: 100%; padding: 10px 16px; border: 1px solid var(--border); border-radius: 24px; font-size: 14px; outline: none; background: #fff; transition: border-color 0.2s; }
.search-bar input:focus { border-color: var(--green); }

/* === Profile Page === */
.profile-card { background: linear-gradient(135deg, var(--green), #00b894); color: #fff; margin: 16px; padding: 30px 20px; border-radius: var(--radius); text-align: center; box-shadow: 0 4px 16px rgba(7,193,96,0.3); }
.profile-avatar { width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 600; margin: 0 auto 12px; }
.profile-name { font-size: 20px; font-weight: 600; }
.profile-role { font-size: 14px; opacity: 0.85; margin-top: 4px; }
.profile-info { margin-top: 16px; font-size: 13px; opacity: 0.8; }

/* === Quote Item === */
.quote-item { background: #fafafa; border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; border: 1px solid var(--border); }
.quote-item-header { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.quote-item-specs { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.quote-input-group { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.quote-input-group input { width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; outline: none; }
.quote-input-group input:focus { border-color: var(--green); }
.quote-input-group .unit-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.quote-subtotal { text-align: right; font-size: 14px; font-weight: 600; color: var(--orange); margin-top: 4px; }

/* === Settlement Detail === */
.settle-section { margin-bottom: 16px; }
.settle-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settle-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; }
.settle-row .value { font-weight: 600; }
.settle-total { background: var(--orange-light); border-radius: var(--radius-sm); padding: 14px; display: flex; justify-content: space-between; align-items: center; }
.settle-total .label { font-size: 15px; font-weight: 600; color: var(--orange); }
.settle-total .amount { font-size: 22px; font-weight: 700; color: var(--orange); }

/* === Project List === */
.project-item { background: var(--card-bg); border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.project-item:not(:last-child) { margin-bottom: 8px; }
.project-name { font-size: 14px; font-weight: 500; }
.project-status { font-size: 12px; color: var(--text-muted); }

/* === Expense Record Item === */
.expense-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.expense-item:last-child { border-bottom: none; }
.expense-item-left { flex: 1; }
.expense-item-type { font-size: 13px; font-weight: 500; }
.expense-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.expense-item-right { text-align: right; }
.expense-item-amount { font-size: 14px; font-weight: 600; color: var(--red); }
.expense-item-date { font-size: 11px; color: var(--text-muted); }

/* === Check-in Section === */
.checkin-section { text-align: center; padding: 24px 16px; }
.checkin-time { font-size: 36px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.checkin-date { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.checkin-buttons { display: flex; gap: 14px; justify-content: center; }
.checkin-btn { width: 100px; height: 100px; border-radius: 50%; border: none; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.checkin-btn:active { transform: scale(0.9); }
.checkin-btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 16px rgba(7,193,96,0.4); }
.checkin-btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(244,67,54,0.4); }
.checkin-btn-gray { background: #ccc; color: #fff; cursor: not-allowed; }

/* === Form Textarea === */
.form-textarea { background: #f5f6fa; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: 14px; resize: vertical; min-height: 100px; width: 100%; outline: none; transition: border-color 0.2s; }
.form-textarea:focus { border-color: var(--green); background: #fff; }

/* === Form Picker (dropdown styled) === */
.form-picker { display: flex; align-items: center; justify-content: space-between; background: #f5f6fa; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; color: var(--text); border: 1px solid var(--border); cursor: pointer; }
.form-picker .placeholder { color: var(--text-muted); }

/* === Quick Amount Buttons === */
.quick-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quick-label { font-size: 11px; color: var(--text-muted); margin-right: 2px; }
.quick-btn { font-size: 12px; padding: 5px 14px; border-radius: 20px; background: var(--orange-light); color: var(--orange); border: 1px solid #ffe0b2; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.quick-btn:active { transform: scale(0.95); background: #ffe0b2; }
.quick-btn-green { background: var(--green-light); color: var(--green); border-color: #c8e6c9; }

/* === Hint Card === */
.hint-card { background: #fff9e6; border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; margin: 0 16px; }
.hint-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }
.hint-text { font-size: 12px; color: #8d6e00; line-height: 1.6; }

/* === Submit Expense / Hours Page === */
.form-card { background: var(--card-bg); border-radius: var(--radius); padding: 20px 16px; margin: 12px 16px; box-shadow: var(--shadow); }
.form-label { display: block; font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: 8px; }
.form-label .required { color: var(--red); }

/* === Amount Input with Currency === */
.amount-input-wrap { display: flex; align-items: center; background: #f5f6fa; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; }
.amount-input-wrap:focus-within { border-color: var(--green); background: #fff; }
.currency-symbol { font-size: 22px; font-weight: 700; color: var(--orange); margin-right: 8px; }
.amount-input { flex: 1; height: 48px; border: none; background: transparent; font-size: 22px; font-weight: 700; color: var(--orange); outline: none; }

/* === WeChat Login === */
.wechat-login-area { margin-bottom: 16px; }
.wechat-login-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #07c160; color: #fff; border-radius: 12px; padding: 14px 20px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(7,193,96,0.35); }
.wechat-login-btn:active { transform: scale(0.97); background: #06ad56; }
.wechat-login-icon { font-size: 24px; }
.divider { display: flex; align-items: center; margin: 20px 0; }
.divider-line { flex: 1; height: 1px; background: #e8e8e8; }
.divider-text { padding: 0 12px; font-size: 12px; color: #999; white-space: nowrap; }

/* === Stat Cards Grid (for #stats page) === */
.stat-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 20px 14px; text-align: center; box-shadow: var(--shadow); }
.stat-card .stat-card-num { font-size: 28px; font-weight: 700; display: block; margin-bottom: 6px; }
.stat-card .stat-card-label { font-size: 13px; color: var(--text-secondary); }
.stat-card-green .stat-card-num { color: var(--green); }
.stat-card-blue .stat-card-num { color: var(--blue); }
.stat-card-orange .stat-card-num { color: var(--orange); }
.stat-card-red .stat-card-num { color: var(--red); }
.stat-card-dark .stat-card-num { color: var(--text); }

/* === Report Rows === */
.report-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.report-row:last-child { border-bottom: none; }
.report-row .report-label { color: var(--text-secondary); }
.report-row .report-value { font-weight: 600; color: var(--text); }
.report-row-highlight { background: var(--green-light); border-radius: var(--radius-sm); padding: 14px 16px; margin: 4px -16px; display: flex; justify-content: space-between; align-items: center; }
.report-row-highlight .report-label { font-size: 16px; font-weight: 600; color: var(--green); }
.report-row-highlight .report-value { font-size: 22px; font-weight: 700; color: var(--green); }

/* === Responsive === */
@media (max-width: 374px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { gap: 6px; }
  .stats-grid .stat-item { padding: 12px 10px; }
  .stat-item .num { font-size: 20px; }
}

/* === P0-1: Notification Bell === */
.supplier-bell { position: absolute; top: 16px; right: 16px; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.15); }
.supplier-bell:active { background: rgba(255,255,255,0.3); }
.bell-badge { position: absolute; top: -2px; right: -2px; background: #f44336; color: #fff; border-radius: 50%; min-width: 18px; height: 18px; font-size: 11px; text-align: center; line-height: 18px; padding: 0 4px; }
.bell-badge.hidden { display: none; }

/* === P0-2: Quote Draft Indicator === */
.draft-indicator { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(7,193,96,0.9); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 12px; z-index: 200; display: flex; align-items: center; gap: 6px; }

/* === P1-4: Pull-to-Refresh === */
.ptr-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: var(--text-muted); font-size: 13px; }
.ptr-indicator.hidden { display: none; }
.ptr-spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.6s linear infinite; }
.ptr-text { font-size: 13px; }

/* === P1-4: Search & Filter === */
.sup-search-bar { margin: 0 16px 8px; }
.sup-search-bar input { width: 100%; padding: 10px 16px; border: 1px solid var(--border); border-radius: 24px; font-size: 14px; outline: none; background: #fff; transition: border-color 0.2s; }
.sup-search-bar input:focus { border-color: var(--blue); }
.sup-filter-chips { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sup-filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex-shrink: 0; padding: 5px 14px; border-radius: 20px; font-size: 12px; background: #f0f0f0; color: var(--text-secondary); border: 1px solid transparent; cursor: pointer; transition: all 0.2s; }
.filter-chip.active { background: var(--blue-light); color: var(--blue); border-color: var(--blue); font-weight: 600; }

/* === P1-6: Skeleton Screen === */
.skeleton-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin: 0 16px; box-shadow: var(--shadow); }
.skeleton-line { height: 14px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; margin-bottom: 8px; }
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === P1-6: Safe Area Fix === */
.page-header { padding-top: max(12px, env(safe-area-inset-top)); }
.supplier-header { margin-top: max(16px, env(safe-area-inset-top)); }
.bottom-btn-bar { bottom: 0; }
.bottom-btn-bar.has-tabbar { bottom: 56px; }

/* === P2-7: Image Preview Overlay === */
.image-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.image-preview-overlay.hidden { display: none; }
.image-preview-img { max-width: 90%; max-height: 75vh; object-fit: contain; border-radius: 8px; }
.image-preview-close { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 28px; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); border-radius: 50%; z-index: 501; }
.image-preview-nav { display: flex; align-items: center; gap: 20px; margin-top: 16px; color: #fff; }
.image-preview-btn { background: rgba(255,255,255,0.2); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.image-preview-btn:active { background: rgba(255,255,255,0.35); }
#image-preview-counter { font-size: 14px; min-width: 60px; text-align: center; }

/* === P2-7: Thumbnail Grid === */
.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.thumb-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }

/* === P1-5: Quote History === */
.quote-history { margin-top: 8px; padding: 8px 10px; background: #f0f7ff; border-radius: 6px; font-size: 11px; color: var(--text-secondary); }
.quote-history-title { font-weight: 600; color: var(--blue); margin-bottom: 4px; cursor: pointer; }
.quote-history-item { display: flex; justify-content: space-between; padding: 2px 0; }

/* === P2-8: Dashboard Extra === */
.dashboard-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px 16px; margin: 0 16px 12px; box-shadow: var(--shadow); }
.dashboard-card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.dashboard-trend { display: flex; gap: 4px; align-items: flex-end; height: 60px; }
.dashboard-trend-bar { flex: 1; background: var(--blue-light); border-radius: 3px 3px 0 0; min-height: 4px; position: relative; transition: height 0.3s; }
.dashboard-trend-bar.active { background: var(--blue); }
.dashboard-trend-label { font-size: 9px; color: var(--text-muted); text-align: center; margin-top: 2px; }

/* === New: Remark Template Chips === */
.remark-templates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.remark-template-chip { font-size: 11px; padding: 4px 10px; border-radius: 16px; background: var(--green-light); color: var(--green); border: 1px solid #c8e6c9; cursor: pointer; white-space: nowrap; }
.remark-template-chip:active { transform: scale(0.95); }

/* === New: Account Summary === */
.account-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.account-summary-row:last-child { border-bottom: none; }
.account-summary-row .label { font-size: 13px; color: var(--text-secondary); }
.account-summary-row .value { font-size: 16px; font-weight: 700; }
.account-summary-row .value.green { color: var(--green); }
.account-summary-row .value.red { color: var(--red); }
.account-summary-row .value.orange { color: var(--orange); }

/* === New: Rating Stars === */
.rating-stars { display: flex; gap: 2px; }
.rating-star { font-size: 14px; color: #ddd; }
.rating-star.active { color: #ffc107; }

/* === P3-1: Supplier Optimized === */
.sup-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.sup-stat-card { border-radius: var(--radius); padding: 18px 14px; text-align: center; cursor: pointer; transition: transform 0.15s; position: relative; overflow: hidden; }
.sup-stat-card:active { transform: scale(0.96); }
.sup-stat-card.urgent { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border: 1px solid #90caf9; }
.sup-stat-card.normal { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 1px solid #a5d6a7; }
.sup-stat-card .sup-stat-num { font-size: 32px; font-weight: 800; line-height: 1.2; }
.sup-stat-card.urgent .sup-stat-num { color: var(--blue); }
.sup-stat-card.normal .sup-stat-num { color: var(--green); }
.sup-stat-card .sup-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.sup-stat-card .sup-stat-arrow { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.sup-stat-card .sup-stat-badge { position: absolute; top: 8px; right: 8px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; border-radius: 9px; text-align: center; }

.sup-payment-bar { display: flex; align-items: center; justify-content: space-around; margin: 0 16px 12px; padding: 12px 16px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.sup-payment-bar .pay-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sup-payment-bar .pay-label { font-size: 11px; color: var(--text-muted); }
.sup-payment-bar .pay-value { font-size: 16px; font-weight: 700; }
.sup-payment-bar .pay-value.red { color: var(--red); }
.sup-payment-bar .pay-value.green { color: var(--green); }
.sup-payment-bar .pay-divider { width: 1px; height: 28px; background: var(--border); }

.sup-tab-bar { display: flex; background: var(--card-bg); margin: 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sup-tab-bar .sup-tab { flex: 1; text-align: center; padding: 13px 4px; font-size: 13px; cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all 0.2s; position: relative; }
.sup-tab-bar .sup-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.sup-tab-badge { position: absolute; top: 6px; left: 50%; margin-left: 10px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; border-radius: 8px; text-align: center; }

.sup-inquiry-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin: 0 16px 10px; box-shadow: var(--shadow); }
.sup-inquiry-card.urgent { border-left: 3px solid var(--blue); }
.sup-inquiry-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sup-inquiry-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.sup-inquiry-card-project { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.sup-inquiry-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.sup-inquiry-card-meta .amount { font-size: 16px; font-weight: 700; color: var(--orange); }
.sup-inquiry-card-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.sup-inquiry-card-btn:active { transform: scale(0.97); }
.sup-inquiry-card-btn-blue { background: var(--blue); color: #fff; }
.sup-inquiry-card-btn-orange { background: var(--orange); color: #fff; }
.sup-inquiry-card-btn-green { background: var(--green); color: #fff; }
.sup-inquiry-card-btn-gray { background: #e0e0e0; color: #999; }

.sup-order-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin: 0 16px 10px; box-shadow: var(--shadow); }
.sup-order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sup-order-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.sup-order-card-project { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.sup-order-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sup-order-card-meta .amount { font-size: 16px; font-weight: 700; color: var(--orange); }
.sup-order-card-meta .unpaid { font-size: 12px; color: var(--red); }
.sup-order-status-bar { display: flex; align-items: center; gap: 3px; margin: 8px 0 4px; }
.sup-order-step { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.sup-order-step.done { background: var(--green); }
.sup-order-step.current { background: var(--blue); }
.sup-order-step-labels { display: flex; font-size: 10px; color: var(--text-muted); }
.sup-order-step-label { flex: 1; text-align: center; }
.sup-order-step-label.active { color: var(--blue); font-weight: 600; }
.sup-order-actions { display: flex; gap: 8px; margin-top: 10px; }

.sup-more-card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin: 0 16px 10px; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; display: flex; align-items: center; gap: 14px; }
.sup-more-card:active { transform: scale(0.98); }
.sup-more-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.sup-more-icon.blue { background: #e3f2fd; }
.sup-more-icon.green { background: #e8f5e9; }
.sup-more-icon.orange { background: #fff3e0; }
.sup-more-icon.purple { background: #f3e5f5; }
.sup-more-info { flex: 1; }
.sup-more-title { font-size: 15px; font-weight: 600; color: var(--text); }
.sup-more-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sup-more-arrow { color: var(--text-muted); font-size: 18px; }

.sup-back-bar { margin: 12px 16px 0; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--blue); }
.sup-back-bar:active { opacity: 0.7; }
.sup-back-bar .back-arrow { font-size: 18px; }
.sup-back-bar .back-text { font-size: 14px; }

.sup-trend-mini { display: flex; gap: 4px; align-items: flex-end; height: 50px; margin-top: 8px; }
.sup-trend-mini-bar { flex: 1; background: var(--blue-light); border-radius: 3px 3px 0 0; min-height: 4px; transition: height 0.3s; }
.sup-trend-mini-bar.active { background: var(--blue); }
.sup-trend-mini-labels { display: flex; gap: 4px; margin-top: 2px; }
.sup-trend-mini-label { flex: 1; font-size: 9px; color: var(--text-muted); text-align: center; }

/* === P3-2: Supplier Process Optimizations === */
.sup-reminder-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 12px; padding: 12px 14px; background: linear-gradient(135deg, #fff3e0, #ffe0b2); border-radius: var(--radius); border-left: 3px solid var(--orange); box-shadow: var(--shadow); }
.sup-reminder-bar:active { transform: scale(0.98); }
.sup-reminder-icon { font-size: 20px; flex-shrink: 0; }
.sup-reminder-text { flex: 1; }
.sup-reminder-title { font-size: 14px; font-weight: 600; color: var(--orange); }
.sup-reminder-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sup-reminder-btn { flex-shrink: 0; padding: 8px 16px; background: var(--orange); color: #fff; border: none; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.sup-reminder-btn:active { transform: scale(0.95); }

.sup-urgent-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #ffebee; color: var(--red); font-weight: 600; margin-left: 4px; }

.sup-empty-action { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.sup-empty-icon { font-size: 48px; margin-bottom: 12px; }
.sup-empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.sup-empty-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.sup-empty-btn { display: inline-block; padding: 10px 24px; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }

/* === Modal Sheet Swipe-to-Close === */
.modal-sheet { touch-action: pan-y; }
.modal-sheet.swiping { transition: none; transform: translateY(var(--swipe-y, 0)); }

/* === Installer Workbench Optimizations === */

/* Installer stat cards (2-column, clickable) */
.ins-stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.ins-stat-card { border-radius: var(--radius); padding: 16px 14px; text-align: center; cursor: pointer; transition: transform 0.15s; position: relative; overflow: hidden; }
.ins-stat-card:active { transform: scale(0.96); }
.ins-stat-card.active-stat { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 1px solid #a5d6a7; }
.ins-stat-card.idle-stat { background: linear-gradient(135deg, #fff3e0, #ffe0b2); border: 1px solid #ffcc80; }
.ins-stat-card .ins-stat-num { font-size: 30px; font-weight: 800; line-height: 1.2; }
.ins-stat-card.active-stat .ins-stat-num { color: var(--green); }
.ins-stat-card.idle-stat .ins-stat-num { color: var(--orange); }
.ins-stat-card .ins-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.ins-stat-card .ins-stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.ins-stat-card .ins-stat-icon { position: absolute; top: 10px; right: 10px; font-size: 20px; opacity: 0.3; }

/* Installer compact stats bar */
.ins-stats-bar { display: flex; gap: 10px; margin: 0 16px 12px; }
.ins-stats-bar .ins-stat-mini { flex: 1; text-align: center; padding: 10px 6px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.ins-stats-bar .ins-stat-mini .num { font-size: 16px; font-weight: 700; }
.ins-stats-bar .ins-stat-mini .label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Installer reminder bar */
.ins-reminder-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--radius); border-left: 3px solid var(--orange); box-shadow: var(--shadow); }
.ins-reminder-bar.checkin-reminder { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.ins-reminder-bar.expense-reminder { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border-left-color: var(--blue); }
.ins-reminder-bar:active { transform: scale(0.98); }
.ins-reminder-icon { font-size: 20px; flex-shrink: 0; }
.ins-reminder-text { flex: 1; }
.ins-reminder-title { font-size: 14px; font-weight: 600; }
.ins-reminder-bar.checkin-reminder .ins-reminder-title { color: var(--orange); }
.ins-reminder-bar.expense-reminder .ins-reminder-title { color: var(--blue); }
.ins-reminder-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ins-reminder-btn { flex-shrink: 0; padding: 8px 16px; color: #fff; border: none; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ins-reminder-btn:active { transform: scale(0.95); }
.ins-reminder-bar.checkin-reminder .ins-reminder-btn { background: var(--orange); }
.ins-reminder-bar.expense-reminder .ins-reminder-btn { background: var(--blue); }

/* Installer tab bar (3-column with badge) */
.ins-tab-bar { display: flex; background: var(--card-bg); margin: 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ins-tab-bar .ins-tab { flex: 1; text-align: center; padding: 13px 4px; font-size: 13px; cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all 0.2s; position: relative; }
.ins-tab-bar .ins-tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }
.ins-tab-badge { position: absolute; top: 6px; right: calc(50% - 32px); min-width: 16px; height: 16px; line-height: 16px; padding: 0 5px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; border-radius: 8px; text-align: center; }

/* Installer checkin status card */
.ins-checkin-status { margin: 0 16px 12px; background: var(--card-bg); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.ins-checkin-status-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.ins-checkin-status-row .label { font-size: 13px; color: var(--text-secondary); }
.ins-checkin-status-row .value { font-size: 14px; font-weight: 600; }
.ins-checkin-status-row .value.green { color: var(--green); }
.ins-checkin-status-row .value.orange { color: var(--orange); }
.ins-checkin-status-row .value.red { color: var(--red); }

/* Installer checkin buttons (enhanced) */
.ins-checkin-actions { display: flex; gap: 12px; margin: 0 16px 12px; }
.ins-checkin-btn { flex: 1; padding: 16px 12px; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ins-checkin-btn:active { transform: scale(0.97); }
.ins-checkin-btn .btn-icon { font-size: 24px; }
.ins-checkin-btn .btn-sub { font-size: 11px; font-weight: 400; opacity: 0.85; }
.ins-checkin-btn-green { background: var(--green); color: #fff; box-shadow: 0 3px 12px rgba(7,193,96,0.35); }
.ins-checkin-btn-red { background: var(--red); color: #fff; box-shadow: 0 3px 12px rgba(244,67,54,0.35); }
.ins-checkin-btn-gray { background: #e0e0e0; color: #999; cursor: not-allowed; }

/* Installer checkin record card */
.ins-record-card { background: var(--card-bg); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; }
.ins-record-card .ins-record-date { font-size: 14px; font-weight: 600; color: var(--text); }
.ins-record-card .ins-record-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ins-record-card .ins-record-hours { font-size: 16px; font-weight: 700; color: var(--orange); }
.ins-record-card .ins-record-hours .unit { font-size: 12px; font-weight: 400; }

/* Installer expense card (enhanced) */
.ins-expense-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.ins-expense-card .ins-exp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.ins-expense-card .ins-exp-type { font-size: 14px; font-weight: 600; color: var(--text); }
.ins-expense-card .ins-exp-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.ins-expense-card .ins-exp-amount { font-size: 18px; font-weight: 700; color: var(--red); }
.ins-expense-card .ins-exp-date { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 2px; }
.ins-expense-card .ins-exp-actions { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Installer settle progress bar */
.ins-settle-progress { margin: 0 16px 12px; background: var(--card-bg); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.ins-settle-progress-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; margin: 10px 0; }
.ins-settle-progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.ins-settle-progress-fill.paid { background: linear-gradient(90deg, var(--green), #00b894); }
.ins-settle-progress-labels { display: flex; justify-content: space-between; font-size: 12px; }
.ins-settle-progress-labels .paid-label { color: var(--green); font-weight: 600; }
.ins-settle-progress-labels .unpaid-label { color: var(--red); font-weight: 600; }

/* Installer settle detail card */
.ins-settle-card { background: var(--card-bg); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.ins-settle-card .ins-settle-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ins-settle-card .ins-settle-project { font-size: 14px; font-weight: 600; }
.ins-settle-card .ins-settle-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); padding: 3px 0; }
.ins-settle-card .ins-settle-amount { font-size: 16px; font-weight: 700; color: var(--orange); }

/* Installer work report card */
.ins-work-report-card { margin: 0 16px 12px; background: linear-gradient(135deg, #e3f2fd, #bbdefb); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; cursor: pointer; transition: transform 0.15s; }
.ins-work-report-card:active { transform: scale(0.98); }
.ins-work-report-card .ins-wr-icon { font-size: 28px; flex-shrink: 0; }
.ins-work-report-card .ins-wr-text { flex: 1; }
.ins-work-report-card .ins-wr-title { font-size: 14px; font-weight: 600; color: var(--blue); }
.ins-work-report-card .ins-wr-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ins-work-report-card .ins-wr-btn { flex-shrink: 0; padding: 8px 16px; background: var(--blue); color: #fff; border: none; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Installer empty state */
.ins-empty-action { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.ins-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ins-empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.ins-empty-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.ins-empty-btn { display: inline-block; padding: 10px 24px; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }

/* Installer project picker (enhanced) */
.ins-project-picker { margin: 0 16px 12px; }
.ins-project-picker select { width: 100%; padding: 12px 14px; border: 2px solid var(--orange); border-radius: var(--radius); font-size: 14px; font-weight: 500; background: var(--card-bg); box-shadow: var(--shadow); outline: none; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e65100' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
