@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

/* ============================================================
   活码云 Design System
   Vibrant & Block-based · Brand blue + Creator purple + Pink CTA
   ============================================================ */

:root {
  --primary: #2563EB;
  --primary-2: #4F46E5;
  --primary-deep: #1D4ED8;
  --secondary: #7C3AED;
  --accent: #EC4899;
  --success: #15803D;
  --success-bg: #ECFDF5;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --warn: #B45309;
  --warn-bg: #FFFBEB;
  --bg: #FFFFFF;
  --bg-soft: #F7FAFF;
  --muted: #F1F5FD;
  --border: #E4ECFC;
  --fg: #0F172A;
  --muted-fg: #475569;
  --faint-fg: #5B6B80;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(37, 99, 235, .06);
  --shadow-md: 0 8px 30px rgba(37, 99, 235, .12);
  --shadow-lg: 0 24px 60px rgba(37, 99, 235, .16);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --font-sans: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --sidebar-w: 252px;
}

* { box-sizing: border-box; }

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

[id] { scroll-margin-top: 84px; }

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

img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }
button { font-family: inherit; }
::selection { background: rgba(37, 99, 235, .18); }

:focus-visible {
  outline: 3px solid var(--primary-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 400;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--fg);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: top .18s var(--ease);
}
.skip-link:focus-visible { top: 12px; color: #fff; }
main:focus { outline: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--muted-fg); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
    background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
  user-select: none;
}

.btn svg { flex: none; }
.btn:active { transform: translateY(0) scale(.985); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}
.btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(37, 99, 235, .34); }

.btn--accent {
  color: #fff;
  background: linear-gradient(135deg, #DB2777, var(--secondary));
  box-shadow: 0 6px 18px rgba(219, 39, 119, .26);
}
.btn--accent:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(236, 72, 153, .34); }

