/* ===== 手表维修服务中心 - 蓝白主题 ===== */
:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --sky-50: #f0f9ff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --green: #16a34a;
  --orange: #ea580c;
  --purple: #7c3aed;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-lg: 0 8px 30px rgba(37, 99, 235, .18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--sky-50) 0%, #fff 30%);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.55;
}
.hidden { display: none !important; }

/* ===== 顶部导航 ===== */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(120deg, var(--blue-600), var(--blue-500) 70%, #60a5fa);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,.35);
}
.header-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-icon img { width: 38px; height: 38px; object-fit: cover; display: block; }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 11px; opacity: .85; }
.header-right { display: flex; align-items: center; gap: 8px; }
.user-chip {
  background: rgba(255,255,255,.18); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.icon-btn:active { transform: scale(.92); }

/* 底部标签栏 */
.tab-bar {
  max-width: 760px; margin: 0 auto;
  display: flex; border-top: 1px solid rgba(255,255,255,.25);
}
.tab {
  flex: 1; text-align: center; padding: 8px 0 9px;
  font-size: 12.5px; color: rgba(255,255,255,.85); cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tab.active { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.tab:active { background: rgba(255,255,255,.08); }

/* ===== 主内容 ===== */
.view { max-width: 760px; margin: 0 auto; padding: 16px; padding-bottom: 80px; }

/* ===== 卡片 ===== */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
  border: 1px solid var(--gray-100);
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ===== 登录/注册（紧凑版，手机一屏） ===== */
.auth-wrap {
  max-width: 420px; margin: 3vh auto 0; padding: 0 16px;
}
.auth-logo {
  text-align: center; margin-bottom: 14px;
}
.auth-logo .logo-icon {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.auth-logo .logo-icon img { width: 52px; height: 52px; object-fit: cover; display: block; }
.auth-logo h1 { font-size: 18px; color: var(--gray-900); }
.auth-logo p { color: var(--gray-500); font-size: 11px; margin-top: 2px; }
.auth-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 16px 14px;
}
.auth-tabs { display: flex; background: var(--gray-100); border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; padding: 6px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--gray-500); cursor: pointer;
}
.auth-tabs button.active { background: #fff; color: var(--blue-600); box-shadow: var(--shadow); }
.auth-tip { background: var(--blue-50); color: var(--blue-700); font-size: 11px; padding: 7px 10px; border-radius: 8px; margin-bottom: 10px; }

/* ===== 表单 ===== */
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--gray-700); margin-bottom: 4px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1.5px solid var(--gray-200); border-radius: 10px; background: #fff;
  color: var(--gray-900); outline: none; transition: border .15s, box-shadow .15s;
  font-family: inherit;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.field .hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* 验证码输入行 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { width: auto; white-space: nowrap; padding: 10px 12px; flex-shrink: 0; font-size: 13px; }

.btn {
  display: block; width: 100%; padding: 11px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: linear-gradient(120deg, var(--blue-600), var(--blue-500));
  color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.3);
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: var(--gray-100); color: var(--gray-700); box-shadow: none; }
.btn.green { background: linear-gradient(120deg, #16a34a, #22c55e); box-shadow: 0 4px 14px rgba(22,163,74,.3); }
.btn.red { background: linear-gradient(120deg, #dc2626, #ef4444); box-shadow: 0 4px 14px rgba(220,38,38,.3); }
.btn.sm { padding: 8px 14px; font-size: 13px; width: auto; display: inline-block; }

/* ===== 状态标签 ===== */
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip.s0 { background: var(--gray-100); color: var(--gray-500); }        /* 待受理 */
.chip.s1 { background: #fff7ed; color: var(--orange); }                  /* 检测中 */
.chip.s2 { background: var(--blue-100); color: var(--blue-700); }        /* 维修中 */
.chip.s3 { background: #f3e8ff; color: var(--purple); }                  /* 待取件 */
.chip.s4 { background: #dcfce7; color: var(--green); }                   /* 已完成 */
.chip.s5 { background: #fee2e2; color: var(--red); }                     /* 已取消 */

/* ===== 订单列表 ===== */
.order-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--gray-100); padding: 14px; margin-bottom: 12px;
  cursor: pointer; transition: transform .1s, box-shadow .15s;
  border-left: 4px solid var(--blue-500);
}
.order-item:active { transform: scale(.99); }
.order-item .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-no { font-size: 13px; font-weight: 700; color: var(--gray-900); }
.order-time { font-size: 11px; color: var(--gray-400); }
.order-item .row2 { margin-top: 8px; font-size: 14px; color: var(--gray-700); display: flex; justify-content: space-between; gap: 8px; }
.order-desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-price { font-weight: 700; color: var(--blue-600); }
.order-price.none { color: var(--gray-400); font-weight: 500; }
.order-item .row3 { margin-top: 8px; display: flex; gap: 8px; align-items: center; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty .e-icon { font-size: 48px; margin-bottom: 10px; }
.empty p { font-size: 14px; }

/* ===== 订单详情 ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-item { background: var(--gray-50); border-radius: 10px; padding: 10px 12px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item .k { font-size: 12px; color: var(--gray-500); }
.detail-item .v { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-top: 2px; word-break: break-all; }
.price-box { background: linear-gradient(120deg, var(--blue-50), #fff); border: 1.5px dashed var(--blue-500); border-radius: 12px; padding: 14px; margin: 12px 0; text-align: center; }
.price-box .p { font-size: 26px; font-weight: 800; color: var(--blue-600); }
.price-box .t { font-size: 12px; color: var(--gray-500); }
.price-box.pending { border-color: var(--gray-200); background: var(--gray-50); }
.price-box.pending .p { color: var(--gray-400); }

/* 时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--gray-200); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gray-200); border: 2px solid #fff;
}
.tl-item.cur::before { background: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.tl-item .st { font-size: 14px; font-weight: 600; }
.tl-item .tm { font-size: 12px; color: var(--gray-400); }
.tl-item.cur .st { color: var(--blue-700); }

/* ===== 统计卡片 ===== */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; text-align: center; }
.stat-card .num { font-size: 22px; font-weight: 800; color: var(--blue-600); }
.stat-card .lbl { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ===== 筛选条 ===== */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.filter-bar .f {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: #fff; border: 1.5px solid var(--gray-200); color: var(--gray-500); cursor: pointer;
}
.filter-bar .f.active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; font-weight: 600; }
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 12px; font-size: 14px; outline: none; }
.search-bar input:focus { border-color: var(--blue-500); }

/* ===== 悬浮按钮 ===== */
.fab {
  position: fixed; right: 20px; bottom: 24px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; font-size: 26px; box-shadow: 0 8px 24px rgba(37,99,235,.45);
  display: flex; align-items: center; justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 管理员表格 ===== */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.a-row { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.a-row .info .n { font-weight: 600; font-size: 14px; }
.a-row .info .p { font-size: 12px; color: var(--gray-500); }
.a-row .price { font-weight: 800; color: var(--blue-600); }
.a-row .price.none { color: var(--gray-400); font-weight: 500; }

/* ===== 弹层 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 20px; max-height: 88vh; overflow-y: auto; animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 16px; margin-bottom: 14px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 14px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(15,23,42,.88); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 200; pointer-events: none;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 管理端顶栏按钮 ===== */
.admin-actions { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* 分段按钮 */
.seg { display: flex; gap: 8px; }
.seg .btn { width: auto; }

@media (min-width: 600px) {
  .view { padding: 24px; }
}

/* ---------- 订单照片 ---------- */
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.img-cell { width: calc(33.33% - 8px); }
.img-cell img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-200); cursor: zoom-in; display: block; background: var(--gray-100); }
.img-meta { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.img-del { color: var(--red); margin-left: 6px; text-decoration: none; }
.pv-cell { position: relative; width: 72px; height: 72px; }
.pv-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-200); display: block; }
.pv-del { position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; line-height: 17px; text-align: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; cursor: pointer; border: 1px solid #fff; }
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, .88); z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-close { color: #fff; font-size: 14px; padding: 8px 22px; background: rgba(255,255,255,.16); border-radius: 20px; cursor: pointer; }

/* 滑块验证码紧凑样式 */
.slider-wrap { margin-bottom: 10px !important; }
.slider-track { height: 38px !important; }
.slider-handle { width: 38px !important; height: 38px !important; }
