/* ═══════════════════════════════════════════════════════════════
   FUCO MAIL — CSS
   ─ Fond #000  ─ Cartes #121212  ─ Vert #22c55e  ─ Cyan #2dd4bf
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --font:      'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* Fonds */
  --bg0:      #000000;
  --surface:  #0f0f0f;
  --surface2: #1a1a1a;
  --surface3: #0d0d0d;

  /* Texte */
  --text:  #ffffff;
  --text2: #a1a1aa;
  --text3: #52525b;

  /* Bordures */
  --line:  #1f1f1f;
  --line2: #2e2e2e;

  /* Vert */
  --green:       #22c55e;
  --green-dim:   rgba(34, 197, 94, 0.12);
  --green-panel: rgba(9, 28, 18, 0.98);

  /* Cyan */
  --cyan:      #2dd4bf;
  --teal:      #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.12);

  /* Purple brand */
  --purple: #a855f7;

  /* Danger */
  --danger:    #f87171;
  --danger-bg: rgba(248, 113, 113, 0.10);

  /* Alias inbox */
  --inbox-green:     #22c55e;
  --inbox-green-dim: rgba(34, 197, 94, 0.13);

  /* Rayons */
  --r-xs: 6px;
  --r-sm: 8px;
  --r:    10px;
  --r-lg: 12px;
  --r-xl: 14px;

  /* Ombre interne */
  --inset-shine: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.page-inbox {
  --teal:      var(--inbox-green);
  --teal-soft: var(--inbox-green-dim);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 6px;
  border: 3px solid #0a0a0a;
}
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
code, pre { font-family: var(--font-mono); }
[hidden] { display: none !important; }

/* ─── Layout containers ──────────────────────────────────────── */
.container {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
}

.docs-layout,
.dashboard-layout,
.inbox-layout,
.status-layout,
.admin-login-layout {
  width: min(980px, calc(100vw - 2rem));
  margin: 0 auto;
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 5rem;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1a1a1a;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-orb {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(145deg, #9333ea, #a855f7);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 3px 16px rgba(168,85,247,0.38);
}

.brand-copy strong {
  display: block;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  letter-spacing: -0.022em;
  color: var(--text);
  line-height: 1.15;
}

.brand-copy small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text2);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.1rem;
  flex-wrap: wrap;
}

.topnav a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0;
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--text2);
  transition: color 0.13s;
}

.topnav a:hover  { color: var(--text); }
.topnav a.active { color: var(--text); font-weight: 600; }

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.user-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text);
  background: #1c1c1c;
  border: 1px solid var(--line2);
  overflow: hidden;
}

.user-badge img { width: 100%; height: 100%; object-fit: cover; }

.topbar-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-icon-btn:hover,
.topbar-icon-btn.active {
  color: var(--text);
  background: #161616;
  border-color: var(--line);
}

/* ─── API Online pill ────────────────────────────────────────── */
.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.09);
  color: var(--green);
  font-size: 0.785rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.88); }
}

/* ═══════════════════════════════════════════════════════════════
   SURFACES / CARTES
   ═══════════════════════════════════════════════════════════════ */
.hero-copy,
.hero-panel,
.panel-card,
.content-card,
.table-card,
.auth-card,
.status-card,
.stat-card,
.timeline-item,
.message-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: var(--surface);
  box-shadow: var(--inset-shine), 0 1px 3px rgba(0,0,0,0.3);
}

.hero-copy::after,
.hero-panel::after,
.panel-card::after,
.content-card::after,
.table-card::after,
.auth-card::after,
.status-card::after,
.stat-card::after,
.timeline-item::after,
.message-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, transparent 38%);
  border-radius: inherit;
}

/* ─── Auth / status h1 ───────────────────────────────────────── */
.auth-card h1,
.status-card h1 {
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 1.95rem);
  letter-spacing: -0.022em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.content-card p,
.panel-card p,
.auth-card p,
.status-card p,
.table-card p,
.timeline-item p,
.footer p {
  color: var(--text2);
  line-height: 1.72;
  font-size: 0.95rem;
}

