/* ==========================================================================
   芯盾时代 · 维保服务管理平台
   设计：深空蓝 + 冷调青蓝渐变，企业级信息密度，首页查询优先
   ========================================================================== */

:root {
  --ink: #0b1324;
  --ink-2: #1b2942;
  --ink-3: #33415c;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e3e9f3;
  --line-soft: #eef2f8;
  --bg: #f3f6fb;
  --card: #ffffff;
  --brand: #2457f5;
  --brand-600: #1b46d6;
  --brand-100: #e8efff;
  --brand-50: #f2f6ff;
  --cyan: #22b8ff;
  --ok: #0f9d76;
  --ok-bg: #e7f8f1;
  --warn: #b45309;
  --warn-bg: #fff5e6;
  --danger: #d92d20;
  --danger-bg: #fef1f0;
  --pending: #2563eb;
  --pending-bg: #eaf1ff;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 12px 30px -14px rgba(16, 24, 40, 0.2);
  --shadow-lg: 0 30px 70px -30px rgba(9, 17, 33, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

ul, ol {
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

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

svg {
  display: block;
}

::selection {
  background: rgba(47, 107, 255, 0.22);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 68px;
  color: #fff;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.topbar-inner {
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.topbar.is-solid {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(9, 17, 33, 0.4);
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.25s ease;
}

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

.topbar.is-solid .brand-logo {
  background: linear-gradient(140deg, #eef5ff, #e2ecff);
  border-color: #dbe6fb;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(226, 236, 255, 0.55);
}

.topbar.is-solid .brand-sub {
  color: var(--muted-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.nav-item {
  position: relative;
  height: 34px;
  white-space: nowrap;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 13.5px;
  color: rgba(226, 236, 255, 0.66);
  transition: all 0.18s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), #6f9cff);
  transform: translateX(-50%);
}

.topbar.is-solid .nav-item {
  color: #5b6b86;
}

.topbar.is-solid .nav-item:hover {
  color: var(--brand);
  background: var(--brand-50);
}

.topbar.is-solid .nav-item.is-active {
  color: var(--brand);
  background: var(--brand-100);
}

.topbar.is-solid .nav-item.is-active::after {
  background: var(--brand);
}

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

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(226, 236, 255, 0.55);
}

.topbar.is-solid .live {
  color: var(--muted-2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
  50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.06); }
}

/* 账号 */
.account {
  position: relative;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 10px 0 5px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.account-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.topbar.is-solid .account-btn:hover {
  background: var(--brand-50);
  border-color: #e2eafb;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(140deg, #3f7bff, #1b46d6);
  box-shadow: 0 6px 14px -8px rgba(36, 87, 245, 0.8);
  flex: none;
}

.account-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.account-meta b {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta i {
  font-style: normal;
  font-size: 10.5px;
  color: rgba(226, 236, 255, 0.5);
}

.topbar.is-solid .account-meta i {
  color: var(--muted-2);
}

.caret {
  width: 15px;
  height: 15px;
  color: rgba(226, 236, 255, 0.6);
}

.topbar.is-solid .caret {
  color: var(--muted-2);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  z-index: 60;
  animation: pop 0.16s ease-out;
}

.account-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: left;
}

.account-menu button svg {
  width: 16px;
  height: 16px;
  color: #7b8aa3;
}

.account-menu button:hover {
  background: var(--brand-50);
  color: var(--brand);
}

.account-menu button:hover svg {
  color: var(--brand);
}

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-3);
  background: #fff;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

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

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2f6bff, #1b46d6);
  box-shadow: 0 10px 24px -14px rgba(36, 87, 245, 0.9);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(36, 87, 245, 0.85);
}

.btn-ghost {
  background: #fff;
  border-color: #dfe6f2;
  color: var(--ink-3);
}

.btn-ghost:hover {
  border-color: #bcd0fb;
  color: var(--brand);
  background: #f8faff;
}

.btn-text {
  height: 32px;
  padding: 0 9px;
  background: transparent;
  color: #5b6b86;
  font-weight: 500;
}

.btn-text:hover {
  color: var(--brand);
  background: var(--brand-50);
}

.btn-sm {
  height: 28px;
  font-size: 12px;
  padding: 0 10px;
}

.btn-block {
  width: 100%;
  height: 44px;
  border-radius: 11px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.btn-login {
  height: 36px;
  padding: 0 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
}

.topbar.is-solid .btn-login {
  color: var(--ink-3);
  background: #fff;
  border-color: #dfe6f2;
}

.topbar.is-solid .btn-login:hover {
  color: var(--brand);
  border-color: #bcd0fb;
  background: var(--brand-50);
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

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

/* ==========================================================================
   首页 Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 84px;
  color: #fff;
  border-radius: 0 0 36px 36px;
  background:
    radial-gradient(1100px 560px at 12% -12%, rgba(56, 189, 248, 0.2), transparent 62%),
    radial-gradient(940px 520px at 88% 4%, rgba(47, 107, 255, 0.42), transparent 64%),
    radial-gradient(700px 420px at 50% 110%, rgba(14, 116, 233, 0.18), transparent 70%),
    linear-gradient(158deg, #070d1a 0%, #0a1424 42%, #0d1b31 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 183, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 183, 255, 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 25%, transparent 78%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero-glow-a {
  width: 420px;
  height: 420px;
  top: -160px;
  right: 6%;
  background: rgba(47, 107, 255, 0.35);
}

.hero-glow-b {
  width: 360px;
  height: 360px;
  bottom: -180px;
  left: 4%;
  background: rgba(34, 184, 255, 0.16);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: rgba(148, 197, 255, 0.8);
}

.eyebrow-line {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(95, 212, 255, 0.9), transparent);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #7fd9ff 8%, #7ea2ff 58%, #b9a7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-desc {
  max-width: 640px;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.95;
  color: rgba(214, 228, 255, 0.68);
}

/* 搜索框 */
.search {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 880px;
  margin-top: 34px;
  padding: 7px 8px 7px 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 70px -26px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.2s ease;
}

.search:focus-within {
  box-shadow: 0 30px 80px -26px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(59, 130, 246, 0.28);
}

.search-icon {
  color: #93a1b8;
  flex: none;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
}

.search input::placeholder {
  color: #9aa8bf;
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex: none;
}

.search-select {
  height: 50px;
  padding: 0 30px 0 14px;
  border: 0;
  background: transparent
    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' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center / 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-3);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  max-width: 150px;
}

.btn-search {
  height: 50px;
  padding: 0 24px;
  border-radius: 13px;
  font-size: 14.5px;
  flex: none;
}

.search-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(226, 236, 255, 0.42);
}

.chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 236, 255, 0.7);
  font-size: 12.5px;
  transition: all 0.18s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* 统计卡 */
.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1128px;
  margin: 44px auto 0;
  padding: 0 24px;
}

.stat-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 162, 255, 0.55), transparent);
  opacity: 0.6;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: rgba(203, 220, 255, 0.6);
  letter-spacing: 0.02em;
}

