﻿:root {
  --ink: #17202a;
  --muted: #64748b;
  --line: #d9dde3;
  --paper: #f4f6f8;
  --white: #ffffff;
  --top: #202020;
  --blue: #2f86de;
  --green: #38a852;
  --shadow: 0 14px 40px rgba(15, 23, 42, .10);
  --shadcn-bg: #f8fafc;
  --shadcn-card: #ffffff;
  --shadcn-border: #e2e8f0;
  --shadcn-ring: rgba(37, 99, 235, .18);
  --shadcn-radius: 12px;
  --user-font-size: 16px;
  --user-background-image: none;
  --user-background-opacity: .72;
  --user-background-scrim-opacity: .62;
  --sidebar-surface-opacity: .92;
  --sidebar-text-opacity: 1;
  --login-background-image: none;
  --login-background-opacity: 0;
  --corner-radius: 14px;
  --corner-radius-sm: max(8px, calc(var(--corner-radius) - 6px));
  --corner-radius-lg: calc(var(--corner-radius) + 6px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: var(--user-font-size);
  letter-spacing: 0;
  overflow: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
}

body::before {
  z-index: 0;
  background: var(--user-background-image) center / cover no-repeat;
}

body::after {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(244, 246, 248, .76), rgba(244, 246, 248, .88)),
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
}

body.has-user-background::before,
body.has-user-background::after {
  opacity: 1;
}

body.has-user-background::before { opacity: var(--user-background-opacity); }
body.has-user-background::after { opacity: var(--user-background-scrim-opacity); }

.login-screen,
.app-shell,
.toast {
  position: relative;
  z-index: 1;
}

button, a, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(20, 83, 45, .10), transparent 32%),
    linear-gradient(305deg, rgba(245, 158, 11, .12), transparent 30%),
    #eaf3fb;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-screen::before {
  background: var(--login-background-image) center / cover no-repeat;
  opacity: var(--login-background-opacity);
  transition: opacity .28s ease;
}

.login-screen::after {
  background:
    linear-gradient(180deg, rgba(245, 248, 252, .28), rgba(233, 239, 246, .70)),
    linear-gradient(90deg, rgba(47,134,222,.12) 1px, transparent 1px),
    linear-gradient(rgba(56,168,82,.10) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  animation: loginGridDrift 16s linear infinite;
}

.login-stage {
  width: min(940px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: stretch;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(148, 163, 184, .42);
  background: rgba(255,255,255,.42);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .16);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
  overflow: hidden;
}

.login-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.34), transparent 34%, rgba(255,255,255,.22) 68%, transparent);
}

.login-showcase {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .28), rgba(255,255,255,.10)),
    var(--login-background-image) center / cover no-repeat,
    linear-gradient(135deg, rgba(15, 23, 42, .86), rgba(30, 64, 112, .74));
  color: #fff;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255,255,255,.28);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.06)),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.login-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, .44));
}

