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

:root {
  --ink: #20231f;
  --ink-soft: #4a4636;
  --muted: #8a8474;
  --border: #e7e1d3;
  --border-soft: #efe9dc;
  --card: #ffffff;
  --bg: #f6f4ef;
  --brand: #3d5a45;
  --brand-dark: #2b4033;
  --brand-light: #6b8f74;
  --brand-tint: #eaf3ea;
  --brand-tint-2: #dcebe0;
  --error: #8a2c2c;
  --error-bg: #fbeaea;
  --error-border: #f0cccc;
  --ok: #2c5f36;
  --ok-bg: #eaf3ea;
  --warn: #8a6a1c;
  --warn-bg: #fbeecd;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(32,35,31,0.04), 0 2px 8px rgba(32,35,31,0.04), 0 20px 48px -20px rgba(32,35,31,0.16);
  --shadow-btn: 0 1px 2px rgba(32,35,31,0.08), 0 6px 16px -6px rgba(61,90,69,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background:
    radial-gradient(680px 420px at 92% -8%, rgba(61,90,69,0.10), transparent 60%),
    radial-gradient(560px 360px at -6% 18%, rgba(184,98,42,0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* --- En-tete --- */

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255,253,249,0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.portal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.portal-header .brand::before {
  content: '';
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(155deg, var(--brand), var(--brand-dark));
  box-shadow: 0 2px 6px rgba(61,90,69,0.35);
  flex-shrink: 0;
}
.header-right { display: flex; align-items: center; gap: 20px; font-size: 0.87rem; color: var(--ink-soft); }
.header-link { color: var(--ink-soft); text-decoration: none; transition: color 0.15s ease; }
.header-link:hover { color: var(--brand); }
.portal-lang-switch { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: 3px; }
.portal-lang-switch button {
  border: none; background: none; padding: 5px 9px; border-radius: 6px;
  font-size: 0.76rem; font-weight: 700; color: var(--muted); cursor: pointer;
  font-family: inherit;
}
.portal-lang-switch button.active { background: var(--card); color: var(--brand); box-shadow: 0 1px 2px rgba(32,35,31,0.08); }

/* --- Stepper --- */

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 580px;
  margin: 44px auto 0;
  padding: 0 24px;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  background: white; border: 2px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.step-label { font-size: 0.74rem; color: var(--muted); text-align: center; white-space: nowrap; transition: color 0.2s ease; }
.step-line { flex: 1; height: 2px; background: var(--border); margin-top: 16px; min-width: 24px; border-radius: 2px; transition: background 0.3s ease; }
.step.done .step-circle { background: var(--brand); border-color: var(--brand); color: transparent; }
.step.done .step-circle::after {
  content: '\2713';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.85rem; font-weight: 700;
}
.step.done .step-label { color: var(--brand); }
.step.active .step-circle { border-color: var(--brand); color: var(--brand); transform: scale(1.08); box-shadow: 0 0 0 4px var(--brand-tint); }
.step.active .step-label { color: var(--brand); font-weight: 700; }
.step-line.done { background: var(--brand); }

@media (max-width: 560px) {
  .step-label { display: none; }
  .stepper { margin-top: 30px; }
}

/* --- Cartes --- */

.portal-wrap {
  max-width: 440px;
  margin: 48px auto 60px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 34px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.portal-wrap.wide { max-width: 760px; }

.portal-wrap h1 { color: var(--ink); font-size: 1.5rem; margin-top: 0; letter-spacing: -0.01em; }

.icon-badge {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--brand-tint), var(--brand-tint-2));
  color: var(--brand);
  margin-bottom: 16px;
}
.icon-badge svg { width: 22px; height: 22px; }

/* --- Layout deux colonnes (signup / login) --- */

.auth-shell {
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.auth-pitch {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  padding: 46px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.auth-pitch::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  top: -120px; right: -100px;
}
.auth-pitch h2 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; position: relative; }
.auth-pitch p.pitch-lead { margin: 0; color: rgba(255,255,255,0.82); font-size: 0.92rem; line-height: 1.55; position: relative; }
.value-props { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; position: relative; }
.value-props li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.88rem; color: rgba(255,255,255,0.92); line-height: 1.4; }
.value-props .vp-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
}
.value-props .vp-icon svg { width: 15px; height: 15px; }
.value-props strong { display: block; color: white; font-weight: 600; margin-bottom: 1px; }

.auth-form-side {
  background: var(--card);
  padding: 46px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-side h1 { margin-top: 0; font-size: 1.4rem; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; margin-top: 24px; }
  .auth-pitch { padding: 34px 28px; }
  .auth-form-side { padding: 34px 28px; }
}

/* --- Formulaires --- */

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 16px 0 6px;
  color: var(--ink-soft);
}
input, textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  background: #fdfcfa;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover, textarea:hover { border-color: #d3ccb9; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  background: white;
  box-shadow: 0 0 0 4px var(--brand-tint);
}
input::placeholder, textarea::placeholder { color: #b4ac97; }

button.primary {
  margin-top: 22px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
button.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(32,35,31,0.1), 0 10px 22px -6px rgba(61,90,69,0.45); }
button.primary:active { transform: translateY(0); }
button.primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

button.secondary {
  padding: 11px 22px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
button.secondary:hover { border-color: var(--brand); }
button.secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.msg {
  margin-top: 14px;
  font-size: 0.85rem;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.msg.error { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }
.msg.ok { background: var(--ok-bg); color: var(--ok); border-color: #cfe6d4; }

.switch-link { margin-top: 18px; font-size: 0.85rem; text-align: center; color: var(--muted); }
.switch-link a { color: var(--brand); font-weight: 600; text-decoration: none; }
.switch-link a:hover { text-decoration: underline; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 4px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.45;
}
.checkbox-label input[type="checkbox"] {
  width: 17px; height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand);
}
.checkbox-label a { color: var(--brand); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.status-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-badge.pending { background: var(--warn-bg); color: var(--warn); }
.status-badge.pending::before { background: var(--warn); }
.status-badge.active { background: var(--ok-bg); color: var(--ok); }
.status-badge.active::before { background: var(--ok); }

table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--border-soft); font-size: 0.88rem; }
th { color: var(--ink-soft); font-weight: 600; }

button.small {
  padding: 7px 13px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--brand);
  color: white;
  transition: opacity 0.15s ease;
}
button.small:hover { opacity: 0.88; }
button.small.secondary { background: #b8622a; }

.warning-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.86rem;
  margin: 18px 0;
  font-weight: 600;
  line-height: 1.45;
}

/* --- Sections (questionnaire onboarding) --- */

fieldset.section-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin: 16px 0;
  padding: 20px 22px 22px;
  background: #fdfcfa;
  transition: border-color 0.15s ease;
}
fieldset.section-card:hover { border-color: var(--border); }
fieldset.section-card legend {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0 4px;
}
.section-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-icon svg { width: 16px; height: 16px; }