.page-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.page-header p {
  margin: 0 auto;
  max-width: 600px;
  color: var(--text2);
  line-height: 1.72;
  font-size: 1rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.665rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
}

body.page-inbox .eyebrow { color: var(--green); }

.crumb-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.4rem 0 1.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-lg);
  border: 1px solid #1f1f1f;
  background: #0d0d0d;
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 500;
}

.crumb-bar a:hover { color: var(--text); }
.crumb-sep { color: var(--text3); }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════ */
.home-hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
}

.home-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 600;
}

.home-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,.8);
  animation: blink 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.home-hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text);
  max-width: 820px;
}

.home-hero-accent {
  color: var(--green);
}

.home-hero-sub {
  max-width: 560px;
  color: var(--text2);
  font-size: 1.02rem;
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.home-btn-lg {
  min-height: 46px;
  padding: 0 1.4rem;
  font-size: 0.9rem;
}

.home-stats-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem 1.6rem;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 1rem;
}

.home-stat strong {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-stat span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

.home-stat-sep {
  width: 1px;
  height: 28px;
  background: #222;
  flex-shrink: 0;
}

/* Generator card */
.home-gen-section { margin: 0 auto 2rem; max-width: 680px; }

.home-gen-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid #1f1f1f;
  background: #0d0d0d;
  box-shadow: var(--inset-shine), 0 2px 8px rgba(0,0,0,.5);
  padding: 1.75rem;
}

.home-gen-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 40%);
}

.home-gen-head { margin-bottom: 1.1rem; }

.home-gen-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.home-gen-sub {
  font-size: 0.875rem;
  color: var(--text2);
  margin-bottom: 1rem;
}

.home-gen-form { display: grid; gap: 0.7rem; }

.home-gen-auth-cta { display: grid; gap: 1rem; }
.home-gen-auth-msg { color: var(--text-muted); font-size: .92rem; margin: 0; }
.home-gen-auth-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.home-gen-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.home-gen-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.home-gen-at {
  position: absolute;
  left: 0.9rem;
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  pointer-events: none;
  user-select: none;
}

.home-gen-input {
  width: 100%;
  padding-left: 1.8rem;
  padding-right: 0.9rem;
  min-height: 46px;
  border-radius: var(--r-sm);
  border: 1px solid #1f1f1f;
  background: #0a0a0a;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}

.home-gen-input:focus {
  border-color: #3a3a3a;
  box-shadow: 0 0 0 3px rgba(255,255,255,.05);
}

.home-gen-domain {
  position: absolute;
  right: 0.9rem;
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  pointer-events: none;
}

.home-gen-terminal { margin-top: 1.2rem; }

.terminal-label {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text3);
  text-transform: uppercase;
}

/* Section labels */
.home-features-section,
.home-how-section {
  margin: 2.5rem auto 0;
  padding-bottom: 0;
}

.home-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.55rem;
}

.home-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Feature grid */
.home-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

.home-feature-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  transition: transform .18s ease, border-color .18s ease;
}

.home-feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.022) 0%, transparent 40%);
}

.home-feature-card:hover {
  transform: translateY(-2px);
  border-color: #2a2a2a;
}

.home-feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  color: var(--green);
  margin-bottom: 0.9rem;
}

.home-feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.home-feature-card p {
  font-size: 0.855rem;
  color: var(--text2);
  line-height: 1.65;
}

/* Steps */
.home-steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.home-step {
  padding: 1.4rem;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
}

