/* ==========================================================================
   保盟人力 · 劳务派遣信息管理系统
   ========================================================================== */

:root {
  --ink: #14201d;
  --ink-2: #34443f;
  --muted: #68766f;
  --muted-2: #98a39d;
  --line: #e3e8e1;
  --line-2: #edf1eb;
  --bg: #f5f6f1;
  --surface: #ffffff;

  --primary: #0f766e;
  --primary-600: #115e59;
  --primary-50: #effcf9;
  --primary-100: #ccfbf1;

  --green: #15803d;
  --green-50: #ecfdf3;
  --amber: #b45309;
  --amber-50: #fffbeb;
  --red: #dc2626;
  --red-50: #fef2f2;
  --violet: #6d28d9;
  --violet-50: #f5f3ff;
  --cyan: #0e7490;
  --cyan-50: #ecfeff;

  --sidebar: #f7f8f3;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 29, 0.05);
  --shadow-md: 0 12px 32px -14px rgba(20, 32, 29, 0.2);

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, h4, p, ul, ol {
  margin: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: rgba(15, 118, 110, 0.18);
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #cfd8e6;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #b3c0d3;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ==========================================================================
   登录页
   ========================================================================== */

.login {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 100vh;
  background: #f6f8fc;
}

.login-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(720px 720px at 82% 6%, rgba(15, 118, 110, 0.4), transparent 62%),
    radial-gradient(620px 620px at 4% 96%, rgba(14, 165, 233, 0.2), transparent 60%),
    linear-gradient(158deg, #0a1424 0%, #0d1c33 55%, #0a1526 100%);
  display: flex;
  align-items: stretch;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 10%, transparent 72%);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 46px 64px 34px;
  display: flex;
  flex-direction: column;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.login-version {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fcd34d;
  font-size: 10px;
  letter-spacing: 0.6px;
  background: rgba(15, 118, 110, 0.08);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #14b8a6, #0b5f58);
  box-shadow: 0 8px 20px -6px rgba(15, 118, 110, 0.75);
  flex: none;
}

.logo-mark svg {
  width: 26px;
  height: 26px;
}

.login-logo strong {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 1px;
}

.login-logo small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 2.6px;
  color: #7f96b5;
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.6px;
  color: #fbbf24;
  margin-bottom: 18px;
}

.eyebrow.light {
  color: var(--primary);
}

.login-copy {
  margin-top: clamp(52px, 8vh, 88px);
  max-width: 560px;
}

.login-copy h1 {
  font-size: clamp(42px, 4.2vw, 56px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -2px;
}

.login-copy h1 span {
  color: #bfdbfe;
}

.login-copy > p {
  margin-top: 18px;
  max-width: 500px;
  color: #9fb1c9;
  font-size: 13.5px;
  line-height: 1.95;
}

.login-features {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  display: grid;
  gap: 14px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c7d4e6;
  font-size: 13px;
}

.feature-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  position: relative;
  background: rgba(15, 118, 110, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.45);
}

.feature-dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fbbf24;
}

.login-highlights {
  max-width: 540px;
  margin-top: 34px;
}

