/* shared/common.css —— 三端共享基础样式 v2（高端大气升级版） */
:root {
  --brand: #1a6e4f;
  --brand-dark: #0f4d37;
  --brand-light: #e8f4ee;
  --accent: #c8a45c;
  --accent-light: #f7efdd;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2430;
  --text-2: #5f6b7a;
  --text-3: #8a94a6;
  --line: #e8ebf0;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(23, 43, 77, .06), 0 1px 3px rgba(23, 43, 77, .04);
  --shadow-lg: 0 12px 32px rgba(23, 43, 77, .12);
  --font: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 状态徽标（柔和渐变感：浅底深字） */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.gray { background: #f1f3f6; color: #5f6b7a; }
.badge.blue { background: #e8f0fe; color: #1c6df2; }
.badge.cyan { background: #e6f7f7; color: #08979c; }
.badge.orange { background: #fff3e0; color: #d46b08; }
.badge.purple { background: #f3e8fd; color: #8b2fc9; }
.badge.green { background: #e6f7ec; color: #189a5e; }
.badge.red { background: #fdeaea; color: #d03050; }
.badge.dark { background: #eceff3; color: #3f4652; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; padding: 9px 18px; font-size: 14px; transition: all .18s; font-weight: 500; }
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--brand) 0%, #2b8a63 100%); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(26,110,79,.25); }
.btn.primary:hover { box-shadow: 0 6px 16px rgba(26,110,79,.32); color: #fff; }
.btn.ghost { background: var(--brand-light); border-color: transparent; color: var(--brand); }
.btn.ghost:hover { background: #dcefe4; color: var(--brand-dark); }
.btn.danger { background: #e5484d; border-color: transparent; color: #fff; }
.btn.danger:hover { background: #d6393e; color: #fff; }
.btn.green { background: linear-gradient(135deg, #189a5e 0%, #2bb673 100%); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(24,154,94,.22); }
.btn.green:hover { color: #fff; }
.btn.gold { background: linear-gradient(135deg, #b8914e 0%, #d3ae6c 100%); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(200,164,92,.28); }
.btn.gold:hover { color: #fff; }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); border: 1px solid rgba(232,235,240,.6); }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.field label .req { color: #e5484d; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fbfcfe; transition: border-color .15s, box-shadow .15s; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,110,79,.12); background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #b3bcc9; }

/* 表格 */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius-lg); overflow: hidden; font-size: 14px; box-shadow: var(--shadow); border: 1px solid rgba(232,235,240,.6); }
.tbl th { background: #f8fafc; text-align: left; padding: 12px 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; border-bottom: 1px solid var(--line); font-size: 13px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid #f2f4f7; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafcfb; }

/* toast */
.toast { position: fixed; top: 26px; left: 50%; transform: translateX(-50%) translateY(-16px); padding: 11px 24px; border-radius: 12px; color: #fff; font-size: 14px; opacity: 0; transition: all .25s; z-index: 9999; box-shadow: var(--shadow-lg); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: linear-gradient(135deg, #189a5e, #2bb673); }
.toast.err { background: linear-gradient(135deg, #d6393e, #e5484d); }

/* 图片预览 */
.img-preview { position: fixed; inset: 0; background: rgba(10,15,25,.78); display: flex; align-items: center; justify-content: center; z-index: 9998; backdrop-filter: blur(4px); }
.img-preview img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.img-preview .close { position: absolute; top: 18px; right: 26px; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

/* 签名板 */
.sign-pad { border: 2px dashed #c9d2dd; border-radius: 14px; background: #fff; touch-action: none; }

/* 定位按钮与地址信息 */
.geo-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-light); color: var(--brand); border: 1px solid rgba(26,110,79,.2); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 500; transition: all .15s; }
.geo-btn:hover { background: #dcefe4; }
.geo-btn.loading { opacity: .6; pointer-events: none; }
.geo-tip { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.geo-tip a { color: var(--brand); text-decoration: underline; }
.geo-ok { color: var(--brand); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* 通用文字 */
.muted { color: var(--text-3); font-size: 12px; }
.sec-title { font-size: 14px; font-weight: 600; margin: 18px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); }
.mini { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mini img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: transform .15s; }
.mini img:hover { transform: scale(1.04); }

/* 小号标签 chip */
.chip { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; margin: 3px 4px 3px 0; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--brand); }
.chip.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand); font-weight: 500; }

/* 抽屉（H5 底部弹层 / 后台右侧弹层通用） */
.drawer-mask { position: fixed; inset: 0; background: rgba(10,15,25,.45); z-index: 100; display: none; backdrop-filter: blur(2px); }
.drawer-mask.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 640px; max-width: 94vw; background: #fff; z-index: 101; transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.8,.36,1); overflow-y: auto; box-shadow: var(--shadow-lg); }
.drawer.open { transform: translateX(0); }
.drawer .d-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); z-index: 2; font-size: 15px; }
.drawer .d-body { padding: 18px 20px; }
.drawer .d-head .close-x { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text-3); cursor: pointer; transition: all .15s; }
.drawer .d-head .close-x:hover { background: #f2f4f7; color: var(--text); }
@media (max-width: 768px) {
  .drawer { width: 100vw; max-width: 100vw; top: auto; bottom: 0; transform: translateY(100%); border-radius: 20px 20px 0 0; max-height: 92vh; }
  .drawer.open { transform: translateY(0); }
}