.home-step-num {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.home-step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.home-step p {
  font-size: 0.855rem;
  color: var(--text2);
  line-height: 1.6;
}

.home-step-arrow {
  font-size: 1.2rem;
  color: var(--text3);
  text-align: center;
  flex-shrink: 0;
}

.input-row,
.section-head,
.alert-card-head,
.inbox-header,
.meta-strip,
.mailbox-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════════════════════════ */
.primary-button,
.secondary-button,
.ghost-button,
.history-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 42px;
  padding: 0 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.865rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

/* Primaire = blanc */
.primary-button {
  color: #000;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 4px rgba(255,255,255,0.1);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #fafafa;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 8px rgba(255,255,255,0.15);
}

.primary-button:active {
  transform: translateY(0);
  background: #e8e8e8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 2px rgba(255,255,255,0.08);
}

/* Secondaire = gris sombre */
.secondary-button {
  color: var(--text);
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  box-shadow: var(--inset-shine), 0 1px 2px rgba(0,0,0,0.3);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: #222222;
  border-color: #3a3a3a;
  box-shadow: var(--inset-shine), 0 2px 4px rgba(0,0,0,0.4);
}

/* Ghost */
.ghost-button,
.history-toggle {
  color: #b4b4b8;
  background: #0d0d0d;
  border: 1px solid var(--line);
}

.ghost-button:hover,
.history-toggle:hover {
  transform: translateY(-1px);
  background: #161616;
  border-color: var(--line2);
  color: var(--text);
}

/* Danger (Delete) */
.danger-button {
  color: #d4d4d8 !important;
  background: #0d0d0d !important;
  border: 1px solid #3a3a3a !important;
}

.danger-button:hover {
  background: #181818 !important;
  border-color: #525252 !important;
  color: #fff !important;
}

/* Inbox Copy = vert foncé + bordure verte */
body.page-inbox .inbox-actions .secondary-button {
  color: var(--green);
  background: rgba(5, 22, 13, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.6);
}

body.page-inbox .inbox-actions .secondary-button:hover {
  background: rgba(8, 32, 19, 0.98);
  border-color: rgba(74, 222, 128, 0.8);
  color: #4ade80;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
}

.history-toggle {
  width: 100%;
  justify-content: center;
  color: var(--text2);
  background: #111111;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════════════════════════
   PILLS
   ═══════════════════════════════════════════════════════════════ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #1f1f1f;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text2);
  font-size: 0.775rem;
  font-weight: 600;
}

.pill-muted {
  color: var(--text3);
  border-style: dashed;
}

/* ─── Hero panel ─────────────────────────────────────────────── */
.hero-panel { padding: 1.4rem; }

.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.hero-panel-top strong {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text2);
}

.stack-form { display: grid; gap: 0.6rem; }

.stack-form label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text2);
}

/* ─── Inputs ─────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.95rem;
  border-radius: var(--r-sm);
  border: 1px solid #1f1f1f;
  background: #0a0a0a;
  color: var(--text);
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s, background-color 0.14s;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text3);
  font-size: 0.875rem;
}

input:hover,
textarea:hover {
  border-color: #2a2a2a;
  background: #0d0d0d;
}

input:focus,
textarea:focus {
  border-color: #3a3a3a;
  background: #0d0d0d;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.hint {
  font-size: 0.855rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ─── Terminal ───────────────────────────────────────────────── */
.terminal-card {
  margin-top: 1.25rem;
  border-radius: var(--r);
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.terminal-head {
  display: flex;
  gap: 0.42rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.018);
}