.login-highlight {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.login-highlight:last-child {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.login-highlight > span {
  padding-top: 2px;
  color: #fbbf24;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

.login-highlight b {
  display: block;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.login-highlight small {
  display: block;
  margin-top: 3px;
  color: #7f96b5;
  font-size: 11.5px;
  line-height: 1.65;
}

.login-bottom {
  margin-top: auto;
  padding-top: 36px;
}

.login-metrics {
  display: flex;
  gap: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.login-metrics b {
  display: block;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.login-metrics span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: #7f96b5;
  letter-spacing: 0.5px;
}

.login-foot {
  margin-top: 18px;
  font-size: 10.5px;
  color: #5d7392;
  letter-spacing: 0.3px;
}

.login-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, 0.13);
  pointer-events: none;
}

.orbit-a {
  width: 640px;
  height: 640px;
  right: -240px;
  top: -210px;
}

.orbit-b {
  width: 940px;
  height: 940px;
  right: -380px;
  top: -330px;
  border-color: rgba(96, 165, 250, 0.07);
}

.login-grid {
  position: absolute;
  right: 6%;
  bottom: 8%;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(rgba(96, 165, 250, 0.42) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
  opacity: 0.55;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(15, 118, 110, 0.06), transparent 65%),
    #f6f8fc;
}

.login-card-brand {
  display: none;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.login-panel-foot {
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.2px;
}

.login-card {
  width: 100%;
  max-width: 408px;
  padding: 38px 36px 30px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: 0 30px 70px -34px rgba(15, 23, 42, 0.28);
  animation: rise 0.45s ease both;
}

.login-card-head h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.login-card-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-field {
  display: block;
  margin-top: 24px;
}

.login-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.input-icon {
  position: relative;
}

.input-icon > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #94a3b8;
  pointer-events: none;
}

.input-icon input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input-icon input:focus {
  background: #fff;
  border-color: #93b4fb;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.input-icon.has-toggle input {
  padding-right: 46px;
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  transition: color 0.16s, background 0.16s;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.password-toggle:hover {
  color: var(--ink-2);
  background: rgba(15, 23, 42, 0.05);
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--red);
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border-radius: 12px;
  font-size: 14.5px;
  letter-spacing: 2px;
}

.login-btn svg {
  width: 17px;
  height: 17px;
}

.demo-fill {
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  border: 1px dashed #d7e0ee;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  transition: 0.18s;
}

.demo-fill code {
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.demo-fill:hover {
  border-color: #b9ccf5;
  background: var(--primary-50);
}

.login-note {
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.login-note a,
.legal-check a {
  color: var(--primary);
  text-decoration: none !important;
}

.login-note a:hover,
.legal-check a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.login-error.success {
  color: var(--green);
}

.login-aux {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.login-aux .link-btn {
  font-size: 11.5px;
  color: var(--muted);
}

.login-aux .link-btn:hover {
  color: var(--primary);
}

.login-switch {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
}

.login-switch button {
  border: 0;
  background: none;
  padding: 0 2px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 500;
}

.login-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.register-card {
  max-width: 470px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 30px 24px;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.register-grid .field {
  gap: 5px;
}

.register-grid .field > span {
  display: block;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
}

.register-grid .field > span em {
  color: var(--red);
  font-style: normal;
  margin-left: 2px;
}

.register-grid .field.full {
  grid-column: 1 / -1;
}

.register-grid .input,
.register-grid .select {
  height: 38px;
  font-size: 12px;
}

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  cursor: pointer;
}

.legal-check input {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  flex: none;
}

.legal-check a {
  color: var(--primary);
}

.register-card .login-btn {
  margin-top: 14px;
}

.register-card .login-switch {
  margin-top: 14px;
}

.legal-body {
  max-height: none;
  padding-right: 6px;
}

.legal-meta {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted-2);
  font-size: 11px;
}

.legal-body h4 {
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.legal-body p {
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.85;
  text-align: justify;
}

.legal-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2) !important;
  font-size: 11px !important;
}

.security-question {
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 12.5px;
}

/* ==========================================================================
   应用框架
   ========================================================================== */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(400px 300px at 20% 0%, rgba(15, 118, 110, 0.22), transparent 65%),
    linear-gradient(180deg, #0b1526 0%, #0c1830 100%);
  color: #cbd5e1;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  flex: none;
}

.brand .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.brand .logo-mark svg {
  width: 23px;
  height: 23px;
}

.brand-text strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.brand-text small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: #6d829f;
  letter-spacing: 0.8px;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 20px;
}

.nav::-webkit-scrollbar {
  width: 6px;
}
.nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border: 0;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-label {
  padding: 0 12px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #586b87;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  color: #93a4bd;
  font-size: 13px;
  transition: background 0.16s, color 0.16s;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.9;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.32), rgba(15, 118, 110, 0.08));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.8);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.sidebar-foot {
  flex: none;
  padding: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-card {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.14);
}

.sidebar-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fcd34d;
  background: rgba(15, 118, 110, 0.2);
}

.sidebar-card-icon svg {
  width: 16px;
  height: 16px;
}

.sidebar-card b {
  display: block;
  font-size: 11.5px;
  color: #ccfbf1;
  font-weight: 500;
}

.sidebar-card small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #7590b3;
}

.version {
  margin-top: 12px;
  text-align: center;
  font-size: 10px;
  color: #4c5f7a;
  letter-spacing: 0.6px;
}

.app-version {
  display: inline-block;
  margin-top: 2px;
  color: #4c5f7a;
  font-size: 9.5px;
  letter-spacing: 0.4px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 54px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.menu-btn {
  display: none;
}

.icon-btn.menu-btn {
  display: none;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.crumb b {
  color: var(--ink);
  font-weight: 500;
}

.crumb span::before {
  content: "";
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.today {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  transition: 0.16s;
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.bell-btn {
  position: relative;
}

.bell-btn.has-alert::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9px;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
  animation: bellPulse 2s ease-out infinite;
  pointer-events: none;
}

.bell-count {
  position: absolute;
  top: 2px;
  right: 0;
  z-index: 2;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
}

@keyframes bellPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 10px 0 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  transition: 0.16s;
}

.user-chip:hover,
.user-menu.open .user-chip {
  background: #f8fafc;
  border-color: var(--line);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(145deg, #14b8a6, #0b5f58);
  box-shadow: 0 4px 10px -4px rgba(15, 118, 110, 0.6);
}

.user-meta {
  text-align: left;
  line-height: 1.25;
}

.user-meta strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}

.user-meta small {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.chev {
  width: 15px;
  height: 15px;
  color: #94a3b8;
  transition: transform 0.18s;
}

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

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.3);
  z-index: 60;
  animation: pop 0.16s ease both;
}

.dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 6px;
}

