/* 阔种云开放平台 — 与官网一致的视觉体系 */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --ink: #0f172a;
  --text: #475569;
  --muted: #64748b;
  --soft: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f8fafc;
  --white: #fff;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08));
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .05);
  --shadow: 0 14px 40px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
.section-head h2 { font-size: 34px; line-height: 1.25; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9px; padding: 11px 22px;
  font-size: 14px; font-weight: 700; line-height: 1.2; transition: all .22s ease;
  background: var(--white); color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(37, 99, 235, .22); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(37, 99, 235, .3); }
.btn-outline { color: var(--blue); border-color: rgba(37, 99, 235, .45); background: transparent; }
.btn-outline:hover { background: rgba(37, 99, 235, .06); }
.btn-ghost { color: var(--text); background: #f1f5f9; }
.btn-ghost:hover { background: #e8eef6; }
.btn-danger { color: var(--red); background: rgba(220, 38, 38, .07); border-color: rgba(220, 38, 38, .22); }
.btn-danger:hover { background: rgba(220, 38, 38, .12); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }

/* Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6;
  background: #f1f5f9; color: var(--muted); white-space: nowrap;
}
.badge-blue { background: rgba(37, 99, 235, .1); color: var(--blue); }
.badge-purple { background: rgba(124, 58, 237, .1); color: var(--purple); }
.badge-green { background: rgba(5, 150, 105, .1); color: var(--green); }
.badge-amber { background: rgba(217, 119, 6, .12); color: var(--amber); }
.badge-red { background: rgba(220, 38, 38, .1); color: var(--red); }
.badge-dark { background: var(--ink); color: #fff; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: 72px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, .8); transition: all .3s ease;
}
.site-header .header-inner { height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 42px; width: auto; transition: filter .3s; }
.brand .brand-logo-light { display: none; }
.brand-sub { font-size: 20px; font-weight: 700; color: var(--blue); letter-spacing: .1em; padding-left: 10px; border-left: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; transition: all .2s; }
.nav a:hover { color: var(--blue); background: rgba(37, 99, 235, .06); }
.nav a.active { color: var(--blue); }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-right .btn { padding: 8px 16px; font-size: 13px; }
.header-console.active { background: rgba(37, 99, 235, .08); }
.site-header.transparent:not(.scrolled) .header-console { color: #fff; border-color: rgba(255, 255, 255, .45); }
.site-header.transparent:not(.scrolled) .header-console:hover { background: rgba(255, 255, 255, .1); }
.site-header.transparent:not(.scrolled) .header-console.active { color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .12); }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border-radius: 999px; background: #f1f5f9; font-size: 13px; font-weight: 600; color: var(--ink);
  max-width: 190px;
}
.user-chip .avatar {
  position: relative; overflow: hidden;
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.user-chip .avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #f1f5f9;
}
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: relative; }
.user-menu .dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 170px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s;
}
.user-menu:hover .dropdown, .user-menu:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.user-menu .dropdown a, .user-menu .dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
  border-radius: 7px; font-size: 13px; color: var(--text);
}
.user-menu .dropdown a:hover, .user-menu .dropdown button:hover { background: #f8fafc; color: var(--blue); }
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: #f1f5f9; border-radius: 9px; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); border-radius: 2px; }

.site-header.transparent { background: transparent; border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; }
.site-header.transparent:not(.scrolled) .brand-logo-light { display: block; filter: none; }
.site-header.transparent:not(.scrolled) .brand-logo-dark { display: none; }
.site-header.transparent:not(.scrolled) .brand-sub { color: rgba(255, 255, 255, .8); border-left-color: rgba(255, 255, 255, .3); }
.site-header.transparent:not(.scrolled) .nav a { color: rgba(255, 255, 255, .82); }
.site-header.transparent:not(.scrolled) .nav a:hover,
.site-header.transparent:not(.scrolled) .nav a.active { color: #fff; background: rgba(255, 255, 255, .12); }
.site-header.transparent:not(.scrolled) .user-chip { background: rgba(255, 255, 255, .15); color: #fff; }
.site-header.scrolled { background: rgba(255, 255, 255, .96); box-shadow: 0 6px 24px rgba(15, 23, 42, .07); }
.site-header.transparent.scrolled .brand img { filter: none; }
.site-header.transparent.scrolled .brand-sub { color: var(--blue); border-left-color: var(--line); }
.site-header.transparent.scrolled .nav a { color: var(--text); }
.site-header.transparent.scrolled .nav a:hover,
.site-header.transparent.scrolled .nav a.active { color: var(--blue); background: rgba(37, 99, 235, .06); }
.site-header.transparent.scrolled .user-chip { background: #f1f5f9; color: var(--ink); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; z-index: 99; top: 72px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 10px 24px 18px;
}
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 11px 4px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:last-child { border-bottom: 0; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 158px 0 150px;
  background: radial-gradient(1200px 600px at 78% 12%, rgba(124, 58, 237, .55), transparent 60%),
              radial-gradient(900px 500px at 8% 82%, rgba(8, 145, 178, .35), transparent 55%),
              linear-gradient(135deg, #0b1f4b 0%, #1433a3 45%, #5b21b6 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .22;
  background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.hero::after {
  content: ""; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .35), transparent 65%);
  filter: blur(10px);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .92); margin-bottom: 24px;
}
.hero-badge .dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
.hero h1 { font-size: 52px; line-height: 1.14; font-weight: 800; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, #93c5fd, #e9d5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin-top: 22px; max-width: 590px; font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, .78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-actions .btn { padding: 13px 26px; border-radius: 10px; }
.hero-actions .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero-actions .btn-outline:hover { background: rgba(255, 255, 255, .1); }
.hero-points { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; font-size: 13px; color: rgba(255, 255, 255, .68); }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg { color: #86efac; }

.hero-panel { position: relative; }
.code-window {
  background: rgba(9, 16, 38, .72); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden;
  backdrop-filter: blur(12px);
}
.code-window-head { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.code-window-head i { width: 9px; height: 9px; border-radius: 50%; background: #fb7185; }
.code-window-head i:nth-child(2) { background: #fbbf24; }
.code-window-head i:nth-child(3) { background: #34d399; }
.code-window-head span { margin-left: 8px; font-size: 12px; color: rgba(255, 255, 255, .45); font-family: var(--mono); }
.code-window pre { margin: 0; padding: 22px 22px 26px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.85; color: #cbd5e1; }
.code-window .c-key { color: #93c5fd; }
.code-window .c-str { color: #86efac; }
.code-window .c-cmd { color: #f0abfc; }
.code-window .c-dim { color: #64748b; }
.hero-float {
  position: absolute; right: -18px; bottom: -26px; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22); animation: float 6s ease-in-out infinite;
}
.hero-float .tick { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(5, 150, 105, .12); color: var(--green); }
.hero-float strong { display: block; font-size: 13px; }
.hero-float span { font-size: 11px; color: var(--muted); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Stats */
.stats-wrap { position: relative; z-index: 2; margin-top: -62px; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.stat { background: #fff; padding: 28px 26px; }
.stat-value { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.stat-value small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.stat-label { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* Cards / grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 28px; }
.card-hover { transition: all .25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(37, 99, 235, .25); }
.card h3 { font-size: 18px; color: var(--ink); font-weight: 750; }
.card h4 { font-size: 15px; color: var(--ink); font-weight: 700; }

.cap-card { padding: 26px; position: relative; overflow: hidden; }
.cap-card::after {
  content: ""; position: absolute; right: -42px; top: -42px; width: 120px; height: 120px; border-radius: 50%;
  background: var(--grad-soft); opacity: .8;
}
.cap-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; background: var(--grad); box-shadow: 0 8px 18px rgba(37, 99, 235, .22); margin-bottom: 18px;
  position: relative; z-index: 1;
}
.cap-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 8px 18px rgba(124, 58, 237, .22); }
.cap-icon.cyan { background: linear-gradient(135deg, #0891b2, #06b6d4); box-shadow: 0 8px 18px rgba(8, 145, 178, .22); }
.cap-icon.amber { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 8px 18px rgba(217, 119, 6, .22); }
.cap-icon.green { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 8px 18px rgba(5, 150, 105, .22); }
.cap-card p { margin-top: 9px; font-size: 14px; color: var(--muted); min-height: 44px; }
.cap-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--soft); }
.cap-meta strong { color: var(--blue); font-size: 13px; }

.scope-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.scope-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scope-code { font-family: var(--mono); font-size: 12px; color: var(--purple); background: rgba(124, 58, 237, .08); padding: 2px 8px; border-radius: 5px; }
.scope-card h3 { font-size: 16px; margin-top: 5px; }
.scope-card p { font-size: 13px; color: var(--muted); flex: 1; }
.scope-api-preview { display: flex; flex-direction: column; gap: 6px; }
.scope-api-preview span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 5px; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line-soft); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 24px 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad-soft); color: var(--blue); font-size: 13px; font-weight: 800; margin-bottom: 14px;
}
.step h4 { font-size: 15px; color: var(--ink); margin-bottom: 7px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 40px; right: -18px; width: 18px; height: 1px; background: var(--line);
}

