* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eef4ff 0, #f7f9fc 220px, #f3f6fb 100%);
  color: #1f2937;
}

.page-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.page-watermark-grid {
  position: absolute;
  inset: -12% -22%;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-content: space-around;
  justify-items: center;
  transform: rotate(-24deg);
}

.page-watermark-grid span {
  display: grid;
  gap: 3px;
  color: rgba(15, 23, 42, 0.055);
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
}

.page-watermark-grid span em {
  display: block;
  font-style: normal;
  font-size: 14px;
  line-height: 1.15;
}

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

.guest-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 22%, rgba(130, 177, 255, 0.24), transparent 24%),
    radial-gradient(circle at 86% 24%, rgba(99, 162, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #0d3d86 0%, #0d55b3 52%, #0b63c5 100%);
}

.guest-body:has(.login-page-mobile) {
  align-items: flex-start;
  overflow-y: auto;
}

.login-card,
.section-card,
.stat-card,
.mobile-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.login-card {
  width: 100%;
  padding: 40px 36px 34px;
  border-radius: 0 24px 24px 0;
  border: 0;
  background: rgba(245, 247, 251, 0.94);
  box-shadow: none;
  min-height: 470px;
  display: flex;
  align-items: center;
}

.login-title {
  margin: 0 0 8px;
  font-size: 30px;
  text-align: center;
  letter-spacing: 0;
}

.login-subtitle {
  margin: 0 0 24px;
  color: #7c8799;
  font-size: 14px;
  text-align: center;
}

.login-page {
  position: relative;
  width: min(1020px, 100%);
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page-mobile {
  min-height: auto;
  padding-top: 18px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  align-items: flex-start;
}

.login-page-mobile .login-scene {
  border-radius: 24px;
}

.login-page-mobile .login-frame {
  width: min(560px, 100%);
  grid-template-columns: 1fr;
}

.login-page-mobile .login-showcase {
  padding: 12px 12px 0;
}

.login-page-mobile .login-showcase-media {
  min-height: 148px;
  border-radius: 18px 18px 0 0;
}

.login-page-mobile .login-card {
  min-height: auto;
  padding: 22px 18px 20px;
  border-radius: 0 0 20px 20px;
  align-items: flex-start;
}

.login-page-mobile .login-title {
  font-size: 24px;
}

.login-page-mobile .login-subtitle {
  margin-bottom: 14px;
}

.login-page-mobile .login-form {
  gap: 10px;
}

.login-page-mobile .login-card .input {
  min-height: 42px;
}

.login-page-mobile .login-card .button.primary {
  min-height: 44px;
  font-size: 15px;
}

.login-page-mobile .login-card-footer {
  margin-top: 10px;
}

.login-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
}

.login-glow,
.login-cloud,
.login-mountain,
.login-fog {
  position: absolute;
}

.login-glow {
  border-radius: 999px;
  filter: blur(18px);
}

.login-glow-left {
  width: 260px;
  height: 260px;
  left: -40px;
  top: 130px;
  background: radial-gradient(circle, rgba(143, 156, 255, 0.26), rgba(143, 156, 255, 0) 70%);
}

.login-glow-right {
  width: 300px;
  height: 300px;
  right: -60px;
  top: 120px;
  background: radial-gradient(circle, rgba(112, 181, 255, 0.22), rgba(112, 181, 255, 0) 72%);
}

.login-cloud {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(10px);
}

.cloud-one {
  top: 84px;
  left: 160px;
  width: 300px;
  height: 58px;
}

.cloud-two {
  top: 160px;
  right: 150px;
  width: 220px;
  height: 48px;
}

.cloud-three {
  bottom: 112px;
  right: 60px;
  width: 260px;
  height: 62px;
  background: rgba(255, 255, 255, 0.22);
}

.login-mountain {
  bottom: -6%;
  background: linear-gradient(180deg, #f7fbff 0%, #d8e4f1 18%, #8097ba 62%, #304d81 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  box-shadow: 0 20px 60px rgba(6, 24, 54, 0.24);
}

.mountain-back {
  left: 56%;
  width: 390px;
  height: 300px;
  opacity: 0.76;
}

.mountain-mid {
  left: 62%;
  width: 470px;
  height: 372px;
}

.mountain-front {
  left: 74%;
  width: 410px;
  height: 332px;
}

.login-fog {
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(236, 244, 255, 0.84));
  filter: blur(14px);
}

.login-frame {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: stretch;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 70px rgba(8, 32, 72, 0.3);
  backdrop-filter: blur(16px);
}

.login-showcase {
  padding: 18px 0 18px 18px;
  background: rgba(5, 34, 84, 0.12);
}

.login-showcase-media {
  position: relative;
  min-height: 470px;
  height: 100%;
  overflow: hidden;
  border-radius: 20px 0 0 20px;
  background:
    radial-gradient(circle at 78% 26%, rgba(255, 255, 255, 0.46), transparent 12%),
    linear-gradient(180deg, #0c4b90 0%, #1e66bb 32%, #aec8ea 68%, #eef4fb 100%);
}

.login-showcase-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.5), transparent 24%),
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.38), transparent 16%),
    linear-gradient(180deg, rgba(7, 44, 104, 0.52), rgba(7, 44, 104, 0.1));
  mix-blend-mode: screen;
}

