/**
 * 玄枢 — 壳层设计系统（命理 · 观象 · 数据）
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


:root {
  /* 应用画布（暖纸色主区，与玄学气质统一） */
  --shu-app-canvas: #f4efe7;
  --shu-app-elevated: #fffdf8;
  --shu-app-border: rgba(36, 28, 19, 0.1);
  --shu-app-text: #1f2937;
  --shu-app-muted: #6b7280;
  --xs-bronze: #b7791f;
  --xs-bronze-soft: rgba(183, 121, 31, 0.14);
  /* 侧栏（深色条带） */
  --shu-sidebar-bg: #161821;
  --shu-sidebar-border: rgba(255, 255, 255, 0.06);
  /* 深色壳层（弹窗、图表暗底等） */
  --shu-bg: #111827;
  --shu-surface: #172033;
  --shu-surface-2: #22304a;
  --shu-border: rgba(255, 255, 255, 0.08);
  --shu-text: #edf2f7;
  --shu-muted: #9aa7b8;
  --shu-accent: #0f766e;
  --shu-accent-2: #d4a24c;
  --shu-warn: #c2410c;
  --shu-radius: 16px;
  --shu-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  --shu-font: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --shu-mono: ui-monospace, 'SF Mono', Consolas, monospace;
}

body.shu-has-topbar { padding-top: 56px; }

.shu-global-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.98) 0%, rgba(16, 24, 39, 0.98) 100%);
  border-bottom: 1px solid var(--shu-border);
  font-family: var(--shu-font);
}

.shu-global-topbar .shu-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--shu-text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.shu-global-topbar .shu-brand img {
  height: 32px;
  width: auto;
  border-radius: 6px;
}

.shu-global-topbar .shu-actions { display: flex; align-items: center; gap: 0.5rem; }

.shu-btn {
  font-family: var(--shu-font);
  border: 1px solid var(--shu-border);
  background: var(--shu-surface-2);
  color: var(--shu-text);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s, background 0.15s;
}

.shu-btn:hover {
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(15, 118, 110, 0.12);
}

.shu-btn-primary {
  background: var(--shu-accent);
  border-color: transparent;
}

.shu-btn-primary:hover {
  background: #115e59;
}

.shu-btn-ghost {
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#sidebar .sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .shu-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

#sidebar .shu-sidebar-brand img {
  height: 36px;
  width: auto;
  border-radius: 8px;
}

#sidebar .shu-sidebar-brand > .shu-sidebar-brand-text {
  font-family: var(--shu-font);
}

#sidebar .shu-sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}

#sidebar .shu-sidebar-actions .shu-btn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
}

#sidebar .sidebar-logo,
#sidebar .sidebar-logo-text { display: none !important; }

.shu-dashboard { font-family: var(--shu-font); color: var(--shu-text); margin-bottom: 2rem; }
.shu-dashboard-head { margin-bottom: 1.25rem; }
.shu-dashboard-head h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.35rem; }
.shu-dashboard-head p { margin: 0; color: var(--shu-muted); font-size: 0.9rem; }

.shu-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1100px) { .shu-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .shu-kpi-row { grid-template-columns: 1fr; } }

.shu-kpi-card {
  background: var(--shu-surface);
  border: 1px solid var(--shu-border);
  border-radius: var(--shu-radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shu-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s;
}

.shu-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.shu-kpi-label {
  font-size: 0.75rem;
  color: var(--shu-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.shu-kpi-value {
  font-family: var(--shu-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--shu-text);
  line-height: 1.2;
}

.shu-kpi-sub { font-size: 0.8rem; color: var(--shu-accent-2); margin-top: 0.35rem; }

.shu-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 900px) { .shu-chart-grid { grid-template-columns: 1fr; } }

.shu-chart-card {
  background: var(--shu-surface);
  border: 1px solid var(--shu-border);
  border-radius: var(--shu-radius);
  padding: 0.85rem;
  min-height: 300px;
  box-shadow: var(--shu-shadow);
}

.shu-chart-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--shu-muted);
}

.shu-chart-box { width: 100%; height: 260px; }

.shu-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.72);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
}

.shu-modal-overlay.shu-open { display: flex; }

.shu-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  background: var(--shu-surface);
  border: 1px solid var(--shu-border);
  border-radius: var(--shu-radius);
  box-shadow: var(--shu-shadow);
  display: flex;
  flex-direction: column;
  font-family: var(--shu-font);
  color: var(--shu-text);
}

.shu-modal-wide {
  width: min(720px, 100%);
  max-height: min(90vh, 800px);
}

.shu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--shu-border);
}

.shu-modal-header h3 { margin: 0; font-size: 1.05rem; }

