/* ============================================================
   安伏锂电 MES - 全局样式
   ============================================================ */
:root {
    --bg: #eef2f6;
    --panel: #ffffff;
    --ink: #0f172a;
    --sub: #5b6b82;
    --muted: #94a3b8;
    --line: #e4eaf2;
    --line-strong: #d5dfeb;
    --brand: #0f766e;
    --brand-2: #14b8a6;
    --accent: #2563eb;
    --ok: #059669;
    --warn: #d97706;
    --bad: #dc2626;
    --nav: #0b2530;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 30px -18px rgba(15, 23, 42, .28);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; }

.muted { color: var(--sub); }
.small { font-size: 12px; }
.mono, .code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    letter-spacing: .2px;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    background: linear-gradient(180deg, #0b2530 0%, #0c2f3c 55%, #09212c 100%);
    color: #cfe3e7;
    display: flex;
    flex-direction: column;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.logo {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(20, 184, 166, .8);
}
.logo svg { width: 21px; height: 21px; }

.brand-name { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.brand-sub { font-size: 10px; color: #7fa7b1; letter-spacing: 1.4px; margin-top: 1px; }

.nav { flex: 1; padding: 10px; overflow-y: auto; }
.nav-group {
    font-size: 11px;
    color: #5f8792;
    letter-spacing: 1.5px;
    padding: 15px 12px 7px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #b8d2d8;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: .15s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, .26), rgba(20, 184, 166, .05));
    color: #fff;
    box-shadow: inset 2px 0 0 #2dd4bf;
}
.nav-item.active svg { color: #5eead4; opacity: 1; }

.sidebar-foot {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: 11px;
    line-height: 1.7;
    color: #6f96a1;
}

.sidebar-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 20, 28, .5);
    z-index: 35;
}

.main {
    margin-left: 236px;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    padding: 13px 26px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.page-title h1 { font-size: 19px; letter-spacing: -.2px; }
.page-title p { margin-top: 2px; color: var(--sub); font-size: 12.5px; }

.top-right { display: flex; align-items: center; gap: 14px; }
.top-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--sub);
    padding: 6px 12px;
    background: #f6f9fc;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.top-date span { color: var(--muted); }

.user-chip { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    flex: none;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta b { font-size: 13px; }
.user-meta em { font-style: normal; font-size: 11px; color: var(--muted); }

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--sub);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: .15s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: #f8fafc; }
.menu-toggle { display: none; }

.content {
    padding: 22px 26px 44px;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    flex: 1;
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; }
.card-head h3 { font-size: 14px; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfdff; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* ---------- KPI ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.kpi {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 17px 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, .1), transparent 70%);
}
.kpi .label { color: var(--sub); font-size: 12.5px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1.15; margin-top: 6px; }
.kpi .value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi .hint { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.kpi .kicon {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #ecfdf5;
    color: #0f766e;
}
.kpi .kicon svg { width: 19px; height: 19px; }
.kpi.blue .kicon { background: #eff6ff; color: #2563eb; }
.kpi.amber .kicon { background: #fffbeb; color: #d97706; }
.kpi.violet .kicon { background: #f5f3ff; color: #7c3aed; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
table.data th {
    position: sticky;
    top: 0;
    background: #f7fafc;
    color: #64748b;
    font-weight: 600;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: .3px;
    z-index: 1;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid #eff4f9; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #f8fcff; }
table.data .num { font-variant-numeric: tabular-nums; }
table.data .actions { white-space: nowrap; }
table.data .actions .btn { margin-right: 4px; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #94a3b8;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
}
.empty .empty-icon svg { width: 25px; height: 25px; }
.empty p { font-size: 13px; }

/* ---------- 徽标 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}
.badge-ok { background: #ecfdf5; color: #047857; }
.badge-info { background: #eff6ff; color: #1d4ed8; }
.badge-warn { background: #fffbeb; color: #b45309; }
.badge-bad { background: #fef2f2; color: #b91c1c; }
.badge-muted { background: #f1f5f9; color: #64748b; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #b9c9da; background: #f8fafc; color: #0f172a; }
.btn-primary {
    background: linear-gradient(180deg, #12857b, #0f766e);
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 8px 16px -8px rgba(15, 118, 110, .8);
}
.btn-primary:hover { background: #0d6b63; color: #fff; }
.btn-accent { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-accent:hover { background: #1d4ed8; color: #fff; }
.btn-danger { color: var(--bad); border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: #fef2f2; color: #b91c1c; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; color: #475569; font-weight: 600; }
.field .req { color: var(--bad); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, select.input, textarea.input {
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    padding: 0 12px;
    font-size: 13.5px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: .15s;
    font-family: inherit;
    width: 100%;
}
textarea.input { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20, 184, 166, .14); }
.input[readonly] { background: #f8fafc; color: var(--sub); }
.span-2 { grid-column: span 2; }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.switch { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #475569; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--brand); }

.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.toolbar .field { min-width: 140px; }
.toolbar .field.grow { flex: 1; min-width: 200px; }
.toolbar .actions { display: flex; gap: 8px; margin-left: auto; }

.filter-card { margin-bottom: 16px; }

/* ---------- 提示 ---------- */
.flash {
    padding: 11px 15px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}
.flash-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.flash-warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.flash-info { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: 13px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; margin: 14px 0; }
.alert-warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.alert-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.alert-ok { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }

/* ---------- 进度 / 图表 ---------- */
.progress { height: 8px; background: #edf2f7; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #14b8a6, #0ea5e9); transition: width .4s; }
.progress.warn > span { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 76px 1fr 42px; align-items: center; gap: 12px; }
.bar-row .name { font-size: 12.5px; color: #475569; }
.bar-row .track { height: 9px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.bar-row .track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0ea5e9, #14b8a6); }
.bar-row .num { text-align: right; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 4px 0 0 24px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(#14b8a6, #e2e8f0);
}
.timeline li { position: relative; padding: 0 0 20px; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--brand-2);
    box-shadow: 0 0 0 3px #ecfdf5;
}
.timeline li.bad::before { border-color: var(--bad); box-shadow: 0 0 0 3px #fef2f2; }
.t-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.t-step { font-weight: 700; font-size: 13.5px; }
.t-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.t-meta { color: var(--sub); font-size: 12px; margin-top: 3px; display: flex; gap: 14px; flex-wrap: wrap; }
.t-remark { color: #64748b; font-size: 12px; margin-top: 4px; background: #f8fafc; border-radius: 7px; padding: 6px 9px; display: inline-block; }

/* ---------- 详情 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.dl-item .k { font-size: 11.5px; color: var(--muted); }
.dl-item .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 2px; word-break: break-all; }
.dl-item .v.mono { font-weight: 600; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 20px; flex-wrap: wrap; }
.pager-info { color: var(--muted); font-size: 12px; margin-right: auto; }
.page-btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--sub);
    font-size: 12px;
}
.page-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn.disabled { opacity: .45; pointer-events: none; }

/* ---------- 登录 ---------- */
.login-body { background: #081f27; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }

.login-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 64px;
    color: #fff;
    background:
        radial-gradient(1200px 600px at 15% 0%, rgba(20, 184, 166, .22), transparent 55%),
        radial-gradient(900px 500px at 100% 100%, rgba(14, 165, 233, .18), transparent 60%),
        linear-gradient(160deg, #0a2631 0%, #08202b 60%, #071a23 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(700px 500px at 30% 35%, #000 20%, transparent 80%);
}
.hero-brand { position: relative; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; letter-spacing: .5px; margin-bottom: 52px; }
.hero-brand .logo { width: 42px; height: 42px; border-radius: 12px; }
.hero-brand .logo svg { width: 23px; height: 23px; }
.login-hero h1 { position: relative; font-size: 40px; line-height: 1.28; letter-spacing: -1px; margin-bottom: 18px; }
.login-hero h1 span { color: #5eead4; }
.login-hero .lead { position: relative; color: #9fc3cb; font-size: 14.5px; max-width: 460px; line-height: 1.9; }

.hero-points { position: relative; list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; gap: 14px; }
.hero-points li { display: flex; align-items: center; gap: 11px; color: #cfe3e7; font-size: 13.5px; }
.hero-points li::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 50%;
    background: rgba(20, 184, 166, .16);
    border: 1px solid rgba(45, 212, 191, .5);
    box-shadow: inset 0 0 0 4px rgba(8, 31, 39, .9);
}
.hero-metrics { position: relative; display: flex; gap: 34px; margin-top: 52px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero-metrics b { display: block; font-size: 24px; color: #fff; letter-spacing: -.5px; }
.hero-metrics span { font-size: 11.5px; color: #7fa7b1; letter-spacing: 1px; }

.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; background: #f3f7fa; }
.login-card {
    width: 100%;
    max-width: 396px;
    background: #fff;
    border: 1px solid #e5ecf3;
    border-radius: 18px;
    padding: 34px 32px 30px;
    box-shadow: 0 24px 60px -30px rgba(8, 32, 43, .35);
}
.login-logo {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    display: grid;
    place-items: center;
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 10px 20px -8px rgba(20, 184, 166, .8);
}
.login-logo svg { width: 25px; height: 25px; }
.login-card h2 { font-size: 22px; letter-spacing: -.3px; }
.login-card .lead { color: var(--sub); font-size: 13px; margin-top: 5px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .input { height: 44px; }
.login-form .btn { height: 44px; font-size: 14px; margin-top: 4px; }
.login-hint {
    margin-top: 20px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    color: var(--sub);
    font-size: 12px;
    line-height: 1.7;
}
.login-copy { color: #94a3b8; font-size: 11.5px; margin-top: 22px; }

/* ---------- 安装 ---------- */
.install-body { background: #081f27; }
.install-page {
    min-height: 100vh;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 36px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.install-brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.install-brand .logo { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #14b8a6, #0ea5e9); display: grid; place-items: center; color: #fff; }
.install-brand .logo svg { width: 24px; height: 24px; }
.install-brand h1 { font-size: 21px; letter-spacing: .5px; }
.install-brand p { color: #8fb4bd; font-size: 12.5px; margin-top: 3px; }
.install-card { padding: 28px 30px; margin: 0; }
.install-card h2 { font-size: 20px; margin-bottom: 6px; }
.install-card .muted { font-size: 13px; }
.install-cred { display: flex; flex-direction: column; gap: 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; margin: 16px 0; }
.install-cred > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.install-cred span { color: var(--muted); }
.install-cred strong, .install-cred a { color: var(--brand); font-weight: 700; }
.install-logs { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #047857; margin: 12px 0; }
.check-list { margin: 18px 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #eff4f9; }
.check-item:last-child { border-bottom: none; }
.check-item em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.check-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.check-item.ok .check-dot { background: #10b981; box-shadow: 0 0 0 3px #ecfdf5; }
.check-item.bad .check-dot { background: #ef4444; box-shadow: 0 0 0 3px #fef2f2; }
.check-item.bad em { color: var(--bad); }
.install-info { display: flex; flex-direction: column; gap: 7px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 15px; margin: 14px 0; font-size: 12.5px; }
.install-info > div { display: flex; gap: 10px; }
.install-info span { color: var(--muted); min-width: 60px; }
.install-info code { font-family: ui-monospace, Consolas, monospace; color: #334155; }
.install-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.install-foot { text-align: center; color: #648a94; font-size: 11.5px; }

/* ---------- 标签 ---------- */
.label-sheet {
    display: flex;
    flex-wrap: wrap;
    gap: 6mm;
    justify-content: center;
    align-content: flex-start;
    padding: 10mm;
    background: #e8edf4;
    min-height: 60vh;
}
.label {
    width: 50mm;
    height: 30mm;
    background: #fff;
    color: #000;
    border: 1px dashed #b6c2d2;
    border-radius: 1mm;
    padding: 1.4mm 2mm 1.2mm;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: none;
}
.l-head { display: flex; align-items: center; justify-content: space-between; gap: 2mm; line-height: 1.1; }
.l-brand { font-size: 6.4pt; font-weight: 700; letter-spacing: .6px; white-space: nowrap; }
.l-model { font-size: 5.8pt; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-barcode { height: 9.6mm; display: flex; align-items: center; justify-content: center; margin-top: .4mm; }
.l-barcode svg { width: 100%; height: 100%; display: block; }
.l-code {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 8.6pt;
    font-weight: 700;
    letter-spacing: .7px;
    line-height: 1.05;
    margin-top: .2mm;
    white-space: nowrap;
}
.l-meta { display: flex; justify-content: space-between; gap: 2mm; font-size: 5.4pt; line-height: 1.15; margin-top: .3mm; }
.l-foot { display: flex; justify-content: space-between; gap: 2mm; font-size: 5.4pt; line-height: 1.15; margin-top: auto; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.print-body { background: #e8edf4; }
.print-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 12px -8px rgba(15, 23, 42, .3);
}
.print-bar .left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-bar .title { font-weight: 700; font-size: 15px; }
.print-bar .count { color: var(--muted); font-size: 12px; }
.print-bar .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-bar select.input { width: auto; height: 36px; }
.print-bar .input.copies { width: 72px; height: 36px; text-align: center; }

.label-sheet.a4 {
    display: grid;
    grid-template-columns: repeat(3, 50mm);
    gap: 8mm 6mm;
    justify-content: center;
    padding: 10mm;
    background: #fff;
    min-height: auto;
}
.label-sheet.a4 .label { border: 1px solid #e2e8f0; }

@media print {
    .print-body { background: #fff; }
    .no-print { display: none !important; }
    .label-sheet { display: block; padding: 0; background: #fff; min-height: 0; }
    .label-sheet .label { border: none; margin: 0; page-break-after: always; }
    .label-sheet .label:last-child { page-break-after: auto; }
    .label-sheet.a4 { display: grid; grid-template-columns: repeat(3, 50mm); gap: 8mm 6mm; }
    .label-sheet.a4 .label { border: 1px solid #e2e8f0; page-break-after: auto; }
}

/* ---------- 其他 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.text-right { text-align: right; }
.inline-form { display: inline; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}
.quick-action:hover { border-color: var(--brand-2); box-shadow: 0 6px 16px -12px rgba(15, 118, 110, .6); color: var(--brand); }
.quick-action .qa-icon { width: 32px; height: 32px; border-radius: 9px; background: #ecfdf5; color: var(--brand); display: grid; place-items: center; flex: none; }
.quick-action .qa-icon svg { width: 17px; height: 17px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-mask.show { display: block; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-panel { min-height: 100vh; }
}
@media (max-width: 760px) {
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .top-date, .user-meta { display: none; }
    .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi .value { font-size: 24px; }
    .card-body { padding: 16px; }
    .dl-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}