.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-head span:nth-child(1) { background: #ff6c5c; }
.terminal-head span:nth-child(2) { background: #ffba44; }
.terminal-head span:nth-child(3) { background: var(--green); }

.terminal-card pre {
  margin: 0;
  padding: 1rem 1.1rem 1.1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.58;
  color: #d8e4f6;
  border: none;
  background: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   GRILLES
   ═══════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem auto 0;
}

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

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

/* ─── Stat & panel cards ─────────────────────────────────────── */
.stat-card,
.panel-card {
  padding: 1.15rem 1.2rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.stat-card:hover,
.panel-card:hover {
  transform: translateY(-2px);
  border-color: #2e2e2e;
}

.stat-card strong {
  display: block;
  font-weight: 700;
  font-size: clamp(1.65rem, 3vw, 2rem);
  letter-spacing: -0.032em;
  color: var(--text);
}

.stat-card span {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.635rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text3);
}

.panel-index {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--green);
  margin-bottom: 0.3rem;
}

.panel-card h2,
.content-card h2,
.table-card h2,
.auth-card h2,
.hero-panel h2 {
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.016em;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.inbox-plan-card h3 {
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.016em;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.content-card,
.table-card,
.auth-card,
.status-card {
  padding: 1.4rem;
}

.accent-card,
.alert-card {
  background: linear-gradient(150deg, rgba(34,197,94,0.07) 0%, var(--surface) 52%);
  border-color: rgba(34, 197, 94, 0.22);
}

.plain-list,
.number-list {
  padding-left: 1.1rem;
  margin-top: 0.8rem;
  color: var(--text2);
}

.plain-list li,
.number-list li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
  font-size: 0.93rem;
}

.text-link,
.table-link {
  color: var(--cyan);
  font-weight: 600;
}

.text-link:hover,
.table-link:hover {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   DOCS
   ═══════════════════════════════════════════════════════════════ */
.docs-layout,
.dashboard-layout,
.inbox-layout { padding-bottom: 3rem; }

.docs-section { margin-top: 1rem; }

.endpoint + .endpoint { margin-top: 1.25rem; }

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  margin-right: 0.6rem;
  padding: 0.3rem 0.6rem;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.method-post   { background: var(--green); color: #031a0b; }
.method-get    { background: #4f85ff; color: #fff; }
.method-delete { background: #e25d77; color: #fff; }

pre {
  margin: 0.8rem 0 0;
  padding: 0.95rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  color: #e2eaf8;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.58;
}

code {
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.88em;
}

/* ─── Flash ──────────────────────────────────────────────────── */
.flash-wrap { margin-top: 0.8rem; }

.flash {
  padding: 0.9rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 500;
  font-size: 0.9rem;
}

.flash-success {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.06);
}

.flash-danger {
  color: #ffb0c2;
  border-color: rgba(255, 100, 130, 0.3);
  background: rgba(248, 113, 113, 0.06);
}

.flash-warning { color: #fde68a; }

/* ═══════════════════════════════════════════════════════════════
   TABLEAU
   ═══════════════════════════════════════════════════════════════ */
.table-card { margin-top: 1rem; }

.table-wrap { overflow-x: auto; margin-top: 0.8rem; }

table { width: 100%; border-collapse: collapse; }

thead th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text3);
  text-align: left;
  padding-bottom: 0.8rem;
}

tbody td {
  padding: 1rem 0.5rem;
  border-top: 1px solid #1a1a1a;
  vertical-align: top;
  color: var(--text2);
  font-size: 0.89rem;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

tbody td strong { color: var(--text); }

.actions-cell { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ═══════════════════════════════════════════════════════════════
   INBOX
   ═══════════════════════════════════════════════════════════════ */
.inbox-page-header {
  padding: 0.25rem 0 1.25rem;
}

.inbox-page-header h1 {
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.inbox-page-header p {
  font-size: 0.93rem;
  color: var(--text2);
  line-height: 1.6;
}

.inbox-console { display: grid; gap: 0.75rem; }

/* Address card */
.inbox-address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: linear-gradient(132deg, rgba(6,22,13,0.99) 0%, rgba(4,14,9,1) 100%);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.06);
}

.inbox-address {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.inbox-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.inbox-address-body { min-width: 0; }

.inbox-address-body h2 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  letter-spacing: -0.02em;
  color: var(--green);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.45rem;
}

.pill-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
}

.inbox-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Inbox action buttons */
.inbox-btn-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: var(--r-sm);
  font-size: 0.835rem;
  font-weight: 700;
  color: #000;
  background: #fff;
  border: 1px solid rgba(255,255,255,.9);
  transition: transform .13s ease, opacity .13s ease;
  white-space: nowrap;
}

.inbox-btn-refresh:hover { opacity: .9; transform: translateY(-1px); }

.inbox-btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: var(--r-sm);
  font-size: 0.835rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(5, 22, 13, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.55);
  transition: transform .13s ease, border-color .13s ease;
  white-space: nowrap;
}

.inbox-btn-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 222, 128, 0.8);
  color: #4ade80;
}

.inbox-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: var(--r-sm);
  font-size: 0.835rem;
  font-weight: 700;
  color: var(--text2);
  background: #0d0d0d;
  border: 1px solid #2e2e2e;
  transition: transform .13s ease, border-color .13s ease, color .13s ease;
  white-space: nowrap;
}