.shu-modal-close {
  border: none;
  background: transparent;
  color: var(--shu-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.shu-modal-body { padding: 1rem; overflow: auto; flex: 1; }

.shu-key-panel {
  background: var(--shu-bg);
  border: 1px solid var(--shu-border);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.shu-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.shu-key-row input[type="password"],
.shu-key-row input[type="text"] {
  flex: 1 1 200px;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--shu-border);
  background: var(--shu-surface);
  color: var(--shu-text);
  font-family: var(--shu-mono);
  font-size: 0.85rem;
}

.shu-status { font-size: 0.8rem; padding: 0.25rem 0.5rem; border-radius: 6px; display: inline-block; }
.shu-status-ok { background: rgba(61, 155, 140, 0.2); color: #7dd3c0; }
.shu-status-bad { background: rgba(232, 90, 90, 0.15); color: #f0a0a0; }
.shu-status-warn { background: rgba(232, 168, 73, 0.15); color: var(--shu-warn); }

.shu-chat-log {
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--shu-bg);
  border-radius: 10px;
  border: 1px solid var(--shu-border);
  margin-bottom: 0.65rem;
}

.shu-msg { margin-bottom: 0.65rem; display: flex; }
.shu-msg-user { justify-content: flex-end; }

.shu-msg-bubble {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.shu-msg-user .shu-msg-bubble {
  background: linear-gradient(135deg, #2a5a8a 0%, var(--shu-accent-2) 100%);
  color: #fff;
}

.shu-msg-assistant .shu-msg-bubble {
  background: var(--shu-surface-2);
  border: 1px solid var(--shu-border);
}

.shu-typing { font-size: 0.85rem; color: var(--shu-muted); animation: shu-pulse 1s ease-in-out infinite; }

@keyframes shu-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.shu-chat-input-row { display: flex; gap: 0.5rem; }

.shu-chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--shu-border);
  background: var(--shu-bg);
  color: var(--shu-text);
  font-family: var(--shu-font);
}

.shu-chat-input-row textarea:disabled { opacity: 0.5; }

body.shu-home .content-body,
body.shu-home .main-content { background: transparent; }

/* ---------- 侧栏：统一深色条带 + 无 emoji 图标 ---------- */
#sidebar.sidebar {
  background: var(--shu-sidebar-bg) !important;
  border-right: 1px solid var(--shu-sidebar-border);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.5) rgba(255, 255, 255, 0.04);
}

#sidebar.sidebar::-webkit-scrollbar {
  width: 7px;
}

#sidebar.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  margin: 4px 0;
}

#sidebar.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.65), rgba(59, 130, 246, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#sidebar.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.85), rgba(59, 130, 246, 0.55));
}

#sidebar .nav-item {
  align-items: center;
}

#sidebar .nav-item .nav-item-icon {
  display: none;
}

#sidebar .shu-nav-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  position: relative;
}

#sidebar .shu-nav-ico--home::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: rgba(13, 148, 136, 0.95);
}

#sidebar .shu-nav-ico--stack {
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55) 0,
    rgba(255, 255, 255, 0.55) 2px,
    transparent 2px,
    transparent 4px,
    rgba(255, 255, 255, 0.55) 4px,
    rgba(255, 255, 255, 0.55) 6px,
    transparent 6px,
    transparent 8px,
    rgba(255, 255, 255, 0.55) 8px,
    rgba(255, 255, 255, 0.55) 10px
  );
  background-size: 10px 10px;
  background-position: 3px 4px;
  background-repeat: no-repeat;
}

#sidebar .shu-nav-ico--doc::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 4px;
  bottom: 3px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

#sidebar .shu-nav-ico--form::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

#sidebar .shu-sub-bullet {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.65);
  margin-right: 2px;
}

#sidebar .shu-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d7a6e 0%, var(--shu-accent) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--shu-font);
}

#sidebar .shu-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

#sidebar .shu-sidebar-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

#sidebar .shu-sidebar-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

#sidebar .nav-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 6px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
  border-left: 3px solid transparent;
}

#sidebar .nav-heading .shu-nav-ico {
  opacity: 0.85;
}

#sidebar .nav-heading .nav-item-text {
  font-size: 11px;
  letter-spacing: 0.14em;
}

#sidebar .nav-heading.active {
  color: rgba(255, 255, 255, 0.72);
  border-left-color: var(--shu-accent);
}

#sidebar .nav-submenu[data-submenu] {
  padding-left: 16px;
  padding-right: 8px;
  background: rgba(0, 0, 0, 0.12);
}

#sidebar .nav-submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 8px;
  border-radius: 8px;
  margin: 2px 0;
  border-left: 3px solid transparent;
}

#sidebar .nav-submenu-item .shu-sub-bullet {
  flex: 0 0 6px;
}

#sidebar .nav-submenu-item .shu-submenu-label {
  flex: 1 1 auto;
  min-width: 0;
}

#sidebar .nav-submenu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

#sidebar .nav-submenu-item.active {
  background: rgba(61, 155, 140, 0.14);
  border-left-color: var(--shu-accent);
  font-weight: 600;
}