.login-showcase-media::after {
  content: "";
  position: absolute;
  inset: auto -8% -16% -4%;
  height: 56%;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.7), transparent 18%),
    radial-gradient(circle at 60% 16%, rgba(255, 255, 255, 0.6), transparent 14%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(241, 246, 252, 0.8)),
    linear-gradient(180deg, #eef4fb 0%, #cfdceb 28%, #8ba2c1 64%, #34517f 100%);
  clip-path: polygon(12% 100%, 28% 58%, 40% 100%, 58% 42%, 78% 100%, 100% 28%, 100% 100%);
  box-shadow: inset 0 80px 80px rgba(255, 255, 255, 0.22);
}

.login-card-inner {
  width: 100%;
}

.login-form {
  gap: 16px;
}

.login-card .form-label {
  color: #556273;
  font-size: 13px;
  margin-left: 2px;
}

.login-card .input {
  min-height: 52px;
  border-radius: 14px;
  border-color: #d9e0ea;
  background: rgba(255, 255, 255, 0.96);
}

.login-card .button.primary {
  width: 100%;
  justify-content: center;
  min-height: 56px;
  font-size: 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #8fdcff 0%, #6e83ff 45%, #2115f0 100%);
  border: 0;
  box-shadow: 0 18px 30px rgba(49, 73, 233, 0.26);
}

.login-card .button.primary:hover {
  box-shadow: 0 20px 34px rgba(49, 73, 233, 0.3);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: center;
}

.captcha-image-button {
  width: 128px;
  height: 44px;
  padding: 0;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.captcha-image-button img {
  display: block;
  width: 128px;
  height: 44px;
}

.login-card-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.login-card-footer .button.link {
  color: #5164e6;
  font-weight: 600;
}

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

.sidebar {
  width: 242px;
  background: linear-gradient(180deg, #0f172a 0, #172554 100%);
  color: #cbd5e1;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  margin-bottom: 20px;
  padding: 2px 4px;
}

.brand-title {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}

.brand-subtitle {
  margin-top: 6px;
  color: #93c5fd;
  font-size: 12px;
}

.site-credit {
  font-size: 12px;
  line-height: 1.6;
}

.site-credit-guest {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(7, 26, 58, 0.3);
  z-index: 3;
}

.site-credit-sidebar {
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #bfd5ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.site-credit-mobile {
  margin-top: 8px;
  padding: 12px 14px;
  color: #64748b;
  text-align: center;
}

.grassroots-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef6ff 0, #f8fbff 100%);
}

.grassroots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #dbe3ef;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.grassroots-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.grassroots-main {
  padding: 24px;
}

.login-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  user-select: none;
}

.login-inline-check input {
  width: 16px;
  height: 16px;
}