.login-track {
  position: absolute;
  right: 42px;
  top: 40px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  transform: rotate(16deg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: glassFloat 6s ease-in-out infinite;
}

.login-track.second {
  left: 46px;
  right: auto;
  top: 86px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border-color: rgba(250, 204, 21, .42);
  background: rgba(250, 204, 21, .10);
  animation-delay: -2s;
}

.showcase-copy {
  position: relative;
  z-index: 1;
}

.showcase-copy span {
  display: block;
  color: #facc15;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.showcase-copy strong {
  display: block;
  width: min(360px, 100%);
  font-size: 34px;
  line-height: 1.18;
}

.login-card {
  width: 100%;
  position: relative;
  z-index: 1;
  align-self: center;
  background: rgba(255,255,255,.86);
  border-left: 1px solid rgba(226, 232, 240, .82);
  box-shadow: -18px 0 40px rgba(15, 23, 42, .08);
  padding: 42px 34px;
  animation: loginCardIn .48s ease both, loginCardBreath 7s ease-in-out infinite .6s;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.auth-card {
  display: grid;
  gap: 12px;
}

.auth-card form {
  display: grid;
  gap: 0;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 6px 0 4px;
}

.auth-mode-switch .ghost-button {
  background: #edf4fb;
  color: #334155;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
}

.auth-mode-switch .ghost-button.selected {
  background: linear-gradient(135deg, #1687f0, #22a06b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(24, 144, 255, .22);
}

.login-logo, .brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
  border-radius: 14px;
  overflow: hidden;
}

.login-logo img,
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}

.login-card h1 { margin: 18px 0 8px; font-size: 30px; }
.login-card p { color: var(--muted); margin-bottom: 22px; line-height: 1.7; }
.login-card label { display: grid; gap: 8px; margin-bottom: 16px; font-weight: 700; }
.login-card input {
  height: 46px;
  border: 1px solid #cbd5e1;
  padding: 0 14px;
  outline: none;
  background: rgba(248, 250, 252, .84);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-card input:focus {
  border-color: #1687f0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 144, 255, .12);
}
.login-card .remember-login-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  color: #53657d;
  font-size: 13px;
  line-height: 1.4;
}
.login-card .remember-login-row input {
  width: 16px;
  height: 16px;
  padding: 0;
  flex: 0 0 auto;
}
.login-card select { height: 46px; border: 1px solid #cfd6df; padding: 0 12px; outline-color: var(--blue); background: #fff; }
.login-card .primary-button {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #1687f0, #22a06b);
  box-shadow: 0 14px 28px rgba(24, 144, 255, .22);
}
.login-error { min-height: 22px; margin-top: 12px; color: #d33; }

@media (max-width: 820px) {
  .login-screen { padding: 18px; }
  .login-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-showcase {
    min-height: 190px;
    padding: 28px;
  }
  .showcase-copy strong {
    font-size: 24px;
  }
  .login-card {
    border-left: 0;
    border-top: 1px solid rgba(226, 232, 240, .82);
    box-shadow: none;
    padding: 30px 24px;
  }
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  grid-template-rows: 66px 1fr;
  overflow: hidden;
  font-size: var(--user-font-size);
}

.topbar {
  grid-column: 1 / -1;
  height: 66px;
  background: var(--top);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
  z-index: 5;
  font-size: var(--user-font-size);
}

.brand, .top-actions { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; }
.brand strong { display: block; font-size: calc(var(--user-font-size) * 1.35); }
.brand span:last-child { display: block; color: #b7bec8; font-size: calc(var(--user-font-size) * .82); margin-top: 2px; }

.ghost-button, .icon-button, .user-button, .logout-button, .primary-button, .text-button {
  border: 0;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.ghost-button, .primary-button {
  background: #1890ff;
  color: #fff;
  padding: 10px 16px;
  font-weight: 800;
}

.ghost-button { border-radius: 8px; }
.primary-button:hover, .ghost-button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(24,144,255,.25); }
.icon-button, .user-button, .logout-button { color: #fff; background: transparent; min-height: 36px; }
.icon-button { width: 36px; font-size: 22px; }
.logout-button { color: #d8dee7; border-left: 1px solid rgba(255,255,255,.14); padding-left: 12px; }

.user-menu {
  position: relative;
}

.user-button span {
  display: inline-block;
  margin-left: 4px;
  transition: transform .18s ease;
}

.user-menu.open .user-button span {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  display: none;
  gap: 10px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #dce4ee;
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
  z-index: 20;
}

.user-menu.open .user-dropdown {
  display: grid;
  animation: riseIn .16s ease both;
}

.user-dropdown label {
  display: grid;
  gap: 6px;
  color: #53657d;
  font-weight: 800;
}

.user-dropdown input {
  height: 36px;
  border: 1px solid #d7dde5;
  padding: 0 10px;
  outline-color: var(--blue);
}

.user-dropdown .primary-button,
.user-dropdown .neutral-button,
.user-dropdown .menu-logout {
  width: 100%;
  min-height: 38px;
}

.user-dropdown .neutral-button {
  background: #f8fafc;
  border: 1px solid #d7dde5;
}

.user-dropdown .menu-logout {
  border-left: 0;
  padding: 8px 12px;
  background: #eef2f6;
  color: #334155;
  font-weight: 800;
}

.sidebar {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)), rgba(233, 236, 239, var(--sidebar-surface-opacity));
  border-right: 1px solid var(--line);
  overflow: visible;
  min-height: 0;
  transition: transform .28s ease;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.collapse-handle {
  position: absolute;
  right: -34px;
  top: 52%;
  width: 34px;
  height: 88px;
  border: 0;
  background: rgba(225, 229, 234, var(--sidebar-surface-opacity));
  color: rgba(129, 144, 164, var(--sidebar-text-opacity));
  border-radius: 0 8px 8px 0;
  z-index: 2;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.menu {
  height: calc(100vh - 66px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 24px;
  scrollbar-gutter: stable;
  font-size: var(--user-font-size);
}

.menu::-webkit-scrollbar { width: 8px; }
.menu::-webkit-scrollbar-thumb { background: #b9c3d0; border-radius: 8px; }
.menu::-webkit-scrollbar-track { background: transparent; }
.menu-section { border-bottom: 1px solid #dfe3e8; }

.menu-title {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(16, 32, 51, var(--sidebar-text-opacity));
  text-align: left;
  font-weight: 800;
}

.menu-title b { margin-left: auto; color: rgba(154, 164, 178, var(--sidebar-text-opacity)); transition: transform .2s ease; }
.menu-section.open .menu-title b { transform: rotate(180deg); }
.submenu { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .28s ease, opacity .2s ease; }
.menu-section.open .submenu { max-height: 360px; opacity: 1; }

.menu-section a {
  display: block;
  color: rgba(100, 116, 139, var(--sidebar-text-opacity));
  text-decoration: none;
  padding: 0 18px 0 54px;
  line-height: 42px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.menu-section a:hover, .menu-section a.active { background: #f7f9fb; color: var(--blue); }

.menu-home a {
  padding-left: 24px;
  font-weight: 900;
  color: rgba(16, 32, 51, var(--sidebar-text-opacity));
  max-height: none;
  opacity: 1;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 64px;
  font-size: var(--user-font-size);
  scroll-behavior: smooth;
}

.global-record {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 8px 16px 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.84));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.global-record a {
  color: rgba(23, 32, 42, .78);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
}

.global-record a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  background: linear-gradient(#f7f8fa, #eef1f4);
  border-bottom: 1px solid #c8cdd4;
  margin: 0 -24px 26px;
  padding-left: 24px;
  overflow-x: auto;
}

.tab {
  height: 42px;
  min-width: 150px;
  padding: 0 18px;
  border: 1px solid #c8cdd4;
  border-bottom: 0;
  background: linear-gradient(#f7f7f7, #e1e4e8);
  border-radius: 8px 8px 0 0;
  color: #334155;
  animation: tabIn .32s cubic-bezier(.22, .82, .22, 1) both;
  transition: transform .36s cubic-bezier(.22, .82, .22, 1), background .36s ease, color .28s ease, box-shadow .36s ease;
}

.tab.active {
  background: var(--white);
  color: var(--ink);
  transform: translateY(1px);
  box-shadow: 0 -8px 22px rgba(15, 23, 42, .06);
}
.tab-close { color: #9aa4b2; margin-left: 10px; font-weight: 900; }

.view {
  animation: pageSoftIn .58s cubic-bezier(.18, .82, .22, 1) both;
}
.view:not(.active) { display: none; }
.view.workbench-hidden { display: none; }

.workspace.is-switching .view.active,
.workspace.is-switching .hero-panel,
.workspace.is-switching .role-panel,
.workspace.is-switching .stats-grid,
.workspace.is-switching .content-grid {
  opacity: .28;
  transform: translateY(8px) scale(.995);
  filter: saturate(.96);
  transition: opacity .28s ease, transform .34s cubic-bezier(.22, .82, .22, 1), filter .28s ease;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy, .pack-visual, .role-panel article, .panel, .stats-grid article, .page-view {
  background: var(--white);
  border: 1px solid #e1e5ea;
  box-shadow: var(--shadow);
  transition: transform .42s cubic-bezier(.22, .82, .22, 1), box-shadow .42s ease, border-color .32s ease, background .32s ease;
}

.hero-copy {
  min-height: 210px;
  padding: 30px 34px;
  display: grid;
  align-content: center;
}
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: calc(var(--user-font-size) * .75); font-weight: 900; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: calc(var(--user-font-size) * 2); line-height: 1.25; margin-bottom: 12px; }
.hero-copy p:not(.eyebrow), .role-panel p, .panel p, .side-card p { color: var(--muted); line-height: 1.8; }

.role-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.role-switch button { border: 1px solid #cfd6df; background: #f7f9fb; padding: 10px 16px; transition: background .2s ease, color .2s ease; }
.role-switch button.selected { background: var(--blue); color: #fff; border-color: var(--blue); }

.font-preference-panel {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 88px auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #dbe5ef;
  background: linear-gradient(180deg, #fbfdff, #f4f8fc);
  max-width: 720px;
}

.font-preference-panel > div {
  display: grid;
  gap: 2px;
}

.font-preference-panel strong {
  color: #102033;
  font-weight: 900;
}

.font-preference-panel span {
  color: var(--blue);
  font-weight: 900;
}

.font-preference-panel input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.font-preference-panel input[type="number"] {
  min-height: 36px;
  border: 1px solid #d7dde5;
  padding: 0 8px;
}

.pack-visual {
  min-height: 210px;
  padding: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.pack-visual .box-art,
.pack-visual .flow-line {
  display: none;
}

.pack-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(47,134,222,.08) 1px, transparent 1px),
    linear-gradient(rgba(56,168,82,.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.box-art { width: 190px; height: 150px; position: relative; animation: floatBox 4s ease-in-out infinite; }
.box-lid { width: 170px; height: 54px; background: #e9b872; transform: skewX(-24deg); position: absolute; top: 12px; left: 20px; border: 2px solid #c1883f; }
.box-face { position: absolute; left: 12px; top: 58px; width: 176px; height: 92px; background: #d79a4a; border: 2px solid #a96c2d; display: grid; place-items: center; color: #fff; font-weight: 900; box-shadow: inset 0 -16px 0 rgba(0,0,0,.08); padding: 10px; }
.box-face img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }

.user-hero-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  width: min(100%, 520px);
  min-height: 180px;
  margin: 0;
  color: #17202a;
  text-align: center;
  animation: avatarFloat 4.6s ease-in-out infinite;
}

.user-hero-card.preview {
  min-height: 190px;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(47,134,222,.06) 1px, transparent 1px),
    linear-gradient(rgba(56,168,82,.06) 1px, transparent 1px),
    #fbfdff;
  background-size: 28px 28px;
  border: 1px solid #e1e8f0;
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #eef6ff;
  color: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
  font-size: 34px;
  font-weight: 900;
}

.user-hero-card strong {
  font-size: calc(var(--user-font-size) * 1.55);
  line-height: 1.25;
  text-shadow: 0 8px 24px rgba(56, 174, 234, .18);
}

.greeting-word {
  color: #17202a;
}

.greeting-name {
  color: #38aeea;
}

.flow-line { position: relative; z-index: 1; width: min(100%, 420px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.flow-line span { background: #fff; border: 1px solid #d8dee7; color: #475569; text-align: center; padding: 8px 6px; }

.role-panel, .stats-grid, .content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.role-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-panel article {
  padding: 20px;
  border-top: 4px solid var(--blue);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
}
.role-panel article:nth-child(2) { border-top-color: #f59e0b; }
.mini-icon { width: 34px; height: 34px; display: grid; place-items: center; background: #eef6ff; color: var(--blue); margin: 0; font-weight: 900; }
.role-panel article:nth-child(2) .mini-icon { background: #fff7ed; color: #c2410c; }
.role-panel h3 { margin-bottom: 6px; }
.role-panel p { grid-column: 2; margin-bottom: 0; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid article, .panel, .page-view { padding: 20px; }
.stats-grid b { display: block; font-size: calc(var(--user-font-size) * 1.75); margin-bottom: 6px; }
.stats-grid span { color: var(--muted); }
.stats-grid article.stat-card-action {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.stats-grid article.stat-card-action:hover,
.stats-grid article.stat-card-action:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(30, 144, 255, .38);
  box-shadow: 0 14px 28px rgba(30, 64, 175, .12);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  outline: none;
}
.content-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }

.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-title h2 { margin: 0; font-size: calc(var(--user-font-size) * 1.35); }
.text-button { color: var(--blue); background: #eef6ff; padding: 8px 12px; }

.process-board { display: grid; gap: 12px; }
.process-item { display: grid; grid-template-columns: 170px 1fr 90px; gap: 12px; align-items: center; padding: 14px; border: 1px solid #e6eaf0; background: #fbfcfd; }
.progress-track { height: 10px; background: #e8edf3; overflow: hidden; }
.progress-fill { height: 100%; width: var(--value); background: linear-gradient(90deg, var(--blue), var(--green)); animation: fillGrow .8s ease both; }

.material-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.material-card { border: 1px solid #e3e7ec; background: #fbfcfd; }
.material-card h3 { margin: 0; padding: 12px; background: #eceff2; font-size: 16px; }
.material-card p { margin: 0; padding: 10px 12px; border-top: 1px solid #edf0f4; }
.badge { display: inline-block; min-width: 24px; padding: 2px 7px; color: #fff; background: var(--blue); font-weight: 800; text-align: center; }
.badge.done { background: var(--green); }
.badge.active { background: #f59e0b; }

.module-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.module-table {
  overflow: auto;
  border: 1px solid #dbe3ec;
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px 12px; border-bottom: 1px solid #edf0f4; text-align: left; }
th { background: #f1f4f7; }
.status { display: inline-block; padding: 4px 9px; background: #eef6ff; color: var(--blue); font-weight: 800; }
.module-side { display: grid; gap: 12px; }
.side-card { border: 1px solid #e1e5ea; padding: 16px; background: #fbfcfd; }

.permission-board { display: grid; gap: 18px; }
.permission-card {
  border: 1px solid #dbe3ec;
  background: rgba(255,255,255,.88);
  padding: 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
.permission-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.permission-head h3 { margin-bottom: 4px; }
.permission-head p { color: var(--muted); margin: 0; }
.permission-head span { color: var(--blue); font-weight: 800; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.role-group-head h4 { margin: 0; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.check-card { display: flex; align-items: center; gap: 10px; border: 1px solid #dbe2ea; background: #fff; padding: 12px; }
.check-card input { width: 18px; height: 18px; accent-color: var(--blue); }

.breadcrumb {
  margin: -8px 0 18px;
  color: #475569;
}

.order-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #eef7fb;
  border: 1px solid #d9e5ee;
}

.order-section-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.order-section-tabs button {
  border: 1px solid #cfd8e3;
  background: #fff;
  color: #475569;
  padding: 9px 14px;
  font-weight: 900;
}

.order-section-tabs button.active {
  border-color: var(--blue);
  background: #eef6ff;
  color: var(--blue);
}

.order-section-tabs b {
  margin-left: 6px;
}

.quote-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quote-category-tabs button {
  border: 1px solid #cfd8e3;
  background: #fff;
  color: #475569;
  padding: 9px 14px;
  font-weight: 900;
}

.quote-category-tabs button.active {
  border-color: var(--blue);
  background: #eef6ff;
  color: var(--blue);
}

.quote-category-tabs b {
  margin-left: 6px;
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  border: 1px solid #d9e5ee;
  background: #fff;
  color: #53657d;
  font-weight: 800;
}

.list-pagination.compact {
  justify-content: flex-end;
}

.list-pagination > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.list-pagination button {
  border: 1px solid #cfd8e3;
  background: #fff;
  color: #475569;
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  font-weight: 900;
}

.list-pagination button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.list-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.order-toolbar input,
.order-toolbar select,
.user-create-form input,
.user-create-form select,
.form-grid input,
.form-grid select,
.wide-field textarea {
  border: 1px solid #d7dde5;
  background: #fff;
  min-height: 36px;
  padding: 0 10px;
  outline-color: var(--blue);
}

.order-count {
  display: flex;
  justify-content: space-between;
  color: #475569;
  margin: 8px 0 14px;
}

.order-table-wrap {
  overflow: auto;
  border: 1px solid #dbe2ea;
  background: #fff;
}

.order-table {
  min-width: 1480px;
}

.order-table th {
  white-space: nowrap;
}

.layout-image-head {
  display: inline-grid;
  justify-items: center;
  gap: 5px;
}

.table-mini-button {
  border: 1px solid #b7d7f8;
  background: #eef6ff;
  color: var(--blue);
  cursor: pointer;
  padding: 3px 8px;
  font-size: calc(var(--user-font-size) * .82);
  font-weight: 800;
}

.table-mini-button:hover {
  background: #dceeff;
}

.order-table td {
  vertical-align: middle;
  text-align: center;
  height: 104px;
}

.order-title-cell {
  max-width: 260px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-table .file-links {
  max-height: 78px;
  overflow: auto;
}

.order-id {
  background: #eef8ff;
  color: #264b70;
  font-weight: 700;
}

.sub-order-group-row td {
  background: #f7fbff;
  border-top: 2px solid #d5e7fb;
}

.sub-order-group-row .order-id {
  text-align: left;
  min-width: 130px;
}

.sub-order-group-row .order-id small {
  display: block;
  margin: 4px 0 0 30px;
  color: #64748b;
  font-size: calc(var(--user-font-size) * .82);
  font-weight: 700;
}

.sub-order-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid #b7cde5;
  background: #fff;
  color: #1f6fbf;
  cursor: pointer;
  margin-right: 6px;
  font-weight: 900;
}

.sub-order-child-row td {
  background: #fffaf0;
}

.sub-order-id {
  position: relative;
  padding-left: 24px;
}

.sub-order-line {
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 6px;
  vertical-align: middle;
  background: #9fb8d2;
}

.sub-order-summary {
  color: #1f6fbf;
  font-weight: 800;
}

.pending-row {
  background: #fffaf0;
}

.soft-tag,
.danger-tag,
.step-badge,
.step-gap,
.delete-note {
  display: inline-block;
  padding: 6px 10px;
  background: #eef0f2;
  color: #233142;
  border-radius: 4px;
}

.danger-tag {
  background: #e34b4b;
  color: #fff;
}

.delete-note {
  display: block;
  margin-top: 6px;
  background: #fff1f2;
  color: #d11;
}

.process-chain {
  max-width: 100%;
  min-height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}

.step-badge {
  background: #edf0f2;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.step-gap {
  background: #f4f6f8;
  color: #7a8699;
  padding-inline: 8px;
}

.step-badge.done {
  background: #dff6e6;
  color: #208b3a;
}

.step-badge.active {
  background: #1d72d2;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(29, 114, 210, .14);
}

.red-text {
  color: #f00;
}

.row-actions {
  display: grid;
  gap: 8px;
}

.inline-actions {
  display: flex;
  min-width: 220px;
  justify-content: center;
  flex-wrap: wrap;
}

.transfer-box {
  margin-top: 12px;
}

.compact-transfer {
  width: fit-content;
}

.compact-transfer[open] {
  width: 100%;
}

.compact-transfer summary {
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
  border: 1px solid #cfd8e3;
  background: #fff;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: #17406d;
  font-weight: 700;
  list-style: none;
}

.compact-transfer summary::-webkit-details-marker {
  display: none;
}

.compact-transfer summary::before {
  content: "鈫?;
  margin-right: 6px;
  color: #2b7fd8;
}

.transfer-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.transfer-box input,
.audit-reason select {
  border: 1px solid #d9e1ea;
  min-height: 36px;
  padding: 0 10px;
  background: #fff;
}

.transfer-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.transfer-target-button {
  min-height: 36px;
  white-space: nowrap;
}

.worker-process-editor {
  border: 1px solid #d9e4ef;
  background: #f8fbff;
  padding: 14px;
  margin-top: 12px;
}

.worker-process-editor h4 {
  margin: 0 0 10px;
}

.worker-process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 14px;
  margin-bottom: 10px;
}

.worker-process-editor textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid #d9e1ea;
  padding: 10px;
  margin-bottom: 10px;
}

.order-process-setup {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d9e4ef;
  background: #f7fbff;
}

.order-process-setup h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.order-process-setup p {
  margin: 0 0 12px;
  color: var(--muted);
}

.quote-production-process-setup {
  margin-top: 12px;
}

.quote-production-process-setup h3 {
  margin-bottom: 10px;
}

.selected-process-flow {
  border: 1px solid #cfe0f4;
  background: #fff;
  padding: 10px;
}

.selected-process-flow header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  color: #0f2a55;
}

.selected-process-flow header span,
.selected-process-list em {
  color: var(--muted);
  font-style: normal;
}

.selected-process-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  align-items: center;
}

.selected-process-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #b8d4f6;
  background: #eef6ff;
  color: #0f4f99;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: grab;
  font-weight: 800;
}

.selected-process-pill b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #0b7cff;
  color: #fff;
  font-size: 12px;
}

.selected-process-pill span {
  color: #c92a2a;
  cursor: pointer;
  font-weight: 900;
}

.selected-process-flow.readonly {
  background: #f8fbff;
}

.selected-process-flow.readonly header {
  margin-bottom: 10px;
}

.selected-process-pill.readonly {
  cursor: default;
  border-color: #c8d9ee;
  background: #eef5ff;
  color: #163760;
}

.selected-process-pill.dragging {
  opacity: .55;
}

.quote-order-subquotes {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.quote-order-subquotes article {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(120px, 1fr) minmax(150px, 210px) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid #dbeafe;
  background: #fff;
  padding: 8px 10px;
}

.quote-order-subquotes em {
  font-style: normal;
  color: #17406d;
  font-weight: 800;
  background: #eef6ff;
  border: 1px solid #cfe2f8;
  padding: 5px 8px;
  justify-self: start;
}

.quote-order-subquotes small {
  grid-column: 1 / -1;
  color: #64748b;
}

.order-stage-note {
  margin: 14px 0;
  background: #f8fbff;
}

.quote-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.quote-config-grid article {
  border: 1px solid #dfe6ef;
  background: #fff;
  padding: 18px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quote-config-grid article:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .1);
  transform: translateY(-2px);
}

.quote-config-grid h3 {
  margin: 0 0 10px;
}

.quote-config-grid p {
  margin: 0;
  color: #5d6b80;
  line-height: 1.8;
}

.quote-config-flow {
  display: inline-block;
  margin-bottom: 10px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.quote-readonly input,
.quote-readonly select,
.quote-readonly textarea {
  background: #f3f6fa;
  color: #475569;
  cursor: default;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.department-grid section {
  border: 1px solid #dfe6ef;
  background: #fff;
  padding: 14px;
}

.department-grid strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.department-grid p {
  margin: 0 0 8px;
  color: #53657d;
}

.department-grid span {
  color: #2f7fd6;
  font-weight: 700;
}

.quote-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.quote-admin-grid label {
  display: grid;
  gap: 6px;
  color: #53657d;
}

.quote-admin-grid input,
.quote-admin-grid select,
.quote-admin-grid textarea {
  min-height: 40px;
  border: 1px solid #cfd8e3;
  padding: 0 11px;
  background: #fff;
  outline-color: var(--blue);
}

.quote-admin-grid textarea {
  min-height: 82px;
  padding: 8px 10px;
  resize: vertical;
}

.quote-admin-grid input[disabled] {
  background: #f6f8fb;
  color: #64748b;
}

.module-position-list,
.font-rule-list {
  display: grid;
  gap: 12px;
}

.module-position-row {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) 80px auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce4ee;
  background: #fff;
}

.module-position-row > input,
.font-rule-row input,
.font-rule-row select {
  min-height: 36px;
  border: 1px solid #d7dde5;
  padding: 0 10px;
  background: #fff;
}

.module-position-row > span {
  color: #64748b;
  font-weight: 800;
}

.font-rule-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce4ee;
  background: #fff;
}

.font-rule-title {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.font-rule-title b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 900;
}

.font-rule-row label {
  display: grid;
  gap: 6px;
  color: #53657d;
  font-weight: 800;
}

.quote-modal {
  width: min(1020px, 92vw);
  max-height: 80vh;
  font-size: 12px;
  border-radius: 4px;
  overflow: hidden;
}

.quote-page-editor {
  background: #eef3f8;
  border: 1px solid #dce4ee;
  min-height: calc(100vh - 190px);
}

.quote-page-editor .quote-modal {
  width: 100%;
  max-height: none;
  box-shadow: none;
  border-radius: 0;
}

.quote-page-editor .modal-title {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

.quote-page-editor .quote-builder {
  max-height: none;
  overflow: visible;
}

.quote-page-editor .modal-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 3;
}

.quote-builder {
  display: grid;
  grid-template-columns: 132px minmax(360px, 1fr) 238px;
  gap: 10px;
  overflow: auto;
  padding: 10px;
  background: linear-gradient(180deg, #f7f9fc, #eef3f8);
}

#quoteModal.quote-normal .quote-modal {
  width: min(1260px, 96vw);
  max-height: 86vh;
  font-size: 13px;
}

#quoteModal.quote-normal .quote-builder {
  grid-template-columns: 170px minmax(420px, 1fr) 320px;
  gap: 16px;
  padding: 18px;
}

.quote-process-console,
.quote-section {
  border: 1px solid #dce4ee;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
  border-radius: 6px;
}

.quote-process-console h3 {
  margin: 0;
  padding: 8px 11px;
  color: #fff;
  background: #081f49;
  font-size: 13px;
  border-radius: 6px 6px 0 0;
}

.quote-process-console label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  color: #334155;
}

.quote-process-console label span {
  min-width: 0;
}

.quote-process-console label b {
  border: 1px solid #d7e1ee;
  border-radius: 999px;
  color: #718096;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 7px;
  white-space: nowrap;
}

.quote-process-console label b.has-money {
  border-color: #b9e2c7;
  color: #16803a;
  background: #effcf4;
}

.quote-process-console input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-right: 7px;
  accent-color: #0d224e;
}

.quote-process-tree {
  padding: 2px 0 4px;
}

.quote-process-tree summary {
  cursor: pointer;
  padding: 7px 12px 7px 30px;
  color: #5b6b7f;
}

.quote-process-tree label {
  padding-left: 48px;
}

.quote-status-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 12px;
  color: #53657d;
}

.quote-status-legend span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.empty-dot { border: 2px solid #64748b; background: #fff; }
.partial-dot { background: #f5b400; }
.done-dot { background: #22a447; }

.quote-form-area {
  display: grid;
  gap: 8px;
  align-content: start;
}

.quote-section {
  overflow: hidden;
}

.quote-section summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  cursor: pointer;
  background: #eef2f6;
  font-weight: 700;
  border-radius: 6px;
}

.quote-section[open] summary {
  border-radius: 6px 6px 0 0;
}

.quote-section summary span {
  width: 14px;
  height: 14px;
  border: 1px solid #64748b;
  border-radius: 50%;
  background: #fff;
}

.quote-section.status-partial summary span {
  border-color: #f5b400;
  background: #f5b400;
}

.quote-section.process-selected.status-empty summary span {
  border-color: #f5b400;
  background: #f5b400;
}

.quote-section.status-done summary {
  background: #d7f0dd;
}

.quote-section.status-done summary span {
  border-color: #22a447;
  background: #22a447;
}

.quote-section.status-done summary span::after {
  content: "鉁?;
  display: block;
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 10px;
  padding: 10px;
}

.quote-form-grid label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #334155;
}

.quote-form-grid input,
.quote-form-grid select {
  height: 28px;
  border: 1px solid #d7dde5;
  padding: 0 8px;
  background: #fff;
  border-radius: 4px;
}

.quote-form-grid .full-span {
  grid-column: 1 / -1;
}

.quote-form-grid .quote-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.quote-form-grid .quote-check input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--blue);
}

.quote-package-grid {
  border-bottom: 1px solid #e5edf6;
}

.quote-package-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
  border-top: 1px solid #edf2f7;
}

.quote-package-preview div {
  min-height: 38px;
  border: 1px solid #dce8f6;
  background: rgba(255, 255, 255, .82);
  border-radius: 7px;
  padding: 7px 9px;
  display: grid;
  gap: 3px;
}

.quote-package-preview span,
.quote-package-empty {
  color: #64748b;
  font-size: 12px;
}

.quote-package-preview b {
  color: #10233f;
  font-size: 13px;
}

.quote-package-preview .package-total {
  grid-column: 1 / -1;
  background: #e8f4ff;
  border-color: #b8d8ff;
}

.quote-package-preview .package-total b {
  color: var(--blue);
  font-size: 16px;
}

.quote-package-empty {
  grid-column: 1 / -1;
  min-height: 42px;
  align-content: center;
}

.quote-craft-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.quote-craft-card {
  border: 1px solid #d7dde5;
  background: #fff;
}

.quote-craft-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #f8fafc;
  border-bottom: 1px solid #d7dde5;
  font-weight: 700;
}

.quote-section.hidden,
.quote-craft-card.hidden {
  display: none;
}

.quote-section:not(.process-selected):not(:nth-of-type(1)):not(:nth-of-type(2)) {
  opacity: .86;
}

.quote-remark {
  margin: 0;
  grid-template-columns: 90px 1fr;
}

.quote-subquote-panel {
  border: 1px solid #dce4ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
}

.quote-subquote-tabs,
.quote-subquote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-subquote-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.quote-subquote-card {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #21324a;
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 10px;
  text-align: left;
  border-left: 5px solid #94a3b8;
}

.quote-subquote-card.main {
  border-left-color: var(--blue);
  background: #f4f9ff;
}

.quote-subquote-card.child {
  border-left-color: #f59e0b;
  background: #fffaf0;
}

.quote-subquote-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 134, 222, .16);
}

.quote-subquote-card strong {
  color: #10233f;
}

.quote-subquote-card em,
.quote-subquote-card small {
  color: #64748b;
  font-style: normal;
}

.quote-subquote-badge {
  width: max-content;
  padding: 2px 7px;
  background: #e8f2ff;
  color: var(--blue);
  font-weight: 900;
}

.quote-subquote-card.child .quote-subquote-badge {
  background: #fff1d6;
  color: #a85500;
}

.quote-subquote-tabs button {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-weight: 800;
}

.quote-subquote-tabs button.active {
  background: #0b7cff;
  border-color: #0b7cff;
  color: #fff;
}

.quote-subquote-actions {
  margin-top: 8px;
}

.quote-subquote-panel p {
  margin: 8px 0 0;
  color: #64748b;
}

.quote-hierarchy-cell {
  display: grid;
  gap: 6px;
  min-width: 170px;
  text-align: left;
}

.quote-hierarchy-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quote-hierarchy-main span,
.quote-hierarchy-children em {
  background: #e8f2ff;
  color: var(--blue);
  font-size: calc(var(--user-font-size) * .75);
  font-style: normal;
  font-weight: 900;
  padding: 2px 6px;
  white-space: nowrap;
}

.quote-hierarchy-children {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 6px;
  color: #64748b;
}

.quote-hierarchy-children em {
  background: #fff1d6;
  color: #a85500;
}

.quote-summary-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.quote-summary-card {
  border: 1px solid #dce4ee;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
  padding: 12px;
}

.quote-summary-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #0f2a55;
  font-weight: 900;
}

.quote-summary-title small {
  color: #64748b;
  font-weight: 600;
}

.quote-summary-card p,
.quote-cost-list p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid #eef2f6;
  color: #53657d;
}

.quote-summary-card p b,
.quote-cost-list b {
  color: #12233d;
}

.quote-breakdown-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 8px;
}

.quote-breakdown-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid #edf2f7;
  color: #637083;
}

.quote-breakdown-table div:last-child {
  border-bottom: 0;
}

.quote-breakdown-table div.has-money {
  color: #172236;
  background: linear-gradient(90deg, #fff, #f8fbff);
}

.quote-breakdown-table span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-breakdown-table b {
  color: #0a63bf;
}

.quote-cost-list p:first-child {
  border-top: 0;
}

.quote-cost-list .total {
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: #eef6ff;
  border-radius: 6px;
  color: #0f2a55;
  font-weight: 900;
}

.quote-cost-list .total b {
  color: var(--blue);
  font-size: 18px;
}

.quote-summary-panel .primary-button {
  width: 100%;
  margin: 12px 0 0;
  min-height: 32px;
  padding: 6px 10px;
}

.quote-sale-card label {
  display: grid;
  gap: 8px;
  color: #0f2a55;
  font-weight: 900;
}

.quote-price-inline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dce7f4;
}

.quote-price-inline .quote-summary-title {
  margin-bottom: 0;
}

.quote-sale-card input,
.quote-sale-card select {
  width: 100%;
  height: 42px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  padding: 0 12px;
  color: #12233d;
  font-size: 18px;
  font-weight: 900;
  outline-color: var(--blue);
}

.quote-sale-card select {
  background: #fff;
  font-size: calc(var(--user-font-size) * .92);
  font-weight: 800;
}

.quote-sale-card p {
  display: block;
  line-height: 1.6;
}

.quote-readonly [name="priceScope"] {
  background: #fff;
  cursor: pointer;
}

.quote-modal .modal-title,
.quote-modal .modal-footer {
  padding: 8px 14px;
}

.quote-modal .modal-title button {
  font-size: 24px;
}

.quote-modal .wide-field textarea {
  min-height: 58px;
}

.quote-size-toggle {
  display: inline-flex;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  overflow: hidden;
}

.quote-size-toggle button {
  border: 0;
  background: #fff;
  padding: 5px 10px;
}

.quote-size-toggle button.selected,
.quote-size-toggle button[data-size="compact"] {
  background: var(--blue);
  color: #fff;
}

#quoteModal.quote-normal .quote-size-toggle button {
  background: #fff;
  color: #334155;
}

#quoteModal.quote-normal .quote-size-toggle button[data-size="normal"] {
  background: var(--blue);
  color: #fff;
}

.preview-banner {
  padding: 12px 16px;
  background: #fff7e6;
  border-bottom: 1px solid #f2d59b;
}

.preview-banner strong {
  display: block;
  margin-bottom: 8px;
  color: #8a5a00;
}

.preview-banner button {
  width: 100%;
  border: 0;
  background: #f59e0b;
  color: #fff;
  padding: 8px;
}

.quote-config-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  align-items: start;
}

.quote-config-nav {
  background: #fff;
  border: 1px solid #dce4ee;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  padding: 10px;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.quote-config-nav h3 {
  margin: 0 0 8px;
  padding: 12px;
  background: #0d224e;
  color: #fff;
}

.quote-config-nav button {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  border: 0;
  background: #fff;
  color: #16243a;
  text-align: left;
  padding: 0 10px;
  gap: 8px;
}

.quote-config-nav-item {
  position: relative;
  border-bottom: 1px solid #edf2f7;
  padding: 3px 0;
}

.quote-config-subnav {
  margin: 2px 0 6px 32px;
  padding-left: 8px;
  border-left: 2px solid #e2e8f0;
}

.quote-config-subnav button {
  grid-template-columns: 1fr;
  min-height: 32px;
  color: #53647a;
  font-size: 13px;
  padding: 0 8px;
  border-radius: 6px;
}

.quote-config-nav button:hover {
  background: #eef6ff;
  color: var(--blue);
}

.quote-config-nav button.active {
  background: #eef6ff;
  color: var(--blue);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--blue);
}

.quote-config-nav-item.child-active > button {
  color: #0f3f7a;
}

.quote-config-nav button b {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.quote-config-main {
  min-width: 0;
}

.quote-config-page {
  background: #fff;
  border: 1px solid #dce4ee;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  padding: 18px;
}

.config-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 18px;
  gap: 14px;
}

.config-table-head h3,
.config-table-head p {
  margin: 0;
}

.config-table-head p {
  margin-top: 4px;
  color: #64748b;
  line-height: 1.6;
}

.config-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #dbe4ee;
  background: #f8fbff;
  margin-bottom: 16px;
}

.config-toolbar-card h3,
.config-toolbar-card p {
  margin: 0;
}

.config-toolbar-card p {
  color: #64748b;
  margin-top: 4px;
}

.quote-config-guide-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, .9fr);
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
}

.quote-config-guide-main span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.quote-config-guide-main h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.5;
}

.quote-config-guide-main p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.quote-config-usage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quote-config-usage-tags em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.quote-config-guide-side {
  padding: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #dbeafe;
}

.quote-config-guide-side strong {
  display: block;
  margin-bottom: 8px;
}

.quote-config-guide-side ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.75;
}

.quote-config-guide-foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbeafe;
  color: #64748b;
  line-height: 1.6;
}

.quote-config-guide-foot b {
  color: #92400e;
  font-weight: 700;
}

.quote-config-quick-panel {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #dbe4ee;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.quote-config-quick-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.quote-config-quick-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}

.quote-config-quick-head h3 {
  margin: 4px 0 0;
}

.quote-config-quick-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.quote-config-quick-list button {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  background: #f8fbff;
  color: #172033;
  text-align: left;
  border-radius: 10px;
}

.quote-config-quick-list button:hover,
.quote-config-quick-list button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.quote-config-quick-list b {
  display: block;
  margin-bottom: 6px;
}

.quote-config-quick-list span {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quote-config-table-tools {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-bottom: 0;
  background: #f8fafc;
}

.quote-config-table-tools strong {
  display: block;
}

.quote-config-table-tools span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.quote-config-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min(420px, 48%);
}

.quote-config-search input {
  flex: 1;
  min-width: 180px;
}

.quote-config-search .neutral-button {
  white-space: nowrap;
}

.quote-supplier-reference-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
  border-radius: 10px;
  margin: -4px 0 14px;
}

.quote-supplier-reference-card h3,
.quote-supplier-reference-card p {
  margin: 0;
}

.quote-supplier-reference-card p {
  color: #64748b;
  margin-top: 4px;
}

.quote-supplier-reference-list,
.quote-supplier-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-supplier-reference-list span,
.quote-supplier-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #0f5ea8;
  font-size: calc(var(--user-font-size) * .78);
  font-weight: 800;
  white-space: nowrap;
}

.quote-supplier-badges {
  max-width: 260px;
}

.personalization-grid {
  align-items: end;
}

.personal-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .95fr);
  gap: 16px;
}

.personal-background-preview {
  min-height: 220px;
  border: 1px solid #dbe4ee;
  background:
    linear-gradient(90deg, rgba(47,134,222,.06) 1px, transparent 1px),
    linear-gradient(rgba(56,168,82,.06) 1px, transparent 1px),
    #fbfdff;
  background-size: 26px 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.personal-background-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.personal-background-preview .empty-state {
  color: #64748b;
  padding: 16px;
  text-align: center;
}

.opacity-control {
  display: grid;
  gap: 8px;
}

.opacity-control span {
  color: #64748b;
  font-size: 13px;
}

.green-pill {
  display: inline-block;
  padding: 3px 9px;
  background: #198754;
  color: #fff;
  border-radius: 4px;
}

.blue-outline,
.red-outline {
  border: 1px solid currentColor;
  background: #fff;
  padding: 6px 10px;
  border-radius: 4px;
}

.blue-outline { color: #0d6efd; }
.red-outline { color: #dc3545; }

.worker-process-console {
  display: grid;
  gap: 10px;
}

.worker-process-group,
.worker-process-tree {
  border: 1px solid #dbe3ed;
  background: #f8fafc;
  padding: 10px;
}

.worker-process-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.worker-process-tree summary {
  cursor: pointer;
  font-weight: 800;
  color: #0f2a55;
}

.worker-process-tree div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.worker-process-console label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
}

.worker-process-console input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

@media (max-width: 1100px) {
  .quote-builder {
    grid-template-columns: 1fr;
  }
}

.row-action-menu {
  position: relative;
  min-width: 112px;
}

.row-action-menu summary {
  list-style: none;
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  background: #eef3f8;
  color: #24364b;
  border: 1px solid #d9e1ea;
  font-weight: 900;
}

.row-action-menu summary::-webkit-details-marker {
  display: none;
}

.row-action-menu summary::after {
  content: "鈱?;
  margin-left: 8px;
  color: #66758a;
}

.row-action-menu[open] summary::after {
  content: "鈱?;
}

.row-action-menu .row-actions {
  display: none;
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 30;
  width: 156px;
  padding: 10px;
  border: 1px solid #d8e1ea;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}

.row-action-menu[open] .row-actions {
  display: grid;
}

.success-button,
.blue-button,
.neutral-button,
.danger-button,
.cyan-button {
  border: 0;
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
}

.success-button { background: #4caf50; }
.blue-button { background: #27a9e8; }
.neutral-button { background: #e8eaed; color: #334155; }
.danger-button { background: #e34b4b; }
.cyan-button { background: #14b8d4; }

.thumb {
  width: 58px;
  height: 72px;
  margin: auto;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e4e7ec;
  color: #f05a5a;
  font-size: 12px;
}

.lazy-image-button,
.lazy-hero-image {
  border: 1px dashed #9bb8d8;
  background:
    linear-gradient(180deg, #ffffff, #f1f7ff);
  color: var(--blue);
  font-weight: 800;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.lazy-image-button::before,
.lazy-hero-image::before {
  content: "鈻?;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #e5f1ff;
  color: #1d74c8;
  font-size: 16px;
}

.lazy-image-button:hover,
.lazy-hero-image:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(47, 134, 222, .16);
  background: linear-gradient(180deg, #fff, #eaf4ff);
}

.lazy-hero-image {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #1f77c8;
}

.file-link[data-action="load-image"] {
  border-style: dashed;
  background: #f3f8ff;
  color: var(--blue);
}

.loaded-detail-image {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  margin: auto;
}

.image-thumb {
  object-fit: cover;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  display: grid;
  place-items: center;
  padding: 34px;
  z-index: 30;
  animation: riseIn .18s ease both;
}

.order-modal {
  width: min(1420px, 96vw);
  max-height: 86vh;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.26);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.modal-title,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e8ec;
}

.modal-title button {
  border: 0;
  background: transparent;
  font-size: 30px;
  color: #64748b;
}

.modal-footer {
  border-top: 1px solid #e5e8ec;
  border-bottom: 0;
}

.password-modal {
  width: min(460px, 92vw);
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.26);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.customer-create-modal {
  width: min(560px, 94vw);
}

.secondary-password-modal {
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, .22);
  border-top: 4px solid #0f766e;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  backdrop-filter: blur(14px);
}

.secondary-password-modal .modal-title {
  background: linear-gradient(135deg, #f8fafc, #eef8f7);
}

.secondary-password-modal input {
  border-color: #cbd5e1;
  letter-spacing: 2px;
}

.secondary-recovery-modal code {
  padding: 1px 5px;
  background: #eef6f4;
  border: 1px solid #cfe6e1;
  color: #0f766e;
}

.secondary-recovery-link {
  padding: 6px 8px;
  background: transparent;
  color: #0f766e;
}

.password-modal-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px 22px;
}

.password-modal-body p {
  margin: 0 0 4px;
  color: #475569;
}

.password-modal-body label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 800;
}

.password-modal-body input {
  min-height: 40px;
  border: 1px solid #d7dde5;
  padding: 0 12px;
  outline-color: var(--blue);
}

.customer-create-modal .password-modal-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-create-modal .password-modal-body p,
.customer-create-modal .password-modal-body label:last-of-type {
  grid-column: 1 / -1;
}

.supplier-ledger-modal {
  width: min(780px, 94vw);
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.26);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.supplier-ledger-body {
  display: grid;
  gap: 16px;
  padding: 18px 20px 22px;
}

.supplier-ledger-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.supplier-ledger-summary article {
  border: 1px solid #e1e7ef;
  background: #f8fbff;
  padding: 12px 14px;
}

.supplier-ledger-summary span,
.supplier-selected-project {
  color: #64748b;
}

.supplier-ledger-summary b,
.supplier-selected-project b {
  color: #0f172a;
}

.supplier-ledger-picker {
  display: grid;
  gap: 14px;
}

.supplier-ledger-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.supplier-ledger-picker-head h3 {
  margin: 0 0 6px;
}

.supplier-project-list,
.supplier-workbench-projects {
  display: grid;
  gap: 10px;
}

.supplier-project-group {
  border: 1px solid #dce5ef;
  background: #fbfdff;
}

.supplier-project-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: #0f2a55;
}

.supplier-project-group summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.supplier-project-options,
.supplier-project-plain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.supplier-project-option,
.supplier-project-plain span {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9e3ef;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.supplier-project-option.active {
  background: #1d72d2;
  border-color: #1d72d2;
  color: #fff;
}

.supplier-empty-tip,
.supplier-hero-text {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.supplier-hero-actions {
  margin-top: 14px;
}

.supplier-pack-visual {
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: end;
}

.supplier-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.supplier-workbench-panel .panel-title {
  margin-bottom: 14px;
}

.supplier-workbench-list {
  display: grid;
  gap: 10px;
}

.supplier-workbench-list article {
  border: 1px solid #e1e7ef;
  background: #fbfcfd;
  padding: 12px 14px;
}

.supplier-workbench-list article p,
.supplier-workbench-list article small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  line-height: 1.6;
}

.supplier-inline-projects {
  margin-top: 6px;
}

.modal-footer span {
  color: #64748b;
}

.config-editor-dialog {
  width: min(720px, 92vw);
  background: #fff;
  border: 1px solid #dce4ee;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .24);
}

.config-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 18px;
}

.config-editor-grid label {
  display: grid;
  gap: 6px;
  color: #53657d;
  font-weight: 700;
}

.config-editor-grid input,
.config-editor-grid select,
.config-editor-grid textarea {
  height: 38px;
  border: 1px solid #d7dde5;
  padding: 0 10px;
  outline-color: var(--blue);
}

.config-editor-grid textarea {
  min-height: 78px;
  padding: 10px;
  resize: vertical;
}

.form-scroll {
  overflow: auto;
  padding: 26px 34px;
}

.toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #53657d;
  font-weight: 700;
}

.toolbar-summary {
  color: #53657d;
  font-weight: 800;
}

.quote-list-group {
  margin-top: 14px;
}

.quote-list-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid #dce4ee;
  border-bottom: 0;
  background: #f7fbff;
  color: #10233f;
}

.quote-list-group header span {
  color: var(--blue);
  font-weight: 900;
}

.quote-select-zone {
  margin-left: 238px;
  margin-bottom: 18px;
  min-height: 0;
  padding: 18px;
  border: 1px solid #dbe6f2;
  background: #f7fbff;
  cursor: default;
}

.quote-order-select {
  display: grid;
  gap: 8px;
  color: #10233f;
  font-weight: 900;
}

.quote-order-select select {
  height: 40px;
  border: 1px solid #cdd8e5;
  padding: 0 12px;
  background: #fff;
}

.quote-order-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
}

.quote-order-preview p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dce4ee;
  background: #fff;
}

.quote-order-preview span {
  display: block;
  margin-bottom: 4px;
  color: #718096;
  font-size: 12px;
}

.quote-order-preview b {
  color: #132238;
}

.quote-provided-field input,
.quote-provided-field select,
.locked-field {
  background: #eef5ff !important;
  color: #24364d;
  border-color: #9fc6f6 !important;
  cursor: not-allowed;
}

.form-row.full label,
.wide-field {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.upload-zone {
  margin-left: 238px;
  min-height: 180px;
  border: 2px dashed #d7dde5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #b4bdc8;
  margin-bottom: 18px;
  cursor: pointer;
}

.upload-zone.dragging {
  border-color: var(--blue);
  background: #eef6ff;
}

.image-preview-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.image-preview-strip img,
.image-preview-strip span,
.image-preview-strip button {
  width: 82px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #d7dde5;
  background: #fff;
}

.image-preview-strip span,
.image-preview-strip button {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 46px;
  row-gap: 14px;
}

.form-grid label {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
}

.file-field {
  grid-template-columns: 220px minmax(0, 1fr) 130px !important;
}

.file-field em {
  font-style: normal;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-radios,
.inline-check {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-check {
  --switch-color: #6b7280;
  justify-content: flex-start;
  min-height: 34px;
  color: #334155;
}

.inline-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 20px;
  margin: 0;
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #a9b0ba;
  border-radius: 999px;
  background: #f5f6f8;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}

.inline-check input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6f747a;
  transform: translateY(-50%);
  transition: left .18s ease, background .18s ease;
}

.inline-check input[type="checkbox"]:checked {
  border-color: #1677c8;
  background: #1677c8;
}

.inline-check input[type="checkbox"]:checked::before {
  left: 24px;
  background: #fff;
}

.inline-check input[type="checkbox"]:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.inline-check::before {
  content: "鍏?;
  order: -1;
  min-width: 20px;
  color: #1f2937;
  font-weight: 500;
  text-align: center;
}

.inline-check:has(input[type="checkbox"]:checked)::before {
  content: "寮€";
}

.inline-check:has(input[type="checkbox"]:disabled)::before {
  color: #9ca3af;
}

.wide-field {
  margin-top: 16px;
}

.wide-field textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.module-cards,
.directory-grid,
.proofing-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card,
.directory-grid article,
.proofing-board article,
.simple-panel,
.alert-settings-card,
.alert-list article,
.kanban section {
  border: 1px solid #dbe3ec;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.module-cards .metric-card {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-left: 4px solid #2f86de;
}

.module-cards .metric-card h3 {
  margin: 0;
  color: #475569;
  font-size: 15px;
}

.metric-card b,
.proofing-board b {
  display: block;
  font-size: 28px;
  margin: 8px 0;
}

.module-cards .metric-card b {
  margin: 0;
  color: #102033;
  font-size: 30px;
}

.simple-panel {
  margin-top: 16px;
}

.simple-panel h3 {
  margin: 0;
  font-size: 20px;
}

.user-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.kanban article {
  background: #fff;
  border: 1px solid #e4e8ee;
  padding: 12px;
  margin-top: 10px;
}

.alert-list {
  display: grid;
  gap: 12px;
}

.alert-settings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.alert-settings-card h3 {
  margin: 2px 0 6px;
  font-size: 20px;
}

.alert-settings-card span {
  color: var(--muted);
}

.alert-settings-card label {
  display: grid;
  grid-template-columns: auto 96px auto;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.alert-settings-card input {
  height: 38px;
  border: 1px solid #cfd8e3;
  padding: 0 10px;
  text-align: center;
  font-weight: 900;
}

.alert-list span {
  float: right;
  color: #e34b4b;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 280px;
  max-width: 380px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  background: #17202a;
  color: #fff;
  padding: 14px 16px;
  transform: translateY(22px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

.login-stage,
.login-showcase,
.login-card,
.workspace-tabs button,
.page-card,
.module-table,
.module-side .side-card,
.permission-card,
.settings-card,
.metric-card,
.directory-grid article,
.proofing-board article,
.simple-panel,
.alert-settings-card,
.alert-list article,
.kanban section,
.material-card,
.quote-admin-grid,
.database-note,
.order-toolbar,
.about-page,
.about-link-card,
.about-editor,
.password-modal,
.order-modal,
.supplier-ledger-modal,
.user-dropdown,
.toast,
.empty-state,
.customer-create-modal,
.secondary-password-modal {
  border-radius: var(--corner-radius);
}

button,
input,
select,
textarea,
.text-button,
.neutral-button,
.danger-button,
.success-button,
.blue-button,
.ghost-button,
.primary-button,
.check-card,
.soft-tag,
.danger-tag,
.step-badge,
.step-gap,
.delete-note,
.status,
.badge {
  border-radius: var(--corner-radius-sm);
}

.toast.success { background: #208b3a; }
.toast.error { background: #c92a2a; }
.toast.loading, .toast.info { background: #1d72d2; }

.toast-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 50%;
  font-weight: 900;
}

.toast b,
.toast small {
  display: block;
}

.toast small {
  margin-top: 2px;
  color: rgba(255,255,255,.78);
}

.toast i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.5);
  transform-origin: left;
}

.toast.loading .toast-icon {
  animation: spin 1s linear infinite;
}

.toast.loading i {
  animation: progressLoop 1.2s ease-in-out infinite;
}

.toast.success i,
.toast.error i,
.toast.info i {
  animation: progressOut 2.6s linear both;
}

.sidebar.collapsed { transform: translateX(-228px); }
.sidebar.collapsed + .workspace { margin-left: -228px; }

@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageSoftIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.992);
    filter: saturate(.94);
  }
  58% {
    opacity: 1;
    filter: saturate(1.02);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
}
@keyframes loginCardIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes loginCardBreath { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes loginGridDrift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 36px 0, 0 36px; } }
@keyframes glassFloat { 0%, 100% { transform: translateY(0) rotate(16deg); } 50% { transform: translateY(-12px) rotate(20deg); } }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fillGrow { from { width: 0; } to { width: var(--value); } }
@keyframes floatBox { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes avatarFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progressLoop { 0% { transform: scaleX(.12); } 50% { transform: scaleX(.82); } 100% { transform: scaleX(.18); } }
@keyframes progressOut { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 220px 1fr; }
  .hero-panel, .content-grid, .module-layout { grid-template-columns: 1fr; }
  .role-panel, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .topbar {
    position: sticky;
    top: 0;
    height: 58px;
    padding: 0 10px;
  }
  .brand {
    min-width: 0;
    gap: 8px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  .brand strong {
    display: block;
    max-width: calc(100vw - 154px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: calc(var(--user-font-size) * 1.05);
  }
  .top-actions {
    gap: 6px;
    flex-shrink: 0;
    padding-right: 48px;
  }
  .top-actions > .icon-button {
    display: none;
  }
  .icon-button {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .user-button {
    max-width: 86px;
    min-height: 34px;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-dropdown {
    position: fixed;
    top: 64px;
    right: 8px;
    width: min(280px, calc(100vw - 16px));
    z-index: 40;
  }
  .brand span:last-child, .ghost-button, .logout-button { display: none; }
  .sidebar {
    position: fixed;
    top: 58px;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 28;
    border-right: 0;
    box-shadow: none;
    transform: translateY(0);
    background: #f5f7fa;
  }
  .sidebar.collapsed {
    transform: translateY(-110%);
    pointer-events: none;
  }
  .sidebar.collapsed + .workspace {
    margin-left: 0;
  }
  .collapse-handle {
    position: fixed;
    left: auto;
    right: 10px;
    top: -50px;
    bottom: auto;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
    border: 1px solid #dbe3ec;
    color: #334155;
    font-size: 0;
    display: grid;
    place-items: center;
    z-index: 42;
  }
  .sidebar.collapsed .collapse-handle {
    transform: none;
    pointer-events: auto;
  }
  .collapse-handle::before {
    content: "";
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }
  .sidebar:not(.collapsed) .collapse-handle {
    left: auto;
    right: 10px;
    top: -50px;
    bottom: auto;
    background: #1d8cf8;
    color: #fff;
    border-color: #1d8cf8;
  }
  .sidebar:not(.collapsed) .collapse-handle::before {
    width: 18px;
    height: 18px;
    background:
      linear-gradient(currentColor, currentColor) center / 18px 2px no-repeat,
      linear-gradient(currentColor, currentColor) center / 2px 18px no-repeat;
    box-shadow: none;
    transform: rotate(45deg);
  }
  .menu {
    height: calc(100vh - 58px);
    padding: 14px 14px 92px;
    display: grid;
    align-content: start;
    gap: 10px;
    background: #f5f7fa;
  }
  .menu-section {
    border: 1px solid #e1e7ef;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  }
  .menu-title {
    min-height: 48px;
    padding: 0 14px;
  }
  .menu-section a {
    padding: 0 14px 0 44px;
    line-height: 40px;
  }
  .menu-home a {
    padding-left: 14px;
    line-height: 44px;
  }
  .menu-section.open .submenu {
    max-height: none;
  }
  .preview-banner .submenu,
  .preview-banner .menu-title {
    padding-inline: 14px;
  }
  .workspace {
    padding: 14px 12px 24px;
    min-width: 0;
  }
  .view.active {
    margin-top: 0;
  }
  .page-view {
    margin-top: 0;
  }
  .tabs {
    display: none;
  }
  .page-view,
  .panel,
  .permission-card,
  .stats-grid article {
    padding: 12px;
  }
  .page-view > .permission-head,
  .panel-title,
  .permission-head {
    align-items: stretch;
    flex-direction: column;
  }
  .button-row {
    width: 100%;
    gap: 8px;
  }
  .button-row button,
  .page-view > .permission-head button,
  .panel-title button {
    min-height: 40px;
  }
  .module-table {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .hero-panel, .role-panel, .stats-grid, .content-grid, .module-layout, .material-list { grid-template-columns: 1fr; }
  .module-position-row { grid-template-columns: 1fr; align-items: stretch; }
  .font-preference-panel { grid-template-columns: 1fr; max-width: none; }
  .config-toolbar-card,
  .personal-preview-grid { grid-template-columns: 1fr; }
  .role-panel article { grid-template-columns: 34px minmax(0, 1fr); }
  h1 { font-size: 26px; }
  .process-item { grid-template-columns: 1fr; }
  .supplier-ledger-modal {
    width: min(100vw - 12px, 100%);
    max-height: calc(100vh - 12px);
  }
  .supplier-ledger-body,
  .about-page {
    padding: 16px 12px;
  }
  .stats-summary-row,
  .staff-role-summary,
  .directory-grid,
  .module-cards,
  .detail-metrics,
  .detail-info-grid {
    grid-template-columns: 1fr;
  }
  .about-editor-feishu .ql-toolbar.ql-snow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .about-editor-feishu .ql-formats {
    margin-right: 0 !important;
  }
}

.settings-grid input,
.settings-grid select,
.table-input {
  border: 1px solid #d7dde5;
  background: #fff;
  min-height: 34px;
  padding: 0 8px;
  outline-color: var(--blue);
}

.file-action {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  background: #27a9e8;
  color: #fff;
  font-weight: 800;
}

.file-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-links {
  display: grid;
  gap: 4px;
}

.file-link {
  border: 0;
  background: #eef6ff;
  color: var(--blue);
  cursor: pointer;
  padding: 4px 7px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  text-align: left;
}

.file-link-disabled {
  background: #f3f6f9;
  color: #94a3b8;
  cursor: default;
}

.process-picker {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  margin: 18px 0;
}

.process-picker > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px 18px;
  background: #f2f3f5;
  padding: 14px;
}

.process-all {
  font-weight: 800;
  color: #111827;
  align-self: start;
}

.permission-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.permission-grid.compact .check-card {
  padding: 7px 9px;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-weight: 800;
}

.settings-grid .inline-check {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 34px;
  gap: 10px;
}

.database-settings-stack {
  display: grid;
  gap: 14px;
}

.database-mode-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid #d7e3ef;
  background: #f7fafc;
  color: #475569;
  font-weight: 800;
}

.database-mode-banner b {
  color: #0f172a;
}

.database-mode-banner.mysql {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.database-mode-banner.sqlite {
  border-color: #d1d5db;
  background: #f8fafc;
}

.database-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe2ea;
  background: #fbfcfd;
}

.database-section.active {
  border-color: #86bdf2;
  background: #f5fbff;
  box-shadow: inset 4px 0 0 #1677c8;
}

.database-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.database-section-head h4 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1.05);
}

.database-section-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.database-mode-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d1d9e3;
  background: #fff;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

.database-mode-choice input {
  width: 16px;
  height: 16px;
  accent-color: #1677c8;
}

.cache-status-card {
  border-color: #d7e8ff;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
}

.cache-status-card code {
  padding: 1px 5px;
  border-radius: 6px;
  background: #eaf3ff;
  color: #155e9f;
  font-size: 0.92em;
}

.cache-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cache-status-grid div {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid #dbe8f5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.cache-status-grid span,
.cache-entry-list em {
  color: #64748b;
  font-style: normal;
  font-size: calc(var(--user-font-size) * 0.82);
}

.cache-status-grid strong {
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1.25);
}

.cache-status-grid small {
  color: #64748b;
  line-height: 1.35;
}

.cache-entry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cache-entry-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #dbe8f5;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
}

@media (max-width: 760px) {
  .cache-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cache-entry-list span {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
  }
}

.workspace {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .92)),
    radial-gradient(circle at 12% 8%, rgba(22, 119, 255, .08), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, .08), transparent 28%);
}

.module-card,
.simple-panel,
.permission-card,
.settings-card,
.order-table,
.quote-table,
.metric-card,
.worker-card,
.process-category-board,
.process-category-card {
  border-color: rgba(203, 213, 225, .72);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.module-card:hover,
.permission-card:hover,
.metric-card:hover,
.worker-card:hover {
  box-shadow: 0 16px 40px rgba(15, 23, 42, .09);
}

.primary-button,
.blue-button,
.success-button,
.danger-button,
.neutral-button {
  border-radius: 9px;
  font-weight: 900;
}

.neutral-button {
  background: #eef2f7;
  color: #334155;
}

.primary-button,
.blue-button {
  background: linear-gradient(135deg, #1683ff, #0f73dd);
}

.success-button {
  background: linear-gradient(135deg, #22a06b, #13895b);
}

.order-table table,
.quote-table table,
.data-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.order-table th,
.quote-table th,
.data-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 900;
}

.order-table tr:hover td,
.quote-table tr:hover td,
.data-table tr:hover td {
  background: #f8fbff;
}

.tabs button,
.tab-button {
  border-radius: 10px 10px 0 0;
}

.database-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #475569;
  line-height: 1.55;
}

.database-note strong {
  color: #0f172a;
}

.secondary-status-card.ready {
  border-color: rgba(34, 160, 107, .34);
  background: linear-gradient(180deg, rgba(248,255,252,.96), rgba(240,253,249,.92));
}

.secondary-status-card.missing {
  border-color: rgba(245, 158, 11, .38);
  background: linear-gradient(180deg, rgba(255,252,245,.98), rgba(255,247,237,.92));
}

.secondary-status-card .permission-head p strong {
  color: #0f766e;
}

.secondary-status-card.missing .permission-head p strong:first-of-type {
  color: #b45309;
}

.wework-bind-panel {
  display: grid;
  gap: 14px;
}

.wework-bind-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.wework-bind-status > div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid #dbe3ec;
  background: rgba(255,255,255,.84);
}

.wework-bind-status span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.wework-bind-status strong {
  color: #102033;
  word-break: break-all;
}

.wework-bind-status.bound > div:first-child {
  border-color: rgba(34, 160, 107, .36);
  background: #f0fdf9;
}

.wework-bind-status.unbound > div:first-child {
  border-color: rgba(245, 158, 11, .36);
  background: #fff7ed;
}

.wework-bind-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px dashed #9fc1e7;
  background: #f3f8ff;
}

.wework-bind-box p {
  margin: 8px 0 12px;
  color: #475569;
}

.wework-bind-box img {
  width: 150px;
  height: 150px;
  border: 1px solid #dbe3ec;
  background: #fff;
  padding: 8px;
}

.database-note code {
  padding: 1px 5px;
  background: #eef3f8;
  border: 1px solid #dbe4ee;
  color: #0f2a55;
}

.database-section-actions {
  justify-content: flex-start;
}

.about-page {
  padding: 0;
}

.about-simple-card {
  max-width: 1120px;
  border: 1px solid #dfe7f0;
  background: #fff;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.about-simple-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #e7edf4;
}

.about-simple-copy span {
  display: block;
  color: var(--blue);
  font-size: calc(var(--user-font-size) * .78);
  font-weight: 900;
  letter-spacing: .04em;
}

.about-simple-copy h2 {
  margin: 8px 0 10px;
  color: #07111f;
  font-size: calc(var(--user-font-size) * 2);
  line-height: 1.14;
  font-weight: 900;
}

.about-simple-copy p {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.about-simple-hero img {
  width: 110px;
  max-width: 100%;
  justify-self: center;
  opacity: .9;
}

.about-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.about-info-grid div {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid #e3ebf4;
  background: #f8fbff;
}

.about-info-grid span,
.about-info-grid strong {
  display: block;
}

.about-info-grid span {
  color: #64748b;
  font-size: calc(var(--user-font-size) * .86);
  font-weight: 800;
}

.about-info-grid strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1.04);
  line-height: 1.35;
  word-break: break-all;
}

.about-simple-section {
  padding-top: 22px;
  border-top: 1px solid #e7edf4;
}

.about-simple-section + .about-simple-section {
  margin-top: 22px;
}

.about-simple-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.about-simple-section-title h3 {
  margin: 0;
  color: #111827;
  font-size: calc(var(--user-font-size) * 1.22);
  font-weight: 900;
}

.about-simple-section-title p {
  margin: 5px 0 0;
  color: #64748b;
}

.about-link-card,
.about-editor {
  border: 1px solid #e1e5ea;
  background: #fff;
}

.about-hero {
  max-width: 1120px;
}

.about-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.about-hero h2 {
  margin: 0 0 10px;
  color: #07111f;
  font-size: calc(var(--user-font-size) * 2.25);
  line-height: 1.12;
  font-weight: 900;
}

.about-markdown {
  margin: 0;
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1.02);
  line-height: 1.85;
}

.about-markdown h1,
.about-markdown h2,
.about-markdown h3 {
  margin: 34px 0 14px;
  color: #07111f;
  line-height: 1.18;
  font-weight: 900;
}

.about-markdown h1 {
  font-size: calc(var(--user-font-size) * 2.05);
}

.about-markdown h2 {
  font-size: calc(var(--user-font-size) * 1.72);
}

.about-markdown h3 {
  font-size: calc(var(--user-font-size) * 1.35);
}

.about-markdown h1:first-child,
.about-markdown h2:first-child,
.about-markdown h3:first-child,
.about-markdown p:first-child {
  margin-top: 0;
}

.about-markdown p,
.about-markdown ul {
  margin: 0 0 20px;
}

.about-markdown ul {
  padding-left: 20px;
}

.about-markdown li {
  margin: 6px 0;
}

.about-markdown a {
  color: #047857;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(4, 120, 87, .28);
}

.about-markdown code {
  background: #eef3f8;
  border: 1px solid #dbe4ee;
  padding: 1px 5px;
  color: #0f2a55;
}

.about-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  max-width: 1120px;
}

.about-link-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.about-link-card strong {
  color: #0f2a55;
}

.about-link-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.about-link-card a,
.about-link-card span {
  color: var(--blue);
  font-weight: 800;
  word-break: break-all;
}

.about-link-card.empty span,
.about-link-card.empty p {
  color: #64748b;
}

.about-editor-grid {
  display: grid;
  gap: 12px;
}

.about-editor-shell {
  display: grid;
  gap: 10px;
  color: #475569;
  font-weight: 800;
}

.about-editor-feishu {
  border: 1px solid #dbe5f0;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.about-editor-feishu .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid #e7edf4;
  background: #f8fbff;
  padding: 10px 12px;
}

.about-editor-feishu .ql-container.ql-snow {
  border: 0;
  min-height: 320px;
  font-family: inherit;
}

.about-editor-feishu .ql-editor {
  min-height: 320px;
  padding: 22px 24px;
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1);
  line-height: 1.8;
}

.about-editor-feishu .ql-editor h1,
.about-editor-feishu .ql-editor h2,
.about-editor-feishu .ql-editor h3 {
  color: #07111f;
  font-weight: 900;
}

.about-editor-feishu .ql-editor a {
  color: #0f766e;
}

.about-editor-feishu .ql-picker-label,
.about-editor-feishu .ql-stroke {
  color: #334155;
}

.about-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  padding: 10px;
  margin: 12px 0;
  border: 1px solid #dbe5f0;
  background: #f7fbff;
}

.about-format-toolbar label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: calc(var(--user-font-size) * .85);
  font-weight: 800;
}