code.snippet {
  display: block;
  background: #1c1e1a;
  color: #e8e6df;
  padding: 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.8rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}
.snippet-wrap { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); margin-top: 14px; }
.snippet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #14161a;
  padding: 9px 10px 9px 14px;
}
.snippet-bar .snippet-dots { display: flex; gap: 6px; }
.snippet-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: #3a3d38;
}
.copy-btn {
  background: rgba(255,255,255,0.08);
  color: #e8e6df;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.copy-btn:hover { background: rgba(255,255,255,0.16); }
.copy-btn.copied { background: var(--brand); border-color: var(--brand); color: white; }

.custom-section-row {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
  position: relative;
  background: white;
}
.custom-section-row .custom-title { font-weight: 600; margin-bottom: 10px; }
.remove-custom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #b8622a;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
}
.add-custom-btn {
  background: none;
  border: 1.5px dashed var(--brand);
  color: var(--brand);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
  margin-top: 8px;
  font-family: inherit;
  transition: background 0.15s ease;
}
.add-custom-btn:hover { background: var(--brand-tint); }

/* --- Cartes de contenu (dashboard) --- */

.info-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 18px;
  background: #fdfcfa;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-card .info-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-card .info-icon svg { width: 18px; height: 18px; }
.info-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }

.install-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.86rem; color: var(--ink-soft); }
.install-steps .num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-icon svg { width: 30px; height: 30px; }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Page Parametres : sidebar + panneaux --- */

