*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-dark: #2a6030;
  --green-mid: #3a7d44;
  --lime: #c8d400;
  --lime-dark: #a8b200;
  --white: #ffffff;
  --gray-50: #f8f9f4;
  --gray-100: #eef0e8;
  --gray-300: #c8ccc0;
  --gray-500: #7a8070;
  --gray-800: #2c3020;
  --success-bg: #eef6ef;
  --success-text: #1e5c24;
  --error-bg: #fdf2f2;
  --error-text: #922;
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* scrollbar-width: thin;
  scrollbar-color: rgba(42, 96, 48, 0.65) rgba(42, 96, 48, 0.08); */
}

body::-webkit-scrollbar {
  width: 1px;
}

body::-webkit-scrollbar-track {
  background: rgba(42, 96, 48, 0.08);
}

body::-webkit-scrollbar-thumb {
  background: rgba(42, 96, 48, 0.65);
  border-radius: 999px;
  border: 1px solid rgba(42, 96, 48, 0.08);
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(42, 96, 48, 0.82);
}

/* ── Header ── */
header {
  background: var(--green-dark);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-diamond {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--white);
}

.logo-text .st {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.logo-text .marche {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    color 0.18s,
    background-color 0.18s;
}

.header-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.header-link-active {
  color: var(--green-dark);
  background: var(--lime);
}

.header-link-active:hover {
  color: var(--green-dark);
  background: var(--lime-dark);
}

/* ── Main layout ── */
main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px 64px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.card-header {
  background: var(--green-dark);
  padding: 28px 32px 24px;
  position: relative;
}

.card-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--lime);
}

.card-header h1 {
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
  line-height: 1.55;
}

.card-body {
  padding: 28px 32px 32px;
}

/* ── Form fields ── */
.field {
  margin-bottom: 18px;
}

.field:last-of-type {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 7px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  outline: none;
}

input[type="email"]::placeholder {
  color: var(--gray-300);
}

input[type="email"]:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(42, 96, 48, 0.12);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0 20px;
}

/* ── Button ── */
button {
  width: 100%;
  padding: 13px;
  background: var(--lime);
  color: var(--green-dark);
  border: none;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.1s;
}

button:hover:not(:disabled) {
  background: var(--lime-dark);
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.is-loading {
  opacity: 0.75;
}

/* ── Feedback messages ── */
.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.5;
  display: none;
}

.msg.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #b8ddbf;
}

.msg.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid #f0c0c0;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--gray-500);
}

.dashboard-main {
  padding: 40px 20px 72px;
}

.dashboard-shell {
  width: 100%;
  max-width: 1120px;
}

.dashboard-hero {
  background:
    radial-gradient(
      circle at top left,
      rgba(200, 212, 0, 0.18),
      transparent 34%
    ),
    linear-gradient(135deg, #214d27 0%, #2a6030 55%, #366d3d 100%);
  border-radius: 24px;
  padding: 32px;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  box-shadow: 0 20px 45px rgba(22, 34, 14, 0.14);
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--lime);
  margin-bottom: 16px;
}

.dashboard-hero h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
  margin-bottom: 12px;
  max-width: 10ch;
}

.dashboard-hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.hero-badge {
  min-width: 220px;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.hero-badge-label {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-badge strong {
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-top: 24px;
}

.progress-panel,
.stats-panel,
.insights-panel {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(17, 24, 12, 0.08);
}

.progress-panel,
.insights-panel {
  padding: 28px;
}

.panel-heading {
  margin-bottom: 24px;
}

.panel-kicker {
  color: var(--green-dark);
  background: rgba(42, 96, 48, 0.08);
  padding: 8px 12px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  font-size: 24px;
  color: #1f2518;
  margin-bottom: 8px;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  align-items: center;
  gap: 20px;
}

.donut-chart {
  width: min(100%, 260px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--white) 0 54%, transparent 55%),
    conic-gradient(
      var(--lime) 0deg var(--progress),
      #dde3d5 var(--progress) 360deg
    );
  display: grid;
  place-items: center;
}

.donut-hole {
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(42, 96, 48, 0.06);
}

.donut-hole strong {
  font-size: 32px;
  color: var(--green-dark);
}

.donut-hole span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.chart-legend {
  display: grid;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #f6f8f1;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-swatch-complete {
  background: var(--lime);
}

.legend-swatch-pending {
  background: #bfc8b3;
}

.legend-item strong {
  display: block;
  font-size: 28px;
  color: #1f2518;
}

.legend-item span:last-child {
  color: var(--gray-500);
  font-size: 14px;
}

.progress-track-block {
  margin-top: 28px;
}

.progress-track-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--gray-500);
}

.progress-track-labels strong {
  color: var(--green-dark);
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e6eadf;
  overflow: hidden;
}

.progress-track-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #99bc00 0%, var(--lime) 100%);
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}

.metric-card {
  background: #f7f8f3;
  border-radius: 20px;
  padding: 22px 18px;
  min-height: 150px;
}

.metric-card-highlight {
  background: linear-gradient(
    180deg,
    rgba(42, 96, 48, 0.94),
    rgba(34, 78, 40, 0.98)
  );
  color: var(--white);
}

.metric-card span,
.insight-card span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.metric-card strong,
.insight-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
  color: #1f2518;
}

.metric-card-highlight strong,
.metric-card-highlight small,
.metric-card-highlight span {
  color: var(--white);
}

.metric-card small,
.insight-card p {
  color: var(--gray-500);
  line-height: 1.5;
}

.insights-panel {
  margin-top: 24px;
}

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

.insight-card {
  padding: 24px;
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(247, 248, 243, 0.96)
    ),
    var(--white);
  border: 1px solid rgba(42, 96, 48, 0.08);
}

@media (max-width: 520px) {
  header {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-header,
  .card-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 980px) {
  .dashboard-hero,
  .chart-layout,
  .dashboard-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: flex-start;
  }

  .hero-badge {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .dashboard-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard-hero,
  .progress-panel,
  .insights-panel {
    padding: 22px;
  }

  .stats-panel,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: auto;
  }
}