.about-format-toolbar input {
  border: 1px solid #ccd7e3;
  background: #fff;
}

.about-format-toolbar input[type="color"] {
  width: 46px;
  min-height: 34px;
  padding: 2px;
}

.about-format-toolbar input[type="number"] {
  width: 78px;
  min-height: 34px;
  padding: 0 8px;
}

.about-format-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.about-format-toolbar button[data-format="bold"] {
  font-weight: 900;
}

.about-format-toolbar button[data-format="italic"] {
  font-style: italic;
}

.about-format-toolbar button[data-format="underline"] {
  text-decoration: underline;
}

.about-format-toolbar .about-link-input {
  min-width: min(320px, 100%);
  flex: 1 1 260px;
}

.about-format-toolbar .about-link-input input {
  min-height: 34px;
  padding: 0 10px;
}

.about-editor-grid label,
.about-link-editor-row label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-weight: 800;
}

.about-editor-grid input,
.about-editor-grid textarea,
.about-link-editor-row input {
  border: 1px solid #d7dde5;
  background: #fff;
  min-height: 36px;
  padding: 0 10px;
}

.about-editor-grid textarea {
  min-height: 170px;
  padding: 10px;
  resize: vertical;
  line-height: 1.65;
}

.about-editor-preview {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #edf0f4;
  background: #fff;
}

