:root {
  --fs-ink: #1a1d24;
  --fs-sub: #6b7380;
  --fs-muted: #9aa3b2;
  --fs-line: rgba(26, 29, 36, 0.08);
  --fs-blue: #2b6ef2;
  --fs-blue-soft: rgba(43, 110, 242, 0.12);
  --fs-glass: rgba(255, 255, 255, 0.72);
  --fs-glass-border: rgba(255, 255, 255, 0.55);
  --fs-ok: #1f8a4c;
  --fs-warn: #b7791f;
  --fs-bad: #c53b3b;
  --fs-radius: 22px;
  --fs-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--fs-ink);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  background: #eef2f7;
}

body {
  position: relative;
  padding: 36px 18px 48px;
  overflow-x: hidden;
}

.fs-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(90, 156, 255, 0.28), transparent 58%),
    radial-gradient(720px 480px at 96% 4%, rgba(120, 196, 190, 0.18), transparent 52%),
    radial-gradient(640px 420px at 50% 110%, rgba(43, 110, 242, 0.08), transparent 55%),
    linear-gradient(180deg, #f5f7fb 0%, #e9eef5 100%);
}

.fs-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.fs-page.is-enter .fs-hero,
.fs-page.is-enter .fs-banner,
.fs-page.is-enter .fs-glass {
  animation: fs-rise 0.55s var(--fs-ease) both;
}
.fs-page.is-enter .fs-banner { animation-delay: 0.06s; }
.fs-page.is-enter .fs-glass { animation-delay: 0.12s; }

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

/* —— Hero —— */
.fs-hero {
  text-align: center;
  margin-bottom: 20px;
}

.fs-logo-wrap {
  display: inline-flex;
  padding: 3px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.35));
  box-shadow: 0 14px 36px rgba(43, 110, 242, 0.14);
}

.fs-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  background: #fff;
}

.fs-title {
  margin: 16px 0 0;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.fs-tagline {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--fs-sub);
  letter-spacing: 0.02em;
}

.fs-meta {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--fs-sub);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.fs-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--fs-muted);
}

/* —— 公告：细状态条 —— */
.fs-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fs-banner-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--fs-blue);
  box-shadow: 0 0 0 3px var(--fs-blue-soft);
}

.fs-banner-body { min-width: 0; flex: 1; }
.fs-banner-body p {
  margin: 0 0 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #4a5568;
}
.fs-banner-body p:last-child { margin-bottom: 0; }

/* —— 毛玻璃操作区 —— */
.fs-glass {
  padding: 16px;
  border-radius: var(--fs-radius);
  background: var(--fs-glass);
  border: 1px solid var(--fs-glass-border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 40px rgba(30, 50, 90, 0.08);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.fs-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(26, 29, 36, 0.05);
}

.fs-tabs:has(.fs-tab:only-child) {
  grid-template-columns: 1fr;
}

.fs-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  transition: transform 0.28s var(--fs-ease), width 0.28s var(--fs-ease);
  z-index: 0;
}

.fs-tabs:has(.fs-tab:only-child) .fs-tab-indicator {
  width: calc(100% - 8px);
}

.fs-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  height: 38px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 650;
  color: var(--fs-sub);
  transition: color 0.2s ease;
  cursor: pointer;
}

.fs-tab.is-active { color: var(--fs-ink); }

.fs-panel { display: none; }
.fs-panel.is-active {
  display: block;
  animation: fs-panel 0.28s var(--fs-ease);
}
.fs-panel[hidden] { display: none !important; }

@keyframes fs-panel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.fs-label {
  display: block;
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: #3a4150;
}
.fs-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.fs-label-row .fs-label { margin: 0; }

