:root {
  color-scheme: light;
  --ink: #17233b;
  --muted: #67748c;
  --line: #d9e5f5;
  --panel: #ffffff;
  --canvas: #f4f8fe;
  --deep: #2563c9;
  --deep-2: #1d4fa3;
  --lime: #dbeafe;
  --lime-strong: #60a5fa;
  --blue: #2f6fed;
  --orange: #e57b32;
  --red: #c84646;
  --shadow: 0 18px 45px rgba(37, 99, 201, .10);
  --radius: 16px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.app-shell[hidden] { display: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 242px; height: 100dvh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #8db9f2 var(--deep); background: linear-gradient(180deg, #3478d9 0%, #245fb8 100%); color: #f7fbff; display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 42px; padding: 5px; display: grid; place-items: center; border-radius: 12px; background: white; box-shadow: 0 7px 18px rgba(20,58,118,.18); overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; letter-spacing: .04em; }
.brand span { color: #d9e9ff; font-size: 12px; margin-top: 1px; }
.main-nav { display: grid; gap: 5px; }
.nav-label { padding: 18px 12px 7px; color: #c5dcfb; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { border: 0; width: 100%; padding: 11px 12px; border-radius: 10px; background: transparent; color: #eef6ff; display: flex; align-items: center; gap: 11px; text-align: left; text-decoration: none; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: #e8f2ff; color: #1e58b3; font-weight: 750; box-shadow: 0 7px 18px rgba(14,56,119,.15); }
.nav-glyph { width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 800; opacity: .9; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; display: grid; gap: 10px; color: #c9def9; font-size: 12px; }
.workspace { min-width: 0; margin-left: 242px; }
.topbar { height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }
.breadcrumb { font-weight: 750; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.data-status { padding: 5px 9px; border-radius: 20px; background: #eef4fb; color: #526b8b; font-size: 11px; white-space: nowrap; }
.data-status.saved { background: #e5f1ff; color: #2462b7; }
.data-status.error { background: #fff0e4; color: #9a551c; }
.icon-button, .notification-button { border: 1px solid var(--line); background: white; height: 38px; border-radius: 10px; color: var(--ink); }
.icon-button { width: 38px; font-size: 21px; }
.notification-button { display: flex; align-items: center; gap: 7px; padding: 0 11px; font-size: 13px; }
.notification-button b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 20px; background: #dbeafe; color: #205ab8; }
.notification-button:has(b:not(:empty)) { box-shadow: 0 0 0 3px rgba(96,165,250,.10); }
.role-switch { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line); padding-left: 13px; color: var(--muted); font-size: 13px; }
.role-switch[hidden] { display: none; }
.role-switch select { border: 0; background: transparent; color: var(--ink); font-weight: 700; padding: 7px 4px; }
.user-menu { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line); padding-left: 13px; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e5f1ff; color: #245eae; font-weight: 850; }
.user-copy { display: grid; line-height: 1.2; min-width: 68px; }
.user-copy strong { font-size: 13px; }
.user-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.change-password-button { min-height: 36px; padding: 7px 11px; border: 1px solid #d4e2f5; border-radius: 10px; color: #255da7; background: #f3f7fe; font-size: 13px; font-weight: 700; white-space: nowrap; }
.change-password-button:hover { border-color: #aac8ef; background: #e8f1ff; }
.change-password-button:focus-visible { outline: 2px solid #2466d1; outline-offset: 2px; }
.logout-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #f0b8bf; border-radius: 10px; background: #fff3f4; color: #c73545; min-height: 36px; padding: 8px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(199,53,69,.08); cursor: pointer; transition: background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.logout-button:hover { background: #ffe7ea; border-color: #df7f8b; box-shadow: 0 4px 12px rgba(199,53,69,.14); transform: translateY(-1px); }
.logout-button:focus-visible { outline: 3px solid rgba(199,53,69,.2); outline-offset: 2px; }
.logout-icon { font-size: 17px; line-height: 1; transform: rotate(180deg); }
.login-screen {
  --login-side-padding: clamp(36px, 6.55vw, 160px);
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 32vw);
  gap: clamp(24px, 4vw, 84px);
  padding: clamp(24px, 5.6vh, 76px) clamp(30px, 5.5vw, 134px) clamp(24px, 7vh, 92px) var(--login-side-padding);
  color: #112446;
  background: radial-gradient(ellipse at 28% 58%, #fcfdff 6%, transparent 64%), linear-gradient(132deg, #e3eefc 0%, #f2f7ff 33%, #d9e9ff 71%, #f0f7ff 100%);
}
.login-screen::before, .login-screen::after { content: ""; position: absolute; z-index: -2; pointer-events: none; border-radius: 50%; }
.login-screen::before { inset: -23% -37% 25% 52%; transform: rotate(-35deg); background: linear-gradient(180deg, rgba(153,193,252,.52), rgba(240,247,255,.26) 43%, rgba(172,208,250,.28)); }
.login-screen::after { inset: auto -26% -81% -24%; height: 110%; transform: rotate(9deg); background: linear-gradient(165deg, rgba(151,192,250,.53), #f7fbff 42%, #e1eefe 62%); }
.login-brand { position: relative; min-width: 0; align-self: start; }
.login-wordmark { display: flex; align-items: center; gap: clamp(8px, .8vw, 15px); }
.login-wordmark img { width: clamp(36px, 3.2vw, 64px); height: auto; object-fit: contain; }
.login-wordmark span { font-size: clamp(19px, 1.8vw, 35px); font-weight: 800; }
.login-intro { margin-top: clamp(33px, 6vh, 86px); }
.login-brand h1 { margin: 0 0 .17em; font-size: clamp(32px, 3.6vw, 86px); line-height: 1.17; font-weight: 850; letter-spacing: .012em; }
.login-specialty { margin: 0; font-size: clamp(18px, 2.02vw, 42px); color: #51617a; font-weight: 550; letter-spacing: .035em; }
.login-specialty::after { content: ""; display: block; width: clamp(48px, 4.7vw, 92px); height: clamp(4px, .42vw, 8px); margin: clamp(18px, 2.8vh, 38px) 0; border-radius: 99px; background: linear-gradient(90deg, #0864ed, #73d7ed); }
.login-tagline { margin: 0; color: #53627a; font-size: clamp(14px, 1.35vw, 28px); letter-spacing: .34em; }
.login-illustration {
  position: absolute;
  inset: calc(100% + clamp(14px, 2vh, 28px)) auto auto calc(-1 * var(--login-side-padding));
  transform: translateY(-19%);
  z-index: -1;
  width: min(63vw, 109vh);
  aspect-ratio: 3 / 2;
  background: url("./assets/login-illustration.webp") center bottom / contain no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 88%, transparent), linear-gradient(180deg, transparent, #000 20%, #000 77%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.login-art-logo-laptop {
  position: absolute;
  top: 65%;
  left: 69%;
  width: 4.6%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
  transform: translate(-50%, -50%) rotate(-2deg) skewX(-23deg) scaleY(.84);
}
.login-card { width: 100%; align-self: center; border: 1px solid rgba(255,255,255,.76); border-radius: clamp(22px, 2.05vw, 40px); padding: clamp(24px, 2.62vw, 58px); background: rgba(255,255,255,.88); box-shadow: 0 24px 72px rgba(67,124,205,.16); }
.login-kicker { display: flex; align-items: center; gap: 16px; margin: 0 0 7px; color: #5c7fb7; text-transform: uppercase; letter-spacing: .11em; font-size: clamp(12px, 1vw, 19px); font-weight: 800; }
.login-kicker::after { content: ""; width: clamp(48px, 6vw, 135px); height: 1px; background: linear-gradient(90deg, #8bace0, #b9cfee); }
.login-card h2 { margin: 0 0 .14em; font-size: clamp(24px, 2.18vw, 46px); line-height: 1.3; font-weight: 850; letter-spacing: -.012em; }
.login-welcome { margin: 0; color: #5f6f87; font-size: clamp(14px, 1.26vw, 26px); }
.login-card form { display: grid; gap: clamp(14px, 2.4vh, 28px); margin-top: clamp(21px, 3.8vh, 46px); }
.login-control { display: flex; align-items: center; min-width: 0; min-height: clamp(48px, 7vh, 72px); gap: clamp(9px, 1.05vw, 18px); padding: 0 clamp(14px, 1.3vw, 26px); color: #526680; border: 1.5px solid #cad9ed; border-radius: 99px; background: rgba(255,255,255,.38); }
.login-control:focus-within { border-color: #387bd7; box-shadow: 0 0 0 3px rgba(56,123,215,.15); }
.login-control input { flex: 1 1 0; width: 0; min-width: 0; padding: .6rem 0; border: 0; outline: none; background: transparent; color: #152747; font-size: clamp(16px, 1.23vw, 24px); }
.login-control input::placeholder { color: #62718a; }
.login-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.login-icon { position: relative; display: inline-block; flex: 0 0 auto; width: 25px; height: 25px; }
.login-icon-account::before, .login-icon-account::after, .login-icon-lock::before, .login-icon-lock::after, .login-icon-eye::before, .login-icon-eye::after, .login-icon-shield::after { content: ""; position: absolute; }
.login-icon-account::before { inset: 0 7px auto; height: 10px; border: 2px solid; border-radius: 50%; }
.login-icon-account::after { inset: 13px 2px 0; border: 2px solid; border-radius: 9px 9px 2px 2px; }
.login-icon-lock::before { inset: 0 6px auto; height: 12px; border: 2px solid; border-radius: 8px 8px 0 0; }
.login-icon-lock::after { inset: 9px 2px 0; border: 2px solid; border-radius: 4px; background: radial-gradient(circle at center, currentColor 1.5px, transparent 2px); }
.login-password-toggle { position: relative; display: grid; place-items: center; flex: 0 0 40px; height: 40px; margin-right: -9px; padding: 0; border: 0; border-radius: 50%; color: inherit; background: transparent; }
.login-password-toggle:hover { background: #e8f1ff; }
.login-icon-eye::before { inset: 5px 4px; border: 2px solid; border-radius: 70% 10%; transform: rotate(45deg); }
.login-icon-eye::after { width: 6px; height: 6px; inset: 50% auto auto 50%; transform: translate(-50%, -50%); background: currentColor; border-radius: 50%; }
.login-password-toggle:not(.password-visible)::after { content: ""; position: absolute; width: 25px; height: 2px; border-radius: 99px; background: currentColor; transform: rotate(43deg); box-shadow: 0 1px #f8fbff; }
.remember-login { display: inline-flex; justify-self: start; align-items: center; gap: 8px; min-height: 36px; color: #495c77; font-size: clamp(13px, 1.03vw, 20px); cursor: pointer; }
.remember-login input { width: 18px; height: 18px; margin: 0; accent-color: #1263df; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: .65em; min-height: clamp(52px, 7.6vh, 80px); padding: 9px 18px; border: 0; border-radius: 99px; color: #fff; background: linear-gradient(112deg, #238de8 0%, #1461e0 65%, #0f50c7 100%); font-size: clamp(16px, 1.36vw, 27px); font-weight: 750; }
.login-submit:hover:not(:disabled) { filter: brightness(.96); }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-submit span { font-size: 1.16em; font-weight: 500; }
.login-error { margin-top: 15px; padding: 10px 12px; border-radius: 9px; background: #fff0ef; color: #a73939; font-size: 13px; }
.login-alternative { margin-top: clamp(15px, 2.55vh, 29px); padding-top: clamp(8px, 1.25vh, 16px); border-top: 1px solid #e1eaf7; text-align: center; }
.wecom-login { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 3px 5px; border: 0; border-radius: 8px; color: #596a83; background: transparent; font-size: clamp(12px, .93vw, 18px); }
.wecom-login:hover { color: #1b62bf; background: #eef5ff; }
.login-icon-shield { width: 22px; height: 24px; background: #1d63cc; clip-path: polygon(50% 0, 96% 19%, 93% 56%, 82% 76%, 67% 90%, 50% 100%, 33% 90%, 18% 76%, 7% 56%, 4% 19%); }
.login-icon-shield::before { content: ""; position: absolute; inset: 2px; background: #fcfdff; clip-path: inherit; }
.login-icon-shield::after { inset: 7px auto auto 8px; width: 6px; height: 8px; border: solid #1d63cc; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.login-screen button:focus-visible, .login-screen input[type="checkbox"]:focus-visible { outline: 2px solid #2466d1; outline-offset: 3px; }
@media (max-width: 1150px) {
  .login-screen { --login-side-padding: clamp(24px, 4.5vw, 60px); grid-template-columns: minmax(0, 1fr) minmax(340px, 40vw); padding-inline: var(--login-side-padding); }
  .login-illustration { width: min(59vw, 109vh); }
}
@media (max-width: 800px) {
  .login-screen { grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 20px; padding: clamp(18px, 4vh, 40px) clamp(15px, 5vw, 36px); }
  .login-brand { display: contents; }
  .login-brand-copy { text-align: center; }
  .login-wordmark { justify-content: center; }
  .login-intro { margin-top: 8px; }
  .login-brand h1, .login-specialty::after, .login-tagline { display: none; }
  .login-specialty { font-size: 15px; }
  .login-card { max-width: 490px; }
  .login-illustration { position: relative; inset: auto; transform: none; order: 1; width: min(96%, 450px); margin: -43px 0 -28px; opacity: .8; }
}
@media (max-width: 580px) and (max-height: 700px) {
  .login-illustration { display: none; }
}
@media (max-height: 570px) and (min-width: 801px) {
  .login-screen { padding-block: 18px; }
  .login-intro { margin-top: 24px; }
  .login-card { padding-block: 16px; }
  .login-card form { gap: 9px; margin-top: 12px; }
  .login-control { min-height: 44px; }
  .remember-login { min-height: 30px; }
  .login-submit { min-height: 44px; }
  .login-alternative { margin-top: 8px; padding-top: 3px; }
  .wecom-login { min-height: 32px; }
}
.mobile-menu { display: none; }
#main-content { padding: 28px 30px 50px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 23px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; color: #3c75c8; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(26px, 3vw, 36px); line-height: 1.18; letter-spacing: -.03em; }
h2 { font-size: 20px; margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 8px; }
.page-copy { margin: 0; color: var(--muted); max-width: 700px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { border-radius: 10px; padding: 10px 15px; border: 1px solid transparent; font-weight: 700; font-size: 14px; }
.primary-button { background: var(--deep); color: white; }
.primary-button:hover { background: var(--deep-2); }
.secondary-button { background: var(--lime); color: var(--deep); }
.ghost-button { border-color: var(--line); background: white; color: var(--ink); }
.danger-button { background: #fff1f0; color: var(--red); border-color: #f3cecb; }
.compact-button { padding: 7px 10px; font-size: 13px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.ledger-kpi-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.ledger-kpi-grid .kpi-value { font-size:clamp(22px,2.2vw,31px); }
.ledger-filters { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:9px; }
.ledger-filters label { display:grid; gap:4px; color:var(--muted); font-size:11px; font-weight:700; }
.ledger-filters select { min-width:104px; }
.ledger-filters label:nth-child(2) select { min-width:205px; }
.kpi-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 7px 22px rgba(37,99,201,.045); position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; inset: auto -22px -35px auto; width: 88px; height: 88px; border-radius: 50%; background: var(--tint, #edf5ff); }
.kpi-label { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.kpi-note { position: relative; z-index: 1; margin-top: 6px; font-size: 12px; color: #4b6588; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .8fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: 0 8px 28px rgba(37,99,201,.04); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head span { color: var(--muted); font-size: 13px; }
.status-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 22px; }
.flow-step { padding: 13px 10px; border-radius: 12px; background: #f2f7fd; border: 1px solid transparent; font-size: 13px; text-align: center; }
.flow-step strong { display: block; margin-bottom: 2px; }
.flow-step.done { background: #e5f1ff; border-color: #bdd9fb; }
.flow-step.current { color: white; background: var(--deep); }
.chart { display: flex; align-items: end; gap: 11px; height: 165px; padding-top: 20px; border-bottom: 1px solid var(--line); }
.bar-wrap { flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; height: 100%; gap: 6px; color: var(--muted); font-size: 12px; }
.bar { width: min(34px, 70%); height: var(--h); min-height: 8px; background: var(--deep); border-radius: 7px 7px 2px 2px; position: relative; }
.bar.accent { background: var(--lime-strong); }
.bar-value { font-size: 11px; font-weight: 700; color: var(--ink); }
.todo-list { display: grid; gap: 9px; }
.todo-item { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e8eef7; }
.todo-item:last-child { border-bottom: 0; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.todo-title { font-weight: 700; font-size: 14px; }
.todo-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.todo-count { min-width: 28px; padding: 3px 7px; border-radius: 20px; background: #eef4fb; text-align: center; font-size: 12px; font-weight: 800; }
.table-tools { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.table-scroll-hint { margin: -3px 0 10px; color: var(--muted); font-size: 12px; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.order-list-filters { align-items: flex-end; align-self: flex-end; flex-wrap: wrap; }
.order-list-filters .search-input { width: 220px; min-width: 220px; }
.order-list-filters .select-input { width: 140px; }
.order-export-tools { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.order-export-tools label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.order-export-tools input { min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; outline: none; }
.order-export-tools input:focus { border-color: #78a7e8; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.order-export-tools > i { align-self: center; margin-top: 16px; color: var(--muted); font-style: normal; }
.search-input, .select-input, .field input, .field select, .field textarea { border: 1px solid var(--line); background: white; border-radius: 10px; min-height: 40px; padding: 8px 11px; color: var(--ink); outline: none; }
.search-input { min-width: 250px; }
.search-input:focus, .select-input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #78a7e8; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
.wide-table { min-width: 1250px; }
.opportunity-table { min-width: 1900px; }
.order-table { min-width: 3300px; }
.order-table th:first-child, .order-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 150px; background: #fff; box-shadow: 3px 0 6px #142d5010; }
.order-table th:first-child { z-index: 3; background: #f4f7fc; }
.order-status-cell { display: grid; gap: 6px; justify-items: start; }
.order-status-cell small { color: var(--muted); max-width: 180px; white-space: normal; }
.order-kpi-button { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.order-kpi-button:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }
#order-list-panel { scroll-margin-top: 85px; }
.inventory-table { min-width: 2200px; }
.asset-table { min-width: 1900px; }
.purchase-table { min-width: 2850px; }
.supplier-table { min-width: 2250px; }
.expense-table { min-width: 2450px; }
.expense-table th:first-child,.expense-table td:first-child { position:sticky; left:0; z-index:2; width:174px; min-width:174px; max-width:174px; background:#fff; }
.expense-table th:nth-child(2),.expense-table td:nth-child(2) { position:sticky; left:174px; z-index:2; min-width:110px; background:#fff; box-shadow:3px 0 6px #142d5010; }
.expense-table th:first-child,.expense-table th:nth-child(2) { z-index:3; background:#f3f7fc; }
.wide-table th, .wide-table td { white-space: nowrap; }
.opportunity-table td:nth-child(11) { min-width: 260px; white-space: normal; }
.wide-table th:last-child, .wide-table td:last-child { position: sticky; right: 0; background: white; box-shadow: -8px 0 14px rgba(37,99,201,.055); }
.wide-table th:last-child { background: #f3f7fc; z-index: 2; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e7edf6; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; background: #f3f7fc; color: #526580; font-size: 12px; letter-spacing: .03em; font-weight: 750; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbff; }
.link-button { border: 0; background: transparent; color: #2868c7; font-weight: 750; padding: 0; }
.danger-link { color: var(--red); }
.row-actions { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.progress-link { border: 0; background: transparent; color: var(--ink); text-align: left; padding: 0; display: grid; gap: 2px; }
.progress-link strong { color: #2868c7; font-size: 12px; }
.progress-link span { color: var(--muted); font-size: 13px; }
.money { font-variant-numeric: tabular-nums; font-weight: 750; }
.tag { display: inline-flex; align-items: center; min-height: 26px; border-radius: 20px; padding: 3px 9px; background: #edf3fb; color: #50647f; font-size: 12px; white-space: nowrap; }
.tag.green { background: #e4f0ff; color: #245eae; }
.tag.blue { background: #eaf0ff; color: #2758bd; }
.tag.orange { background: #fff0df; color: #a24b0f; }
.tag.red { background: #ffeded; color: #a53636; }
.tag.dark { background: var(--deep); color: white; }
.progress { width: 110px; height: 7px; background: #e5edf7; border-radius: 20px; overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--progress); background: var(--lime-strong); border-radius: inherit; }
.metric-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e8eef7; }
.metric-line:last-child { border-bottom: 0; }
.metric-line span { color: var(--muted); }
.metric-line strong { font-variant-numeric: tabular-nums; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(13,31,61,.56); display: grid; place-items: center; padding: 24px; z-index: 100; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 18px; box-shadow: var(--shadow); }
.modal-wide { width: min(1020px, 100%); }
.modal-change-password { width: min(460px, 100%); }
.modal-head { padding: 20px 22px 14px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-close { border: 0; background: #edf3fa; width: 34px; height: 34px; border-radius: 9px; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.stock-time-fields { display: contents; }
.field { display: grid; gap: 6px; color: #536681; font-size: 13px; }
.field.full { grid-column: 1 / -1; }
.field textarea { min-height: 90px; resize: vertical; }
.project-reference-picker { position: relative; min-width: 0; }
.project-reference-control { position: relative; }
.project-reference-control input { width: 100%; padding-right: 45px; }
.project-reference-control button { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 38px; border: 0; border-radius: 0 9px 9px 0; background: transparent; color: #101d33; font-size: 0; line-height: 1; }
.project-reference-control button::before { content: ""; display: inline-block; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2.25px 2.25px 0; transform: translateY(-2px) rotate(45deg); }
.project-reference-control button:hover { background: transparent; }
.project-reference-control button:focus-visible { outline: 2px solid rgba(59,130,246,.28); outline-offset: -4px; }
.project-reference-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; display: grid; gap: 3px; max-height: 240px; overflow-y: auto; padding: 6px; border: 1px solid #b8d1f0; border-radius: 11px; background: white; box-shadow: 0 16px 36px rgba(28,70,132,.22); }
.project-reference-menu[hidden], .project-reference-option[hidden], .project-reference-empty[hidden] { display: none; }
.project-reference-option { display: grid; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.project-reference-option:hover, .project-reference-option:focus { background: #edf5ff; outline: none; }
.project-reference-option strong { font-size: 13px; font-weight: 750; }
.project-reference-option small { color: var(--muted); font-size: 11px; }
.project-reference-empty { padding: 13px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.editable-select { position: relative; min-width: 0; }
.editable-select-control { position: relative; }
.editable-select-control input { width: 100%; padding-right: 45px; }
.editable-select-control button { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 38px; border: 0; border-radius: 0 9px 9px 0; background: transparent; color: #101d33; font-size: 0; line-height: 1; }
.editable-select-control button::before { content: ""; display: inline-block; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2.25px 2.25px 0; transform: translateY(-2px) rotate(45deg); }
.editable-select-control button:hover { background: transparent; }
.editable-select-control button:focus-visible { outline: 2px solid rgba(59,130,246,.28); outline-offset: -4px; }
.editable-select-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; display: grid; gap: 3px; max-height: 240px; overflow-y: auto; padding: 6px; border: 1px solid #b8d1f0; border-radius: 11px; background: white; box-shadow: 0 16px 36px rgba(28,70,132,.22); }
.editable-select-menu[hidden], .editable-select-option[hidden], .editable-select-empty[hidden] { display: none; }
.editable-select-option { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.editable-select-option:hover, .editable-select-option:focus { background: #edf5ff; outline: none; }
.editable-select-empty { padding: 13px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.component-field { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.component-field legend { padding: 0 7px; color: var(--ink); font-weight: 750; }
.component-head, .component-row { display: grid; grid-template-columns: minmax(180px,2fr) 90px 130px 120px 56px; gap: 9px; align-items: center; }
.component-head { padding: 0 0 7px; color: var(--muted); font-size: 12px; }
.component-row { padding: 7px 0; border-top: 1px solid #edf2f8; }
.component-row input { min-width: 0; }
.component-row output { font-weight: 750; font-variant-numeric: tabular-nums; }
.sales-items-field { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.sales-items-head, .sales-item-row { display: grid; grid-template-columns: minmax(260px,2fr) 90px 130px 130px 56px; gap: 9px; align-items: center; }
.sales-items-head { padding: 0 0 8px; color: var(--muted); font-size: 12px; }
.sales-item-row { padding: 8px 0; border-top: 1px solid #edf2f8; }
.sales-item-product { display: grid; grid-template-columns: minmax(150px,1fr) minmax(120px,1fr); gap: 8px; }
.sales-item-row input, .sales-item-row select { min-width: 0; }
.sales-item-row output { font-weight: 750; font-variant-numeric: tabular-nums; }
.sales-item-add { margin-top: 10px; }
@media (max-width: 900px) { .sales-items-head { display: none; } .sales-item-row { grid-template-columns: 1fr 1fr; } .sales-item-product { grid-column: 1 / -1; } }
.component-add { margin-top: 10px; justify-self: start; }
.role-field { border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.role-field legend { padding: 0 6px; font-weight: 750; color: var(--ink); }
.check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.check-grid label { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 9px; background: #f3f7fc; color: #455a77; }
.check-grid input { min-height: auto; padding: 0; accent-color: var(--deep); }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 150; display: grid; gap: 8px; }
.toast { padding: 12px 15px; border-radius: 11px; background: var(--deep); color: white; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-item { padding: 10px 0; border-bottom: 1px solid #e8eef7; }
.detail-item span { display: block; color: var(--muted); font-size: 12px; }
.detail-item strong { display: block; margin-top: 4px; }
.full-detail { grid-column: 1 / -1; }
.section-title { margin: 24px 0 12px; padding-top: 17px; border-top: 1px solid var(--line); }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 10px; padding-bottom: 17px; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item i { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; background: var(--lime-strong); box-shadow: 0 0 0 4px #e5f1ff; }
.timeline-item strong { font-size: 13px; color: #446589; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); }
.status-summary { display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; padding: 12px 14px; background: #f3f7fc; border-radius: 11px; font-size: 13px; }
.status-summary > span { display: flex; align-items: center; gap: 6px; }
.order-actions { margin-top: 15px; }
.log-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.log-list > div { display: grid; grid-template-columns: 145px 100px minmax(0,1fr); gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log-list > div:last-child { border-bottom: 0; }
.log-list time { color: var(--muted); }
.log-list span { color: #536681; }
.log-list-four > div { grid-template-columns: 90px 145px 100px minmax(0,1fr); }
.notice { padding: 12px 14px; border-radius: 10px; background: #e5f1ff; color: #285d9f; font-size: 13px; margin-bottom: 16px; }
.process-panel { margin: 0 0 18px; padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(37,99,201,.045); overflow-x: auto; }
.modal-body .process-panel { padding: 12px 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.process-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 17px; }
.process-title span { color: var(--muted); font-size: 13px; }
.process-flow { display: flex; align-items: flex-start; min-width: 720px; }
.process-step { flex: 1; position: relative; display: grid; justify-items: center; gap: 8px; color: #8090a8; font-size: 12px; text-align: center; }
.process-step::before { content: ""; position: absolute; left: -50%; right: 50%; top: 15px; height: 2px; background: #dce7f5; }
.process-step:first-child::before { display: none; }
.process-step i { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #edf3fa; border: 2px solid white; box-shadow: 0 0 0 1px #d6e2f1; font-style: normal; font-weight: 800; }
.process-step.done { color: #2b64b7; }
.process-step.done::before, .process-step.current::before { background: var(--lime-strong); }
.process-step.done i { color: var(--deep); background: var(--lime); box-shadow: 0 0 0 1px #9fc8fa; }
.process-step.current { color: var(--deep); font-weight: 800; }
.process-step.current i { color: white; background: var(--deep); box-shadow: 0 0 0 5px rgba(37,99,201,.13); }
.compact-progress-panel { padding-bottom:14px; }
.compact-progress-panel .process-title { margin-bottom:7px; }
.compact-flow-track { display:flex; align-items:flex-start; min-width:max(720px,calc(var(--flow-levels) * 118px)); padding:5px 4px 0; }
.compact-flow-level { position:relative; flex:1; min-width:110px; display:grid; justify-items:center; gap:7px; color:#8090a8; text-align:center; }
.compact-flow-level::before { content:""; position:absolute; left:-50%; right:50%; top:14px; height:2px; background:#dce7f5; }
.compact-flow-level:first-child::before { display:none; }
.compact-flow-level.done::before,.compact-flow-level.current::before { background:#5a9ded; }
.compact-flow-level > i { position:relative; z-index:1; width:29px; height:29px; display:grid; place-items:center; border-radius:50%; background:#edf3fa; border:2px solid white; box-shadow:0 0 0 1px #d6e2f1; color:#7d91aa; font-style:normal; font-size:11px; font-weight:800; }
.compact-flow-level.done > i { color:#215cae; background:#dcecff; box-shadow:0 0 0 1px #9fc8fa; }
.compact-flow-level.current > i { color:white; background:var(--deep); box-shadow:0 0 0 4px rgba(37,99,201,.13); }
.compact-flow-labels { display:flex; justify-content:center; flex-wrap:wrap; gap:3px 5px; max-width:150px; }
.compact-flow-labels span { display:inline-flex; align-items:center; gap:3px; padding:2px 6px; border-radius:9px; color:#778ba5; font-size:11px; line-height:1.35; white-space:nowrap; }
.compact-flow-labels span.done { color:#2b64b7; }
.compact-flow-labels span.current { background:#e4f0ff; color:#185cba; font-weight:800; }
.compact-flow-labels b { color:#c75860; font-size:12px; }
.notification-list { display: grid; gap: 10px; }
.notification-card { width: 100%; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 13px; align-items: center; text-align: left; color: var(--ink); }
.notification-card:hover { border-color: #9dbfe9; background: #f8fbff; transform: translateY(-1px); }
.notification-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #e5f1ff; color: #245eae; font-weight: 900; }
.notification-card strong, .notification-card b, .notification-card small { display: block; }
.notification-card strong { font-size: 12px; color: #446b9d; }
.notification-card b { margin: 2px 0; font-size: 14px; }
.notification-card small { color: var(--muted); }
.notification-card em { color: #2868c7; font-style: normal; font-weight: 750; font-size: 13px; }
.todo-link { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; }
.todo-link:hover { background: #f8fbff; }
.todo-go { color: #2868c7; font-size: 12px; font-weight: 800; white-space: nowrap; }
.stat-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.stat-strip > div { background: #f2f7fd; border-radius: 11px; padding: 13px; }
.stat-strip span { display: block; font-size: 12px; color: var(--muted); }
.stat-strip strong { display: block; margin-top: 5px; font-size: 19px; }
.ledger-bars { display: grid; gap: 16px; padding: 10px 0; }
.ledger-row { display: grid; grid-template-columns: 55px minmax(0,1fr) 46px; gap: 12px; align-items: center; font-size: 14px; }
.ledger-row > div { height: 11px; background: #e4edf8; border-radius: 20px; overflow: hidden; }
.ledger-row i { display: block; height: 100%; min-width: 7px; background: linear-gradient(90deg, var(--deep-2), var(--lime-strong)); border-radius: inherit; }
.ledger-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.ledger-detail-grid .table-wrap { max-height: 360px; }
.ledger-detail-grid table { min-width: 620px; }
.ledger-subhead { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.permission-grid { display: grid; gap: 10px; }
.permission-row { display: grid; grid-template-columns: 120px repeat(4,1fr); gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.permission-row:first-child { font-weight: 800; color: var(--muted); }
.permission-yes { color: #2462b7; font-weight: 800; }
.permission-no { color: #a6b0ac; }
.readonly-banner { margin-bottom: 16px; padding: 11px 14px; border: 1px solid #cddff4; border-radius: 11px; background: #eef6ff; color: #315f98; font-size: 13px; }
.permission-count { display: inline-flex; margin: 2px 5px 2px 0; padding: 3px 7px; border-radius: 20px; font-size: 11px; }
.permission-count.edit { background:#e5f1ff;color:#245eae; }
.permission-count.read { background:#eef2f7;color:#52647d; }
.permission-count.none { background:#fff0ef;color:#a34848; }
.page-permission-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.page-permission-form label { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:11px; }
.page-permission-form label > span { display:grid; }
.page-permission-form label small { color:var(--muted); }
.page-permission-form select { min-width:105px; border:1px solid var(--line); border-radius:8px; padding:7px; background:white; }
.permission-locked { background:#f5f7fa; color:#6f7b8d; }
.permission-matrix-scroll { overflow:auto; border:1px solid var(--line); border-radius:12px; }
.permission-matrix-table { min-width:1600px; }
.permission-matrix-table td:first-child { position:sticky; left:0; background:white; z-index:1; }
.permission-matrix-table td:first-child small { display:block; color:var(--muted); }
.permission-pill { display:inline-flex; padding:3px 7px; border-radius:20px; font-size:11px; white-space:nowrap; }
.permission-pill.edit { background:#e5f1ff;color:#245eae; }
.permission-pill.read { background:#eef2f7;color:#52647d; }
.permission-pill.none { background:#fff0ef;color:#a34848; }
.sales-audit-panel { margin-top:18px; }
.sales-audit-panel table { min-width:760px; }
.sales-audit-panel td:last-child { min-width:320px; }
.template-section { margin-top: 18px; }
.workflow-template-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.workflow-template-card { border: 1px solid var(--line); background: white; border-radius: 13px; padding: 14px; display: grid; gap: 4px; text-align: left; color: var(--ink); }
.workflow-template-card:hover { border-color: #9dbfe9; }
.workflow-template-card.active { border-color: #5b96e6; background: #edf5ff; box-shadow: 0 0 0 3px rgba(62,127,218,.08); }
.workflow-template-card span { color: #3973c2; font-size: 11px; font-weight: 800; }
.workflow-template-card strong { font-size: 14px; }
.workflow-template-card small { color: var(--muted); }
.workflow-canvas { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(#f8fbff 1px,transparent 1px),linear-gradient(90deg,#f8fbff 1px,transparent 1px),white; background-size: 24px 24px; padding: 20px; overflow-x: auto; }
.workflow-meta { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.workflow-meta h2 { margin: 7px 0 4px; }
.workflow-meta p { margin: 0; color: var(--muted); }
.workflow-badge { display: inline-flex; padding: 3px 8px; border-radius: 20px; background: #e5f1ff; color: #2868c7; font-size: 11px; font-weight: 800; }
.locked-flow { white-space: nowrap; border: 1px solid #d5e2f1; background: white; border-radius: 9px; padding: 7px 10px; color: #63738a; font-size: 12px; }
.workflow-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.active-template-mark { display:inline-flex; padding:7px 10px; border-radius:9px; background:#e7f2ff; color:#2868c7; font-size:12px; font-weight:800; }
.applied-template-caption { display:flex; justify-content:space-between; gap:12px; margin:0 8px 6px; color:#3b6ea9; font-size:12px; }
.applied-template-caption small { color:var(--muted); }
.template-editor-head { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:12px; margin:10px 0 8px; }
.template-editor-head > div { display:grid; gap:3px; }
.template-editor-head > div:first-child { min-width:0; }
.template-editor-head > .button-row { display:flex; flex-wrap:nowrap; flex-shrink:0; gap:6px; }
.template-editor-head > .button-row > button { padding:7px 10px; border-radius:8px; font-size:12px; line-height:1.4; white-space:nowrap; }
.template-editor-head small { color:var(--muted); }
.approval-node-editor { display:grid; justify-items:center; padding:22px; border:1px solid #dbe7f5; border-radius:14px; background:linear-gradient(#f2f7fd 1px,transparent 1px),linear-gradient(90deg,#f2f7fd 1px,transparent 1px),#fbfdff; background-size:24px 24px; overflow:auto; }
.approval-flow-step { display:grid; justify-items:center; width:min(760px,100%); }
.approval-builder-node { width:100%; border:1px solid #cdddf1; border-radius:12px; background:#fff; overflow:hidden; box-shadow:0 8px 20px rgba(38,91,164,.08); }
.approval-builder-node > header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px 12px; color:#fff; background:#5c8fd8; }
.approval-builder-node.approval > header { background:#ef7474; }
.approval-builder-node.condition > header { background:#69ad70; }
.approval-builder-node.end > header { background:#64748b; }
.approval-builder-fields { display:grid; grid-template-columns:130px minmax(170px,1fr) minmax(150px,1fr) 125px; gap:10px; padding:14px; }
.approval-builder-fields label,.condition-builder label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:700; }
.approval-builder-fields input,.approval-builder-fields select,.condition-builder input { min-width:0; width:100%; border:1px solid var(--line); border-radius:8px; padding:8px; background:#fff; color:var(--ink); }
.approval-builder-fields .assignee-field { grid-column:span 2; }
.condition-builder { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; padding:0 14px 14px; border-top:1px dashed #dce7f3; padding-top:12px; }
.condition-builder .visual-flow-branches { grid-column:1/-1; }
.node-graph-config { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0 14px 14px; }
.node-graph-config fieldset { min-width:0; margin:0; border:1px solid #dce7f3; border-radius:10px; padding:10px; }
.node-graph-config legend { padding:0 6px; color:#4d6684; font-size:11px; font-weight:800; }
.node-graph-config .check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.node-component-config { grid-column:1/-1; }
.flow-insert-button { position:relative; z-index:1; display:grid; place-items:center; width:34px; height:34px; margin:13px 0; border:0; border-radius:50%; background:#3e86e8; color:#fff; font-size:22px; line-height:1; box-shadow:0 0 0 5px #eef5fe; cursor:pointer; }
.flow-insert-button::before,.flow-insert-button::after { content:""; position:absolute; left:50%; width:2px; height:13px; background:#bdd2eb; transform:translateX(-50%); z-index:-1; }
.flow-insert-button::before { bottom:100%; }
.flow-insert-button::after { top:100%; }
.locked-node { display:inline-flex; padding:3px 7px; border-radius:12px; background:rgba(255,255,255,.2); font-size:11px; }
.node-row-actions { display:flex; gap:4px; }
.node-row-actions button { border:1px solid rgba(255,255,255,.5); background:rgba(255,255,255,.16); border-radius:7px; width:28px; height:28px; color:#fff; cursor:pointer; }
.visual-approval-flow { display:grid; justify-items:center; min-width:680px; padding:8px 0 18px; }
.visual-flow-step { display:grid; justify-items:center; width:100%; }
.visual-flow-node { width:330px; border:1px solid #cdddf1; border-radius:11px; background:#fff; overflow:hidden; box-shadow:0 7px 18px rgba(37,99,201,.08); }
.visual-flow-node header { display:flex; justify-content:space-between; gap:12px; padding:7px 11px; color:#fff; background:#5c8fd8; font-size:11px; font-weight:800; }
.visual-flow-node header em { font-style:normal; opacity:.75; }
.visual-flow-node.approval header { background:#ef7474; }
.visual-flow-node.condition header { background:#69ad70; }
.visual-flow-node.end header { background:#64748b; }
.visual-flow-node strong,.visual-flow-node .visual-node-owner,.visual-flow-node small,.visual-flow-node p { display:block; padding-left:12px; padding-right:12px; }
.visual-flow-node strong { padding-top:11px; font-size:14px; }
.visual-flow-node .visual-node-owner { padding-top:4px; color:#3f536d; font-size:12px; }
.visual-flow-node small { padding-top:3px; padding-bottom:11px; color:var(--muted); }
.visual-flow-node p { margin:0; padding-top:8px; padding-bottom:10px; border-top:1px dashed #d9e5f3; color:#4e6c91; font-size:12px; }
.visual-flow-connector { position:relative; width:2px; height:54px; background:#bdd2eb; }
.visual-flow-connector i { position:absolute; left:50%; top:50%; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#3e86e8; color:#fff; font-style:normal; font-size:17px; transform:translate(-50%,-50%); box-shadow:0 0 0 4px #f7fbff; }
.visual-flow-branches { position:relative; display:grid; grid-template-columns:repeat(2,minmax(220px,1fr)); gap:72px; width:min(680px,92%); margin:48px auto 8px; }
.visual-flow-branches::before { content:""; position:absolute; left:25%; right:25%; top:-24px; height:24px; border:2px solid #bdd2eb; border-bottom:0; border-radius:12px 12px 0 0; }
.visual-flow-branches::after { content:"分支"; position:absolute; left:50%; top:-39px; padding:3px 10px; border-radius:15px; background:#fff; color:#5f7794; font-size:11px; transform:translateX(-50%); }
.visual-flow-branches article { display:grid; gap:3px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; text-align:center; }
.visual-flow-branches .branch-pass { border-top:3px solid #69ad70; }
.visual-flow-branches .branch-return { border-top:3px solid #ef7474; }
.visual-flow-branches small { color:var(--muted); }
.visual-flow-branches.editor { width:100%; gap:12px; margin-top:36px; }
.graph-approval-flow { display:grid; gap:8px; min-width:720px; padding:12px; overflow:auto; }
.graph-level { display:grid; justify-items:center; gap:8px; }
.graph-level-label { padding:3px 9px; border-radius:12px; background:#edf4fd; color:#6a7f9a; font-size:11px; }
.graph-level-nodes { display:flex; justify-content:center; align-items:stretch; flex-wrap:wrap; gap:18px; width:100%; }
.graph-level-arrow { color:#4c82c9; font-size:12px; font-weight:800; }
.graph-level-arrow::before,.graph-level-arrow::after { content:""; display:block; width:2px; height:10px; margin:auto; background:#bad0eb; }
.graph-approval-flow .visual-flow-node { width:280px; }
.visual-flow-node footer { display:grid; gap:3px; padding:8px 12px; border-top:1px dashed #d9e5f3; color:#63758c; font-size:11px; }
.visual-flow-node footer .return-edge { color:#c9535b; }
.visual-flow-node.current { border-color:#2e73d2; box-shadow:0 0 0 3px rgba(46,115,210,.14); }
.visual-flow-node.done { opacity:.78; }
.component-chip { display:inline-flex; width:max-content; margin:0 4px 8px 12px; padding:3px 8px; border-radius:12px; background:#fff0df; color:#a85c12; font-size:11px; font-weight:800; }
.component-chip.saved { background:#e7f5ec; color:#25844d; }
.workflow-component-panel { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:10px 0 16px; padding:12px 14px; border:1px solid #d5e5f7; border-radius:12px; background:#f7fbff; }
.workflow-component-panel > div:first-child { display:grid; gap:2px; margin-right:auto; }
.workflow-component-panel > div:first-child span { color:var(--muted); font-size:12px; }
.workflow-component-status { display:flex; flex-wrap:wrap; gap:6px; }
.workflow-component-status .component-chip { margin:0; }
.workflow-component-files { flex:1 1 100%; display:grid; gap:8px; padding-top:8px; border-top:1px solid #e2edf9; }
.workflow-component-files > div { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.workflow-component-actions { display:flex; flex-wrap:wrap; gap:8px; }
.wf-node-config { padding:12px; display:grid; gap:12px; border-block:1px solid var(--line); }
.wf-node-config input:not([type="checkbox"]), .wf-node-config select, .wf-node-config textarea { width:100%; min-width:0; border:1px solid var(--line); border-radius:7px; padding:7px; color:var(--ink); background:white; }
.wf-node-config textarea { min-height:60px; resize:vertical; }
.wf-node-config .wf-required-check { display:flex; align-items:center; }
.wf-node-config input[type="checkbox"] { width:auto; min-height:0; flex:none; }
.modal-node-form { display:flex; flex-direction:column; max-height:94vh; }
.modal-node-form .modal-body { min-height:0; overflow:auto; }
.modal-node-form .modal-head, .modal-node-form .modal-foot { flex:none; }
.wf-config-label, .wf-field-config > label { display:grid; gap:5px; font-size:12px; }
.wf-template-add { display:grid; gap:7px; }
.wf-config-section { padding:9px; background:#f6f9fd; border:1px solid var(--line); border-radius:8px; margin-bottom:10px; }
.wf-config-section summary { cursor:pointer; font-weight:700; font-size:12px; margin-bottom:8px; }
.wf-required-check { display:flex; align-items:center; gap:7px; margin:8px 0; font-size:12px; }
.wf-field-config { display:grid; gap:7px; border-top:1px solid var(--line); padding-block:10px; }
.wf-field-config small { color:var(--muted); font-size:11px; }
.wf-field-options[hidden] { display:none; }
.wf-online-form { display:grid; gap:16px; margin-top:14px; }
.wf-online-group { border:1px solid var(--line); border-radius:12px; padding:14px; min-width:0; }
.wf-online-group legend { padding-inline:7px; color:var(--deep); font-weight:700; }
.wf-entry-row { padding-block:12px; border-bottom:1px dashed var(--line); margin-bottom:12px; }
.wf-entry-row > .danger-link { margin-top:10px; }
.wf-mandatory { color:#bf3343; }
.wf-work-copy { white-space:pre-wrap; line-height:1.7; margin:8px 0; }
.wf-rule-copy { color:var(--muted); font-size:12px; }
.wf-saved-form { border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }
.wf-saved-form summary { cursor:pointer; font-weight:700; }
.wf-saved-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-block:12px; }
.wf-saved-grid > div { display:grid; align-content:start; gap:5px; word-break:break-word; }
.wf-saved-grid span { color:var(--muted); font-size:12px; }
.wf-saved-grid strong { white-space:pre-wrap; font-size:13px; }
.wf-template-summary { margin-top:20px; }
.wf-excel-group { border:1px solid var(--line); border-radius:12px; padding:14px; margin-top:14px; background:#fff; }
.wf-excel-head { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.wf-excel-head strong { color:var(--deep); font-size:14px; }
.wf-excel-head span { color:var(--muted); font-size:12px; }
.wf-excel-head .danger-link { margin-left:auto; }
.wf-excel-scroll { overflow:auto; border:1px solid var(--line); border-radius:8px; }
.wf-excel-table { width:100%; border-collapse:collapse; min-width:700px; font-size:13px; }
.wf-excel-table th, .wf-excel-table td { border:1px solid #e7edf6; padding:6px 8px; text-align:left; vertical-align:middle; white-space:nowrap; }
.wf-excel-table th { background:#f3f7fc; color:#526580; font-size:12px; font-weight:700; position:sticky; top:0; }
.wf-excel-table tbody { counter-reset:wfrow; }
.wf-excel-table tbody tr { counter-increment:wfrow; }
.wf-excel-table .wf-excel-index { width:44px; text-align:center; color:var(--muted); }
.wf-excel-table .wf-excel-index::before { content:counter(wfrow); }
.wf-excel-table th.wf-excel-index::before { content:"行"; }
.wf-excel-table input, .wf-excel-table select, .wf-excel-table textarea { width:100%; min-width:110px; border:1px solid #dbe7f5; border-radius:5px; padding:5px 7px; font:inherit; font-size:12px; background:#fff; }
.wf-excel-table input[type="file"] { min-width:150px; }
.wf-excel-table textarea { min-height:34px; resize:vertical; }
.wf-cell-files { font-size:11px; margin-bottom:4px; }
.wf-excel-group[hidden], .wf-online-group[hidden] { display: none; }
.wf-excel-head .wf-excel-hint { margin-left: auto; }
.wf-excel-group > .ghost-button { margin-top:10px; }
.wf-auth-form { margin-top:12px; }
.wf-readonly-form .wf-excel-table input, .wf-readonly-form .wf-excel-table select, .wf-readonly-form .wf-excel-table textarea { pointer-events:none; background:#f8fbff; }

/* 出货授权：模板切换标签 */
.wf-auth-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 12px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.wf-auth-tab { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border:1px solid var(--line); border-radius:9px; background:#fff; color:#40536e; font-size:13px; font-weight:700; transition:.15s; }
.wf-auth-tab:hover { border-color:#8fb8ef; background:#f7fbff; }
.wf-auth-tab.active { border-color:var(--deep); background:#eaf3ff; color:var(--deep-2); box-shadow:0 2px 8px rgba(37,99,201,.12); }
.wf-auth-tab em { font-style:normal; font-size:11px; font-weight:700; padding:1px 7px; border-radius:10px; background:#e3f2e8; color:#22804a; }
.wf-auth-picker { display:grid; grid-template-columns:minmax(220px,320px) 1fr; align-items:end; gap:14px; padding:12px 14px; border:1px solid #e2edfb; border-radius:10px; background:#f7fbff; }
.wf-auth-picker .field { display:grid; gap:5px; }
.wf-auth-picker .field > span { font-size:12px; color:var(--muted); font-weight:700; }
.wf-auth-picker select { width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px; color:var(--ink); background:#fff; }
.wf-auth-picker p { margin:0; font-size:12px; line-height:1.6; color:#5b6d86; }
.wf-auth-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:14px; padding:12px 14px; border-top:1px dashed var(--line); }
.wf-auth-toolbar span { font-size:12px; color:var(--muted); }
.wf-auth-form .wf-excel-group { margin-top:6px; }

/* 订单详情：出货授权表格数据卡片 */
.wf-dispatch-card { margin:14px 0 18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); box-shadow:0 8px 28px rgba(37,99,201,.05); overflow:hidden; }
.wf-dispatch-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 18px; border-bottom:1px solid var(--line); background:linear-gradient(180deg,#f8fbff,#f2f7fe); }
.wf-dispatch-title { display:flex; align-items:center; gap:12px; min-width:0; }
.wf-dispatch-glyph { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:9px; background:#e4efff; color:var(--deep); font-size:17px; font-weight:800; }
.wf-dispatch-title strong { display:block; font-size:15px; color:var(--ink); }
.wf-dispatch-title small { display:block; margin-top:2px; font-size:12px; color:var(--muted); }
.wf-dispatch-badge { flex:none; padding:4px 11px; border-radius:20px; font-size:12px; font-weight:700; border:1px solid transparent; }
.wf-dispatch-badge.current { background:#e6f0ff; color:var(--deep-2); border-color:#c7dcfa; }
.wf-dispatch-badge.saved { background:#e7f5ec; color:#22804a; border-color:#c9e8d5; }
.wf-dispatch-badge.idle { background:#f2f5fa; color:#64748b; border-color:#e0e7f0; }
.wf-dispatch-body { padding:16px 18px 18px; }
.wf-dispatch-meta { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.wf-dispatch-meta > div { padding:11px 13px; border:1px solid #e8f0fa; border-radius:10px; background:#fafcff; }
.wf-dispatch-meta span { display:block; margin-bottom:5px; font-size:11px; font-weight:800; letter-spacing:.05em; color:var(--deep); }
.wf-dispatch-meta p { margin:0; font-size:13px; line-height:1.65; color:#465972; white-space:pre-wrap; }
.wf-dispatch-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:14px 0 4px; }
.wf-dispatch-actions .primary-button, .wf-dispatch-actions .ghost-button { padding:8px 14px; font-size:13px; }
.wf-dispatch-stat { font-size:12px; color:var(--muted); }
.wf-dispatch-empty { display:grid; gap:4px; margin-top:12px; padding:16px; border:1px dashed #cbdcf3; border-radius:10px; background:#fafcff; text-align:center; }
.wf-dispatch-empty strong { font-size:13px; color:#40536e; }
.wf-dispatch-empty span { font-size:12px; color:var(--muted); }
.wf-dispatch-table-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:16px 0 8px; padding-top:14px; border-top:1px solid var(--line); }
.wf-dispatch-table-head strong { font-size:13px; color:var(--ink); }
.wf-dispatch-table-head span { font-size:12px; color:var(--muted); }
.wf-dispatch-table-viewport { max-height:min(52vh,520px); overflow:auto; padding:2px; border:1px solid var(--line); border-radius:10px; background:#fafcff; scrollbar-color:#a9c7ee transparent; }
.wf-dispatch-table-viewport .wf-saved-group { margin:0 0 14px; }
.wf-dispatch-table-viewport .wf-saved-group:last-child { margin-bottom:0; }
.wf-dispatch-table-viewport .wf-saved-group-head { position:sticky; top:0; z-index:3; padding:9px 12px; margin:0; background:#edf4fe; border-bottom:1px solid var(--line); }
.wf-dispatch-table-viewport .wf-excel-scroll { border:0; border-radius:0; }
.wf-dispatch-table-viewport .wf-excel-table th { position:sticky; top:37px; z-index:2; }
.wf-view-scroll { max-height:min(58vh,560px); }
.wf-summary-viewport { max-height:min(66vh,680px); }
.wf-summary-viewport .wf-excel-group { margin-top:0; }
.wf-summary-viewport .wf-excel-group[hidden] { display:none; }
.wf-summary-viewport .wf-excel-head { position:sticky; top:0; z-index:3; background:#edf4fe; border-bottom:1px solid var(--line); }
.wf-summary-viewport .wf-summary-table th { position:sticky; top:37px; z-index:2; }
.wf-summary-table td:nth-child(2) { font-weight:700; color:var(--deep-2); }
.wf-summary-table .link-button { padding:0; font-size:12px; }
.wf-excel-table.wf-readonly-table td { color:#3f5068; background:#fff; }
.wf-excel-table.wf-readonly-table td .danger-link { font-size:12px; }
.wf-excel-table .wf-excel-empty { text-align:center; color:var(--muted); padding:16px; }
.wf-summary-table { min-width:1100px; }
.wf-summary-table td { white-space:normal; min-width:130px; vertical-align:top; }
.wf-summary-table td:nth-child(3) { min-width:170px; }
.wf-summary-table td:nth-child(4) { min-width:120px; }
.wf-summary-table td:nth-child(5) { min-width:150px; }
.graph-progress-panel { overflow:auto; }
.modal-workflow-designer { width:min(1480px,calc(100vw - 32px)); height:min(920px,calc(100vh - 24px)); max-height:calc(100vh - 24px); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; }
.modal-workflow-designer .modal-head { padding:14px 20px 11px; }
.modal-workflow-designer .modal-body { min-height:0; display:flex; flex-direction:column; padding:12px 18px; overflow:hidden; }
.modal-workflow-designer .modal-foot { padding:10px 18px 14px; border-top:1px solid var(--line); }
.approval-template-meta { grid-template-columns:minmax(240px,1fr) minmax(200px,.6fr) minmax(320px,1.4fr); align-items:end; gap:10px; }
.approval-template-meta .full { grid-column:auto; }
.approval-template-meta textarea { min-height:42px; height:42px; resize:vertical; }
.approval-node-editor { min-height:0; display:block; flex:1; padding:0; overflow:hidden; }
.approval-designer-shell { display:grid; grid-template-columns:minmax(700px,1fr) 360px; height:100%; min-height:0; max-height:none; }
.approval-graph-pane { min-width:0; min-height:0; padding:14px 14px 140px; overflow:auto; overscroll-behavior:contain; background:linear-gradient(#eaf2fb 1px,transparent 1px),linear-gradient(90deg,#eaf2fb 1px,transparent 1px),#fbfdff; background-size:24px 24px; }
.approval-graph-toolbar { position:sticky; z-index:5; top:0; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:-14px -14px 10px; padding:10px 14px; border-bottom:1px solid #dbe7f5; background:rgba(251,253,255,.94); backdrop-filter:blur(8px); }
.approval-graph-toolbar > div { display:grid; gap:2px; }
.approval-graph-toolbar small,.approval-graph-toolbar-actions > span { color:var(--muted); font-size:11px; }
.approval-graph-toolbar-actions { display:flex; align-items:center; gap:7px; }
.approval-graph-toolbar-actions > span { padding:4px 8px; border-radius:12px; background:#e9f3ff; color:#2e6fca; font-weight:800; white-space:nowrap; }
.approval-graph-toolbar-actions button { padding:4px 9px; border:1px solid #b8d2f3; border-radius:12px; background:#fff; color:#2868c7; font-size:11px; font-weight:800; cursor:pointer; white-space:nowrap; }
.approval-graph-toolbar-actions button:hover { border-color:#5f98df; background:#eef6ff; }
.workflow-zoom-controls { display:flex; align-items:center; gap:3px; padding:2px; border:1px solid #d3e2f5; border-radius:14px; background:#f7fbff; }
.workflow-zoom-controls button { min-width:25px; padding:2px 7px; border:0; background:transparent; }
.workflow-zoom-controls b { min-width:38px; color:#365d91; font-size:10px; text-align:center; }
.approval-inspector { min-width:0; min-height:0; padding-bottom:100px; overflow:auto; overscroll-behavior:contain; border-left:1px solid #dbe7f5; background:#fff; }
.approval-inspector-title { position:sticky; z-index:4; top:0; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:13px 14px; border-bottom:1px solid var(--line); background:#fff; }
.approval-inspector-title small { color:var(--muted); }
.approval-node-inspector { width:auto; border:0; border-radius:0; box-shadow:none; }
.approval-node-inspector[hidden] { display:none; }
.approval-node-inspector .approval-builder-fields { grid-template-columns:1fr 1fr; padding:12px; }
.approval-node-inspector .approval-builder-fields .assignee-field { grid-column:1/-1; }
.approval-node-inspector .condition-builder { grid-template-columns:1fr; padding:12px; }
.approval-node-inspector .node-graph-config { grid-template-columns:1fr; padding:0 12px 12px; }
.approval-node-inspector .node-component-config { grid-column:auto; }
.approval-node-inspector .check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:130px; overflow:auto; }
.inspector-actions { display:grid; gap:5px; padding:0 12px 14px; }
.inspector-actions small { color:var(--muted); line-height:1.5; }
.inspector-actions .condition-branch-button { background:#e8f7ed; border-color:#91d1a5; color:#227446; }
.connected-workflow-graph { min-width:700px; padding:8px; overflow:visible; }
.connected-workflow-graph.is-editor { position:relative; min-width:0; padding:0; }
.workflow-graph-stage { position:relative; isolation:isolate; display:grid; gap:76px; align-content:start; min-width:700px; min-height:220px; padding:8px 52px 24px; }
.connected-workflow-graph.is-editor .workflow-graph-stage { gap:56px; padding-bottom:110px; }
.connected-workflow-graph.is-editor .workflow-graph-level { gap:68px; }
.workflow-graph-level { position:relative; z-index:2; display:grid; grid-template-columns:repeat(var(--graph-lanes,1),250px); justify-content:center; align-items:center; justify-items:center; gap:90px; min-height:88px; }
.workflow-graph-node { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 8px; width:220px; min-height:88px; margin:0; padding:11px 14px; border:1px solid #9ec2f3; border-radius:13px; background:linear-gradient(135deg,#fff,#f6faff); box-shadow:0 7px 18px rgba(37,99,201,.10); color:var(--ink); text-align:left; font:inherit; }
button.workflow-graph-node { cursor:pointer; }
button.workflow-graph-node:hover { border-color:#4e91e9; transform:translateY(-1px); }
.workflow-graph-node.selected { border-color:#1769d1; box-shadow:0 0 0 3px rgba(23,105,209,.14),0 8px 20px rgba(37,99,201,.12); }
.workflow-graph-node.approval { border-color:#f29a9a; background:linear-gradient(135deg,#fff,#fff5f5); }
.workflow-graph-node.condition { width:250px; padding-left:36px; padding-right:36px; border-color:#69bd82; background:linear-gradient(135deg,#f8fffa,#ebf9ef); clip-path:polygon(12% 0,88% 0,100% 50%,88% 100%,12% 100%,0 50%); }
.workflow-graph-node.end { border-color:#a8b6c9; background:linear-gradient(135deg,#fff,#f1f5f9); }
.workflow-graph-node.current { border-color:#1769d1; box-shadow:0 0 0 4px rgba(23,105,209,.15); }
.workflow-graph-node.done { opacity:.78; }
.workflow-node-kind { grid-column:1; color:#3778cf; font-size:10px; font-weight:800; }
.workflow-graph-node.approval .workflow-node-kind { color:#d55259; }
.workflow-graph-node.condition .workflow-node-kind { color:#24824a; }
.workflow-graph-node.end .workflow-node-kind { color:#64748b; }
.workflow-graph-node strong { grid-column:1/-1; min-width:0; padding-right:2px; overflow-wrap:anywhere; font-size:14px; line-height:1.35; white-space:normal; }
.workflow-graph-node small { grid-column:1/-1; min-width:0; overflow-wrap:anywhere; color:#5c6f88; font-size:11px; line-height:1.35; white-space:normal; }
.workflow-graph-node em { position:absolute; right:10px; top:9px; max-width:78px; overflow:hidden; color:#7b8da4; font-size:10px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.workflow-node-components { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px; margin-top:3px; }
.workflow-node-components .component-chip { margin:0; padding:2px 6px; font-size:9px; }
.workflow-return-mark { position:absolute; right:-7px; bottom:-7px; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#fff0f0; color:#c6535b; box-shadow:0 0 0 1px #efb2b6; font-size:12px; font-weight:900; }
.workflow-graph-svg { position:absolute; z-index:0; inset:0; overflow:visible; pointer-events:none; }
.workflow-forward-edge,.workflow-return-edge { fill:none; stroke:#3e86e8; stroke-width:2; }
.workflow-return-edge { stroke:#d16269; stroke-width:1.8; stroke-dasharray:6 5; stroke-linecap:round; stroke-linejoin:round; }
.workflow-edge-add { position:absolute; z-index:3; display:grid; place-items:center; width:25px; height:25px; padding:0; border:2px solid #fff; border-radius:50%; background:#3e86e8; color:#fff; box-shadow:0 0 0 1px #93b9ec; font-size:17px; line-height:1; transform:translate(-50%,-50%); cursor:pointer; }
.workflow-edge-add:hover { background:#1769d1; transform:translate(-50%,-50%) scale(1.08); }
.connected-workflow-graph:not(.is-editor) .workflow-graph-stage { min-width:720px; }
.connected-workflow-graph:not(.is-editor) .workflow-graph-node { width:200px; min-height:78px; }
.connected-workflow-graph:not(.is-editor) .workflow-graph-level { gap:64px; }
.global-search-results { display:grid; gap:8px; margin-top:14px; max-height:360px; overflow:auto; }
.global-search-item { display:grid; grid-template-columns:64px 130px 1fr; align-items:center; gap:10px; width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.global-search-item:hover { border-color:#85afe4; background:#f5f9ff; }
.global-search-item span { color:#3973c2; font-size:11px; font-weight:800; }
.global-search-item small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-link { appearance:none; border:0; color:#2868c7; text-decoration:none; cursor:pointer; font:inherit; }
.attachment-link:hover { text-decoration:underline; }
.attachment-item { display:inline-flex; align-items:center; margin:2px 4px 2px 0; border:1px solid #d9e6f5; border-radius:999px; background:#eef5ff; overflow:hidden; vertical-align:middle; }
.attachment-item .attachment-link { margin:0; border-radius:0; }
.attachment-delete { min-width:42px; align-self:stretch; border:0; border-left:1px solid #d9e6f5; padding:0 9px; background:#fff3f3; color:#cf3341; cursor:pointer; font-size:12px; font-weight:700; line-height:1; }
.attachment-delete:hover { background:#ffe1e4; }
.attachment-existing { margin:7px 0 9px; padding:9px; border:1px solid #e1eaf5; border-radius:10px; background:#f8fbff; }
.file-queue { display:grid; gap:7px; margin-top:2px; }
.file-queue-summary { color:#2f67b2; font-size:12px; font-weight:700; }
.file-queue-summary.empty { color:var(--muted); font-weight:400; }
.file-queue-list { display:grid; gap:6px; }
.file-queue-item { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:9px; min-width:0; padding:7px 8px 7px 10px; border:1px solid #d9e6f5; border-radius:9px; background:#f7fbff; }
.file-queue-name { min-width:0; overflow:hidden; color:var(--ink); font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.file-queue-preview { width:100%; border:0; padding:0; background:transparent; color:#225fae; text-align:left; cursor:pointer; }
.file-queue-preview:hover { color:#124a91; text-decoration:underline; }
.file-queue-item small { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.file-queue-remove { border:0; border-radius:7px; padding:4px 8px; background:#fff0f1; color:#c83443; font-size:12px; font-weight:700; }
.file-queue-remove:hover { background:#ffdfe2; }
.attachment-preview-backdrop { position:fixed; z-index:220; inset:0; display:grid; place-items:center; padding:24px; background:rgba(10,26,52,.68); }
.attachment-preview-dialog { display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(1120px,100%); max-height:calc(100vh - 48px); overflow:hidden; border-radius:18px; background:#fff; box-shadow:0 26px 70px rgba(5,19,40,.34); }
.attachment-preview-body { min-height:0; padding:14px 20px 18px; overflow:auto; }
.attachment-preview-meta { margin-bottom:10px; color:var(--muted); font-size:12px; }
.attachment-preview-stage { min-height:420px; display:flex; align-items:center; justify-content:center; padding:18px; border:1px solid var(--line); border-radius:14px; background:#f3f7fd; overflow:auto; }
.attachment-preview-image { display:block; max-width:100%; max-height:68vh; object-fit:contain; box-shadow:0 10px 34px rgba(27,62,110,.16); background:#fff; }
.attachment-preview-frame { display:block; width:100%; height:68vh; border:1px solid var(--line); border-radius:12px; background:#fff; }
.attachment-preview-media { display:block; max-width:100%; max-height:68vh; }
.attachment-preview-text { width:100%; min-height:390px; margin:0; color:#22334d; font:13px/1.7 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; }
.attachment-preview-empty { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; border:1px dashed var(--line); border-radius:14px; background:#f7faff; color:var(--muted); }
.attachment-preview-empty strong { color:var(--ink); }
.attachment-preview-actions { display:flex; justify-content:flex-end; gap:8px; padding:13px 20px 17px; border-top:1px solid var(--line); }
.inventory-balance-link { min-width:30px; border:0; border-radius:7px; padding:3px 7px; background:#edf5ff; color:#1f62bd; font-weight:800; font-variant-numeric:tabular-nums; }
.inventory-balance-link:hover { background:#dbeafe; box-shadow:0 0 0 2px rgba(37,99,201,.10); }
.project-member-grid label { align-items:flex-start; }
.project-member-grid label span { display:grid; gap:2px; min-width:0; }
.project-member-grid label small { color:var(--muted); font-size:10px; font-weight:400; overflow-wrap:anywhere; }
.project-resource-fieldset { padding:12px; border:1px solid var(--line); border-radius:12px; }
.project-resource-fieldset legend { padding:0 6px; color:#536681; font-weight:700; }
.project-resource-head,.project-resource-row { display:grid; grid-template-columns:minmax(240px,1.4fr) 90px minmax(180px,1fr) 54px; align-items:center; gap:9px; }
.project-resource-head { padding:0 3px 6px; color:var(--muted); font-size:11px; }
.project-resource-row { margin-bottom:9px; }
.project-resource-row select,.project-resource-row input { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
.project-resource-fieldset > .ghost-button { margin-top:3px; }
.project-milestone-fieldset { padding:12px; border:1px solid var(--line); border-radius:12px; }
.project-milestone-fieldset legend { padding:0 6px; color:#536681; font-weight:700; }
.project-milestone-head,.project-milestone-row { display:grid; grid-template-columns:minmax(260px,1fr) 155px 155px 54px; align-items:center; gap:9px; }
.project-milestone-head { padding:0 3px 6px; color:var(--muted); font-size:11px; }
.project-milestone-row { margin-bottom:9px; }
.project-milestone-row input { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); outline:none; }
.project-milestone-row input:focus { border-color:#78a7e8; box-shadow:0 0 0 3px rgba(59,130,246,.15); }
.project-milestone-fieldset > .ghost-button { margin-top:3px; }
.project-milestone-table td:first-child { min-width:260px; font-weight:700; }
.project-milestone-table td:nth-child(2),.project-milestone-table td:nth-child(3) { min-width:135px; white-space:nowrap; }
.project-finance-fieldset { padding:13px; border:1px solid var(--line); border-radius:12px; }
.project-finance-fieldset legend { padding:0 6px; color:#536681; font-weight:750; }
.project-finance-fieldset > small { display:block; margin-top:8px; color:var(--muted); }
.project-annual-budget-grid { display:grid; grid-template-columns:80px minmax(150px,1fr) 80px minmax(150px,1fr) 80px minmax(150px,1fr); gap:9px; }
.project-annual-budget-grid label { display:grid; gap:5px; }
.project-annual-budget-grid label span { color:var(--muted); font-size:11px; }
.project-annual-budget-grid input,.project-budget-detail-row input { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
.project-budget-detail-head,.project-budget-detail-row { display:grid; grid-template-columns:minmax(165px,.7fr) 150px minmax(240px,1.3fr); align-items:center; gap:9px; }
.project-budget-detail-head { padding:0 4px 7px; color:var(--muted); font-size:11px; }
.project-budget-detail-row { margin-bottom:8px; }
.project-budget-detail-row strong { padding-left:4px; font-size:12px; }
.project-reference-budget-scroll { overflow-x:auto; margin-top:12px; }
.project-reference-budget-head,.project-reference-budget-row { display:grid; grid-template-columns:minmax(200px,1.4fr) repeat(3,minmax(110px,.65fr)) minmax(160px,1fr); gap:9px; align-items:center; min-width:800px; }
.project-reference-budget-head { color:var(--muted); font-size:11px; padding-bottom:8px; }
.project-reference-budget-row { margin-bottom:8px; }
.project-reference-budget-row strong { font-size:12px; }
.project-reference-budget-row input { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
.project-subtitle { margin:18px 0 8px; color:#29476c; font-size:13px; }
.project-document-heading { display:flex; justify-content:space-between; gap:12px; }
.project-document-heading p { margin:-8px 0 12px; color:var(--muted); font-size:12px; }
.project-document-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-document-card { display:grid; gap:7px; min-width:0; padding:14px; border:1px solid #d8e6f6; border-radius:12px; background:linear-gradient(145deg,#fff,#f7fbff); }
.project-document-card.locked { background:#f8fafc; opacity:.76; }
.project-document-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.project-document-card-head strong { color:#152a47; font-size:14px; }
.project-document-card-head span { flex:0 0 auto; padding:4px 8px; border-radius:999px; background:#e7f1ff; color:#1d63b9; font-size:10px; font-weight:800; }
.project-document-card > small { color:#6b7d95; }
.project-document-card > p { min-height:34px; margin:0; color:#415674; font-size:12px; line-height:1.45; }
.project-document-status { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 9px; border-radius:9px; background:#edf5ff; color:#426487; font-size:11px; }
.project-document-status b { color:#175eb7; }
.project-document-status span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-document-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.project-document-actions .attachment-item { margin:0; }
.project-document-actions .attachment-delete { display:none; }
.project-workspace-modal { width:min(1240px,100%); }
.project-workspace { display:grid; gap:16px; }
.project-workflow-map,.project-current-task,.project-workspace-section { border:1px solid var(--line); border-radius:14px; background:#fff; }
.project-workflow-map { padding:15px; background:linear-gradient(180deg,#f8fbff,#fff); }
.project-workflow-map .panel-head { margin-bottom:8px; }
.project-workflow-map .panel-head h3 { margin:0 0 3px; font-size:16px; }
.project-workflow-map .panel-head span { display:block; }
.project-stage-badge { padding:6px 11px; border-radius:999px; background:#e7f1ff; color:#175eb7; font-size:12px; white-space:nowrap; }
.project-flow-scroll { max-height:430px; overflow:auto; border:1px solid #dce8f7; border-radius:12px; background-color:#fbfdff; background-image:linear-gradient(#eaf2fc 1px,transparent 1px),linear-gradient(90deg,#eaf2fc 1px,transparent 1px); background-size:22px 22px; }
.project-flow-scroll .connected-workflow-graph { min-width:780px; }
.project-current-task { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 18px; border-color:#b8d4f7; background:#eff6ff; }
.project-current-task.completed { border-color:#b9dfc5; background:#f0fbf4; }
.project-current-task > div:first-child { display:grid; gap:4px; }
.project-current-task span { color:#58708f; font-size:12px; }
.project-current-task strong { color:#102544; font-size:16px; }
.project-current-task small { color:var(--muted); }
.project-task-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.project-workspace-section { padding:2px 16px 16px; overflow:hidden; }
.project-workspace-section .table-wrap { margin-top:0; }
.workflow-track { display: flex; align-items: center; min-width: 1050px; padding: 10px 0 16px; }
.workflow-node-wrap { display: flex; align-items: center; flex: 1; min-width: 0; }
.workflow-node { width: 150px; min-height: 102px; border: 1px solid #cfdff2; border-radius: 11px; background: white; overflow: hidden; box-shadow: 0 6px 16px rgba(37,99,201,.07); display: grid; align-content: start; }
.workflow-node header { padding: 6px 10px; color: white; background: #5c8fd8; font-size: 11px; font-weight: 800; }
.workflow-node.approval header { background: #ef7474; }
.workflow-node.condition header { background: #68ae72; }
.workflow-node.end header { background: #64748b; }
.workflow-node strong { padding: 10px 10px 1px; font-size: 13px; }
.workflow-node span { padding: 2px 10px 10px; color: var(--muted); font-size: 11px; }
.workflow-arrow { flex: 1; min-width: 24px; color: #89a8cc; text-align: center; font-style: normal; font-size: 22px; }
.workflow-branch { margin: 4px auto 0; width: min(650px,90%); padding: 12px 16px 4px; border-top: 2px solid #d8e5f4; text-align: center; }
.workflow-branch > span { display: inline-block; transform: translateY(-26px); padding: 3px 10px; border-radius: 20px; background: white; color: #5d7798; font-size: 11px; }
.workflow-branch > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: -14px; }
.workflow-branch article { display: grid; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.95); }
.workflow-branch small { color: var(--muted); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .ledger-kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .ledger-detail-grid { grid-template-columns: 1fr; }
  .workflow-template-tabs { grid-template-columns: repeat(2,1fr); }
  .approval-builder-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .condition-builder { grid-template-columns:1fr; }
  .condition-builder .visual-flow-branches { grid-column:auto; }
  .approval-designer-shell { grid-template-columns:minmax(620px,1fr) 330px; }
}
@media (max-width: 900px) {
  .modal-workflow-designer { width:calc(100vw - 20px); }
  .template-editor-head { align-items:flex-start; flex-direction:column; gap:8px; }
  .approval-template-meta { grid-template-columns:1fr; }
  .approval-template-meta .full { grid-column:auto; }
  .approval-designer-shell { grid-template-columns:1fr; max-height:none; }
  .approval-graph-pane { min-height:520px; }
  .approval-inspector { max-height:520px; border-top:1px solid #dbe7f5; border-left:0; }
  .project-milestone-head { display:none; }
  .project-milestone-row { grid-template-columns:1fr 1fr 54px; padding:10px; border:1px solid var(--line); border-radius:10px; }
  .project-milestone-row [data-project-milestone-event] { grid-column:1/-1; }
  .project-annual-budget-grid { grid-template-columns:80px minmax(150px,1fr); }
  .project-budget-detail-head { display:none; }
  .project-budget-detail-row { grid-template-columns:minmax(140px,1fr) minmax(130px,1fr); padding:10px; border:1px solid var(--line); border-radius:10px; }
  .project-budget-detail-row [data-project-budget-detail-note] { grid-column:1/-1; }
  .project-current-task { align-items:flex-start; flex-direction:column; }
  .project-task-actions { justify-content:flex-start; }
  .project-document-grid { grid-template-columns:1fr; }
}
@media (max-height: 760px) and (min-width: 781px) {
  .sidebar { padding: 8px 10px; }
  .brand { padding: 0 8px 5px; }
  .brand-logo { width: 34px; height: 34px; flex-basis: 34px; padding: 4px; }
  .brand strong { font-size: 15px; }
  .brand span { font-size: 11px; }
  .main-nav { gap: 2px; }
  .nav-label { padding: 5px 10px 2px; font-size: 11px; }
  .nav-item { padding: 4px 9px; font-size: 13px; }
  .nav-glyph { width: 22px; height: 22px; border-radius: 6px; }
  .sidebar-foot { padding: 5px 8px 0; gap: 5px; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 242px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .workspace { margin-left: 0; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; place-items: center; border: 1px solid var(--line); background: white; width: 38px; height: 38px; border-radius: 10px; }
  .topbar { padding: 0 15px; }
  .breadcrumb { display: none; }
  .role-switch > span, .notification-button > span, .icon-button, .user-copy, .data-status { display: none; }
  .logout-button { min-height: 36px; padding: 7px 10px; }
  .role-switch { padding-left: 0; border-left: 0; }
  #main-content { padding: 21px 15px 38px; }
  .page-head { display: grid; }
  .page-head .button-row { width: 100%; }
  .kpi-grid, .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .ledger-kpi-grid { grid-template-columns:1fr; }
  .ledger-filters { justify-content:flex-start; }
  .field.full { grid-column: auto; }
  .check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-permission-form { grid-template-columns: 1fr; }
  .workflow-template-tabs { grid-template-columns: 1fr; }
  .node-graph-config { grid-template-columns:1fr; }
  .node-component-config { grid-column:auto; }
  .status-flow { grid-template-columns: repeat(2,1fr); }
  .search-input { min-width: 100%; width: 100%; }
  .table-tools { display: grid; }
  .order-list-filters { align-self: auto; flex-wrap: wrap; }
  .order-list-filters .search-input, .order-list-filters .select-input { width: 100%; min-width: 100%; }
  .modal-backdrop { padding: 12px; }
  .stat-strip { grid-template-columns: 1fr; }
  .log-list > div { grid-template-columns: 1fr; gap: 3px; }
  .full-detail { grid-column: auto; }
  .project-resource-head { display:none; }
  .project-resource-row { grid-template-columns:1fr 90px; }
  .project-resource-row [data-project-resource-purpose] { grid-column:1/-1; }
  .project-annual-budget-grid { grid-template-columns:1fr 1fr; }
  .project-budget-detail-row { grid-template-columns:1fr; }
  .project-budget-detail-row [data-project-budget-detail-note] { grid-column:auto; }
}

@media (max-width: 480px) {
  .topbar { padding-inline: 10px; }
  .topbar-actions { gap: 7px; }
  .user-menu { gap: 6px; padding-left: 7px; }
  .change-password-button { padding-inline: 8px; }
  .logout-button { width: 36px; padding: 0; }
  .logout-label { display: none; }
  #role-select { max-width: 76px; }
}
@media (max-width: 360px) {
  .user-menu .user-avatar { display: none; }
}

/* 出货授权表格弹窗：默认放大，右上角一键全屏 / 还原（只切 class，不重建表单） */
.modal-head-actions { display:flex; align-items:center; gap:8px; flex:none; }
.modal-expand-button { border:1px solid #b9d2f2; border-radius:9px; background:#f1f7ff; color:var(--deep-2); padding:7px 12px; font-size:12px; font-weight:700; line-height:1.3; white-space:nowrap; }
.modal-expand-button:hover { border-color:#8fb8ef; background:#e3f0ff; }
.modal-expand-button[aria-pressed="true"] { border-color:var(--deep); background:#dceaff; }

.modal-dispatch-table { width:min(1600px,calc(100vw - 48px)); max-height:calc(100vh - 48px); display:flex; flex-direction:column; overflow:hidden; }
.modal-dispatch-table .modal-head, .modal-dispatch-table .modal-foot { flex:none; }
.modal-dispatch-table .modal-head { align-items:center; padding:15px 20px 12px; }
.modal-dispatch-table .modal-body { flex:1 1 auto; min-height:0; overflow:auto; padding:16px 20px; }
.modal-dispatch-table .modal-foot { padding:12px 20px 16px; }

.modal-backdrop.modal-backdrop-fullscreen { padding:0; }
.modal-backdrop.modal-backdrop-fullscreen .modal-dispatch-table { width:100vw; height:100dvh; max-height:none; border-radius:0; }
.modal-backdrop.modal-backdrop-fullscreen .modal-dispatch-table .modal-body { padding:12px 16px; }

/* 表格列按内容铺开，避免窄弹窗把列压在一起；纵向统一交给弹窗主体滚动 */
.modal-dispatch-table .wf-excel-table { width:max-content; min-width:100%; }
.modal-dispatch-table .wf-excel-table th, .modal-dispatch-table .wf-excel-table td { padding:9px 11px; }
.modal-dispatch-table .wf-excel-table th { min-width:110px; max-width:190px; line-height:1.35; white-space:normal; }
.modal-dispatch-table .wf-excel-table input, .modal-dispatch-table .wf-excel-table select, .modal-dispatch-table .wf-excel-table textarea { min-width:112px; max-width:240px; }
.modal-dispatch-table .wf-readonly-table td { min-width:120px; max-width:280px; vertical-align:top; white-space:normal; word-break:break-word; }
.modal-dispatch-table .wf-summary-table { min-width:100%; }
.modal-dispatch-table .wf-summary-table td:nth-child(n+6) { min-width:104px; }
.modal-dispatch-table .wf-summary-viewport, .modal-dispatch-table .wf-dispatch-table-viewport { max-height:none; overflow:visible; }
.modal-dispatch-table .wf-excel-scroll, .modal-dispatch-table .wf-view-scroll { max-height:calc(100vh - 320px); }
.modal-backdrop-fullscreen .modal-dispatch-table .wf-excel-scroll, .modal-backdrop-fullscreen .modal-dispatch-table .wf-view-scroll { max-height:calc(100dvh - 260px); }
/* 外层不再滚动，表头改为紧贴表格容器顶部，避免 37px 的错位空白 */
.modal-dispatch-table .wf-summary-viewport .wf-excel-head, .modal-dispatch-table .wf-dispatch-table-viewport .wf-saved-group-head { position:static; }
.modal-dispatch-table .wf-summary-table th, .modal-dispatch-table .wf-excel-table th { top:0; }
.modal-dispatch-table .wf-excel-table input[type="file"] { min-width:150px; }
/* 列数很多时仍可能横向滚动，固定行号列便于对照填写 */
.modal-dispatch-table .wf-excel-table th:first-child, .modal-dispatch-table .wf-excel-table td:first-child { position:sticky; left:0; z-index:2; background:#f4f7fc; }
.modal-dispatch-table .wf-excel-table th:first-child { z-index:3; }