.about-editor-preview > strong {
  color: #0f2a55;
}

.about-link-editor-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.about-link-editor-row {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(220px, 1.1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #edf0f4;
  background: #fbfcfd;
}

.database-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.role-group-list {
  display: grid;
  gap: 14px;
}

.role-group-list section {
  border: 1px solid #e4e8ee;
  background: #fff;
  padding: 12px;
}

.role-group-list h4 {
  margin: 0 0 10px;
}

.account-table table {
  min-width: 980px;
}

.table-input {
  width: 130px;
}

.mini-permission {
  display: none;
}

.staff-role-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.staff-role-summary article,
.staff-role-group {
  border: 1px solid #e1e5ea;
  background: #fbfcfd;
}

.staff-role-summary article {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.staff-role-summary span,
.staff-meta,
.staff-metrics span,
.staff-metrics small,
.staff-role-head p,
.staff-card-head p {
  color: #64748b;
}

.staff-role-summary b {
  color: #0f172a;
  font-size: calc(var(--user-font-size) * 1.6);
}

.staff-role-groups {
  display: grid;
  gap: 18px;
}

.staff-role-group {
  padding: 18px;
}

.staff-role-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.staff-role-head h3,
.staff-card h4 {
  margin: 0;
  color: #0f172a;
}

.staff-role-head p,
.staff-card-head p {
  margin: 4px 0 0;
}

.staff-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d7e1ec;
  background: #eef6ff;
}

.staff-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
  font-size: 15px;
}