.user-panel {
  padding: 16px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.user-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.muted {
  color: #94a3b8;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.nav-link-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(147, 197, 253, 0.28);
  color: #fff;
  transform: translateX(2px);
}

.main {
  flex: 1;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.page-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 20px;
}

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

.dashboard-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.dashboard-surface {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, #edf9fb 0, #ebf8fb 100%);
  border: 1px solid rgba(185, 231, 235, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.dashboard-inline-card {
  border-radius: 22px;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
}

.chart-card {
  position: relative;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(214, 226, 234, 0.95);
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.chart-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: #2563eb;
}

.chart-card.tone-indigo {
  background: #ffffff;
}

.chart-card.tone-indigo::before {
  background: #2563eb;
}

.chart-card.tone-cyan {
  background: #ffffff;
}

.chart-card.tone-cyan::before {
  background: #0891b2;
}

.chart-card.tone-violet {
  background: #ffffff;
}

.chart-card.tone-violet::before {
  background: #7c3aed;
}

.chart-card.tone-slate {
  background: #ffffff;
}

.chart-card.tone-slate::before {
  background: #334155;
}

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

.chart-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.chart-meta {
  color: #64748b;
  font-size: 13px;
  margin-top: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbe3ef;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.donut-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.donut-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.donut-chart {
  position: relative;
  width: 188px;
  height: 188px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 18px 36px rgba(37, 99, 235, 0.08);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.donut-center span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

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

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.legend-label {
  min-width: 0;
  color: #334155;
}

.legend-value {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.trend-chart {
  display: grid;
  gap: 16px;
}

.trend-stage {
  position: relative;
  padding: 16px 16px 10px;
  border-radius: 20px;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
}

.trend-grid {
  position: absolute;
  inset: 18px 14px 38px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  pointer-events: none;
}

.trend-grid span {
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}

.trend-svg {
  position: relative;
  width: 100%;
  height: 240px;
  display: block;
}

.trend-area {
  fill: rgba(59, 130, 246, 0.14);
}

.trend-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 2.5;
}

.trend-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}

.trend-labels span {
  text-align: center;
}

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

.metric-tile {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
}

.metric-tile strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.metric-tile span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

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

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

.ranking-item {
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
}

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

.ranking-name {
  font-weight: 600;
  color: #1e293b;
}

.ranking-value {
  color: #0f172a;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa 0, #2563eb 100%);
}

.progress-fill.alt {
  background: linear-gradient(90deg, #7c3aed 0, #4f46e5 100%);
}

.panel-empty {
  padding: 34px 16px;
  text-align: center;
  color: #64748b;
}

.dashboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
}

.dashboard-briefing {
  width: min(1120px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, #eef9fb 0, #edf8fb 100%);
  border: 1px solid rgba(191, 231, 235, 0.95);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}

.stat-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(214, 226, 234, 0.95);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: #2563eb;
  opacity: 0.9;
}

.stat-card.tone-blue {
  background: #ffffff;
}

.stat-card.tone-blue::before {
  background: #2563eb;
}

.stat-card.tone-amber {
  background: #ffffff;
}

.stat-card.tone-amber::before {
  background: #d97706;
}

.stat-card.tone-violet {
  background: #ffffff;
}

.stat-card.tone-violet::before {
  background: #7c3aed;
}

.stat-card.tone-green {
  background: #ffffff;
}

.stat-card.tone-green::before {
  background: #059669;
}

.stat-card.tone-rose {
  background: #ffffff;
}

.stat-card.tone-rose::before {
  background: #e11d48;
}

.stat-card-layout {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.stat-icon-box.tone-blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.stat-icon-box.tone-amber {
  color: #b45309;
  background: #fef3c7;
}

.stat-icon-box.tone-violet {
  color: #6d28d9;
  background: #ede9fe;
}

.stat-icon-box.tone-green {
  color: #047857;
  background: #d1fae5;
}

.stat-icon-box.tone-rose {
  color: #be123c;
  background: #ffe4e6;
}

.stat-icon {
  width: 22px;
  height: 22px;
}

.stat-copy {
  min-width: 0;
}

.stat-label {
  color: #64748b;
  font-size: 13px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 10px;
}

.stat-value-alert {
  color: #dc2626;
  font-size: 32px;
}

.stat-support {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-caption {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-card {
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.markdown-document {
  overflow: hidden;
}

.markdown-body {
  display: grid;
  gap: 12px;
  line-height: 1.75;
  color: #0f172a;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 0;
  line-height: 1.25;
}

.markdown-body h1 {
  font-size: 26px;
}

.markdown-body h2 {
  font-size: 22px;
}

.markdown-body h3 {
  font-size: 18px;
}

.markdown-body h4 {
  font-size: 16px;
}

.markdown-body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0;
  padding-left: 22px;
}

.markdown-body li,
.markdown-body blockquote p {
  overflow-wrap: anywhere;
}

.markdown-body li + li {
  margin-top: 4px;
}

.markdown-body blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 0 10px 10px 0;
}

.markdown-body pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
}

.markdown-body code {
  padding: 0.15em 0.35em;
  border-radius: 6px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.95em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.mobile-markdown-body {
  font-size: 13px;
  line-height: 1.7;
}

.mobile-markdown-body h1 {
  font-size: 20px;
}

.mobile-markdown-body h2 {
  font-size: 18px;
}

.mobile-markdown-body h3 {
  font-size: 16px;
}

.mobile-markdown-body h4 {
  font-size: 15px;
}

.mobile-markdown-body pre {
  padding: 12px 14px;
  font-size: 12px;
}

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

.section-title {
  margin: 0;
  font-size: 17px;
}

.section-meta {
  color: #64748b;
  font-size: 13px;
}

.toolbar-row,
.filter-row,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.card-anchor {
  display: block;
  color: inherit;
}

.card-anchor:hover .stat-card,
.card-anchor:hover .chart-card {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.filter-row {
  margin-bottom: 18px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.compact-form-page {
  gap: 14px;
}

.compact-form-page .section-card {
  padding: 16px 18px;
  border-radius: 14px;
}

.compact-form-page .section-header {
  margin-bottom: 14px;
}

.compact-form-page .section-title {
  font-size: 16px;
}

.compact-form-page .section-meta {
  font-size: 12px;
}

.compact-form-page .form-grid {
  gap: 12px 14px;
}

.compact-form-page .form-group {
  gap: 6px;
}

.compact-form-page .form-label {
  font-size: 12px;
}

.compact-form-page .input,
.compact-form-page .select,
.compact-form-page .textarea {
  padding: 9px 11px;
}

.compact-form-page .input,
.compact-form-page .select {
  min-height: 40px;
}

.compact-form-page .textarea {
  min-height: 76px;
}

.compact-form-page > .actions .button {
  min-height: 46px;
  padding: 12px 20px;
  font-size: 15px;
}

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

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

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

.span-4 {
  grid-column: 1 / -1;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  color: #475569;
}

.required-star {
  color: #ef4444;
  margin-left: 4px;
  font-weight: 700;
}

.input,
.select,
.textarea,
.button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font: inherit;
}

.input,
.select,
.textarea {
  padding: 11px 13px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.searchable-select {
  position: relative;
}

.searchable-select-control {
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: text;
}

.searchable-select.is-open .searchable-select-control {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.searchable-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: none;
  max-height: 260px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.searchable-select.is-open .searchable-select-panel {
  display: block;
}

.searchable-select-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}

.searchable-select-option,
.searchable-select-empty {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
}

.searchable-select-option {
  cursor: pointer;
  color: #0f172a;
}

.searchable-select-option:hover,
.searchable-select-option.is-active {
  background: #eff6ff;
}

.searchable-select-option.is-selected {
  color: #1d4ed8;
  font-weight: 600;
}

.searchable-select-empty {
  color: #94a3b8;
}

.searchable-select-native {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #fff;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 42px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.button-label {
  line-height: 1;
}

.button.primary {
  background: linear-gradient(180deg, #3b82f6 0, #2563eb 100%);
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.2);
}

.button.success {
  background: linear-gradient(180deg, #22c55e 0, #16a34a 100%);
  color: #fff;
  border-color: #16a34a;
  box-shadow: 0 10px 18px rgba(22, 163, 74, 0.18);
}

.button.warning {
  background: linear-gradient(180deg, #f59e0b 0, #d97706 100%);
  color: #fff;
  border-color: #d97706;
  box-shadow: 0 10px 18px rgba(217, 119, 6, 0.18);
}

.button.danger {
  background: linear-gradient(180deg, #ef4444 0, #dc2626 100%);
  color: #fff;
  border-color: #dc2626;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.16);
}

.button.light {
  background: #fff;
  color: #334155;
  border-color: #d7e0eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.button.link {
  background: transparent;
  border-color: transparent;
  color: #2563eb;
  padding-left: 0;
  padding-right: 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

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

.table th,
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
  background: #fff;
}

.table th {
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge.muted {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

.badge.warning {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}

.badge.info {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.badge.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.warning {
  background: #ffedd5;
  color: #9a3412;
}

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

.detail-item strong {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 4px;
}

.detail-item span {
  word-break: break-all;
}

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

.log-item {
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0, #f8fafc 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.tab-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.mobile-shell {
  min-height: 100vh;
  padding-bottom: 78px;
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 246, 251, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 14px;
  border-bottom: 1px solid #dbe3ef;
}

.mobile-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mobile-title {
  font-size: 18px;
  font-weight: 700;
}

.mobile-content {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.mobile-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 34%),
    linear-gradient(135deg, #0f766e 0%, #155e75 48%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.mobile-hero-compact {
  padding-top: 16px;
  padding-bottom: 14px;
}

.mobile-hero-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.mobile-hero-title {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
}

.mobile-hero-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.mobile-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-section-note {
  color: #64748b;
  font-size: 12px;
}

.mobile-back-row {
  position: sticky;
  top: 8px;
  z-index: 15;
  display: flex;
  justify-content: flex-start;
}

.mobile-back-row .button {
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid #dbe3ef;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
}

.mobile-nav a {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  padding: 7px 2px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  color: #64748b;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.mobile-nav-icon {
  width: 14px;
  height: 14px;
}

.mobile-nav-label {
  display: block;
  min-width: 0;
}

.mobile-nav a.active {
  background: linear-gradient(180deg, #bfdbfe 0%, #dbeafe 52%, #eff6ff 100%);
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2), 0 8px 18px rgba(59, 130, 246, 0.14);
}

.mobile-nav-grassroots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-left: 18px;
  padding-right: 18px;
}

.mobile-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.mobile-item-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.mobile-meta {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.mobile-meta strong {
  color: #0f172a;
  font-weight: 600;
  margin-right: 4px;
}

.mobile-home-stats {
  padding-bottom: 10px;
}

.stats-grid.mobile-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-stat-card {
  min-height: 76px;
  padding: 10px 10px 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #d7e7fb;
  box-shadow: none;
}

.mobile-card-anchor {
  display: block;
  color: inherit;
  text-decoration: none;
}

.mobile-card-anchor:active .mobile-stat-card,
.mobile-card-anchor:hover .mobile-stat-card {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.mobile-home-stats .mobile-stat-card-core {
  min-height: 70px;
  padding: 8px 9px 7px;
}

.mobile-home-stats .mobile-stat-card .stat-label {
  font-size: 10px;
}

.mobile-home-stats .mobile-stat-card .stat-value {
  margin-top: 4px;
  font-size: 19px;
  line-height: 1.05;
}

.mobile-home-stats .mobile-stat-card-core .stat-value {
  margin-top: 3px;
  font-size: 17px;
}

.mobile-stat-summary-card {
  justify-content: flex-start;
  min-height: 84px;
}

.mobile-stat-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.mobile-stat-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbeafe;
  color: #475569;
  font-size: 10px;
  line-height: 1.2;
}

.mobile-stat-summary-chip strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
}

.mobile-stat-summary-empty {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 10px;
}

.mobile-quick-panel {
  padding-top: 14px;
}

.mobile-stats-surface {
  padding: 14px;
}

.mobile-stats-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-stats-card {
  border-radius: 18px;
}

.mobile-donut-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.mobile-stats-text-item {
  padding: 12px 14px;
}

.mobile-stats-text-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.mobile-stats-brief-card {
  padding: 14px;
}

.mobile-stats-brief-text {
  line-height: 1.9;
  color: #334155;
}

.mobile-stats-brief-level-wrap {
  margin-top: 10px;
}

.mobile-stats-brief-level-title {
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.mobile-stats-brief-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-stats-inline-value {
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
}

.mobile-stats-brief-purpose-text {
  margin-top: 2px;
}

.mobile-stats-brief-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.mobile-stats-brief-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
}

.mobile-stats-brief-item strong {
  color: #0f172a;
  font-size: 13px;
}

.mobile-stats-brief-item span {
  color: #475569;
  line-height: 1.8;
}

.mobile-stats-levels {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.mobile-stats-level-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-stats-level-chip-label {
  font-size: 13px;
}

.mobile-stats-level-chip-value {
  margin-left: 6px;
  font-size: 18px;
  line-height: 1;
}

.mobile-stats-level-chip-unit {
  margin-left: 2px;
  font-size: 12px;
}

.mobile-stats-level-chip.level-1 {
  background: #fee2e2;
  color: #b91c1c;
}

.mobile-stats-level-chip.level-2 {
  background: #fef3c7;
  color: #b45309;
}

.mobile-stats-level-chip.level-3 {
  background: #dbeafe;
  color: #1d4ed8;
}

.mobile-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-quick-actions .button {
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
}

.mobile-messages-card .mobile-section-head {
  margin-bottom: 10px;
}

.mobile-messages-card .mobile-item-title {
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 700;
}

.mobile-messages-card .mobile-section-note {
  font-size: 11px;
}

.mobile-messages-card .mobile-list {
  gap: 10px;
}

.mobile-messages-card .log-item {
  padding: 12px 14px;
  border-radius: 10px;
}

.mobile-messages-card .log-item strong {
  font-size: 11px;
  line-height: 1.35;
}

.mobile-messages-card .log-item > div:nth-child(2) {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.mobile-messages-card .log-item .muted {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.35;
}

.mobile-action-form {
  display: block;
}

.mobile-action-form .button {
  width: 100%;
  justify-content: center;
}

.mobile-pager-card {
  padding: 12px 14px;
}

.mobile-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.mobile-pager .button {
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
}

.mobile-pager .button:last-child {
  justify-self: end;
}

.mobile-pager-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-pager-disabled {
  opacity: .45;
  pointer-events: none;
}

.mobile-inline-details {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
}

.mobile-inline-details summary {
  color: #0f172a;
  cursor: pointer;
  font-weight: 600;
  outline: none;
}

.mobile-inline-details-body {
  margin-top: 8px;
  color: #475569;
  line-height: 1.75;
  word-break: break-word;
}

.mobile-inline-break {
  display: inline-block;
  margin-top: 2px;
  color: #0f172a;
  font-weight: 600;
}

.mobile-detail-actions-spacer {
  height: 76px;
}

.mobile-detail-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 20;
  padding: 0 10px;
}

.mobile-detail-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

.mobile-detail-actions-grid.single {
  grid-template-columns: 1fr;
}

.mobile-detail-actions-grid .button {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  font-size: 12px;
}

.mobile-detail-actions-grid .button-icon {
  width: 13px;
  height: 13px;
}

.mobile-contact-card {
  padding: 12px 12px 10px;
}

.mobile-contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-contact-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 1 auto;
}

.mobile-contact-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-weight: 700;
}

.mobile-card.mobile-address-search-card {
  padding: 14px;
}

.mobile-address-search-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.mobile-address-search-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-address-search-actions .button:only-child {
  grid-column: 1 / -1;
}

.mobile-address-search-actions .button {
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
}

.mobile-list.mobile-address-list {
  gap: 12px;
}

.mobile-card.mobile-address-card {
  padding: 18px 16px;
  overflow: hidden;
  background: #ffffff;
  border-color: #e5edf7;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.mobile-address-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-address-name {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
}

.mobile-address-badge {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 5px 12px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-address-lines {
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.mobile-address-lines strong {
  color: #0f172a;
  font-weight: 800;
  margin-right: 8px;
}

.mobile-address-lines span,
.mobile-address-phone {
  word-break: break-word;
}

.mobile-address-phone {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 640px) {
  .grassroots-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grassroots-header-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .mobile-detail-actions-grid {
    grid-template-columns: 1fr;
  }

  .mobile-detail-actions-grid .button {
    min-height: 38px;
  }

  .mobile-contact-card {
    padding: 11px 11px 9px;
  }
}

.process-card {
  border-style: dashed;
}

.process-card-primary {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.process-card-warning {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf0 0%, #fff4df 100%);
}

.process-card-mobile {
  border-style: dashed;
}

.process-card-mobile-primary {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.process-card-mobile-warning {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf2 0%, #fff5e4 100%);
}

.mobile-tel-link {
  color: #0f766e;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(15, 118, 110, 0.28);
  text-underline-offset: 2px;
}

.mobile-card-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.mobile-card-actions .button {
  min-height: 38px;
  border-radius: 12px;
}

/* Global density tuning: slimmer cards, lists and more consistent buttons. */
.sidebar {
  width: 222px;
  padding: 18px 10px;
}

.brand {
  margin-bottom: 16px;
}

.brand-title {
  font-size: 18px;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 11px;
}

.site-credit-sidebar {
  margin-top: 14px;
  padding: 8px 10px;
  border-radius: 10px;
}

.sidebar-footer-actions {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  gap: 8px;
}

.sidebar-footer-actions form {
  margin: 0;
  width: 100%;
}

.user-panel {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.user-panel-actions {
  margin-top: 12px;
}

.user-panel-actions .button {
  display: inline-flex;
  width: auto;
  min-height: auto;
  padding: 0;
  justify-content: flex-start;
  color: #c7d2fe;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

.user-panel-actions .button:hover {
  color: #ffffff;
}

.nav {
  gap: 5px;
  margin-bottom: 24px;
  padding-left: 10px;
  padding-right: 6px;
}

.nav-link {
  padding: 10px 12px 10px 18px;
  border-radius: 10px;
}

.nav-link-main {
  gap: 12px;
}

.main {
  padding: 20px;
}

.topbar {
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 14px;
}

.page-title {
  font-size: 22px;
}

.page-subtitle {
  margin-top: 6px;
  font-size: 13px;
}

.stack {
  gap: 16px;
}

.stats-grid,
.chart-grid,
.ranking-grid {
  gap: 14px;
}

.dashboard-surface {
  padding: 16px;
  border-radius: 18px;
}

.dashboard-inline-card {
  border-radius: 16px;
}

.dashboard-overlay {
  padding: 16px;
}

.dashboard-briefing {
  max-height: 86vh;
  padding: 18px;
  border-radius: 18px;
}

.chart-card {
  padding: 18px;
  border-radius: 18px;
}

.chart-head {
  gap: 10px;
  margin-bottom: 14px;
}

.chart-title {
  font-size: 16px;
}

.chart-meta {
  margin-top: 4px;
  font-size: 12px;
}

.chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.donut-layout {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
}

.donut-wrap {
  gap: 10px;
}

.donut-chart {
  width: 172px;
  height: 172px;
}

.donut-chart::after {
  inset: 20px;
}

.donut-center strong {
  font-size: 30px;
}

.donut-center span {
  margin-top: 4px;
  font-size: 12px;
}

.legend-list {
  gap: 8px;
}

.legend-item {
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
}

.trend-chart {
  gap: 12px;
}

.trend-stage {
  padding: 12px 12px 8px;
  border-radius: 16px;
}

.trend-grid {
  inset: 14px 12px 34px;
}

.trend-svg {
  height: 220px;
}

.trend-labels {
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
}

.metric-strip {
  gap: 10px;
}

.metric-tile {
  padding: 12px 12px 10px;
  border-radius: 14px;
}

.metric-tile strong {
  font-size: 20px;
}

.metric-tile span {
  margin-top: 6px;
  font-size: 11px;
}

.ranking-list,
.log-list,
.mobile-list {
  gap: 8px;
}

.ranking-item,
.log-item {
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
}

.ranking-top {
  gap: 8px;
}

.progress-track {
  height: 8px;
}

.panel-empty,
.empty-state {
  padding: 24px 12px;
}

.stats-sheet-card {
  overflow: hidden;
}

.stats-sheet-wrap {
  margin-top: 4px;
}

.stats-sheet-table {
  min-width: 2200px;
}

.stats-sheet-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  background: #fff;
}

.stats-sheet-table th,
.stats-sheet-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.stats-sheet-table thead th {
  font-size: 12px;
}

.stats-vertical-head {
  width: 34px;
  min-width: 34px;
  height: 164px;
  padding: 6px 2px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0;
}

.stats-vertical-head > span {
  display: inline-block;
}

.stats-sheet-table tbody td {
  font-size: 12px;
}

.stats-total-row td {
  font-weight: 700;
  background: #f8fbff;
}

.stats-note-row td {
  text-align: left;
}

.stats-note-text {
  color: #475569;
}

.stat-card {
  min-height: 104px;
  padding: 16px;
  border-radius: 16px;
}

.stat-card::before {
  height: 3px;
}

.stat-card-layout {
  gap: 12px;
}

.stat-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.stat-icon {
  width: 20px;
  height: 20px;
}

.stat-label {
  font-size: 12px;
}

.stat-value {
  margin-top: 8px;
  font-size: 24px;
}

.stat-support,
.stat-caption {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.section-card {
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.section-header {
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 16px;
}

.section-meta {
  font-size: 12px;
}

.toolbar-row,
.filter-row,
.actions {
  gap: 10px;
}

.filter-row {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 12px;
}

.compact-form-page {
  gap: 12px;
}

.compact-form-page .section-card {
  padding: 14px 16px;
}

.compact-form-page .form-grid,
.form-grid {
  gap: 12px 14px;
}

.compact-form-page .form-group,
.form-group {
  gap: 6px;
}

.compact-form-page .form-label,
.form-label {
  font-size: 12px;
}

.input,
.select,
.textarea,
.button {
  border-radius: 10px;
}

.input,
.select,
.textarea {
  min-height: 38px;
  padding: 9px 11px;
  font-size: 13px;
}

.searchable-select-panel {
  top: calc(100% + 5px);
  border-radius: 10px;
}

.searchable-select-list {
  padding: 5px;
}

.searchable-select-option,
.searchable-select-empty {
  padding: 8px 9px;
  font-size: 13px;
}

.input:focus,
.select:focus,
.textarea:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.textarea {
  min-height: 84px;
}

.button {
  gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.button-icon {
  width: 14px;
  height: 14px;
}

.button.primary,
.button.success,
.button.warning,
.button.danger {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.button.light {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.button.link {
  min-height: auto;
  padding-left: 0;
  padding-right: 0;
  box-shadow: none;
}

.table-wrap {
  border-radius: 12px;
}

.table {
  min-width: 840px;
}

.table th,
.table td {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
  vertical-align: middle;
}

.table .button,
.inline-form .button,
.actions .button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.table .input,
.table .select,
.inline-form .input,
.inline-form .select {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.badge {
  padding: 2px 8px;
  font-size: 11px;
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.detail-grid {
  gap: 10px 14px;
}

.detail-item strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.tab-strip {
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
}

.inline-form {
  gap: 6px;
}

.divider {
  margin: 14px 0;
}

.mobile-shell {
  padding-bottom: 72px;
}

.mobile-topbar {
  padding: 10px 12px;
}

.mobile-topbar-inner {
  gap: 10px;
}

.mobile-topbar-actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 8px;
}

.mobile-topbar-actions form {
  margin: 0;
}

.mobile-topbar-actions .button {
  width: 100%;
}

.mobile-title {
  font-size: 17px;
}

.mobile-content {
  padding: 12px;
  gap: 10px;
}

.mobile-nav {
  gap: 3px;
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
}

.mobile-nav a {
  padding: 6px 1px;
  font-size: 10.5px;
}

.mobile-nav-icon {
  width: 13px;
  height: 13px;
}

.mobile-card {
  padding: 12px;
}

.mobile-item-title {
  margin-bottom: 4px;
}

.mobile-meta {
  font-size: 12px;
  line-height: 1.45;
}

.login-page {
  min-height: 640px;
}

.login-frame {
  width: min(840px, 100%);
  border-radius: 20px;
}

.login-showcase {
  padding: 14px 0 14px 14px;
}

.login-showcase-media {
  min-height: 420px;
  border-radius: 16px 0 0 16px;
}

.login-card {
  min-height: 420px;
  padding: 30px 28px 26px;
  border-radius: 0 20px 20px 0;
}

.login-title {
  margin-bottom: 6px;
  font-size: 26px;
}

.login-subtitle {
  margin-bottom: 18px;
  font-size: 13px;
}

.login-form {
  gap: 12px;
}

.login-card .form-label {
  font-size: 12px;
}

.login-card .input {
  min-height: 44px;
  border-radius: 10px;
}

.login-card .button.primary {
  min-height: 46px;
  font-size: 16px;
  border-radius: 10px;
}

.captcha-row {
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.captcha-image-button,
.captcha-image-button img {
  width: 118px;
  height: 40px;
}

.captcha-image-button {
  border-radius: 10px;
}

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

@media (max-width: 1100px) {
  .stats-grid,
  .dashboard-alert-grid,
  .chart-grid,
  .ranking-grid,
  .form-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .donut-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .guest-body {
    align-items: flex-start;
    padding: 16px;
  }

  .login-page {
    min-height: auto;
  }

  .login-frame {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .login-showcase {
    padding: 16px 16px 0;
  }

  .login-showcase-media {
    min-height: 210px;
    border-radius: 20px 20px 0 0;
  }

  .login-card {
    min-height: auto;
    border-radius: 0 0 24px 24px;
    padding: 30px 22px 24px;
  }

  .login-page-mobile {
    padding-top: 10px;
  }

  .login-page-mobile .login-showcase {
    padding: 10px 10px 0;
  }

  .login-page-mobile .login-showcase-media {
    min-height: 128px;
    border-radius: 16px 16px 0 0;
  }

  .login-page-mobile .login-card {
    padding: 18px 16px 18px;
    border-radius: 0 0 18px 18px;
  }
}

@media (max-width: 640px) {
  .stats-grid,
  .chart-grid,
  .ranking-grid,
  .form-grid,
  .detail-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

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

  .mobile-stats-grid-4 {
    grid-template-columns: 1fr;
  }

  .donut-chart {
    width: 164px;
    height: 164px;
  }

  .trend-svg {
    height: 200px;
  }

  .dashboard-briefing {
    padding: 18px;
  }

  .span-2,
  .span-4 {
    grid-column: auto;
  }

  .topbar {
    display: grid;
    gap: 10px;
  }

  .guest-body:has(.login-page-mobile) {
    padding: 10px 10px 18px;
  }

  .login-page-mobile {
    padding-top: 0;
    width: 100%;
  }

  .login-page-mobile .login-frame {
    border-radius: 16px;
  }

  .login-page-mobile .login-card {
    padding: 16px 14px 16px;
  }

  .login-page-mobile .login-title {
    font-size: 22px;
  }

  .login-page-mobile .login-card .form-label {
    font-size: 11px;
  }

  .login-page-mobile .captcha-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .login-page-mobile .captcha-image-button,
  .login-page-mobile .captcha-image-button img {
    width: 104px;
    height: 38px;
  }
}
