:root {
  --ch-bg: #f4f4f6;
  --ch-surface: #ffffff;
  --ch-surface-soft: #faf8ff;
  --ch-text: #231f20;
  --ch-text-soft: #433e51;
  --ch-text-muted: #6f677d;
  --ch-brand: #7558bc;
  --ch-brand-dark: #50378a;
  --ch-brand-soft: #e8e0fb;
  --ch-success: #2f8f68;
  --ch-success-soft: #d9f3e8;
  --ch-danger: #b94f61;
  --ch-danger-soft: #fde5ea;
  --ch-warning: #a06600;
  --ch-warning-soft: #fff1d6;
  --ch-neutral-soft: #edf0f5;
  --ch-border: #e7e4ed;
  --ch-border-strong: #d9d5e2;
  --ch-shadow-soft: 0 1px 4px rgba(12, 12, 13, 0.05);
  --ch-shadow-card: 0 20px 40px -12px rgba(12, 12, 13, 0.12), 0 8px 16px -12px rgba(12, 12, 13, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(117, 88, 188, 0.12), transparent 32%),
    linear-gradient(180deg, #f7f4fb 0%, #f4f4f6 32%, #f4f4f6 100%);
  color: var(--ch-text);
  font-family: "Albert Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ch-navbar {
  background: linear-gradient(135deg, var(--ch-brand) 0%, var(--ch-brand-dark) 100%);
  box-shadow: 0 16px 32px -20px rgba(32, 19, 61, 0.8);
}

.ch-navbar .navbar-brand,
.ch-navbar .nav-link,
.ch-navbar .navbar-text {
  color: #fff !important;
}

.brand-subtitle {
  margin-left: 10px;
  opacity: 0.8;
  font-weight: 500;
}

.ch-navbar .nav-link {
  border-radius: 999px;
  padding: 8px 14px !important;
  opacity: 0.9;
}

.ch-navbar .nav-link.active,
.ch-navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}

.navbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.ch-main {
  max-width: 1380px;
}

.card,
.ch-card {
  border: 1px solid var(--ch-border);
  border-radius: 22px;
  background: var(--ch-surface);
  box-shadow: var(--ch-shadow-soft);
  padding: 28px;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.05em;
  margin: 0 0 14px;
  color: var(--ch-text);
  font-family: "Aldrich", "Albert Sans", sans-serif;
}

.section-subtitle {
  color: var(--ch-text-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-panel {
  border: 1px solid var(--ch-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--ch-shadow-card);
  padding: 34px;
  margin: 10px 0 18px;
  backdrop-filter: blur(6px);
}

.hero-panel--accent {
  background: linear-gradient(145deg, #f8f3ff 0%, #efe7ff 100%);
  height: 100%;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ch-brand-dark);
  margin-bottom: 16px;
  font-weight: 700;
}

.step-card {
  border: 1px solid var(--ch-border);
  border-radius: 22px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--ch-shadow-soft);
}

.step-card h3 {
  font-size: 1.15rem;
  margin: 10px 0 8px;
}

.step-card p {
  color: var(--ch-text-soft);
  margin: 0;
  line-height: 1.65;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--ch-brand-soft), #ffffff);
  color: var(--ch-brand-dark);
  font-size: 1.2rem;
}

.metric-stack {
  display: grid;
  gap: 14px;
}