.fs-link {
  color: var(--fs-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.fs-link:active { opacity: 0.7; }

.fs-input,
.fs-file {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--fs-line);
  padding: 0 14px;
  font-size: 15px;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fs-input:focus,
.fs-file:focus {
  border-color: rgba(43, 110, 242, 0.45);
  box-shadow: 0 0 0 4px var(--fs-blue-soft);
  background: #fff;
}

.fs-input-readonly {
  color: var(--fs-muted);
  background: rgba(246, 248, 252, 0.9);
}

.fs-file {
  padding-top: 11px;
  height: auto;
  min-height: 48px;
  background: #fff;
}

.fs-hint {
  margin: 8px 0 0;
  color: var(--fs-muted);
  font-size: 12px;
  line-height: 1.4;
}

.fs-status {
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fs-sub);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(43, 110, 242, 0.06);
}

.fs-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fs-blue);
}
.fs-status-dot[data-state="正常"] { background: var(--fs-ok); }
.fs-status-dot[data-state="掉签"],
.fs-status-dot[data-state="已到期"] { background: var(--fs-bad); }
.fs-status-dot[data-state="未激活"] { background: var(--fs-warn); }

.fs-btn {
  margin-top: 18px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #3b7cff 0%, var(--fs-blue) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(43, 110, 242, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}
.fs-btn:active {
  transform: scale(0.985);
  box-shadow: 0 6px 16px rgba(43, 110, 242, 0.22);
}
.fs-btn:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
}
.fs-btn-icon { display: inline-flex; }

.fs-btn-secondary {
  margin-top: 10px;
  background: #fff;
  color: var(--fs-blue);
  border: 1px solid rgba(43, 110, 242, 0.28);
  box-shadow: none;
  font-weight: 650;
}
.fs-btn-secondary:active {
  box-shadow: none;
  filter: brightness(0.98);
}

.fs-cert-pick-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 22, 34, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}
.fs-cert-pick-mask[hidden] { display: none !important; }
.fs-cert-pick {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 18px 16px 14px;
  box-shadow: 0 18px 40px rgba(16, 22, 34, 0.22);
}
.fs-cert-pick p {
  margin: 0 0 12px;
  color: var(--fs-sub);
  font-size: 14px;
  line-height: 1.5;
}
.fs-cert-pick-btn {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--fs-line);
  background: #f7f9fc;
  cursor: pointer;
}
.fs-cert-pick-btn strong {
  display: block;
  color: var(--fs-ink);
  font-size: 15px;
}
.fs-cert-pick-btn span {
  display: block;
  margin-top: 4px;
  color: var(--fs-muted);
  font-size: 12px;
}
.fs-cert-pick-cancel {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--fs-sub);
  font-size: 15px;
  cursor: pointer;
}

.fs-foot-hint {
  margin: 12px 0 0;
  text-align: center;
  color: var(--fs-muted);
  font-size: 12px;
}

.fs-msg {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(197, 59, 59, 0.08);
  color: var(--fs-bad);
  font-size: 13px;
  animation: fs-panel 0.25s var(--fs-ease);
}
.fs-msg.is-ok {
  background: rgba(31, 138, 76, 0.1);
  color: var(--fs-ok);
}

.fs-footer {
  margin-top: 28px;
  text-align: center;
}
.fs-footer a {
  color: var(--fs-sub);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.fs-footer a:active {
  background: rgba(255, 255, 255, 0.5);
  color: var(--fs-ink);
}

/* —— Loading：细环 —— */
.fs-loading {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 28, 40, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fs-loading[hidden] { display: none !important; }

.fs-loading-box {
  min-width: 148px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 48px rgba(16, 24, 40, 0.16);
}

.fs-ring {
  width: 30px;
  height: 30px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2px solid rgba(43, 110, 242, 0.18);
  border-top-color: var(--fs-blue);
  animation: fs-spin 0.7s linear infinite;
}

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

.fs-loading-box p {
  margin: 0;
  font-size: 13px;
  color: var(--fs-sub);
  font-weight: 550;
}

@media (prefers-reduced-motion: reduce) {
  .fs-page.is-enter .fs-hero,
  .fs-page.is-enter .fs-banner,
  .fs-page.is-enter .fs-glass,
  .fs-panel.is-active,
  .fs-msg,
  .fs-tab-indicator,
  .fs-ring {
    animation: none !important;
    transition: none !important;
  }
}