.dropdown-head strong {
  display: block;
  font-size: 13px;
}

.dropdown-head small {
  color: var(--muted-2);
  font-size: 11px;
}

.dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: left;
}

.dropdown button svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.dropdown button:hover {
  background: #f5f8fc;
}

.dropdown button.danger {
  color: var(--red);
}

.dropdown button.danger svg {
  color: var(--red);
}

.view {
  flex: 1;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 10px 22px 24px;
}

.page-enter {
  animation: fadeUp 0.34s ease both;
}

.sidebar-backdrop {
  display: none;
}

/* ==========================================================================
   通用组件
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.14s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  box-shadow: 0 6px 16px -8px rgba(15, 118, 110, 0.9);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(15, 118, 110, 0.95);
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover {
  border-color: #cbd8ea;
  background: #fbfdff;
}

.btn.soft {
  background: var(--primary-50);
  color: var(--primary);
}

.btn.soft:hover {
  background: #e5efff;
}

.btn.danger {
  background: var(--red-50);
  color: var(--red);
}

.btn.danger:hover {
  background: #fee2e2;
}

.btn.sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
}

.link-btn:hover {
  color: var(--primary-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn.danger {
  color: var(--red);
}

.link-btn.muted {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
}

/* 避免拖拽时误选表头、标签和按钮文字，表格正文仍可复制 */
.table th,
.tag,
.btn,
.link-btn,
.page-btn,
.nav-item,
.stat-label,
.stat-foot,
.card-sub,
.user-chip,
.crumb,
.field label,
.checkline {
  -webkit-user-select: none;
  user-select: none;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.tag.plain::before {
  display: none;
}

.tag.green { background: var(--green-50); color: var(--green); }
.tag.amber { background: var(--amber-50); color: var(--amber); }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.blue { background: var(--primary-50); color: var(--primary); }
.tag.violet { background: var(--violet-50); color: var(--violet); }
.tag.gray { background: #f1f5f9; color: #64748b; }
.tag.cyan { background: var(--cyan-50); color: var(--cyan); }

.mono {
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  letter-spacing: -0.2px;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

/* 页面头 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.page-head h1 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.page-head .page-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.page-head .btn {
  height: 36px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 0;
}

.card-head.pad {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.card-body {
  padding: 14px 16px 16px;
}

.card-link {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   工作台
   ========================================================================== */

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

.stat-card {
  position: relative;
  padding: 14px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat-icon.blue { background: var(--primary-50); color: var(--primary); }
.stat-icon.green { background: var(--green-50); color: var(--green); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber); }
.stat-icon.violet { background: var(--violet-50); color: var(--violet); }
.stat-icon.cyan { background: var(--cyan-50); color: var(--cyan); }
.stat-icon.red { background: var(--red-50); color: var(--red); }

.stat-value {
  margin-top: 10px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0;
}

.stat-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.stat-foot .up { color: var(--green); }
.stat-foot .warn { color: var(--amber); }
.stat-foot .down { color: var(--red); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.chart-card .card-body {
  padding-top: 12px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-empty {
  height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 12.5px;
}

.chart-scroll {
  width: 100%;
  overflow-x: auto;
}

.mobile-trend {
  display: none;
}

.trend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}

.trend-row:last-child {
  border-bottom: 0;
}

.trend-month {
  width: 42px;
  color: var(--muted);
}

.trend-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.trend-net {
  width: 96px;
  text-align: right;
  color: var(--muted-2);
  font-size: 11px;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 6px 0 2px;
}

.donut {
  width: 150px;
  height: 150px;
  flex: none;
}

.donut-center {
  font-size: 22px;
  font-weight: 600;
  fill: var(--ink);
}

.donut-center-label {
  font-size: 10px;
  fill: var(--muted);
}

.donut-legend {
  flex: 1;
  display: grid;
  gap: 11px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.donut-legend-row .name {
  color: var(--muted);
}

.donut-legend-row b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.donut-legend-row .pct {
  width: 38px;
  text-align: right;
  color: var(--muted-2);
  font-size: 11px;
}

.bar-list {
  display: grid;
  gap: 15px;
  padding-top: 4px;
}

.bar-row {
  display: grid;
  grid-template-columns: 116px 1fr 34px;
  align-items: center;
  gap: 12px;
}

.bar-name {
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #0f766e);
  transition: width 0.5s ease;
}

.bar-row:nth-child(2n) .bar-fill {
  background: linear-gradient(90deg, #fcd34d, #14b8a6);
}

.bar-value {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.simple-list {
  display: grid;
  gap: 2px;
}

.simple-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
}

.simple-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.simple-item:first-child {
  padding-top: 2px;
}

.simple-item:hover .simple-title {
  color: var(--primary);
}

.simple-date {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex: none;
  display: grid;
  place-content: center;
  text-align: center;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.simple-date b {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.simple-date small {
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 2px;
}

.simple-main {
  min-width: 0;
  flex: 1;
}

.simple-title {
  font-size: 12.8px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.simple-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simple-tail {
  flex: none;
}

.mini-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

/* ==========================================================================
   列表页
   ========================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  width: 250px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  outline: none;
  font-size: 12.5px;
  transition: 0.16s;
}

.search-box input:focus {
  background: #fff;
  border-color: #a9c3f8;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.filter-select,
.filter-month {
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  color: var(--ink-2);
  font-size: 12.5px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.filter-month {
  padding-right: 12px;
  background-image: none;
  width: 142px;
}

.filter-select:focus,
.filter-month:focus {
  border-color: #a9c3f8;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.result-count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.result-count b {
  color: var(--ink);
  font-weight: 600;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line-2);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  background: #f8fafc;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.8px;
  color: var(--ink-2);
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody tr {
  transition: background 0.13s;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table-compact {
  min-width: 0;
}

.table-compact th,
.table-compact td {
  padding-left: 10px;
  padding-right: 10px;
}

.table .th-actions,
.table .td-actions {
  text-align: right;
  width: 1%;
}

.td-actions {
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.cell-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border: 1px solid #e0ebff;
}

.cell-person .who b {
  display: block;
  font-size: 12.8px;
  font-weight: 500;
  color: var(--ink);
}

.cell-person .who small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.cell-stack b {
  display: block;
  font-weight: 500;
  color: var(--ink);
  font-size: 12.8px;
}

.cell-stack small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.cell-stack .tag {
  margin-top: 4px;
}

.dash-cell {
  color: var(--muted-2);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 12px;
  color: var(--muted);
}

.pagination-info b {
  color: var(--ink);
}

.page-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  display: grid;
  place-items: center;
  transition: 0.14s;
}

.page-btn:hover:not(:disabled) {
  border-color: #b9ccf5;
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-btn svg {
  width: 14px;
  height: 14px;
}

.empty {
  padding: 66px 24px;
  text-align: center;
}

.empty-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f4f7fc;
  color: #9db0c8;
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.empty h3 {
  font-size: 14px;
  font-weight: 500;
}

.empty p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-2);
}

.loading-state {
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccfbf1;
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}

.error-panel {
  margin: 40px auto;
  max-width: 520px;
  padding: 30px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.error-panel h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.error-panel p {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}

/* ==========================================================================
   报表
   ========================================================================== */

.report-month {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.report-month span {
  font-size: 12px;
  color: var(--muted);
}

.report-month input {
  border: 0;
  outline: none;
  font-size: 12.5px;
  background: transparent;
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.report-table th,
.report-table td {
  padding-left: 14px;
  padding-right: 14px;
}

.report-table th:not(:first-child),
.report-table td:not(:first-child) {
  text-align: right;
}

.report-total td {
  background: #f8fafc;
  font-weight: 600;
  color: var(--ink);
}

.mini-bars {
  display: grid;
  gap: 12px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 76px 1fr 34px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.mini-bar-row .bar-track {
  height: 7px;
}

/* ==========================================================================
   弹窗 / 表单
   ========================================================================== */

.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: fade 0.18s ease both;
}

.modal {
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 40px 90px -24px rgba(15, 23, 42, 0.5);
  animation: pop 0.2s ease both;
  overflow: hidden;
}

.modal.lg {
  width: 720px;
}

.modal.sm {
  width: 420px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line-2);
  flex: none;
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-head p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.modal-head .icon-btn {
  margin: -6px -8px 0 0;
  width: 34px;
  height: 34px;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-gutter: stable;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 0;
}

.modal-body.flush {
  padding: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line-2);
  flex: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.field label em {
  color: var(--red);
  font-style: normal;
  margin-left: 3px;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dce4f0;
  border-radius: 9px;
  background: #fff;
  outline: none;
  font-size: 12.8px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  cursor: pointer;
}

.textarea {
  height: auto;
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #9dbcf8;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.09);
}

.input::placeholder,
.textarea::placeholder {
  color: #a9b6c8;
}

.input:disabled,
.input[readonly] {
  background: #f8fafc;
  color: var(--muted);
}

.field small {
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.form-section {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-left: 9px;
  border-left: 3px solid var(--primary);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.form-section:first-child {
  margin-top: 0;
}

.form-error {
  grid-column: 1 / -1;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--red-50);
  color: var(--red);
  font-size: 12px;
}

/* 详情 */
.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f6ff, #f8fbff);
  border: 1px solid #e2ecff;
  margin-bottom: 18px;
}

.detail-hero .who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-hero .mini-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
  border-radius: 12px;
}

.detail-hero h4 {
  font-size: 15px;
  font-weight: 600;
}

.detail-hero p {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.detail-amount {
  text-align: right;
}

.detail-amount span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.detail-amount b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed #edf1f7;
  font-size: 12.5px;
}

.kv .k {
  color: var(--muted);
  flex: none;
}

.kv .v {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.kv .v.highlight {
  color: var(--primary);
  font-weight: 600;
}

.detail-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}

.sign-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.sign-summary div {
  min-width: 0;
}

.sign-summary span {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
}

.sign-summary b {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.7;
  cursor: pointer;
}

.checkline input {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  flex: none;
}

.hash-block {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
}

.hash-block span {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
  margin-bottom: 5px;
}

.hash-block code {
  display: block;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-2);
  word-break: break-all;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12.5px;
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.6);
  animation: slideIn 0.22s ease both;
  pointer-events: auto;
}

.toast.leaving {
  animation: slideOut 0.2s ease both;
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.toast.success svg {
  color: #4ade80;
}

.toast.error svg {
  color: #fb7185;
}

/* ==========================================================================
   动画
   ========================================================================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideOut {
  to { opacity: 0; transform: translateX(18px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   合规申报
   ========================================================================== */

.compliance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 26px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(520px 260px at 88% 0%, rgba(59, 130, 246, 0.45), transparent 65%),
    radial-gradient(420px 300px at 4% 100%, rgba(14, 165, 233, 0.18), transparent 60%),
    linear-gradient(135deg, #0b1d3a 0%, #102a52 55%, #0d2143 100%);
  box-shadow: 0 20px 40px -26px rgba(15, 23, 42, 0.55);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.compliance-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(148, 197, 255, 0.16);
  pointer-events: none;
}

.compliance-hero-main {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.compliance-hero .eyebrow {
  color: #7dd3fc;
  margin-bottom: 10px;
}

.compliance-hero h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.4;
}

.compliance-hero p {
  margin-top: 10px;
  max-width: 720px;
  color: #a8c0df;
  font-size: 12.5px;
  line-height: 1.8;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccfbf1;
  font-size: 10.5px;
}

.hero-chips svg {
  width: 12px;
  height: 12px;
  color: #4ade80;
}

.compliance-hero-stats {
  display: flex;
  gap: 30px;
  flex: none;
  position: relative;
  z-index: 1;
  padding-right: 8px;
}

.compliance-hero-stats div {
  text-align: center;
}

.compliance-hero-stats b {
  display: block;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.compliance-hero-stats span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  color: #8fa9c9;
}

.compliance-table td {
  white-space: nowrap;
  vertical-align: top;
}

.compliance-table.functions {
  min-width: 0;
}

.compliance-table .wrap-cell {
  white-space: normal;
  min-width: 280px;
  line-height: 1.7;
  color: var(--muted);
}

.compliance-table.functions .wrap-cell {
  min-width: 0;
  padding-right: 10px;
}

.compliance-table.functions th:last-child,
.compliance-table.functions td:last-child {
  padding-left: 8px;
  padding-right: 12px;
}

.compliance-table td b {
  font-weight: 500;
  color: var(--ink);
}

.compliance-no {
  color: var(--muted-2) !important;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px !important;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mini-stat-grid div {
  padding: 11px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
}

.mini-stat-grid span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.mini-stat-grid b {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.alert-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--amber-50);
  border: 1px solid #fde68a;
  color: var(--amber);
  font-size: 11px;
  line-height: 1.6;
}

.alert-line svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.kv-list .kv:last-child {
  border-bottom: 0;
}

.company-block {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #f8faff;
  border: 1px dashed #dbe6fa;
  color: var(--muted);
  font-size: 10.5px;
}

.company-block b {
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}

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

.export-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.export-card:hover {
  border-color: #b9ccf5;
  box-shadow: 0 10px 24px -18px rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.export-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex: none;
}

.export-icon svg {
  width: 19px;
  height: 19px;
}

.export-info {
  min-width: 0;
  flex: 1;
}

.export-info b {
  display: block;
  font-size: 12.8px;
  font-weight: 500;
  color: var(--ink);
}

.export-info span {
  display: -webkit-box;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hint-line {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 11.3px;
  line-height: 1.75;
}

.guide-list {
  display: grid;
  gap: 18px;
}

.guide-item {
  display: flex;
  gap: 12px;
}

.guide-no {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
}

.guide-item b {
  font-size: 12.8px;
  font-weight: 500;
}

.guide-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.reader-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.reader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.reader-status[data-state="ok"] .reader-dot {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.reader-status[data-state="off"] .reader-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.reader-status-text b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}

.reader-status-text small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.reader-help {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11.3px;
  line-height: 1.8;
}

.reader-help code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--ink-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
}

.idcard-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idcard-row .input {
  flex: 1;
  min-width: 0;
}

.idcard-row .btn {
  flex: none;
  height: 40px;
}

@media (max-width: 1040px) {
  .compliance-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .compliance-hero-stats {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .compliance-hero {
    padding: 22px 20px;
  }
  .compliance-hero h2 {
    font-size: 19px;
  }
  .compliance-hero-stats {
    gap: 28px;
  }
  .compliance-hero-stats b {
    font-size: 23px;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .idcard-row {
    align-items: stretch;
    flex-direction: column;
  }
  .idcard-row .btn {
    width: 100%;
  }
}

/* ==========================================================================
   系统设置
   ========================================================================== */

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.settings-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-status {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf8;
}

.backup-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.backup-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-2);
}

.backup-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.backup-dot.fail {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.backup-line b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.backup-line small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

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

.injury-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.injury-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.injury-head b {
  color: var(--ink);
  font-size: 12.5px;
}

.injury-head small {
  color: var(--muted-2);
  font-size: 10.5px;
}

.injury-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.injury-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fbfcfe;
}

.injury-grid span {
  color: var(--muted);
  font-size: 10.5px;
}

.injury-grid b {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
}

.injury-grid small {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.dev-code {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 9px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11.5px;
  line-height: 1.6;
}

.dev-code b {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 2px;
}

@media (max-width: 1180px) {
  .rate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.settings-preview {
  padding: 22px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(320px 220px at 90% 0%, rgba(59, 130, 246, 0.42), transparent 65%),
    linear-gradient(150deg, #0b1d3a 0%, #102a52 65%, #0c1c36 100%);
  min-height: 250px;
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-top .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.preview-top .logo-mark svg {
  width: 21px;
  height: 21px;
}

.preview-top b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.preview-top small {
  display: block;
  margin-top: 2px;
  color: #7f96b5;
  font-size: 8.5px;
  letter-spacing: 1.2px;
}

.preview-system {
  margin-top: 30px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.4px;
}

.preview-tagline {
  margin-top: 8px;
  color: #fbbf24;
  font-size: 8.5px;
  letter-spacing: 1.6px;
  line-height: 1.5;
}

.preview-copyright {
  margin-top: 34px;
  padding-top: 13px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #7f96b5;
  font-size: 9.5px;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .settings-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .settings-actions .btn {
    width: 100%;
  }
  .rate-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .injury-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   申报材料
   ========================================================================== */

.doc-state {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.doc-state.ok {
  color: var(--green);
}

.doc-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.doc-head b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.doc-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.doc-upload {
  position: relative;
  overflow: hidden;
  flex: none;
}

.doc-file {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #f8fafc;
}

.doc-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
}

.doc-icon svg {
  width: 16px;
  height: 16px;
}

.doc-meta {
  min-width: 0;
  flex: 1;
}

.doc-meta b {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.doc-meta small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.doc-file .link-btn {
  flex: none;
  font-size: 11px;
}

.link-btn.danger {
  color: var(--red);
}

.doc-empty {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

/* ==========================================================================
   电子签署页
   ========================================================================== */

body.signing-mode .sidebar {
  display: none;
}

body.signing-mode .main {
  margin-left: 0;
}

.sign-page {
  max-width: 900px;
  margin: 8px auto 40px;
}

.sign-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.sign-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.sign-brand .logo-mark svg {
  width: 21px;
  height: 21px;
}

.sign-brand b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.sign-brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.sign-brand .tag {
  margin-left: auto;
}

.sign-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px -30px rgba(15, 23, 42, 0.28);
}

.sign-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
  color: #fff;
  background:
    radial-gradient(360px 200px at 85% 0%, rgba(59, 130, 246, 0.4), transparent 65%),
    linear-gradient(135deg, #0b1d3a, #12325f);
}

.sign-hero .eyebrow {
  color: #fcd34d;
  font-size: 9px;
  letter-spacing: 2px;
}

.sign-hero h1 {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.sign-hero p {
  margin-top: 6px;
  color: #a9bdd8;
  font-size: 11.5px;
}

.sign-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  padding: 22px 30px;
  border-bottom: 1px solid var(--line-2);
}

.sign-summary span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.sign-summary b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

.sign-form {
  padding: 22px 30px 26px;
}

.sign-form .field {
  max-width: 360px;
}

.sign-form .checkline {
  margin-top: 16px;
}

.sign-submit {
  width: 100%;
  margin-top: 16px;
  height: 42px;
}

.sign-alert {
  margin: 22px 30px 26px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fef2f2;
}

.sign-alert b {
  display: block;
  color: #b91c1c;
  font-size: 13px;
}

.sign-alert p {
  margin-top: 8px;
  color: #7f1d1d;
  font-size: 11.5px;
  line-height: 1.75;
}

.sign-alert p.muted {
  color: #9f6b6b;
  font-size: 11px;
}

.sign-success {
  display: flex;
  gap: 14px;
  margin: 22px 30px 26px;
  padding: 16px 18px;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
  background: #f0fdf4;
}

.sign-success-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.sign-success-icon svg {
  width: 18px;
  height: 18px;
}

.sign-success h3 {
  color: #166534;
  font-size: 13px;
  font-weight: 600;
}

.sign-success p {
  margin-top: 5px;
  color: #166534;
  font-size: 11px;
}

.sign-success code {
  display: block;
  margin-top: 8px;
  color: #3f6212;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
  word-break: break-all;
}

.sign-back {
  display: flex;
  margin: 16px auto 0;
}

@media (max-width: 680px) {
  .sign-hero {
    padding: 22px;
  }
  .sign-summary {
    grid-template-columns: 1fr 1fr;
    padding: 18px 22px;
  }
  .sign-form {
    padding: 18px 22px 22px;
  }
  .sign-alert,
  .sign-success {
    margin: 18px 22px 22px;
  }
}

/* ==========================================================================
   功能清单编辑
   ========================================================================== */

.card-head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.function-editor-wrap {
  max-height: 60vh;
  overflow: auto;
}

.function-editor {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.function-editor th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f3;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
}

.function-editor td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

.function-editor .fe-no {
  padding-top: 12px;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-align: center;
}

.function-editor .input {
  height: 34px;
  font-size: 11.5px;
}

.function-editor .fe-functions {
  height: 52px;
  padding: 7px 9px;
  resize: vertical;
  line-height: 1.5;
}

.function-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

/* ==========================================================================
   员工签署门户
   ========================================================================== */

.employee-portal {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(15, 118, 110, 0.06), transparent 60%),
    #f7f7f1;
}

.employee-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid #e5e8df;
  background: rgba(255, 254, 251, 0.94);
  backdrop-filter: blur(10px);
}

.employee-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.employee-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.employee-brand .logo-mark svg {
  width: 21px;
  height: 21px;
}

.employee-brand b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.employee-brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.employee-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.employee-main {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 26px 24px 48px;
}

.emp-page {
  max-width: 960px;
  margin: 0 auto;
}

.emp-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid #e4e8e1;
  border-radius: 14px;
  background: #fffefb;
}

.emp-profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.emp-profile-main .mini-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.emp-profile-main h1 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.emp-profile-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.emp-profile-meta {
  display: flex;
  gap: 26px;
}

.emp-profile-meta span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.emp-profile-meta b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

.emp-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
}

.emp-section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.emp-section-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.emp-contract {
  padding: 18px 20px;
  border: 1px solid #e4e8e1;
  border-radius: 12px;
  background: #fffefb;
}

.emp-contract-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.emp-contract-head b {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.emp-contract-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.emp-contract-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
}

.emp-contract .btn {
  margin-top: 12px;
}

.emp-signed {
  margin-top: 12px;
  color: var(--green);
  font-size: 11px;
}

.emp-sign-page {
  margin: 0 auto;
}

@media (max-width: 680px) {
  .employee-header {
    padding: 0 16px;
  }
  .employee-user span {
    display: none;
  }
  .employee-main {
    padding: 18px 14px 36px;
  }
  .emp-profile {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .emp-profile-meta {
    gap: 18px;
  }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1360px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .col-8, .col-7, .col-5 { grid-column: span 12; }
  .col-4, .col-6 { grid-column: span 6; }
}

@media (max-width: 1080px) {
  .report-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: 20px 0 60px rgba(15, 23, 42, 0.3);
  }
  .app.nav-open .sidebar {
    transform: none;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s;
  }
  .app.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .main {
    margin-left: 0;
  }
  .icon-btn.menu-btn {
    display: inline-grid;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
  .login-card-brand {
    display: block;
  }
}

@media (max-height: 760px) and (min-width: 1081px) {
  .login-brand-inner {
    padding: 30px 56px 22px;
  }
  .login-copy {
    margin-top: 28px;
  }
  .login-highlights {
    margin-top: 18px;
  }
  .login-highlight {
    padding: 8px 0;
  }
  .login-bottom {
    padding-top: 18px;
  }
  .login-metrics {
    padding-top: 14px;
  }
}

@media (max-width: 900px) {
  .col-4, .col-6 {
    grid-column: span 12;
  }
  .view {
    padding: 12px 14px 24px;
  }
  .topbar {
    padding: 0 14px;
  }
  .today {
    display: none;
  }
  .donut-wrap {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .page-head h1 {
    font-size: 21px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card {
    padding: 15px;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-icon {
    width: 30px;
    height: 30px;
  }
  .toolbar {
    padding: 14px 15px;
  }
  .search-box {
    width: 100%;
  }
  .toolbar-left {
    width: 100%;
  }
  .filter-select,
  .filter-month {
    flex: 1;
  }
  .table th,
  .table td {
    padding-left: 14px;
    padding-right: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .kv-grid {
    grid-template-columns: 1fr;
  }
  .user-meta,
  .chev {
    display: none;
  }
  .toast-root {
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: auto;
  }
  .toast {
    max-width: none;
  }
  .chart-scroll {
    display: none;
  }
  .mobile-trend {
    display: grid;
  }
  .modal-overlay {
    padding: 12px;
    align-items: end;
  }
  .modal {
    max-height: 92vh;
    border-radius: 18px;
  }
  .login-panel {
    padding: 24px 18px;
  }
  .login-card {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }
  .register-card {
    max-height: calc(100vh - 24px);
    padding: 24px 20px 20px;
  }
  .register-grid {
    grid-template-columns: 1fr;
  }
  .register-grid .field.full {
    grid-column: auto;
  }
  .bar-row {
    grid-template-columns: 92px 1fr 28px;
  }
}

/* ==========================================================================
   保盟视觉识别：青绿 / 米白 / 琥珀
   与常见蓝色后台模板拉开差异
   ========================================================================== */

body {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(15, 118, 110, 0.05), transparent 60%),
    var(--bg);
}

.logo-mark {
  background: linear-gradient(145deg, #0f766e, #0b5f58);
  box-shadow: 0 8px 18px -8px rgba(15, 118, 110, 0.75);
}

.login {
  background: #f7f6ef;
}

.login-brand {
  background:
    radial-gradient(680px 620px at 84% 4%, rgba(20, 184, 166, 0.22), transparent 62%),
    radial-gradient(520px 480px at 0% 100%, rgba(245, 158, 11, 0.12), transparent 60%),
    linear-gradient(155deg, #0d211d 0%, #10332c 55%, #0b1c18 100%);
}

.login-copy h1 span {
  color: #fcd34d;
}

.login-version {
  color: #d7c9a5;
  border-color: rgba(252, 211, 77, 0.28);
  background: rgba(252, 211, 77, 0.07);
}

.login-panel {
  background:
    radial-gradient(650px 420px at 100% 0%, rgba(15, 118, 110, 0.07), transparent 65%),
    #f7f6ef;
}

.login-card {
  background: #fffefb;
  border-color: #e8e7dc;
  box-shadow: 0 30px 70px -40px rgba(20, 32, 29, 0.4);
}

.login-card-head h2 {
  color: var(--ink);
}

.login-note a,
.legal-check a {
  color: #0f766e;
}

.sidebar {
  color: #43514c;
  background: linear-gradient(180deg, #fbfcf8 0%, #f4f6ef 100%);
  border-right: 1px solid #e3e8e1;
  box-shadow: 12px 0 30px -28px rgba(20, 32, 29, 0.35);
}

.brand {
  border-bottom-color: #e3e8e1;
}

.brand-text strong {
  color: #14201d;
}

.brand-text small {
  color: #7d8a83;
}

.nav-label {
  color: #8a968f;
}

.nav-item {
  color: #52615a;
}

.nav-item:hover {
  color: #14201d;
  background: rgba(15, 118, 110, 0.07);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, #0f766e, #0d9488);
  box-shadow: 0 8px 18px -12px rgba(15, 118, 110, 0.8);
}

.nav-item.active::before {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.65);
}

.sidebar-foot {
  border-top-color: #e3e8e1;
}

.sidebar-card {
  border-color: #d9e5db;
  background: linear-gradient(135deg, #eefcf8, #f8fbf2);
}

.sidebar-card-icon {
  color: #0f766e;
  background: #d9f7ef;
}

.sidebar-card b {
  color: #0f766e;
}

.sidebar-card small {
  color: #6b7a73;
}

.version,
.app-version {
  color: #7c8982;
}

.topbar {
  background: rgba(255, 254, 251, 0.94);
  border-bottom-color: #e7e9e1;
}

.card {
  border-color: #e4e8e1;
}

.table thead th {
  color: #6b7a73;
  background: #f7f8f3;
}

.table tbody tr:hover {
  background: #fafbf6;
}

.settings-preview,
.sign-hero {
  background:
    radial-gradient(320px 220px at 90% 0%, rgba(20, 184, 166, 0.32), transparent 65%),
    linear-gradient(150deg, #0d211d 0%, #10332c 65%, #0b1c18 100%);
}

.settings-preview .preview-tagline,
.sign-hero .eyebrow {
  color: #fcd34d;
}

.btn.primary {
  background: linear-gradient(180deg, #0f766e, #0b5f58);
  box-shadow: 0 8px 18px -12px rgba(15, 118, 110, 0.8);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #0d8a80, #0a6b63);
}

.tag.blue {
  color: #0f766e;
  background: #e6faf5;
  border-color: #c7f0e7;
}