.stat-value {
  display: block;
  margin: 7px 0 2px;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.15;
}

.stat-value.accent-amber {
  color: #ffcf7a;
}

.stat-foot {
  font-size: 11px;
  color: rgba(203, 220, 255, 0.36);
}

/* ==========================================================================
   首页内容区
   ========================================================================== */

.home-body {
  padding-top: 30px;
  padding-bottom: 56px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.panel-flat {
  box-shadow: none;
  margin-top: 16px;
}

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

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: -0.005em;
}

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

.badge-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand);
  font-size: 11px;
  font-weight: 650;
}

/* 结果卡片 */
.result-exact {
  margin-bottom: 18px;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 16px 44px -34px rgba(15, 35, 80, 0.55);
  animation: rise 0.28s ease-out;
}

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

.result-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2f6bff, #38bdf8 46%, transparent 92%);
}

.result-card.is-expired::before {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1 46%, transparent 92%);
}

.result-card.is-expiring::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24 46%, transparent 92%);
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.rc-id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rc-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.rc-no {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.rc-region {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid #e1e9fa;
  background: #f4f8ff;
  color: #47628f;
  font-size: 11.5px;
  font-weight: 500;
}

.rc-main {
  margin-top: 18px;
}

.rc-main h3 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
}

.rc-project {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: pre-line;
}

