@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

::selection {
  background: #bfdbfe;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  height: 64px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.navbar-spacer {
  flex: 1;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-right: 28px;
}

.navbar-links a {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.navbar-links a:hover {
  color: #e2e8f0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-outline {
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 7px 16px;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-nav-outline:hover {
  background: #1e293b;
  border-color: #475569;
}

.btn-nav-solid {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-nav-solid:hover {
  background: #1d4ed8;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-user-email {
  font-size: 13px;
  color: #64748b;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
}

.avatar-lg {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: none;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.btn-ghost:hover {
  background: #f8fafc;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
}

/* ── Terms page ── */
.terms-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 64px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.terms-container a {
  color: #2563eb;
  text-decoration: none;
}

.terms-container h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #101828;
}

.terms-container h1+p {
  margin-top: 0;
  padding: 12px 16px;
  display: inline-block;
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 600;
}

.terms-container h2 {
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #111827;
}

.terms-container p {
  margin: 0 0 16px;
  font-size: 16px;
}

.terms-container b {
  color: #111827;
}

.terms-container a {
  color: var(--primary);
  text-decoration: none;
  color: #1d4ed8;
  font-weight: 600;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.terms-container a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.terms-container ul {
  margin: 16px 0 24px;
  padding-left: 28px;
  list-style: disc;
}

.terms-container li {
  margin-bottom: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.terms-container li p {
  margin: 0;
}

.terms-container br {
  line-height: 1;
}

/* ── Auth pages ── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 28px;
}

.auth-footer {
  margin-top: 20px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

.auth-footer a {
  color: #2563eb;
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #b91c1c;
}

/* ── Home hero ── */
.hero {
  background: #0b1628;
  padding: 88px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 99px;
  padding: 5px 14px;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  animation: pulse 2s infinite;
}

.hero-badge-text {
  font-size: 12px;
  font-weight: 500;
  color: #60a5fa;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: 50px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 0 0 22px;
}

.hero h1 em {
  font-style: normal;
  color: #60a5fa;
}

.hero-sub {
  font-size: 17px;
  color: #94a3b8;
  line-height: 1.75;
  margin: 0 0 40px;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-hero {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-hero:hover {
  background: #1d4ed8;
}

.btn-hero-text {
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  padding: 14px 4px;
  transition: color 0.15s;
}

.btn-hero-text:hover {
  color: #cbd5e1;
}

.hero-stats {
  display: flex;
  align-items: center;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid #1e293b;
}

.hero-stat {
  padding-right: 32px;
}

.hero-stat-val {
  font-size: 24px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.5px;
}

.hero-stat-label {
  font-size: 12px;
  color: #475569;
  margin-top: 3px;
  font-weight: 500;
}

.hero-divider {
  width: 1px;
  height: 40px;
  background: #1e293b;
  margin-right: 32px;
}

/* Code preview */
.code-preview {
  background: #111827;
  border-radius: 12px;
  border: 1px solid #1f2937;
  overflow: hidden;
}

.code-bar {
  padding: 12px 16px;
  background: #0d1117;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: #ef4444;
}

.dot-yellow {
  background: #f59e0b;
}

.dot-green {
  background: #10b981;
}

.code-bar-label {
  margin-left: 12px;
  font-size: 11px;
  color: #4b5563;
  font-family: 'JetBrains Mono', monospace;
}

.code-body {
  padding: 20px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
}

.c-dim {
  color: #4b5563;
}

.c-blue {
  color: #60a5fa;
}

.c-green {
  color: #86efac;
}

.c-muted {
  color: #374151;
}

.c-comment {
  color: #6b7280;
}

.c-purple {
  color: #c084fc;
}

.c-yellow {
  color: #fbbf24;
}

/* Sections */
.section-white {
  padding: 80px 0;
  background: #fff;
}

.section-gray {
  padding: 80px 0;
  background: #f8fafc;
}

.section-dark {
  padding: 80px 0;
  background: #0b1628;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 12px;
  text-align: center;
}

.section-h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #0f172a;
  margin: 0 0 12px;
  text-align: center;
}

.section-lead {
  font-size: 16px;
  color: #64748b;
  margin: 0;
  text-align: center;
}

.section-head {
  margin-bottom: 56px;
}

/* API cards */
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.api-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.api-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.api-card-img {
  height: 196px;
  overflow: hidden;
}

.api-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.api-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.api-tag {
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 10px;
}

.api-tag-blue {
  color: #2563eb;
  background: #eff6ff;
}

.api-tag-purple {
  color: #7c3aed;
  background: #f5f3ff;
}

.api-tag-cyan {
  color: #0891b2;
  background: #ecfeff;
}

.api-card h3 {
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}

.api-card>.api-card-body>p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}

.api-specs {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f8fafc;
}

.spec-row:last-child {
  border-bottom: none;
}

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

.spec-val {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.spec-val.mono {
  font-family: 'JetBrains Mono', monospace;
}

.spec-val.green {
  color: #059669;
}

.btn-api {
  margin-top: 20px;
  width: 100%;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  display: block;
  text-decoration: none;
}

.btn-api:hover {
  background: #1d4ed8;
}

.btn-api-secondary {
  margin-top: 10px;
  width: 100%;
  background: #fff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
  display: block;
  text-decoration: none;
}

.btn-api-secondary:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
}

/* Pricing */
.pricing-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.pricing-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 12px 28px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.pricing-head>div {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.pricing-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 20px 28px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}

.pricing-row:last-child {
  border-bottom: none;
}

.pricing-api {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pricing-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.pricing-sub-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 1px;
}

.pricing-free {
  font-size: 14px;
  font-weight: 600;
  color: #059669;
  font-family: 'JetBrains Mono', monospace;
}

.pricing-price {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
}

.pricing-unit {
  font-size: 13px;
  color: #64748b;
}

.pricing-note {
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  margin-top: 14px;
}

/* CTA */
.cta-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.cta-wrap h2 {
  font-size: 34px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -1px;
  margin: 0 0 16px;
}

.cta-wrap p {
  font-size: 16px;
  color: #64748b;
  margin: 0 0 36px;
  line-height: 1.7;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

/* Footer */
footer {
  background: #0b1628;
  border-top: 1px solid #1e293b;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 13px;
  color: #334155;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #64748b;
}

/* ── Profile layout ── */
.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 48px 80px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-user {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 2px;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sidebar-user-row>div {
  min-width: 0;
}

.sidebar-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-email {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-badge-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.plan-badge-text {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
}

.sidebar-nav {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  background: #fff;
  color: #475569;
  transition: background 0.1s, color 0.1s;
}

.sidebar-nav-btn:last-child {
  border-bottom: none;
}

.sidebar-nav-btn:hover {
  background: #f8fafc;
}

.sidebar-nav-btn.active {
  border-left-color: #2563eb;
  background: #f8fafc;
  color: #1e293b;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.1s, color 0.1s;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.profile-main {
  flex: 1;
  min-width: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-header {
  margin-bottom: 28px;
}

.panel-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}

.panel-header p {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.panel-header-row h1 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}

.panel-header-row p {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
}

.panel-header-row .hdr-text {}

/* Cards */
.pcard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pcard:last-child {
  margin-bottom: 0;
}

.pcard-head {
  padding: 16px 22px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pcard-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-tile {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.stat-val {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Overview API access */
.overview-row {
  display: grid;
  grid-template-columns: 2fr 130px 72px 100px;
  gap: 12px;
  padding: 14px 22px;
  align-items: center;
  border-bottom: 1px solid #f8fafc;
}

.overview-row:last-child {
  border-bottom: none;
}

.overview-api-name {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.overview-api-sub {
  font-size: 12px;
  color: #94a3b8;
}

.overview-usage {
  font-size: 13px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.overview-cost {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
}

.bar-track {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* Subscriptions / API Keys */
.sub-item {
  padding: 20px 22px;
  border-bottom: 1px solid #f8fafc;
}

.sub-item:last-child {
  border-bottom: none;
}

.sub-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sub-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.sub-item-id {
  font-size: 11px;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 2px 10px;
  margin-left: 8px;
}

.badge-active {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
}

.badge-inactive {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.key-row {
  margin-bottom: 10px;
}

.key-row:last-child {
  margin-bottom: 0;
}

.key-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 5px;
}

.key-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-input {
  flex: 1;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 12px;
  color: #475569;
}

.key-input[type=password] {
  letter-spacing: 0.12em;
}

.key-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: #2563eb;
}

.security-notice {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Billing */
.billing-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  margin-bottom: 20px;
}

.billing-period-tag {
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 3px 10px;
}

.billing-head-row {
  display: grid;
  grid-template-columns: 1fr 110px 90px;
  gap: 8px;
  padding: 11px 22px;
  border-bottom: 2px solid #f1f5f9;
}

.billing-data-row {
  display: grid;
  grid-template-columns: 1fr 110px 90px;
  gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid #f8fafc;
  align-items: center;
}

.billing-data-row:last-child {
  border-bottom: 2px solid #f1f5f9;
}

.billing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.billing-api-name {
  font-size: 13px;
  color: #1e293b;
}

.billing-usage {
  font-size: 13px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.billing-amount {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}

.billing-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
}

.billing-total-label {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.billing-total-val {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
}

.billing-foot {
  padding: 10px 22px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

.col-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Payment method sidebar card */
.pm-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
}

.pm-sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 14px;
}

.pm-card-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.pm-number {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
}

.pm-exp {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

/* Invoice history */
.invoice-row {
  display: grid;
  grid-template-columns: 1fr 130px 110px 80px 60px;
  padding: 14px 22px;
  border-bottom: 1px solid #f8fafc;
  align-items: center;
}

.invoice-row:last-child {
  border-bottom: none;
}

.invoice-name {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.invoice-period {
  font-size: 13px;
  color: #64748b;
}

.invoice-amount {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
}

.invoice-status-badge {
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 10px;
  display: inline-block;
}

.invoice-paid {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
}

.invoice-open {
  background: #fff8e1;
  color: #7a6000;
  border: 1px solid #fde68a;
}

.invoice-void,
.invoice-draft {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

.invoice-uncollectible {
  background: #fce8e6;
  color: #c62828;
  border: 1px solid #f5c6c6;
}

.invoice-pdf-link {
  font-size: 12px;
  color: #2563eb;
  font-weight: 500;
}

.invoice-pdf-link:hover {
  text-decoration: underline;
}

/* Usage */
.usage-range-input { font-size: 13px; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 14px; width: 320px; cursor: pointer; }
.usage-range-input:focus { outline: 2px solid #2563eb; outline-offset: 1px; border-color: #2563eb; }
.usage-block { border-bottom: 1px solid #f1f5f9; }
.usage-block:last-child { border-bottom: none; }
.usage-block-title { font-size: 14px; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: 0.6px; padding: 14px 22px 10px; }
.usage-table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 #f8fafc; }
.usage-table-wrap::-webkit-scrollbar { height: 8px; }
.usage-table-wrap::-webkit-scrollbar-track { background: #f8fafc; }
.usage-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.usage-table-wrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.usage-table { width: 100%; border-collapse: collapse; }
.usage-table th { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.6px; text-align: right; padding: 8px 14px; border-bottom: 2px solid #f1f5f9; white-space: nowrap; }
.usage-table td { font-size: 13px; color: #64748b; font-family: 'JetBrains Mono', monospace; text-align: right; padding: 12px 14px; border-bottom: 1px solid #f8fafc; white-space: nowrap; }
.usage-table th:first-child, .usage-table td:first-child { text-align: left; padding-left: 22px; }
.usage-table th:last-child, .usage-table td:last-child { padding-right: 22px; }
.usage-table td:first-child { font-family: inherit; color: #1e293b; font-weight: 500; white-space: normal; }
.usage-table tr:last-child td { border-bottom: none; }

/* Account settings */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #f1f5f9;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.settings-sub {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}

.danger-zone {
  border: 1px solid #fecaca;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.danger-zone-head {
  padding: 16px 22px;
  border-bottom: 1px solid #fecaca;
}

.danger-zone-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: #b91c1c;
  margin: 0;
}

.danger-zone-body {
  padding: 20px 22px;
}

.danger-zone-body p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.modal-footer .btn {
  flex: 1;
}

.modal-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #b91c1c;
}

/* N/A placeholder */
.na-wrap {
  text-align: center;
  padding: 60px 20px;
}

.na-wrap h3 {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.na-wrap p {
  font-size: 14px;
  color: #94a3b8;
}

/* Spinner */
.spinner-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Verify pages */
.message-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.message-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.message-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.message-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65;
  margin-bottom: 8px;
}

.message-card .btn {
  margin-top: 24px;
}

.email-highlight {
  font-weight: 600;
  color: #1e293b;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}