.staff-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.staff-table {
  min-width: 940px;
  table-layout: fixed;
}

.staff-table th:nth-child(1) { width: 190px; }
.staff-table th:nth-child(2) { width: 120px; }
.staff-table th:nth-child(3) { width: 150px; }
.staff-table th:nth-child(4) { width: 190px; }
.staff-table th:nth-child(5) { width: 110px; }

.staff-table td {
  vertical-align: middle;
}

.staff-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.staff-person strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-stat-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  line-height: 1.45;
}

.staff-stat-line span {
  white-space: nowrap;
}

.staff-stat-line b {
  color: #0f2a55;
  font-weight: 900;
}

.staff-stat-line em {
  margin-left: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.order-detail-workbench {
  display: grid;
  gap: 18px;
}

.detail-image-panel {
  min-height: 340px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e5ea;
  background:
    linear-gradient(90deg, rgba(47,134,222,.08) 1px, transparent 1px),
    linear-gradient(rgba(56,168,82,.08) 1px, transparent 1px),
    #fff;
  background-size: 34px 34px;
  overflow: hidden;
}

.detail-image-panel img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.detail-box-art {
  transform: scale(1.35);
}

.detail-summary,
.detail-metrics,
.detail-info-grid {
  display: grid;
  gap: 14px;
}

.detail-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #e1e5ea;
  background: #fff;
  padding: 20px;
}

