/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;

  --gold: #d97706;
  --gold-light: #fef3c7;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);
  --transition: 0.2s ease;

  --font: "Inter", system-ui, -apple-system, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-800);
}
.navbar__brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
}
.navbar__links a:hover {
  color: var(--green-700);
}
.navbar__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--green-600);
  color: var(--green-700);
}
.btn-outline:hover {
  background: var(--green-50);
}
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}
.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}
.btn-danger:hover {
  background: #fecaca;
}
.btn-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #fde68a;
}
.btn-warning:hover {
  background: #fde68a;
}
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(
    145deg,
    var(--green-900) 0%,
    var(--green-700) 60%,
    var(--green-500) 100%
  );
  color: white;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero__title span {
  color: var(--green-400);
}
.hero__subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__actions .btn-primary {
  background: white;
  color: var(--green-800);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.hero__actions .btn-primary:hover {
  transform: translateY(-2px);
}
.hero__actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}
.hero__actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ─── Section ────────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 1.5rem;
}
.section--alt {
  background: white;
}
.container {
  max-width: 1080px;
  margin: 0 auto;
}
.section__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 0.5rem;
}
.section__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}
.section__subtitle {
  font-size: 1rem;
  color: var(--gray-600);
  max-width: 520px;
}

/* ─── Feature Grid ───────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.feature-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--green-200, #a7f3d0);
}
.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--green-50);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.feature-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}
.feature-card__desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ─── Steps ──────────────────────────────────────────────────────────────── */
.steps {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.step {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 1rem;
}
.step__num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step__title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}
.step__desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ─── Pricing / Tier Cards ───────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.tier-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: all var(--transition);
}
.tier-card--featured {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}
.tier-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tier-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tier-card__price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0.5rem 0 1.25rem;
}
.tier-card__price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
}
.tier-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}
.tier-card__features li {
  font-size: 0.875rem;
  color: var(--gray-700);
  display: flex;
  gap: 0.5rem;
}
.tier-card__features li::before {
  content: "✓";
  color: var(--green-600);
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Code Block ─────────────────────────────────────────────────────────── */
.code-block {
  background: var(--gray-900);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
  overflow-x: auto;
  position: relative;
}
.code-block .kw {
  color: #93c5fd;
}
.code-block .str {
  color: #86efac;
}
.code-block .cm {
  color: #64748b;
}
.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--gray-700);
  color: var(--gray-300);
  border: none;
  border-radius: 0.375rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}
.copy-btn:hover {
  background: var(--gray-600);
}

/* ─── Form ───────────────────────────────────────────────────────────────── */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--green-900), var(--green-700));
  padding: 2rem 1rem;
}
.form-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.form-card__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--green-800);
  margin-bottom: 2rem;
}
.form-card__logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}
.form-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}
.form-card__subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
  margin-bottom: 1.75rem;
}
.form-group {
  margin-bottom: 1.1rem;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: white;
}
.form-input.error {
  border-color: #f87171;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
}
.form-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.3rem;
  display: none;
}
.form-divider {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin: 1.25rem 0;
  position: relative;
}
.form-divider::before,
.form-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 2rem);
  height: 1px;
  background: var(--gray-200);
}
.form-divider::before {
  left: 0;
}
.form-divider::after {
  right: 0;
}

/* ─── Alert ──────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.alert-success {
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-100);
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fee2e2;
}
.alert-warning {
  background: var(--gold-light);
  color: #92400e;
  border: 1px solid #fde68a;
}
.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ─── Dashboard Layout ───────────────────────────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 64px);
}
.sidebar {
  background: var(--gray-900);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar__section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 0.75rem 0.75rem 0.25rem;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: all var(--transition);
  cursor: pointer;
}
.sidebar__link:hover,
.sidebar__link.active {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}
.sidebar__link.active {
  color: var(--green-400);
}
.sidebar__icon {
  width: 18px;
  text-align: center;
}
.dash-main {
  padding: 2rem;
  overflow-y: auto;
  background: var(--gray-50);
}

/* ─── Stat Cards ─────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0.2rem 0;
}
.stat-card__sub {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ─── Progress Bar ───────────────────────────────────────────────────────── */
.progress-wrap {
  margin-top: 0.5rem;
}
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-600), var(--green-400));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.progress-bar__fill.warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.progress-bar__fill.danger {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.progress-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
}

