/* ============================================================
   机械管理系统 自包含样式（无 CDN 依赖，宝塔部署零风险）
   断点：md=768px（手机/平板）、lg=992px（侧边栏切换）
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0e7490;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --card-bg: #fff;
    --text: #0f172a;
    --sidebar-w: 230px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- 布局 ---------- */
.sidebar {
    position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
    background: #1e293b; color: #cbd5e1; z-index: 1040;
    display: flex; flex-direction: column; transition: transform .25s;
}
.sidebar-brand {
    padding: 18px 20px; font-size: 17px; font-weight: 700; color: #fff;
    border-bottom: 1px solid #334155;
}
.sidebar-user {
    padding: 14px 20px; border-bottom: 1px solid #334155;
}
.sidebar-user-name { color: #fff; font-weight: 600; }
.sidebar-user-role { font-size: 12px; color: #94a3b8; }
.sidebar-nav { padding: 10px 0; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-link {
    display: block; padding: 11px 20px; color: #cbd5e1; font-size: 14px;
}
.sidebar-nav .nav-link:hover { background: #334155; color: #fff; }
.sidebar-nav .nav-link.active { background: var(--primary); color: #fff; }

.main-content {
    margin-left: var(--sidebar-w); padding: 20px 24px 40px; min-height: 100vh;
}
.sidebar-mask { display: none; }

/* 手机顶栏 */
.topbar {
    display: none; position: sticky; top: 0; z-index: 1030;
    background: #1e293b; color: #fff; padding: 10px 14px;
    align-items: center; gap: 10px;
}
.topbar .btn { background: transparent; border: 1px solid #475569; color: #fff; }
.topbar-title { font-weight: 700; flex: 1; }
.topbar-user { font-size: 12px; color: #cbd5e1; }

.page-header { margin-bottom: 18px; }
.page-title { font-size: 20px; margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .topbar { display: flex; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,.3); }
    .sidebar-mask.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035; }
    .main-content { margin-left: 0; padding: 14px 12px 30px; }
}

/* ---------- 栅格与工具（Bootstrap 子集） ---------- */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.row > [class*="col-"] { padding: 0 8px; }
.g-3 { margin: 0 -8px; } .g-3 > [class*="col-"] { padding: 0 8px; }
.row.g-3 > [class*="col-"], .row.g-2 > [class*="col-"] { margin-bottom: 12px; }
.row.g-2 { margin: 0 -6px; } .row.g-2 > [class*="col-"] { padding: 0 6px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-auto { flex: 0 0 auto; }
@media (min-width: 768px) {
    .col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 1200px) {
    .col-xl-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
}
@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block; }
    .d-none.d-lg-block { display: block; }
}
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-fill { flex: 1 1 auto; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: 1rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; } .mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .my-4 { margin: 1.5rem 0; }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: .5rem; }
.p-0 { padding: 0; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.h-100 { height: 100%; }
.border-0 { border: 0; }
.shadow-sm { box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-nowrap { white-space: nowrap; }
.fw-semibold { font-weight: 600; }
.small { font-size: 12px; }
.d-none { display: none; }
.d-md-none { display: none; }
@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block; }
    .d-none.d-md-block { display: block; }
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15,23,42,.06); overflow: hidden;
}
.card-body { padding: 16px 18px; }
.card-footer { padding: 10px 18px; border-top: 1px solid var(--border); background: #f8fafc; }

/* 统计卡 */
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }

/* 条形图（统计报表） */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { width: 150px; font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: #f1f5f9; border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 6px; min-width: 2px; }
.bar-value { width: 70px; font-size: 13px; font-weight: 600; color: var(--text); }
@media (max-width: 575.98px) {
    .bar-label { width: 92px; }
    .bar-value { width: 52px; }
}

/* 竖向柱状图（统计报表） */
.col-chart { display: flex; gap: 8px; align-items: stretch; height: 200px; padding: 6px 2px 0; }
.col-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.col-val { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.col-bar-box { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.col-bar {
    width: 62%; max-width: 40px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    border-radius: 6px 6px 0 0; min-height: 2px; transition: height .4s;
}
.col-label { font-size: 11px; color: var(--muted); white-space: nowrap; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* 统计卡 */
.stat-row { margin-top: 4px; }
.stat-row .stat-card { margin-bottom: 12px; }
.stat-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; box-shadow: 0 1px 3px rgba(15,23,42,.06); height: 100%;
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-num.small { font-size: 18px; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat-stock .stat-num { color: var(--success); }
.stat-sold .stat-num { color: var(--danger); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 7px 14px; border: 1px solid transparent; border-radius: 8px;
    font-size: 14px; cursor: pointer; background: transparent; transition: all .15s;
    text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { color: var(--muted); border-color: #cbd5e1; }
.btn-outline-secondary:hover { background: #e2e8f0; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-outline-success { color: var(--success); border-color: var(--success); }
.btn-outline-success:hover { background: var(--success); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 10px 20px; font-size: 16px; }
.btn-group { display: inline-flex; }
.btn-group-sm { gap: 2px; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-close {
    float: right; background: none; border: 0; font-size: 22px; line-height: 1;
    color: #64748b; cursor: pointer; padding: 0 4px;
}
.btn-close:hover { color: #0f172a; }

/* ---------- 徽章 ---------- */
.badge {
    display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px;
    line-height: 1.5; font-weight: 500;
}
.text-bg-success { background: #dcfce7; color: #166534; }
.text-bg-danger { background: #fee2e2; color: #991b1b; }
.text-bg-info { background: #cffafe; color: #155e75; }
.text-bg-primary { background: #dbeafe; color: #1e40af; }
.text-bg-warning { background: #fef3c7; color: #92400e; }
.text-bg-secondary { background: #e2e8f0; color: #475569; }
.bg-info-subtle { background: #cffafe; color: #155e75; }
.bg-secondary-subtle { background: #e2e8f0; color: #475569; }
.text-info-emphasis { color: #155e75; } .text-secondary-emphasis { color: #475569; }

/* ---------- 表单 ---------- */
.form-label { display: block; margin-bottom: 4px; font-size: 13px; color: #334155; }
.form-control, .form-select {
    display: block; width: 100%; padding: 7px 10px; font-size: 14px;
    border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text);
}
.form-control:focus, .form-select:focus { outline: 2px solid #93c5fd; border-color: var(--primary); }
.form-control-sm, .form-select-sm { padding: 5px 8px; font-size: 13px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-text { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 表格 ---------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { background: #f8fafc; font-weight: 600; color: #334155; white-space: nowrap; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-sm th, .table-sm td { padding: 7px 10px; }
.table-light { background: #f8fafc; }
.align-middle th, .align-middle td { vertical-align: middle; }

/* ---------- 提示条 ---------- */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; position: relative; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert .btn-close { position: absolute; right: 8px; top: 8px; }

/* ---------- 模态框 ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 1050; }
.modal.show { display: block; }
.modal::before { content: ""; position: absolute; inset: 0; background: rgba(15,23,42,.5); }
.modal-dialog {
    position: relative; margin: 8vh auto 20px; width: calc(100% - 24px); max-width: 560px;
    background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
    max-height: 86vh; display: flex; flex-direction: column;
}
.modal-content { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; flex: 1 1 auto; min-height: 0; }
.modal-content > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 0; }
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1080px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; margin: 0; }
.btn-close {
    box-sizing: content-box; width: 1em; height: 1em; padding: .25em;
    color: #0f172a;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230f172a'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0; border-radius: .25rem; opacity: .5; cursor: pointer; flex-shrink: 0;
}
.btn-close:hover { opacity: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 18px; border-top: 1px solid var(--border); flex-shrink: 0;
}
body.modal-open { overflow: hidden; }

/* ---------- 分页 ---------- */
.pagination { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.pagination-sm { gap: 2px; }
.pagination .page-item { margin: 0; }
.pagination .page-link {
    display: block; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px;
    color: var(--primary); font-size: 13px; background: #fff;
}
.pagination .page-link:hover { background: #f1f5f9; }
.pagination .active .page-link { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled .page-link { color: #94a3b8; pointer-events: none; background: #f8fafc; }

/* ---------- 图片 ---------- */
.machine-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.doc-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.img-thumb { display: inline-block; }
.existing-img {
    position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.existing-img img { width: 88px; height: 66px; object-fit: cover; display: block; }
.existing-img .img-del {
    position: absolute; top: 2px; right: 2px; background: rgba(15,23,42,.75); color: #fff;
    border: 0; border-radius: 6px; width: 20px; height: 20px; line-height: 18px;
    font-size: 12px; cursor: pointer;
}
.new-img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px dashed var(--border); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.img-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

/* ---------- 手机卡片列表 ---------- */
.mobile-card {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; margin: 0 0 10px;
}

/* ---------- 登录页 ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e293b, #0f172a); }
.login-wrap { width: calc(100% - 24px); max-width: 380px; }
.login-card { background: #fff; border-radius: 14px; padding: 32px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login-brand { font-size: 22px; font-weight: 700; text-align: center; color: var(--primary); }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 22px; font-size: 13px; }

/* ---------- 安装向导（install.php）---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1.5rem; }
.p-md-5 { padding: 1.5rem; }
@media (min-width: 768px) { .p-md-5 { padding: 3rem; } }
.h4 { font-size: 1.4rem; font-weight: 600; }
.text-primary { color: var(--primary); }
.hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.d-grid { display: grid; }
.mx-auto { margin-left: auto; margin-right: auto; }
.align-self-center { align-self: center; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.pt-3 { padding-top: 16px; }
.pb-1 { padding-bottom: 4px; }
.p-3 { padding: 16px; }
.w-100 { width: 100%; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.fw-bold { font-weight: 700; }

/* ---------- 设备资料 ---------- */
.doc-card .btn-group .btn { white-space: nowrap; }
.item-table { margin-bottom: 0; }
.item-table input { width: 100%; }

/* ============================================================
   手机端 App 风格（方案一：H5 全面 App 化）
   仅作用于 <768px 移动端，电脑端完全不受影响
   ============================================================ */
@media (max-width: 767.98px) {
    /* ---- App 顶栏：品牌渐变 + 标题居中 ---- */
    .topbar {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        padding: 12px 14px;
        border-bottom: 0;
        box-shadow: 0 2px 12px rgba(37, 99, 235, .28);
        position: sticky; top: 0; z-index: 1030;
    }
    .topbar .btn { border: 0; color: #fff; font-size: 22px; padding: 2px 8px; background: rgba(255,255,255,.12); border-radius: 8px; line-height: 1.2; }
    .topbar-title { text-align: center; font-size: 17px; letter-spacing: 1px; }
    .topbar-user {
        font-size: 11px; color: rgba(255,255,255,.85); background: rgba(255,255,255,.15);
        padding: 3px 10px; border-radius: 999px; white-space: nowrap; max-width: 84px; overflow: hidden; text-overflow: ellipsis;
    }

    /* ---- 页面主体：背景灰白过渡 + 底部给 Tab 留位 ---- */
    .main-content { padding: 12px 12px 84px !important; }
    .page-title { font-size: 18px; }
    .page-header { margin-bottom: 12px; }

    /* ---- 卡片全面圆角化 ---- */
    .card, .doc-card, .mobile-card, .stat-card {
        border-radius: 14px !important;
        box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
        border: 0 !important;
    }
    .card { overflow: hidden; }

    /* ---- 手机卡片：App 列表感 ---- */
    .mobile-card {
        border-radius: 14px;
        padding: 13px 14px;
        margin-bottom: 10px;
        background: #fff;
    }
    .mobile-card .fw-semibold { font-size: 15px; }
    .mobile-card .badge { vertical-align: middle; }
    .mobile-card .machine-thumb { width: 54px; height: 40px; border-radius: 8px; }

    /* ---- 大按钮（触屏手感）---- */
    .btn:not(.btn-sm) { min-height: 42px; border-radius: 10px; font-size: 15px; }
    .btn-sm { border-radius: 8px; padding: 5px 12px; }
    .btn-primary { box-shadow: 0 4px 14px rgba(37, 99, 235, .25); }

    /* ---- 表单控件 ---- */
    .form-control, .form-select { border-radius: 10px; min-height: 44px; font-size: 15px; }
    .form-select.form-select-sm, .form-control.form-control-sm { min-height: 38px; }
    .form-label { font-size: 12px; }

    /* ---- 统计卡 ---- */
    .stat-card { padding: 10px 8px; }
    .stat-num { font-size: 22px; }

    /* ---- 模态框：底部弹出风格 ---- */
    .modal-dialog { margin: 0 auto 0; width: 100%; max-width: none; border-radius: 18px 18px 0 0; min-height: 40vh; max-height: 92vh; display: flex; flex-direction: column; }
    .modal-content { display: flex; flex-direction: column; max-height: 92vh; }
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 12px 14px; }
    .modal-footer { padding: 10px 14px 14px; }
    .modal-footer .btn { flex: 1; }

    /* ---- 详情页表格行距 ---- */
    .table td, .table th { padding: 9px 8px; font-size: 13px; }

    /* ---- 筛选栏紧凑 ---- */
    .card-body .row.g-2 > [class*="col-"] { margin-bottom: 6px; }
}

/* ---- 底部 Tab 导航（App 标志元素，仅移动端）---- */
.app-tabbar {
    display: none;
}
@media (max-width: 767.98px) {
    .app-tabbar {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        background: #fff;
        border-top: 1px solid #eef2f7;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
    }
    .app-tabbar a {
        flex: 1; text-align: center; color: #94a3b8; text-decoration: none;
        font-size: 10px; padding: 2px 0 0; position: relative; -webkit-tap-highlight-color: transparent;
    }
    .app-tabbar a .tab-ico {
        display: block; width: 22px; height: 22px; margin: 0 auto 2px;
        background-repeat: no-repeat; background-position: center; background-size: contain;
    }
    .app-tabbar a.active { color: #2563eb; font-weight: 600; }
    .app-tabbar a.active::before {
        content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
        width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: #2563eb;
    }
    .tab-ico-home { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6.5h-6V21H4a1 1 0 0 1-1-1z' fill='none' stroke='%2394a3b8' stroke-width='1.9' stroke-linejoin='round'/%3e%3c/svg%3e"); }
    .tab-ico-stock { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3crect x='4' y='4' width='16' height='16' rx='2' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3cpath d='M8 9h8M8 13h8M8 17h4' stroke='%2394a3b8' stroke-width='1.9' stroke-linecap='round'/%3e%3c/svg%3e"); }
    .tab-ico-doc { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M6 2h8l6 6v14H6z' fill='none' stroke='%2394a3b8' stroke-width='1.9' stroke-linejoin='round'/%3e%3cpath d='M14 2v6h6' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3c/svg%3e"); }
    .tab-ico-customer { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M4 20c1.6-4.2 4.8-6.2 8-6.2s6.4 2 8 6.2' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3ccircle cx='9' cy='9' r='3.5' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3ccircle cx='16' cy='10' r='2.6' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3c/svg%3e"); }
    .tab-ico-me { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='8' r='4' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3cpath d='M4 20c1.6-4.2 4.8-6.2 8-6.2s6.4 2 8 6.2' fill='none' stroke='%2394a3b8' stroke-width='1.9'/%3e%3c/svg%3e"); }
}

/* ---- 品牌 LOGO 徽标（顶栏/登录页通用）---- */
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px; vertical-align: middle;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.logo-mark svg { width: 16px; height: 16px; }

/* ---- 登录页 App 化（品牌徽标 + 亮色渐变）---- */
.login-logo {
    width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 22px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(37,99,235,.4);
}
.login-logo svg { width: 40px; height: 40px; }
@media (max-width: 767.98px) {
    .login-body { background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); }
    .login-wrap { width: calc(100% - 40px); max-width: 400px; }
    .login-card { border-radius: 20px; padding: 28px 24px 32px; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
    .login-brand { font-size: 24px; }
    .login-sub { font-size: 12px; margin-bottom: 20px; }
    .login-card .form-control { min-height: 46px; }
    .login-card .btn-primary { min-height: 46px; border-radius: 12px; font-size: 16px; letter-spacing: 6px; }
}