.btn--outline { background: #fff; border-color: var(--border); color: var(--fg); }
.btn--outline:hover { border-color: rgba(37, 99, 235, .45); color: var(--primary); background: #F8FBFF; }

.btn--ghost { background: transparent; color: var(--muted-fg); }
.btn--ghost:hover { background: var(--muted); color: var(--primary); }

.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--danger:hover { background: #FEE2E2; color: #B91C1C; }

.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* ---------------- 徽标 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--info { background: #EFF6FF; color: var(--primary); }
.badge--muted { background: var(--muted); color: var(--muted-fg); }
.badge--plain::before { display: none; }

.https-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
}
.https-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.https-tag--on { background: #ECFDF5; color: #15803D; border-color: #BBF7D0; }
.https-tag--pending { background: #EFF6FF; color: #1D4ED8; border-color: #DBEAFE; }
.https-tag--fail { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.https-tag--off { background: var(--muted); color: #5B6B80; border-color: var(--border); }

/* ---------------- 提示 ---------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  margin-bottom: 18px;
}
.alert svg { flex: none; margin-top: 1px; }
.alert--success { background: var(--success-bg); border-color: #BBF7D0; color: #166534; }
.alert--error { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.alert--info { background: #EFF6FF; border-color: #DBEAFE; color: #1E40AF; }
.alert--warn { background: var(--warn-bg); border-color: #FDE68A; color: #92400E; }

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 18px; }
.field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.field .optional { font-weight: 400; color: var(--faint-fg); font-size: 12px; }

.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input, .select { height: 46px; padding: 0 14px; }
.textarea { padding: 12px 14px; min-height: 88px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #64748B; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.input:disabled, .select:disabled { background: var(--muted); color: var(--muted-fg); }
.input.is-error, .textarea.is-error { border-color: var(--danger); }
.input.is-error:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.hint { margin-top: 6px; font-size: 12.5px; color: var(--muted-fg); }
.error-text { margin-top: 6px; font-size: 12.5px; color: var(--danger); display: flex; align-items: center; gap: 5px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted-fg);
}
.check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* ---------------- 卡片 ---------------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: 24px; }
.card--hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D3E2FB; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-head .row { gap: 8px; }

/* ---------------- 表格 ---------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 16px;
  background: #F8FAFF;
  color: var(--muted-fg);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid #F0F4FD;
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { background: #FAFCFF; }
.table .cell-strong { font-weight: 600; }
.table .cell-sub { display: block; font-size: 12px; color: var(--muted-fg); margin-top: 2px; }
.table .actions { display: flex; align-items: center; gap: 6px; }
.table .actions form { display: inline; }
.table--compact th, .table--compact td { padding: 10px 10px; }
.table--compact .inline-form .input { width: 76px; height: 32px; font-size: 12.5px; }
.table--compact .inline-form .input::-webkit-outer-spin-button,
.table--compact .inline-form .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.table--compact .inline-form .input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.table--compact .inline-form .btn { height: 30px; padding: 0 10px; }
.table--compact .actions .btn { height: 32px; }

/* ---------------- 公开站点导航 / 页脚 ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(228, 236, 252, .9);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand:hover { color: var(--fg); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}
.brand-mark svg { width: 21px; height: 21px; }

.site-links { display: flex; align-items: center; gap: 30px; }
.site-links a { color: var(--muted-fg); font-size: 14.5px; font-weight: 500; transition: color .2s; }
.site-links a:hover { color: var(--primary); }
.site-nav .nav-actions { display: flex; align-items: center; gap: 10px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: #FBFDFF;
}
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { color: var(--muted-fg); font-size: 13px; }
.footer-links { display: flex; gap: 20px; font-size: 13px; }

/* ---------------- 落地页 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(124, 58, 237, .12), transparent 60%),
    radial-gradient(720px 420px at 6% 8%, rgba(37, 99, 235, .12), transparent 60%),
    radial-gradient(600px 360px at 55% 105%, rgba(236, 72, 153, .08), transparent 60%);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 5.4vw, 4.1rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.035em;
}
.gradient-text {
  background: linear-gradient(115deg, var(--primary) 5%, var(--secondary) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { font-size: 17.5px; color: var(--muted-fg); max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--faint-fg); display: flex; align-items: center; gap: 6px; }

.hero-stats { display: flex; gap: 40px; margin-top: 42px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-family: var(--font-mono); }
.hero-stat span { font-size: 13px; color: var(--muted-fg); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-visual::before, .hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  z-index: 0;
}
.hero-visual::before {
  width: 300px; height: 300px; left: 6%; top: 2%;
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, .30), rgba(37, 99, 235, 0) 68%);
}
.hero-visual::after {
  width: 260px; height: 260px; right: 2%; bottom: 2%;
  background: radial-gradient(circle at 70% 70%, rgba(236, 72, 153, .28), rgba(236, 72, 153, 0) 68%);
}

.qr-stage {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.qr-stage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.qr-stage-head .name { font-weight: 700; font-size: 15px; }
.qr-canvas-box {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #F5F9FF, #FBF7FF);
  border: 1px dashed #D8E4FB;
  min-height: 232px;
}
.qr-canvas-box canvas, .qr-canvas-box img { display: block; border-radius: 8px; }
.qr-stage-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12.5px; color: var(--muted-fg); }
.qr-stage-foot .slug { font-family: var(--font-mono); color: var(--primary); font-weight: 600; }

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  animation: float 5.5s ease-in-out infinite;
}
.float-chip .ico {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.float-chip.chip-a { top: 8%; right: -4%; }
.float-chip.chip-b { bottom: 10%; left: -6%; animation-delay: -2.6s; }
.float-chip small { display: block; font-size: 11px; font-weight: 500; color: var(--muted-fg); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.03em; }
.section-head p { margin-top: 12px; color: var(--muted-fg); font-size: 15.5px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 26px; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
  margin-bottom: 16px;
}
.feature-card:nth-child(2n) .feature-icon { color: var(--secondary); }
.feature-card:nth-child(3n) .feature-icon { color: var(--accent); background: linear-gradient(135deg, rgba(236, 72, 153, .12), rgba(124, 58, 237, .1)); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--muted-fg); font-size: 14px; line-height: 1.65; }

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step-card { padding: 28px; position: relative; }
.step-num {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .25);
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--muted-fg); font-size: 14px; }

.band {
  border-radius: 26px;
  padding: 40px 44px;
  color: #fff;
  background:
    radial-gradient(600px 240px at 90% 0%, rgba(236, 72, 153, .35), transparent 60%),
    linear-gradient(130deg, #1E3A8A, #2563EB 45%, #6D28D9);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  box-shadow: var(--shadow-lg);
}
.band .item strong { display: block; font-size: 34px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -.02em; }
.band .item span { font-size: 14px; opacity: .82; }

.cta-section { padding: 72px 0; }
.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 64px 32px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(560px 280px at 12% 15%, rgba(236, 72, 153, .35), transparent 60%),
    radial-gradient(620px 300px at 88% 90%, rgba(37, 99, 235, .55), transparent 60%),
    linear-gradient(125deg, #111C44, #2A1B63);
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; letter-spacing: -.03em; }
.cta-card p { color: rgba(255, 255, 255, .78); max-width: 520px; margin: 0 auto 26px; }
.cta-card .hero-actions { justify-content: center; }
.cta-card .btn--outline { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #fff; }
.cta-card .btn--outline:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .6); }

/* ---------------- 认证页 ---------------- */

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(700px 400px at 15% 10%, rgba(236, 72, 153, .34), transparent 62%),
    radial-gradient(700px 420px at 90% 95%, rgba(79, 70, 229, .55), transparent 62%),
    linear-gradient(150deg, #14235B 0%, #1E3A8A 45%, #4C1D95 100%);
}
.auth-brand .brand { color: #fff; }
.auth-brand .brand:hover { color: #fff; }
.auth-brand .brand-mark { background: rgba(255, 255, 255, .14); box-shadow: none; border: 1px solid rgba(255, 255, 255, .22); }
.auth-brand h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.18; letter-spacing: -.03em; max-width: 460px; }
.auth-brand .lead { margin-top: 16px; color: rgba(255, 255, 255, .74); max-width: 440px; font-size: 15.5px; }
.auth-points { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 15px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255, 255, 255, .9); }
.auth-points .tick {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
}
.auth-brand .foot { font-size: 12.5px; color: rgba(255, 255, 255, .68); }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 404px; }
.auth-box .mobile-brand { display: none; margin-bottom: 32px; }
.auth-box h1 { font-size: 27px; letter-spacing: -.03em; }
.auth-box .sub { margin-top: 8px; color: var(--muted-fg); font-size: 14.5px; }
.auth-form { margin-top: 28px; }
.auth-form .btn { margin-top: 6px; }
.auth-switch { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted-fg); }
.auth-legal { margin-top: 26px; font-size: 12px; color: var(--faint-fg); text-align: center; }

/* ---------------- 应用外壳 ---------------- */

.app { display: flex; min-height: 100vh; background: var(--bg-soft); }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 16px 18px;
  background: #fff;
  border-right: 1px solid var(--border);
  z-index: 60;
  overflow-y: auto;
}
.sidebar .brand { padding: 0 8px; margin-bottom: 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-group-label {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint-fg);
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--muted-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav-link svg { flex: none; opacity: .85; }
.nav-link:hover { background: var(--muted); color: var(--primary); }
.nav-link.active {
  color: var(--primary);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(37, 99, 235, .11), rgba(124, 58, 237, .09));
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.nav-link .nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--primary); background: #EFF6FF; border-radius: 999px; padding: 1px 8px; }

.sidebar-user {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  flex: none;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-family: var(--font-mono);
}
.sidebar-user .meta { min-width: 0; flex: 1; }
.sidebar-user .meta strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.sidebar-user .meta span { display: block; font-size: 11.5px; color: var(--muted-fg); }
.sidebar-user form { display: flex; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h1, .topbar-title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .right { display: flex; align-items: center; gap: 8px; }

.menu-btn { display: none; }

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; letter-spacing: -.03em; }
.page-head .sub { margin-top: 6px; color: var(--muted-fg); font-size: 14px; }
.page-head .actions { display: flex; gap: 10px; }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 55;
  backdrop-filter: blur(2px);
}

/* ---------------- 数据卡片 ---------------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-grid--2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
.stat-card { padding: 20px; }
.stat-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .1));
}
.stat-card:nth-child(2) .stat-icon { color: var(--secondary); }
.stat-card:nth-child(3) .stat-icon { color: var(--accent); background: linear-gradient(135deg, rgba(236, 72, 153, .12), rgba(124, 58, 237, .1)); }
.stat-card:nth-child(4) .stat-icon { color: var(--success); background: linear-gradient(135deg, rgba(22, 163, 74, .12), rgba(37, 99, 235, .08)); }
.stat-label { font-size: 13px; color: var(--muted-fg); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; font-family: var(--font-mono); }
.stat-foot { margin-top: 6px; font-size: 12px; color: var(--faint-fg); }

.chart-card { padding: 22px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-head h3 { font-size: 15.5px; font-weight: 700; }
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: #0F172A;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 5;
}
.chart-tip.show { opacity: 1; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(10px);
  background: #0F172A;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 更新记录时间线 ---------------- */

.changelog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 26px;
  align-items: start;
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), rgba(124, 58, 237, .35), transparent);
}
.timeline-item { position: relative; margin-bottom: 24px; scroll-margin-top: 90px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.timeline-item.is-current::before { background: var(--primary); }
.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.version-tag { font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.version-tag::before { content: "v"; color: var(--faint-fg); font-weight: 500; margin-right: 1px; }
.timeline-date { font-family: var(--font-mono); font-size: 12px; color: var(--faint-fg); }
.timeline-card { padding: 20px 22px; }

.change-group + .change-group { margin-top: 16px; }
.change-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 7px;
}
.change-type--new { background: #ECFDF5; color: #15803D; }
.change-type--change { background: #EFF6FF; color: #1D4ED8; }
.change-type--fix { background: #FFFBEB; color: #B45309; }
.change-type--security { background: #FEF2F2; color: #B91C1C; }
.change-type--database { background: #F5F3FF; color: #6D28D9; }
.change-type--deps { background: var(--muted); color: var(--muted-fg); }
.change-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted-fg);
}
.change-list li::marker { color: var(--primary); }
.change-list strong { color: var(--fg); font-weight: 600; }
.change-list code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--muted);
  padding: 1px 5px;
  border-radius: 5px;
}
.change-list a { color: var(--primary); }

.changelog-index { position: sticky; top: 88px; padding: 16px; }
.index-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-fg);
}
.changelog-index nav { display: grid; gap: 2px; margin-top: 10px; }
.changelog-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted-fg);
  transition: background-color .15s ease, color .15s ease;
}
.changelog-index a em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint-fg); }
.changelog-index a:hover { background: var(--muted); color: var(--primary); }
.changelog-index a.active { background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(124, 58, 237, .08)); color: var(--primary); font-weight: 600; }