.detail-summary h2 {
  margin-bottom: 8px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.detail-metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.detail-metrics article,
.detail-info-grid article {
  border: 1px solid #e1e5ea;
  background: #fbfcfd;
  padding: 16px;
}

.detail-metrics span {
  display: block;
  color: #64748b;
  margin-bottom: 8px;
}

.detail-metrics b {
  font-size: 22px;
}

.detail-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.detail-chain {
  justify-content: flex-start;
  gap: 10px;
  padding-top: 8px;
}

.process-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.process-toggle summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.process-toggle:not([open]) .detail-chain {
  display: none;
}

.process-summary-panel {
  border-left: 4px solid var(--blue);
  background: #f8fbff;
}

.detail-section {
  border: 1px solid #e1e5ea;
  background: #fff;
  padding: 18px;
}

.detail-section h3 {
  margin-bottom: 14px;
}

.detail-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.detail-field-grid p {
  margin: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #edf0f4;
}

.detail-field-grid span {
  display: block;
  color: #64748b;
  margin-bottom: 6px;
}

.detail-field-grid b {
  font-weight: 800;
}

.detail-warning {
  border: 1px solid #ffd4d4;
  background: #fff1f2;
  color: #a61b1b;
  padding: 16px;
}

.audit-panel {
  border: 1px solid #d9e5ee;
  background: #fff;
}

.audit-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 900;
  background: #f4f8fb;
}

.audit-panel summary span {
  color: var(--blue);
  font-weight: 800;
}

.audit-panel-body {
  padding: 16px;
  border-top: 1px solid #e1e5ea;
}

.audit-panel-body p {
  color: #64748b;
}

.audit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.audit-meta span {
  background: #eef6ff;
  color: #315f95;
  border: 1px solid #d7e9fb;
  padding: 6px 10px;
  font-weight: 800;
}

.audit-reason {
  display: block;
  margin: 12px 0;
  color: #3f4f65;
  font-weight: 800;
}

.audit-reason textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  margin-top: 8px;
  border: 1px solid #d9e1ea;
  padding: 10px;
  resize: vertical;
}

.process-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.process-stat-card {
  border: 1px solid #e1e5ea;
  background: #fbfcfd;
}

.process-stat-card h3 {
  margin: 0;
  padding: 12px;
  background: #eef1f4;
}

.process-stat-card p,
.process-stat-card small {
  display: block;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid #edf0f4;
}

.process-admin {
  display: grid;
  gap: 14px;
}

.process-add {
  display: flex;
  gap: 10px;
}

.process-add input,
.process-add select {
  min-height: 38px;
  border: 1px solid #d7dde5;
  padding: 0 10px;
}

.process-add input {
  flex: 1;
}

.process-category-grid,
.process-board-page {
  display: grid;
  gap: 14px;
}

