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

:root {
  --bg: #ffffff;
  --bg-dark: #171717;
  --surface: #ffffff;
  --surface-soft: #f7f6f2;
  --ink: #1f1f1b;
  --ink-soft: #5e5d55;
  --line: #dad7ce;
  --line-strong: #c0bcaf;
  --primary: #2f6b4f;
  --primary-strong: #1f4a37;
  --accent: #8b5e34;
  --danger: #b4232f;
  --warn: #8a6700;
  --success: #1d6a43;
  --radius-xl: 16px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --shadow-sm: 0 3px 12px rgba(22, 22, 18, 0.06);
  --shadow-md: 0 10px 24px rgba(22, 22, 18, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1220px, 94vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 1.32rem;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.56rem;
}

.nav-links a,
.link-btn {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: 6px;
  padding: 0.42rem 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.16s ease;
  cursor: pointer;
  font-family: inherit;
}

.nav-links a:hover,
.link-btn:hover,
.nav-links a.active {
  color: var(--primary-strong);
  border-color: #a5b9ad;
  background: #eef3ef;
}

.nav-cta {
  background: linear-gradient(130deg, var(--primary) 0%, #3f7e61 100%);
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(47, 107, 79, 0.25);
}

.nav-cta:hover {
  filter: brightness(0.97);
}

.nav-outline {
  background: transparent;
  color: var(--primary-strong) !important;
  border: 1px solid #a7b8ac !important;
  box-shadow: none;
}

.nav-outline:hover {
  background: #edf2ee;
}

.hero {
  padding: 3.2rem 0 2.3rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  line-height: 1.12;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: clamp(2rem, 1.5rem + 2vw, 3.35rem);
}

.hero-text {
  margin: 0.95rem 0 0;
  max-width: 760px;
  color: #4f4e47;
  font-size: 1.03rem;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.62rem;
  flex-wrap: wrap;
}

.section {
  padding: 1rem 0 2.2rem;
}

.section h2 {
  margin: 0 0 0.95rem;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 2.05rem);
}

.card-grid,
.policy-grid,
.service-grid,
.steps,
.summary-grid,
.auth-layout {
  display: grid;
  gap: 0.95rem;
}

.card-grid.three,
.policy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.auth-layout {
  min-height: calc(100vh - 96px);
  align-content: center;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  padding: 2.2rem 0;
}

.card,
.panel,
.summary-card,
.auth-card,
.info-card,
.step-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card,
.panel,
.summary-card,
.auth-card,
.info-card,
.step-item {
  padding: 1rem;
}

.card h3,
.panel h3,
.info-card h2 {
  margin: 0 0 0.55rem;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

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

.card h3 a:hover {
  text-decoration: underline;
}

.card p,
.panel p,
.info-card p,
.step-item p {
  margin: 0;
  color: #4e4d45;
}

.rules-panel {
  border-color: #c7c3b6;
  background: #fbfaf6;
}

.rules-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #4a493f;
  line-height: 1.48;
}

.rules-list li {
  margin-bottom: 0.45rem;
}

.rules-list.compact {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.rules-list.compact li {
  margin-bottom: 0.3rem;
  font-size: 0.94rem;
}

.panel ol {
  margin: 0;
  padding-left: 1.1rem;
  color: #4a493f;
  line-height: 1.48;
}

.panel ol li {
  margin-bottom: 0.45rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.68rem;
}

.step-item span {
  min-width: 1.9rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--primary-strong);
  border: 1px solid #c7c3b6;
  background: #f8f7f3;
  font-weight: 800;
}

.site-footer {
  margin-top: 1.8rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-wrap {
  padding: 0.82rem 0;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.62rem 1rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-dark {
  background: linear-gradient(135deg, var(--primary) 0%, #447e63 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 79, 0.24);
}

.btn-light {
  background: #ffffff;
  color: var(--ink-soft);
}

.full-width {
  width: 100%;
}

.muted {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.support-contact {
  margin-top: 1rem;
}

.support-link {
  color: var(--primary-strong);
  text-decoration: underline;
  font-weight: 700;
}

.subtle {
  margin: 0.33rem 0 0;
  color: var(--ink-soft);
  font-size: 0.89rem;
}

.dashboard-page {
  padding: 1.35rem 0 2.3rem;
  display: grid;
  gap: 1rem;
}

.summary-card {
  background: #fcfcfb;
}

.summary-card .label {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.summary-card h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 1.52rem;
}

.form-stack {
  display: grid;
  gap: 0.82rem;
}

label {
  display: grid;
  gap: 0.34rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #38382f;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 0.72rem;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #9fada4;
  outline: 2px solid rgba(47, 107, 79, 0.2);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 600;
  color: #47473f;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.check-row a {
  color: var(--primary-strong);
  text-decoration: underline;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
  margin-top: 0.75rem;
}

.action-column {
  display: grid;
  gap: 0.55rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.66rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

thead th {
  padding: 0.66rem;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a594f;
  border-bottom: 1px solid var(--line);
  background: #f7f6f2;
  text-align: left;
}

tbody td {
  padding: 0.58rem;
  font-size: 0.84rem;
  border-bottom: 1px solid #ece9df;
  vertical-align: top;
}

.empty {
  text-align: center;
  color: var(--ink-soft);
}

.status-pill {
  display: inline-block;
  border-radius: 4px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.54rem;
  font-size: 0.73rem;
  font-weight: 800;
}

.status-pill.approved,
.status-pill.active {
  color: var(--success);
  background: #edf7f1;
  border-color: #b8d1c2;
}

.status-pill.pending {
  color: var(--warn);
  background: #fbf5e4;
  border-color: #dfcf9d;
}

.status-pill.rejected,
.status-pill.banned,
.status-pill.inactive {
  color: var(--danger);
  background: #fff2f2;
  border-color: #e7b4bc;
}

.output {
  margin: 0;
  min-height: 170px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.74rem;
  background: #faf9f5;
  font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.upload-preview {
  display: none;
  max-width: 300px;
  max-height: 170px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
  padding: 4px;
}

.message-text {
  margin: 0.75rem 0 0;
  min-height: 1.1rem;
  font-size: 0.9rem;
}

.hidden-panel {
  display: none;
}

.break-code {
  display: block;
  word-break: break-all;
}

.fund-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.amount-input {
  width: 160px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.report-filter-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.filter-field span {
  font-size: 0.76rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.check-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 38px;
  color: #4c4a43;
  font-size: 0.9rem;
}

.charts-placeholder {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
  padding: 0.9rem;
  display: grid;
  gap: 0.9rem;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.kpi-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0.7rem;
}

.kpi-card small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.report-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0.72rem;
}

.insight-card .insight-label {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.insight-card strong {
  display: block;
  margin-top: 0.25rem;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.insight-card p {
  margin: 0.3rem 0 0;
  color: #4b4a45;
  font-size: 0.86rem;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.quality-badge.high_ctr {
  color: #0a5a34;
  border-color: #9ce4ba;
  background: #e8f8ef;
}

.quality-badge.stable {
  color: #0f4c7e;
  border-color: #a8d3f2;
  background: #eaf5ff;
}

.quality-badge.low_ctr {
  color: #8d5100;
  border-color: #f1c58b;
  background: #fff1e0;
}

.quality-badge.no_traffic {
  color: #6a6a66;
  border-color: #d8d6cc;
  background: #f4f3ee;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.46rem;
  font-size: 0.69rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.mini-check.ok {
  color: #0a5a34;
  border-color: #9ce4ba;
  background: #e8f8ef;
}

.mini-check.missing {
  color: #8d5100;
  border-color: #f1c58b;
  background: #fff1e0;
}

.payment-method-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.72rem;
  background: #fff;
  margin-bottom: 0.56rem;
}

.payment-method-title {
  margin: 0 0 0.42rem;
  color: #4e4d45;
  font-weight: 700;
}

code {
  padding: 0.1rem 0.3rem;
  border: 1px solid #d3d0c6;
  border-radius: 4px;
  background: #f7f6f2;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.8rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

@media (max-width: 1080px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid.two-col,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .card-grid.three,
  .policy-grid,
  .report-kpis,
  .report-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .nav-links a,
  .link-btn {
    white-space: nowrap;
  }

  .hero {
    padding-top: 3rem;
  }

  .card-grid.three,
  .policy-grid,
  .summary-grid,
  .report-kpis,
  .report-insights {
    grid-template-columns: 1fr;
  }

  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .summary-card,
  .card,
  .auth-card,
  .info-card,
  .step-item {
    padding: 0.9rem;
  }

  .amount-input {
    width: 100%;
    max-width: 220px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(1220px, 95.5vw);
  }

  .btn {
    width: 100%;
  }

  .action-row .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .panel-head,
  .footer-wrap,
  .date-range {
    flex-direction: column;
    align-items: flex-start;
  }
}