.modal {
  border: 0;
  padding: 0;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 20px;
  background: #fff;
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .22s var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; letter-spacing: -.01em; }
.modal-body { padding: 20px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal--wide { width: min(920px, calc(100vw - 32px)); }

.log-modal-body { padding: 0; max-height: 72vh; overflow-y: auto; }
.log-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.log-chip-count { font-size: 11px; opacity: .75; margin-left: 2px; }
.log-list--modal .log-row { padding: 13px 22px; grid-template-columns: 96px minmax(0, 1fr); }
.log-list--modal .log-time { width: auto; }
.log-row--bot { background: #FFF9F9; }
.log-geo { font-size: 12px; color: var(--muted-fg); }
.log-sub--modal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; white-space: normal; }
.log-sub--modal .log-device { white-space: normal; }
.log-ref { font-size: 12px; color: var(--faint-fg); }
.log-modal-body .log-pager { padding: 8px 22px 18px; }
.log-modal-body .empty { padding: 48px 24px; }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted-fg); }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: inline-block; margin-right: 5px; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > *, .grid-2-even > *, .detail-layout > * { min-width: 0; }

/* ---------------- 活码卡片 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted-fg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: rgba(37, 99, 235, .4); color: var(--primary); }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .24); }

.search-input { position: relative; }
.search-input input { padding-left: 40px; width: 260px; }
.search-input svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint-fg); pointer-events: none; }

.code-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.code-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.code-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.code-card-head .name { font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.code-card-head form { display: flex; }
.code-mini-qr {
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 150px;
}
.code-mini-qr canvas, .code-mini-qr img { display: block; }
.code-target {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--muted);
  color: var(--muted-fg);
  font-size: 12.5px;
  overflow: hidden;
}
.code-target span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted-fg); }
.code-meta strong { color: var(--fg); font-family: var(--font-mono); font-size: 14px; }
.code-actions { display: flex; gap: 6px; padding-top: 12px; border-top: 1px solid #F0F4FD; margin-top: auto; }
.code-actions .btn { flex: 1; }
.code-actions form { display: flex; flex: 1; }
.code-actions form .btn { width: 100%; }

/* ---------------- 详情/统计 ---------------- */

