:root {
  --font-size: 16px;
  --background: #fefffe;
  --foreground: #302f4d;
  --card: #ffffff;
  --card-foreground: #302f4d;
  --popover: #ffffff;
  --popover-foreground: #302f4d;
  --primary: #00a878;
  --primary-foreground: #ffffff;
  --secondary: #caffb9;
  --secondary-foreground: #302f4d;
  --muted: #eef8f4;
  --muted-foreground: #6b7a74;
  --accent: #caffb9;
  --accent-foreground: #302f4d;
  --destructive: #e43f6f;
  --destructive-foreground: #ffffff;
  --border: rgba(48, 47, 77, 0.12);
  --input: transparent;
  --input-background: #eef8f4;
  --switch-background: #caffb9;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: #00a878;
  --chart-1: #00a878;
  --chart-2: #caffb9;
  --chart-3: #302f4d;
  --chart-4: #e43f6f;
  --radius: 0.625rem;
  --sidebar: #302f4d;
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #00a878;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: rgba(255, 255, 255, 0.08);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-ring: #00a878;
  --warning: #f59e0b;
  --warning-soft: #fff3e0;
  --referral: #7c3aed;
  --referral-soft: #ede9fe;
  --neutral: #64748b;
  --neutral-soft: #f1f5f9;
  --groups: #84cc16;
  --bg: var(--background);
  --bg-soft: var(--muted);
  --card-soft: var(--muted);
  --text: var(--foreground);
  --primary-dark: #008f66;
  --primary-soft: #e6f7f3;
  --danger: var(--destructive);
  --danger-soft: #fdeef3;
  --border-strong: rgba(48, 47, 77, 0.2);
  --sidebar-muted: rgba(255, 255, 255, 0.5);
  --shadow-card: none;
  --shadow-elevated: 0 18px 44px -30px rgba(48, 47, 77, 0.42);
  --radius-card: 12px;
  --radius-control: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: 1.5;
}

a {
  color: inherit;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 240px;
  padding: 0;
  overflow-y: auto;
  color: #fff;
  background: var(--sidebar);
  border-right: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 73px;
  padding: 20px;
  border-bottom: 1px solid var(--sidebar-border);
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.brand-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  line-height: 1.2;
}

