/* ==========================================================================
   芸昱 · 羊绒产业链协同平台 —— 视觉规范 v2（在 app.css 之后加载，统一覆盖）
   色彩：墨蓝（品牌底色）· 企业蓝（操作色）· 羊绒金（品牌点缀，克制使用）
   ========================================================================== */
:root {
  --ink: #0B1730; --ink-2: #13254A; --ink-3: #1B3566;
  --gold: #C9A46A; --gold-2: #E9CF9A; --gold-3: #B8893E; --gold-50: #FBF6EC;
  --primary: #1F5BE0; --primary-600: #1748BA; --primary-50: #EEF3FE; --primary-100: #DBE5FD;
  --success: #12965B; --success-50: #EDFAF3; --warning: #D27A0B; --warning-50: #FFF8EB;
  --danger: #D93A3A; --danger-50: #FEF1F1; --purple: #6B4BD8; --cyan: #0B8BA8;
  --text: #0F1B33; --text-2: #34425A; --text-3: #55637A; --text-4: #66758E; --text-5: #A3AEC0;  /* 文字对比度：text-3 ≈ 6.1:1、text-4 ≈ 4.7:1（均达 WCAG AA）；text-5 仅用于装饰性线条/图标 */
  --line: #E1E6EE; --line-2: #ECF0F5; --bg: #F3F5F9; --panel: #FFFFFF; --hover: #F7F9FC;
  --side: #0B1730; --side-2: rgba(255,255,255,.06); --side-text: #93A1BC; --side-active: #FFFFFF;
  --radius: 10px; --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15,27,51,.04), 0 2px 8px rgba(15,27,51,.04);
  --shadow-md: 0 6px 20px rgba(15,27,51,.08);
  --shadow-lg: 0 20px 56px rgba(11,23,48,.24);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
