/* =============================================================
   实验室采购 · 合同 · 台账管理平台
   视觉风格沿用「傅里叶光学共建实验室」的浅色实验室调色板：
   深蓝顶栏 / #2458e6 主色 / 白色卡片 / 淡蓝灰描边 / 等宽数字
   ============================================================= */

:root {
  --background:#f5f7fb; --foreground:#142238; --card:#fff; --card-foreground:#142238;
  --popover:#fff; --popover-foreground:#142238;
  --primary:#2458e6; --primary-foreground:#fff;
  --secondary:#e9effb; --secondary-foreground:#214697;
  --muted:#eef2f7; --muted-foreground:#596b82;
  --accent:#e9effb; --accent-foreground:#173e8d;
  --border:#dce3ee; --input:#cbd5e4; --ring:#2458e6; --radius:0.65rem;
  --navy:#111f35; --ink:#142238;
  --ok:#286f55; --warn:#a34e2a; --danger:#b42318;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--background);color:var(--foreground);font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit}
button,a,[role=tab]{touch-action:manipulation}
button:not(:disabled),[role=tab]{cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
a{color:var(--primary);text-decoration:none}
h1,h2,h3,h4,p{margin-top:0}
.app-shell{min-height:100vh}

/* ---------------------------------------------------------- 顶栏 */
.masthead{
  position:relative;color:#fff;
  padding:25px max(28px,calc((100vw - 1320px)/2));
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  background:linear-gradient(180deg,#0f1b2e 0%,#111f35 58%,#152743 100%);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 16px 34px -26px rgba(9,18,32,.85);
}
/* 顶栏底部一道极淡的内部光，替代原来的蓝色横条，让边缘有厚度但不抢眼 */
.masthead::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(150,185,255,.35) 18%,rgba(150,185,255,.35) 82%,rgba(255,255,255,0) 100%);
}
.brand{display:flex;align-items:center;gap:17px;min-width:0}
.brand-mark{width:50px;height:54px;border:1px solid #648ac6;display:grid;place-items:center;font-family:inherit;font-size:19px;font-weight:600;letter-spacing:.02em;border-radius:4px;background:#1b3151;flex-shrink:0;color:#fff}
.eyebrow{display:block;font-size:12px;font-weight:600;letter-spacing:.11em;color:#a8bddb}
.masthead h1{margin:3px 0 0;font-size:23px;font-weight:650;letter-spacing:.035em;white-space:nowrap}
.masthead h1 span{font-weight:400;color:#b9c8de;margin-left:14px;font-size:17px}
.header-actions{display:flex;align-items:center;gap:9px;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}
.header-actions .btn{color:#162d4e}
.edition{border:1px solid #4b6080;color:#cedaeb;font-size:13px;font-weight:400;background:transparent;border-radius:6px;padding:5px 10px;white-space:nowrap}
.sync-state{display:flex;align-items:center;gap:7px;font-size:12px;color:#b9c8de;white-space:nowrap;margin-right:4px}
.sync-dot{width:7px;height:7px;border-radius:50%;background:#6ee7a8;box-shadow:0 0 0 3px #6ee7a822}
.sync-dot.off{background:#f0a868;box-shadow:0 0 0 3px #f0a86822}

/* ---------------------------------------------------------- 按钮 */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--border);background:#fff;color:var(--ink);border-radius:7px;padding:8px 13px;font-size:14px;font-weight:500;line-height:1.4;white-space:nowrap;transition:background .16s,border-color .16s,transform .16s,box-shadow .16s}
.btn:hover:not(:disabled){background:#f2f6fd;border-color:#a9c2ee}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn:focus-visible{outline:3px solid var(--ring);outline-offset:2px}
.btn svg{width:16px;height:16px;flex-shrink:0}
.btn-primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn-primary:hover:not(:disabled){background:#1d4bd0;border-color:#1d4bd0}
.btn-ghost{background:transparent;border-color:transparent;color:#41618a}
.btn-ghost:hover:not(:disabled){background:#eef3fb}
.btn-danger{color:var(--danger);border-color:#eccac6;background:#fff8f7}
.btn-danger:hover:not(:disabled){background:#ffefed;border-color:#e3b0aa}
.btn-sm{padding:5px 9px;font-size:13px;border-radius:6px}
.btn-sm svg{width:14px;height:14px}
.btn-lg{padding:11px 18px;font-size:15px}
.btn-block{width:100%}
.icon-btn{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border-radius:6px}

/* ---------------------------------------------------------- 布局 */
.workspace{max-width:1376px;padding:0 28px;margin:0 auto}
.course-note{display:flex;align-items:flex-start;gap:9px;padding:16px 0;color:#5b6c82;font-size:14px;border-bottom:1px solid var(--border)}
.course-note svg{flex-shrink:0;margin-top:3px;color:#315cc2;width:16px;height:16px}
.course-note code{font-family:ui-monospace,monospace;font-size:13px;background:#e9effb;padding:1px 5px;border-radius:4px;color:#214697}
.intro-row{display:flex;align-items:center;justify-content:space-between;gap:48px;padding:30px 0 26px}
.ink{color:#3561b0}
.intro-row h2{font-size:30px;letter-spacing:-.035em;font-weight:650;line-height:1.4;margin:7px 0 9px}
.intro-row p{color:#596b82;margin:6px 0 0;font-size:15px}
.course-progress{min-width:250px;max-width:300px}
.course-progress>div:first-child{display:flex;align-items:baseline;gap:16px;margin-bottom:9px}
.course-progress strong{font-family:ui-monospace,monospace;font-size:34px;line-height:1;font-weight:600;color:#214c99}
.course-progress strong small{font-size:18px;color:#697990;font-weight:400}
.course-progress span{color:#596b82;font-size:14px}
.course-progress .track{height:5px;background:#e3eaf5;border-radius:99px;overflow:hidden}
.course-progress .track>i{display:block;height:100%;background:var(--primary);border-radius:99px;transition:width .4s}
.course-progress>.meta{display:block;font-size:12px;margin-top:8px;color:#718094}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);background:#fff;border-radius:9px;margin-bottom:26px;overflow:hidden}
.metrics>div{display:flex;align-items:center;gap:10px;padding:17px 20px;min-width:0}
.metrics>div+div{border-left:1px solid var(--border)}
.metrics svg{width:19px;height:19px;color:#3b609a;flex-shrink:0}
.metrics span{color:#596b82;font-size:14px;white-space:nowrap}
.metrics strong{margin-left:auto;font-size:25px;font-family:ui-monospace,monospace;font-weight:600;white-space:nowrap}
.metrics small{font-size:13px;color:#718094;font-weight:400;margin-left:6px}
.main-tab-list{position:relative;display:flex;border-bottom:1px solid #d5deeb;width:100%;justify-content:flex-start;gap:25px;border-radius:0;height:auto;padding:0;margin-bottom:22px;overflow-x:auto}
.main-tab-list>[role=tab]{flex:none;border:none;background:transparent;border-radius:0;font-size:16px;padding:12px 3px 16px;gap:8px;display:inline-flex;align-items:center;color:#5b6c82;position:relative;white-space:nowrap;font-weight:500}
.main-tab-list>[role=tab]:hover{color:#2458e6}
.main-tab-list>[role=tab][aria-selected=true]{color:#2458e6;font-weight:600}
.main-tab-list>[role=tab][aria-selected=true]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:#2458e6;border-radius:3px 3px 0 0}
.main-tab-list>[role=tab] svg{width:16px;height:16px}
.footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:34px 0 20px;padding-top:17px;border-top:1px solid var(--border);color:#6b7b90;font-size:12px;flex-wrap:wrap}

/* ---------------------------------------------------------- 面板 / 卡片 */
.panel{background:#fff;border:1px solid var(--border);border-radius:9px;padding:25px}
.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:20px;flex-wrap:wrap}
.panel-heading h2{font-size:23px;font-weight:650;margin:0;line-height:1.45}
.panel-heading h3{font-size:19px;font-weight:650;margin:0}
.panel-heading p{font-size:14px;color:#596b82;margin:5px 0 0}
.inline-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.card{background:#fff;border:1px solid var(--border);border-radius:9px;padding:20px}
.card h3{font-size:17px;font-weight:650;margin:0 0 4px}
.card .sub{font-size:13px;color:#6c809a;margin:0 0 16px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.stack{display:flex;flex-direction:column;gap:18px}

/* ---------------------------------------------------------- 筛选 / 表格 */
.filters{display:flex;align-items:center;gap:13px;padding:16px 0;border-top:1px solid #e0e6ee;border-bottom:1px solid #e0e6ee;flex-wrap:wrap}
.filters input,.filters select{background:#f9fbfe;border:1px solid var(--input);border-radius:7px;padding:8px 11px;font-size:14px;color:var(--ink);min-height:38px}
.filters input{flex:1;min-width:190px;max-width:390px}
.filters select{min-width:130px}
.filters input:focus,.filters select:focus{outline:2px solid var(--ring);outline-offset:1px;border-color:var(--primary)}
.filters>.count{margin-left:auto;font-size:14px;color:#697b93;white-space:nowrap}
.table-wrap{margin-top:9px;overflow-x:auto}
table.data-table{width:100%;border-collapse:collapse;font-size:14px}
.data-table th{font-size:13px;color:#6b7d96;font-weight:500;text-align:left;padding:13px 10px;border-bottom:1px solid #e0e6ee;white-space:nowrap;background:#fafbfe}
.data-table td{padding:13px 10px;border-bottom:1px solid #eaf0f7;vertical-align:top;font-size:14px}
.data-table tbody tr:hover{background:#f7faff}
.data-table tbody tr:last-child td{border-bottom:0}
.data-table strong{font-weight:600}
.data-table .num{font-family:ui-monospace,monospace;font-variant-numeric:tabular-nums;white-space:nowrap}
.cell-sub{display:block;font-size:12px;color:#6c809a;margin-top:4px;white-space:normal;line-height:1.5}
.row-link{color:#264f8e;text-align:left;border:none;background:none;padding:0;font-weight:600;line-height:1.5}
.row-link:hover{color:#2458e6;text-decoration:underline}
.row-actions{display:flex;gap:4px;justify-content:flex-end;white-space:nowrap}
.empty{display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:180px;text-align:center;padding:28px 22px;color:#8191a9}
.empty svg{width:36px;height:36px;color:#9db0c9}
.empty h3{font-size:17px;color:#4a607b;font-weight:500;margin:12px 0 6px}
.empty p{font-size:14px;color:#72839a;max-width:420px;margin:0}
.loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:50px 20px;color:#657b99}
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------------------------------------------------------- 徽章 / 状态 */
.badge{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--border);background:#f4f6f9;color:#52637a;border-radius:5px;padding:3px 8px;font-size:12px;font-weight:400;white-space:nowrap}
.badge-blue{background:#eaf1ff;border-color:#cadcfb;color:#214697}
.badge-green{background:#eaf5f1;border-color:#bbddcf;color:#286f55}
.badge-amber{background:#fff7e5;border-color:#ecdaad;color:#876018}
.badge-gray{background:#f1f3f6;border-color:#dfe4ea;color:#6b7b90}
.status{display:inline-block;border:1px solid transparent;border-radius:5px;padding:3px 9px;font-size:12.5px;font-weight:500;white-space:nowrap;line-height:1.5}
/* 采购流程状态：颜色沿用台账「使用说明」第三节 */
.st-待签字{background:#fff7e5;color:#876018;border-color:#ecdaad}
.st-已批准待采购{background:#e9f1ff;color:#24558f;border-color:#cadcfb}
.st-采购中{background:#2458e6;color:#fff;border-color:#2458e6}
.st-已采购待入库{background:#fff0e9;color:#a34e2a;border-color:#ebc5b3}
.st-已入库{background:#eaf5f1;color:#286f55;border-color:#bbddcf}
.st-已取消{background:#f1f3f6;color:#6b7b90;border-color:#dfe4ea}
/* 合同进度 */
.st-待签订{background:#fff7e5;color:#876018;border-color:#ecdaad}
.st-执行中{background:#e9f1ff;color:#24558f;border-color:#cadcfb}
.st-已交付{background:#edf1ff;color:#3a52a8;border-color:#d3dcf8}
.st-已验收{background:#eaf5f1;color:#286f55;border-color:#bbddcf}
.st-已付款{background:#2458e6;color:#fff;border-color:#2458e6}
.st-已关闭{background:#eef2f7;color:#52637a;border-color:#dce3ee}
.st-已终止{background:#ffefed;color:#b42318;border-color:#eccac6}
.st-未核对{background:#fff7e5;color:#876018;border-color:#ecdaad}
.st-已核对{background:#eaf5f1;color:#286f55;border-color:#bbddcf}
.st-是{background:#ffefed;color:#b42318;border-color:#eccac6}
.st-否{background:#eaf5f1;color:#286f55;border-color:#bbddcf}

/* ---------------------------------------------------------- 图表 / 统计 */
.bar-row{display:grid;grid-template-columns:110px 1fr 66px;align-items:center;gap:12px;margin:11px 0;font-size:13px}
.bar-row .bar-label{color:#526886;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-track{height:9px;background:#eef2f8;border-radius:99px;overflow:hidden}
.bar-fill{display:block;height:100%;border-radius:99px;background:var(--primary);transition:width .45s}
.bar-value{text-align:right;font-family:ui-monospace,monospace;color:#3d5578;font-variant-numeric:tabular-nums;font-size:13px}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:6px 0 4px}
.stat-card{background:#f5f8fd;border:1px solid #e2e9f4;border-radius:8px;padding:14px 16px}
.stat-card span{display:block;font-size:12.5px;color:#5f718b}
.stat-card strong{display:block;font:600 25px ui-monospace,monospace;color:#214c99;margin-top:5px;font-variant-numeric:tabular-nums}
.stat-card small{font-size:12px;color:#71839b;font-weight:400;margin-left:5px}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{display:flex;gap:14px;padding:13px 0;border-bottom:1px solid #eaf0f7;font-size:14px}
.timeline li:last-child{border-bottom:0}
.timeline .dot{width:9px;height:9px;border-radius:50%;background:var(--primary);flex-shrink:0;margin-top:7px}
.timeline .dot.muted{background:#a9bdd8}
.timeline .t-main{flex:1;min-width:0}
.timeline .t-main strong{font-weight:600}
.timeline .t-main p{margin:3px 0 0;color:#6c809a;font-size:13px}
.timeline time{font-family:ui-monospace,monospace;font-size:12px;color:#71839b;white-space:nowrap}
.source-list{display:flex;flex-direction:column;gap:9px}
.source-item{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #e2e8f2;border-radius:7px;background:#fafcff;font-size:13.5px}
.source-item svg{width:16px;height:16px;color:#3b609a;flex-shrink:0}
.source-item .s-name{font-weight:600;color:#2c4363;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-item .s-meta{margin-left:auto;color:#71839b;font-size:12px;white-space:nowrap}

/* ---------------------------------------------------------- 元件台账分组导航 */
.inventory-layout{display:grid;grid-template-columns:238px 1fr;gap:18px}
.group-nav{background:#fff;border:1px solid var(--border);border-radius:9px;padding:14px;align-self:start;position:sticky;top:16px}
.group-nav h4{font-size:12px;letter-spacing:.08em;color:#7c8ca1;font-weight:600;margin:4px 8px 9px;text-transform:uppercase}
.campus-label{font-size:12px;font-weight:600;color:#3b609a;padding:12px 9px 5px;border-top:1px solid #eef2f7;margin-top:6px;letter-spacing:.04em}
.campus-label:first-of-type{border-top:0;margin-top:0}
.group-nav-item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:none;background:transparent;border-radius:6px;padding:8px 9px;font-size:13.5px;color:#4a607b;line-height:1.4}
.group-nav-item:hover{background:#f0f5ff;color:#2458e6}
.group-nav-item.active{background:#2458e6;color:#fff;font-weight:600}
.group-nav-item .g-count{margin-left:auto;font-family:ui-monospace,monospace;font-size:12px;opacity:.75}
.group-nav-item.active .g-count{opacity:.85}
.group-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:4px}
.group-toolbar .g-title{font-size:19px;font-weight:650;margin:0}
.group-toolbar .g-owner{font-size:13px;color:#6c809a}

/* ---------------------------------------------------------- 使用说明 */
.guide-hero{display:flex;align-items:flex-start;gap:14px;background:#e9f1ff;border:1px solid #cadbfa;border-radius:8px;color:#41608c;padding:17px 20px;margin-bottom:22px}
.guide-hero svg{width:20px;height:20px;flex-shrink:0;margin-top:2px;color:#2458e6}
.guide-hero h3{font-size:16px;font-weight:650;margin:0 0 4px;color:#214697}
.guide-hero p{margin:0;font-size:14px;line-height:1.8}
.guide-table{width:100%;border-collapse:collapse;font-size:14px}
.guide-table th{text-align:left;background:#f5f8fc;color:#586e8e;font-weight:600;font-size:13px;padding:11px 12px;border:1px solid #dce4ef}
.guide-table td{padding:11px 12px;border:1px solid #e2e9f1;vertical-align:top;line-height:1.75;color:#42597a;white-space:normal}
.guide-table td:first-child{color:#31557f;font-weight:600;white-space:nowrap}
.doc-block{margin:0 0 28px}
.doc-block h3{font-size:18px;font-weight:650;color:#2b4b76;margin:0 0 12px}

/* ---------------------------------------------------------- 连接自检 */
.network-hero{background:#132844;color:#fff;border-radius:11px;padding:26px 28px;margin-bottom:20px;display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap;position:relative;overflow:hidden}
.network-hero::after{content:"";position:absolute;right:-60px;top:-60px;width:220px;height:220px;border-radius:50%;background:#2458e622}
.network-hero .eyebrow{color:#92b6e8}
.network-hero h2{font-size:22px;font-weight:650;margin:7px 0 6px}
.network-hero p{margin:0;color:#c2d3eb;font-size:14px;line-height:1.8;max-width:620px}
.network-hero .current-url{font-family:ui-monospace,monospace;font-size:16px;color:#8ee0b0;background:#0d1f36;border:1px solid #2b4a72;border-radius:7px;padding:10px 14px;margin-top:12px;display:inline-block;word-break:break-all}
.network-hero .hero-side{text-align:right;flex-shrink:0;z-index:1}
.network-hero .hero-side .ok-pill{display:inline-flex;align-items:center;gap:7px;background:#1d4a3c;color:#8ee0b0;border:1px solid #2f6b56;border-radius:99px;padding:6px 13px;font-size:13px;font-weight:600}
.addr-list{display:flex;flex-direction:column;gap:10px}
.addr-item{display:flex;align-items:center;gap:14px;border:1px solid var(--border);border-radius:8px;padding:14px 16px;background:#fafcff;flex-wrap:wrap}
.addr-item.recommended{border-color:#b9cdf5;background:#f4f8ff}
.addr-item .a-main{flex:1;min-width:240px}
.addr-item .a-url{font-family:ui-monospace,monospace;font-size:15px;color:#214c99;font-weight:600;word-break:break-all}
.addr-item .a-meta{font-size:12.5px;color:#6c809a;margin-top:4px}
.addr-item .a-actions{display:flex;gap:7px;flex-wrap:wrap}
.checklist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.check-item{display:flex;align-items:flex-start;gap:11px;padding:13px 15px;border-radius:8px;font-size:14px;line-height:1.75}
.check-item svg{width:17px;height:17px;flex-shrink:0;margin-top:3px}
.check-item.key{background:#edf3ff;border:1px solid #d2e0f9;color:#31558f}
.check-item.key svg{color:#2458e6}
.check-item.warn{background:#fff8ec;border:1px solid #f0dcb8;color:#7d5a24}
.check-item.warn svg{color:#b8791f}
.check-item.info{background:#f4f7fb;border:1px solid #e2e9f2;color:#536886}
.check-item.info svg{color:#6b87ae}
.qr-box{text-align:center;padding:10px}
.qr-box img{width:230px;height:230px;border:1px solid #e4e9f1;border-radius:8px;background:#fff;image-rendering:pixelated}
.qr-box p{font-family:ui-monospace,monospace;font-size:13px;color:#41618a;margin:14px 0 0;word-break:break-all}

/* ---------------------------------------------------------- 抽屉 / 表单 */
.sheet-backdrop{position:fixed;inset:0;background:#0d1e35a8;z-index:60;display:flex;justify-content:flex-end;animation:fadein .18s}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.sheet{width:min(590px,100vw);max-width:590px;height:100dvh;overflow-y:auto;background:#fff;box-shadow:-8px 0 34px #0a1c3340;animation:slidein .22s ease-out;display:flex;flex-direction:column}
@keyframes slidein{from{transform:translateX(28px);opacity:.6}to{transform:translateX(0);opacity:1}}
.sheet-header{padding:26px 28px 18px;border-bottom:1px solid #e1e7f0;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.sheet-header h2{font-size:22px;font-weight:650;margin:0;line-height:1.4}
.sheet-header p{font-size:13.5px;color:#6c809a;margin:6px 0 0}
.sheet-body{padding:20px 28px;flex:1}
.sheet-footer{padding:16px 28px;border-top:1px solid #e1e7f0;display:flex;gap:9px;justify-content:space-between;align-items:center;background:#fafcff}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field.full{grid-column:1/-1}
.field label{font-size:13.5px;font-weight:600;color:#3f5674}
.field label .req{color:#d2453b;margin-left:2px}
.field input,.field select,.field textarea{width:100%;background:#fff;border:1px solid var(--input);border-radius:7px;padding:8px 11px;font-size:14px;color:var(--ink);line-height:1.55;min-height:39px}
.field textarea{min-height:74px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--ring);outline-offset:1px;border-color:var(--primary)}
.field .hint{font-size:12px;color:#7c8ca1}
.form-section{border-top:1px solid #e5eaf2;padding-top:18px;margin-top:22px}
.form-section h3{font-size:15px;font-weight:650;color:#2b4b76;margin:0 0 14px;display:flex;align-items:center;gap:7px}
.form-error{border:1px solid #dfb3a2;background:#fff3ef;border-radius:7px;padding:11px 13px;color:#983d26;font-size:14px;margin-bottom:14px}
.field-row-note{background:#edf3ff;border-radius:7px;padding:12px 14px;font-size:13px;color:#41608c;line-height:1.7;margin-bottom:16px}

/* ---------------------------------------------------------- 对话框 / Toast */
.dialog-backdrop{position:fixed;inset:0;background:#0d1e35a8;z-index:70;display:grid;place-items:center;padding:18px;animation:fadein .18s}
.dialog{background:#fff;border-radius:11px;box-shadow:0 20px 55px #0a234633;padding:26px;width:min(460px,100%);max-height:90dvh;overflow-y:auto}
.dialog h2{font-size:20px;font-weight:650;margin:0 0 8px;color:#183b6e}
.dialog p{color:#5e7290;font-size:14px;line-height:1.8;margin:0 0 18px}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}
.notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:100;display:flex;align-items:center;gap:10px;border-radius:9px;padding:11px 13px 11px 17px;background:#132844;color:#fff;box-shadow:0 8px 28px #12223a30;max-width:calc(100vw - 30px);font-size:14px;animation:toastin .22s}
@keyframes toastin{from{transform:translate(-50%,12px);opacity:0}to{transform:translate(-50%,0);opacity:1}}
.notice svg{width:17px;height:17px;flex-shrink:0;color:#8ee0b0}
.notice.error svg{color:#ffb3a8}
.notice button{margin-left:8px;color:#fff;background:none;border:none;font-size:18px;line-height:1;padding:2px 4px}
.error-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff1ed;border:1px solid #e6b9a5;padding:13px 17px;border-radius:8px;margin-bottom:20px;color:#974024;font-size:14px}

/* ---------------------------------------------------------- 响应式 */
@media(max-width:1100px){
  .metrics>div{padding:15px 12px;gap:7px}.metrics svg{display:none}.metrics span{font-size:13px}
  .intro-row{gap:24px}.intro-row h2{font-size:27px}.footer{flex-wrap:wrap}
  .grid-3{grid-template-columns:1fr 1fr}
}
@media(max-width:880px){
  .masthead{padding:20px}.masthead h1{font-size:20px}.masthead h1 span{display:block;margin:1px 0 0;font-size:16px}
  .brand{gap:12px}.brand-mark{width:43px;height:51px;font-size:17px}
  .workspace{padding:0 20px}.intro-row{align-items:flex-start;flex-direction:column;gap:18px}
  .intro-row h2{font-size:25px}.course-progress{min-width:0;width:100%;max-width:none}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metrics>div:nth-child(3){border-left:0;border-top:1px solid var(--border)}
  .metrics>div:nth-child(4){border-top:1px solid var(--border)}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .inventory-layout{grid-template-columns:1fr}
  .group-nav{position:static;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
  .group-nav h4,.campus-label{width:100%;margin:2px 0 0;padding:4px 0}
  .group-nav-item{width:auto;flex:0 1 auto}
  .main-tab-list{gap:22px}.main-tab-list>[role=tab]{font-size:14px}
  .form-grid{grid-template-columns:1fr 1fr}
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .masthead{padding:17px 16px;gap:8px}.brand{gap:10px}
  .masthead h1{font-size:19px}.masthead .eyebrow{font-size:9px;letter-spacing:.05em}
  .header-actions .edition,.sync-state{display:none}
  .workspace{padding:0 15px}.course-note{font-size:13px}
  .intro-row{display:block;padding:23px 0}.intro-row h2{font-size:25px}
  .course-progress{margin-top:18px}
  .metrics>div{padding:11px 12px;gap:7px}.metrics strong{font-size:22px}.metrics span{font-size:13px}
  .main-tab-list{gap:18px;margin-bottom:16px}.main-tab-list>[role=tab]{padding-bottom:12px;font-size:14px}
  .main-tab-list>[role=tab] svg{display:none}
  .panel{padding:18px 14px}.panel-heading h2{font-size:21px}
  .filters input{max-width:none;width:100%;flex-basis:100%}.filters select{flex:1;min-width:120px}
  .filters>.count{width:100%;margin-left:0}
  .stat-grid{grid-template-columns:1fr 1fr}
  .form-grid{grid-template-columns:1fr}
  .sheet-header,.sheet-body,.sheet-footer{padding-left:18px;padding-right:18px}
  .footer>span{width:100%}
  .network-hero{padding:20px}.network-hero .hero-side{text-align:left}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}


/* ---------------------------------------------------------------- 登录与账号 */
.auth-wrap{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;
  padding:24px;overflow:auto;background:linear-gradient(135deg,#101f35 0%,#1b3763 52%,#2458e6 100%)}
.auth-card{width:100%;max-width:430px;background:#fff;border-radius:16px;padding:34px 36px 30px;
  box-shadow:0 26px 80px rgba(6,18,40,.42);border:1px solid #dce3ee}
.auth-brand{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.auth-brand .brand-mark{width:44px;height:44px;font-size:15px;flex:none}
.auth-brand .eyebrow{font-size:10px;letter-spacing:.14em;color:#7a8ba3;text-transform:uppercase}
.auth-brand h1{font-size:19px;margin:3px 0 0;color:#16283f;font-weight:700;letter-spacing:.02em}
.auth-sub{margin:0 0 24px;padding-left:58px;font-size:12px;color:#8191a9}
.auth-tabs{display:flex;gap:0;border-bottom:2px solid #e5ebf4;margin-bottom:22px}
.auth-tabs button{flex:1;background:none;border:0;padding:11px 0 12px;font-size:14px;font-weight:600;
  color:#8494aa;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;font-family:inherit}
.auth-tabs button.active{color:#2458e6;border-bottom-color:#2458e6}
.auth-tabs button:hover{color:#2458e6}
.auth-form{display:flex;flex-direction:column;gap:7px}
.auth-form label{font-size:12px;font-weight:650;color:#42546e;margin-top:8px}
.auth-form input,.auth-form textarea{width:100%;box-sizing:border-box;padding:10px 12px;font-size:14px;
  font-family:inherit;color:#1b2c44;background:#fbfcfe;border:1px solid #d5deeb;border-radius:8px;outline:none}
.auth-form input:focus,.auth-form textarea:focus{border-color:#2458e6;box-shadow:0 0 0 3px rgba(36,88,230,.12)}
.auth-form .btn-block{width:100%;margin-top:20px;padding:11px 16px;font-size:14px;justify-content:center}
.auth-error{display:none;margin-top:12px;padding:9px 12px;border-radius:7px;font-size:13px;
  background:#fdecec;color:#b4232b;border:1px solid #f6c9c9}
.auth-hint{margin:18px 0 0;padding-top:14px;border-top:1px solid #eef2f8;font-size:12px;
  line-height:1.7;color:#7a8ba3}
.force-note{display:flex;gap:10px;align-items:flex-start;margin:0 0 18px;padding:12px 14px;
  background:#fff7e9;border:1px solid #f3d9a8;border-radius:9px;font-size:13px;
  line-height:1.7;color:#8a5a12}
.force-note svg{flex:none;margin-top:2px;color:#c07d16}
.force-note b{color:#a4530a}
.user-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:20px;
  background:rgba(255,255,255,.14);color:#fff;font-size:12px;white-space:nowrap}

/* =============================================================
   移动端适配（手机 / 平板小屏）—— 2026-11 追加
   目标：390/430/768 三个视口无整页横向滚动，触控目标≥40px，
   表格可横滑且首列可见（sticky），iOS 聚焦不放大页面。
   ============================================================= */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
*{-webkit-tap-highlight-color:transparent}

/* ---------- ① 通用：修复 min-width:auto 造成的撑宽 ---------- */
.grid-2>*,.grid-3>*,.stack>*,.inventory-layout>*,.panel>*,.card>*,
.metrics>div,.stat-grid>*,.addr-item>*,.form-grid>*,.sheet-body>*{min-width:0}
.source-item{flex-wrap:wrap;row-gap:6px}
.source-item .s-name{min-width:0;max-width:100%}
.source-item .s-meta{margin-left:0;white-space:normal}
.timeline li{flex-wrap:wrap;row-gap:4px}
.timeline .t-main{flex:1 1 100%;order:2}
.timeline time{order:1;margin-left:auto}
.dialog h2,.dialog p,.panel-heading h2,.panel-heading p,.card h3,.card .sub,.empty p,
.guide-hero p,.check-item,.addr-item .a-meta,.bar-row .bar-label{overflow-wrap:anywhere}

/* ---------- ② ≤900px：顶栏换行、容器内边距 ---------- */
@media (max-width:900px){
  .masthead{flex-wrap:wrap;align-items:flex-start;gap:12px;
    padding:16px max(16px,calc((100vw - 1320px)/2))}
  .brand{flex:1 1 100%;min-width:0;gap:12px}
  .masthead h1{white-space:normal;font-size:20px;letter-spacing:.02em}
  .masthead h1 span{display:block;margin:1px 0 0;font-size:14px}
  .header-actions{width:100%;flex-wrap:wrap;justify-content:flex-start;gap:7px}
  .header-actions .btn,.header-actions .user-chip{flex:0 0 auto}
  .sync-state{margin-right:auto}
  .workspace{padding:0 15px;max-width:100%}
  .panel{padding:20px 16px}
  .panel-heading{gap:12px}
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .network-hero{padding:20px 18px}
  .network-hero .current-url{display:block;width:100%;font-size:14px;margin-top:10px}
  .addr-item .a-main{min-width:0;flex:1 1 100%}
  .auth-wrap{padding:16px}
  .auth-card{padding:26px 20px;border-radius:14px}
  .auth-sub{padding-left:0}
}

/* ---------- ③ ≤760px：表格可横滑、首列吸附 ---------- */
@media (max-width:760px){
  .table-wrap{margin-left:-4px;margin-right:-4px;padding:0 4px;border:1px solid #e6ecf5;
    border-radius:10px;background:#fff;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .table-wrap::-webkit-scrollbar{height:6px}
  .table-wrap::-webkit-scrollbar-thumb{background:#c8d5e6;border-radius:99px}
  .data-table{font-size:13px}
  .data-table th{font-size:12px;padding:9px 8px}
  .data-table td{padding:9px 8px;font-size:13px}
  .data-table th:first-child,.data-table td:first-child{position:sticky;left:0;z-index:2;
    background:#fff;box-shadow:1px 0 0 #eef2f7}
  .data-table th:first-child{background:#f7f9fd}
  .data-table tbody tr:hover td:first-child{background:#f7faff}
  .cell-sub{font-size:11.5px}
  .row-actions{gap:6px}
  .row-actions .btn-sm{padding:5px 8px;font-size:12.5px}
  .guide-table{font-size:13px}
  .guide-table th,.guide-table td{padding:9px 10px}
  .guide-table td:first-child{white-space:normal}
  .doc-block{overflow-x:auto}
  .qr-box img{width:min(230px,62vw);height:auto;aspect-ratio:1/1}
}

/* ---------- ④ ≤620px：手机主档 ---------- */
@media (max-width:620px){
  body{font-size:15px;line-height:1.62}
  .masthead{padding:13px 13px 12px;gap:10px}
  .brand{gap:10px;align-items:center}
  .brand-mark{width:38px;height:42px;font-size:15px;border-radius:5px}
  .masthead .eyebrow{font-size:9px;letter-spacing:.05em}
  .masthead h1{font-size:17.5px;margin-top:2px}
  .masthead h1 span{font-size:12.5px;margin-left:0}
  .header-actions{gap:6px;margin-top:1px}
  .header-actions .btn{font-size:12.5px;padding:6px 9px;min-height:36px;gap:5px;border-radius:6px}
  .header-actions .btn svg{width:14px;height:14px}
  .header-actions .icon-btn{width:34px;height:34px}
  .header-actions .user-chip{font-size:12px;padding:5px 9px}
  .sync-state,.edition{display:none}

  .workspace{padding:0 12px}
  .course-note{font-size:12.5px;padding:12px 0;gap:7px;line-height:1.7}
  .course-note code{font-size:12px}
  .intro-row{display:block;padding:18px 0 16px}
  .intro-row h2{font-size:22px;line-height:1.35;margin:5px 0 7px}
  .intro-row p{font-size:13px;margin-top:5px}
  .course-progress{margin-top:14px;min-width:0;width:100%;max-width:none}
  .course-progress>div:first-child{gap:10px;margin-bottom:7px}
  .course-progress strong{font-size:26px}
  .course-progress strong small{font-size:14px}
  .course-progress span{font-size:12.5px}

  .metrics{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:18px;border-radius:8px}
  .metrics>div{padding:11px 12px;gap:6px;flex-wrap:wrap}
  .metrics>div+div{border-left:0}
  .metrics>div:nth-child(even){border-left:1px solid var(--border)}
  .metrics>div:nth-child(n+3){border-top:1px solid var(--border)}
  .metrics span{font-size:12px;white-space:normal}
  .metrics strong{font-size:19px;margin-left:auto}
  .metrics small{font-size:11.5px;margin-left:3px}

  /* 标签栏吸顶，横向可滑 */
  .main-tab-list{position:sticky;top:0;z-index:20;gap:18px;margin-bottom:14px;padding-top:1px;
    background:var(--background);box-shadow:0 6px 10px -8px #1b355a2e}
  .main-tab-list>[role=tab]{font-size:13.5px;padding:10px 2px 12px;gap:5px}
  .main-tab-list::-webkit-scrollbar{display:none}
  .main-tab-list{scrollbar-width:none}

  .panel{padding:16px 13px;border-radius:9px}
  .panel-heading{margin-bottom:14px;gap:8px;align-items:flex-start}
  .panel-heading h2{font-size:18.5px;line-height:1.4}
  .panel-heading h3{font-size:16.5px}
  .panel-heading p{font-size:12.5px;margin-top:4px}
  .inline-actions{gap:7px;width:100%}
  .inline-actions .btn{flex:1 1 auto}
  .card{padding:16px 13px}
  .card h3{font-size:16px}
  .card .sub{font-size:12.5px;margin-bottom:12px}
  .empty{min-height:150px;padding:22px 16px}

  .filters{gap:8px;padding:12px 0}
  .filters input,.filters select{min-height:40px;font-size:16px}
  .filters input{flex:1 1 100%;min-width:0;max-width:none;width:100%}
  .filters select{flex:1 1 auto;min-width:0}
  .filters>.count{width:100%;margin-left:0;font-size:12.5px}

  /* iOS 聚焦不放大：全部输入类 ≥16px */
  .field input,.field select,.field textarea,.filters input,.filters select,
  .auth-form input,.auth-form textarea{font-size:16px}
  .field label{font-size:12.5px}
  .field input,.field select,.field textarea{min-height:42px;padding:9px 11px}
  .btn{min-height:40px;padding:9px 14px;font-size:14px}
  .btn-sm{min-height:34px;font-size:13px;padding:6px 10px}
  .icon-btn{width:38px;height:38px}

  .bar-row{grid-template-columns:84px 1fr 46px;gap:8px;font-size:12px;margin:9px 0}
  .bar-row .bar-value{font-size:12px}
  .bar-track{height:8px}
  .stat-grid{gap:9px}
  .stat-card{padding:11px 12px}
  .stat-card strong{font-size:21px}
  .stat-card span{font-size:11.5px}
  .timeline li{padding:11px 0;font-size:13px}
  .timeline time{font-size:11.5px}

  /* 元件台账分组导航：小胶囊 + 可横滑 */
  .group-nav{padding:11px;gap:6px}
  .group-nav h4,.campus-label{font-size:11px;padding:4px 0}
  .group-nav-item{font-size:12.5px;padding:6px 10px;border-radius:99px;background:#f2f6fd}
  .group-nav-item .g-count{font-size:11px}
  .group-toolbar .g-title{font-size:17px}

  .sheet{width:100%;max-width:none;border-radius:0}
  .sheet-header,.sheet-body,.sheet-footer{padding-left:16px;padding-right:16px}
  .sheet-header{padding-top:18px;padding-bottom:13px}
  .sheet-header h2{font-size:19px}
  .sheet-body{padding-top:16px;padding-bottom:24px}
  .sheet-footer{position:sticky;bottom:0;flex-wrap:wrap;gap:8px;
    padding-bottom:calc(13px + env(safe-area-inset-bottom))}
  .sheet-footer .btn{flex:1 1 auto}
  .form-grid{gap:12px}

  .dialog{padding:19px;border-radius:12px;max-height:86dvh}
  .dialog h2{font-size:18px}
  .dialog p{font-size:13.5px;margin-bottom:14px}
  .dialog-actions{flex-wrap:wrap;gap:8px}
  .dialog-actions .btn{flex:1 1 auto}

  .notice{left:12px;right:12px;bottom:calc(14px + env(safe-area-inset-bottom));
    transform:none;max-width:none;animation:none}

  .auth-wrap{padding:12px;align-items:flex-start}
  .auth-card{padding:22px 18px;border-radius:14px;margin:auto 0}
  .auth-brand{gap:11px}
  .auth-brand .brand-mark{width:40px;height:40px;font-size:14px}
  .auth-brand h1{font-size:17.5px}
  .auth-sub{padding-left:0;font-size:11.5px;margin-bottom:18px}
  .auth-tabs{margin-bottom:18px}
  .auth-form label{font-size:11.5px}
  .auth-form input,.auth-form textarea{min-height:44px}
  .auth-form .btn-block{margin-top:16px;padding:12px 16px;font-size:15px}

  .network-hero{padding:17px 15px;border-radius:10px}
  .network-hero h2{font-size:19px}
  .network-hero p{font-size:13px}
  .network-hero .current-url{font-size:13px;padding:9px 11px}
  .check-item{padding:11px 12px;font-size:13px}
  .addr-item{padding:12px 13px;gap:10px}
  .addr-item .a-url{font-size:14px}
  .addr-item .a-actions{width:100%}
  .addr-item .a-actions .btn{flex:1 1 auto}

  .footer{margin:24px 0 18px;gap:8px;font-size:11.5px}
  .footer>span{width:100%}
  .guide-hero{padding:14px 15px;gap:10px}
  .guide-hero h3{font-size:15px}
  .guide-hero p{font-size:13px}
}

/* 使用说明里的宽表格在小屏内滚动，不影响整页宽度 */
.doc-block{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* ================================================================
   移动端适配 v2（2026-11-23）
   目标：顶栏动作稳定换行、表格在手机上改为卡片式、滚动区加提示
   ================================================================ */

/* 中屏：版本标签不占行 */
@media (max-width:900px){
  .header-actions .edition{display:none}
}

/* —— 平板竖屏（621–760px）：表格保留原样，但加左右渐隐提示可横滑 —— */
@media (max-width:760px) and (min-width:621px){
  .table-wrap{
    background-image:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
      linear-gradient(to left, #fff 30%, rgba(255,255,255,0)),
      linear-gradient(to right, rgba(31,64,120,.16), rgba(31,64,120,0)),
      linear-gradient(to left, rgba(31,64,120,.16), rgba(31,64,120,0));
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-repeat: no-repeat;
    background-size: 34px 100%, 34px 100%, 10px 100%, 10px 100%;
    background-attachment: local, local, scroll, scroll;
  }
}

@media (max-width:620px){
  /* —— 顶栏动作区：3 列网格，两行稳定，不再随滚动条乱跳 —— */
  .header-actions{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:6px;
    width:100%;
  }
  .header-actions .btn,
  .header-actions .user-chip{
    width:100%;
    justify-content:center;
    padding:9px 6px;
    font-size:12.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .header-actions .user-chip > span{overflow:hidden;text-overflow:ellipsis}
  .header-actions .btn svg,
  .header-actions .user-chip svg{flex:none}
  .header-actions .btn[title="修改密码"]::after{content:"修改密码";margin-left:5px}

  /* —— 标签栏：右侧渐隐，提示还能左滑 —— */
  .main-tab-list{
    -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 20px), transparent);
    mask-image:linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }

  /* —— 表格 → 卡片式列表 —— */
  .table-wrap{
    border:0;
    border-radius:0;
    background:none;
    overflow:visible;
    margin:0;
    padding:0;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td{display:block;width:100%}
  .data-table thead{display:none}
  .data-table tr{
    border:1px solid #e6ecf5;
    border-radius:10px;
    background:#fff;
    padding:12px 13px 10px;
    margin-bottom:10px;
    box-shadow:0 1px 2px rgba(15,35,70,.04);
  }
  .data-table tr:last-child{margin-bottom:0}
  .data-table tr:hover{background:#fff}
  .data-table td{
    border:0;
    padding:3px 0;
    font-size:14px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:baseline;
    column-gap:12px;
    row-gap:2px;
    text-align:right;
  }
  .data-table td::before{
    content:attr(data-label);
    grid-column:1;
    grid-row:1;
    font-size:12px;
    color:#8496ad;
    font-weight:400;
    text-align:left;
    letter-spacing:.02em;
  }
  .data-table td > *{grid-column:2;min-width:0;justify-self:end;max-width:100%}
  .data-table td > .cell-sub{grid-row:2;font-size:12.5px;color:#8496ad;text-align:right;margin-top:0}
  .data-table td[data-primary]{
    display:block;
    text-align:left;
    font-size:15.5px;
    font-weight:600;
    padding:0 0 4px;
    line-height:1.45;
  }
  .data-table td[data-primary]::before{content:none}
  .data-table td[data-primary] .cell-sub{display:block;white-space:normal}
  .data-table td .row-actions{justify-content:flex-end;gap:8px;justify-self:end}
  .data-table td[data-label=""]::before{content:none}
  .data-table th:first-child,
  .data-table td:first-child{position:static;box-shadow:none;background:none}
  .empty{padding:26px 14px}

  /* 说明文档里的表格仍保持「表」形态，但收紧内边距 */
  .guide-table td,.guide-table th{padding:9px 10px;font-size:13.5px}
}

/* ---------------------------------------------------------------- 元件实物照片 / 灯箱 */
.item-media{margin:0 0 16px;padding:12px 14px;border:1px solid #e3eaf4;border-radius:12px;background:linear-gradient(180deg,#f7faff,#fff)}
.item-media-head{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:650;color:#33455e}
.item-media-head em{margin-left:auto;font-style:normal;font-weight:400;font-size:12px;color:#8a97a8}
.item-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px;margin-top:10px}
.item-media-thumb{padding:0;border:1px solid #e2e9f3;border-radius:10px;background:#fff;overflow:hidden;cursor:zoom-in;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;transition:box-shadow .15s,transform .15s}
.item-media-thumb:hover{box-shadow:0 6px 18px rgba(23,52,94,.14);transform:translateY(-1px)}
.item-media-thumb img{width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.media-badge{display:inline-flex;align-items:center;gap:3px;margin-left:6px;padding:1px 6px;border-radius:999px;background:#eef4ff;color:#2f5bb7;font-size:11.5px;font-weight:650;vertical-align:middle}
.lightbox{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(8,16,29,.88);cursor:zoom-out;animation:lbFade .12s ease-out}
.lightbox img{max-width:calc(100vw - 48px);max-height:calc(100vh - 48px);border-radius:12px;background:#fff;box-shadow:0 24px 60px rgba(0,0,0,.5);cursor:default}
.lightbox-close{position:fixed;top:16px;right:16px;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.lightbox-close:hover{background:rgba(255,255,255,.32)}
body.lightbox-open{overflow:hidden}
@keyframes lbFade{from{opacity:0}to{opacity:1}}
@media (max-width:620px){.item-media{padding:10px 11px;border-radius:10px}.item-media-head{font-size:12.5px}.item-media-grid{grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:8px}.lightbox{padding:12px}.lightbox img{max-width:calc(100vw - 24px);max-height:calc(100vh - 24px)}}

/* 审批制：徽标 / 行内下拉 / 审核按钮 */
.review-badge{
  display:inline-block;
  padding:2px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  line-height:1.5;
  white-space:nowrap;
  border:1px solid transparent;
}
.review-badge.rv-pending{ background:#fff5e6; color:#96620a; border-color:#f1d7ac; }
.review-badge.rv-approved{ background:#e8f6ee; color:#1c7a45; border-color:#bfe3cf; }
.review-badge.rv-rejected{ background:#fdeaea; color:#a32626; border-color:#f4c7c7; }
.mini-select{
  font-size:12.5px;
  padding:4px 6px;
  border:1px solid #d7e0ec;
  border-radius:8px;
  background:#fff;
  color:#1d2a3a;
  max-width:132px;
}
.btn-ok{ background:#e8f6ee; color:#1c7a45; border-color:#bfe3cf; }
.btn-warn{ background:#fdeaea; color:#a32626; border-color:#f4c7c7; }
.row-actions{ flex-wrap:wrap; }
@media (max-width:620px){
  .mini-select{ max-width:none; }
}







/* =============================================================
   登录页：动态液态玻璃（liquid glass）—— 2026-11 追加
   ============================================================= */
#authRoot .auth-wrap{
  background:
    radial-gradient(24vmax 24vmax at 43% 35%, rgba(200,226,255,.62), transparent 70%),
    radial-gradient(30vmax 30vmax at 58% 64%, rgba(150,124,255,.52), transparent 72%),
    radial-gradient(40vmax 40vmax at 50% 48%, rgba(72,142,255,.66), transparent 68%),
    radial-gradient(30vmax 30vmax at 52% 30%, rgba(140,96,255,.48), transparent 70%),
    radial-gradient(56vmax 56vmax at 8% 4%, rgba(46,116,255,.66), transparent 60%),
    radial-gradient(50vmax 50vmax at 96% 2%, rgba(132,80,255,.52), transparent 58%),
    radial-gradient(64vmax 64vmax at 84% 100%, rgba(14,190,232,.42), transparent 62%),
    radial-gradient(46vmax 46vmax at 4% 98%, rgba(24,92,224,.44), transparent 64%),
    linear-gradient(135deg,#050b16 0%,#0a1a34 44%,#122a55 100%);
  overflow:hidden;
}
#authRoot .auth-wrap::before,
#authRoot .auth-wrap::after{
  content:"";position:absolute;border-radius:50%;pointer-events:none;z-index:0;
  will-change:transform;
}
#authRoot .auth-wrap::before{
  width:88vmax;height:88vmax;left:-28vmax;top:-32vmax;
  background:radial-gradient(circle at 50% 50%, rgba(60,138,255,.72), rgba(60,138,255,.24) 44%, transparent 70%);
  animation:authBlobA 24s ease-in-out infinite alternate;
}
#authRoot .auth-wrap::after{
  width:78vmax;height:78vmax;right:-30vmax;bottom:-36vmax;
  background:radial-gradient(circle at 50% 50%, rgba(138,96,255,.60), rgba(0,198,238,.26) 46%, transparent 72%);
  animation:authBlobB 31s ease-in-out infinite alternate;
}
@keyframes authBlobA{
  0%{transform:translate3d(-5%,-4%,0) scale(1)}
  50%{transform:translate3d(9%,7%,0) scale(1.14)}
  100%{transform:translate3d(3%,11%,0) scale(1.05)}
}
@keyframes authBlobB{
  0%{transform:translate3d(4%,5%,0) scale(1.08)}
  50%{transform:translate3d(-8%,-6%,0) scale(.94)}
  100%{transform:translate3d(-4%,-10%,0) scale(1.10)}
}
}
@keyframes authFloat{
  0%,100%{transform:translate3d(0,0,0)}
  50%{transform:translate3d(0,-7px,0)}
}

#authRoot .auth-card{
  position:relative;z-index:2;background-color:transparent;
  max-width:438px;border-radius:26px;padding:36px 38px 32px;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.22'/></svg>"),
    linear-gradient(156deg, rgba(255,255,255,.70) 0%, rgba(255,255,255,.50) 44%, rgba(240,247,255,.44) 100%);
  background-size:160px 160px, 100% 100%;
  background-blend-mode:soft-light, normal;
  -webkit-backdrop-filter:blur(32px) saturate(210%);
  backdrop-filter:blur(32px) saturate(210%);
  border:1px solid rgba(255,255,255,.62);
  box-shadow:
    0 36px 96px rgba(2,8,22,.62),
    0 2px 8px rgba(2,8,22,.24),
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(255,255,255,.38),
    inset 0 0 0 1px rgba(255,255,255,.20),
    inset 0 -40px 80px -40px rgba(120,170,255,.35),
    inset 0 0 70px rgba(255,255,255,.30);
  overflow:hidden;
  animation:authFloat 14s ease-in-out infinite;
}
#authRoot .auth-card::after{
  content:"";position:absolute;left:-34%;top:-64%;width:116%;height:116%;border-radius:50%;
  pointer-events:none;z-index:-1;
  background:radial-gradient(circle at 50% 50%, rgba(96,156,255,.26), transparent 60%);
}

#authRoot .auth-brand .eyebrow{color:#4f6288}
#authRoot .auth-brand h1{color:#08182c}
#authRoot .auth-sub{color:#3d5069}
#authRoot .auth-tabs{border-bottom-color:rgba(110,136,175,.32)}
#authRoot .auth-tabs button{color:#5d7190}
#authRoot .auth-tabs button.active{color:#1a4cd6;border-bottom-color:#1a4cd6}
#authRoot .auth-tabs button:hover{color:#1a4cd6}
#authRoot .auth-form label{color:#24354d}
#authRoot .auth-form input,#authRoot .auth-form textarea{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.95);
  box-shadow:inset 0 1px 2px rgba(12,28,52,.10), 0 1px 0 rgba(255,255,255,.78);
  color:#10203a;
}
#authRoot .auth-form input::placeholder,#authRoot .auth-form textarea::placeholder{color:#7b8ca5}
#authRoot .auth-form input:focus,#authRoot .auth-form textarea:focus{
  background:rgba(255,255,255,.95);
  border-color:rgba(44,102,230,.9);
  box-shadow:0 0 0 3px rgba(44,102,230,.22), inset 0 1px 2px rgba(12,28,52,.06);
}
#authRoot .auth-form .btn-block{
  background:linear-gradient(180deg,#2f6bf0 0%,#1a4ad4 100%);
  box-shadow:0 12px 26px rgba(20,60,170,.40), inset 0 1px 0 rgba(255,255,255,.36);
  border:1px solid rgba(255,255,255,.16);
}
#authRoot .auth-form .btn-block:hover{background:linear-gradient(180deg,#3a79fb 0%,#2354e2 100%)}
#authRoot .auth-hint{border-top-color:rgba(110,136,175,.24);color:#37485f}
#authRoot .force-note{background:rgba(255,246,229,.86);border-color:rgba(226,190,126,.88)}
#authRoot .auth-error{background:rgba(253,236,236,.94);border-color:rgba(246,201,201,.96)}

@media(max-width:760px){
  #authRoot .auth-card{max-width:none;width:100%;border-radius:24px;padding:30px 26px 28px}
}
@media(max-width:620px){
  #authRoot .auth-card{border-radius:22px;padding:26px 20px 24px;
    -webkit-backdrop-filter:blur(24px) saturate(200%);backdrop-filter:blur(22px) saturate(190%)}
  #authRoot .auth-wrap::before{width:128vmax;height:128vmax;left:-52vmax;top:-44vmax}
  #authRoot .auth-wrap::after{width:118vmax;height:118vmax;right:-48vmax;bottom:-52vmax}
}
@media(prefers-reduced-motion:reduce){
  #authRoot .auth-wrap::before,#authRoot .auth-wrap::after,
  #authRoot .auth-card{animation:none}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  #authRoot .auth-card{background-image:linear-gradient(158deg,rgba(255,255,255,.95),rgba(247,250,255,.93))}
}

/* =============================================================
   标签切换：滚动条占位 + 过渡动画
   ============================================================= */
/* 让滚动条始终占位，切换标签时页面高度变化不会再让内容左右跳动 */
html{background:var(--background);scrollbar-gutter:stable}
/* 标签下划线常驻并用 transform 过渡，避免出现/消失时的闪跳 */
.main-tab-list>[role=tab]{transition:color .18s ease}
.main-tab-list>[role=tab]::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:#2458e6;
  border-radius:3px 3px 0 0;opacity:0;transform:scaleX(.35);transform-origin:center;
  transition:opacity .2s ease,transform .22s cubic-bezier(.22,.61,.36,1);
}
.main-tab-list>[role=tab][aria-selected=true]::after{opacity:1;transform:scaleX(1)}
/* 内容切换淡入上移 */
@keyframes viewIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
#view.view-enter{animation:viewIn .26s cubic-bezier(.22,.61,.36,1) both}
/* 标签栏内部整体淡入，让切换更连贯 */
@keyframes tabsIn{from{opacity:.55}to{opacity:1}}
#tabs.tabs-enter{animation:tabsIn .22s ease both}
@media (prefers-reduced-motion:reduce){
  #view.view-enter,#tabs.tabs-enter{animation:none}
  .main-tab-list>[role=tab]::after{transition:none}
}


/* =============================================================
   标签栏：选中态用柔和高亮胶囊（不再用下划线/横条）
   ============================================================= */
.main-tab-list{gap:8px;padding:0 2px}
.main-tab-list>[role=tab]{
  padding:9px 13px 12px;border-radius:10px;gap:7px;
  transition:background-color .22s ease,color .18s ease,box-shadow .22s ease;
}
.main-tab-list>[role=tab]::after{display:none}
.main-tab-list>[role=tab]:hover{color:#2458e6;background-color:rgba(36,88,230,.055)}
.main-tab-list>[role=tab][aria-selected=true]{
  color:#1b45c4;font-weight:600;
  background-image:linear-gradient(180deg,rgba(36,88,230,.15) 0%,rgba(36,88,230,.075) 100%);
  box-shadow:inset 0 0 0 1px rgba(36,88,230,.16),0 1px 3px rgba(22,58,150,.10);
}
.main-tab-list>[role=tab][aria-selected=true] svg{color:#1b45c4}
@media (max-width:1100px){.main-tab-list{gap:6px}.main-tab-list>[role=tab]{padding:8px 11px 11px}}
@media (max-width:620px){
  .main-tab-list{gap:4px;padding:0 1px}
  .main-tab-list>[role=tab]{padding:8px 9px 10px;font-size:13.5px}
}

@media (max-width:620px){
  .masthead{box-shadow:0 12px 26px -22px rgba(9,18,32,.8)}
}

/* 启动阶段：先别画主界面，避免"闪一下主界面又跳登录页" */
body.booting{background:#eef2f8}
body.booting .app-shell{visibility:hidden}

/* 型号 / 规格 分列后，规格列用略小的字，避免挤 */
.data-table td.spec-cell{font-size:13px;color:#54677f;line-height:1.45}
@media (max-width:1100px){.data-table td.spec-cell{font-size:12.5px}}

/* 采购明细（一批多个器件） */
.items-editor{margin:4px 0 16px;border:1px solid #e4ebf4;border-radius:12px;padding:12px;background:#fbfdff}
.items-title{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;font-weight:600;color:#24354d;margin-bottom:10px;flex-wrap:wrap}
.items-title .items-sum{font-weight:400;color:#5b6f8c}
.items-title strong{color:#1b45c4}
.items-row{position:relative;display:grid;grid-template-columns:repeat(12,1fr);gap:6px 8px;align-items:end}
.items-body .items-row{padding:10px 10px 8px;border:1px solid #e8eff8;border-radius:10px;background:#fff;margin-bottom:8px}
.items-row label{display:block;min-width:0}
.items-row label>span{display:block;font-size:11.5px;color:#8496ad;margin-bottom:3px}
.items-row input{font-size:13.5px;padding:7px 8px;border:1px solid #dfe7f2;border-radius:8px;background:#fff;width:100%;min-width:0}
.items-row input:focus{outline:none;border-color:#2458e6;box-shadow:0 0 0 3px rgba(36,88,230,.12)}
.it-model{grid-column:1/6}
.it-spec{grid-column:6/13}
.it-qty{grid-column:1/3}
.it-unit{grid-column:3/5}
.it-price{grid-column:5/8}
.it-sub{grid-column:8/11}
.it-sub>span{display:block;font-size:11.5px;color:#8496ad;margin-bottom:3px}
.items-sub{font-size:14px;color:#1b45c4;font-variant-numeric:tabular-nums}
.it-del{grid-column:11/13;justify-self:end;align-self:end}
.items-actions{display:flex;align-items:center;gap:10px;margin-top:2px;flex-wrap:wrap}
.items-actions .hint{font-size:12px;color:#7b8aa1}
@media (max-width:760px){
  .items-editor{padding:10px}
  .it-model{grid-column:1/13}
  .it-spec{grid-column:1/13}
  .it-qty{grid-column:1/4}
  .it-unit{grid-column:4/7}
  .it-price{grid-column:7/13}
  .it-sub{grid-column:1/8}
  .it-del{grid-column:8/13;justify-self:end}
}
/* ===== 成员在线状态 ===== */
.member-list .presence{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#8b9cb3;margin-left:2px;white-space:nowrap}
.member-list .presence.on{color:#12a150;font-weight:600}
.member-list .presence-dot{width:7px;height:7px;border-radius:50%;background:#c3cddb;display:inline-block}
.member-list .presence.on .presence-dot{background:#12a150;box-shadow:0 0 0 3px rgba(18,161,80,.16);animation:presencePulse 2.4s ease-in-out infinite}
@keyframes presencePulse{0%,100%{box-shadow:0 0 0 3px rgba(18,161,80,.16)}50%{box-shadow:0 0 0 5px rgba(18,161,80,.08)}}
@media (prefers-reduced-motion:reduce){.member-list .presence.on .presence-dot{animation:none}}