.detail-layout { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.detail-qr { padding: 26px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }

/* 活码数据：二维码 + 趋势图并排 */
.code-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}
.code-hero .detail-qr { height: 100%; }
.code-hero .chart-card { display: flex; flex-direction: column; }
.code-hero .chart-wrap { flex: 1; min-height: 300px; height: auto; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.kv-grid .kv { padding: 11px 0; }
.kv-grid .kv:nth-last-child(-n+2) { border-bottom: 0; }
.detail-qr .qr-canvas-box { width: 100%; }
.detail-qr .name { font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.detail-qr .slug { font-family: var(--font-mono); font-size: 13px; color: var(--primary); word-break: break-all; }
.qr-download-size { display: flex; gap: 8px; width: 100%; }
.qr-download-size .btn { flex: 1; }

.kv-list { display: grid; gap: 0; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted-fg); font-size: 13px; }
.kv .v { font-weight: 600; text-align: right; word-break: break-all; }

/* 扫码记录列表 */
.log-count { font-size: 12px; color: var(--muted-fg); }
.log-list { display: grid; }
.log-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid #F0F4FD;
  align-items: start;
}
.log-row:first-child { border-top: 0; }
.log-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint-fg);
  line-height: 1.35;
}
.log-time strong { font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.log-time span, .log-time strong { white-space: nowrap; }
.log-main { min-width: 0; }
.log-primary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-ip { font-size: 13.5px; font-weight: 600; }
.log-device {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-fg);
  font-size: 11.5px;
  font-weight: 500;
}
.log-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--faint-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-pager { padding: 6px 16px 18px; }
.log-pager .pagination { margin-top: 10px; }