.rc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.rc-item {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: #f7f9fd;
  border: 1px solid #eef3fa;
}

.rc-item span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 3px;
}

.rc-item b {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.rc-item.is-highlight {
  background: var(--ok-bg);
  border-color: #cdf0e4;
}

.rc-item.is-highlight b {
  color: var(--ok);
}

.rc-item.is-warn {
  background: var(--warn-bg);
  border-color: #ffe3bd;
}

.rc-item.is-warn b {
  color: var(--warn);
}

.rc-item.is-danger {
  background: #f8fafc;
  border-color: #e8edf5;
}

.rc-item.is-danger b {
  color: #7b8798;
}

.rc-progress {
  margin-top: 20px;
}

.rc-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.rc-progress-head b {
  color: var(--ink-3);
  font-weight: 600;
}

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

.rc-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6bff, #38bdf8);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.result-card.is-expiring .rc-bar i {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.result-card.is-expired .rc-bar i {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.rc-progress-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.rc-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e6ecf5;
}

.rc-remark {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}

.rc-remark b {
  color: var(--ink-3);
  font-weight: 600;
}

.rc-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

/* 结果行 */
.result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1.1fr) minmax(0, 1.5fr) 104px 96px 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.2s ease, transform 0.16s ease,
    background 0.16s ease;
}

.result-row:hover {
  border-color: #c9d8fb;
  background: #fbfdff;
  box-shadow: 0 12px 26px -22px rgba(15, 35, 80, 0.5);
  transform: translateY(-1px);
}

.result-row.is-active {
  border-color: #9fb9ff;
  background: #f6f9ff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.rr-no {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-customer {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rr-project {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rr-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rr-arrow {
  color: #b9c5d8;
  display: grid;
  place-items: center;
}

.rr-arrow svg {
  width: 15px;
  height: 15px;
}

.result-row:hover .rr-arrow {
  color: var(--brand);
}

.load-more {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* 状态徽标 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}

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

.pill-active {
  color: var(--ok);
  background: var(--ok-bg);
}

.pill-expiring {
  color: var(--warn);
  background: var(--warn-bg);
}

.pill-expired {
  color: #7b8798;
  background: #f1f4f8;
}

.pill-pending {
  color: var(--pending);
  background: var(--pending-bg);
}

.pill-unknown {
  color: var(--muted);
  background: #f1f5f9;
}

/* 空状态 */
.empty {
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed #e2e9f4;
  border-radius: var(--r-lg);
  background: #fbfcfe;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #f2f6fd;
  color: #9aa8bf;
}

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

.empty b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty p {
  max-width: 340px;
  margin: 6px auto 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* 首页两栏 */
.home-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

/* 近期到期 */
.upcoming-list {
  display: flex;
  flex-direction: column;
}

.upcoming-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 4px;
  border-bottom: 1px dashed var(--line-soft);
  text-align: left;
  transition: background 0.16s ease;
}

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

.upcoming-row:hover {
  background: #f9fbff;
}

.upcoming-date {
  padding: 7px 4px;
  border-radius: 10px;
  background: #f5f8ff;
  border: 1px solid #eaf0fb;
  text-align: center;
  line-height: 1.25;
}