#sidebar .nav-submenu-item.active .shu-sub-bullet {
  background: rgba(45, 212, 191, 0.95);
}

/* ---------- 首页：浅色画布 + 与看板/万年历统一 ---------- */
body.shu-home {
  --shu-home-canvas: var(--shu-app-canvas);
  --shu-home-elevated: var(--shu-app-elevated);
  --shu-home-border: var(--shu-app-border);
  --shu-home-text: var(--shu-app-text);
  --shu-home-muted: var(--shu-app-muted);
  background: var(--shu-home-canvas) !important;
}

body.shu-home .main-content {
  background: var(--shu-home-canvas) !important;
}

body.shu-home .content-header {
  background: var(--shu-home-elevated) !important;
  border-bottom: 1px solid var(--shu-home-border) !important;
}

body.shu-home .header-title,
body.shu-home .content-header h1 {
  color: var(--shu-home-text) !important;
}

body.shu-home .content-header p {
  color: var(--shu-home-muted) !important;
}

body.shu-home .shu-page-header .header-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--shu-home-text) !important;
}

body.shu-home .shu-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--shu-home-muted) !important;
}

body.shu-home .shu-dashboard {
  color: var(--shu-home-text);
}

body.shu-home .shu-kpi-card,
body.shu-home .shu-chart-card {
  background: var(--shu-home-elevated) !important;
  border: 1px solid var(--shu-home-border) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
  color: var(--shu-home-text);
}

body.shu-home .shu-kpi-card:hover,
body.shu-home .shu-chart-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08) !important;
}

body.shu-home .shu-kpi-label,
body.shu-home .shu-chart-card h3 {
  color: var(--shu-home-muted) !important;
}

body.shu-home .shu-kpi-value {
  color: var(--shu-home-text) !important;
}

body.shu-home .shu-kpi-sub {
  color: #2d7a6e !important;
}

body.shu-home .shu-section-title {
  margin: 1.75rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--shu-home-text);
  letter-spacing: 0.02em;
}

body.shu-home .calendar-card {
  background: var(--shu-home-elevated) !important;
  color: var(--shu-home-text) !important;
  border: 1px solid var(--shu-home-border) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
  background-image: none !important;
}

body.shu-home .calendar-header {
  border-bottom-color: var(--shu-home-border) !important;
}

body.shu-home .calendar-title {
  color: var(--shu-home-text) !important;
}

body.shu-home .calendar-date-picker {
  border: 1px solid var(--shu-home-border) !important;
  background: #f8fafc !important;
  color: var(--shu-home-text) !important;
}

body.shu-home .calendar-date-picker::-webkit-calendar-picker-indicator {
  filter: none !important;
  opacity: 0.65;
}

body.shu-home .calendar-date-section {
  background: #f8fafc !important;
}

body.shu-home .calendar-solar-date,
body.shu-home .calendar-lunar-date,
body.shu-home .calendar-weekday {
  color: var(--shu-home-text) !important;
}

body.shu-home .calendar-weekday {
  opacity: 0.75 !important;
}

body.shu-home .info-tag {
  background: rgba(61, 155, 140, 0.12) !important;
  color: #1e5c54 !important;
}

body.shu-home .menu-card {
  background: var(--shu-home-elevated) !important;
  border: 1px solid var(--shu-home-border) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05) !important;
}

body.shu-home .menu-card:hover {
  border-color: rgba(61, 155, 140, 0.35) !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07) !important;
}

body.shu-home .menu-card h2 {
  color: var(--shu-home-text) !important;
}

body.shu-home .menu-card p {
  color: var(--shu-home-muted) !important;
}

body.shu-home details[style*='border'] {
  background: var(--shu-home-elevated) !important;
  border-color: var(--shu-home-border) !important;
  color: var(--shu-home-text) !important;
}

body.shu-home details summary {
  color: var(--shu-home-text) !important;
}

body.shu-home details .shu-muted,
body.shu-home details p {
  color: var(--shu-home-muted) !important;
}

/* ---------- 通用内页（非首页）：玄枢 · 暖纸画布 + 服务页卡片 ---------- */
body.shu-page:not(.shu-home) {
  background:
    radial-gradient(ellipse 100% 60% at 50% -15%, var(--xs-bronze-soft), transparent 50%),
    var(--shu-app-canvas);
}

body.shu-page:not(.shu-home) .main-content {
  background: transparent;
}

body.shu-page:not(.shu-home) .content-header {
  background: linear-gradient(180deg, var(--shu-app-elevated) 0%, rgba(255, 254, 251, 0.97) 100%);
  border-bottom: 1px solid var(--shu-app-border);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

body.shu-page:not(.shu-home) .content-body {
  background: transparent;
}

body.shu-page:not(.shu-home) .header-title,
body.shu-page:not(.shu-home) .content-header h1 {
  color: var(--shu-app-text);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.shu-page:not(.shu-home) .content-header h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--xs-bronze), var(--shu-accent));
}

