/* ==========================================================
   一色 · 仓库库位管理系统 样式
   清一色：统一色调，干净利落
   ========================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --info: #0ea5e9;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }
small { font-size: 12px; }
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.ta-r { text-align: right; }
.req { color: var(--danger); font-style: normal; }

.link { color: var(--primary); }
.link:hover { text-decoration: underline; }

/* ---------------- 图标 ---------------- */
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------------- 登录 / 安装页 ---------------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #38bdf8 100%);
    padding: 24px;
}
.auth-wrap { width: 100%; max-width: 460px; }
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 36px 34px 30px;
}
.auth-card-lg { max-width: 640px; width: 100%; margin: 0 auto; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow); }
.auth-brand h1 { font-size: 22px; font-weight: 700; }
.auth-brand p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.auth-footer { text-align: center; color: rgba(255,255,255,.85); margin-top: 18px; font-size: 13px; }
.auth-footer a { color: rgba(255,255,255,.9); text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    flex: none;
    background: var(--sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: margin-left .2s;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo { width: 38px; height: 38px; border-radius: 10px; }
.brand-text strong { display: block; font-size: 17px; color: #fff; letter-spacing: 2px; }
.brand-text span { display: block; font-size: 11px; color: #94a3b8; margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav-title { font-size: 11px; color: #64748b; padding: 14px 10px 6px; letter-spacing: 1px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .icon { width: 17px; height: 17px; }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 10px; }
.sidebar-ver { font-size: 11px; color: #64748b; text-align: center; padding: 8px 0 2px; }
.sidebar-icp { font-size: 11px; color: #64748b; text-align: center; padding: 0 8px 6px; word-break: break-all; }
.sidebar-icp a { color: #64748b; text-decoration: underline; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-search { display: flex; align-items: center; flex: 1; max-width: 420px; }
.topbar-search input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    background: var(--bg);
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; }
.topbar-search button {
    border: 1px solid var(--border);
    border-left: 0;
    background: var(--bg);
    border-radius: 0 8px 8px 0;
    padding: 0 12px;
    cursor: pointer;
    color: var(--muted);
}
.topbar-search button:hover { color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.icon-btn { background: none; border: 1px solid var(--border); border-radius: 8px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

.content { padding: 22px; flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; font-weight: 700; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-narrow { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }

.notice-bar {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* ---------------- 统计卡片 ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 960px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.stat-icon .icon { width: 22px; height: 22px; }
.stat-card.blue .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-card.green .stat-icon { background: #dcfce7; color: #15803d; }
.stat-card.indigo .stat-icon { background: #e0e7ff; color: #4338ca; }
.stat-card.amber .stat-icon { background: #fef3c7; color: #b45309; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--muted); }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8fafc; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f8fafc; }
.table td .muted { display: inline-block; }

.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 13px; }
.empty .link { margin: 0 3px; }

/* ---------------- 徽标 ---------------- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}
.badge-ok, .badge-success, .badge-in { background: var(--success-bg); color: #15803d; }
.badge-off { background: #e2e8f0; color: #475569; }
.badge-danger, .badge-fail, .badge-out { background: var(--danger-bg); color: #b91c1c; }
.badge-warning, .badge-adjust { background: var(--warning-bg); color: #b45309; }
.badge-admin { background: #e0e7ff; color: #4338ca; }
.badge-user { background: var(--primary-light); color: #1d4ed8; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-rollback { background: #f1f5f9; color: #475569; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; justify-content: center; padding: 11px; font-size: 15px; letter-spacing: 4px; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* ---------------- 表单 ---------------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; }
.form-group label small { font-weight: 400; margin-left: 4px; }
.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea.input { resize: vertical; }
select.input { cursor: pointer; appearance: auto; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.form-section-title { font-size: 14px; color: var(--primary-dark); margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.inline-field { display: flex; gap: 8px; }
.inline-field .input { flex: 1; }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 12px 0 18px; cursor: pointer; }

.select-filter { margin-bottom: 6px; }

.tip {
    display: flex; align-items: center; gap: 8px;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin: 4px 0 8px;
}
.tip-in { background: var(--success-bg); color: #15803d; }
.tip-out { background: var(--warning-bg); color: #b45309; }

/* ---------------- 提示条 ---------------- */
.alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #15803d; border-color: #bbf7d0; }
.alert-error { background: var(--danger-bg); color: #b91c1c; border-color: #fecaca; }
.alert-close { background: none; border: 0; font-size: 18px; cursor: pointer; color: inherit; line-height: 1; }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination .current {
    min-width: 32px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    color: var(--text);
    background: #fff;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-info { color: var(--muted); font-size: 13px; margin-right: 6px; }

/* ---------------- 筛选栏 ---------------- */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-form .input { width: auto; min-width: 140px; }
.filter-form .input[type="date"] { min-width: 140px; }
.filter-form .input[name="kw"] { min-width: 200px; flex: 1; }

/* ---------------- 详情信息 ---------------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.info-card { padding: 14px 16px; margin-bottom: 0; }
.info-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.info-value { font-size: 15px; }
.info-list { margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; gap: 12px; }
.info-row:last-child { border-bottom: 0; }
.info-row span:first-child { color: var(--muted); }

/* ---------------- 搜索 ---------------- */
.search-hero { background: linear-gradient(135deg, #1e3a8a, #2563eb); border: 0; color: #fff; }
.search-form .input { border: 0; }
.search-input-wrap { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 4px 14px; margin-bottom: 12px; }
.search-input-wrap .icon { color: var(--muted); }
.search-input-wrap .input { border: 0; box-shadow: none !important; font-size: 15px; }
.search-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-filters .input { width: auto; min-width: 150px; background: rgba(255,255,255,.95); }
.search-summary { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.search-summary strong { color: var(--primary); font-size: 15px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    display: inline-flex; flex-direction: column;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 170px;
    color: var(--text);
    transition: all .15s;
}
.chip:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.chip strong { font-size: 14px; }
.chip span { font-size: 12px; color: var(--muted); }
.chip em { font-style: normal; font-size: 12px; color: var(--primary); margin-top: 4px; }

/* ---------------- 在线升级 ---------------- */
.ver-block { text-align: center; padding: 10px 0 6px; }
.ver-num { font-size: 34px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.upload-zone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-label {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 34px 16px;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    color: var(--muted);
    font-size: 14px;
}
.upload-label .icon { width: 30px; height: 30px; color: var(--primary); }
.upload-label em { font-style: normal; font-size: 12px; }
.upload-zone.dragover .upload-label { border-color: var(--primary); background: var(--primary-light); }
.upload-zone.has-file .upload-label { border-color: var(--success); background: var(--success-bg); color: #15803d; }

/* ---------------- 图例 ---------------- */
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.legend-dot.in { background: var(--success); }
.legend-dot.out { background: var(--danger); }

/* ---------------- 内联表单 ---------------- */
.inline-form { display: inline-flex; }

/* ---------------- 响应式 ---------------- */
.sidebar-toggle { display: none; }

@media (max-width: 768px) {
    /* ===== 侧边栏：抽屉 + 遮罩 ===== */
    .sidebar {
        margin-left: -232px;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        z-index: 60;
        transition: margin-left .22s ease;
        overflow-y: auto;
    }
    .sidebar.open { margin-left: 0; box-shadow: var(--shadow-lg); }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .55);
        z-index: 55;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s;
    }
    .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

    /* ===== 顶栏 ===== */
    .sidebar-toggle { display: inline-flex; }
    .topbar { height: 54px; gap: 8px; padding: 0 10px; }
    .topbar-search input { padding: 8px 10px; font-size: 13px; min-width: 0; }
    .topbar-user span:last-child { display: none; }
    .role-badge { display: none; }

    /* ===== 内容 ===== */
    .content { padding: 12px; }
    .page-head h2 { font-size: 17px; }
    .page-actions .btn { padding: 8px 12px; }

    /* ===== 统计卡片：2 列 → 1 列 ===== */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 12px; gap: 10px; }
    .stat-icon { width: 38px; height: 38px; }
    .stat-value { font-size: 20px; }

    /* ===== 筛选栏：全宽堆叠 ===== */
    .filter-form { display: flex; flex-wrap: wrap; gap: 8px; }
    .filter-form > * { flex: 1 1 100%; min-width: 0; }
    .filter-form .input,
    .filter-form .input[type="date"],
    .filter-form .input[name="kw"] {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }
    .filter-form .btn { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 10px; }

    /* ===== 表格：卡片化 ===== */
    .table { display: block; width: 100%; }
    .table thead { display: none; }
    .table tbody { display: block; }
    .table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 2px 12px;
        margin-bottom: 10px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .table tbody tr:last-child { margin-bottom: 0; }
    .table tbody tr:hover td { background: transparent; }
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border);
        font-size: 13px;
        text-align: left;
        word-break: break-word;
    }
    .table td:last-child { border-bottom: 0; }
    .table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        flex: none;
        white-space: nowrap;
    }
    .table td.ta-r { justify-content: flex-end; flex-wrap: wrap; }
    .table td.ta-r::before { margin-right: auto; align-self: center; }
    .table td.empty {
        display: block;
        text-align: center;
        border: 0;
        padding: 16px 4px;
        font-size: 13px;
    }
    .table td.empty::before { content: none; }
    .table .inline-form { display: inline-flex; }
    .table td .btn-sm { padding: 6px 10px; margin: 2px 0; }

    /* ===== 表单 ===== */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .card-narrow { padding: 14px 12px; }
    .inline-field { flex-direction: column; }
    .inline-field .btn { width: 100%; justify-content: center; }

    /* ===== 搜索页 ===== */
    .search-filters { flex-direction: column; align-items: stretch; gap: 8px; }
    .search-filters .input { width: 100%; min-width: 0; }
    .search-filters .btn { width: 100%; justify-content: center; padding: 10px; }
    .search-input-wrap { padding: 4px 10px; }
    .chip { min-width: 0; width: 100%; }

    /* ===== 在线升级 ===== */
    .upload-label { padding: 24px 12px; }
    .ver-num { font-size: 28px; }

    /* ===== 详情信息 ===== */
    .info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .info-card { padding: 12px; }

    /* ===== 图例 / 卡片头 ===== */
    .card-head { flex-wrap: wrap; }
    .legend { gap: 10px; }

    /* ===== 分页 ===== */
    .pagination { gap: 4px; }
    .pagination a, .pagination .current { min-width: 28px; padding: 5px 8px; }
}

@media (max-width: 420px) {
    .stats-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 22px; }
}

@media (max-width: 480px) {
    .auth-body { padding: 16px; align-items: flex-start; padding-top: 6vh; }
    .auth-card { padding: 24px 18px; }
    .auth-brand { gap: 10px; }
    .auth-logo { width: 46px; height: 46px; }
    .auth-brand h1 { font-size: 19px; }
    .btn-block { letter-spacing: 2px; }
}

/* 更新日志 */
.changelog { display: grid; gap: 0; }
.changelog-item { position: relative; padding: 0 0 16px 24px; }
.changelog-item:not(:last-child) { border-left: 2px solid var(--border); margin-left: 6px; }
.changelog-item::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary, #2563eb); box-shadow: 0 0 0 3px var(--bg-2, #f1f5f9); }
.changelog-item:last-child::before { background: var(--text-3, #94a3b8); }
.changelog-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.changelog-ver { font-weight: 700; font-size: 14px; color: var(--text-1, #0f172a); }
.changelog-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgba(37,99,235,.1); color: #2563eb; }
.changelog-item ul { margin: 0; padding-left: 0; list-style: none; color: var(--text-2, #475569); font-size: 13px; display: grid; gap: 4px; }
.changelog-item ul li { position: relative; padding-left: 14px; }
.changelog-item ul li::before { content: '›'; position: absolute; left: 2px; color: var(--text-3, #94a3b8); }
@media (max-width: 767px) {
  .changelog-item ul { font-size: 12px; }
}

/* 对账结果 */
.stats-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 960px) { .stats-grid.cols-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats-grid.cols-6 { grid-template-columns: repeat(2, 1fr); } }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-num.ok { color: #15803d; }
.stat-num.warn { color: #d97706; }
.stat-num.info { color: #2563eb; }
.stat-num.danger { color: #dc2626; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.text-danger { color: #dc2626 !important; }
.text-warn { color: #d97706 !important; }

/* 入库型号联想 */
.suggest-wrap { position: relative; }
.suggest-list {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12); margin-top: 4px; max-height: 260px; overflow: auto;
}
.suggest-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border); }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover { background: #f0f7ff; }
.suggest-item .muted { margin-left: auto; font-size: 12px; }
.suggest-empty { padding: 12px; color: #b45309; font-size: 13px; }
/* 对账歧义 */
.stat-num.amb { color: #7c3aed; }
.badge-amb { background: #f3e8ff; color: #7c3aed; }
.tip-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