.nav-links {
  display: grid;
  flex: 1;
  gap: 20px;
  padding: 16px 12px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-group:nth-child(2) .nav-group-title::before {
  background: var(--secondary);
}

.nav-group:nth-child(3) .nav-group-title::before {
  background: var(--danger);
}

.nav-links a {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links a[aria-current="page"] {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  font-weight: 600;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
}

.logout-form {
  margin-top: auto;
}

.content-shell {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 0;
  background: var(--bg);
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
}

.topbar-kicker {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-title {
  margin-top: 3px;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.container {
  width: 100%;
  margin: 0 auto;
  display: grid;
  max-width: none;
  gap: 24px;
  padding: 28px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.page-header {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: var(--card);
}

.page-header::after {
  content: none;
}

.section-stack {
  display: grid;
  gap: 12px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

p {
  margin: 0 0 10px;
}

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

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
  background: var(--muted);
  box-shadow: none;
}

.btn-primary {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: none;
}

.btn-primary:hover {
  color: #fff;
  background: var(--primary);
  opacity: 0.88;
}

.btn-danger {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.btn-danger:hover {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
  opacity: 0.88;
}

.btn-link {
  width: 100%;
  border-color: var(--sidebar-border);
  color: rgba(255, 255, 255, 0.82);
  background: var(--sidebar-accent);
}

.btn-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.btn-small {
  min-height: 28px;
  height: 28px;
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.stat-card::before {
  content: none;
}

.stat-label {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 5px;
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-value.small {
  font-size: 14px;
  font-weight: 700;
}

.overview-stat {
  background: #fff;
}

.quick-actions,
.form-actions,
.filters-actions,
.inline-actions,
.table-actions,
.dialog-actions,
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quick-actions {
  margin-top: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.nav-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 168px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
}

.nav-card-active {
  border-color: rgba(0, 168, 120, 0.5);
  background: var(--primary-soft);
}

.table-card {
  overflow: hidden;
  padding: 20px;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.table th,
.table td {
  padding: 14px 20px;
  border-bottom: 0;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  padding: 10px 20px;
  border-top: 0;
  color: var(--muted-foreground);
  background: rgba(202, 255, 185, 0.19);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.table tbody tr:hover {
  background: rgba(238, 248, 244, 0.4);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.user-table {
  min-width: 1180px;
}

.push-analytics-table {
  min-width: 1320px;
}

.paywall-attribution-table {
  min-width: 1180px;
}

.reason-cell {
  max-width: 220px;
}

.tiny {
  margin-top: 4px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-label {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
}

.section-note {
  margin: 12px 0;
}

.filter-card {
  display: grid;
  gap: 10px;
}

.form-card {
  display: grid;
  gap: 14px;
}

.analytics-card {
  display: grid;
  gap: 12px;
}

.empty-state {
  display: grid;
  min-height: 160px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 32px 16px;
  border: 0;
  border-radius: var(--radius-card);
  color: var(--muted-foreground);
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.loading-state,
.error-state {
  border-radius: var(--radius-control);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

.loading-state {
  color: var(--muted-foreground);
  background: var(--card-soft);
}

.error-state {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(228, 63, 111, 0.28);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 12px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(0, 168, 120, 0.25);
  outline-offset: 2px;
  border-color: var(--primary);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox-row input {
  width: 18px;
  min-height: auto;
  height: 18px;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.flash {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

.flash-success {
  border-color: rgba(0, 168, 120, 0.28);
  background: var(--primary-soft);
}

.flash-error {
  border-color: rgba(228, 63, 111, 0.28);
  color: var(--danger);
  background: var(--danger-soft);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  background: var(--neutral-soft);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.pill-success {
  border-color: transparent;
  color: var(--primary);
  background: #e6f7f3;
}

.pill-danger {
  border-color: transparent;
  color: var(--danger);
  background: #fdeef3;
}

.pill-muted {
  color: var(--muted-foreground);
  background: #f6f7f8;
}

.modal {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-elevated);
}

.modal::backdrop {
  background: rgba(48, 47, 77, 0.44);
}

.modal-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.modal-form textarea {
  min-height: 110px;
}

.danger-zone {
  border-top: 4px solid var(--danger);
}

.noscript-actions,
.inline-reason-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.inline-reason-form textarea {
  min-height: 80px;
}

.chart-card {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
}

.chart-empty {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--muted-foreground);
  background: var(--card-soft);
  font-size: 14px;
}

.compact-table {
  margin-top: 12px;
}

.map-placeholder {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--card-soft);
}

.map-placeholder-title {
  font-size: 20px;
  font-weight: 700;
}

.map-card,
.map-legend {
  display: grid;
  gap: 12px;
}

.map-status {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--muted-foreground);
  background: var(--card-soft);
  font-size: 14px;
}

.map-status.is-error {
  border-color: rgba(228, 63, 111, 0.28);
  color: var(--danger);
  background: var(--danger-soft);
}

.map-status.is-success {
  border-color: rgba(0, 168, 120, 0.28);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.map-status.is-empty {
  color: var(--muted-foreground);
  background: var(--card-soft);
}

.map-canvas {
  width: 100%;
  height: 460px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #eef8f4;
}

.map-legend-title {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.map-legend-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.legend-dot {
  display: inline-block;
  border: 1px solid rgba(0, 143, 102, 0.9);
  border-radius: 999px;
  background: rgba(0, 168, 120, 0.55);
}

.legend-dot-sm {
  width: 12px;
  height: 12px;
}

.legend-dot-md {
  width: 20px;
  height: 20px;
}

.legend-dot-lg {
  width: 30px;
  height: 30px;
}

.map-sidepanel {
  align-content: start;
}

.map-layout {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.module-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--sidebar);
}

.login-wrap {
  width: min(460px, 100%);
}

.login-card {
  padding: 30px;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-elevated);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-card .brand-title {
  color: var(--text);
}

.login-card .brand-subtitle {
  color: var(--muted-foreground);
}

.login-card .form-grid {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 14px;
  }

  .nav-links {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-group {
    min-width: max-content;
  }

  .nav-group-title {
    padding-left: 4px;
  }

  .nav-links a {
    min-height: 34px;
    white-space: nowrap;
  }

  .logout-form {
    margin-top: 0;
  }

  .content-shell {
    padding: 16px;
  }

  .container {
    max-width: none;
  }

  .two-column-grid,
  .map-layout {
    grid-template-columns: 1fr;
  }

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

  .chart-wrap {
    height: 250px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .content-shell {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .card,
  .page-header,
  .login-card {
    padding: 16px;
  }

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

  .stat-value {
    font-size: 25px;
  }

  .map-canvas {
    height: 360px;
  }
}

/* Figma-scoped sidebar and dashboard implementation */
.app-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  width: 240px;
  gap: 0;
  padding: 0;
  background: var(--sidebar);
}

.brand {
  min-height: 73px;
  padding: 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 14px;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.nav-links {
  flex: 1;
  gap: 20px;
  padding: 16px 12px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.nav-group-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-group:nth-child(2) .nav-group-title::before {
  background: var(--secondary);
}

.nav-group:nth-child(3) .nav-group-title::before {
  background: var(--danger);
}

.nav-links a,
.sidebar-footer-item {
  min-height: 34px;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.sidebar-footer-item:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links a[aria-current="page"] {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  font-weight: 650;
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: currentColor;
}

.nav-icon svg,
.dashboard-kpi-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: grid;
  gap: 2px;
  padding: 16px 12px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer-item {
  display: flex;
  align-items: center;
}

.logout-form {
  margin: 0;
}

.btn-link {
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.35);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.btn-link:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-settings-link[aria-current="page"] {
  color: #fff;
  background: var(--primary);
}

.content-shell {
  padding: 0;
}

.topbar {
  display: none;
}

.container {
  max-width: none;
  padding: 28px;
}

.dashboard-figma-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 0;
}

.dashboard-figma-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.dashboard-figma-header p,
.dashboard-panel-head p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.range-control {
  position: relative;
  display: inline-flex;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.range-control a,
.range-control button,
.range-control span,
.range-custom summary {
  min-width: 58px;
  padding: 6px 12px;
  border: 0;
  color: rgba(48, 47, 77, 0.6);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.range-control > a:first-child,
.range-control > button:first-child,
.range-control > span:first-child {
  border-radius: 7px 0 0 7px;
}

.range-control > a:not(:last-child),
.range-control > button:not(:last-child),
.range-control > span:not(:last-child) {
  border-right: 1px solid var(--border);
}

.range-control a[aria-current="page"],
.range-control button[aria-current="page"] {
  color: #fff;
  background: var(--primary);
  font-weight: 500;
}

.range-custom {
  display: contents;
}

.range-custom summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 7px 7px 0;
  cursor: pointer;
  list-style: none;
}

.range-custom summary::-webkit-details-marker {
  display: none;
}

.range-custom summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.range-custom summary[aria-current="page"] {
  color: #fff;
  background: var(--primary);
}

.custom-range-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: max-content;
  min-width: 420px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.custom-range-popover label {
  display: grid;
  gap: 5px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.custom-range-popover input {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.range-control span {
  cursor: not-allowed;
}

.analysis-filter-panel {
  padding: 14px 16px;
}

.analysis-filter-form {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.analysis-filter-extra {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.analysis-filter-extra:empty {
  display: none;
}

.analysis-filter-extra label {
  display: grid;
  gap: 5px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analysis-filter-extra select,
.analysis-filter-extra input {
  min-height: 38px;
  min-width: 160px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.analysis-filter-range {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-kpi-card,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.dashboard-kpi-card {
  display: grid;
  min-height: 126px;
  gap: 6px;
  padding: 20px;
}

.dashboard-kpi-top,
.dashboard-kpi-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-kpi-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--primary);
}

.dashboard-kpi-icon-card {
  color: var(--text);
}

.dashboard-kpi-icon-users {
  color: var(--danger);
}

.dashboard-kpi-card .stat-value {
  font-size: 30px;
}

.dashboard-trend {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.sparkline {
  width: 64px;
  height: 36px;
  display: block;
  align-self: center;
  overflow: visible;
}

.sparkline polyline {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-panel {
  padding: 20px;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.chart-card-flush {
  margin: 0;
}

.dashboard-chart-wrap,
.dashboard-small-chart-wrap {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.dashboard-chart-wrap {
  height: 250px;
}

.dashboard-small-chart-wrap {
  height: 170px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-donut-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dashboard-donut {
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: conic-gradient(var(--primary) 0 var(--seeker-share), var(--secondary) var(--seeker-share) 100%);
  position: relative;
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 29px;
  border-radius: 999px;
  background: #fff;
}

.dashboard-donut-legend {
  display: grid;
  gap: 12px;
}

.dashboard-donut-legend div {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 7px;
  align-items: center;
}

.dashboard-donut-legend strong {
  grid-column: 2;
  font-size: 16px;
}

.legend-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.dashboard-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-mini-tile {
  border-radius: 8px;
  padding: 12px;
  background: var(--muted);
}

.dashboard-mini-tile span {
  display: block;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-mini-tile strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
}

.dashboard-link-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-link-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.dashboard-link-card:hover {
  border-color: rgba(0, 168, 120, 0.44);
}

.dashboard-link-card span {
  font-weight: 600;
}

.dashboard-link-card small {
  color: var(--muted-foreground);
  line-height: 1.35;
}

.dashboard-v2-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-v2-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 750;
}

.dashboard-v2-header p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.dashboard-v2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-v2-kpi-card,
.dashboard-v2-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.dashboard-v2-kpi-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.dashboard-v2-warning-card {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.dashboard-v2-kpi-label {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.dashboard-v2-kpi-main {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-v2-kpi-card strong,
.dashboard-v2-warning-card strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.dashboard-v2-warning-card strong {
  color: var(--danger);
}

.dashboard-v2-kpi-card small,
.dashboard-v2-warning-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-v2-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.dashboard-v2-trend.positive {
  color: var(--primary);
}

.dashboard-v2-trend.negative {
  color: var(--danger);
}

.dashboard-v2-panel {
  padding: 20px;
}

.dashboard-v2-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-v2-funnel {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.dashboard-v2-funnel-step {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}

.dashboard-v2-funnel-step strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.dashboard-v2-funnel-step span {
  min-height: 28px;
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.25;
}

.dashboard-v2-funnel-step i {
  width: 100%;
  max-width: 210px;
  min-height: 12px;
  display: block;
  border-radius: 8px 8px 0 0;
}

.dashboard-v2-funnel-step b {
  color: var(--text);
  font-size: 14px;
}

.dashboard-v2-funnel-step small {
  font-size: 12px;
  font-weight: 700;
}

.dashboard-v2-funnel-step small.success {
  color: var(--primary);
}

.dashboard-v2-funnel-step small.neutral {
  color: var(--text);
}

.dashboard-v2-funnel-step small.danger {
  color: var(--danger);
}

.dashboard-v2-funnel-step small.empty {
  color: #9ca3af;
}

.dashboard-v2-funnel-step em {
  color: var(--muted-foreground);
  font-size: 10px;
  font-style: normal;
}

.dashboard-v2-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dashboard-v2-insights span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
}

.dashboard-v2-insights i,
.dashboard-v2-paid-cards i,
.dashboard-v2-match-note i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
}

.dashboard-v2-insights i.danger,
.dashboard-v2-paid-cards i.danger,
.dashboard-v2-match-note i {
  background: var(--danger);
}

.dashboard-v2-insights i.referral,
.dashboard-v2-paid-cards i.referral {
  background: var(--referral);
}

.dashboard-v2-paid-cards i.secondary {
  background: var(--secondary);
}

.dashboard-v2-row-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-v2-span-2 {
  grid-column: span 2;
}

.dashboard-v2-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-v2-chart-large,
.dashboard-v2-chart-medium,
.dashboard-v2-chart-small {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.dashboard-v2-chart-large {
  height: 210px;
}

.dashboard-v2-chart-medium {
  height: 170px;
}

.dashboard-v2-chart-small {
  height: 110px;
}

.dashboard-v2-paid-panel {
  display: flex;
  flex-direction: column;
}

.dashboard-v2-paid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.dashboard-v2-paid-cards div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dashboard-v2-paid-cards span {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-v2-paid-cards strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.dashboard-v2-footnote {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 10px;
  text-align: center;
}

.dashboard-v2-match-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: var(--danger-soft);
  font-size: 11px;
  line-height: 1.35;
}

.growth-kpi-grid,
.growth-metric-grid,
.growth-revenue-cards,
.growth-delete-grid {
  display: grid;
  gap: 12px;
}

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

.growth-insight-card,
.growth-panel,
.growth-soft-card,
.growth-revenue-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.growth-insight-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}

.growth-insight-card.highlight {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.growth-insight-card span,
.growth-soft-card span,
.growth-revenue-card span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.growth-insight-card strong {
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.growth-insight-card.highlight strong {
  color: var(--primary);
}

.growth-insight-card small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.growth-top-grid,
.growth-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.growth-mid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.growth-span-2 {
  grid-column: span 2;
}

.growth-panel {
  min-width: 0;
  padding: 20px;
}

.growth-panel .dashboard-panel-head p {
  max-width: 680px;
}

.growth-chart-wrap {
  height: 220px;
}

.growth-revenue-wrap {
  height: 140px;
}

.growth-donut-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.growth-donut {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 999px;
  background: conic-gradient(var(--primary) 0 var(--seeker-share), var(--secondary) var(--seeker-share) 100%);
}

.growth-donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 999px;
  background: var(--card);
}

.growth-donut-bars {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 12px;
}

.growth-type-row {
  display: grid;
  gap: 5px;
}

.growth-type-label {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
}

.growth-type-label strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-type-label b {
  font-size: 13px;
}

.growth-type-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}

.growth-type-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
}

.growth-type-row small {
  color: var(--muted-foreground);
  font-size: 10px;
  text-align: right;
}

.growth-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.growth-mini-tile,
.growth-soft-card {
  border-radius: 8px;
  padding: 12px;
  background: rgba(202, 255, 185, 0.22);
}

.growth-mini-tile span {
  display: block;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
}

.growth-mini-tile strong,
.growth-soft-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.growth-soft-card.highlight {
  background: rgba(0, 168, 120, 0.08);
}

.growth-soft-card.highlight strong {
  color: var(--primary);
}

.growth-funnel {
  min-height: 236px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.growth-funnel-step {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}

.growth-funnel-step strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.growth-funnel-step span {
  min-height: 34px;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.25;
}

.growth-funnel-bar {
  width: 100%;
  max-width: 180px;
  min-height: 12px;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
}

.growth-funnel-bar.baseline {
  background: rgba(48, 47, 77, 0.2);
}

.growth-funnel-bar.danger {
  background: var(--danger);
}

.growth-funnel-bar.referral {
  background: var(--referral);
}

.growth-funnel-step b {
  color: var(--text);
  font-size: 14px;
}

.growth-funnel-step small {
  font-size: 12px;
  font-weight: 600;
}

.growth-funnel-step small.success {
  color: var(--primary);
}

.growth-funnel-step small.neutral {
  color: var(--text);
}

.growth-funnel-step small.danger {
  color: var(--danger);
}

.growth-funnel-step em {
  color: var(--muted-foreground);
  font-size: 10px;
  font-style: normal;
}

.growth-insight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.growth-insight-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
}

.growth-insight-strip i,
.growth-revenue-card i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
}

.growth-insight-strip i.danger,
.growth-revenue-card i.danger {
  background: var(--danger);
}

.growth-insight-strip i.referral,
.growth-revenue-card i.referral {
  background: var(--referral);
}

.growth-revenue-card i.secondary {
  background: var(--secondary);
}

.growth-metric-grid,
.growth-delete-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.growth-horizontal-bars,
.growth-channel-bars {
  display: grid;
  gap: 11px;
}

.growth-horizontal-row,
.growth-channel-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.55fr) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.growth-horizontal-row div,
.growth-channel-stack {
  height: 8px;
  display: grid;
  gap: 3px;
  border-radius: 999px;
  background: var(--muted);
}

.growth-horizontal-row i,
.growth-channel-stack i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
}

.growth-channel-stack {
  height: 17px;
  align-content: center;
  background: transparent;
}

.growth-channel-stack i.invites {
  background: var(--secondary);
}

.growth-channel-stack i.signups {
  background: var(--primary);
}

.growth-horizontal-row b,
.growth-channel-row b {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.growth-footnote {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.growth-revenue-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.growth-revenue-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.growth-revenue-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.growth-reason-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.growth-reason-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.growth-reason-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.growth-reason-row strong {
  color: var(--text);
  font-size: 12px;
}

.growth-reason-row code {
  color: var(--muted-foreground);
  font-size: 10px;
}

.growth-reason-row b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.growth-reason-row small {
  display: block;
  color: var(--primary);
  font-size: 10px;
}

.growth-churn-box {
  margin-top: 14px;
  padding: 12px;
  border-top: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(202, 255, 185, 0.14);
}

.growth-churn-box span {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.growth-churn-box p {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
}

.community-kpi-grid,
.community-post-card-grid,
.community-metric-grid,
.community-plan-cards {
  display: grid;
  gap: 12px;
}

.community-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.community-kpi-card,
.community-panel,
.community-soft-card,
.community-plan-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.community-kpi-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}

.community-kpi-card.highlight {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.community-kpi-card.warn {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.community-kpi-card span,
.community-soft-card span,
.community-plan-card span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.community-kpi-card strong {
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.community-kpi-card.highlight strong {
  color: var(--primary);
}

.community-kpi-card.warn strong {
  color: var(--danger);
}

.community-kpi-card small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.community-top-grid,
.community-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.community-mid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.community-span-2 {
  grid-column: span 2;
}

.community-panel {
  min-width: 0;
  padding: 20px;
}

.community-chart-wrap {
  height: 220px;
}

.community-plan-wrap {
  height: 130px;
}

.community-funnel-list {
  display: grid;
  gap: 15px;
}

.community-funnel-row {
  display: grid;
  gap: 6px;
}

.community-funnel-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 8px;
}

.community-funnel-meta span {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.community-funnel-meta strong {
  color: var(--text);
  font-size: 18px;
}

.community-funnel-meta small {
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: right;
}

.community-funnel-meta small.success {
  color: var(--primary);
}

.community-funnel-meta small.neutral {
  color: var(--text);
}

.community-funnel-track,
.community-membership-row p {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}

.community-funnel-track i,
.community-membership-row i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
}

.community-funnel-row p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 10px;
}

.community-action-box {
  margin-top: 18px;
  padding: 12px;
  border-top: 1px solid rgba(228, 63, 111, 0.2);
  border-radius: 8px;
  background: var(--danger-soft);
}

.community-action-box span,
.community-hint-box span {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.community-action-box p,
.community-hint-box p {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
}

.community-post-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.community-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.community-soft-card {
  border-radius: 8px;
  padding: 12px;
  background: rgba(202, 255, 185, 0.22);
}

.community-soft-card.highlight {
  background: rgba(0, 168, 120, 0.08);
}

.community-soft-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.community-soft-card.highlight strong {
  color: var(--primary);
}

.community-stack-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.community-stack-bar {
  height: 16px;
  min-width: 0;
  flex: 1;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--muted);
}

.community-stack-bar i {
  height: 100%;
  display: block;
  background: var(--primary);
}

.community-stack-bar b {
  min-width: 0;
  flex: 1;
  background: var(--secondary);
}

.community-stack-row > strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.community-post-stat,
.community-group-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.community-post-stat span,
.community-group-stats span {
  color: var(--muted-foreground);
  font-size: 12px;
}

.community-post-stat strong,
.community-group-stats strong {
  color: var(--primary);
  font-size: 14px;
}

.community-mini-bars {
  height: 52px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 12px;
}

.community-mini-bars i {
  min-width: 4px;
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: rgba(0, 168, 120, 0.7);
}

.community-mini-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted-foreground);
  font-size: 10px;
}

.community-footnote {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.community-membership-list {
  display: grid;
  gap: 11px;
}

.community-membership-row {
  display: grid;
  gap: 6px;
}

.community-membership-row div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.community-membership-row strong {
  color: var(--text);
}

.community-group-stats {
  align-items: flex-start;
  flex-direction: column;
  margin-top: 14px;
}

.community-hint-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(202, 255, 185, 0.18);
}

.community-plan-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.community-plan-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.community-plan-card i,
.community-health-row > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
}

.community-plan-card i.neutral {
  background: var(--text);
}

.community-plan-card i.referral {
  background: var(--referral);
}

.community-plan-card i.secondary {
  background: var(--secondary);
}

.community-plan-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.community-health-list {
  display: grid;
  gap: 0;
}

.community-health-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.community-health-row:last-child {
  border-bottom: 0;
}

.community-health-row > i {
  margin-top: 5px;
}

.community-health-row > i.warning {
  background: var(--warning);
}

.community-health-row > i.danger {
  background: var(--danger);
}

.community-health-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.community-health-row strong {
  color: var(--text);
  font-size: 12px;
}

.community-health-row small {
  color: var(--muted-foreground);
  font-size: 10px;
}

.community-health-row b {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(0, 168, 120, 0.12);
  font-size: 10px;
  font-weight: 700;
}

.community-health-row b.warning {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.14);
}

.community-health-row b.danger {
  color: var(--danger);
  background: rgba(228, 63, 111, 0.12);
}

.section-shell {
  display: grid;
  gap: 24px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.section-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.08;
  font-weight: 700;
}

.section-header p {
  max-width: 760px;
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.section-tabs {
  width: max-content;
  max-width: 100%;
  display: flex;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.section-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.section-tabs a.active {
  color: var(--primary);
  background: transparent;
  border-bottom-color: var(--primary);
}

.figma-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.section-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.16;
  font-weight: 700;
}

.section-panel-head p {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.subsection-head {
  margin-top: 24px;
}

.section-filterbar {
  padding: 18px;
}

.section-filterbar .filters-grid {
  align-items: end;
}

.section-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.section-kpi-grid.compact {
  margin-bottom: 18px;
}

.figma-kpi {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.figma-kpi-label {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.figma-kpi-value {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.figma-kpi-value.small {
  font-size: 18px;
  line-height: 1.2;
}

.figma-kpi-sub {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 400;
}

.section-grid {
  display: grid;
  gap: 20px;
}

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

.figma-chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.figma-chip.success {
  border-color: transparent;
  color: var(--primary);
  background: #e6f7f3;
}

.figma-chip.danger {
  border-color: transparent;
  color: var(--danger);
  background: #fdeef3;
}

.figma-chip.muted {
  border-color: transparent;
  color: var(--neutral);
  background: var(--neutral-soft);
}

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.figma-table {
  border-collapse: separate;
  border-spacing: 0;
}

.figma-table thead th {
  border-bottom: 0;
  color: var(--muted-foreground);
  background: rgba(202, 255, 185, 0.19);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.figma-table tbody tr {
  box-shadow: none;
}

.figma-table tbody td {
  border-top: 1px solid var(--border);
  background: #fff;
}

.figma-table tbody td:first-child {
  border-radius: 0;
}

.figma-table tbody td:last-child {
  border-radius: 0;
}

.figma-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  border: 0;
  border-radius: 12px;
  color: var(--muted-foreground);
  background: transparent;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.paywall-page {
  gap: 18px;
}

.paywall-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.paywall-topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 750;
}

.paywall-topbar p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.paywall-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.paywall-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.paywall-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.paywall-pill.active {
  color: #fff;
  background: var(--primary);
}

.paywall-custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.paywall-custom-range label {
  display: grid;
  gap: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.paywall-custom-range input {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.paywall-source-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paywall-source-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.paywall-source-chip.active {
  border-color: var(--source-color);
  color: #fff;
  background: var(--source-color);
}

.paywall-source-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--source-color);
}

.paywall-source-chip.active .paywall-source-dot {
  background: #fff;
}

.paywall-notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted-foreground);
  background: rgba(202, 255, 185, 0.18);
  font-size: 13px;
  font-weight: 600;
}

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

.paywall-kpi {
  min-height: 118px;
}

.paywall-main-grid {
  align-items: stretch;
}

.paywall-ranking-list {
  display: grid;
  gap: 10px;
}

.paywall-ranking-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.paywall-ranking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paywall-ranking-head strong,
.paywall-source-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.paywall-ranking-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.paywall-ranking-head b {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.paywall-ranking-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(48, 47, 77, 0.08);
}

.paywall-ranking-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--source-color);
}

.paywall-chart-card {
  margin: 0;
}

.paywall-chart-wrap {
  height: 220px;
  padding: 8px;
  border: 0;
  border-radius: 0;
}

.paywall-detail-table th,
.paywall-detail-table td {
  white-space: nowrap;
}

.paywall-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.paywall-rate.success {
  color: var(--primary);
  background: rgba(0, 168, 120, 0.12);
}

.paywall-rate.strong {
  color: var(--text);
  background: rgba(48, 47, 77, 0.08);
}

.paywall-rate.muted {
  color: var(--muted-foreground);
  background: var(--neutral-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.users-page {
  gap: 16px;
}

.users-header {
  margin-bottom: 2px;
}

.users-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.users-search {
  min-width: 240px;
  flex: 1 1 320px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  background: var(--card);
}

.users-search input[type="search"] {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

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

.users-search-clear {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.users-search-clear:hover {
  color: var(--text);
  background: var(--muted);
}

.users-status-segments {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.users-status-segment {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  color: rgba(48, 47, 77, 0.5);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.users-status-segment:first-child {
  border-left: 0;
}

.users-status-segment:hover {
  color: var(--text);
  background: var(--muted);
}

.users-status-segment.is-active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.users-status-segment.is-active + .users-status-segment {
  border-left-color: transparent;
}

.users-list-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.users-grid-scroll {
  overflow-x: auto;
}

.users-grid {
  min-width: 1120px;
}

.users-grid-row {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 96px minmax(220px, 1fr) 160px 200px 32px;
  align-items: center;
  gap: 0;
  padding-inline: 20px;
}

.users-grid-head {
  min-height: 40px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  background: rgba(202, 255, 185, 0.19);
  font-size: 12px;
  font-weight: 600;
}

.users-record {
  border-bottom: 1px solid var(--border);
}

.users-record:last-child {
  border-bottom: 0;
}

.users-grid-body {
  min-height: 64px;
  padding-block: 12px;
  transition: background-color 160ms ease;
}

.users-grid-body:hover {
  background: rgba(238, 248, 244, 0.4);
}

.users-name-cell {
  min-width: 0;
  padding-right: 16px;
}

.users-reason-cell {
  min-width: 0;
  padding-right: 16px;
}

.users-name-cell p,
.users-date-cell p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-name-cell span,
.users-date-cell span,
.users-reason-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-reason-cell span {
  margin-top: 0;
  color: var(--text);
  font-weight: 500;
}

.user-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.user-status-badge.is-active {
  color: var(--primary);
  background: #e6f7f3;
}

.user-status-badge.is-blocked {
  color: #f59e0b;
  background: #fff3e0;
}

.user-status-badge.is-deleted {
  color: var(--danger);
  background: #fdeef3;
}

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

.users-actions form {
  margin: 0;
}

.user-action-btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.user-action-btn:hover {
  background: var(--muted);
}

.user-action-btn.is-danger {
  color: var(--danger);
}

.users-readonly {
  color: var(--muted-foreground);
  font-size: 13px;
}

.users-toggle-cell {
  display: flex;
  justify-content: flex-end;
}

.users-detail-toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  background: var(--card);
  font-size: 11px;
  cursor: pointer;
}

.users-detail-toggle:hover {
  color: var(--text);
  background: var(--muted);
}

.users-detail-toggle[aria-expanded="true"] {
  color: var(--text);
}

.users-detail-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 20px 16px;
  border-top: 1px solid var(--border);
  background: rgba(246, 247, 248, 0.55);
}

.users-detail-panel[hidden] {
  display: none;
}

.users-detail-field {
  padding-top: 12px;
}

.users-detail-field p {
  margin: 0 0 3px;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.users-detail-field span {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.users-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
}

.users-noscript {
  padding: 0 20px 16px;
}

.users-list-footer {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 12px;
}

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

.backend-topbar-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: #e6f7f3;
  font-size: 12px;
  font-weight: 600;
}

.backend-topbar-badge.is-production {
  color: var(--danger);
  background: #fdeef3;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.settings-panel {
  display: grid;
  gap: 18px;
}

.backend-switch-list {
  display: grid;
  gap: 10px;
}

.backend-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.backend-switch-card.is-active {
  border-color: rgba(0, 168, 120, 0.35);
  background: #f7fffa;
}

.backend-switch-card.is-production.is-active {
  border-color: rgba(228, 63, 111, 0.28);
  background: #fff8fa;
}

.backend-switch-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.backend-switch-card p {
  max-width: 620px;
  margin: 4px 0 8px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.backend-current-badge,
.backend-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted-foreground);
  background: var(--neutral-soft);
  font-size: 11px;
  font-weight: 600;
}

.backend-current-badge {
  color: #fff;
  background: var(--primary);
}

.settings-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(48, 47, 77, 0.16);
  cursor: pointer;
}

.settings-switch span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(48, 47, 77, 0.2);
  transition: transform 160ms ease;
}

.settings-switch[aria-checked="true"] {
  background: var(--primary);
}

.settings-switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.settings-switch:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.settings-note p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.section-chart-wrap {
  min-height: 280px;
  height: 300px;
}

.ranking-list,
.compact-list,
.action-grid {
  display: grid;
  gap: 12px;
}

.ranking-row,
.compact-list > div,
.action-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--muted);
}

.ranking-row strong,
.compact-list strong,
.action-card strong {
  color: var(--text);
  font-weight: 600;
}

.ranking-row span,
.compact-list span,
.action-card span {
  color: var(--muted-foreground);
  font-size: 13px;
}

.ranking-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(48, 47, 77, 0.07);
}

.ranking-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.figma-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.figma-rate-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted-foreground);
  background: #fff;
}

.figma-rate-card span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.figma-rate-card strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.figma-rate-card.success strong {
  color: var(--primary);
}

.figma-rate-card.danger {
  border-color: var(--border);
  color: var(--danger);
  background: #fff;
}

.figma-rate-card.danger strong {
  color: var(--danger);
}

.push-funnel-panel {
  padding: 20px;
}

.push-funnel-figma {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 26px;
  align-items: end;
}

.push-funnel-main {
  min-height: 250px;
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1.05fr 1.05fr;
  gap: 14px;
  align-items: end;
}

.push-funnel-stage {
  display: grid;
  grid-template-rows: auto 160px auto auto;
  align-items: end;
  justify-items: center;
  gap: 8px;
  color: var(--muted-foreground);
}

.push-funnel-stage strong {
  color: var(--text);
  font-size: 27px;
  line-height: 1;
  font-weight: 700;
}

.push-funnel-stage .funnel-bar {
  width: 100%;
  height: var(--funnel-bar-height, 0px);
  display: block;
  align-self: end;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
}

.push-funnel-stage small,
.push-side-metric small {
  color: var(--muted-foreground);
  font-size: 16px;
  font-weight: 700;
}

.push-funnel-stage em {
  color: var(--muted-foreground);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.stage-created .funnel-bar {
  opacity: 1;
}

.stage-sent .funnel-bar {
  opacity: 0.82;
}

.stage-opened .funnel-bar {
  opacity: 0.48;
}

.stage-converted .funnel-bar {
  opacity: 0.48;
}

.push-funnel-side {
  min-height: 170px;
  display: grid;
  gap: 20px;
  align-content: end;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.push-side-metric {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.push-side-metric strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.push-side-metric span {
  width: min(110px, 100%);
  height: 10px;
  display: block;
  border-radius: 999px;
}

.push-side-metric.warning strong {
  color: #ff9500;
}

.push-side-metric.warning span {
  background: #ff9500;
}

.push-side-metric.danger strong {
  color: var(--danger);
}

.push-side-metric.danger span {
  background: var(--danger);
}

.push-chart-panel .section-chart-wrap {
  height: 330px;
}

.action-card {
  color: inherit;
  text-decoration: none;
}

.action-card:hover {
  border-color: rgba(0, 168, 120, 0.34);
  background: var(--primary-soft);
}

.section-form-grid {
  gap: 18px;
}

@media (max-width: 1100px) {
  .dashboard-kpi-grid,
  .dashboard-link-row,
  .dashboard-v2-kpi-grid,
  .section-kpi-grid,
  .paywall-kpi-grid,
  .growth-kpi-grid,
  .growth-revenue-cards,
  .community-kpi-grid,
  .community-plan-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-grid,
  .dashboard-bottom-grid,
  .dashboard-v2-row-three,
  .dashboard-v2-bottom-grid,
  .section-grid.two,
  .growth-top-grid,
  .growth-mid-grid,
  .growth-bottom-grid,
  .community-top-grid,
  .community-mid-grid,
  .community-bottom-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-v2-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .growth-span-2,
  .dashboard-v2-span-2,
  .community-span-2 {
    grid-column: auto;
  }

  .paywall-topbar {
    display: grid;
  }

  .paywall-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .sidebar {
    width: 100%;
  }

  .brand {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  .paywall-kpi-grid {
    grid-template-columns: 1fr;
  }

  .paywall-topbar h1 {
    font-size: 22px;
  }

  .paywall-pill-group,
  .paywall-custom-range,
  .paywall-source-bar {
    width: 100%;
  }

  .paywall-pill-group {
    overflow-x: auto;
  }

  .paywall-source-chip {
    max-width: 100%;
  }

  .dashboard-figma-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .range-control {
    overflow: visible;
  }

  .custom-range-popover {
    left: 0;
    right: auto;
    min-width: min(88vw, 420px);
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-kpi-grid,
  .dashboard-link-row,
  .dashboard-v2-kpi-grid,
    .section-kpi-grid,
    .figma-rate-grid,
    .growth-kpi-grid,
    .growth-metric-grid,
    .growth-delete-grid,
    .growth-revenue-cards,
    .community-kpi-grid,
    .community-post-card-grid,
    .community-metric-grid,
    .community-plan-cards,
    .push-funnel-figma,
    .push-funnel-main {
    grid-template-columns: 1fr;
  }

  .dashboard-v2-funnel {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-v2-funnel-step {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 64px;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .dashboard-v2-funnel-step span,
  .dashboard-v2-funnel-step em {
    grid-column: 2;
  }

  .dashboard-v2-funnel-step i {
    grid-column: 1 / -1;
    max-width: none;
    height: 10px !important;
    border-radius: 999px;
  }

  .push-funnel-side {
    min-height: auto;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .section-header {
    flex-direction: column;
  }

  .users-filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .users-search {
    min-width: 0;
    width: 100%;
  }

  .users-status-segments {
    width: 100%;
    overflow-x: auto;
  }

  .users-status-segment {
    flex: 1 0 auto;
  }

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

  .users-list-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .backend-switch-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .analysis-filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-filter-range {
    justify-content: flex-start;
    margin-left: 0;
  }

  .analysis-filter-extra {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-filter-extra select,
  .analysis-filter-extra input {
    width: 100%;
  }

  .dashboard-donut-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .growth-donut-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .growth-funnel {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .growth-funnel-step {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    text-align: left;
  }

  .growth-funnel-step span,
  .growth-funnel-step small,
  .growth-funnel-step em {
    grid-column: 2;
    min-height: 0;
  }

  .growth-funnel-bar {
    grid-column: 1;
    grid-row: 1 / span 5;
    width: 44px;
    justify-self: center;
  }

  .growth-insight-strip {
    gap: 10px;
  }

  .growth-horizontal-row,
  .growth-channel-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .growth-horizontal-row b,
  .growth-channel-row b {
    text-align: left;
  }

  .community-stack-row,
  .community-post-stat {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-stack-bar {
    width: 100%;
  }

  .community-funnel-meta,
  .community-health-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-health-row > i {
    display: none;
  }
}