body.shu-page:not(.shu-home) .content-header p {
  color: var(--shu-app-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 56ch;
}

/* 服务页：表单与区块 */
body.shu-page:not(.shu-home) .form-section {
  margin-bottom: 1.35rem;
}

body.shu-page:not(.shu-home) .form-card,
body.shu-page:not(.shu-home) .user-info-card,
body.shu-page:not(.shu-home) .result-card,
body.shu-page:not(.shu-home) .panel-card {
  background: var(--shu-app-elevated);
  border: 1px solid var(--shu-app-border);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shu-shadow);
}

body.shu-page:not(.shu-home) .form-card h2,
body.shu-page:not(.shu-home) .form-card h3,
body.shu-page:not(.shu-home) .form-section > h2,
body.shu-page:not(.shu-home) .form-section > h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--shu-app-text);
  letter-spacing: 0.02em;
}

body.shu-page:not(.shu-home) .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
}

body.shu-page:not(.shu-home) .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 140px;
}

body.shu-page:not(.shu-home) .form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--shu-app-muted);
  letter-spacing: 0.03em;
}

body.shu-page:not(.shu-home) input[type='text'],
body.shu-page:not(.shu-home) input[type='number'],
body.shu-page:not(.shu-home) input[type='date'],
body.shu-page:not(.shu-home) input[type='datetime-local'],
body.shu-page:not(.shu-home) input[type='time'],
body.shu-page:not(.shu-home) select,
body.shu-page:not(.shu-home) textarea {
  font-family: var(--shu-font);
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--shu-app-border);
  background: #fff;
  color: var(--shu-app-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

body.shu-page:not(.shu-home) input:focus,
body.shu-page:not(.shu-home) select:focus,
body.shu-page:not(.shu-home) textarea:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

body.shu-page:not(.shu-home) .btn-primary,
body.shu-page:not(.shu-home) button.btn-primary,
body.shu-page:not(.shu-home) input[type='submit'].btn-primary {
  font-family: var(--shu-font);
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0f766e 0%, var(--shu-accent) 50%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}

body.shu-page:not(.shu-home) .btn-primary:hover,
body.shu-page:not(.shu-home) button.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

body.shu-page:not(.shu-home) #result,
body.shu-page:not(.shu-home) .result-area,
body.shu-page:not(.shu-home) .output-panel {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--shu-app-border);
  background: linear-gradient(180deg, #fffefb 0%, #faf8f5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-height: 2rem;
}

body.shu-page:not(.shu-home) #result table,
body.shu-page:not(.shu-home) .result-area table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

body.shu-page:not(.shu-home) #result th,
body.shu-page:not(.shu-home) #result td,
body.shu-page:not(.shu-home) .result-area th,
body.shu-page:not(.shu-home) .result-area td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--shu-app-border);
  text-align: left;
}

body.shu-page:not(.shu-home) #result th {
  background: rgba(146, 64, 14, 0.06);
  color: var(--xs-bronze);
  font-weight: 600;
}

/* 主区内容区统一内边距与最大宽度 */
body.shu-page .content-body,
body.shu-home .content-body {
  padding: 1.25rem 1.5rem 2.5rem;
  box-sizing: border-box;
}

body.shu-page:not(.shu-home) .content-body {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1400px) {
  body.shu-page .content-body,
  body.shu-home .content-body {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
/* ========== HUD console layer (append for cascade) ========== */
/**
 * HUD / 科技儀表控制台風格 — 疊加於 theme-shell
 * 不修改 API；僅視覺層。裝飾層 pointer-events: none。
 * prefers-reduced-motion: reduce 時關閉循環動畫。
 */

:root {
  --hud-primary: #0d9488;
  --hud-primary-soft: rgba(13, 148, 136, 0.14);
  --hud-secondary: #3b82f6;
  --hud-secondary-soft: rgba(59, 130, 246, 0.12);
  --hud-canvas: #e8eef5;
  --hud-elevated: rgba(255, 254, 252, 0.82);
  --hud-border: rgba(15, 23, 42, 0.1);
  --hud-text: #0f172a;
  --hud-muted: #64748b;
  --hud-grid: rgba(13, 148, 136, 0.12);
  --hud-glow: rgba(13, 148, 136, 0.22);
  --hud-radius-lg: 18px;
  --hud-radius-md: 14px;
  --hud-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --hud-shadow-stage:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 1px rgba(13, 148, 136, 0.08),
    0 12px 40px rgba(15, 23, 42, 0.08),
    0 4px 24px rgba(59, 130, 246, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --hud-canvas: #0b1220;
    --hud-elevated: rgba(22, 32, 48, 0.75);
    --hud-border: rgba(148, 163, 184, 0.12);
    --hud-text: #e8edf4;
    --hud-muted: #94a3b8;
    --hud-grid: rgba(45, 212, 191, 0.14);
    --hud-glow: rgba(45, 212, 191, 0.28);
    --hud-shadow-stage:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 0 0 1px rgba(45, 212, 191, 0.12),
      0 16px 48px rgba(0, 0, 0, 0.45),
      0 4px 28px rgba(59, 130, 246, 0.12);
  }
}

body.shu-page:not(.shu-home),
body.shu-home {
  position: relative;
  background-color: var(--hud-canvas) !important;
  background-image:
    radial-gradient(ellipse 90% 55% at 15% -10%, var(--hud-primary-soft), transparent 52%),
    radial-gradient(ellipse 70% 45% at 95% 15%, var(--hud-secondary-soft), transparent 48%),
    radial-gradient(ellipse 60% 40% at 50% 105%, rgba(13, 148, 136, 0.06), transparent 55%) !important;
  min-height: 100vh;
}

body.shu-page:not(.shu-home)::before,
body.shu-home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(var(--hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 20%, transparent 72%);
}

@media (prefers-reduced-motion: no-preference) {
  body.shu-page:not(.shu-home)::before,
  body.shu-home::before {
    animation: hud-grid-drift 58s linear infinite;
  }
}

@keyframes hud-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 440px 220px, -220px 440px; }
}