body { line-height: 1.55; letter-spacing: .1px; }
::selection { background: #D6E2FD; }
* { scrollbar-width: thin; scrollbar-color: #C9D2E0 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD3E0; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #AEB9CB; background-clip: padding-box; }

/* ---------- 启动画面 ---------- */
.boot-splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: radial-gradient(900px 500px at 50% 30%, #13295A 0%, #0B1730 60%, #08112A 100%); color: #E7ECF6; }
.boot-splash img { filter: drop-shadow(0 10px 30px rgba(201,164,106,.35)); animation: bs-in .6s ease-out both; }
.boot-splash .bs-name { font-size: 15px; letter-spacing: 3px; color: #D7DFEE; animation: bs-in .6s .1s ease-out both; }
.boot-splash .bs-bar { width: 160px; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.boot-splash .bs-bar i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: bs-run 1.1s ease-in-out infinite; }
@keyframes bs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bs-run { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ---------- 标志组合 ---------- */
.logo-mark { display: block; flex: none; }
.logo-lockup { display: flex; align-items: center; gap: 12px; }
.logo-lockup .ll-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-lockup .ll-text b { font-size: 17px; letter-spacing: 3px; font-weight: 600; }
.logo-lockup .ll-text span { font-size: 12px; letter-spacing: 1.5px; opacity: .75; }
.logo-lockup.dark { color: #fff; }

/* ---------- 按钮与输入 ---------- */
.btn { height: 32px; border-radius: var(--radius-sm); border-color: #DCE2EB; font-weight: 450; }
.btn:hover { border-color: #C3CCDA; background: #F6F8FB; }
.btn-primary { background: linear-gradient(180deg, #2C68EC 0%, #1F5BE0 100%); border-color: #1D55D2; color: #fff;
  box-shadow: 0 1px 2px rgba(31,91,224,.28), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: linear-gradient(180deg, #2560E4 0%, #1A50CC 100%); border-color: #174BC0; }
.btn-success { background: linear-gradient(180deg, #17A566, #12965B); border-color: #10894F; box-shadow: 0 1px 2px rgba(18,150,91,.25); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #EEF2F7; }
.btn-lg { height: 42px; font-size: 14.5px; border-radius: 9px; }
.input, .select, .textarea { border-color: #DCE2EB; border-radius: var(--radius-sm); }
.input:hover, .select:hover, .textarea:hover { border-color: #C3CCDA; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,91,224,.12); }
.form-section { border-left-color: var(--gold); color: var(--ink); }
.switch input:checked + span { background: var(--primary); }

/* ---------- 外壳：侧边栏 ---------- */
.shell { grid-template-columns: 228px 1fr; }
.shell.collapsed { grid-template-columns: 64px 1fr; }
.side { background: linear-gradient(180deg, #0E1E40 0%, #0B1730 38%, #08122A 100%); position: relative; }
.side::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, rgba(201,164,106,.35), rgba(255,255,255,.03) 40%); pointer-events: none; }
.brand { height: 64px; padding: 0 16px; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: none; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.brand-logo svg { width: 34px; height: 34px; }
.brand-name { font-size: 14.5px; letter-spacing: 1px; color: #F3F6FB; }
.brand-sub { font-size: 11.5px; color: #8A98B4; margin-top: 1px; }
.nav { padding: 12px 10px 18px; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-group { margin-top: 4px; }
.nav-group-title { color: #C3CCDD; padding: 9px 10px; font-size: 13.5px; border-radius: 8px; }
.nav-group-title:hover { background: rgba(255,255,255,.05); }
.nav-group.open > .nav-group-title { color: #fff; }
.nav-group-title svg, .nav-single svg { width: 17px; height: 17px; color: #8FA0C2; }
.nav-group.open > .nav-group-title svg:first-child { color: var(--gold-2); }
.nav-item { height: 34px; padding-left: 39px; border-radius: 8px; color: #93A1BC; margin: 1px 0; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active, .nav-single.active { background: linear-gradient(90deg, rgba(201,164,106,.22) 0%, rgba(201,164,106,.05) 100%); color: #fff; font-weight: 500; }
.nav-item.active::before, .nav-single.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.nav-single { position: relative; height: 38px; color: #C3CCDD; }
.nav-single.active svg { color: var(--gold-2); }
.nav-badge { margin-left: auto; }
.side-foot { padding: 12px 16px; font-size: 11.5px; color: #6E7D9A; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 8px; }
.side-foot .sf-dot { width: 6px; height: 6px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,.15); flex: none; }

/* ---------- 外壳：顶栏、授权条、标签页 ---------- */
.topbar { height: 56px; padding: 0 16px 0 10px; gap: 10px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,27,51,.03); position: relative; z-index: 5; }
.topbar .tb-tenant { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 4px; margin-right: 4px; border-right: 1px solid var(--line-2); height: 28px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.topbar .tb-tenant .chip { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 10px; background: var(--gold-50); color: #8A6526; border: 1px solid #EBD9B6; }
.global-search { width: 340px; height: 36px; border-radius: 10px; background: #F3F5F9; border-color: transparent; }
.global-search:hover { border-color: #D5DCE7; background: #F7F9FC; }
.top-bell { width: 36px; height: 36px; border-radius: 10px; }
.top-bell svg { width: 18px; height: 18px; }
.user-chip { padding: 4px 10px 4px 4px; border-radius: 22px; }
.avatar { width: 32px; height: 32px; background: linear-gradient(135deg, #2A62E4, #13254A); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(201,164,106,.65); font-size: 12.5px; }
.lic-banner { padding: 7px 18px; font-size: 12.5px; background: linear-gradient(90deg, #EEF3FE, #F6F8FF); border-bottom-color: #DCE5FB; }
.lic-banner.warning { background: linear-gradient(90deg, #FFF7E8, #FFFBF2); border-bottom-color: #F6E2BA; }
.lic-banner.danger { background: linear-gradient(90deg, #FEEEEE, #FFF6F6); border-bottom-color: #F6CACA; }
.tabbar { height: 40px; padding: 0 12px; background: #fff; }
.tab { height: 32px; padding: 0 8px 0 14px; border-radius: 8px 8px 0 0; color: var(--text-3); }
.tab.active { color: var(--ink); background: var(--bg); border-color: var(--line); font-weight: 500; box-shadow: inset 0 2px 0 var(--primary); }
.page { padding: 18px 24px 36px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 19px; color: var(--ink); font-weight: 600; letter-spacing: .5px; }
.page-head .sub { font-size: 12.5px; }

/* ---------- 卡片、表格、指标 ---------- */
.card { border-radius: 12px; border: 1px solid #E6EBF2; box-shadow: var(--shadow); }
.card-head { padding: 13px 18px; border-bottom-color: var(--line-2); }
.card-head h3 { font-size: 14.5px; color: var(--ink); position: relative; padding-left: 11px; }
.card-head h3::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--primary), #6E95F2); }
.card-body { padding: 16px 18px; }
.toolbar { padding: 12px 18px; }
table.dt th { background: #F6F8FB; color: #5B6A83; font-weight: 500; height: 40px; border-bottom-color: var(--line); }
table.dt th, table.dt td { padding: 9px 12px; }
table.dt td { border-bottom-color: #EEF1F6; }
table.dt tbody tr:hover td { background: #F5F8FF; }
table.dt tfoot td { background: #F9FAFC; }
.summary-bar { background: #F9FAFC; }
.pager .btn.cur { background: var(--primary); border-color: var(--primary); }
.kpis { gap: 16px; margin-bottom: 16px; }
.kpi { border-radius: 12px; border: 1px solid #E6EBF2; box-shadow: var(--shadow); padding: 16px 18px 15px; }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #D7E1F4; }
.kpi .k-label { font-size: 12.5px; color: var(--text-3); }
.kpi .k-value { font-size: 24px; font-weight: 600; color: var(--ink); margin-top: 6px; letter-spacing: -.3px; }
.kpi .k-foot { margin-top: 4px; }
.kpi .k-icon { width: 38px; height: 38px; border-radius: 11px; right: 16px; top: 16px; }
.kpi::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(31,91,224,.0), transparent); transition: background .2s; }
.kpi.clickable:hover::after { background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.tag { border-radius: 5px; height: 21px; padding: 0 8px; }
.modal { border-radius: 14px; }
.modal-mask { background: rgba(11,23,48,.48); backdrop-filter: blur(2px); }
.dropdown { border-radius: 10px; box-shadow: 0 12px 32px rgba(11,23,48,.16); }
.toast { border-radius: 10px; }
.doc-head { border-radius: 12px; border: 1px solid #E6EBF2; }
.fn-bar i { background: linear-gradient(180deg, var(--gold), var(--gold-2)); }
.flow-node { border-radius: 12px; }
.flow-node:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(201,164,106,.18); }
.yc-total { background: linear-gradient(135deg, #F3F0FF, #EEF3FE); }
.rank li:nth-child(-n+3) .no { background: linear-gradient(135deg, var(--gold), var(--gold-3)); }

/* ---------- 驾驶舱横幅 ---------- */
.dash-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 28px; margin-bottom: 16px; color: #fff; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: radial-gradient(700px 260px at 90% -30%, rgba(201,164,106,.30), transparent 60%), radial-gradient(500px 300px at -10% 120%, rgba(47,107,236,.35), transparent 60%),
  linear-gradient(115deg, #0D1C3B 0%, #13295A 55%, #1A3A7A 100%); box-shadow: 0 10px 30px rgba(11,23,48,.18); }
.dash-hero .dh-art { position: absolute; right: -40px; top: -18px; width: 620px; opacity: .45; pointer-events: none; }
.dash-hero .dh-main { position: relative; z-index: 1; min-width: 260px; }
.dash-hero .dh-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: 2px; }
.dash-hero .dh-live { font-size: 11px; letter-spacing: 1px; font-weight: 500; padding: 2px 8px; border-radius: 10px; color: #1A1305; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.dash-hero .dh-sub { margin-top: 6px; color: #B9C6E0; font-size: 13px; }
.dash-hero .dh-stats { position: relative; z-index: 1; margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero .dh-stat { min-width: 118px; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); cursor: pointer; transition: background .15s, border-color .15s; }
.dash-hero .dh-stat:hover { background: rgba(255,255,255,.12); border-color: rgba(233,207,154,.45); }
.dash-hero .dh-stat span { display: block; font-size: 12px; color: #AFBEDA; }
.dash-hero .dh-stat b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.dash-hero .dh-stat b.warn { color: #FFC978; } .dash-hero .dh-stat b.gold { color: var(--gold-2); }
.dash-hero .dh-refresh { position: relative; z-index: 1; color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.dash-hero .dh-refresh:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }

/* ---------- 登录 ---------- */
.auth-wrap { grid-template-columns: minmax(0, 1.2fr) minmax(460px, 1fr); background: #F3F5F9; min-height: 100vh; }
.auth-hero { padding: 44px 60px 34px; color: #fff; justify-content: space-between; position: relative; overflow: hidden;
  background: radial-gradient(900px 520px at -10% -10%, #1C3B7E 0%, transparent 60%), radial-gradient(700px 480px at 110% 110%, rgba(201,164,106,.22), transparent 60%),
  linear-gradient(160deg, #0D1C3B 0%, #091431 60%, #070F24 100%); }
.auth-hero::after { display: none; }
.auth-hero .ah-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.auth-hero .ah-edition { font-size: 12px; letter-spacing: 1px; color: #E9CF9A; border: 1px solid rgba(233,207,154,.35); border-radius: 14px; padding: 3px 12px; background: rgba(233,207,154,.06); }
.auth-hero .ah-main { position: relative; z-index: 1; margin: 30px 0 10px; }
.auth-hero .ah-kicker { font-size: 12.5px; letter-spacing: 4px; color: var(--gold-2); opacity: .9; }
.auth-hero h1 { font-size: 38px; line-height: 1.3; margin: 14px 0 14px; font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(180deg, #FFFFFF 30%, #C9D6F0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { color: #A9B7D3; font-size: 14.5px; max-width: 560px; line-height: 1.9; margin: 0; }
.auth-hero .chain-art { width: 100%; max-width: 660px; margin: 6px 0 4px -12px; position: relative; z-index: 1; }
.auth-feats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; max-width: 760px; }
.auth-feat { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 14px 14px 13px; backdrop-filter: blur(4px); }
.auth-feat svg { width: 20px; height: 20px; color: var(--gold-2); margin-bottom: 8px; display: block; }
.auth-feat b { font-size: 14px; letter-spacing: .5px; }
.auth-feat span { color: #95A5C4; font-size: 12px; line-height: 1.6; display: block; }
.auth-hero .ah-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: #7183A6; font-size: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.auth-hero .ah-foot .trust { display: inline-flex; align-items: center; gap: 6px; color: #A8B6D2; }
.auth-hero .ah-foot .trust svg { width: 14px; height: 14px; color: var(--gold-2); }
.auth-hero .ah-foot .ver { margin-left: auto; }
.auth-form { padding: 40px; background: radial-gradient(600px 400px at 70% 10%, #FFFFFF 0%, #F3F5F9 70%); }
.auth-box { width: 400px; background: #fff; border-radius: 18px; padding: 38px 38px 26px; border: 1px solid #E6EBF2; box-shadow: 0 28px 64px rgba(11,23,48,.10), 0 2px 6px rgba(11,23,48,.04); }
.auth-box .ab-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-box h2 { font-size: 24px; text-align: center; color: var(--ink); letter-spacing: 2px; margin-bottom: 6px; }
.auth-box .sub { text-align: center; margin-bottom: 26px; }
.auth-box .field > label { font-weight: 500; color: var(--text-2); }
.auth-box .input { height: 44px; font-size: 14.5px; border-radius: 10px; background: #F8FAFC; }
.auth-box .input:focus { background: #fff; }
.input-ic { position: relative; }
.input-ic > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #98A4B8; pointer-events: none; }
.input-ic > .input { padding-left: 40px; }
.auth-box .btn-lg { height: 46px; font-size: 15.5px; letter-spacing: 4px; border-radius: 11px; }
.auth-box .ab-foot { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-4); }
.auth-box .ab-foot a { display: inline-flex; align-items: center; gap: 4px; }
.auth-box .ab-foot svg { width: 14px; height: 14px; }
.auth-copy { text-align: center; color: var(--text-4); font-size: 12px; margin-top: 18px; }

/* ---------- 部署向导 ---------- */
.setup-wrap { background: radial-gradient(900px 360px at 50% -10%, #E7EEFF 0%, var(--bg) 70%); padding: 40px 16px; }
.setup-box { max-width: 1000px; }
.setup-head { display: flex; align-items: center; gap: 16px; }
.setup-head h2 { margin: 0; color: var(--ink); letter-spacing: 1.5px; font-size: 22px; }
.step.on .sn { background: linear-gradient(135deg, #2C68EC, #1F5BE0); border-color: #1F5BE0; box-shadow: 0 4px 12px rgba(31,91,224,.3); }
.mode-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100), 0 8px 24px rgba(31,91,224,.10); }

/* ---------- 平台运营后台 ---------- */
.pf-top { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 24px; color: #fff;
  background: radial-gradient(500px 120px at 85% -40%, rgba(201,164,106,.28), transparent 70%), linear-gradient(90deg, #0B1730 0%, #13295A 100%); box-shadow: 0 2px 12px rgba(11,23,48,.2); }
.pf-top .pf-meta { color: #AFBEDA; font-size: 12.5px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.15); }
.pf-top .btn { color: #E6ECF7; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.pf-top .btn:hover { background: rgba(255,255,255,.12); }
.pf-tabs { padding: 14px 24px 0; }
.pf-tabs .ptabs { border-bottom-color: #DFE5EE; padding: 0; gap: 28px; }
.pf-tabs .ptabs button { font-size: 14px; padding: 12px 0; }

@media (max-width: 1180px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-hero .dh-art text { display: none; }
.dash-hero .dh-art { opacity: .32; right: 260px; top: -30px; width: 560px; }
.brand-logo { box-shadow: 0 0 0 1px rgba(233,207,154,.25), 0 6px 16px rgba(0,0,0,.3); }

/* ---------- 单据页抬头 ---------- */
.doc-head { position: relative; padding: 16px 20px 14px; gap: 10px; overflow: hidden; }
.doc-head::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary) 0%, #6E95F2 45%, var(--gold) 100%); }
.doc-title h1 { font-size: 19px; color: var(--ink); letter-spacing: .5px; }
.doc-no { font-size: 12.5px; color: var(--text-2); background: #F3F5F9; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; }
.info-strip { padding-top: 2px; }
.doc-actions { padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ap-steps { gap: 0; }
.cost-strip .total { background: linear-gradient(135deg, #EEF3FE, #F6F8FF); border-color: #CBD9FB; }
.money-box .big { color: var(--ink); }
.empty svg { color: #C9D2E0; }
.setup-wrap { padding-top: 64px; }