.process-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.process-category-card,
.process-category-board {
  border: 1px solid #dce4ee;
  background: #fff;
}

.process-category-card header,
.process-category-board header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-bottom: 1px solid #e4ebf3;
}

.process-category-card header span,
.process-category-board header span,
.process-category-board header p {
  margin: 0;
  color: #64748b;
}

.process-category-card .process-admin-list {
  padding: 12px;
}

.process-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.process-admin-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #eef6ff;
  color: #1d72d2;
}

.process-admin-list button {
  border: 0;
  background: transparent;
  color: #c92a2a;
  font-weight: 900;
}

.worker-hero {
  display: grid;
  grid-template-columns: minmax(160px, .35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #e1e5ea;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.worker-hero h2 {
  margin: 2px 0 0;
  font-size: calc(var(--user-font-size) * 1.25);
  line-height: 1.25;
}

.worker-hero .eyebrow {
  margin-bottom: 0;
}

.worker-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.worker-kpis article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  padding: 7px 9px;
}

.worker-kpis span {
  color: #64748b;
  line-height: 1.25;
}

.worker-kpis b {
  display: block;
  margin-top: 0;
  font-size: calc(var(--user-font-size) * 1.12);
  line-height: 1.1;
}

.worker-hero + .order-toolbar {
  padding: 8px 10px;
  margin-bottom: 10px;
}

.worker-board {
  display: grid;
  gap: 8px;
}

.worker-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e1e5ea;
  background: #fff;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
}

.worker-card.done {
  border-left-color: #16a34a;
  background: #fbfefc;
}

.worker-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.worker-card-head > div {
  min-width: 0;
}

.worker-group-card {
  background: #f8fbff;
}

.worker-subquote-list {
  display: grid;
  gap: 7px;
}

.worker-child-card {
  margin-left: 8px;
  border-left-width: 3px;
  padding: 9px 10px;
}

.worker-card h3 {
  margin: 4px 0 2px;
  font-size: calc(var(--user-font-size) * 1.02);
  line-height: 1.25;
}

.worker-card p {
  margin: 0;
  line-height: 1.35;
  color: #64748b;
}

.worker-card .status {
  padding: 4px 8px;
  line-height: 1.2;
}

.worker-card .process-chain {
  min-height: 0;
  justify-content: flex-start;
  gap: 4px;
}

.worker-card .step-badge,
.worker-card .step-gap {
  padding: 4px 7px;
  font-size: calc(var(--user-font-size) * .86);
  line-height: 1.2;
}

.worker-card .step-badge.active {
  box-shadow: none;
}

.worker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b;
  font-size: calc(var(--user-font-size) * .88);
}

.worker-meta span {
  background: #f8fafc;
  border: 1px solid #edf0f4;
  padding: 4px 7px;
}

.worker-compact-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}

.worker-compact-controls .worker-process-editor.compact-note[open],
.worker-compact-controls .worker-image-uploader[open],
.worker-compact-controls .compact-transfer[open] {
  width: 100%;
}

.worker-image-uploader {
  margin: 0;
}

.worker-image-uploader summary {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  cursor: pointer;
  border: 1px solid #cfd8e3;
  background: #f8fafc;
  color: #0f2a55;
  padding: 0 9px;
  font-size: calc(var(--user-font-size) * .88);
  font-weight: 800;
  list-style: none;
}

.worker-image-uploader summary::-webkit-details-marker {
  display: none;
}

.worker-image-panel {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #e1e7ef;
  background: #fbfdff;
}

.worker-image-process {
  color: #64748b;
  font-size: calc(var(--user-font-size) * .86);
}

.worker-upload-button {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  cursor: pointer;
  border: 1px solid #b7d7f8;
  background: #eef6ff;
  color: var(--blue);
  padding: 0 10px;
  font-weight: 800;
}

.worker-upload-button input {
  display: none;
}

.worker-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.worker-image-item {
  position: relative;
  display: inline-grid;
}

.worker-image-thumb {
  width: 58px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: calc(var(--user-font-size) * .82);
}

.worker-image-thumb::before {
  display: none;
  content: none;
}

.worker-image-item .loaded-detail-image {
  width: 58px;
  height: 44px;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border: 1px solid #d7dde5;
  margin: 0;
}

.worker-image-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border: 1px solid #f2b8b8;
  border-radius: 999px;
  background: #fff;
  color: #d11;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.worker-image-groups {
  display: grid;
  gap: 10px;
}

.worker-image-groups section {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #edf0f4;
  background: #fff;
}

.worker-image-groups strong {
  color: #0f2a55;
}

.worker-card > .muted {
  margin: -2px 0 0;
  font-size: calc(var(--user-font-size) * .88);
}

.worker-card .detail-actions {
  justify-content: flex-start;
  gap: 6px;
}

.worker-card .detail-actions button,
.worker-card .detail-actions .green-pill {
  min-height: 30px;
  padding: 0 9px;
  line-height: 1.2;
}

.worker-card .compact-transfer {
  margin-top: 0;
}

.worker-card .compact-transfer summary {
  min-height: 30px;
  padding: 0 9px;
  font-size: calc(var(--user-font-size) * .88);
}

.worker-card .transfer-panel {
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 6px;
  margin-top: 6px;
}

.worker-card .transfer-box input {
  min-height: 30px;
  padding: 0 8px;
}

.worker-card .transfer-targets {
  gap: 6px;
}

.worker-card .transfer-target-button {
  min-height: 30px;
  padding: 0 9px;
}

.worker-process-editor.compact-note {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.worker-process-editor.compact-note summary {
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
  border: 1px solid #cfd8e3;
  background: #f8fafc;
  color: #0f2a55;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  font-size: calc(var(--user-font-size) * .88);
  font-weight: 800;
}

.worker-process-editor.compact-note textarea {
  min-height: 50px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 8px;
}

@media (max-width: 900px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong,
  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-dropdown {
    right: 0;
    left: auto;
    width: min(260px, calc(100vw - 24px));
  }

  .supplier-ledger-summary,
  .supplier-ledger-picker-head,
  .detail-summary.supplier-quote-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .supplier-pack-visual,
  .supplier-hero-tags {
    justify-items: start;
    justify-content: flex-start;
  }

  .worker-hero {
    grid-template-columns: 1fr;
  }

  .worker-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worker-kpis article {
    display: grid;
    align-content: start;
  }

  .worker-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-card .transfer-panel {
    grid-template-columns: 1fr;
  }

  .about-hero-head {
    display: grid;
  }

  .about-page {
    padding: 22px 16px;
  }

  .about-hero h2 {
    font-size: calc(var(--user-font-size) * 1.85);
  }

  .about-editor-feishu .ql-editor {
    min-height: 260px;
    padding: 18px 16px;
  }

  .about-editor-feishu .ql-toolbar.ql-snow {
    padding: 8px;
  }

  .about-link-editor-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
  background: #eef7fb;
  border: 1px solid #d9e5ee;
}

.stats-toolbar input,
.stats-toolbar select {
  min-height: 36px;
  border: 1px solid #d7dde5;
  background: #fff;
  padding: 0 10px;
}

.month-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.month-filter button {
  border: 1px solid #d7dde5;
  background: #fff;
  padding: 8px 14px;
}

.toolbar-search {
  margin-left: auto;
}

.stats-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stats-summary-row article {
  border: 1px solid #e1e5ea;
  background: #fff;
  padding: 16px;
}

.stats-summary-row span {
  color: #64748b;
}

.stats-summary-row b {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.stats-summary-row small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  line-height: 1.5;
}

.report-kpi-row {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.report-detail-table td:last-child {
  text-align: left;
  color: #475569;
}

.notification-center {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.notification-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.notification-config-grid label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.notification-table table {
  min-width: 1080px;
}

.notification-table {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.notification-table input,
.notification-table select,
.notification-table textarea,
.notification-config-grid input,
.notification-config-grid select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfd6df;
  padding: 6px 10px;
  background: #fff;
}

.notification-table textarea {
  min-height: 64px;
  resize: vertical;
}

.notice-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 5px 9px;
  font-weight: 900;
  background: #e2e8f0;
  color: #334155;
}

.notice-status.success { background: #dcfce7; color: #15803d; }
.notice-status.failed { background: #fee2e2; color: #b91c1c; }
.notice-status.skipped { background: #fef3c7; color: #92400e; }
.notice-status.pending { background: #dbeafe; color: #1d4ed8; }

.notification-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.notification-filters select,
.notification-filters input {
  min-height: 36px;
  border: 1px solid #cfd6df;
  padding: 6px 10px;
  background: #fff;
}

.notification-template-create,
.notification-template-extra {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  margin-bottom: 12px;
}

.simple-template-create {
  grid-template-columns: minmax(360px, 1.25fr) minmax(300px, .75fr);
  align-items: stretch;
  padding: 14px;
  border: 1px solid #e3ebf4;
  background: #f8fbff;
}

.template-create-main,
.template-create-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.template-create-main {
  padding-right: 16px;
}

.template-create-side {
  padding-left: 16px;
  border-left: 1px solid #dbe7f3;
}

.template-create-main label,
.template-create-side label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 900;
}

.template-create-main textarea {
  min-height: 104px;
}

.template-create-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.template-enable-switch {
  justify-content: start;
  min-height: 36px;
}

.template-create-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #dbe7f3;
}

.template-advanced {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  background: #fff;
}

.template-trigger-tip {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.65;
}

.template-trigger-tip strong {
  color: #1d4ed8;
}

.template-trigger-tip span {
  color: #334155;
}

.notification-placeholder-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed #b7c8dd;
  background: #ffffff;
}

.notification-placeholder-panel.compact {
  padding: 8px;
}

.placeholder-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
}

.placeholder-panel-head strong {
  color: #0f172a;
  font-size: 13px;
}

.placeholder-panel-head span,
.notification-placeholder-panel small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.placeholder-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.placeholder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.placeholder-chip span {
  color: #475569;
  font-family: inherit;
  font-weight: 700;
}

.placeholder-chip:hover {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: #dbeafe;
}

.template-advanced summary {
  cursor: pointer;
  color: #475569;
  font-weight: 900;
}

.template-advanced input {
  margin-top: 10px;
}

.template-advanced small {
  display: block;
  margin-top: 6px;
  color: #64748b;
}

.notification-template-extra .wide-field {
  grid-column: 1 / -1;
}

.template-extra-row.hidden {
  display: none;
}

.template-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 128px;
}

.template-edit-actions .neutral-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
}

.notification-event-cell {
  min-width: 220px;
}

.notification-event-cell strong,
.notification-event-cell small {
  display: block;
}

.notification-event-cell small {
  margin-top: 4px;
  color: #64748b;
  line-height: 1.5;
}

