/* ====== 全局 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: #f0f7f5; color: #333; font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font-family: inherit; font-size: inherit; outline: none; border: none; }
button { cursor: pointer; }
.hidden { display: none !important; }
.bottom-spacer { height: 70px; }

/* ====== 蓝绿配色变量 ====== */
:root {
  --primary: #00897B;
  --primary-light: #4DB6AC;
  --primary-dark: #00695C;
  --primary-bg: #E0F2F1;
  --primary-gradient: linear-gradient(135deg, #00897B, #4DB6AC);
  --primary-active-bg: #E0F2F1;
  --primary-border: #00897B;
  --price-color: #00897B;
}

/* ====== 底部Tab ====== */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 55px;
  background: #fff; border-top: 1px solid #e0e0e0;
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 20px; color: #999; cursor: pointer; transition: 0.2s;
}
.tab-item.active { color: var(--primary); }
.tab-icon { font-size: 22px; line-height: 1; }
.tab-label { font-size: 11px; margin-top: 2px; }

/* ====== 页面 ====== */
.page { padding-top: 0; }

/* ====== 顶部品牌 ====== */
.page-top {
  background: var(--primary-gradient);
  padding: 16px 16px; color: #fff; text-align: center;
}
.brand-sub { font-size: 14px; opacity: 0.95; }