/* ─── Table ──────────────────────────────────────────────────────────────── */
.table-wrap {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.table-head {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-head__title {
  font-weight: 700;
  color: var(--gray-900);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 0.75rem 1.5rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
td {
  padding: 0.85rem 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: var(--gray-50);
}

/* ─── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-green {
  background: var(--green-100);
  color: var(--green-800);
}
.badge-gold {
  background: var(--gold-light);
  color: var(--gold);
}
.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge-red {
  background: #fee2e2;
  color: #dc2626;
}
.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge::before {
  content: "●";
  font-size: 0.5rem;
}

/* ─── Key display ────────────────────────────────────────────────────────── */
.key-display {
  font-family: "Fira Code", monospace;
  background: var(--gray-900);
  color: var(--green-400);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.key-display__text {
  flex: 1;
  word-break: break-all;
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
/* Modal styles moved to dashboard section below */

/* ─── User Avatar ────────────────────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-700), var(--green-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

/* ─── Page header ────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.75rem;
}
.page-header__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
}
.page-header__sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}
footer a {
  color: var(--green-400);
}
footer a:hover {
  text-decoration: underline;
}

/* ─── Donation Banner (top of page) ─────────────────────────────────────── */
.donation-banner {
  background: linear-gradient(90deg, var(--green-800), var(--green-700));
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}
.donation-banner a {
  color: #86efac;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.donation-banner a:hover {
  color: white;
}

/* ─── Donate Cards ───────────────────────────────────────────────────────── */
.donate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  color: white;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.donate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}
.donate-card__icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}
.donate-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.donate-card__desc {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.donate-card__btn {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: background var(--transition);
}
.donate-card:hover .donate-card__btn {
  background: rgba(255, 255, 255, 0.3);
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.hidden {
  display: none !important;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .hero {
    padding: 4rem 1rem 3.5rem;
  }
}

/* ─── Dashboard extras ───────────────────────────────────────────────────── */
.dashboard-main {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: var(--gray-50);
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}
.dashboard-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

/* sidebar brand & user */
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}
.sidebar__user {
  margin-top: auto;
  padding: 1rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-700), var(--green-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
}
.sidebar__link--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Card (generic) */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.card__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.card__body {
  padding: 1.5rem;
}
.card__body--flush {
  padding: 0;
  overflow: hidden;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* stat-card icon */
.stat-card__icon {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

/* Tier-specific badges */
.badge-free {
  background: var(--green-100);
  color: var(--green-800);
}
.badge-pro {
  background: var(--gold-light);
  color: var(--gold);
}
.badge-admin {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-success {
  background: #dcfce7;
  color: #166534;
}

/* Alert: danger alias */
.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fee2e2;
}

/* form-card brand link */
.form-card__brand {
  margin-bottom: 1.75rem;
}

/* Key display full banner style */
.key-display {
  font-family: "Fira Code", monospace;
  background: var(--gray-900);
  color: var(--green-400);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: block;
  margin: 0 0 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.key-display__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--green-300);
  margin-bottom: 0.5rem;
}
.key-display__warning {
  font-size: 0.8rem;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  font-family: var(--font);
}
.key-display__box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  padding: 0.65rem 1rem;
}
.key-display__box code {
  flex: 1;
  word-break: break-all;
  font-size: 0.8rem;
  color: var(--green-300);
}

/* Modal — new structure */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal.open {
  opacity: 1;
  pointer-events: all;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.modal__content {
  position: relative;
  background: white;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(8px);
  transition: transform var(--transition);
}
.modal.open .modal__content {
  transform: scale(1) translateY(0);
}
.modal__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
}
.modal__close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0.25rem;
  border-radius: 0.375rem;
  line-height: 1;
}
.modal__close:hover {
  color: var(--gray-700);
}
.modal__body {
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* table inside card */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 0.75rem 1.5rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.table td {
  padding: 0.85rem 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background: var(--gray-50);
}
