/*!
 * H5 移动端样式（Vant 风格）
 * 黄金珠宝门店管理系统 — 自包含，无需外部依赖
 * 基准 375px，使用 rem + Flex 布局
 */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 14px; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #323233;
    background: #f7f8fa;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, button { font-family: inherit; font-size: 14px; outline: none; border: none; }
.hide { display: none !important; }

:root {
    --primary: #c8a45e;
    --primary-dark: #b08a48;
    --danger: #ee0a24;
    --success: #07c160;
    --warning: #ff976a;
    --gray-1: #f7f8fa;
    --gray-2: #f2f3f5;
    --gray-3: #ebedf0;
    --gray-4: #dcdee0;
    --gray-5: #c8c9cc;
    --gray-6: #969799;
    --gray-7: #646566;
    --gray-8: #323233;
    --bg-dark: #1a1d29;
}

/* ================= 登录页 ================= */
.h5-login-body {
    background: linear-gradient(160deg, #1a1d29 0%, #2a2e3f 60%, #c8a45e 130%);
    min-height: 100vh;
    color: #fff;
}
.h5-login-wrap { padding: 24px 16px 32px; max-width: 480px; margin: 0 auto; }
.h5-login-panel {
    margin-top: 12px;
    padding: 20px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}
.h5-login-header { text-align: center; padding: 8px 0 20px; }
.h5-login-header h2 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
.demo-login-intro {
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.demo-login-intro__brand { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.demo-login-intro__icon { font-size: 26px; }
.demo-login-intro__eyebrow { margin: 0 0 4px; font-size: 11px; color: #fcd34d; letter-spacing: 0.05em; }
.demo-login-intro__title { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.demo-login-intro__sub { margin: 0; font-size: 12px; opacity: 0.75; }
.demo-login-intro__scope { margin: 8px 0; font-size: 12px; opacity: 0.85; line-height: 1.5; }
.demo-login-intro__where {
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(200, 164, 94, 0.15);
    font-size: 12px;
}
.demo-login-intro__where-label { display: block; opacity: 0.75; margin-bottom: 4px; }
.demo-login-intro__after { margin: 0 0 10px; font-size: 12px; color: #fde68a; line-height: 1.45; }
.demo-login-intro__steps { display: grid; gap: 8px; margin-bottom: 8px; }
.demo-login-intro__step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 4px 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
.demo-login-intro__step-n {
    grid-row: span 2;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    font-size: 12px; font-weight: 600;
}
.demo-login-intro__step-t { font-size: 13px; font-weight: 600; }
.demo-login-intro__step-d { grid-column: 2; font-size: 11px; opacity: 0.7; }
.demo-login-intro__unify { margin: 0; font-size: 11px; opacity: 0.75; line-height: 1.45; }
.demo-login-intro__unify a { color: #fcd34d; }
.h5-login-header .logo {
    font-size: 56px;
    width: 88px; height: 88px; line-height: 88px;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
}
.h5-login-header h1 { font-size: 22px; margin: 0 0 8px; font-weight: 600; }
.h5-login-line-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.h5-login-header .subtitle { font-size: 13px; opacity: .7; margin: 0; }

.h5-login-form {
    background: #fff;
    color: #323233;
    border-radius: 16px;
    padding: 24px 20px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.h5-login-form .field { margin-bottom: 16px; }
.h5-login-form label { display: block; font-size: 13px; color: var(--gray-7); margin-bottom: 6px; }
.h5-login-form input[type=text],
.h5-login-form input[type=password] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--gray-3);
    border-radius: 8px;
    background: #fafafa;
    font-size: 15px;
}
.h5-login-form input:focus { border-color: var(--primary); background: #fff; }
.btn-login {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
}
.btn-login:active { background: var(--primary-dark); }
.h5-login-form .msg { text-align: center; min-height: 20px; padding: 8px 0 0; font-size: 13px; }
.h5-login-form .msg.success { color: var(--success); }
.h5-login-form .msg.error { color: var(--danger); }
.h5-login-form .tips { text-align: center; color: var(--gray-6); font-size: 12px; margin: 12px 0 0; }
.h5-login-demo-tag {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.15);
    color: #9a7b1a;
    font-size: 12px;
}
.h5-login-demo-role {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.1);
    text-align: center;
}
.h5-login-wrap .demo-login-side {
    margin-top: 14px;
    padding: 0 4px 8px;
    color: var(--gray-8);
    max-height: none;
}
.h5-login-wrap .demo-login-side__head h2 {
    font-size: 16px;
    color: var(--gray-9);
}
.h5-login-wrap .demo-login-side__head p {
    font-size: 12px;
    color: var(--gray-6);
    margin-bottom: 12px;
}
.h5-login-wrap .demo-login-group h3 {
    color: var(--gray-7);
}
.h5-login-wrap .demo-login-card {
    border-color: #e5e7eb;
    background: #fff;
}
.h5-login-wrap .demo-login-card__name { color: var(--gray-9); }
.h5-login-wrap .demo-login-card__cred { color: var(--gray-7); }
.h5-login-wrap .demo-login-card__desc { color: var(--gray-6); }
.h5-login-wrap .demo-login-card.is-active {
    border-color: var(--primary);
    background: rgba(201, 162, 39, 0.08);
    box-shadow: none;
}
.h5-login-wrap .demo-login-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ================= 主体 ================= */
.h5-body { padding-bottom: 60px; min-height: 100vh; }

.h5-header {
    position: sticky; top: 0; z-index: 100;
    height: 46px;
    display: flex; align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--gray-3);
    padding: 0 12px;
}
.h5-header .title {
    flex: 1; text-align: center;
    font-size: 16px; font-weight: 500;
}
.h5-header .back {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--gray-7);
}
.h5-header .logout {
    color: var(--gray-7); font-size: 13px;
    padding: 6px 10px;
}

/* ================= 卡片 ================= */
.h5-card {
    background: #fff;
    margin: 12px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.h5-card .card-title {
    font-size: 15px; font-weight: 500;
    margin: 0 0 12px;
    color: var(--gray-8);
}
.h5-card .empty {
    color: var(--gray-6);
    text-align: center;
    padding: 24px 12px;
    font-size: 14px;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty .hint { font-size: 12px; color: var(--gray-5); margin-top: 8px; }

/* 用户卡片 */
.user-card .hello {
    display: flex; align-items: center;
    padding-bottom: 16px; border-bottom: 1px solid var(--gray-3);
}
.user-card .avatar {
    width: 48px; height: 48px; line-height: 48px;
    text-align: center; font-size: 28px;
    background: var(--gray-2); border-radius: 50%;
    margin-right: 12px;
}
.user-card .name { font-size: 16px; font-weight: 500; }
.user-card .role { font-size: 12px; color: var(--gray-6); margin-top: 4px; }
.today-stat {
    display: flex; padding-top: 16px;
}
.today-stat .stat-item { flex: 1; text-align: center; }
.today-stat .num {
    font-size: 22px; font-weight: 600; color: var(--primary);
}
.today-stat .label { font-size: 12px; color: var(--gray-6); margin-top: 4px; }

/* 金价卡片 */
.gold-list .gold-item {
    display: flex; align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gray-3);
}
.gold-list .gold-item:last-child { border-bottom: 0; }
.gold-name { width: 100px; font-size: 14px; }
.gold-prices { flex: 1; display: flex; gap: 12px; font-size: 13px; }
.gold-prices .sell { color: var(--danger); }
.gold-prices .recycle { color: var(--success); }

.gold-banner {
    background: linear-gradient(135deg, #c8a45e, #b08a48);
    color: #fff;
}
.gold-banner .banner-shop { font-size: 18px; font-weight: 500; }
.gold-banner .banner-date { font-size: 13px; opacity: .85; margin-top: 4px; }

.gold-table {
    width: 100%;
    border-collapse: collapse;
}
.gold-table th, .gold-table td {
    padding: 10px 6px;
    text-align: center;
    border-bottom: 1px solid var(--gray-3);
    font-size: 13px;
}
.gold-table th { color: var(--gray-6); font-weight: 400; background: var(--gray-1); }
.gold-table td.sell { color: var(--danger); font-weight: 500; }
.gold-table td.recycle { color: var(--success); font-weight: 500; }

/* 报表 */
.stat-banner {
    background: linear-gradient(135deg, #1a1d29, #2a2e3f);
    color: #fff;
    display: flex;
}
.stat-banner .banner-item { flex: 1; text-align: center; padding: 8px 0; }
.stat-banner .banner-item + .banner-item { border-left: 1px solid rgba(255,255,255,.15); }
.stat-banner .num { font-size: 22px; font-weight: 600; color: var(--primary); }
.stat-banner .lbl { font-size: 12px; opacity: .75; margin-top: 4px; }
.order-item {
    display: flex; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-3);
    font-size: 13px;
}
.order-item:last-child { border-bottom: 0; }
.order-no { flex: 1; color: var(--gray-7); }
.order-amt { color: var(--danger); font-weight: 500; min-width: 80px; text-align: right; }
.order-time { color: var(--gray-6); min-width: 90px; text-align: right; font-size: 12px; }

/* 宫格 */
.h5-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 18px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.h5-tile {
    text-align: center;
    padding: 8px 4px;
    color: var(--gray-8);
}
.h5-tile .ico {
    font-size: 28px;
    width: 48px; height: 48px;
    line-height: 48px; margin: 0 auto 6px;
    background: var(--gray-1);
    border-radius: 12px;
}
.h5-tile .lbl { font-size: 12px; color: var(--gray-7); }
.h5-tile:active { opacity: .6; }

/* 搜索 */
.search-bar {
    display: flex; gap: 8px;
}
.search-bar input {
    flex: 1; height: 40px; padding: 0 12px;
    background: var(--gray-2); border-radius: 20px;
    font-size: 14px;
}
.btn-primary {
    padding: 0 18px; height: 40px;
    border-radius: 20px;
    background: var(--primary); color: #fff;
    font-size: 14px;
}
.btn-primary:active { background: var(--primary-dark); }
.tip { color: var(--gray-6); font-size: 12px; margin: 8px 0 0; }

/* 商品条目 */
.goods-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-3);
}
.goods-item:last-child { border-bottom: 0; }
.goods-name { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.goods-meta { font-size: 12px; color: var(--gray-7); line-height: 1.7; }
.status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 12px;
}
.status-1 { background: #e1f3d8; color: var(--success); }
.status-2 { background: #fde2e2; color: var(--danger); }
.status-3 { background: #faecd8; color: var(--warning); }
.status-4 { background: var(--gray-3); color: var(--gray-6); }

/* ================= 底部 tabbar ================= */
.h5-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    height: 50px;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--gray-3);
    z-index: 100;
}
.h5-tabbar .tab {
    flex: 1; text-align: center;
    padding: 6px 0;
    color: var(--gray-7);
    font-size: 11px;
}
.h5-tabbar .tab div:first-child { font-size: 22px; line-height: 1.1; }
.h5-tabbar .tab.active { color: var(--primary); }

/* ===== 收银台 ===== */
.cashier-info .info-row { display: flex; padding: 6px 0; font-size: 13px; align-items: center; }
.cashier-info .info-row .lbl { width: 70px; color: var(--gray-7); }
.cashier-info .info-row .val { flex: 1; color: var(--gray-8); font-weight: 500; }
.cashier-info .price-tag { display: inline-block; padding: 2px 8px; background: var(--primary); color: #fff; border-radius: 10px; font-size: 11px; margin-right: 4px; margin-bottom: 4px; }
.cashier-info .muted { color: var(--gray-6); font-size: 12px; }

.scan-row { display: flex; gap: 8px; }
.scan-row .h5-input { flex: 1; }
.h5-btn.mini { padding: 0 16px; height: 38px; line-height: 38px; font-size: 14px; }

.item-row { padding: 10px 0; border-bottom: 1px solid var(--gray-3); }
.item-row:last-child { border-bottom: 0; }
.item-row .hd { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.item-row .hd .del { color: var(--danger); font-size: 12px; }
.item-row .bd { display: flex; justify-content: space-between; color: var(--gray-7); font-size: 12px; margin-bottom: 6px; }
.item-row .bd .subtotal { color: var(--primary); font-weight: 600; font-size: 14px; }
.item-row .ed { display: flex; gap: 6px; font-size: 11px; color: var(--gray-7); align-items: center; }
.item-row .ed input { flex: 1; height: 28px; padding: 0 6px; border: 1px solid var(--gray-3); border-radius: 4px; font-size: 12px; min-width: 0; }

.empty-tip { text-align: center; padding: 20px 0; color: var(--gray-6); font-size: 13px; }

.form-row { display: flex; align-items: center; padding: 8px 0; font-size: 13px; }
.form-row label { width: 80px; color: var(--gray-7); flex-shrink: 0; }
.form-row .h5-input { flex: 1; height: 36px; }
.form-row.settle-line { justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--gray-3); }
.form-row.settle-line .amt { font-weight: 600; color: var(--gray-8); }
.form-row.settle-line.big .amt.big { font-size: 20px; color: var(--primary); }

.h5-fixed-bottom { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 8px; background: #fff; border-top: 1px solid var(--gray-3); z-index: 100; }
.h5-fixed-bottom .h5-btn { flex: 1; }
.h5-fixed-bottom .h5-btn.flat { flex: 0 0 30%; background: var(--gray-2); color: var(--gray-8); }

.card-title { font-size: 14px; font-weight: 600; color: var(--gray-8); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--gray-3); }

/* ================= 老板日报极简端 ================= */
.h5-boss-body { background: linear-gradient(180deg, #1a1d29 0%, #f7f8fa 220px); padding-bottom: 64px; }
.h5-boss-header { background: transparent; color: #fff; border: none; }
.h5-boss-header .back, .h5-boss-header .title { color: #fff; }
.h5-boss-date { font-size: 12px; color: rgba(255,255,255,0.75); }
.h5-boss-hero { padding: 8px 16px 16px; color: #fff; }
.h5-boss-shop { font-size: 20px; font-weight: 600; font-family: "Noto Serif SC", serif; }
.h5-boss-greet { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.h5-boss-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 12px; }
.h5-boss-kpi { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.h5-boss-kpi .kpi-label { font-size: 12px; color: var(--gray-6); margin-bottom: 6px; }
.h5-boss-kpi .kpi-value { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.h5-boss-stock { margin: 0 12px 12px; }
.h5-grid--boss { grid-template-columns: repeat(4, 1fr); }
.h5-tile--boss { background: linear-gradient(135deg, #c8a45e, #b08a48); color: #fff; }
.h5-tile--boss .lbl { color: #fff; }
