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

:root {
  color-scheme: light;
  --ink: #20231f;
  --muted: #73786f;
  --paper: #f5f3ee;
  --card: #fffefa;
  --line: #e8e5dc;
  --accent: #28664d;
  --accent-dark: #1d503b;
  --soft: #edf3ee;
  --danger: #a63e36;
  --shadow: 0 24px 70px rgba(34, 43, 35, .09);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(40, 102, 77, .09), transparent 28rem),
    radial-gradient(circle at 88% 85%, rgba(198, 169, 112, .13), transparent 26rem),
    var(--paper);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100%, 1060px);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: Manrope, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
}

.header-caption {
  color: var(--muted);
  font-size: .86rem;
}

.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(36px, 8vw, 110px);
  padding: 30px 0 64px;
}

.intro { max-width: 470px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79a88d;
  box-shadow: 0 0 0 4px #e6efe8;
}

h1, h2 {
  margin: 0;
  font-family: Manrope, sans-serif;
  letter-spacing: -.06em;
}

.intro h1, .dashboard h1 {
  font-size: clamp(2.7rem, 6vw, 4.65rem);
  line-height: 1.04;
  font-weight: 800;
}

.intro-copy {
  max-width: 410px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.feature-list { display: grid; gap: 13px; }

.feature {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #555b53;
  font-size: .93rem;
}

.feature span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: #e7f0e9;
  font-size: .78rem;
  font-weight: 800;
}

.auth-card {
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid rgba(232, 229, 220, .95);
  border-radius: 25px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-heading h2 {
  font-size: 1.85rem;
  font-weight: 800;
}

.auth-heading .eyebrow { margin-bottom: 10px; }
.muted { color: var(--muted); line-height: 1.6; }
.auth-heading .muted { margin: 8px 0 22px; font-size: .91rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 23px;
  padding: 4px;
  border-radius: 12px;
  background: #f1f0eb;
}

.auth-tab {
  min-height: 41px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #73786f;
  background: transparent;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 650;
}

.auth-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 5px rgba(32, 35, 31, .08);
}

.field {
  display: grid;
  gap: 8px;
  margin: 0 0 17px;
  color: #444a42;
  font-size: .84rem;
  font-weight: 650;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #e3e1d9;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: .92rem;
  font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input::placeholder { color: #a5a89f; }

.field input:focus {
  border-color: #82a992;
  box-shadow: 0 0 0 3px rgba(40, 102, 77, .1);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 51px;
  padding: 12px 19px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  font-size: .96rem;
  font-weight: 700;
  box-shadow: 0 7px 17px rgba(40, 102, 77, .16);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(40, 102, 77, .2);
}

.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.full-button { width: 100%; margin-top: 5px; }

.feedback {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.5;
}
.feedback.success { color: var(--accent); }
.feedback.error { color: var(--danger); }

.config-hint {
  margin: 13px 0 0;
  padding: 12px;
  border: 1px solid #eadbb8;
  border-radius: 10px;
  color: #705b2e;
  background: #fbf5e8;
  font-size: .8rem;
  line-height: 1.55;
}
.config-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(112, 91, 46, .08);
}

.privacy-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #858980;
  font-size: .74rem;
  line-height: 1.55;
}

.dashboard {
  flex: 1;
  width: min(100%, 720px);
  margin: auto;
  padding: 40px 0 65px;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
}

.dashboard h1 { font-size: clamp(2.5rem, 6vw, 3.8rem); }
.dashboard-top .muted { margin: 10px 0 0; }

.account-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  padding-top: 7px;
}

.user-email {
  max-width: 240px;
  overflow-wrap: anywhere;
  color: #555b53;
  font-size: .82rem;
}

.secondary-button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #555b53;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 650;
}
.secondary-button:hover { background: white; border-color: #d3d9d0; }

.counter-card {
  padding: clamp(28px, 7vw, 52px);
  border: 1px solid rgba(232, 229, 220, .95);
  border-radius: 27px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.counter-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.count-output {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: clamp(4.5rem, 18vw, 7.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.075em;
  font-variant-numeric: tabular-nums;
}

.counter-caption {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: .88rem;
}

.click-button {
  width: min(100%, 360px);
  min-height: 61px;
  font-size: 1.03rem;
}

.click-button span { font-size: 1.35rem; line-height: .8; }
.text-button {
  display: block;
  margin: 15px auto 0;
  padding: 8px 12px;
  border: 0;
  color: #73786f;
  background: transparent;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
}
.text-button:hover { color: var(--danger); }
.text-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; }

.dashboard-footnote {
  margin: 18px 0 0;
  color: #858980;
  font-size: .82rem;
  line-height: 1.6;
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0 3px;
  border-top: 1px solid rgba(220, 218, 209, .8);
  color: #858980;
  font-size: .75rem;
}

button:focus-visible {
  outline: 3px solid #a9cdb6;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  body { padding: 18px; }
  .page-shell { min-height: calc(100vh - 36px); }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 0 42px;
  }
  .intro h1 { font-size: clamp(2.7rem, 11vw, 3.8rem); }
  .intro-copy { margin: 13px 0 18px; font-size: 1rem; }
  .feature-list { gap: 9px; }
  .feature { font-size: .86rem; }
  .dashboard { padding: 28px 0 42px; }
}

@media (max-width: 480px) {
  .header-caption { font-size: .75rem; }
  .dashboard-top { flex-direction: column; }
  .account-area {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }
  .user-email { max-width: 62%; }
  .site-footer { font-size: .68rem; }
  .counter-card { border-radius: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
