/* 提料 H5 · 简道云蓝主题 */
:root {
  --blue: #1F6FEB;
  --blue-dark: #1a5fd0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1a1a1a;
  --sub: #8a9099;
  --red: #e54d42;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
  padding-bottom: env(safe-area-inset-bottom);
}
.boot, .empty { text-align: center; color: var(--sub); padding: 48px 16px; line-height: 1.8; }
.empty .hint { display: block; font-size: 12px; }

/* hero */
.hero { background: linear-gradient(135deg, #2b7bf3, var(--blue)); color: #fff; padding: 34px 20px 22px; }
.hero-greet { font-size: 21px; font-weight: 600; }
.hero-sub { font-size: 12px; opacity: .85; margin-top: 4px; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--blue); color: #fff; display: flex; align-items: center; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); }
.back { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; padding: 0 10px 0 0; cursor: pointer; }
.topbar-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding: 14px 14px 96px; max-width: 520px; margin: 0 auto; }

/* cards */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,40,80,.06); }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.card-title .req { color: var(--red); }
.proj-card { border-left: 4px solid var(--blue); }
.proj-name { font-weight: 600; }
.proj-sub { font-size: 12px; color: var(--sub); margin-top: 3px; }

/* search */
.search-card { padding: 12px; }
.search-row { display: flex; gap: 8px; }
.input { flex: 1; border: 1px solid #e3e7ee; border-radius: 10px; padding: 10px 12px; font-size: 15px; outline: none; width: 100%; background: #fafbfd; }
.input:focus { border-color: var(--blue); background: #fff; }
.hint { font-size: 12px; color: var(--sub); margin-top: 8px; }
.hint.center { text-align: center; }

/* buttons */
.btn { border: none; border-radius: 10px; padding: 11px 16px; font-size: 15px; cursor: pointer; }
.btn.primary { background: var(--blue); color: #fff; font-weight: 600; }
.btn.primary:active { background: var(--blue-dark); }
.btn.primary:disabled { opacity: .45; }
.btn.ghost { background: #eef2f9; color: #444; }
.btn.block { display: block; width: 100%; margin-bottom: 10px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.add { background: #eaf1fe; color: var(--blue); font-weight: 600; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.g-item { background: var(--card); border-radius: var(--radius); padding: 14px 4px; text-align: center; font-size: 12px; color: #333; box-shadow: 0 1px 3px rgba(20,40,80,.06); cursor: pointer; }
.g-item:active { background: #f0f5ff; }
.g-ico { font-size: 24px; margin-bottom: 6px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid #e3e7ee; background: #fff; border-radius: 10px; padding: 9px 13px; font-size: 14px; cursor: pointer; }
.chip.on { background: #eaf1fe; border-color: var(--blue); color: var(--blue); font-weight: 600; }

/* result list */
.result-count { font-size: 12px; color: var(--sub); margin: 2px 2px 10px; }
.proj-item { cursor: pointer; }
.proj-item:active { background: #f0f5ff; }
.hist-row { font-size: 12px; color: #555; padding: 7px 0; border-top: 1px solid #f0f2f6; }
.hist-time { color: var(--sub); margin-right: 6px; }

/* quota */
.quota-card { border-left: 4px solid var(--blue); }
.quota-time { font-weight: 400; font-size: 11px; color: var(--sub); float: right; }
.quota-nums { display: flex; text-align: center; }
.qn { flex: 1; }
.qn-v { font-size: 18px; font-weight: 700; color: var(--text); }
.qn-v.neg { color: var(--red); }
.qn-l { font-size: 11px; color: var(--sub); margin-top: 3px; }
.warn { margin-top: 10px; font-size: 12px; color: var(--red); background: #fdf1f0; border-radius: 8px; padding: 8px 10px; }

/* select */
.select { width: 100%; text-align: left; border: 1px dashed #cfd6e2; background: #fafbfd; border-radius: 10px; padding: 12px; font-size: 15px; color: #333; cursor: pointer; }

/* product rows */
.p-row { display: flex; justify-content: space-between; gap: 10px; }
.p-name { font-weight: 600; font-size: 14px; }
.p-sub { font-size: 12px; color: var(--sub); margin-top: 3px; }
.p-side { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.p-price { font-size: 13px; color: var(--blue); font-weight: 600; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 2px; }
.st { width: 30px; height: 30px; border: none; border-radius: 8px; background: #eef2f9; color: var(--blue); font-size: 17px; cursor: pointer; }
.st-q { width: 40px; height: 30px; border: 1px solid #e3e7ee; border-radius: 8px; text-align: center; font-size: 14px; }

/* cart */
.cart-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #f0f2f6; }
.cart-row:first-of-type { border-top: none; }

/* bottom bar */
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -2px 10px rgba(20,40,80,.08); display: flex; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 20; }
.cartbar-info { font-weight: 600; }

/* sheet */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; display: flex; align-items: flex-end; }
.sheet { background: #fff; width: 100%; max-width: 520px; margin: 0 auto; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 70vh; display: flex; flex-direction: column; }
.sheet-title { font-weight: 600; margin-bottom: 10px; text-align: center; }
.sheet-list { overflow-y: auto; }
.sheet-item { padding: 13px 10px; border-bottom: 1px solid #f0f2f6; font-size: 14px; }
.sheet-item.on { color: var(--blue); font-weight: 600; }
.sheet-item:active { background: #f5f7fb; }

/* toast */
.toast { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); background: rgba(20,25,35,.86); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 99; display: none; max-width: 80%; text-align: center; }
.toast.show { display: block; }

/* modal */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 320px; padding: 20px 18px 14px; }
.modal-title { font-weight: 600; text-align: center; margin-bottom: 12px; }
.modal-body { font-size: 13px; color: #555; line-height: 1.8; margin-bottom: 18px; word-break: break-all; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns .btn { flex: 1; }

/* done */
.done-card { text-align: center; padding: 30px 14px; }
.done-ico { font-size: 40px; }
.done-title { font-size: 17px; font-weight: 700; margin: 10px 0 6px; }
.done-sub { color: var(--sub); font-size: 13px; margin-bottom: 6px; }