.upcoming-date b {
  display: block;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.upcoming-date span {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.upcoming-main {
  min-width: 0;
}

.upcoming-main b {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-main p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-days {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 11px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.upcoming-days b {
  font-size: 13px;
  font-weight: 650;
}

.upcoming-list.compact .upcoming-row {
  padding: 11px 2px;
}

/* 服务说明 */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.service-list li {
  display: flex;
  gap: 12px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, #eff5ff, #e6eeff);
  color: var(--brand);
}

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

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

.service-list p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

/* 页脚 */
.footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted-2);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer b {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   控制台
   ========================================================================== */

#resultPanel,
#tabLedger,
#tabOverview,
#tabLogs {
  scroll-margin-top: 88px;
}

.view-console {
  min-height: 100vh;
  padding-top: 68px;
  background:
    radial-gradient(700px 320px at 88% -6%, rgba(47, 107, 255, 0.07), transparent 70%),
    var(--bg);
}

.console {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 92px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  padding: 4px 10px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  margin-bottom: 2px;
  border-radius: 10px;
  font-size: 13.5px;
  color: #46536b;
  text-align: left;
  transition: all 0.16s ease;
}

.side-item svg {
  width: 17px;
  height: 17px;
  color: #8a99b1;
  flex: none;
}

.side-item:hover {
  background: #f6f9ff;
  color: var(--brand);
}

.side-item:hover svg {
  color: var(--brand);
}

.side-item.is-active {
  background: linear-gradient(100deg, #eef4ff, #f3f8ff);
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #e0e9fd;
}

.side-item.is-active svg {
  color: var(--brand);
}

.sidebar-note {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px dashed #d8e3fb;
  background: linear-gradient(140deg, #f6faff, #eff5ff);
}

.sidebar-note b {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.sidebar-note span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-note i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.ws-tab {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  animation: rise 0.24s ease-out;
}

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

.ws-head h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

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

.ws-head p b {
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ws-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px;
  margin-bottom: 14px;
  border: 1px solid #edf2f9;
  border-radius: 13px;
  background: #f8fafd;
}

.field-inline {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe6f2;
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

select.field-inline {
  padding-right: 28px;
  appearance: none;
  -webkit-appearance: none;
  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' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px;
  cursor: pointer;
}

.field-inline:focus {
  border-color: #9db7ff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13);
}

.field-select {
  min-width: 158px;
  max-width: 210px;
  padding-right: 26px;
  cursor: pointer;
}

.field-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 210px;
  padding: 0 12px;
}

.field-search svg {
  width: 16px;
  height: 16px;
  color: #97a5bb;
  flex: none;
}

.field-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

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

.date-range .field-inline {
  width: 138px;
}

.date-range em {
  font-style: normal;
  color: var(--muted-2);
}

/* 表格 */
.table-wrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.table-wrap {
  overflow: auto;
  max-height: 64vh;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.8px;
}

.data-table col.col-no { width: 120px; }
.data-table col.col-customer { width: 156px; }
.data-table col.col-amount { width: 92px; }
.data-table col.col-months { width: 64px; }
.data-table col.col-period { width: 142px; }
.data-table col.col-status { width: 84px; }
.data-table col.col-region { width: 100px; }
.data-table col.col-ops { width: 96px; }

.data-table thead th {
  position: sticky;
  overflow: hidden;
  text-overflow: ellipsis;
  top: 0;
  z-index: 2;
  padding: 11px 13px;
  background: #f8fafd;
  border-bottom: 1px solid #e7eef7;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5a6880;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

.data-table thead th[data-sort] {
  cursor: pointer;
}

.data-table thead th[data-sort]:hover {
  color: var(--brand);
  background: #f2f7ff;
}

.data-table thead th[data-dir="asc"]::after,
.data-table thead th[data-dir="desc"]::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.data-table thead th[data-dir="asc"]::after {
  border-bottom: 5px solid var(--brand);
}

.data-table thead th[data-dir="desc"]::after {
  border-top: 5px solid var(--brand);
}

.data-table th.num,
.data-table td.num {
  text-align: right;
}

.data-table th.ops,
.data-table td.ops {
  text-align: right;
  padding-right: 16px;
}

.data-table tbody td {
  padding: 11px 13px;
  border-bottom: 1px solid #f1f5fa;
  color: var(--ink-2);
  vertical-align: middle;
}

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

.data-table tbody tr:hover td {
  background: #f9fbff;
}

.cell-no {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.cell-customer {
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-project {
  display: block;
  color: var(--muted);
  font-size: 12.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.cell-period {
  display: block;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: nowrap;
}

.cell-period span {
  display: block;
}

.cell-period .period-end {
  color: var(--muted-2);
}

.cell-period .period-end::before {
  content: "至 ";
  color: #b9c5d8;
}

.cell-region {
  display: block;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td.ops,
.data-table th.ops {
  white-space: nowrap;
}

.op-btn {
  padding: 3px 5px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  color: #5b6b86;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.op-btn + .op-btn {
  margin-left: 3px;
}

.op-btn:hover {
  background: var(--brand-50);
  color: var(--brand);
}

.op-btn.is-danger:hover {
  background: #fef1f0;
  color: var(--danger);
}

.table-empty {
  padding: 46px 20px !important;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* 骨架 */
.sk {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f8 25%, #f7f9fd 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 表脚与分页 */
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.table-range {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-pager .field-inline {
  height: 32px;
  font-size: 12px;
}

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

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e2e8f2;
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: #4d5c76;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled):not(.is-active) {
  border-color: #b9ccfb;
  color: var(--brand);
  background: #f8faff;
}

.page-btn.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px -12px rgba(36, 87, 245, 0.9);
}

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

.page-ellipsis {
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 12px;
}

/* ==========================================================================
   概览图表
   ========================================================================== */

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

.kpi {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.kpi span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.kpi b {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}

.kpi i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted-2);
}

.kpi.is-brand b { color: var(--brand); }
.kpi.is-ok b { color: var(--ok); }
.kpi.is-warn b { color: var(--warn); }
.kpi.is-muted b { color: #64748b; }

.chart-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.chart-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
}

.chart-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.chart-card header span {
  font-size: 11.5px;
  color: var(--muted-2);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.bar-row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6bff, #56a8ff);
  transition: width 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.bar-row b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.year-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 168px;
  padding-top: 18px;
}

.year-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
  min-width: 0;
}

.year-col b {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.year-bar {
  width: 100%;
  max-width: 32px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #6fa2ff, #2f6bff);
  min-height: 4px;
  transition: height 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.year-col span {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 日志 */
.log-table {
  min-width: 780px;
}

.log-table td:first-child {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 11.8px;
  white-space: nowrap;
}

.log-action {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}

.log-action.create { background: var(--ok-bg); color: var(--ok); }
.log-action.update { background: var(--pending-bg); color: var(--pending); }
.log-action.delete { background: var(--danger-bg); color: var(--danger); }
.log-action.login,
.log-action.logout { background: #eef3fa; color: #4b6a9b; }
.log-action.export,
.log-action.import { background: #f3ecff; color: #7c3aed; }
.log-action.password { background: var(--warn-bg); color: var(--warn); }

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

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 13, 26, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade 0.2s ease-out;
}

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

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 40px 100px -30px rgba(4, 10, 24, 0.7);
  animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}

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

.modal.is-wide { max-width: 760px; }
.modal.is-narrow { max-width: 440px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-head h3 {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--ink);
}

.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #8a99b1;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #f2f5fa;
  color: var(--ink-2);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 20px 22px;
  overflow: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfe;
}

.modal-foot .btn {
  min-width: 84px;
}

/* 删除等确认弹窗打开时焦点落在确认按钮上，保证有可见的焦点提示 */
.modal-foot [data-ok]:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.modal-foot .foot-spacer {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted-2);
}

.modal.is-flush .modal-head {
  position: absolute;
  inset: 0 0 auto;
  justify-content: flex-end;
  padding: 12px 14px 0;
  border: 0;
  background: transparent;
  z-index: 2;
}

.modal.is-flush .modal-head h3 {
  display: none;
}

.modal.is-flush .modal-body {
  padding-top: 34px;
}

/* 表单 */
.form-section + .form-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e6ecf5;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.form-section-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #2f6bff, #7ea2ff);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.span-2 {
  grid-column: span 2;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #4a5870;
}

.form-field > span {
  font-weight: 550;
}

.req {
  color: var(--danger);
  font-style: normal;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dfe6f2;
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 54px;
  line-height: 1.65;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: #9db7ff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13);
}

.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #f5a3a0;
  background: #fffafa;
}

.form-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f7f9fd;
  font-size: 11.8px;
  color: var(--muted);
}

.form-tip-line {
  margin-top: 8px;
  font-size: 11.8px;
  color: var(--muted-2);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #fecdca;
  border-radius: 10px;
  background: #fef3f2;
  color: #b42318;
  font-size: 12.5px;
  line-height: 1.6;
}

.alert.is-ok {
  border-color: #cdf0e4;
  background: var(--ok-bg);
  color: #08745a;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > svg {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: #9aa8bf;
  pointer-events: none;
}

.input-wrap input {
  padding-left: 36px;
  padding-right: 38px;
  height: 42px;
}

.pwd-toggle {
  position: absolute;
  right: 5px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #9aa8bf;
}

.pwd-toggle:hover {
  background: #f3f6fb;
  color: var(--ink-3);
}

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

/* 登录弹窗 */
.login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(150deg, #0a1424, #12244a);
  box-shadow: 0 16px 32px -18px rgba(10, 20, 36, 0.9);
}

.login-mark svg {
  width: 30px;
  height: 30px;
}

.login-brand h4 {
  margin: 13px 0 5px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.login-brand p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form .form-field {
  margin-bottom: 13px;
}

.login-form .btn-block {
  margin-top: 6px;
}

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

.login-hint code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #f2f5fb;
  color: #4b5d7d;
  font-family: var(--mono);
  font-size: 11px;
}

/* 确认框 */
.confirm {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: var(--warn-bg);
  color: #d97706;
}

.confirm-icon svg {
  width: 22px;
  height: 22px;
}

.confirm-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}

.confirm-text {
  margin-top: 5px;
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--muted);
}

.pwd-form .form-field {
  margin-bottom: 12px;
}

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

.toasts {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: 360px;
  padding: 11px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #94a3b8;
  background: #fff;
  box-shadow: 0 20px 40px -24px rgba(9, 17, 33, 0.55);
  font-size: 13px;
  color: var(--ink-2);
  pointer-events: auto;
  animation: toast-in 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.toast.is-out {
  animation: toast-out 0.2s ease forwards;
}

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

.toast-success {
  border-left-color: var(--ok);
}

.toast-success svg { color: var(--ok); }

.toast-error {
  border-left-color: var(--danger);
}

.toast-error svg { color: var(--danger); }

.toast-info {
  border-left-color: var(--brand);
}

.toast-info svg { color: var(--brand); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(16px); }
}

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

@media (max-width: 1180px) {
  .topbar-inner {
    padding: 0 20px;
  }
  .nav {
    margin-left: 0;
  }
  .live {
    display: none;
  }
}

@media (max-width: 980px) {
  .console {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
  }
  .sidebar-title,
  .sidebar-note {
    display: none;
  }
  .side-item {
    justify-content: center;
    margin-bottom: 0;
    padding: 9px 12px;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 112px 0 64px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 32px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .brand-sub {
    display: none;
  }
  .topbar-right {
    gap: 6px;
  }
  .nav {
    gap: 2px;
  }
  .nav-item {
    padding: 0 9px;
    font-size: 12.5px;
  }
  .account-meta,
  .caret {
    display: none;
  }
  .account-btn {
    padding: 0 4px;
    gap: 0;
  }
  #ledgerEmpty,
  #logEmpty {
    padding: 36px 18px;
  }
  .hero {
    border-radius: 0 0 26px 26px;
    padding: 100px 0 52px;
  }
  .hero-content,
  .hero-stats {
    padding: 0 18px;
  }
  .hero-desc {
    font-size: 14px;
  }
  .search {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
    border-radius: 16px;
  }
  .search-icon {
    margin-left: 4px;
  }
  .search input {
    height: 42px;
    padding: 0 6px;
    font-size: 14.5px;
    flex: 1 1 calc(100% - 34px);
  }
  .search-divider {
    display: none;
  }
  .search-select {
    flex: 1;
    height: 42px;
    max-width: none;
    border: 1px solid #edf1f8;
    border-radius: 10px;
    background-color: #f8fafd;
  }
  .btn-search {
    height: 42px;
    padding: 0 16px;
    font-size: 13.5px;
  }
  .search-hint {
    font-size: 12px;
  }
  .container {
    padding: 0 16px;
  }
  .home-body {
    padding-top: 20px;
  }
  .panel {
    padding: 18px;
    border-radius: 18px;
  }
  .result-card {
    padding: 18px;
  }
  .rc-main h3 {
    font-size: 20px;
  }
  .rc-grid {
    gap: 8px;
    margin-top: 18px;
  }
  .rc-item {
    padding: 10px 12px;
  }
  .rc-item b {
    font-size: 14px;
  }
  .rc-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .rc-actions {
    justify-content: flex-end;
  }
  .result-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 12px 13px;
  }
  .rr-project,
  .rr-date,
  .rr-arrow {
    display: none;
  }
  .rr-no {
    grid-column: 1;
    order: 1;
  }
  .rr-customer {
    grid-column: 1;
    order: 3;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 450;
  }
  .result-row .pill {
    grid-column: 2;
    grid-row: 1;
    order: 2;
  }
  .console {
    padding: 14px;
    gap: 14px;
  }
  .ws-tab {
    padding: 16px;
    border-radius: 16px;
  }
  .ws-head {
    margin-bottom: 14px;
  }
  .ws-actions .btn {
    flex: 1;
  }
  .toolbar {
    gap: 8px;
    padding: 10px;
  }
  .field-search {
    flex-basis: 100%;
  }
  .date-range {
    flex: 1;
  }
  .date-range .field-inline {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .table-wrap {
    max-height: 58vh;
  }
  .table-foot {
    gap: 10px;
  }
  .table-pager {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .pager {
    flex-wrap: wrap;
  }
  .page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    font-size: 12px;
  }
  .table-pager .field-inline {
    height: 30px;
  }
  .ws-actions #btnRefresh {
    flex: 0 0 42px;
  }
  .modal-root {
    padding: 12px;
    align-items: flex-end;
  }
  .modal {
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
  .modal.is-wide,
  .modal.is-narrow {
    max-width: 100%;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-foot {
    padding: 12px 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .toasts {
    top: auto;
    bottom: 18px;
    right: 14px;
    left: 14px;
  }
  .toast {
    max-width: none;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .hero-stats {
    gap: 10px;
  }
  .stat-card {
    padding: 14px 15px;
  }
  .stat-value {
    font-size: 23px;
  }
  .stat-foot {
    font-size: 10.5px;
  }
  .rc-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 82px minmax(0, 1fr) 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   补充组件
   ========================================================================== */

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f0554a, #d92d20);
  box-shadow: 0 10px 24px -14px rgba(217, 45, 32, 0.8);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(217, 45, 32, 0.75);
}

.result-subhead {
  margin: 2px 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.result-skeleton {
  display: block;
}

.chart-empty {
  padding: 26px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}

.data-table tbody tr td.num .cell-amount {
  color: var(--ink);
}

.log-table td:nth-child(4) {
  color: var(--ink-2);
  min-width: 280px;
}

/* ==========================================================================
   首页查询模式（仅按销售合同编号查询）
   ========================================================================== */

.view-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.view-home .home-body {
  flex: 1;
  width: 100%;
}

.hero-query {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 110px 0 84px;
  text-align: center;
}

.hero-query .hero-content {
  max-width: 760px;
  text-align: center;
}

.hero-query .eyebrow {
  justify-content: center;
}

.hero-query h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  margin-top: 16px;
}

.hero-query .hero-desc {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 15px;
}

.hero-query .search {
  max-width: 680px;
  margin: 32px auto 0;
  padding: 8px 8px 8px 20px;
}

.hero-query .search input {
  height: 54px;
  font-size: 16px;
}

.hero-query .btn-search {
  height: 54px;
  padding: 0 30px;
  border-radius: 14px;
  font-size: 15px;
}

.search-note {
  margin-top: 15px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(203, 220, 255, 0.45);
}

.home-body-narrow {
  max-width: 860px;
  padding-top: 34px;
  padding-bottom: 64px;
}

.panel-result {
  padding: 26px 28px;
}

.panel-result .panel-head {
  margin-bottom: 20px;
}

/* 未查询到 */
.not-found {
  padding: 46px 24px 48px;
  text-align: center;
  border: 1px dashed #dbe4f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfdff, #f7faff);
  animation: rise 0.24s ease-out;
}

.not-found-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #eef3fc;
  color: #7d8fae;
}

.not-found-icon svg {
  width: 27px;
  height: 27px;
}

.not-found h3 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.not-found p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.not-found p b {
  padding: 1px 7px;
  border-radius: 5px;
  background: #eef3fa;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.footer-slim .footer-inner {
  min-height: 22px;
}

/* ==========================================================================
   用户管理
   ========================================================================== */

.user-table {
  min-width: 920px;
}

.user-table col.col-user { width: 172px; }
.user-table col.col-name { width: 200px; }
.user-table col.col-dept { width: 140px; }
.user-table col.col-role { width: 96px; }
.user-table col.col-status { width: 86px; }
.user-table col.col-login { width: 150px; }
.user-table col.col-user-ops { width: 200px; }

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-contact {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-tag {
  flex: none;
  white-space: nowrap;
  padding: 0 5px;
  border-radius: 5px;
  background: #f0f4ff;
  color: #5b78b8;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.7;
}

.user-cell-dept {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.user-account > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account .avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 11px;
  font-family: var(--font);
}

.user-account b {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.self-tag {
  padding: 0 5px;
  border-radius: 5px;
  background: var(--brand-100);
  color: var(--brand);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.7;
}

.role-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.role-admin {
  background: var(--brand-100);
  color: var(--brand);
}

.role-editor {
  background: #f1f5f9;
  color: #5b6b86;
}

.pill-inactive {
  color: #7b8798;
  background: #f1f4f8;
}

.user-table .cell-muted {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.user-form .form-tip-line {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .hero-query {
    padding: 118px 0 74px;
  }
  .hero-query .search {
    padding: 10px;
  }
  .hero-query .search input {
    flex: 1 1 calc(100% - 34px);
  }
  .hero-query .btn-search {
    flex: 1 1 100%;
    width: 100%;
  }
  .home-body-narrow {
    padding-top: 22px;
  }
  .panel-result {
    padding: 18px;
  }
  .not-found {
    padding: 34px 18px 36px;
  }
  .user-table {
    min-width: 860px;
  }
}

.rc-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.op-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: none;
  color: #5b6b86;
}

.field-hint {
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted-2);
}
