:root {
  --paper: #f7f4ee;
  --paper-deep: #eee8de;
  --ink: #232522;
  --muted: #666c65;
  --sage: #6f8572;
  --sage-dark: #526756;
  --sand: #d8c5af;
  --terracotta: #a26f55;
  --line: rgba(35, 37, 34, 0.14);
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid rgba(162, 111, 85, 0.55);
  outline-offset: 3px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 700;
}

.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-divider {
  width: 24px;
  height: 1px;
  background: var(--terracotta);
}

.brand-word {
  color: var(--sage-dark);
}

.brand-light {
  color: var(--paper);
}

.brand-light .brand-word {
  color: #cbd7cc;
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #b9c9bb;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(480px, 1.18fr);
}

.auth-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(28px, 5vw, 64px);
  color: var(--paper);
  background:
    radial-gradient(circle at 105% 8%, rgba(216, 197, 175, 0.2), transparent 23rem),
    var(--ink);
}

.auth-intro::before,
.auth-intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.auth-intro::before {
  width: 420px;
  height: 420px;
  right: -215px;
  bottom: 6%;
  border: 1px solid rgba(216, 197, 175, 0.2);
  box-shadow: inset 0 0 0 62px rgba(111, 133, 114, 0.08);
}

.auth-intro::after {
  width: 120px;
  height: 120px;
  right: 55px;
  bottom: 22%;
  border: 1px solid rgba(162, 111, 85, 0.55);
  background: rgba(162, 111, 85, 0.13);
}

.auth-intro > * {
  position: relative;
  z-index: 1;
}

.auth-intro-copy {
  max-width: 580px;
  margin: auto 0;
  padding: 80px 0;
}

.auth-intro h1 {
  max-width: 560px;
  margin: 24px 0 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-intro-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(247, 244, 238, 0.68);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
}

.auth-note {
  margin: 0;
  color: rgba(247, 244, 238, 0.52);
  font-size: 12px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: clamp(32px, 7vw, 110px);
  background:
    radial-gradient(circle at 82% 22%, rgba(216, 197, 175, 0.3), transparent 22rem),
    var(--paper);
}

.auth-form-wrap {
  width: min(100%, 500px);
}

.auth-form-wrap h2 {
  margin: 20px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.form-lead {
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.field {
  margin-top: 25px;
}

.field label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(35, 37, 34, 0.24);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  appearance: none;
}

.field input::placeholder {
  color: #92968f;
}

.field input:hover {
  border-color: rgba(35, 37, 34, 0.42);
}

.field input:focus {
  border-color: var(--sage-dark);
  outline: 3px solid rgba(111, 133, 114, 0.18);
}

.primary-button {
  width: 100%;
  min-height: 56px;
  margin-top: 32px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 2px;
  color: var(--white);
  background: var(--sage-dark);
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  background: #465a4a;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button span {
  font-size: 22px;
  font-weight: 400;
}

.form-error {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 3px solid var(--terracotta);
  color: #744a37;
  background: rgba(162, 111, 85, 0.1);
  font-size: 14px;
}

.form-error p,
.field-error {
  margin: 0;
}

.field-error {
  margin-top: 7px;
  color: #7b4934;
  font-size: 13px;
}

.security-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.app-shell {
  width: min(100%, 1480px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px clamp(22px, 5vw, 76px) 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.app-header,
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app-header {
  min-height: 58px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.account {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-name {
  color: var(--muted);
  font-size: 13px;
}

.account form {
  margin: 0;
}

.text-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(35, 37, 34, 0.18);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
}

.dashboard-main {
  padding: clamp(58px, 9vh, 100px) 0;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
}

.dashboard-hero h1 {
  margin: 20px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 7vw, 98px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.dashboard-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
}

.module-grid {
  margin-top: clamp(54px, 9vh, 100px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.module-card {
  min-height: 300px;
  padding: clamp(24px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.16);
}

.module-card:nth-child(2) {
  background: rgba(216, 197, 175, 0.13);
}

.module-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.module-number {
  color: var(--terracotta);
  font-family: Georgia, "Times New Roman", serif;
}

.module-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.module-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sand);
}

.module-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.4vw, 36px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.module-card p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-footer {
  min-height: 58px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.app-footer p {
  margin: 0;
}

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

  .auth-intro {
    min-height: auto;
    padding: 28px clamp(22px, 6vw, 60px) 48px;
  }

  .auth-intro-copy {
    padding: 82px 0 54px;
  }

  .auth-intro::before {
    right: -260px;
  }

  .auth-form-panel {
    min-height: 620px;
    padding: 72px clamp(22px, 8vw, 90px);
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-lead {
    max-width: 680px;
  }

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

  .module-card {
    min-height: 240px;
  }
}

@media (max-width: 560px) {
  .auth-intro {
    padding: 22px 20px 34px;
  }

  .auth-intro-copy {
    padding: 66px 0 44px;
  }

  .auth-intro h1 {
    font-size: clamp(45px, 14vw, 64px);
  }

  .auth-form-panel {
    min-height: 590px;
    padding: 58px 20px 70px;
  }

  .app-shell {
    padding: 20px 20px 18px;
  }

  .account-name {
    display: none;
  }

  .dashboard-main {
    padding: 52px 0;
  }

  .dashboard-hero h1 {
    font-size: clamp(46px, 14vw, 68px);
  }

  .module-grid {
    margin-top: 48px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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