.metric-tile {
  border: 1px solid var(--ch-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  padding: 22px;
  box-shadow: var(--ch-shadow-soft);
}

.metric-value {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  color: var(--ch-brand-dark);
  line-height: 1.05;
}

.metric-label {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ch-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.affiliate-link-box {
  background: linear-gradient(135deg, var(--ch-brand) 0%, #3f2b72 100%);
  color: #fff;
  padding: 28px;
  border-radius: 24px;
  margin: 10px 0 22px;
  box-shadow: 0 22px 44px -18px rgba(45, 26, 91, 0.75);
}

.affiliate-link-box h3 {
  color: #fff;
  margin-bottom: 10px;
}

.affiliate-link-box p {
  color: rgba(255, 255, 255, 0.84);
}

.link-input {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-input input {
  flex: 1;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: monospace;
}

.link-input input::selection {
  background: rgba(255, 255, 255, 0.28);
}

.link-input button {
  background: #fff;
  color: var(--ch-brand-dark);
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
}

.copy-hint {
  margin-top: 10px;
  font-size: 0.92rem;
  opacity: 0.82;
}

.form-control,
.form-select {
  border: 1px solid var(--ch-border-strong);
  border-radius: 14px;
  min-height: 48px;
  padding: 11px 14px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ch-brand);
  box-shadow: 0 0 0 4px rgba(117, 88, 188, 0.14);
}

.form-label {
  color: var(--ch-text);
  font-size: 0.95rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-note {
  margin-top: 8px;
  color: var(--ch-text-muted);
  font-size: 0.88rem;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ch-brand) 0%, var(--ch-brand-dark) 100%);
  border: 1px solid var(--ch-brand);
  padding: 11px 18px;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #684aad 0%, #3f2b72 100%);
  border-color: #684aad;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -18px rgba(117, 88, 188, 0.7);
}

.btn-outline-dark {
  border-color: var(--ch-border-strong);
  color: var(--ch-text);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background: #fff;
  color: var(--ch-brand-dark);
  border-color: var(--ch-brand);
}

.alert {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
}

.ch-alert {
  box-shadow: var(--ch-shadow-soft);
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--ch-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom-width: 1px;
  border-color: var(--ch-border);
}

.table tbody td {
  vertical-align: middle;
  border-color: var(--ch-border);
}

.chart-wrap {
  position: relative;
  min-height: 320px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status-chip--success {
  background: var(--ch-success-soft);
  color: var(--ch-success);
}

.status-chip--warning {
  background: var(--ch-warning-soft);
  color: var(--ch-warning);
}

.status-chip--neutral {
  background: var(--ch-neutral-soft);
  color: #4b5565;
}

.empty-state {
  border: 1px dashed var(--ch-border-strong);
  border-radius: 18px;
  padding: 24px;
  background: var(--ch-surface-soft);
  color: var(--ch-text-soft);
}

.label-text {
  color: var(--ch-text-muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 8px;
}

.value-text {
  font-size: 1.05rem;
  font-weight: 600;
}

.section-divider {
  height: 1px;
  background: var(--ch-border);
  margin: 8px 0 20px;
}

.resource-card {
  background: #fff;
  border: 1px solid var(--ch-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--ch-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ch-shadow-card);
}

.resource-media {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(117, 88, 188, 0.2), transparent 35%),
    linear-gradient(135deg, #f3eeff 0%, #ece7f8 100%);
  color: var(--ch-brand-dark);
  font-size: 3rem;
}

.resource-info {
  padding: 22px;
}

.resource-info h5 {
  font-size: 1.06rem;
  margin: 10px 0 8px;
}

.resource-info p {
  color: var(--ch-text-soft);
  margin: 0;
  line-height: 1.65;
}

.resource-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ch-brand-soft);
  color: var(--ch-brand-dark);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mini-note {
  border: 1px solid var(--ch-border);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  height: 100%;
}

.mini-note strong {
  display: block;
  margin-bottom: 8px;
}

.mini-note p {
  color: var(--ch-text-soft);
  line-height: 1.6;
}

table.dataTable thead th,
table.dataTable thead td {
  border-bottom: 1px solid var(--ch-border) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 12px;
  border: 1px solid var(--ch-border-strong);
  min-height: 40px;
}

@media (max-width: 991px) {
  .ch-card,
  .card,
  .hero-panel,
  .affiliate-link-box {
    padding: 22px;
  }

  .navbar-actions {
    margin-top: 12px;
  }
}

@media (max-width: 767px) {
  .ch-main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .metric-value {
    font-size: 1.55rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .link-input {
    flex-direction: column;
  }

  .link-input button {
    width: 100%;
  }
}
