/* ==========================================================================
   龙岗货代通 2.0 · 2026 Smart GovTech Design System (H5 Mobile Demo)
   ========================================================================== */
:root {
  --brand-900: #0B2A5B;
  --brand-800: #103D82;
  --brand-700: #1452B8;
  --brand-600: #1E6FFF;
  --brand-500: #3B82F6;
  --brand-100: #EBF3FF;
  --brand-50: #F4F8FF;

  --ai-600: #0284C7;
  --ai-indigo: #4F46E5;
  --ai-bg: linear-gradient(135deg, #EFF6FF 0%, #EEF2FF 55%, #ECFEFF 100%);

  --bg-canvas: #F3F6FA;
  --bg-card: #FFFFFF;
  --border-subtle: rgba(15, 23, 42, 0.07);
  --border-strong: rgba(15, 23, 42, 0.12);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --danger-text: #DC2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;

  --warn-text: #D97706;
  --warn-bg: #FFFBEB;
  --warn-border: #FDE68A;

  --success-text: #059669;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;

  --info-text: #1D4ED8;
  --info-bg: #EFF6FF;
  --info-border: #BFDBFE;

  --shadow-sm: 0 2px 8px rgba(15, 35, 75, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 35, 75, 0.07);
  --shadow-lg: 0 18px 42px rgba(11, 42, 91, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: #E7EEF8;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.hidden { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------------- Desktop Presentation Shell ---------------- */
.demo-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(30, 111, 255, 0.14), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(14, 165, 233, 0.14), transparent 45%),
    linear-gradient(155deg, #EEF4FC 0%, #E2ECF8 100%);
}

.presenter-panel {
  width: 316px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 46px rgba(15, 42, 92, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.presenter-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.presenter-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #BFDBFE;
  flex-shrink: 0;
}

.presenter-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ver-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, #1E6FFF, #0EA5E9);
  color: #fff;
}

.presenter-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.presenter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.presenter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.host-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #EEF2F7;
  padding: 4px;
  border-radius: 11px;
}

.host-btn {
  border: none;
  background: transparent;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.host-btn.active {
  background: #FFFFFF;
  color: var(--brand-700);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.role-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-chip {
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s;
}

.quick-chip:hover, .quick-chip.active {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-700);
}

.tour-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #F8FAFC;
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s;
}

.tour-item:hover {
  background: var(--brand-50);
  border-color: #BFDBFE;
  color: var(--brand-700);
  transform: translateX(2px);
}

.tour-num {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.presenter-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.ghost-btn {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.ghost-btn:hover { background: #F8FAFC; color: var(--text-primary); }
.ghost-btn.danger:hover { border-color: var(--danger-border); color: var(--danger-text); background: var(--danger-bg); }

.restore-panel-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 99px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-800);
  cursor: pointer;
}

/* ---------------- Phone Device Frame ---------------- */
.phone-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-device {
  width: 394px;
  height: min(844px, calc(100vh - 44px));
  background: var(--bg-canvas);
  border-radius: 42px;
  border: 8px solid #111827;
  box-shadow: 0 28px 65px rgba(11, 30, 70, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device-statusbar {
  height: 36px;
  padding: 0 22px;
  background: var(--brand-800);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  z-index: 25;
}

.device-statusbar.light {
  background: #FFFFFF;
  color: var(--text-primary);
}

.device-notch {
  width: 96px;
  height: 22px;
  background: #111827;
  border-radius: 99px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.host-banner {
  background: #0F172A;
  color: #E2E8F0;
  padding: 6px 14px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.host-banner .host-tag {
  background: rgba(56, 189, 248, 0.18);
  color: #7DD3FC;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------------- Top Navigation Bar ---------------- */
.app-topbar {
  height: 48px;
  padding: 0 12px;
  background: linear-gradient(90deg, var(--brand-800), var(--brand-700));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
}

.app-topbar.light {
  background: #FFFFFF;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.topbar-btn:active { background: rgba(255, 255, 255, 0.14); }

.topbar-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.topbar-pill-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------------- Main Scroll Area ---------------- */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.app-content::-webkit-scrollbar { width: 4px; }
.app-content::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.24); border-radius: 4px; }

/* ---------------- Bottom TabBar ---------------- */
.app-tabbar {
  height: 62px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 4px;
  flex-shrink: 0;
  z-index: 20;
}

.tab-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  height: 100%;
}

.tab-item.active {
  color: var(--brand-600);
  font-weight: 650;
}

.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 20px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Shared Modern Components ---------------- */
.hero-header {
  background:
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.34), transparent 44%),
    radial-gradient(circle at 12% 90%, rgba(99, 102, 241, 0.28), transparent 45%),
    linear-gradient(145deg, #0B2A5B 0%, #1348A3 54%, #1C66E0 100%);
  color: #FFFFFF;
  padding: 20px 18px 26px;
  position: relative;
  overflow: hidden;
}

.hero-header.compact {
  padding: 14px 18px 44px;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255,255,255,0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.28) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3);
}

.hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hero-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: #F0F9FF;
  font-weight: 500;
}

.page-pad {
  padding: 14px 14px 24px;
}

.overlap-top {
  margin-top: -30px;
  position: relative;
  z-index: 5;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 15px;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.title-accent {
  width: 4px;
  height: 15px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--brand-600), var(--ai-600));
  display: inline-block;
}