.inbox-btn-delete:hover {
  transform: translateY(-1px);
  border-color: #444;
  color: #fff;
}

/* History toggle */
.history-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: var(--text2);
  font-size: 0.855rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .13s ease, border-color .13s ease;
}

.history-toggle:hover {
  background: #131313;
  border-color: #2a2a2a;
  color: var(--text);
}

/* Plan card */
.inbox-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: linear-gradient(132deg, rgba(7,22,14,.97) 0%, #090f0b 100%);
}

.inbox-plan-card > div { min-width: 0; }

.inbox-plan-card p {
  font-size: 0.87rem;
  color: var(--text2);
  line-height: 1.5;
}

/* Empty / feedback state */
.inbox-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 2rem;
  border: 1px solid #1a1a1a;
  border-radius: var(--r-lg);
  background: #080808;
  text-align: center;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.1rem;
}

/* Carte adresse — fond vert très sombre */
.inbox-address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: linear-gradient(
    132deg,
    rgba(10, 34, 20, 0.98) 0%,
    rgba(5, 16, 10, 0.99) 55%,
    #060d09 100%
  );
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.06);
}

.inbox-address {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  min-width: 0;
}

.inbox-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  font-size: 1.2rem;
  color: var(--teal);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.inbox-address > div { min-width: 0; }

.inbox-address h2 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(0.88rem, 2.2vw, 1.12rem);
  letter-spacing: -0.02em;
  color: var(--teal);
  margin-bottom: 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mailbox-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inbox-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Plan card */
.inbox-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid rgba(34, 197, 94, 0.24);
  background: linear-gradient(132deg, rgba(10, 30, 18, 0.96) 0%, #0b1610 55%);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.05);
}

.inbox-plan-card > div { min-width: 0; }
.inbox-plan-card p { font-size: 0.875rem; color: var(--text2); }

/* Recherche */
.search-shell { position: relative; }

.search-shell::before {
  content: '';
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2352525b'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

.search-shell input { padding-left: 2.75rem; }

/* Historique */
.history-panel { padding: 1.1rem 1.35rem; }

.history-list { display: grid; gap: 0.6rem; margin-top: 0.8rem; }

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid #1a1a1a;
  background: #0d0d0d;
  transition: border-color 0.14s, background-color 0.14s;
}

.history-item:hover {
  border-color: #2a2a2a;
  background: #121212;
}

.history-link {
  display: inline-block;
  margin-bottom: 0.18rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.875rem;
}

.history-meta,
.message-sender {
  color: var(--text3);
  font-size: 0.84rem;
}

.history-empty {
  min-height: 76px;
  display: grid;
  place-items: center;
  color: var(--text3);
  border-radius: var(--r);
  border: 1px dashed var(--line);
  font-size: 0.875rem;
}

.history-open { white-space: nowrap; }

/* Messages */
.message-list { display: grid; gap: 0.7rem; }

.message-card { padding: 1rem 1.1rem; }

.message-card h3 {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text);
  letter-spacing: -0.018em;
}

.message-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.message-card pre { margin-top: 0; font-size: 0.78rem; }

/* État vide */
.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 1.5rem;
  border: 1px solid #1a1a1a;
  border-radius: var(--r-lg);
  color: var(--text2);
  background: var(--surface);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.empty-state.large { min-height: 230px; }
.inbox-empty       { min-height: 145px; }

#inbox-feedback:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 190px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

.inbox-entry-grid { margin-top: 1rem; }

.message-timeline { display: grid; gap: 0.6rem; margin-top: 0.8rem; }

.timeline-item {
  padding: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH / STATUS
   ═══════════════════════════════════════════════════════════════ */
.admin-login-layout,
.status-layout {
  min-height: calc(100vh - 200px);
  display: grid;
  align-content: start;
  gap: 1rem;
}

.auth-card,
.status-card {
  width: min(510px, 100%);
  margin: 0 auto;
}

.full-width { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   PRICING
   ═══════════════════════════════════════════════════════════════ */
.pricing-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: #0f0f0f;
  margin-bottom: 2rem;
}

.pricing-toggle button {
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text3);
  background: transparent;
  transition: background 0.14s, color 0.14s;
  min-height: auto;
}

