:root {
  --ink: #1d1f21;
  --muted: #6b7076;
  --line: #e8eaed;
  --bg: #f7f8f9;
  --card: #ffffff;
  --accent: #12b3a3;
  --accent-soft: #e7f8f5;
  --warn: #e6a23c;
  --danger: #d9001b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 30, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* 顶部 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  padding: 0 28px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f0f2f3; color: #222;
  display: grid; place-items: center;
}
.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav a {
  padding: 8px 14px; border-radius: 9px; color: #555b61;
  transition: background .15s, color .15s;
}
.nav a:hover { background: #f2f4f5; color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: #0c8d80; font-weight: 600; }
.user-box { display: flex; align-items: center; gap: 10px; }
.portal-user {
  max-width: 180px; padding: 7px 12px; border-radius: 999px;
  background: var(--accent-soft); color: #0c8d80; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logout-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 9px; padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.logout-btn:hover { border-color: var(--accent); color: #0c8d80; }
.login-open { padding: 7px 18px; font-size: 13px; border-radius: 9px; }

/* 登录弹窗（与门户同风格） */
.login-mask {
  position: fixed; inset: 0; z-index: 110; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(24, 38, 40, .48); backdrop-filter: blur(4px);
}
.login-mask.show { display: flex; }
.login-card {
  position: relative; width: min(420px, 100%); padding: 34px 34px 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(20, 30, 40, .18);
}
.login-close {
  position: absolute; right: 14px; top: 12px; width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: #f4f6f6; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.login-close:hover { background: #eceff0; color: var(--ink); }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 19px; }
.login-title { text-align: center; font-size: 21px; margin: 18px 0 6px; letter-spacing: -.3px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 22px; }
#loginForm .form-item { margin-bottom: 14px; }
.login-error { min-height: 18px; color: var(--danger); font-size: 12px; margin: -2px 0 6px; }
.login-submit { width: 100%; padding: 12px; margin-top: 2px; }
.login-foot { text-align: center; color: #a7adb2; font-size: 12px; margin-top: 18px; }

/* 主体 */
.view { width: min(1120px, calc(100% - 40px)); margin: 28px auto 48px; flex: 1; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; }
.page-head p { margin: 0; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad { padding: 22px; }
.section-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); }

/* 首页 */
.hero {
  position: relative; overflow: hidden; padding: 52px 46px;
  background: linear-gradient(135deg, #ffffff 0%, #f2fbf9 100%);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(18,179,163,.14), transparent 70%);
}
.hero-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; background: var(--accent-soft); color: #0c8d80; font-size: 12px; font-weight: 600; }
.hero h1 { font-size: 36px; line-height: 1.25; margin: 14px 0 10px; letter-spacing: -1px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 0 22px; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 公司简介 */
.about-hero { padding: 38px; margin-bottom: 18px; background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%); }
.about-hero-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; background: #fff; color: #0c8d80; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.about-hero h2 { font-size: 30px; margin: 14px 0 10px; letter-spacing: -.5px; }
.about-hero p { max-width: 760px; color: var(--muted); line-height: 1.8; margin: 0 0 22px; }
.about-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 22px 16px; text-align: center; }
.stat-n { font-size: 26px; font-weight: 800; color: #0c8d80; letter-spacing: -.5px; }
.stat-t { font-size: 13px; color: var(--muted); margin-top: 6px; }
.about-section { margin-bottom: 18px; }
.about-section p { line-height: 1.8; color: var(--muted); margin: 0 0 10px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-card { padding: 18px; background: #fcfdfd; }
.about-card h3 { font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.about-card p { font-size: 13px; margin: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.contact-grid > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.contact-grid span { color: var(--muted); font-size: 13px; }
.contact-grid strong { font-size: 13px; text-align: right; word-break: break-all; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: .15s; font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0c9f91; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cfd4d8; background: #fafbfb; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.feature { padding: 22px; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft);
  color: #0c8d80; display: grid; place-items: center; margin-bottom: 12px;
}
.feature h3 { margin: 0 0 6px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }

.recent { margin-top: 22px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini-order { padding: 16px; display: flex; gap: 12px; align-items: center; }
.mini-order img { width: 58px; height: 72px; object-fit: contain; border-radius: 8px; background: #f0f2f3; }
.mini-order .no-img { width: 58px; height: 72px; border-radius: 8px; background: #f0f2f3; display: grid; place-items: center; color: #aaa; font-size: 12px; }
.mini-order .mo-body { min-width: 0; }
.mini-order .mo-id { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-order .mo-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.form-item { display: flex; flex-direction: column; gap: 7px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 13px; color: #4c5258; font-weight: 600; }
.form-item .hint-text { color: #9aa0a6; font-size: 12px; }
.input, .textarea, .select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(18,179,163,.12); }
.textarea { resize: vertical; min-height: 92px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.upload-box {
  border: 1px dashed #cfd6da; border-radius: 10px; padding: 18px; text-align: center;
  color: var(--muted); background: #fcfdfd; cursor: pointer;
}
.upload-box:hover { border-color: var(--accent); color: #0c8d80; }
.upload-box input { display: none; }
.type-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.type-pick label {
  flex: 1; min-width: 150px; display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.type-pick label:hover { border-color: var(--accent); }
.type-pick input { accent-color: var(--accent); }
.type-pick label:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft); color: #0c8d80; font-weight: 600;
}
.type-pick .type-note { color: var(--muted); font-size: 12px; font-weight: 400; }
/* 下单数量明细 / 尺码表矩阵 */
.matrix-block { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fcfdfd; }
.matrix-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.matrix-subtitle { font-size: 13px; font-weight: 600; color: #4c5258; margin: 22px 0 10px; }
.matrix-gender, .qty-gender { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 14px; }
.matrix-gender label, .qty-gender label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.matrix-gender input, .qty-gender input { accent-color: var(--accent); }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.matrix-table th, .matrix-table td { border: 1px solid var(--line); padding: 0; height: 44px; text-align: center; position: relative; background: #fff; }
.matrix-table th { background: #f5f7f8; color: #5c6268; font-weight: 600; }
.matrix-input { width: calc(100% - 12px); height: 30px; margin: 0 6px; text-align: center; background: #f7f9f9; border: 1px solid var(--line); border-radius: 6px; outline: none; font-size: 13px; }
.matrix-input:focus { border-color: var(--accent); background: #fff; }
.matrix-label { color: #4c5258; }
.matrix-del { position: absolute; top: 1px; right: 2px; border: 0; background: transparent; color: #f56c6c; font-size: 12px; cursor: pointer; line-height: 1; padding: 0; }
.matrix-add { display: inline-flex; align-items: center; margin-top: 8px; margin-right: 16px; color: #0c8d80; font-size: 13px; cursor: pointer; }
.matrix-add:hover { color: #06695f; }
.matrix-total { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.matrix-total b { color: #0c8d80; font-size: 15px; }

/* 上传款式 + 位置备注（与后台同款模式） */
.upload-section { margin-top: 2px; }
.upload-sec-title { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 2px; }
.upload-sec-hint { font-size: 13px; color: #5c6268; margin: 8px 0 12px; }
.of-uploads { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.of-image-group { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
.of-image-label { font-size: 13px; color: #5c6268; }
.of-upload {
  width: 380px; max-width: 100%; min-height: 420px; background: #fff; border: 1px dashed #d9dde0; border-radius: 8px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #8a9096; font-size: 13px; text-align: center; position: relative; overflow: hidden;
}
.of-upload:hover { background: #fafbfb; }
.of-upload .plus { font-size: 26px; margin-bottom: 10px; line-height: 1; }
.of-upload input { display: none; }
.of-upload .remove {
  position: absolute; top: 6px; right: 6px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); color: #fff; width: 22px; height: 22px;
  cursor: pointer; line-height: 1; z-index: 4;
}
.of-upload .of-view-original {
  position: absolute; top: 6px; right: 34px; border: 0; border-radius: 3px;
  background: rgba(0, 0, 0, 0.5); color: #fff; padding: 4px 7px;
  font-size: 12px; cursor: pointer; line-height: 1; z-index: 4;
}
.of-upload .of-view-original:hover { background: rgba(0, 0, 0, 0.72); }
.of-upload.has-img { cursor: crosshair; min-height: 0; height: auto; display: block; width: 380px; max-width: 100%; border: 0; }
.of-upload.has-img:hover { background: #fff; }
.of-upload.has-img img { width: 100%; height: auto; display: block; }
.of-mark { position: absolute; transform: translate(-50%, -50%); z-index: 3; }
.of-mark-num {
  display: flex; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
  background: #f56c6c; color: #fff; align-items: center; justify-content: center;
  font-size: 12px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); cursor: pointer;
}
.of-marks { margin-top: 6px; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.mark-card { border-top: 1px solid var(--line); padding-top: 14px; }
.mark-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mark-card-num { min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; background: #f0f2f5; color: #5c6268; font-size: 12px; }
.mark-card-head .btn { height: 28px; padding: 0 12px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #5c6268; cursor: pointer; }
.mark-card-head .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mark-card-body { display: flex; gap: 14px; align-items: flex-start; }
.shot-thumbs { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.shot-thumb-wrap { position: relative; width: 120px; }
.shot-thumb-wrap img { width: 120px; height: 120px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; background: #f0f2f3; }
.shot-badge { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; z-index: 1; }
.mark-note-label { font-size: 13px; color: #8a9096; margin-bottom: 4px; }
.mark-note { white-space: pre-wrap; font-size: 13px; color: var(--ink); line-height: 1.6; }
/* 订单详情页款式图标记 */
.shot-image { position: relative; display: inline-block; max-width: 100%; cursor: zoom-in; line-height: 0; }
.shot-image img { display: block; max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--line); }
.gallery .shot-image { margin: 0 8px 8px 0; }
.gallery .shot-image img { width: auto; height: auto; max-height: 420px; object-fit: contain; }
.mark-pin {
  position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px; background: #f56c6c; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px;
  text-align: center; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.4); z-index: 2;
}
@media (max-width: 480px) {
  .of-upload, .of-upload.has-img { width: 100%; min-height: 300px; }
}
.mark-card-panel { width: min(480px, 100%); max-height: 90vh; overflow: auto; padding: 30px 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(20,30,40,.18); position: relative; }
.mark-shot-boxes, .mark-upload-tip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mark-shot-box { position: relative; width: 72px; height: 72px; }
.mark-shot-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #f0f2f3; }
.mark-shot-box .remove { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #333; color: #fff; cursor: pointer; line-height: 18px; font-size: 13px; }

/* 通用确认弹窗 */
#confirmModal { z-index: 130; }
.confirm-card-panel {
  width: min(420px, 100%); padding: 30px 28px 24px; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(20, 30, 40, .18);
}
.confirm-card-panel .login-title { margin-top: 2px; }
.confirm-card-panel .login-sub { margin-bottom: 4px; line-height: 1.7; }

/* 订单列表 */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input { max-width: 320px; }
.toolbar .select { max-width: 180px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.order-list { display: grid; gap: 14px; }
.order-card { display: flex; gap: 16px; padding: 16px; transition: transform .15s, box-shadow .15s; }
.order-card:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(20,30,40,.09); }
.order-thumb { width: 96px; height: 126px; flex: none; border-radius: 10px; object-fit: contain; background: #f0f2f3; cursor: zoom-in; }
.order-thumb.empty { display: grid; place-items: center; color: #a9afb4; font-size: 12px; cursor: default; }
.order-main { flex: 1; min-width: 0; }
.order-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-no { font-weight: 700; font-size: 15px; }
.badge { padding: 2px 8px; border-radius: 6px; background: #eef1f3; color: #626970; font-size: 12px; }
.badge.sample { background: #fff4e6; color: #b8791d; }
.badge.revise { background: #f0ecff; color: #7356c7; }
.badge.status { background: var(--accent-soft); color: #0c8d80; }
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 13px; margin-top: 9px; }
.order-meta b { color: #4b5157; font-weight: 600; }
.progress-line { height: 6px; border-radius: 6px; background: #eef1f2; margin-top: 12px; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.progress-text { color: #9aa0a6; font-size: 12px; margin-top: 5px; }
.order-price { text-align: right; min-width: 90px; }
.order-price .price { font-size: 17px; font-weight: 700; color: #26292c; }
.order-price .arrow { display: block; margin-top: 38px; color: var(--accent); font-size: 13px; }
.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); }

/* 详情 */
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.back-link { color: var(--muted); }
.back-link:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.info-cell span { display: block; color: var(--muted); font-size: 12px; }
.info-cell b { font-size: 14px; font-weight: 600; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery img { width: 96px; height: 120px; object-fit: contain; border-radius: 9px; border: 1px solid var(--line); cursor: zoom-in; background: #f0f2f3; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.stage-dot { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; background: #eef1f2; color: #9aa0a6; }
.stage-dot.done { background: var(--accent); color: #fff; }
.stage-dot.doing { background: #fff5e8; color: var(--warn); border: 1px solid #f5d6a8; }
.stage-dot.out { background: #f0ecff; color: #7356c7; }
.stage-name { font-weight: 600; }
.stage-time { color: var(--muted); font-size: 12px; margin-left: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { border: 1px solid var(--line); padding: 7px 9px; text-align: center; }
.mini-table th { background: #fafbfb; color: var(--muted); font-weight: 600; }
.note-text { white-space: pre-wrap; color: #4b5157; }

/* 积分 */
.balance-card { padding: 24px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg,#ffffff,#f2fbf9); }
.balance-num { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.balance-label { color: var(--muted); font-size: 13px; }
.point-row { display: grid; grid-template-columns: 90px 1fr 100px 100px 160px; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; font-size: 13px; }
.point-row.head { background: #fafbfb; color: var(--muted); font-weight: 600; border-radius: 9px 9px 0 0; }
.point-row .plus { color: #0c9f91; font-weight: 700; }
.point-row .minus { color: var(--danger); font-weight: 700; }

/* 弹层 */
.img-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.86); display: none; align-items: center; justify-content: center; padding: 32px; }
.img-modal.show { display: flex; }
.img-modal img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.img-modal-close { position: absolute; right: 24px; top: 20px; background: rgba(255,255,255,.15); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px); z-index: 120; background: #222; color: #fff; padding: 10px 18px; border-radius: 9px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 页脚 */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 26px 20px 18px; }
.footer-inner { width: min(1120px, 100%); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; }
.footer-brand { font-weight: 800; font-size: 17px; }
.footer-note { color: var(--muted); font-size: 12px; margin-top: 3px; }
.footer-links { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { text-align: center; color: #a7adb2; font-size: 12px; margin-top: 20px; }
.footer-sep { display: inline-block; margin: 0 10px; color: #d6dadd; }
.icp-badge { display: inline-block; margin-right: 5px; padding: 0 4px; border-radius: 3px; background: #c8352b; color: #fff; font-size: 9px; font-weight: 700; line-height: 15px; vertical-align: 1px; }

.loading { padding: 70px 20px; text-align: center; color: var(--muted); }

@media (max-width: 860px) {
  .topbar { height: auto; min-height: 58px; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .brand-name { font-size: 17px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .user-box { margin-left: auto; }
  .user-label { display: none; }
  .login-card { padding: 28px 22px 24px; }
  .view { width: calc(100% - 24px); margin: 18px auto 34px; }
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 27px; }
  .features, .recent-grid, .detail-grid, .form-grid, .stat-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-hero { padding: 24px 20px; }
  .about-hero h2 { font-size: 24px; }
  .order-card { gap: 12px; }
  .order-thumb { width: 74px; height: 98px; }
  .order-price { display: none; }
  .point-row { grid-template-columns: 70px 1fr 80px; }
  .point-row .col-date, .point-row .col-note { display: none; }
  .footer-inner { flex-direction: column; }
}

/* ===== 手机端适配：单列布局、表格可横滑、弹窗铺满、触控友好 ===== */
@media (max-width: 600px) {
  html, body { overflow-x: hidden; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand-name { font-size: 16px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .view { width: calc(100% - 20px); margin: 14px auto 28px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 13px; }
  .card { padding: 16px; border-radius: 12px; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 23px; }

  /* 订单卡片：图片左、信息右，金额与进度在信息区底部 */
  .order-card { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .order-thumb { width: 72px; height: 96px; }
  .order-main { min-width: 0; flex: 1 1 calc(100% - 84px); }
  .order-top { gap: 6px; }
  .order-no { font-size: 13px; word-break: break-all; }
  .order-meta { gap: 3px 12px; font-size: 12px; }
  .progress-line { max-width: 100%; }
  .order-price { display: block; width: 100%; text-align: right; margin-top: 2px; }
  .order-price .price { font-size: 13px; }
  .order-price .arrow { margin-top: 4px; }

  /* 下单数量/尺寸表：保留宽度，容器内横向滚动 */
  .matrix-table, .mini-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .matrix-table thead, .matrix-table tbody, .matrix-table tr,
  .mini-table thead, .mini-table tbody, .mini-table tr { display: table; width: 100%; min-width: 360px; }
  .matrix-table th, .matrix-table td { height: 40px; }

  /* 上传款式：占满宽度 */
  .of-upload, .of-upload.has-img { width: 100%; min-height: 240px; }
  .of-upload.has-img { min-height: 0; }
  .of-uploads, .of-image-group { width: 100%; }
  .form-actions { flex-direction: column-reverse; gap: 8px; }
  .form-actions .btn { width: 100%; }

  /* 弹窗：左右留白、内容可滚动 */
  .login-card, .mark-card-panel, .confirm-card-panel { width: 100%; max-width: 100%; padding: 22px 18px; max-height: 92vh; overflow: auto; }
  .img-modal img { max-width: 96%; max-height: 80vh; }

  .footer-copy { line-height: 1.8; font-size: 11px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  .topbar, .footer, .btn, .back-link, .toast, .img-modal, .detail-head { display: none !important; }
  body { background: #fff; color: #111; }
  .app-shell, .view { display: block; width: 100%; margin: 0; padding: 0; }
  .detail-grid { display: block; }
  .detail-grid > div { display: block; width: 100%; }
  .card { box-shadow: none; border: 1px solid #ddd; border-radius: 6px; break-inside: avoid; page-break-inside: avoid; margin-bottom: 10px; }
  .gallery img, .shot-image img { max-width: 100%; height: auto; object-fit: contain; }
  .shot-image { break-inside: avoid; page-break-inside: avoid; }
  .timeline li { break-inside: avoid; page-break-inside: avoid; }
  .mini-table, .matrix-table { width: 100%; }
}

/* 手机端布局最终修正：导航独占整行，表格在卡片内横滑 */
@media (max-width: 860px) {
  .nav { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
  .brand { flex: 0 0 auto; }
  .user-box { flex: 0 0 auto; margin-left: auto; }
  .nav a { flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .nav { flex-basis: 100% !important; }
  .matrix-table, .mini-table { min-width: 320px !important; }
}