.notification-log-collapsed {
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.audit-log-center {
  display: grid;
  gap: 16px;
}

.audit-log-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.audit-log-filters label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

.audit-log-filters input,
.audit-log-filters select {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

.audit-log-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.audit-log-summary article {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.audit-log-summary span,
.audit-log-summary small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.audit-log-summary strong {
  display: block;
  margin: 4px 0 2px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.audit-log-center .notification-table table {
  min-width: 980px;
}

.audit-log-center .notification-table th {
  background: #f1f5f9;
  color: #334155;
}

.audit-log-center .notification-table tbody tr:hover {
  background: #f8fbff;
}

.audit-time-cell {
  display: grid;
  gap: 2px;
  min-width: 130px;
}

.audit-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-time-cell strong,
.audit-user-cell strong,
.audit-action-name {
  color: #0f172a;
  font-weight: 900;
}

.audit-time-cell span,
.audit-user-cell small,
.audit-action-name + small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.audit-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.audit-category-badge,
.audit-object-pill {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.audit-category-security,
.audit-category-user {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.audit-category-data,
.audit-category-supplier {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.audit-category-notification {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.audit-object-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.audit-remark {
  display: grid;
  gap: 3px;
  min-width: 180px;
  color: #334155;
  line-height: 1.5;
}

.audit-remark small {
  color: #94a3b8;
  font-size: 12px;
}

.audit-empty {
  padding: 22px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
}

.audit-log-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  color: #64748b;
}

.muted-line {
  color: #64748b;
}

.follow-star {
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #94a3b8;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.follow-star:hover {
  transform: translateY(-1px);
  border-color: #f59e0b;
  color: #d97706;
}

.follow-star.active {
  background: #facc15;
  border-color: #eab308;
  color: #713f12;
  box-shadow: 0 5px 12px rgba(234, 179, 8, .22);
}

.notice-only-modal {
  max-width: 460px;
}

.notice-only-modal .modal-footer {
  align-items: center;
}

.order-table th:first-child,
.order-table th:nth-child(2),
.order-table td:first-child,
.order-table td:nth-child(2) {
  width: 48px;
  text-align: center;
}

.stat-table table {
  min-width: 980px;
}

.stat-table th,
.stat-table td {
  text-align: center;
}

.blue-cell {
  background: #eef8ff;
}

@media (max-width: 860px) {
  .notification-center {
    gap: 12px;
  }

  .notification-center .permission-card {
    padding: 14px;
  }

  .notification-center .permission-head {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-center .permission-head .button-row,
  .notification-center .permission-head > .primary-button,
  .notification-center .permission-head > .neutral-button {
    width: 100%;
  }

  .notification-center .permission-head > .primary-button,
  .notification-center .permission-head > .neutral-button,
  .template-create-footer .primary-button {
    min-height: 42px;
  }

  .notification-config-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .notification-template-create,
  .notification-template-extra {
    grid-template-columns: 1fr;
  }

  .notification-template-extra {
    align-items: stretch;
  }

  .notification-filters {
    width: 100%;
    justify-content: stretch;
  }

  .notification-filters select,
  .notification-filters input,
  .notification-filters button {
    width: 100%;
    min-height: 42px;
  }

  .notification-table {
    position: relative;
    margin-inline: -4px;
  }

  .notification-table::before {
    content: "宸﹀彸婊戝姩鏌ョ湅鏇村";
    display: block;
    padding: 8px 10px;
    border-bottom: 1px solid #dbe3ec;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    font-size: calc(var(--user-font-size) * .82);
  }

  .notification-table table {
    min-width: 920px;
  }

  .notification-table th,
  .notification-table td {
    padding: 10px 9px;
  }

  .notification-event-cell {
    min-width: 190px;
  }

  .about-simple-card {
    padding: 20px;
  }

  .about-simple-hero {
    grid-template-columns: 1fr;
  }

  .about-simple-hero img {
    justify-self: start;
    width: 96px;
  }

  .about-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-simple-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .simple-template-create {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .template-create-main {
    padding-right: 0;
  }

  .template-create-side {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #dbe7f3;
    padding-top: 14px;
  }

  .template-create-footer {
    flex-direction: column;
  }

  .template-create-footer .primary-button,
  .template-advanced {
    width: 100%;
  }

  .template-trigger-tip {
    line-height: 1.55;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding-right: 10px;
  }

  .tabs {
    margin-inline: -10px;
    padding-left: 10px;
  }

  .tab {
    min-width: 94px;
    max-width: 132px;
  }

  .page-view,
  .panel,
  .permission-card,
  .stats-grid article {
    padding: 12px;
  }

  .button-row button {
    flex: 1 1 120px;
  }

  h1 {
    font-size: calc(var(--user-font-size) * 1.55);
  }

  h2 {
    font-size: calc(var(--user-font-size) * 1.28);
  }

  h3 {
    font-size: calc(var(--user-font-size) * 1.06);
  }

  .notification-center {
    margin-inline: -2px;
  }

  .notification-center .permission-card {
    padding: 12px;
  }

  .notification-config-grid label,
  .template-create-main label,
  .template-create-side label {
    gap: 6px;
  }

  .notification-table table {
    min-width: 820px;
  }

  .audit-log-filters {
    grid-template-columns: 1fr;
  }

  .audit-log-filters .neutral-button {
    width: 100%;
  }

  .audit-log-pager {
    display: grid;
  }

  .notification-log-collapsed {
    padding: 12px;
    line-height: 1.6;
  }

  .about-info-grid {
    grid-template-columns: 1fr;
  }

  .template-create-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .tab,
  .hero-copy,
  .pack-visual,
  .role-panel article,
  .panel,
  .stats-grid article,
  .page-view {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  .workspace.is-switching .view.active,
  .workspace.is-switching .hero-panel,
  .workspace.is-switching .role-panel,
  .workspace.is-switching .stats-grid,
  .workspace.is-switching .content-grid {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Desktop visual direction: shadcn/ui-inspired primitives for the existing vanilla app. */
@media (min-width: 761px) {
  body {
    background: var(--shadcn-bg);
  }

  .panel,
  .page-view,
  .simple-panel,
  .metric-card,
  .permission-card,
  .config-toolbar-card,
  .quote-config-nav,
  .quote-config-quick-panel,
  .quote-config-table-tools,
  .module-table,
  .quote-config-guide-card,
  .quote-supplier-reference-card {
    border-color: var(--shadcn-border);
    border-radius: var(--shadcn-radius);
    background-color: var(--shadcn-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  }

  .module-table {
    overflow: hidden;
  }

  .module-table table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .module-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
  }

  .module-table td,
  .module-table th {
    border-bottom-color: #e5e7eb;
  }

  button,
  .primary-button,
  .neutral-button,
  .danger-button,
  .success-button,
  .blue-button,
  .text-button,
  .ghost-button {
    border-radius: 10px;
  }

  input,
  select,
  textarea {
    border-color: var(--shadcn-border);
    border-radius: 10px;
    background: #fff;
  }

  input:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid var(--shadcn-ring);
    outline-offset: 1px;
    border-color: #93c5fd;
  }
}

@media (max-width: 760px) {
  .quote-config-shell {
    display: block;
  }

  .quote-config-nav {
    position: static;
    max-height: none;
    margin-bottom: 12px;
  }

  .quote-config-quick-head,
  .quote-config-table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-config-quick-list {
    grid-template-columns: 1fr;
  }

  .quote-config-search {
    width: 100%;
    min-width: 0;
  }

  .quote-config-guide-card,
  .quote-supplier-reference-card {
    grid-template-columns: 1fr;
  }

  .quote-config-guide-foot {
    display: block;
  }
}

/* JYCRAC dashboard integration and system announcement panel. */
.jycrac-dashboard {
  display: grid;
  gap: 16px;
}

.jycrac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 119, 255, .08), rgba(19, 164, 127, .08));
}

.jycrac-head span {
  color: #1677ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.jycrac-head h3 {
  margin: 4px 0;
  font-size: 22px;
}

.jycrac-head p {
  margin: 0;
  color: #64748b;
}

.stat-chart-viewer {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #d9e4ef;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .96));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .07);
}

.stat-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stat-chart-head span {
  color: #1677ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stat-chart-head h3 {
  margin: 4px 0;
  font-size: 18px;
}

.stat-chart-head p {
  margin: 0;
  color: #64748b;
}

.stat-chart-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stat-chart-controls select {
  min-width: 150px;
  border: 1px solid #d5e1ee;
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  color: #0f172a;
  font-weight: 700;
}

.stat-chart-controls .neutral-button {
  border-radius: 10px;
}

.stat-chart-host {
  height: clamp(300px, 38vh, 430px);
  min-height: 300px;
  border: 1px solid #e4edf6;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.stat-chart-host canvas {
  display: block;
}

.jycrac-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.jycrac-summary article,
.jycrac-grid article,
.announcement-list article,
.announcement-form {
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.jycrac-summary article {
  padding: 14px;
}

.jycrac-summary span {
  color: #64748b;
  font-weight: 800;
}

.jycrac-summary b {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: 26px;
}

.jycrac-summary p {
  margin: 5px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.jycrac-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.jycrac-grid article {
  min-height: 360px;
  padding: 12px;
}

.system-announcement-panel {
  grid-column: 1 / -1;
}

.announcement-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.announcement-form input,
.announcement-form textarea,
.announcement-form select {
  width: 100%;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.announcement-form textarea {
  min-height: 76px;
  resize: vertical;
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-item {
  padding: 14px;
}

.announcement-item > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.announcement-item strong {
  font-size: 16px;
}

.announcement-item span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.announcement-item p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.6;
}

.announcement-item.important {
  border-color: rgba(245, 158, 11, .4);
  background: #fffbeb;
}

.announcement-item.urgent {
  border-color: rgba(239, 68, 68, .45);
  background: #fef2f2;
}

.announcement-popup-mask {
  z-index: 60;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(6px);
}

.announcement-popup {
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .26);
}

.announcement-popup .modal-title {
  align-items: flex-start;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.announcement-popup .modal-title span {
  display: block;
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.announcement-popup .modal-title h3 {
  margin: 0;
}

.announcement-popup .modal-title button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.announcement-popup .password-modal-body p {
  margin: 0;
  color: #1e293b;
  line-height: 1.75;
}

.announcement-popup .password-modal-body small {
  display: block;
  margin-top: 14px;
  color: #64748b;
}

.announcement-popup.important {
  border-color: rgba(245, 158, 11, .5);
}

.announcement-popup.urgent {
  border-color: rgba(239, 68, 68, .55);
}

@media (max-width: 960px) {
  .jycrac-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jycrac-grid {
    grid-template-columns: 1fr;
  }

  .jycrac-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-chart-head {
    flex-direction: column;
  }

  .stat-chart-controls {
    justify-content: stretch;
    width: 100%;
  }

  .stat-chart-controls select,
  .stat-chart-controls button {
    flex: 1 1 150px;
  }
}


/* Pricing engine bridge */
.pricing-core-panel {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96));
}
.pricing-core-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.pricing-core-panel-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pricing-core-panel-head h3 { margin: 4px 0 0; }
.pricing-core-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.pricing-core-summary article {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #fff;
}
.pricing-core-summary span { display: block; color: #64748b; font-size: 12px; margin-bottom: 6px; }
.pricing-core-summary b { color: #0f172a; }
.pricing-core-warning,
.pricing-core-ok {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.pricing-core-warning { background: #fff7ed; color: #9a3412; }
.pricing-core-ok { background: #ecfdf5; color: #047857; }
.pricing-debug-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}
.pricing-debug-list article {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.pricing-debug-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pricing-debug-list p { margin: 4px 0; color: #475569; word-break: break-word; }
.pricing-debug-list .ok { border-left: 4px solid #16a34a; }
.pricing-debug-list .warning { border-left: 4px solid #f59e0b; }
.pricing-debug-list .error { border-left: 4px solid #ef4444; }
.pricing-debug-list .muted { opacity: 0.75; }
.danger-text { color: #dc2626 !important; }
.notification-receiver-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.notification-receiver-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #fff;
}
.notification-receiver-box input { width: auto; }
.quote-config-core-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.9));
}
.quote-config-core-hero span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.quote-config-core-hero h3 {
  margin: 6px 0;
  font-size: 22px;
}
.quote-config-core-hero p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}
.quote-config-core-hero code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.06);
}

.core-support-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.core-support-list li {
  padding: 9px 10px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.quote-config-simple-hero {
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
}
.quote-config-legacy-title {
  margin: 18px 0 10px;
  color: #334155;
}

.pricing-scene-advanced {
  margin: 18px 0;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.pricing-scene-advanced > summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.pricing-scene-advanced > summary::-webkit-details-marker {
  display: none;
}

.pricing-scene-advanced > summary span {
  color: var(--primary-dark);
}

.pricing-scene-advanced > summary b {
  font-size: 13px;
  color: var(--muted);
}

.pricing-scene-advanced[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.pricing-scene-advanced .quote-config-core-hero {
  margin: 14px 14px 0;
}

.legacy-config-import-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.legacy-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.legacy-config-head span {
  color: #1677ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.legacy-config-head h3 {
  margin: 4px 0;
  font-size: 20px;
}

.legacy-config-head p {
  margin: 0;
  color: #64748b;
}

.legacy-config-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.legacy-config-metrics article {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.78));
}

.legacy-config-metrics span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.legacy-config-metrics b {
  color: #0f172a;
  font-size: 18px;
}

.legacy-config-table,
.legacy-trial-table {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #fff;
}

.legacy-config-table table,
.legacy-trial-table table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.legacy-config-table th,
.legacy-config-table td,
.legacy-trial-table th,
.legacy-trial-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
  vertical-align: top;
}

.legacy-config-table th,
.legacy-trial-table th {
  background: #f8fafc;
  font-weight: 800;
  white-space: nowrap;
}

.legacy-config-table td code {
  color: #2563eb;
}

.legacy-health-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.legacy-health-list h4,
.legacy-trial-table h4 {
  margin: 0 0 8px;
}

.legacy-health-list article {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.legacy-health-list article.error {
  background: #fef2f2;
  color: #991b1b;
}

.legacy-health-list article.warning {
  background: #fffbeb;
  color: #92400e;
}

.legacy-health-list article.suggest {
  background: #f0fdf4;
  color: #166534;
}

.warn-text {
  color: #b45309;
  font-weight: 700;
}

.soft-note {
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.86);
}

.quote-config-scene-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}

.quote-config-scene-pills button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 800;
}

.quote-config-scene-pills b {
  color: var(--primary-dark);
}

.pricing-scene-manager {
  margin: 18px 0;
}

.pricing-scene-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.pricing-scene-table {
  min-width: 860px;
}

.pricing-scene-table code {
  font-weight: 800;
  color: var(--primary-dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f7;
  color: var(--muted);
}

.status-pill.success {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.muted {
  background: #f1f5f9;
  color: #64748b;
}

.pricing-scene-editor {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  background: #f8fbff;
}

.pricing-scene-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pricing-scene-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

.pricing-scene-form-grid .wide-field {
  grid-column: 1 / -1;
}

.pricing-scene-constants {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h4 {
  margin: 0 0 4px;
}

.section-title-row p {
  margin: 0;
  color: var(--muted);
}

.pricing-scene-constant-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.pricing-scene-json-details {
  margin-top: 12px;
}

.pricing-scene-json-details summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--primary-dark);
}

.pricing-scene-json-input {
  width: 100%;
  min-height: 360px;
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  background: #ffffff;
}

@media (max-width: 760px) {
  .pricing-scene-form-grid,
  .pricing-scene-constant-row {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    flex-direction: column;
  }
}