.pricing-toggle button.active {
  color: var(--text);
  background: #272727;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.pricing-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: var(--r-xl);
  border: 1px solid #1a1a1a;
  background: #0d0d0d;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: #2a2a2a;
}

.pricing-card.featured {
  border-color: rgba(255,255,255,0.2);
  background: #121212;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.pricing-card .badge-popular {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.28rem 0.9rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: #fff;
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 0.7rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.22rem;
  margin-bottom: 1.4rem;
}

.pricing-price sup { font-size: 1rem; font-weight: 600; color: var(--text2); }

.pricing-price strong {
  font-size: clamp(2.4rem, 3.8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.pricing-price span { font-size: 0.88rem; color: var(--text3); }

.pricing-features {
  list-style: none;
  display: grid;
  gap: 0.52rem;
  margin-bottom: 1.45rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text2);
}

.pricing-features li::before {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2322c55e'%3E%3Cpath fill-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.865rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

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

.pricing-cta.owned {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.36);
}

.pricing-cta.white {
  color: #000;
  background: #fff;
  border: 1px solid #ddd;
}

.pricing-cta.disabled {
  color: var(--text3);
  background: #161616;
  border: 1px solid var(--line);
  cursor: not-allowed;
  opacity: 0.65;
  transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   API KEYS PAGE
   ═══════════════════════════════════════════════════════════════ */
.api-keys-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: #0f0f0f;
  box-shadow: var(--inset-shine), 0 1px 3px rgba(0,0,0,0.5);
  padding: 1.6rem;
  margin-top: 1rem;
}

.api-keys-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, transparent 38%);
}

.api-keys-section + .api-keys-section { margin-top: 1rem; }

.discord-link-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1.1rem;
  background: #5865f2;
  color: #fff;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.discord-link-btn:hover { background: #4752c4; transform: translateY(-1px); }

.discord-linked { display: grid; gap: .5rem; }
.discord-linked-info {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}
.discord-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(88,101,242,.15);
  color: #5865f2;
  flex-shrink: 0;
}

.plan-upgrade-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.plan-upgrade-banner strong { display: block; color: var(--text); margin-bottom: .25rem; }
.plan-upgrade-banner p { color: var(--text-muted); font-size: .875rem; margin: 0; }

.settings-info-grid { display: grid; gap: .1rem; }
.settings-info-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.settings-info-row:last-child { border-bottom: none; }
.settings-info-label { color: var(--text-muted); font-size: .875rem; min-width: 160px; flex-shrink: 0; }
.settings-info-value { color: var(--text); font-size: .9rem; font-family: var(--font-mono); }

.api-keys-section h2 {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-create-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
}

.api-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.api-key-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.api-key-value {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text3);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--text2);
  font-size: 0.88rem;
  padding: 2.5rem 0;
  min-height: 180px;
}

.spinner-icon {
  width: 32px;
  height: 32px;
  border: 2px solid #1f1f1f;
  border-top-color: var(--text);
  border-right-color: var(--text2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer { position: relative; z-index: 1; padding: 0 0 2rem; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--r-xl);
  border: 1px solid #1a1a1a;
  background: var(--surface);
  box-shadow: var(--inset-shine), 0 1px 3px rgba(0,0,0,0.3);
}

.footer-copy,
.footer-links a {
  color: var(--text2);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-content: flex-start;
}

.footer-links a:hover { color: var(--cyan); }

/* ─── Admin ──────────────────────────────────────────────────── */
body.page-admin .stat-card strong {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

/* ═══════════════════════════════════════════════════════════════
   PRICING — layout double grille
   ═══════════════════════════════════════════════════════════════ */
.pricing-layout { padding-bottom: 3rem; }

.pricing-grid-top  { margin-bottom: 1rem; }

.pricing-grid-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: calc(66.66% - 0.34rem);
}

/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.testimonial-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: var(--surface);
  box-shadow: var(--inset-shine), 0 1px 3px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, transparent 38%);
  border-radius: inherit;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  border-color: #2e2e2e;
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.testimonial-text {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.testimonial-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(135deg, #9333ea, #2dd4bf);
  border: 1px solid rgba(255,255,255,0.1);
}

.testimonial-author strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text);
}