.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
}

/* ---------------- Landing Role Cards ---------------- */
.landing-desc-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(30, 111, 255, 0.1);
  margin-bottom: 14px;
}

.landing-desc-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.landing-slogan {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-800);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.role-card {
  border: 1.5px solid var(--border-subtle);
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

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

.role-card.ent { border-color: rgba(5, 150, 105, 0.25); }
.role-card.ent:hover { border-color: #059669; }
.role-card.staff { border-color: rgba(30, 111, 255, 0.25); }
.role-card.staff:hover { border-color: var(--brand-600); }

.role-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-icon-box.ent { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #059669; }
.role-icon-box.staff { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E6FFF; }

.role-name {
  font-size: 16px;
  font-weight: 750;
  color: var(--text-primary);
}

.role-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.role-cta {
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.role-card.ent .role-cta { color: #059669; }
.role-card.staff .role-cta { color: var(--brand-600); }

.gov-footer {
  text-align: center;
  padding: 14px 10px 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.gov-footer strong {
  color: var(--brand-800);
  font-weight: 600;
}

/* ---------------- KPI & Feature Grids ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.kpi-item {
  background: #F8FAFD;
  border-radius: 13px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid rgba(30, 111, 255, 0.08);
  cursor: pointer;
  transition: all 0.16s;
}

.kpi-item:active { transform: scale(0.97); }

.kpi-value {
  font-size: 21px;
  font-weight: 800;
  color: var(--brand-700);
  line-height: 1.2;
}

.kpi-value.danger { color: var(--danger-text); }
.kpi-value.warn { color: var(--warn-text); }
.kpi-value.success { color: var(--success-text); }

.kpi-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.kpi-delta {
  font-size: 10px;
  color: var(--success-text);
  margin-top: 2px;
  font-weight: 600;
}

.ai-brief-bar {
  background: var(--ai-bg);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
}

.ai-spark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
}

.ai-brief-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-brief-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.45;
}

.feature-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
}

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

.feature-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 6px 2px;
  cursor: pointer;
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.16s;
}

.feature-btn:active .feature-icon { transform: scale(0.94); }

.feature-icon.blue { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E6FFF; }
.feature-icon.teal { background: linear-gradient(135deg, #F0FDFA, #CCFBF1); color: #0D9488; }
.feature-icon.amber { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); color: #D97706; }
.feature-icon.red { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #DC2626; }
.feature-icon.indigo { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #4F46E5; }

.feature-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.icon-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: #EF4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* ---------------- Badges & Tags ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-danger { color: var(--danger-text); background: var(--danger-bg); border: 1px solid var(--danger-border); }
.badge-warn { color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-border); }
.badge-success { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.badge-info { color: var(--info-text); background: var(--info-bg); border: 1px solid var(--info-border); }
.badge-neutral { color: var(--text-secondary); background: #F1F5F9; border: 1px solid #E2E8F0; }
.badge-ai { color: #1D4ED8; background: linear-gradient(90deg, #DBEAFE, #E0E7FF); border: 1px solid #BFDBFE; }

/* ---------------- Search & Filter Bars ---------------- */
.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #FFFFFF;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 0 12px;
  height: 40px;
  border: 1.5px solid transparent;
  transition: all 0.16s;
}

.search-box:focus-within {
  background: #FFFFFF;
  border-color: var(--brand-500);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--text-primary);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: #F8FAFC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-chip-btn {
  border: 1px solid var(--border-strong);
  background: #F8FAFC;
  border-radius: 9px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.filter-chip-btn.active {
  background: var(--brand-50);
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.list-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.list-meta-bar strong { color: var(--brand-700); font-weight: 700; }

/* ---------------- Site Cards & Detail ---------------- */
.site-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.16s, transform 0.14s;
}

.site-card:active { transform: scale(0.99); }
.site-card.risk-1 { border-left: 4px solid #DC2626; }

.site-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.site-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.site-meta-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.site-meta-row {
  display: flex;
  gap: 6px;
}

.site-meta-label {
  color: var(--text-muted);
  min-width: 58px;
  flex-shrink: 0;
}

.site-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #E2E8F0;
}

.clue-banner {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 11.5px;
  font-weight: 500;
}

/* Detail KV List */
.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}

.kv-row:last-child { border-bottom: none; }
.kv-k { color: var(--text-secondary); width: 112px; flex-shrink: 0; }
.kv-v { color: var(--text-primary); font-weight: 500; flex: 1; text-align: right; word-break: break-word; }

.photo-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.qual-photo-card {
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-align: center;
}

.qual-photo-visual {
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #EFF6FF, #F8FAFC);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 600;
}

.qual-photo-label {
  padding: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Detail Sticky Action Bar */
.sticky-bottom-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 15;
}

.action-mini-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s;
}

.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(30, 111, 255, 0.28);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-600);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.24);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #FFFFFF;
}

