:root {
  --background: 40 33% 98%;
  --foreground: 160 30% 12%;
  --card: 0 0% 100%;
  --card-foreground: 160 30% 12%;
  --primary: 173 80% 26%;
  --primary-foreground: 0 0% 100%;
  --secondary: 173 45% 18%;
  --secondary-foreground: 0 0% 98%;
  --muted: 160 15% 94%;
  --muted-foreground: 160 10% 40%;
  --accent: 173 40% 92%;
  --accent-foreground: 173 80% 20%;
  --border: 160 12% 88%;
  --input: 160 12% 88%;
  --ring: 173 80% 26%;
  --radius: 0.5rem;
  --danger: 0 72% 42%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, hsl(var(--primary) / 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, hsl(var(--secondary) / 0.08), transparent);
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.container-narrow {
  max-width: 48rem;
}

.container-wide {
  max-width: 72rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  height: 2rem;
}

.brand-name {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.brand-sub {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.muted {
  color: hsl(var(--muted-foreground));
}

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.card-soft {
  border: none;
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(6px);
}

.card-header {
  padding: 1.25rem 1.25rem 0.5rem;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.stat-label {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  text-transform: capitalize;
  margin: 0 0 0.35rem;
}

.stat-value {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, opacity 0.15s, border-color 0.15s;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border-color: hsl(var(--input));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 2rem;
}

.btn-block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
}

.input {
  height: 2.5rem;
  width: 100%;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  font-size: 0.9rem;
  font-family: inherit;
  color: hsl(var(--foreground));
}

.input:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 1px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(0 0% 100% / 0.7);
  overflow: hidden;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.list li + li {
  border-top: 1px solid hsl(var(--border));
}

.section-title {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error {
  color: hsl(var(--danger));
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
}

.capitalize {
  text-transform: capitalize;
}

.loading {
  padding: 2rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .container {
    padding: 1.25rem 1rem 2rem;
  }

  .header {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .brand-name {
    font-size: 1.45rem;
  }

  .card-header,
  .card-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn-lg {
    width: 100%;
  }

  .row {
    flex-wrap: wrap;
  }

  .membership-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .membership-row > span:last-child {
    text-align: left !important;
  }
}

