/* ============================================================
 * 多商户商城 · 设计系统 v2
 * 配色 / 字体层级 / 卡片·按钮·表格 / 动效 / 响应式
 * ============================================================ */
:root {
    --primary: #4f6ef7;
    --primary-dark: #3f59e0;
    --primary-soft: #eef2ff;
    --primary-grad: linear-gradient(135deg, #6d8bff 0%, #4f6ef7 100%);
    --success: #16a37b;  --success-soft: #e7f7f1;
    --warn:    #e8973a;  --warn-soft:    #fdf2e3;
    --danger:  #ef4d6b;  --danger-soft:  #fdeaef;
    --info:    #3aa0e0;  --info-soft:    #e7f3fb;
    --text: #1f2733;
    --text-2: #4a5563;
    --muted: #8a94a6;
    --border: #eceef2;
    --border-2: #e3e7ee;
    --bg: #f4f6fb;
    --bg-soft: #fafbfe;
    --card: #ffffff;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(20, 30, 60, .04);
    --shadow-sm: 0 1px 3px rgba(20, 30, 60, .05), 0 6px 16px rgba(20, 30, 60, .05);
    --shadow: 0 8px 24px rgba(20, 30, 60, .09);
    --shadow-lg: 0 20px 50px rgba(20, 30, 60, .14);
    --ring: 0 0 0 4px rgba(79, 110, 247, .16);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
            "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font: 14px/1.7 var(--font); color: var(--text);
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(79, 110, 247, .06), transparent 60%),
        radial-gradient(1000px 500px at -10% 0%, rgba(58, 160, 224, .05), transparent 55%),
        var(--bg);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { margin: 0 0 12px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 12px; }
a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(79, 110, 247, .18); }
a:focus-visible, button:focus-visible, .input:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 0 18px; height: 42px; border: 1px solid var(--border-2);
    background: #fff; color: var(--text); border-radius: var(--radius-sm);
    cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; font-family: inherit;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
    box-shadow: var(--shadow-xs);
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--shadow-xs); }
.btn-primary { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(79, 110, 247, .28); font-weight: 600; }
.btn-primary:hover { color: #fff; filter: brightness(1.05) saturate(1.05); box-shadow: 0 12px 26px rgba(79, 110, 247, .36); }
.btn-success { background: var(--success); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(22, 163, 123, .25); }
.btn-success:hover { color: #fff; filter: brightness(1.05); }
.btn-danger { color: var(--danger); border-color: #f6c9d3; background: #fff5f7; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: 0 8px 18px rgba(239, 77, 107, .25); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; box-shadow: none; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* ---------- 标签 / 徽章 ---------- */
.tag, .badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 500; line-height: 1.6; background: #eef1f6; color: var(--muted);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
.tag.success, .badge.success { background: var(--success-soft); color: var(--success); }
.tag.warn, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger, .badge.danger { background: var(--danger-soft); color: var(--danger); }
.tag.primary, .tag.info, .badge.primary, .badge.info { background: var(--primary-soft); color: var(--primary); }
.tag.muted, .badge.muted { background: #f0f2f5; color: var(--muted); }
.badge { padding: 2px 9px; } .badge::before { display: none; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
    border: 1px solid rgba(236, 238, 242, .7); box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow); }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-title .more { font-size: 13px; font-weight: 500; color: var(--muted); }
.card-title .more:hover { color: var(--primary); }
.card-grid { display: grid; gap: 16px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-label i { color: var(--danger); font-style: normal; }
.input {
    width: 100%; height: 44px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
    padding: 0 14px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
textarea.input { height: auto; padding: 11px 14px; line-height: 1.7; resize: vertical; min-height: 96px; }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a94a6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:hover { border-color: #cfd5e0; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: #fff; }
.input::placeholder { color: #aeb6c2; }
.form-help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-actions { padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.radio-inline, .check-inline { display: inline-flex; align-items: center; gap: 7px; margin-right: 16px; font-size: 14px; cursor: pointer; user-select: none; }
.form-suffix { color: var(--muted); font-size: 13px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
.upload-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-preview { width: 96px; height: 96px; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-soft); transition: border-color .15s; }
.upload-preview:hover { border-color: var(--primary); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-tip { color: var(--muted); font-size: 12px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 680px; }
table.table th, table.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.table th { color: var(--muted); font-weight: 600; background: #f7f9fc; position: sticky; top: 0; white-space: nowrap; }
table.table tbody tr { transition: background .15s var(--ease); }
table.table tbody tr:nth-child(even) { background: #fcfdff; }
table.table tbody tr:hover { background: var(--primary-soft); }
table.table td.wrap { white-space: normal; min-width: 180px; }
table.table img.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-xs); }
table.table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pagination ul { display: flex; gap: 7px; flex-wrap: wrap; margin: 0; padding: 0; }
.pagination li a { display: block; min-width: 38px; text-align: center; padding: 7px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: #fff; color: var(--text-2); transition: all .15s var(--ease); box-shadow: var(--shadow-xs); }
.pagination li a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pagination li.active a { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(79, 110, 247, .3); }
.pagination .total { color: var(--muted); font-size: 13px; }

/* ---------- 工具栏 / 空态 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { height: 40px; width: auto; min-width: 180px; flex: 1 1 180px; }
.toolbar .btn { height: 40px; }
.empty { text-align: center; color: var(--muted); padding: 56px 0; }
.empty::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%234f6ef7' stroke-width='1.6'%3E%3Cpath d='M3 3h2l2.4 12.2a2 2 0 0 0 2 1.6h8.2a2 2 0 0 0 2-1.6L21 7H6'/%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3C/svg%3E") center / 30px no-repeat; opacity: .9; }

/* ---------- 后台框架 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 236px; flex-shrink: 0; display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .28s var(--ease);
    z-index: 40; color: #aeb8c9; overflow: hidden;
    background: linear-gradient(180deg, #1f2940 0%, #161d2e 100%);
}
.sidebar.open { transform: translateX(0); box-shadow: 0 0 50px rgba(0, 0, 0, .4); }
.sidebar .logo {
    display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-size: 16px; color: #fff; font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, .07); letter-spacing: .02em;
    background: linear-gradient(135deg, rgba(109, 139, 255, .3), rgba(79, 110, 247, .12));
}
.sidebar .logo .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-grad); box-shadow: 0 4px 12px rgba(79, 110, 247, .5); }
.sidebar .nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar .nav a { display: flex; align-items: center; gap: 11px; padding: 11px 22px; color: #aeb8c9; font-size: 14px; position: relative; transition: all .16s var(--ease); margin: 2px 0; }
.sidebar .nav a .nav-ico { display: inline-flex; width: 18px; height: 18px; color: #7f8aa0; transition: color .16s var(--ease); }
.sidebar .nav a .nav-ico svg { width: 18px; height: 18px; display: block; }
.sidebar .nav a::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 0; background: var(--primary); border-radius: 0 3px 3px 0; transition: height .22s var(--ease); }
.sidebar .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav a:hover .nav-ico { color: #fff; }
.sidebar .nav a.active { background: rgba(109, 139, 255, .18); color: #fff; }
.sidebar .nav a.active .nav-ico { color: #fff; }
.sidebar .nav a.active::before { height: 64%; }
.sidebar .nav .group-title { padding: 16px 22px 7px; font-size: 11px; color: #606c80; letter-spacing: .08em; text-transform: uppercase; }
.sidebar .nav::-webkit-scrollbar { width: 6px; }
.sidebar .nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }
.main { flex: 1; min-width: 0; padding: 14px; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.topbar .menu-btn { font-size: 20px; cursor: pointer; background: none; border: 0; color: var(--text); line-height: 1; padding: 4px 8px; border-radius: 8px; transition: background .15s; }
.topbar .menu-btn:hover { background: var(--primary-soft); color: var(--primary); }
.topbar .spacer { flex: 1; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; overflow: hidden; background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid rgba(236, 238, 242, .7); border-left: 4px solid var(--primary); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 76px; height: 76px; border-radius: 50%; background: rgba(79, 110, 247, .07); }
.stat:nth-child(2) { border-left-color: var(--success); } .stat:nth-child(2)::after { background: rgba(22, 163, 123, .08); }
.stat:nth-child(3) { border-left-color: var(--warn); }    .stat:nth-child(3)::after { background: rgba(232, 151, 58, .08); }
.stat:nth-child(4) { border-left-color: var(--info); }    .stat:nth-child(4)::after { background: rgba(58, 160, 224, .08); }
.stat:nth-child(5) { border-left-color: var(--danger); }  .stat:nth-child(5)::after { background: rgba(239, 77, 107, .08); }
.stat .num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- 商城前台 ---------- */
.site-header { background: var(--primary-grad); box-shadow: 0 6px 24px rgba(79, 110, 247, .28); position: sticky; top: 0; z-index: 30; }
.site-header .inner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; max-width: 1200px; margin: 0 auto; }
.site-header .brand { font-size: 19px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .12); letter-spacing: .01em; }
.site-header .brand:hover { color: #fff; opacity: .92; }
.site-header .nav { display: none; gap: 18px; }
.site-header .search { flex: 1; max-width: 460px; }
.site-header .search .input { background: rgba(255, 255, 255, .96); border-color: transparent; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); height: 42px; }
.site-header .search .input:focus { box-shadow: 0 2px 16px rgba(0, 0, 0, .2); }
.site-header .btn:not(.btn-primary) { background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; box-shadow: none; }
.site-header .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .3); color: #fff; transform: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 18px 16px; }
.notice { background: linear-gradient(90deg, #fff7e6, #fffdf6); color: #946a2c; padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; border: 1px solid #f3e3bd; border-left: 4px solid var(--warn); display: flex; gap: 8px; align-items: center; }
.notice::before { content: "!"; display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }

.grid-shops, .grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.shop-card, .product-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(236, 238, 242, .7); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.shop-card:hover, .product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.shop-card .body, .product-card .body { padding: 14px; }
.shop-card .name { font-weight: 600; font-size: 15px; }
.shop-card .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.product-card .cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #f5f6f8; transition: transform .35s var(--ease); }
.product-card:hover .cover { transform: scale(1.07); }
.product-card .title { font-size: 14px; height: 42px; overflow: hidden; line-height: 1.5; margin-bottom: 8px; }
.product-card .price { color: var(--danger); font-size: 17px; font-weight: 800; }
.product-card .meta { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; margin-top: 6px; }

.cat-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.cat-item { text-align: center; min-width: 76px; background: #fff; border-radius: 14px; padding: 10px; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); box-shadow: var(--shadow-sm); border: 1px solid transparent; }
.cat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-item img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; margin: 0 auto 5px; }
.cat-item.active { border-color: var(--primary); background: var(--primary-soft); }

.detail-cover { width: 100%; border-radius: var(--radius); background: #f5f6f8; box-shadow: var(--shadow-sm); }
.price-big { color: var(--danger); font-size: 28px; font-weight: 800; }
.bottom-bar { display: flex; gap: 10px; }
.bottom-bar .btn { flex: 1; }

.kv { display: flex; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 96px; color: var(--muted); flex-shrink: 0; }
.kv .v { flex: 1; word-break: break-all; }

.card-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; font-size: 14px; background: var(--bg-soft); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.card-item:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }
.card-item .secret { font-family: Menlo, Consolas, monospace; font-size: 15px; word-break: break-all; color: var(--primary); }

.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 10px 16px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; transition: all .15s var(--ease); font-weight: 500; }
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); border-color: var(--primary); font-weight: 700; }

.chat-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; transition: box-shadow .15s var(--ease); }
.chat-item:hover { box-shadow: var(--shadow-xs); }
.chat-item.admin { background: #f4f8ff; border-color: #dbe6ff; }
.chat-item.seller { background: #f4fbf7; border-color: #dcf0e3; }
.chat-item .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.pay-box { text-align: center; padding: 28px; }
.pay-box .amount { font-size: 32px; color: var(--danger); font-weight: 800; }
.pay-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.pay-channel { border: 1px solid var(--border); border-radius: 12px; padding: 18px 8px; text-align: center; background: #fff; cursor: pointer; transition: all .15s var(--ease); }
.pay-channel:hover { border-color: var(--primary); box-shadow: var(--ring); }

/* ---------- 登录 / 注册 ---------- */
.login-box { position: relative; max-width: 430px; margin: 48px auto; background: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); overflow: hidden; }
.login-box::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--primary-grad); }
.login-box h2 { text-align: center; margin-bottom: 22px; font-size: 21px; }
.login-box .input { margin-bottom: 14px; }
.login-box .btn-block { height: 46px; line-height: 44px; font-size: 15px; }
/* 验证码区改为上下排版，避免窄框内左右拥挤 */
.login-box form .row { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.login-box form .row > * { flex: 0 0 auto; width: 100%; min-width: 0; max-width: 100%; }
.login-box form .row .btn { width: 100%; height: 44px; }
.login-box .form-help { margin-bottom: 14px; }
.login-box hr { border: 0; border-top: 1px dashed var(--border); margin: 20px 0; }
.login-box form + .text-right { margin-top: 4px; }
/* 图形验证码：输入框在上，图片在下（图片固定清晰尺寸） */
.captcha-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.captcha-row .input { width: 100%; }
.captcha-row img { align-self: flex-start; cursor: pointer; border-radius: 8px; border: 1px solid var(--border-2); width: 140px; height: 44px; display: block; }

/* ---------- 新版登录：Tab + 区号 + 整行链接 ---------- */
.login-tabs .login-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.login-tabs-nav { display: flex; align-items: center; gap: 12px; }
.login-tab { font-size: 18px; font-weight: 600; color: var(--muted); text-decoration: none; padding-bottom: 6px; position: relative; }
.login-tab.active { color: var(--primary); }
.login-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--primary-grad); border-radius: 2px; }
.login-tab-sep { color: #d8dde6; font-size: 18px; }
.login-head-right { font-size: 13px; color: var(--muted); }
.login-head-right a { color: var(--primary); margin-left: 4px; }

.login-pane { display: none; }
.login-pane.active { display: block; }
.login-pane .form-label { color: var(--text-2); }
.login-submit { height: 48px; font-size: 15px; border-radius: 10px; margin-top: 4px; }

/* 区号 + 手机号 同行 */
.login-phone-row { display: flex; gap: 10px; }
.login-phone-row .login-phone-code { flex: 0 0 130px; margin-bottom: 14px; }
.login-phone-row .login-phone-input { flex: 1 1 auto; min-width: 0; }

/* 验证码 + 获取按钮 同行 */
.login-code-row { display: flex; gap: 10px; }
.login-code-row .input { flex: 1 1 auto; min-width: 0; margin-bottom: 14px; }
.login-code-row .login-code-btn { flex: 0 0 130px; height: 44px; border-radius: var(--radius-sm); }

/* 链接行：验证码登录 | 忘记密码 */
.login-links { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 16px; font-size: 13px; }
.login-links a { color: var(--primary); text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-link-right { color: var(--primary); }

/* 密码/验证码 切换时主区域隐藏 */
.login-pane > .form-item[style*="display: none"] + .form-item { margin-top: 0; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 12px; }

/* ---------- 工具类 ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1; min-width: 120px; }
.text-muted { color: var(--muted); } .text-danger { color: var(--danger); } .text-right { text-align: right; }
.text-success { color: var(--success); } .text-warn { color: var(--warn); } .text-primary { color: var(--primary); }
.text-center { text-align: center; } .text-bold { font-weight: 700; }
.mb8 { margin-bottom: 8px; } .mb10 { margin-bottom: 10px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt16 { margin-top: 16px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap16 { gap: 16px; }
.wrap-text { white-space: normal; }

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d4d8e0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9bfca; }

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
    .site-header .nav { display: flex; }
}
@media (min-width: 900px) {
    .sidebar { position: static; transform: none; box-shadow: 2px 0 24px rgba(20, 30, 60, .08); }
    .main { padding: 24px; }
    .menu-btn { display: none; }
}
@media (max-width: 640px) {
    h1 { font-size: 22px; } h2 { font-size: 19px; }
    .card { padding: 16px; border-radius: var(--radius); }
    .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat { padding: 16px; } .stat .num { font-size: 22px; }
    .grid-shops, .grid-products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .container { padding: 14px 12px; }
    .topbar { padding: 10px 12px; margin-bottom: 14px; }
    .toolbar .input { min-width: 100%; }
    .toolbar .btn { flex: 1 1 auto; }
    .login-box { margin: 24px 12px; padding: 24px 18px; }
    table.table { font-size: 13px; }
    table.table th, table.table td { padding: 11px 12px; }
    .sidebar { width: 80%; }
}

/* ---------- 动效 ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn .42s var(--ease) both; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(79, 110, 247, .25); border-top-color: var(--primary); }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { background: linear-gradient(90deg, #eef0f4 25%, #f6f7fa 37%, #eef0f4 63%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