/* ====== 表单卡片 ====== */
.form-card {
  background: #fff; border-radius: 12px; margin: -16px 12px 12px;
  padding: 16px; box-shadow: 0 2px 12px rgba(0,137,123,0.08);
  position: relative; z-index: 2;
}
.form-section {
  margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0;
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-section-title {
  font-size: 15px; font-weight: 600; color: #333; margin-bottom: 10px;
}

/* ====== 地址选择 ====== */
.address-row { display: flex; gap: 8px; }
.address-group { flex: 1; }
.address-group label { display: block; font-size: 12px; color: #999; margin-bottom: 4px; }
.address-group select {
  width: 100%; padding: 10px 8px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; background: #fff; appearance: auto; text-align: center;
}

/* ====== 保洁项目选择 ====== */
.project-select { display: flex; gap: 10px; }
.project-item {
  flex: 1; border: 2px solid #eee; border-radius: 10px; padding: 14px 12px;
  text-align: center; cursor: pointer; transition: 0.2s;
}
.project-item.active {
  border-color: var(--primary); background: var(--primary-bg);
}
.project-name { font-size: 14px; font-weight: 600; color: #333; }
.project-desc { font-size: 11px; color: #999; margin-top: 2px; }
.project-price { font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 6px; }
.project-price::before { content: '¥'; font-size: 14px; }

/* ====== 表单通用 ====== */
.form-row { display: flex; gap: 10px; }
.flex-1 { flex: 1; }
.form-group label { display: block; font-size: 12px; color: #999; margin-bottom: 4px; }
.form-group select, .form-group input {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; background: #fff;
}
.form-input {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px;
}
.form-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; resize: vertical;
}

/* ====== 时间选择触发器（合并在一个框） ====== */
.time-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px;
  background: #fff; cursor: pointer; min-height: 42px;
}
.time-trigger .tt-icon { font-size: 18px; }
.time-trigger .tt-text { flex: 1; font-size: 15px; color: #333; }
.time-trigger .tt-placeholder { flex: 1; font-size: 15px; color: #bbb; }
.time-trigger .tt-arrow { font-size: 16px; color: #ccc; }
.time-trigger.has-value { border-color: var(--primary); }

/* ====== 底部弹窗（时间选择器） ====== */
.sheet-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-content {
  background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 500px;
  max-height: 80vh; overflow-y: auto; animation: slideUp 0.25s ease;
  padding: 0 0 20px;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.sheet-header h3 { font-size: 16px; }
.sheet-close { font-size: 20px; color: #999; cursor: pointer; padding: 4px; }

/* 日期切换条 */
.date-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.date-nav button {
  background: none; font-size: 22px; color: var(--primary); padding: 4px 10px;
}
.date-nav .date-display { font-size: 16px; font-weight: 600; color: #333; }

/* 时段列表 */
.slot-list { padding: 0 16px; }
.slot-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border: 1.5px solid #e0e0e0; border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; transition: 0.15s;
}
.slot-item:hover { border-color: var(--primary-light); }
.slot-item.selected {
  border-color: var(--primary); background: var(--primary-bg);
}
.slot-item.disabled {
  border-color: #eee; background: #f9f9f9; cursor: not-allowed; opacity: 0.5;
}
.slot-item .slot-time { font-size: 15px; font-weight: 600; color: #333; }
.slot-item.disabled .slot-time { color: #bbb; }
.slot-item .slot-status { font-size: 12px; color: var(--primary); }
.slot-item.disabled .slot-status { color: #ccc; }
.slot-item .slot-status.full { color: #e74c3c; }

/* 底部按钮 */
.sheet-footer {
  padding: 12px 16px 0;
}
.btn-primary-bg {
  width: 100%; padding: 12px; border-radius: 10px; font-size: 16px; font-weight: 600;
  text-align: center; color: #fff; background: var(--primary-gradient);
}
.btn-primary-bg:disabled { opacity: 0.4; cursor: not-allowed; }

/* ====== 增值服务 ====== */
.addon-list { display: flex; flex-direction: column; gap: 8px; }
.addon-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px;
  cursor: pointer; transition: 0.15s;
}
.addon-item.active {
  border-color: var(--primary); background: var(--primary-bg);
}
.addon-check { font-size: 18px; line-height: 1; }
.addon-name { flex: 1; font-size: 14px; color: #333; }
.addon-price { font-size: 14px; font-weight: 600; color: var(--primary); }

/* ====== 底部价格和按钮 ====== */
.form-footer {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee;
}
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.total-row span:first-child { font-size: 15px; color: #666; }
.total-price { font-size: 28px; font-weight: 700; color: var(--primary); }
.total-price::before { content: '¥'; font-size: 18px; }
.btn-row { display: flex; gap: 10px; }
.btn {
  flex: 1; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: 600;
  text-align: center;
}
.btn-cancel { background: #f5f5f5; color: #666; }
.btn-submit { background: var(--primary-gradient); color: #fff; }

/* ====== 充值页 ====== */
.balance-area { padding: 24px 0; text-align: center; }
.balance-label { font-size: 14px; color: #999; }
.balance-amount { font-size: 40px; font-weight: 700; color: var(--primary); margin-top: 6px; }
.recharge-amounts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.recharge-item {
  border: 2px solid #eee; border-radius: 10px; padding: 14px; text-align: center;
  cursor: pointer; transition: 0.2s;
}
.recharge-item.active { border-color: var(--primary); background: var(--primary-bg); }
.recharge-num { font-size: 20px; font-weight: 700; color: #333; }
.recharge-tag { font-size: 11px; color: var(--primary); margin-top: 4px; min-height: 16px; }

/* ====== 订单列表 ====== */
.order-query-row { display: flex; gap: 8px; align-items: center; }
.order-list { padding: 0 12px 12px; }
.order-card {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.order-card .oc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.order-card .oc-no { font-size: 11px; color: #999; }
.order-card .oc-status {
  font-size: 12px; padding: 2px 10px; border-radius: 10px; font-weight: 500;
}
.order-card .oc-status.pending { background: #fff3cd; color: #856404; }
.order-card .oc-status.confirmed { background: #cce5ff; color: #004085; }
.order-card .oc-status.in_progress { background: #d4edda; color: #155724; }
.order-card .oc-status.completed { background: #e8e8e8; color: #666; }
.order-card .oc-status.cancelled { background: #f8d7da; color: #721c24; }
.order-card .oc-body { font-size: 13px; line-height: 1.7; color: #666; }
.order-card .oc-cancel { font-size: 12px; color: var(--primary); cursor: pointer; margin-top: 6px; display: inline-block; }

/* ====== 我的页菜单 ====== */
.mine-menu { }
.mine-menu-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer;
}
.mine-menu-item:last-child { border-bottom: none; }
.mine-menu-item span:first-child { font-size: 15px; }
.mine-menu-item span:last-child { color: #ccc; font-size: 18px; }

/* ====== Toast ====== */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 12px 24px;
  border-radius: 8px; font-size: 14px; z-index: 9999;
  animation: fadeInOut 2s ease forwards;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