body.shu-page .main-content,
body.shu-home .main-content {
  position: relative;
  z-index: 1;
}

.shu-global-topbar {
  border-bottom: 1px solid rgba(13, 148, 136, 0.35) !important;
  background: linear-gradient(
    125deg,
    rgba(26, 35, 50, 0.92) 0%,
    rgba(20, 28, 40, 0.88) 40%,
    rgba(22, 32, 48, 0.9) 100%
  ) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.shu-global-topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.07) 45%,
    transparent 55%
  );
  mix-blend-mode: overlay;
  opacity: 0.38;
}

@media (prefers-reduced-motion: no-preference) {
  .shu-global-topbar::after {
    animation: hud-topbar-sheen 14s ease-in-out infinite;
  }
}

@keyframes hud-topbar-sheen {
  0%, 100% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
}

.shu-global-topbar .shu-brand,
.shu-global-topbar .shu-actions {
  position: relative;
  z-index: 2;
}

body.shu-page:not(.shu-home) .content-body {
  max-width: min(1180px, 100%);
}

body.shu-page:not(.shu-home) .content-header {
  position: relative;
  border-radius: var(--hud-radius-lg) !important;
  border: 1px solid rgba(13, 148, 136, 0.22) !important;
  padding: 1.35rem 1.5rem 1.5rem 1.65rem !important;
  margin-bottom: 1.25rem !important;
  background: linear-gradient(
    145deg,
    var(--hud-elevated) 0%,
    rgba(255, 255, 255, 0.55) 100%
  ) !important;
  box-shadow: var(--hud-shadow-stage) !important;
  overflow: hidden;
}

body.shu-page:not(.shu-home) .content-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--hud-primary), var(--hud-secondary));
  opacity: 0.85;
  border-radius: var(--hud-radius-lg) 0 0 var(--hud-radius-lg);
  pointer-events: none;
}

body.shu-page:not(.shu-home) .content-header {
  --hud-corner: 18px;
  --hud-cw: 2px;
}

body.shu-page:not(.shu-home) .content-header::after {
  content: '';
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background:
    linear-gradient(var(--hud-primary), var(--hud-primary)) top left / var(--hud-corner) var(--hud-cw) no-repeat,
    linear-gradient(var(--hud-primary), var(--hud-primary)) top left / var(--hud-cw) var(--hud-corner) no-repeat,
    linear-gradient(var(--hud-secondary), var(--hud-secondary)) top right / var(--hud-corner) var(--hud-cw) no-repeat,
    linear-gradient(var(--hud-secondary), var(--hud-secondary)) top right / var(--hud-cw) var(--hud-corner) no-repeat,
    linear-gradient(var(--hud-secondary), var(--hud-secondary)) bottom left / var(--hud-corner) var(--hud-cw) no-repeat,
    linear-gradient(var(--hud-secondary), var(--hud-secondary)) bottom left / var(--hud-cw) var(--hud-corner) no-repeat,
    linear-gradient(var(--hud-primary), var(--hud-primary)) bottom right / var(--hud-corner) var(--hud-cw) no-repeat,
    linear-gradient(var(--hud-primary), var(--hud-primary)) bottom right / var(--hud-cw) var(--hud-corner) no-repeat;
  opacity: 0.45;
}