.testimonial-author span {
  display: block;
  font-size: 0.775rem;
  color: var(--text3);
}

.testimonial-cta-section { margin-top: 0; }

/* ═══════════════════════════════════════════════════════════════
   API STATUS PAGE
   ═══════════════════════════════════════════════════════════════ */
.status-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.status-service-row:first-of-type { border-top: 0; }

.status-service-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.status-service-info strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.12rem;
}

.status-service-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text3);
}

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

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: blink 2.4s ease-in-out infinite;
}

.status-dot.degraded { background: #fbbf24; }
.status-dot.offline  { background: var(--danger); }

.status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge.online {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.degraded {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.offline {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.status-metric-card {
  padding: 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid #1a1a1a;
  background: #0d0d0d;
  text-align: center;
}

.status-metric-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.status-metric-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .split-section,
  .docs-grid,
  .panel-grid,
  .footer-inner { grid-template-columns: 1fr; }

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

  .topbar-inner { flex-wrap: wrap; justify-content: center; }

  .brand-mark { order: 0; width: 100%; justify-content: center; }
  .topnav     { order: 1; justify-content: center; flex-wrap: wrap; }
  .topbar-status { order: 2; width: 100%; justify-content: center; }

  .inbox-address-card,
  .inbox-plan-card { flex-direction: column; align-items: stretch; }

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

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

  .pricing-grid-bottom { max-width: 100%; }

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

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

  .home-steps-grid {
    grid-template-columns: 1fr;
  }
  .home-step-arrow { display: none; }

  .home-stats-strip { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 720px) {
  .container,
  .docs-layout,
  .dashboard-layout,
  .inbox-layout,
  .status-layout,
  .admin-login-layout {
    width: min(calc(100vw - 1.25rem), 1180px);
  }

  .hero-copy,
  .hero-panel,
  .content-card,
  .table-card,
  .auth-card,
  .status-card { padding: 1.1rem; }

  .stats-grid,
  .dashboard-stats { grid-template-columns: 1fr; }

  .topnav { width: 100%; justify-content: center; gap: 0.1rem; }

  .topnav a {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.42rem 0.65rem;
    font-size: 0.8rem;
    border-radius: var(--r-xs);
  }

  .input-row,
  .section-head,
  .hero-actions,
  .alert-card-head,
  .inbox-header,
  .meta-strip,
  .mailbox-meta,
  .message-card-top { flex-direction: column; align-items: stretch; }

  .hero-copy h1,
  .page-header h1,
  .auth-card h1,
  .status-card h1 { font-size: 1.85rem; }

  .primary-button,
  .secondary-button,
  .ghost-button { width: 100%; }

  .inbox-actions { display: grid; grid-template-columns: 1fr; }

  .history-item { flex-direction: column; align-items: stretch; }

  .pricing-grid { grid-template-columns: 1fr; }

  .pricing-grid-bottom { max-width: 100%; }

  .testimonials-grid { grid-template-columns: 1fr; }

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

  .home-features-grid { grid-template-columns: 1fr; }

  .home-gen-row { grid-template-columns: 1fr; }

  .home-stats-strip { flex-direction: column; padding: 1rem; }

  .home-stat-sep { width: 60px; height: 1px; }

  .inbox-actions { flex-wrap: wrap; }

  .api-create-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES  (login / register)
   ═══════════════════════════════════════════════════════════════ */
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 2rem 0 4rem;
}

/* Auth card already defined in the surfaces block — just add inner padding helpers */
.auth-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text2);
  letter-spacing: -0.005em;
}

.auth-hint {
  font-size: 0.8rem;
  color: var(--text3);
  line-height: 1.45;
}

.auth-switch {
  text-align: center;
  color: var(--text2);
  font-size: 0.875rem;
  margin-top: 1.2rem;
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 1.1rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 720px) {
  .auth-layout {
    align-items: flex-start;
    padding-top: 0;
    min-height: unset;
  }
}