.settings-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 720px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-sidebar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; position: static; }
}

.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 90px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.settings-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.settings-nav-item.active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.settings-nav-item:hover { background: var(--brand-tint); color: var(--brand-dark); }

.settings-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.settings-panel {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  scroll-margin-top: 90px;
}
.settings-panel-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.settings-panel-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-panel-icon svg { width: 18px; height: 18px; }
.settings-panel-icon.danger { background: var(--error-bg); color: var(--error); }
.settings-panel-title { font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 2px; }
.settings-panel-desc { font-size: 0.83rem; color: var(--muted); }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}
.settings-row:first-of-type { border-top: none; padding-top: 4px; }
.settings-row-title { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.settings-row-desc { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.settings-row-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: none;
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.settings-row-btn:hover { border-color: var(--brand); }
.settings-row-btn.danger { border-color: var(--error-border); color: var(--error); }
.settings-row-btn.danger:hover { background: var(--error-bg); }

.settings-reveal { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

.announcement-item { padding: 14px 0; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.announcement-item:first-of-type { border-top: none; padding-top: 4px; }
.announcement-date { font-size: 0.78rem; color: var(--muted); margin-bottom: 3px; }
.announcement-content { font-size: 0.85rem; color: var(--ink); white-space: pre-wrap; line-height: 1.45; }
.announcement-expires { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--brand-tint);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* --- Admin : shell tableau de bord --- */

.admin-shell { display: flex; align-items: stretch; min-height: 100vh; }

.admin-sidebar {
  width: 216px;
  flex-shrink: 0;
  background: var(--ink);
  color: #c7c9c3;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 22px;
  color: white; font-weight: 800; font-size: 1.02rem; text-decoration: none;
}
.admin-sidebar-brand .icon-badge { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); flex-shrink: 0; }
.admin-sidebar-brand .tag {
  font-size: 0.65rem; font-weight: 700; background: rgba(255,255,255,0.12); color: #b8bcb5;
  padding: 2px 7px; border-radius: 999px; margin-left: 1px;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #7d7f78; padding: 14px 12px 6px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: #c7c9c3; text-decoration: none; font-size: 0.86rem; font-weight: 500;
  border: none; background: none; cursor: pointer; text-align: left; width: 100%; font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-nav-item:hover { background: rgba(255,255,255,0.07); color: white; }
.admin-nav-item.active { background: var(--brand); color: white; }
.admin-sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 2px; }

.admin-main { flex: 1; min-width: 0; background: var(--bg); padding: 30px 34px 60px; }
.admin-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-topbar h1 { margin: 0 0 4px; font-size: 1.5rem; }
.admin-topbar p { margin: 0; color: var(--muted); font-size: 0.85rem; max-width: 560px; }
.admin-search { position: relative; }
.admin-search input { margin: 0; width: 260px; padding-left: 34px; }
.admin-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-stat-card {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px;
}
.admin-stat-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--brand-tint); color: var(--brand);
}
.admin-stat-icon.warn { background: var(--warn-bg); color: var(--warn); }
.admin-stat-icon.muted { background: var(--border-soft); color: var(--ink-soft); }
.admin-stat-icon svg { width: 17px; height: 17px; }
.admin-stat-num { font-size: 1.4rem; font-weight: 800; color: var(--ink); line-height: 1.15; }
.admin-stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }

.admin-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 18px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.admin-card-title { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.admin-card-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }

.admin-chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 100px; }
.admin-chart-bar { flex: 1; background: var(--border-soft); border-radius: 3px 3px 0 0; min-height: 3px; }
.admin-chart-bar.has-value { background: var(--brand-light); }
.admin-chart-foot { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin-top: 6px; }

.admin-table-wrap { overflow-x: auto; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pill.active { background: var(--ok-bg); color: var(--ok); }
.status-pill.trialing { background: var(--warn-bg); color: var(--warn); }
.status-pill.pending { background: var(--border-soft); color: var(--ink-soft); }
.status-pill.past_due, .status-pill.unpaid, .status-pill.canceled { background: var(--error-bg); color: var(--error); }

.admin-list-item { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.admin-list-item:first-child { border-top: none; padding-top: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
