/* ============================================================
   进销存 SaaS 系统全局样式 /assets/css/style.css  v2 现代卡片式
   主色: 橙色 #e8622d / 辅助: 深棕 #5b4232 / 背景: 暖灰 #f4f2ef
   规范: 字号 ≥ 12px；PC 圆角 ≤ 5px；移动端圆角 ≤ 3px
   ============================================================ */
:root {
    --primary: #e8622d;
    --primary-dark: #c94f1f;
    --primary-light: #fdeee5;
    --primary-soft: #fbe3d4;
    --brown: #5b4232;
    --brown-deep: #463225;
    --brown-light: #7a5c47;
    --bg: #f4f2ef;
    --gray-line: #e8e2dc;
    --text: #2d2a26;
    --text-light: #8a837c;
    --text-placeholder: #c9c2bd;
    --row-highlight: #faf6f2;
    --success: #2e9e5b;
    --success-bg: #f6fbf6;
    --warning: #e8a23d;
    --warning-bg: #fef9f0;
    --danger: #d9534f;
    --danger-bg: #fef6f6;
    --info: #3a6ea5;
    --radius: 5px;
    --shadow-sm: 0 1px 2px rgba(70, 50, 37, .06), 0 1px 3px rgba(70, 50, 37, .08);
    --shadow: 0 2px 6px rgba(70, 50, 37, .07), 0 6px 16px -6px rgba(70, 50, 37, .10);
    --shadow-lg: 0 10px 28px -8px rgba(70, 50, 37, .22);
    --grad-primary: linear-gradient(135deg, #f07a45 0%, #e8622d 55%, #d5531f 100%);
    --grad-brown: linear-gradient(135deg, #6b4f3a 0%, #463225 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { font-size: 14px; }
body {
    font-family: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(1200px 400px at 80% -100px, rgba(232, 98, 45, .05), transparent 70%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
::selection { background: var(--primary-soft); color: var(--brown-deep); }
:focus-visible { outline: 2px solid rgba(232, 98, 45, .45); outline-offset: 2px; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d6cdc5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brown-light); }
::-webkit-scrollbar-track { background: transparent; }

/* 入场动画 */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
    .container > .card, .container > .stat-grid, .container > .alert { animation: fadeUp .3s ease both; }
}

/* ---------------- 顶栏（吸顶 + 深棕渐变） ---------------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--grad-brown); color: #fff;
    box-shadow: var(--shadow-sm);
}
.topbar-inner {
    max-width: 1200px; margin: 0 auto; padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { color: #fff; font-size: 17px; font-weight: bold; display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.brand:hover { color: #ffd9c2; }
.brand i {
    color: #fff; background: var(--grad-primary);
    border-radius: 4px; padding: 5px; font-size: 13px;
    box-shadow: 0 2px 6px rgba(232, 98, 45, .4);
}
.user-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-name { font-size: 13px; }
.user-role {
    font-size: 12px; background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 2px 9px; border-radius: 3px;
}
.inline-form { display: inline; }

/* ---------------- 主导航 ---------------- */
.main-nav {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--gray-line);
    box-shadow: var(--shadow-sm);
}
.main-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 8px;
    display: flex; overflow-x: auto; white-space: nowrap;
}
.nav-link {
    display: inline-block; padding: 12px 2px; color: var(--brown);
    font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px;
    transition: color .15s, background .15s;
}
.nav-link i { margin-right: 4px; }
.nav-link:hover { color: var(--primary); background: rgba(232, 98, 45, .05); }
.nav-link.active {
    color: var(--primary); border-bottom-color: var(--primary); font-weight: bold;
    background: linear-gradient(180deg, transparent 60%, rgba(232, 98, 45, .07));
}
.nav-badge {
    background: var(--danger); color: #fff; font-size: 12px;
    border-radius: 8px; padding: 0 6px; margin-left: 3px;
    box-shadow: 0 1px 3px rgba(217, 83, 79, .4);
}

/* ---------------- 设置子导航 ---------------- */
.settings-nav {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--gray-line);
}
.settings-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 8px;
    display: flex; flex-wrap: wrap; gap: 2px;
}
.settings-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 14px; font-size: 13px; color: var(--brown);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, background .15s; text-decoration: none;
}
.settings-link i { font-size: 13px; }
.settings-link:hover { color: var(--primary); background: rgba(232, 98, 45, .05); }
.settings-link.active {
    color: var(--primary); border-bottom-color: var(--primary); font-weight: bold;
    background: linear-gradient(180deg, transparent 60%, rgba(232, 98, 45, .07));
}
@media (max-width: 768px) {
    .settings-nav-inner { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
    .settings-link { padding: 8px 11px; font-size: 12px; }
    .settings-link i { display: none; }
}

/* ---------------- 到期提醒横幅 ---------------- */
.notice-banner {
    background: linear-gradient(90deg, #fff7e8, #fdf0dc);
    color: #8a5a00; border-bottom: 1px solid #f3ddb0;
    padding: 9px 16px; font-size: 13px; text-align: center;
}
.notice-banner.danger {
    background: linear-gradient(90deg, #fdecec, #fbe0e0);
    color: var(--danger); border-bottom-color: #f3c1c1;
}
.notice-banner .btn { margin-left: 10px; }

/* ---------------- 面包屑（100% 横条） ---------------- */
.breadcrumb-bar {
    background: rgba(255, 255, 255, .8);
    border-bottom: 1px solid var(--gray-line); width: 100%;
}
.breadcrumb-inner {
    max-width: 1200px; margin: 0 auto; padding: 10px 16px;
    font-size: 13px; color: var(--text-light);
}
.breadcrumb-inner i { color: var(--primary); margin-right: 4px; }
.breadcrumb-inner .sep { margin: 0 8px; color: #c9c2bd; }
.breadcrumb-inner .cur { color: var(--brown); font-weight: bold; }
.breadcrumb-inner a:hover { color: var(--primary); }

/* ---------------- 主容器与卡片 ---------------- */
.container { max-width: 1200px; margin: 18px auto 28px; padding: 0 16px; }
.container.narrow { max-width: 900px; }
.card {
    background: #fff;
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px; margin-bottom: 16px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--gray-line); padding-bottom: 11px; margin-bottom: 15px; gap: 10px;
}
.card-head h3 { font-size: 15px; color: var(--brown-deep); position: relative; padding-left: 12px; }
.card-head h3::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 15px; border-radius: 2px; background: var(--grad-primary);
}
.card-head h3 i { color: var(--primary); margin-right: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------- 按钮（渐变 + 悬浮反馈） ---------------- */
.btn {
    display: inline-block; padding: 8px 16px; font-size: 13px; border: none;
    border-radius: 4px; cursor: pointer; line-height: 1.4; font-weight: 500;
    background: #efeae6; color: var(--brown);
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.04); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); filter: brightness(.97); }
.btn i { margin-right: 2px; }
.btn-primary { background: var(--grad-primary); color: #fff; }
.btn-brown { background: var(--grad-brown); color: #fff; }
.btn-success { background: linear-gradient(135deg, #38b26c, #278a4e); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #e4655f, #c74340); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f0b04e, #dd8f22); color: #fff; }
.btn-ghost {
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .55);
    color: #fff; box-shadow: none; backdrop-filter: blur(2px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn-ghost-dark { background: transparent; border: 1px solid var(--gray-line); color: var(--brown); box-shadow: none; }
.btn-ghost-dark:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-outline { background: #fff; border: 1px solid var(--gray-line); color: var(--brown); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; letter-spacing: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
/* 表格行内图标小按钮 */
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0; font-size: 13px; line-height: 1;
    background: #fff; border: 1px solid var(--gray-line); border-radius: 4px;
    cursor: pointer; transition: all .15s;
}
.btn-icon:hover { border-color: var(--primary); background: var(--primary-light); }
.btn-icon.danger:hover { border-color: var(--danger); background: #fdecec; }
.link-btn {
    background: none; border: none; color: var(--primary); cursor: pointer;
    font-size: 12px; padding: 2px 4px; border-radius: 3px; transition: background .15s;
}
.link-btn:hover { background: var(--primary-light); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: #fdecec; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; color: var(--brown); margin-bottom: 5px; font-weight: bold; }
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-group label.required::after { content: " *"; color: var(--danger); }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%; padding: 8px 11px; font-size: 13px;
    border: 1px solid var(--gray-line); border-radius: 4px;
    background-color: #faf8f6; color: var(--text); outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #d8cfc7; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary); background-color: #fff;
    box-shadow: 0 0 0 3px rgba(232, 98, 45, .13);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-tip { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* form-item（发票等卡片式表单） */
.form-item { margin-bottom: 0; }
.form-item label { display: block; font-size: 13px; color: var(--brown); margin-bottom: 5px; font-weight: bold; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item input[type="date"],
.form-item input[type="email"],
.form-item input[type="tel"],
.form-item select,
.form-item textarea {
    width: 100%; padding: 8px 11px; font-size: 13px;
    border: 1px solid var(--gray-line); border-radius: 4px;
    background-color: #faf8f6; color: var(--text); outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-item input:hover, .form-item select:hover, .form-item textarea:hover { border-color: #d8cfc7; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
    border-color: var(--primary); background-color: #fff;
    box-shadow: 0 0 0 3px rgba(232, 98, 45, .13);
}
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-img {
    height: 40px; border-radius: 4px; cursor: pointer;
    border: 1px solid var(--gray-line); transition: opacity .15s;
}
.captcha-img:hover { opacity: .8; }

/* ---------------- 下拉框美化（全局） ---------------- */
/* 隐藏原生系统箭头，用 CSS 三角统一跨浏览器外观 */
select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a8b80'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center;
    padding-right: 28px !important;
    cursor: pointer;
}
select:hover { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e8622d'/%3E%3C/svg%3E"); }
select:focus { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e8622d'/%3E%3C/svg%3E"); }
select option { background: #fff; color: var(--text); }
select::-ms-expand { display: none; }

/* ---------------- 搜索栏 ---------------- */
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search-bar input, .search-bar select {
    padding: 7px 10px; font-size: 13px; border: 1px solid var(--gray-line);
    border-radius: 4px; outline: none; background-color: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus, .search-bar select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 98, 45, .12);
}
.search-bar input { width: 180px; }

/* ---------------- 筛选/过滤栏（文件管理等页面） ---------------- */
.filter-bar {
    margin-bottom: 16px; padding: 14px 16px;
    background: linear-gradient(135deg, #fdf7f2 0%, #faf4ee 100%);
    border: 1px solid #eaddd1; border-radius: 6px;
}
.filter-row {
    display: flex; flex-wrap: wrap; gap: 14px 16px;
    align-items: flex-end;
}
.filter-item { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.filter-item label {
    font-size: 12px; color: var(--text-light); font-weight: 500;
    padding-left: 2px;
}
.filter-item select,
.filter-item input[type="text"],
.filter-item input[type="number"] {
    padding: 7px 11px; font-size: 13px;
    border: 1px solid var(--gray-line); border-radius: 4px;
    background-color: #fff; color: var(--text); outline: none;
    min-width: 140px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.filter-item select:hover,
.filter-item input[type="text"]:hover,
.filter-item input[type="number"]:hover {
    border-color: #d8cfc7;
}
.filter-item select:focus,
.filter-item input[type="text"]:focus,
.filter-item input[type="number"]:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 98, 45, .13);
    background-color: #fff;
}
.filter-item.flex-grow { flex: 1 1 220px; min-width: 200px; }
.filter-item.flex-grow input[type="text"],
.filter-item.flex-grow select { min-width: 100%; width: 100%; }
.filter-item.filter-btns { flex-direction: row; gap: 8px; }
.filter-item.filter-btns .btn { white-space: nowrap; }

/* ---------------- 表格 ---------------- */
.table-wrap {
    overflow-x: auto; border: 1px solid var(--gray-line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff;
}
table.table { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; min-width: 640px; }
.table th, .table td {
    padding: 10px 12px; border-bottom: 1px solid #f0ebe7; text-align: left; white-space: nowrap;
}
.table th {
    background: var(--row-highlight); color: var(--brown); font-weight: bold; font-size: 12px; letter-spacing: .5px;
    border-bottom: 2px solid var(--primary-soft);
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--row-highlight); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ops { white-space: nowrap; }
.empty-tip {
    text-align: center; color: var(--text-light); padding: 34px 0; font-size: 13px;
    border: 1px dashed var(--gray-line); border-radius: var(--radius); background: #fbfaf9;
}

/* 详情信息表（键值对，不受 data table 640px 最小宽度限制） */
.info-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.info-table th, .info-table td {
    padding: 9px 12px; border-bottom: 1px solid #f0ebe7; text-align: left;
}
.info-table th {
    width: 110px; background: var(--row-highlight); color: var(--brown);
    font-weight: bold; font-size: 12.5px; white-space: nowrap;
}
.info-table tbody tr:last-child th,
.info-table tbody tr:last-child td { border-bottom: none; }

/* ---------------- 徽标（柔色胶囊） ---------------- */
.badge {
    display: inline-block; font-size: 12px; padding: 2px 9px;
    border-radius: 3px; background: #f0ece8; color: #6b645d; font-weight: 500;
}
.badge-success { background: #e3f5ea; color: #1e7a44; }
.badge-warn { background: #fdf3e0; color: #b07b1a; }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-gray { background: #f0f0f0; color: #999; }
.badge-info { background: #e8f1fb; color: var(--info); }
/* 收支/伙伴方向标识（多页面 JS 共用） */
.badge-in { background: #fdeee5; color: var(--primary-dark); }
.badge-out { background: #fdecec; color: var(--danger); }
.badge-system { background: #fdf3e0; color: #b07b1a; }
.badge-custom { background: #e8f1fb; color: var(--info); }

/* ---------------- 提示框 ---------------- */
.alert {
    padding: 11px 14px; border-radius: var(--radius); font-size: 13px;
    margin-bottom: 14px; border: 1px solid transparent; border-left-width: 4px;
}
.alert-success { background: #e9f7ef; color: #1e7a44; border-color: #c4e7d1; border-left-color: var(--success); }
.alert-error { background: #fdecec; color: var(--danger); border-color: #f3c1c1; border-left-color: var(--danger); }
.alert-warn { background: #fff6e9; color: #9a5b13; border-color: #f3dcb4; border-left-color: #e8a33d; }
.text-muted { color: var(--text-light); }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.page-info { font-size: 12px; color: var(--text-light); margin-right: 6px; }
.page-link {
    padding: 4px 11px; border: 1px solid var(--gray-line); border-radius: 3px;
    font-size: 12px; color: var(--brown); background: #fff;
    transition: all .15s; display: inline-block;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active {
    background: var(--grad-primary); color: #fff; border-color: transparent;
    box-shadow: 0 2px 6px rgba(232, 98, 45, .35); font-weight: bold;
}
.page-dots { color: var(--text-light); }

/* ---------------- 统计卡片（现代渐变光晕风） ---------------- */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.stat-card {
    --c: var(--primary);
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--gray-line);
    border-left: 4px solid var(--c);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px 18px;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex; flex-direction: column;
}
.stat-card::after {
    content: ""; position: absolute; right: -34px; top: -34px;
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 98, 45, .11), transparent 70%);
    pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card .stat-top {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; position: relative;
}
.stat-card .stat-ico {
    flex: none; width: 38px; height: 38px; line-height: 38px; text-align: center;
    border-radius: 10px; font-size: 16px;
    background: color-mix(in srgb, var(--c) 14%, #fff);
    color: var(--c);
}
.stat-card .stat-label { font-size: 13px; color: var(--text-light); position: relative; flex: 1; }
.stat-card .stat-value {
    font-size: 24px; font-weight: 800; color: var(--brown-deep);
    margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: .3px;
    position: relative; word-break: break-all;
}
.stat-card .stat-sub {
    font-size: 12px; color: var(--text-light); margin-top: 6px; position: relative;
}
.stat-card .stat-sub a { color: var(--primary); }
.stat-card .stat-value.small { font-size: 14px; font-weight: bold; }
.stat-card.brown { --c: var(--brown); }
.stat-card.brown::after { background: radial-gradient(circle, rgba(91, 66, 50, .12), transparent 70%); }
.stat-card.green { --c: var(--success); }
.stat-card.green::after { background: radial-gradient(circle, rgba(46, 158, 91, .12), transparent 70%); }
.stat-card.red { --c: var(--danger); }
.stat-card.red::after { background: radial-gradient(circle, rgba(217, 83, 79, .12), transparent 70%); }

/* ---------------- 系统操作步骤卡片 ---------------- */
.step-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 14px; margin-bottom: 0;
}
.step-card {
    position: relative; display: flex; flex-direction: row; align-items: center;
    text-align: left; text-decoration: none; color: inherit;
    background: linear-gradient(160deg, #fff 0%, #faf7f4 100%);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius); padding: 14px 14px;
    box-shadow: 0 2px 8px rgba(91, 66, 50, .06);
    transition: all .22s ease;
    overflow: hidden;
}
.step-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary); opacity: .8;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(232, 98, 45, .18);
    border-color: var(--primary);
}
.step-card .step-num {
    position: absolute; top: 8px; right: 8px;
    min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px;
    background: var(--grad-primary); color: #fff;
    font-size: 12px; font-weight: bold; border-radius: 11px;
    box-shadow: 0 2px 5px rgba(232, 98, 45, .4);
}
.step-card .step-icon {
    flex-shrink: 0;
    width: 46px; height: 46px; line-height: 46px; text-align: center;
    background: linear-gradient(135deg, #fff3ec, #ffe8d9);
    border-radius: 50%; margin: 0 12px 0 0;
    box-shadow: inset 0 1px 3px rgba(232, 98, 45, .1);
}
.step-card .step-icon i {
    font-size: 22px; color: var(--primary); line-height: 46px;
}
.step-card .step-text {
    display: flex; flex-direction: column; min-width: 0;
}
.step-card .step-name {
    font-size: 15px; font-weight: 700; color: var(--brown-deep);
    letter-spacing: .3px;
}
.step-card .step-desc {
    font-size: 12px; color: var(--text-light); margin-top: 5px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .step-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .step-card { padding: 12px 8px; }
    .step-card .step-icon { width: 38px; height: 38px; line-height: 38px; margin: 0 8px 0 0; }
    .step-card .step-icon i { font-size: 18px; line-height: 38px; }
    .step-card .step-name { font-size: 13px; }
    .step-card .step-desc { font-size: 11px; }
    .step-card .step-num { top: 5px; right: 5px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 4px; }
}

/* ---------------- 弹窗（遮罩模糊 + 入场动画） ---------------- */
.modal-mask {
    display: none; position: fixed; inset: 0;
    background: rgba(40, 30, 24, .5);
    backdrop-filter: blur(3px);
    z-index: 100; align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .4);
    border-top: 3px solid var(--primary);
}
.modal.modal-lg { max-width: 820px; }
.modal-mask.show .modal { animation: modalIn .22s ease both; }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 16px; border-bottom: 1px solid var(--gray-line);
    background: var(--row-highlight);
}
.modal-head h4 { font-size: 14px; color: var(--brown-deep); }
.modal-head h4 i { color: var(--primary); margin-right: 6px; }
.modal-close {
    background: none; border: none; font-size: 18px; color: #999; cursor: pointer;
    width: 28px; height: 28px; border-radius: 4px; transition: all .15s;
}
.modal-close:hover { background: #f0ece8; color: var(--danger); }
.modal-body { padding: 16px; }
.modal-foot {
    padding: 12px 16px; border-top: 1px solid var(--gray-line);
    text-align: right; display: flex; gap: 8px; justify-content: flex-end;
    background: #fcfaf8;
}

/* ---------------- 公告 ---------------- */
.ann-list li {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 9px 0; border-bottom: 1px dashed var(--gray-line);
    transition: padding-left .15s;
}
.ann-list li:hover { padding-left: 4px; }
.ann-list li:last-child { border-bottom: none; }
.ann-list a { color: var(--text); flex: 1; }
.ann-list a:hover { color: var(--primary); }
.ann-list .badge { margin-right: 6px; }
.ann-date { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.ann-empty { color: var(--text-light); text-align: center; padding: 14px 0; }
.ann-detail-head { border-bottom: 1px solid var(--gray-line); padding-bottom: 12px; margin-bottom: 14px; }
.ann-detail-head h2 { font-size: 18px; color: var(--brown-deep); margin-bottom: 8px; }
.ann-meta { font-size: 12px; color: var(--text-light); }
.rich-content { font-size: 14px; line-height: 1.8; overflow-wrap: break-word; }
.rich-content img { max-width: 100%; height: auto; border-radius: 4px; }

/* ---------------- 页脚 ---------------- */
/* 弹性布局：内容不足一屏时，版权栏也紧贴屏幕底部 */
.app-body, .super-body, .public-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.app-body > main.container,
.super-body > main.container,
.public-body > main.container {
    flex: 1 0 auto;
    /* 显式宽度：作为 flex item 时，左右 auto 外边距会使 stretch 失效、
       宽度退化为 fit-content 随内容变化；锁定填满，max-width 仍由
       .container(1200px) / .container.narrow(900px) 各自控制 */
    width: 100%;
}
.site-footer {
    flex-shrink: 0;
    background: var(--grad-brown);
    color: #d8ccc2;
    margin-top: 0;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 15px 16px;
    display: flex; justify-content: space-between; gap: 10px;
    flex-wrap: wrap; font-size: 12px;
}

/* ---------------- 公共页面 ---------------- */
.public-body { background: var(--bg); }

/* ---------------- 移动端适配 ---------------- */
@media (max-width: 768px) {
    :root { --radius: 3px; }
    body { font-size: 13px; }
    .card { padding: 14px; }
    .card:hover { transform: none; }
    .stat-card:hover { transform: none; }
    .topbar-inner, .breadcrumb-inner, .container, .footer-inner { padding-left: 12px; padding-right: 12px; }
    /* 顶部菜单分两行排列（每行9项），不再横向滚动 */
    .main-nav-inner {
        padding: 0 4px;
        flex-wrap: wrap;
        white-space: normal;
        overflow-x: visible;
    }
    .nav-link {
        flex: 0 0 11.1%;
        max-width: 11.1%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 9px 2px;
        font-size: 12px;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 0;
        border-bottom-width: 2px;
        white-space: normal;
        word-break: keep-all;
    }
    .nav-link i { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .search-bar input { width: 130px; }
    .login-main { flex-direction: column; align-items: center; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 13px 14px; }
    .stat-card .stat-value { font-size: 19px; }
    .modal { max-width: 100%; }
    .brand { font-size: 15px; }
    .user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============================================================
   移动端底部固定 Tab 菜单（需求5）: 首页 / 采购 / 销售 / 库存 / 我的
   PC 端隐藏（保持顶部 main-nav）；仅 ≤768px 显示为固定底栏
   ============================================================ */
.app-tabbar { display: none; }

@media (max-width: 768px) {
    .app-tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 60;
        background: #fff;
        border-top: 1px solid var(--gray-line);
        box-shadow: 0 -2px 8px rgba(70, 50, 37, .08);
        padding: 4px 0 max(4px, env(safe-area-inset-bottom));
    }
    .app-tabbar .tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 5px 0;
        font-size: 12px;
        color: var(--text-light);
    }
    .app-tabbar .tab-item i { font-size: 17px; }
    .app-tabbar .tab-item.active { color: var(--primary); font-weight: bold; }
    body { padding-bottom: 56px; }
}

/* ============================================================
   以下为公共组件补充类（追加，勿改动上方既有规则）
   ============================================================ */

/* 信息提示（Flash info 类型） */
.alert-info { background: #e8f1fb; color: var(--info); border-color: #c9dcf0; border-left-color: var(--info); }

/* 顶栏退出链接（深棕背景上使用） */
.user-exit { color: #e9ded5; font-size: 12.5px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 3px; transition: all .15s; }
.user-exit:hover { color: #fff; border-color: var(--primary); background: rgba(232, 98, 45, .22); }

/* 全局 Toast 提示（收支单等页面使用） */
.toast-container { position: fixed; top: 68px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg); border-radius: var(--radius);
    padding: 11px 16px; font-size: 13px; color: var(--text);
    animation: fadeUp .25s ease both; transition: opacity .3s, transform .3s;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning, .toast.warn { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast.hide { opacity: 0; transform: translateX(14px); }

/* 全局加载遮罩 */
.loading-overlay {
    display: none; position: fixed; inset: 0; z-index: 210;
    background: rgba(45, 42, 38, .35); backdrop-filter: blur(2px);
    align-items: center; justify-content: center;
}
.loading-overlay.show { display: flex; }
.spinner {
    width: 42px; height: 42px; border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .35); border-top-color: var(--primary);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 通用工具类（AJAX 列表页共用） ---------------- */
.text-center { text-align: center; }
.toolbar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }
.info-text { font-size: 12px; color: var(--text-light); }
.info-text strong { color: var(--brown-deep); }
.table-empty {
    text-align: center; padding: 30px 16px;
    color: var(--text-light); font-size: 13px;
}
.table-empty .icon { font-size: 28px; display: block; margin-bottom: 8px; }