.btn-subtle {
  background: #F1F5F9;
  color: var(--text-primary);
}

/* ---------------- Incident Cards & Dual-Track Timeline ---------------- */
.incident-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.incident-card-body {
  display: flex;
  gap: 11px;
}

.incident-thumb {
  width: 84px;
  height: 84px;
  border-radius: 11px;
  object-fit: cover;
  background: #E2E8F0;
  flex-shrink: 0;
}

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

.incident-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.38;
}

.incident-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dual-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #E2E8F0;
  font-size: 11.5px;
}

.dual-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sla-chip {
  font-size: 10.5px;
  font-weight: 700;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.sla-chip.urgent {
  color: #DC2626;
  background: #FEE2E2;
}

.sla-chip.done {
  color: #059669;
  background: #D1FAE5;
}

/* Segmented Tabs (派出所 / 街道) */
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.seg-tab {
  border: none;
  background: transparent;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.seg-tab.active {
  background: #FFFFFF;
  color: var(--brand-700);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #E2E8F0;
}

.tl-item {
  position: relative;
  padding-bottom: 16px;
}

.tl-item:last-child { padding-bottom: 2px; }

.tl-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-600);
  border: 2.5px solid #DBEAFE;
}

.tl-dot.done { background: #059669; border-color: #D1FAE5; }
.tl-dot.warn { background: #D97706; border-color: #FEF3C7; }

.tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.tl-time { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.tl-body { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
.tl-img { width: 100px; height: 100px; border-radius: 10px; object-fit: cover; margin-top: 8px; border: 1px solid var(--border-subtle); }

/* Map Preview Card */
.map-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #EBF4FF;
  position: relative;
  height: 132px;
  margin-top: 10px;
}

.map-overlay-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* ---------------- Form Controls ---------------- */
.form-group { margin-bottom: 14px; }
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 7px;
}

.req-star { color: #EF4444; margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.16s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: #FFFFFF;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1);
}

.form-textarea { min-height: 84px; resize: vertical; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.choice-chip.selected {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-700);
}

.choice-chip.selected-danger {
  border-color: #DC2626;
  background: #FEF2F2;
  color: #DC2626;
}

.upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-slot {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  border: 1.5px dashed #94A3B8;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-preview {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.upload-preview img { width: 100%; height: 100%; object-fit: cover; }

.upload-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Employee Card ---------------- */
.emp-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 13px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #DBEAFE, #EFF6FF);
  color: var(--brand-700);
  font-size: 16px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar.boss { background: linear-gradient(135deg, #FEF3C7, #FFFBEB); color: #B45309; }
.avatar.left { background: #F1F5F9; color: #94A3B8; }

.emp-body { flex: 1; min-width: 0; }
.emp-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.emp-name { font-size: 14.5px; font-weight: 700; }
.emp-phone { font-size: 12.5px; color: var(--text-secondary); }
.emp-company { font-size: 12px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Charts (CSS Bar Charts) ---------------- */
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
}

.bar-label { width: 64px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; height: 10px; border-radius: 99px; background: #EFF4FA; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1E6FFF, #0EA5E9); transition: width 0.4s ease; }
.bar-fill.warn { background: linear-gradient(90deg, #F59E0B, #EF4444); }
.bar-val { width: 34px; text-align: right; font-weight: 700; color: var(--text-primary); }

/* ---------------- AI Risk Card ---------------- */
.ai-card {
  background: var(--ai-bg);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}

.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
  color: var(--brand-900);
}

.ai-points {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.data-source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ds-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(30, 111, 255, 0.16);
  color: var(--brand-800);
}

/* ---------------- Modals & Right Filter Drawer ---------------- */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}

.modal-backdrop.align-right {
  justify-content: flex-end;
  padding: 0;
}

.modal-backdrop.align-bottom {
  align-items: flex-end;
  padding: 0;
}

.modal-box {
  width: 100%;
  max-width: 340px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  max-height: 85%;
  overflow-y: auto;
}

.drawer-right {
  width: 84%;
  height: 100%;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.2s ease;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
}

.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
}

.sheet-bottom {
  width: 100%;
  background: #FFFFFF;
  border-radius: 22px 22px 0 0;
  padding: 18px 16px 24px;
  max-height: 86%;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

.modal-title {
  font-size: 16.5px;
  font-weight: 750;
  text-align: center;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.toast {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(15, 23, 42, 0.9);
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s;
  z-index: 95;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------------- Enterprise Home CTA ---------------- */
.ent-cta-card {
  background: linear-gradient(135deg, #059669 0%, #0D9488 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.26);
  cursor: pointer;
  margin-bottom: 12px;
}

.ent-cta-card:active { transform: scale(0.99); }

/* ---------------- Mobile Native Fullscreen Mode ---------------- */
@media (max-width: 640px) {
  .demo-shell {
    padding: 0;
    background: var(--bg-canvas);
  }
  .presenter-panel, .restore-panel-btn, .device-statusbar {
    display: none !important;
  }
  .phone-stage, .phone-device {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}

.demo-shell.clean-mode .presenter-panel {
  display: none;
}