body.shu-page:not(.shu-home) .header-title,
body.shu-page:not(.shu-home) .content-header h1 {
  background: linear-gradient(92deg, var(--hud-text) 0%, var(--hud-primary) 48%, var(--hud-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

body.shu-page:not(.shu-home) .content-header h1::after {
  width: min(320px, 72%) !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--hud-primary), var(--hud-secondary), transparent) !important;
  opacity: 0.9;
}

body.shu-page:not(.shu-home) .form-card,
body.shu-page:not(.shu-home) .user-info-card,
body.shu-page:not(.shu-home) .panel-card {
  position: relative;
  border-radius: var(--hud-radius-md) !important;
  border: 1px solid rgba(13, 148, 136, 0.16) !important;
  background: var(--hud-elevated) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 10px 36px rgba(15, 23, 42, 0.07),
    0 2px 12px var(--hud-glow) !important;
  transition: transform 0.35s var(--hud-ease-out), box-shadow 0.35s var(--hud-ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  body.shu-page:not(.shu-home) .form-card,
  body.shu-page:not(.shu-home) .user-info-card,
  body.shu-page:not(.shu-home) .panel-card {
    animation: hud-panel-breathe 5.5s ease-in-out infinite;
  }
}

@keyframes hud-panel-breathe {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      0 0 0 1px rgba(13, 148, 136, 0.1),
      0 10px 36px rgba(15, 23, 42, 0.07),
      0 2px 14px rgba(13, 148, 136, 0.12);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 0 1px rgba(59, 130, 246, 0.14),
      0 14px 44px rgba(15, 23, 42, 0.09),
      0 4px 22px rgba(59, 130, 246, 0.14);
  }
}

body.shu-page:not(.shu-home) .form-card:hover,
body.shu-page:not(.shu-home) .user-info-card:hover,
body.shu-page:not(.shu-home) .panel-card:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  body.shu-page:not(.shu-home) .form-card:hover,
  body.shu-page:not(.shu-home) .user-info-card:hover,
  body.shu-page:not(.shu-home) .panel-card:hover {
    transform: none;
  }
}

body.shu-page:not(.shu-home) .form-card::before,
body.shu-page:not(.shu-home) .result-card::before,
body.shu-page:not(.shu-home) .info-card.hud-panel::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.45), rgba(59, 130, 246, 0.35), transparent);
  pointer-events: none;
  opacity: 0.85;
}

body.shu-page:not(.shu-home) .result-card,
body.shu-page:not(.shu-home) #result,
body.shu-page:not(.shu-home) .result-area,
body.shu-page:not(.shu-home) .output-panel,
body.shu-page:not(.shu-home) .info-card,
body.shu-page:not(.shu-home) .llm-analysis,
body.shu-page:not(.shu-home) .xishen-jishen-container .info-card,
body.shu-page:not(.shu-home) .xishen-jishen-container .llm-analysis {
  position: relative;
  border-radius: var(--hud-radius-md) !important;
  border: 1px solid rgba(13, 148, 136, 0.14) !important;
  background: var(--hud-elevated) !important;
  backdrop-filter: blur(8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 28px rgba(15, 23, 42, 0.06) !important;
  color: var(--hud-text) !important;
}

body.shu-page:not(.shu-home) .info-card h2,
body.shu-page:not(.shu-home) .llm-analysis h2,
body.shu-page:not(.shu-home) .result-card h2 {
  border-bottom: 1px solid transparent !important;
  border-image: linear-gradient(90deg, var(--hud-primary), var(--hud-secondary), transparent) 1 !important;
  padding-bottom: 0.65rem !important;
  color: var(--hud-text) !important;
}

body.shu-page:not(.shu-home) #result th,
body.shu-page:not(.shu-home) .result-area th {
  font-family: var(--shu-mono, ui-monospace, monospace);
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.14em !important;
  color: var(--hud-muted) !important;
  background: rgba(13, 148, 136, 0.07) !important;
  border-bottom: 1px solid rgba(13, 148, 136, 0.15) !important;
}

body.shu-page:not(.shu-home) #result tr:hover td,
body.shu-page:not(.shu-home) .result-area tr:hover td {
  background: rgba(13, 148, 136, 0.06);
  box-shadow: inset 4px 0 0 0 var(--hud-primary);
}

body.shu-page:not(.shu-home) .btn-primary,
body.shu-page:not(.shu-home) button.btn-primary {
  background: linear-gradient(180deg, #14b8a6 0%, var(--hud-primary) 45%, #0f766e 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 6px 20px rgba(13, 148, 136, 0.38) !important;
}

body.shu-page:not(.shu-home) .btn-primary:active,
body.shu-page:not(.shu-home) button.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.95);
}

@media (prefers-reduced-motion: reduce) {
  body.shu-page:not(.shu-home) .btn-primary:active,
  body.shu-page:not(.shu-home) button.btn-primary:active {
    transform: none;
  }
}

#sidebar .nav-item.active,
#sidebar .nav-submenu-item.active {
  box-shadow:
    inset 3px 0 0 0 var(--hud-primary),
    0 0 20px rgba(13, 148, 136, 0.15);
}