.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form .input { height: 36px; width: 92px; font-size: 13px; }

/* ---------------- 空状态 / 分页 ---------------- */

.empty { padding: 64px 24px; text-align: center; }
.empty .ico {
  width: 64px; height: 64px; border-radius: 20px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(124, 58, 237, .1));
}
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted-fg); font-size: 14px; margin-bottom: 20px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-fg);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.page-btn:hover { border-color: rgba(37, 99, 235, .4); color: var(--primary); }
.page-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }
.page-btn.disabled { opacity: .45; pointer-events: none; }
.page-info { font-size: 12.5px; color: var(--faint-fg); padding: 0 8px; }

/* ---------------- 二维码 / 提示页 ---------------- */

.status-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(700px 420px at 80% -10%, rgba(124, 58, 237, .12), transparent 60%),
  radial-gradient(600px 380px at 10% 110%, rgba(37, 99, 235, .12), transparent 60%),
  var(--bg-soft); }
.status-card { width: 100%; max-width: 430px; padding: 36px 30px; text-align: center; }
.status-icon {
  width: 64px; height: 64px; border-radius: 20px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  color: var(--danger); background: var(--danger-bg);
}
.status-icon.tone-warn { color: var(--warn); background: var(--warn-bg); }
.status-icon.tone-info { color: var(--primary); background: #EFF6FF; }
.status-icon.tone-muted { color: var(--muted-fg); background: var(--muted); }
.status-icon.tone-success { color: var(--success); background: var(--success-bg); }
.status-card h1 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
.status-card p { color: var(--muted-fg); font-size: 14.5px; }
.status-card .actions { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.status-card .scan-form { margin-top: 22px; text-align: left; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .feature-grid, .step-grid { grid-template-columns: repeat(2, 1fr); }
  .code-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .detail-layout { grid-template-columns: 1fr; }
  .detail-layout > .detail-qr { max-width: 420px; margin: 0 auto; }
  .code-hero { grid-template-columns: 1fr; }
  .code-hero .detail-qr { max-width: 460px; width: 100%; margin: 0 auto; }
  .code-hero .chart-wrap { min-height: 240px; }
  .changelog-layout { grid-template-columns: 1fr; }
  .changelog-index { display: none; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 380px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-box .mobile-brand { display: inline-flex; }
  .band { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .site-links { display: none; }
  .grid-2-even { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-102%);
    transition: transform .26s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .overlay.show { display: block; }
  .menu-btn { display: inline-flex; }

  /* 触控目标：移动端统一不小于 44px，并保持 8px 间距 */
  .btn--sm, .chip, .page-btn { min-height: 44px; }
  .btn--icon, .menu-btn { width: 44px; height: 44px; }
  .chip { height: 44px; padding: 0 16px; }
  .nav-link { min-height: 44px; }
  .check { min-height: 44px; }
  .code-actions, .table .actions, .inline-form, .toolbar { gap: 8px; }
  .table--compact .inline-form .input, .inline-form .input { min-height: 40px; }

  .topbar { padding: 0 16px; height: 62px; }
  .page { padding: 18px 16px 32px; }
  .code-grid { grid-template-columns: 1fr; }
  .code-card { padding: 16px; gap: 10px; }
  .code-mini-qr { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .search-input input { width: 100%; }
  .toolbar { align-items: stretch; }
  .search-input { flex: 1; min-width: 180px; }
  .btn--lg { height: 48px; }
  .hero { padding: 46px 0 40px; }
  .section { padding: 52px 0; }
  .float-chip { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 26px; }
  .page-head h1 { font-size: 22px; }
  .topbar-site-link { display: none; }
  .topbar h1, .topbar-title { font-size: 17px; }
  .topbar .right .btn--sm { padding: 0 12px; }
  .table th, .table td { padding: 11px 12px; white-space: nowrap; }
  .table { min-width: 660px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .feature-grid, .step-grid { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; }
  .log-time { flex-direction: row; align-items: center; gap: 6px; }
  .log-time strong { font-size: 12px; }
  .log-sub { white-space: normal; }
  .kv-grid { grid-template-columns: 1fr; }
  .kv-grid .kv:nth-last-child(-n+2) { border-bottom: 1px dashed var(--border); }
  .kv-grid .kv:last-child { border-bottom: 0; }
  .pagination { gap: 6px; }
  .page-info { width: 100%; text-align: center; }
  .modal--wide { width: calc(100vw - 16px); }
  .log-modal-body { max-height: 82vh; overflow-x: hidden; }
  .log-filter-bar { padding: 12px 16px; }
  .log-list--modal .log-row { padding: 12px 16px; grid-template-columns: 1fr; }
  .log-list--modal .log-time { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .log-sub--modal .log-device { max-width: 100%; overflow-wrap: anywhere; }
  .log-modal-body .log-pager { padding: 8px 16px 16px; }
  .timeline { padding-left: 22px; }
  .timeline::before { left: 7px; }
  .timeline-item::before { left: -20px; width: 11px; height: 11px; border-width: 2.5px; }
  .timeline-card { padding: 16px; }
  .version-tag { font-size: 15px; }
  .timeline-date { font-size: 11.5px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 24px; }
  .hero-actions .btn { width: 100%; }
  .auth-main { padding: 32px 18px; }
  .card--pad { padding: 20px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 12.5px; }
}

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