/* CTA */
.cta-band {
  position: relative; overflow: hidden; border-radius: 22px; padding: 54px 56px; color: #fff;
  background: radial-gradient(700px 280px at 88% 12%, rgba(168, 85, 247, .5), transparent 65%), linear-gradient(120deg, #12308f, #4c1d95);
}
.cta-band::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); }
.cta-band h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.cta-band p { margin-top: 12px; color: rgba(255, 255, 255, .72); max-width: 620px; }
.cta-band .btn { position: relative; z-index: 1; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; z-index: 1; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: #f4f7fc; padding: 62px 0 0; margin-top: 0; }
.footer-promises { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid #e3e9f2; flex-wrap: wrap; }
.footer-promise { display: flex; align-items: flex-start; gap: 13px; }
.footer-promise img { width: 44px; height: 44px; flex-shrink: 0; }
.footer-promise strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.footer-promise span { font-size: 12px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.55fr 1fr 1fr 1fr 1.35fr; gap: 36px; padding: 38px 0 42px; }
.footer-logo img { height: 62px; width: auto; margin-bottom: 14px; }
.footer-grid p { font-size: 13px; color: var(--muted); line-height: 1.8; max-width: 270px; }
.footer-grid h4 { font-size: 14px; font-weight: 750; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 9px; }
.footer-grid ul a, .footer-grid ul li { font-size: 13px; color: var(--muted); }
.footer-grid ul a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid #e3e9f2; padding: 18px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--soft); }
.footer-bottom a:hover { color: var(--blue); }

/* Page hero (subpages) */
.page-hero {
  padding: 138px 0 62px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(800px 360px at 82% 8%, rgba(124, 58, 237, .5), transparent 62%), linear-gradient(120deg, #0d2457, #3b1a86);
}
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.page-hero p { margin-top: 12px; max-width: 720px; font-size: 15px; color: rgba(255, 255, 255, .75); }
.page-hero .breadcrumb { font-size: 12px; color: rgba(255, 255, 255, .6); margin-bottom: 14px; }
.page-hero .breadcrumb a:hover { color: #fff; }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field > label .req { color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 10px 13px; font-size: 14px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); outline: none; }
.field .hint { font-size: 12px; color: var(--soft); }
.field-row { display: flex; gap: 10px; }
.field input:disabled, .field select:disabled { background: #f6f8fb; color: var(--muted); cursor: not-allowed; }
.field input:disabled:focus, .field select:disabled:focus { border-color: var(--line); box-shadow: none; }
.field-error { display: none; font-size: 12px; line-height: 16px; color: var(--red); }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .08); }
.field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 16px; }
.field-foot .field-error { flex: 1; }
.char-count { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.address-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) {
  .address-grid { grid-template-columns: 1fr; }
}
.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.radio-card { position: relative; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: all .2s; background: #fff; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.radio-card span { font-size: 12px; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); background: rgba(37, 99, 235, .03); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.form-note { font-size: 12px; color: var(--soft); margin-right: auto; }

/* Apply */
.apply-shell { padding: 56px 0 90px; background: var(--bg); min-height: 70vh; }
.apply-wrap { max-width: 900px; margin: 0 auto; }
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 30px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; overflow-x: auto; }
.step-pill { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 4px 16px; font-size: 13px; color: var(--soft); white-space: nowrap; position: relative; }
.step-pill:not(:last-child) { border-right: 1px solid var(--line-soft); }
.step-pill .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: var(--soft); font-size: 11px; font-weight: 800; }
.step-pill.done { color: var(--green); }
.step-pill.done .num { background: rgba(5, 150, 105, .12); color: var(--green); }
.step-pill.active { color: var(--blue); font-weight: 700; }
.step-pill.active .num { background: var(--grad); color: #fff; box-shadow: 0 4px 10px rgba(37, 99, 235, .25); }
.apply-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 38px; }
.apply-card > h2 { font-size: 23px; color: var(--ink); font-weight: 800; }
.apply-card > .sub { margin-top: 7px; font-size: 14px; color: var(--muted); }
.apply-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.apply-section:first-of-type { border-top: 0; padding-top: 22px; }
.apply-section h3 { font-size: 16px; color: var(--ink); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.apply-section h3 .badge { font-weight: 700; }
.oauth-btn { width: 100%; justify-content: center; padding: 12px; }
.dev-note { margin-top: 16px; padding: 15px 16px; border: 1px dashed rgba(37, 99, 235, .3); border-radius: 10px; background: rgba(37, 99, 235, .03); font-size: 12.5px; color: var(--muted); }
.dev-note strong { color: var(--ink); }
.status-panel { text-align: center; padding: 16px 0 6px; }
.status-icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 22px; background: var(--grad-soft); color: var(--blue); }
.status-icon.green { background: rgba(5, 150, 105, .1); color: var(--green); }
.status-icon.amber { background: rgba(217, 119, 6, .1); color: var(--amber); }
.status-icon.red { background: rgba(220, 38, 38, .08); color: var(--red); }
.status-panel h2 { font-size: 24px; color: var(--ink); font-weight: 800; }
.status-panel p { max-width: 560px; margin: 10px auto 0; color: var(--muted); }
.status-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.status-meta strong { color: var(--ink); }
.timeline { max-width: 620px; margin: 34px auto 0; text-align: left; }
.timeline-item { position: relative; padding: 0 0 22px 30px; border-left: 1px solid var(--line); }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.timeline-item.done::before { background: var(--green); box-shadow: 0 0 0 3px rgba(5, 150, 105, .15); }
.timeline-item.current::before { background: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.timeline-item strong { display: block; font-size: 14px; color: var(--ink); }
.timeline-item span { font-size: 12.5px; color: var(--muted); }
.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.upload-box { position: relative; border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 20px 16px; text-align: center; background: #fbfdff; transition: all .2s; min-height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.upload-box:hover { border-color: var(--blue); background: rgba(37, 99, 235, .02); }
.upload-box.has-file { border-style: solid; border-color: rgba(5, 150, 105, .4); background: rgba(5, 150, 105, .03); }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box .up-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef2f7; color: var(--muted); }
.upload-box.has-file .up-icon { background: rgba(5, 150, 105, .1); color: var(--green); }
.upload-box strong { font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.upload-box span { font-size: 11px; color: var(--soft); word-break: break-all; }
.upload-box .replace { font-size: 11px; color: var(--blue); }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-links a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 6px; background: #f1f5f9; font-size: 12px; color: var(--text); }
.doc-links a:hover { background: rgba(37, 99, 235, .08); color: var(--blue); }

/* Docs */
.docs-page { background: var(--bg); padding-bottom: 80px; }
.docs-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 32px; padding-top: 40px; align-items: start; }
.docs-sidebar { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; max-height: calc(100vh - 120px); overflow-y: auto; }
.docs-sidebar h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin-bottom: 10px; }
.docs-sidebar a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--text); }
.docs-sidebar a:hover { background: #f8fafc; color: var(--blue); }
.docs-sidebar a .count { font-size: 11px; color: var(--soft); }
.docs-sidebar .side-sep { height: 1px; background: var(--line-soft); margin: 12px 0; }
.docs-main { min-width: 0; }
.docs-intro { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; margin-bottom: 26px; }
.docs-intro h2 { font-size: 24px; color: var(--ink); font-weight: 800; margin-bottom: 10px; }
.docs-intro p { color: var(--muted); font-size: 14px; }
.docs-search { display: flex; gap: 10px; margin: 18px 0 6px; }
.docs-search input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; font-size: 14px; }
.docs-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); outline: none; }
.token-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.token-step { padding: 16px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; }
.token-step strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.token-step span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { font-size: 18px; color: var(--ink); font-weight: 750; }
.panel-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.panel-body { padding: 24px; }
.doc-group { scroll-margin-top: 96px; }
.api-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.api-row:last-child { border-bottom: 0; }
.method { display: inline-flex; justify-content: center; padding: 3px 0; border-radius: 5px; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.method.get { color: #047857; background: rgba(5, 150, 105, .1); }
.method.post { color: #1d4ed8; background: rgba(37, 99, 235, .1); }
.method.put { color: #b45309; background: rgba(217, 119, 6, .12); }
.method.delete { color: #b91c1c; background: rgba(220, 38, 38, .1); }
.method.patch { color: #6d28d9; background: rgba(124, 58, 237, .1); }
.api-path { font-family: var(--mono); font-size: 13px; color: var(--ink); word-break: break-all; }
.api-name { font-size: 13px; color: var(--text); margin-top: 4px; }
.api-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.api-copy { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 11px; color: var(--muted); }
.api-copy:hover { border-color: var(--blue); color: var(--blue); }
.code-snippet { background: #0d1730; border-radius: 12px; overflow: hidden; }
.code-snippet-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; color: #94a3b8; }
.code-snippet pre { margin: 0; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.8; color: #dbeafe; }
.code-snippet .k { color: #93c5fd; }
.code-snippet .s { color: #86efac; }
.code-snippet .d { color: #64748b; }

/* Console */
.console-page { background: var(--bg); min-height: 100vh; padding: 96px 0 70px; }
.console-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 28px; align-items: start; }
.console-sidebar { position: sticky; top: 96px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.side-profile { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.side-avatar { position: relative; overflow: hidden; width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.side-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #f1f5f9; }
.side-profile strong { display: block; font-size: 13.5px; color: var(--ink); }
.side-profile span { font-size: 11.5px; color: var(--muted); }
.side-label { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); margin: 12px 8px 7px; }
.side-nav a, .side-app { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text); transition: all .18s; width: 100%; border: 0; background: none; text-align: left; }
.side-nav a:hover, .side-app:hover { background: #f8fafc; color: var(--blue); }
.side-nav a.active, .side-app.active { background: rgba(37, 99, 235, .08); color: var(--blue); font-weight: 700; }
.side-app .app-dot { width: 26px; height: 26px; border-radius: 7px; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.side-app.active .app-dot { background: var(--grad); color: #fff; }
.side-app span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-app .mini-status { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.side-app .mini-status.off { background: var(--soft); }
.side-add { width: 100%; margin-top: 8px; }
.console-main { min-width: 0; }
.console-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.console-top h1 { font-size: 26px; color: var(--ink); font-weight: 800; }
.console-top p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px; }
.stat-tile .v { font-size: 25px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.stat-tile .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.app-hero-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.app-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.app-icon { width: 50px; height: 50px; border-radius: 13px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.app-hero-head .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-hero-head h2 { font-size: 21px; color: var(--ink); font-weight: 800; }
.app-hero-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 11px 18px; font-size: 13.5px; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--blue); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.section-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; overflow: hidden; }
.section-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 22px; border-bottom: 1px solid var(--line-soft); }
.section-card-head h3 { font-size: 15.5px; color: var(--ink); font-weight: 750; }
.section-card-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.section-card-body { padding: 22px; }
.credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.credential { background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 15px 16px; }
.credential label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin-bottom: 5px; }
.credential code { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink); word-break: break-all; }
.credential .row { display: flex; align-items: center; gap: 8px; }
.credential .row code { flex: 1; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.secret-alert { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border-radius: 9px; background: rgba(217, 119, 6, .08); border: 1px solid rgba(217, 119, 6, .18); font-size: 12.5px; color: #92400e; margin-bottom: 14px; }
.secret-alert strong { display: block; margin-bottom: 2px; }
.granted-scope { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.granted-scope-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: #fbfdff; cursor: pointer; }
.granted-scope-head strong { font-size: 13.5px; color: var(--ink); }
.granted-scope-head .scope-code { margin-left: 2px; }
.granted-scope-head .count { margin-left: auto; font-size: 11.5px; color: var(--soft); }
.granted-scope-body { padding: 4px 15px 13px; display: none; }
.granted-scope.open .granted-scope-body { display: block; }
.api-mini { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12px; }
.api-mini:last-child { border-bottom: 0; }
.api-mini code { color: var(--ink); font-family: var(--mono); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-mini span { color: var(--muted); }
.scope-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scope-pick { border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px; background: #fff; transition: all .2s; display: flex; flex-direction: column; gap: 7px; }
.scope-pick:hover { border-color: rgba(37, 99, 235, .35); box-shadow: var(--shadow-sm); }
.scope-pick .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scope-pick strong { font-size: 13.5px; color: var(--ink); }
.scope-pick p { font-size: 12px; color: var(--muted); flex: 1; min-height: 36px; }
.scope-pick .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.request-item { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.request-item:last-child { border-bottom: 0; }
.request-item .req-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--grad-soft); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.request-item .req-main { flex: 1; min-width: 0; }
.request-item strong { font-size: 13.5px; color: var(--ink); }
.request-item p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.request-item .req-side { text-align: right; font-size: 11.5px; color: var(--soft); }

/* Review */
.review-page { background: var(--bg); min-height: 100vh; padding: 96px 0 70px; }
.review-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; }
.review-nav { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.review-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--text); }
.review-nav a:hover { background: #f8fafc; }
.review-nav a.active { background: rgba(37, 99, 235, .08); color: var(--blue); font-weight: 700; }
.review-nav a .count { font-size: 11px; background: #f1f5f9; color: var(--muted); border-radius: 999px; padding: 1px 7px; }
.review-main { min-width: 0; }
.review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.review-head h1 { font-size: 25px; font-weight: 800; color: var(--ink); }
.review-head p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filters input, .filters select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font-size: 13px; background: #fff; }
.filters input:focus, .filters select:focus { border-color: var(--blue); outline: none; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); background: #fbfdff; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
.cell-main { font-weight: 650; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--soft); margin-top: 1px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.review-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.review-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.review-panel-head h2 { font-size: 20px; color: var(--ink); font-weight: 800; }
.review-panel-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
.kv label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); margin-bottom: 3px; }
.kv div { font-size: 13px; color: var(--ink); }
.review-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* Empty / loading */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; border-radius: 18px; background: #f1f5f9; color: var(--soft); display: grid; place-items: center; margin: 0 auto 16px; }
.empty h3 { font-size: 16px; color: var(--ink); margin-bottom: 5px; }
.empty p { font-size: 13px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 56px; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #f1f5f9, #e8eef6, #f1f5f9); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 72px 20px 32px; overflow-y: auto; opacity: 0; visibility: hidden; transition: all .22s; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { width: min(620px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.99); transition: all .22s; }
.modal-backdrop.open .modal { transform: none; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; }
.modal-head h3 { font-size: 18px; color: var(--ink); font-weight: 800; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-close { width: 32px; height: 32px; border: 0; background: #f1f5f9; border-radius: 8px; color: var(--muted); font-size: 18px; line-height: 1; flex-shrink: 0; }
.modal-close:hover { background: #e8eef6; color: var(--ink); }
.modal-body { padding: 4px 24px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line-soft); }
.modal-foot .form-note { margin-right: auto; }
.modal .form-grid { gap: 15px 18px; }
.modal .field textarea { min-height: 80px; }

/* Toast */
.toast-wrap { position: fixed; z-index: 400; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 10px; background: #0f172a; color: #fff; font-size: 13px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); animation: toast-in .25s ease; }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.info { background: #1e3a8a; }
.toast .toast-icon { font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Utility */
.flex { display: flex; }
.ac { align-items: center; }
.jc { justify-content: space-between; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mt-30 { margin-top: 30px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.t-center { text-align: center; }
.t-right { text-align: right; }
.break { word-break: break-all; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }

@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 44px; }
  .hero-panel { max-width: 640px; }
  .hero-float { right: 12px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step:nth-child(3)::after { display: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:nth-child(4), .footer-grid > div:nth-child(5) { grid-column: span 1; }
  .docs-layout, .console-layout, .review-layout { grid-template-columns: 1fr; }
  .docs-sidebar, .console-sidebar, .review-nav { position: static; }
  .review-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px; }
  .review-nav a { white-space: nowrap; }
  .review-nav a .count { display: none; }
}

@media (max-width: 1279px) {
  .nav { display: none; }
  .header-right { margin-left: auto; }
  .header-right .header-console { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 820px) {
  .header-inner { gap: 12px; }
  .nav, .header-right .btn span, .header-right .user-menu { display: none; }
  .nav-toggle { display: block; }
  .site-header .header-inner { justify-content: space-between; }
  .header-right { margin-left: auto; }
  .header-right .header-console { display: none; }
  .hero { padding: 128px 0 120px; }
  /* 单列时 grid 项默认 min-width:auto，代码块会把整页撑宽 */
  .hero .container > * { min-width: 0; }
  .grid > * { min-width: 0; }
  .grid h2, .grid p { overflow-wrap: anywhere; }
  .hero h1 { font-size: 36px; }
  .hero-lead { font-size: 15px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 27px; }
  .cta-band { padding: 36px 28px; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .cta-band h2 { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .upload-grid { grid-template-columns: 1fr; }
  .apply-card { padding: 26px 20px; }
  .stepper { padding: 12px; }
  .step-pill { padding: 4px 10px; font-size: 12px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .token-guide { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope-pick-grid, .credential-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-promises { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 120px 0 48px; }
  .page-hero h1 { font-size: 30px; }
  .api-row { grid-template-columns: 64px minmax(0, 1fr); }
  .api-copy { display: none; }
  .console-page, .review-page { padding-top: 88px; }
  .modal-backdrop { padding-top: 80px; }
}

@media (max-width: 540px) {
  .container { width: calc(100% - 32px); }
  /* logo + 副标题在窄屏挤不下，去掉副标题避免头部横向溢出 */
  .brand-sub { display: none; }
  .hero h1 { font-size: 31px; }
  .hero-actions .btn { width: 100%; }
  .hero-float { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 18px; }
  .stat-value { font-size: 27px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .radio-cards { grid-template-columns: 1fr; }
  .app-hero-head { flex-direction: column; }
  .section-head h2 { font-size: 24px; }
  .apply-card { padding: 22px 16px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-note { margin: 0; text-align: center; }
}