body.shu-home .shu-kpi-card,
body.shu-home .shu-chart-card,
body.shu-home .menu-card,
body.shu-home .calendar-card {
  border: 1px solid rgba(13, 148, 136, 0.14) !important;
  border-radius: var(--hud-radius-md) !important;
  box-shadow: var(--hud-shadow-stage) !important;
}

body.shu-home .shu-dashboard-head h2 {
  background: linear-gradient(92deg, var(--shu-app-text, #1c1917) 0%, #0d9488 55%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

@media (prefers-reduced-motion: no-preference) {
  body.shu-page:not(.shu-home) .content-body > * {
    animation: hud-enter 0.42s var(--hud-ease-out) both;
  }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(1) { animation-delay: 0s; }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(2) { animation-delay: 0.05s; }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(3) { animation-delay: 0.1s; }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(4) { animation-delay: 0.15s; }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(5) { animation-delay: 0.2s; }
  body.shu-page:not(.shu-home) .content-body > *:nth-child(n+6) { animation-delay: 0.22s; }
}

@keyframes hud-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.shu-page:not(.shu-home) .content-body > * {
    animation: none !important;
  }
}

/* ========== 區塊標記（取代標題前 emoji）========== */
.shu-mark {
  display: inline-block;
  width: 4px;
  height: 0.95em;
  margin-right: 0.55em;
  border-radius: 2px;
  vertical-align: -0.12em;
  background: linear-gradient(180deg, var(--hud-primary, #0d9488), var(--hud-secondary, #3b82f6));
}
.shu-mark--dot {
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  margin-right: 0.5em;
  vertical-align: 0.05em;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* ========== 服務頁主操作按鈕統一（青綠主色）========== */
body.shu-page:not(.shu-home) .btn-primary,
body.shu-page:not(.shu-home) .analyze-btn,
body.shu-page:not(.shu-home) .btn-analyze,
body.shu-page:not(.shu-home) .submit-btn,
body.shu-page:not(.shu-home) .stream-btn,
body.shu-page:not(.shu-home) .btn-send,
body.shu-page:not(.shu-home) .btn-pay,
body.shu-page:not(.shu-home) button.btn:not(.btn-secondary):not(.btn-remove):not(.back-btn):not(.btn-clear):not(.time-mode-button):not(.btn-jin):not(.btn-small):not(.shu-modal-close):not(.nav-hamburger):not(.sidebar-close),
body.shu-page:not(.shu-home) input[type="submit"]:not(.btn-secondary) {
  font-family: var(--shu-font, inherit) !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 0.55rem 1.25rem !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 48%, #0f766e 100%) !important;
  color: #fff !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 16px rgba(13, 148, 136, 0.38) !important;
  cursor: pointer !important;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s !important;
}

body.shu-page:not(.shu-home) .btn-primary:hover,
body.shu-page:not(.shu-home) .analyze-btn:hover,
body.shu-page:not(.shu-home) .btn-analyze:hover,
body.shu-page:not(.shu-home) .submit-btn:hover,
body.shu-page:not(.shu-home) .stream-btn:hover,
body.shu-page:not(.shu-home) .btn-send:hover,
body.shu-page:not(.shu-home) .btn-pay:hover,
body.shu-page:not(.shu-home) button.btn:not(.btn-secondary):not(.btn-remove):not(.back-btn):not(.btn-clear):not(.time-mode-button):not(.btn-jin):not(.btn-small):not(.shu-modal-close):not(.nav-hamburger):not(.sidebar-close):hover,
body.shu-page:not(.shu-home) input[type="submit"]:not(.btn-secondary):hover {
  filter: brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 6px 22px rgba(13, 148, 136, 0.45) !important;
}

body.shu-page:not(.shu-home) .btn-secondary,
body.shu-page:not(.shu-home) .back-btn,
body.shu-page:not(.shu-home) .btn-clear,
body.shu-page:not(.shu-home) .btn-small,
body.shu-page:not(.shu-home) .btn-retry {
  background: rgba(255, 255, 255, 0.65) !important;
  color: var(--hud-text, #0f172a) !important;
  border: 1px solid rgba(13, 148, 136, 0.28) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
}

body.shu-page:not(.shu-home) .btn-remove {
  min-width: 2rem;
  padding: 0.35rem 0.5rem !important;
  font-size: 0.85rem !important;
  line-height: 1 !important;
  background: rgba(248, 250, 252, 0.9) !important;
  color: #64748b !important;
  border: 1px solid rgba(100, 116, 139, 0.35) !important;
  box-shadow: none !important;
}

body.shu-page:not(.shu-home) .time-mode-button,
body.shu-page:not(.shu-home) .btn-jin {
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--hud-text) !important;
  border: 1px dashed rgba(13, 148, 136, 0.4) !important;
  box-shadow: none !important;
}

/* 流式分析進度：數字步驟 + 完成勾（純 CSS，無 emoji） */
.progress-icon .shu-pstep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.25em;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 700;
  font-family: var(--shu-mono, ui-monospace, monospace);
  color: var(--hud-muted, #64748b);
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: rgba(255, 255, 255, 0.5);
}
.progress-stage.current .progress-icon .shu-pstep-num {
  border-color: rgba(13, 148, 136, 0.55);
  color: var(--hud-primary, #0d9488);
}
.progress-icon .shu-pstep-done {
  display: inline-block;
  width: 0.45em;
  height: 0.75em;
  border: solid var(--hud-primary, #0d9488);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 0.15em;
}

/* 事業財富等區塊小圓點（原 emoji 佔位） */
.career-icon:empty {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.45em;
  vertical-align: 0.12em;
  background: linear-gradient(135deg, var(--hud-primary, #0d9488), var(--hud-secondary, #3b82f6));
}

body.shu-page:not(.shu-home) .empty-state .icon:empty {
  display: block;
  font-size: 0 !important;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 2px dashed rgba(13, 148, 136, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(59, 130, 246, 0.08));
}

/* 支付結果頁圖示（無 emoji） */
.cancel-icon:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid rgba(180, 83, 9, 0.45);
  background: rgba(254, 243, 199, 0.35);
}
.cancel-icon:empty::after {
  content: '!';
  font-size: 1.75rem;
  font-weight: 800;
  color: #b45309;
  line-height: 1;
}

.success-icon:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid rgba(13, 148, 136, 0.45);
  background: rgba(204, 251, 241, 0.4);
}
.success-icon:empty::after {
  content: '';
  display: block;
  width: 0.35em;
  height: 0.65em;
  border: solid #0d9488;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  margin-bottom: 0.1em;
}

.success-icon:empty[style*='dc3545'] {
  border-color: rgba(220, 53, 69, 0.5);
  background: rgba(254, 226, 226, 0.45);
}
.success-icon:empty[style*='dc3545']::after {
  content: '\00D7';
  border: none;
  width: auto;
  height: auto;
  transform: none;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  color: #b91c1c;
}

.third-party-services .service-icon:empty,
.service-card .service-icon:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.12), rgba(59, 130, 246, 0.1));
}
.third-party-services .service-icon:empty::after,
.service-card .service-icon:empty::after {
  content: '';
  width: 22px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid rgba(13, 148, 136, 0.65);
  border-top-color: transparent;
  opacity: 0.85;
}

/* ========== 八字命理服務頁：單欄佈局與區塊節奏統一 ========== */
:root {
  --shu-bazi-stack: 1.35rem;
  --shu-bazi-pad-x: clamp(0.75rem, 2.4vw, 1.5rem);
}

body.shu-page:not(.shu-home) .content-body {
  max-width: min(1120px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--shu-bazi-pad-x) !important;
  padding-right: var(--shu-bazi-pad-x) !important;
  padding-bottom: 2.75rem !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--shu-bazi-stack);
}

/* 少數頁面在 content-body 內又包了一層與側欄同名的 .main-content，改為不產生盒模型，避免雙層縮進 */
body.shu-page:not(.shu-home) .content-body > .main-content {
  display: contents;
}

/* 各頁 *-container / 表單區：寬度與外邊距統一（覆蓋內聯 max-width） */
body.shu-page:not(.shu-home) .content-body [class*="-container"],
body.shu-page:not(.shu-home) .content-body .xishen-jishen-container,
body.shu-page:not(.shu-home) .content-body > .form-section {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* 表單／結果卡片標題統一 */
body.shu-page:not(.shu-home) .content-body .form-card > h2:first-child,
body.shu-page:not(.shu-home) .content-body .result-card > h2:first-child,
body.shu-page:not(.shu-home) .content-body .form-card > h3:first-child,
body.shu-page:not(.shu-home) .content-body .user-info-card > h3:first-child {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hud-text, #0f172a);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--hud-primary, #0d9488), var(--hud-secondary, #3b82f6), transparent) 1;
}

/* 說明提示條 */
body.shu-page:not(.shu-home) .content-body .info-tip {
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.16);
  color: var(--hud-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.55;
  box-sizing: border-box;
}

/* 表單行：與 theme-shell 呼應，統一間距 */
body.shu-page:not(.shu-home) .content-body .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

body.shu-page:not(.shu-home) .content-body .form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hud-muted, #64748b);
  letter-spacing: 0.03em;
}

/* HUD: gradient title fallback for browsers without background-clip:text */
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  body.shu-page:not(.shu-home) .header-title,
  body.shu-page:not(.shu-home) .content-header h1 {
    color: var(--hud-text, #0f172a) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor;
  }
  body.shu-home .shu-dashboard-head h2 {
    color: var(--shu-app-text, #1c1917) !important;
    background: none !important;
  }
}
