:root {
  --ink: #1f2d2a;
  --muted: #64736b;
  --line: #dce3da;
  --paper: #ffffff;
  --field: #f5f7f2;
  --vine: #1f4a3d;
  --vine-2: #173b32;
  --leaf: #6a9f73;
  --plum: #6d3a6d;
  --gold: #c59b42;
  --water: #497b89;
  --danger: #9b4e3f;
  --shadow: 0 16px 42px rgba(31, 45, 42, 0.12);
  --soft-shadow: 0 10px 24px rgba(31, 45, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--field);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--field);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

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

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

.page {
  min-height: 100vh;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 40px;
  padding: 40px;
}

.brand-panel {
  display: flex;
  min-height: calc(100vh - 80px);
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--vine);
  color: #fff;
  padding: 36px;
}

.brand-row,
.inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: #f6f7f2;
  color: var(--vine);
  font-size: 20px;
  font-weight: 900;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
}

.brand-copy {
  max-width: 680px;
}

.brand-copy h1,
.auth-card h1,
.signup-copy h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-copy p,
.auth-card p,
.signup-copy p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.45;
}

.map-preview {
  position: relative;
  min-height: 300px;
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(#c9d7c8 1px, transparent 1px),
    linear-gradient(90deg, #c9d7c8 1px, transparent 1px),
    #eaf0e7;
  background-size: 92px 74px;
}

.parcel {
  position: absolute;
  border: 2px solid #fff;
  opacity: 0.92;
  clip-path: polygon(18% 0, 90% 16%, 100% 72%, 42% 100%, 0 58%);
}

.parcel.a {
  left: 9%;
  top: 18%;
  width: 190px;
  height: 135px;
  background: var(--leaf);
}

.parcel.b {
  left: 36%;
  top: 24%;
  width: 230px;
  height: 155px;
  background: #8a6fa0;
}

.parcel.c {
  left: 22%;
  bottom: 16%;
  width: 310px;
  height: 110px;
  background: var(--gold);
}

.parcel.d {
  right: 11%;
  bottom: 10%;
  width: 170px;
  height: 125px;
  background: var(--water);
}

.map-badge,
.map-callout,
.floating-note {
  position: absolute;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  color: var(--ink);
}

.map-badge {
  left: 20px;
  top: 20px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
}

.map-callout {
  right: 28px;
  top: 80px;
  width: 220px;
  padding: 14px;
}

.map-callout strong,
.floating-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.map-callout span,
.floating-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.brand-metric {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  padding: 16px;
}

.brand-metric strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-metric span {
  display: block;
  margin-top: 6px;
  color: #d9e6dc;
  font-size: 12px;
  line-height: 1.35;
}

.auth-panel {
  display: grid;
  min-height: calc(100vh - 80px);
  align-items: center;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-card h1 {
  font-size: 30px;
}

.auth-card p {
  color: var(--muted);
  font-size: 14px;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf6;
  color: var(--vine);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field .label {
  color: #2b3a35;
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  border: 1px solid #c9d7c8;
  border-radius: 6px;
  outline: none;
  background: #f8faf6;
  color: var(--ink);
  padding: 0 14px;
}

.field input:focus,
.field select:focus {
  border-color: var(--vine);
  box-shadow: 0 0 0 3px rgba(31, 74, 61, 0.12);
}

.form-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4a5751;
  font-size: 13px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--vine);
}

.link {
  border: 0;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
  font-weight: 800;
  padding: 0;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  gap: 8px;
  background: var(--vine);
  color: #fff;
  padding: 0 16px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: #f8faf6;
  color: var(--vine);
  font-size: 15px;
}

.full {
  width: 100%;
}

.signup-page {
  display: grid;
  grid-template-columns: 560px minmax(0, 1fr);
  min-height: 100vh;
  gap: 32px;
  padding: 40px;
}

.signup-copy {
  display: grid;
  align-content: start;
  gap: 16px;
}

.signup-copy p {
  color: var(--muted);
  font-size: 15px;
}

.signup-card,
.setup-panel,
.workspace-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signup-card {
  padding: 28px;
  box-shadow: var(--soft-shadow);
}

.setup-panel {
  display: flex;
  min-height: calc(100vh - 80px);
  flex-direction: column;
  gap: 20px;
  background: #eef3eb;
  padding: 28px;
}

.section-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.step-list {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.step-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--vine);
  color: #fff;
  font-weight: 850;
}

.step:nth-child(2) .step-num {
  background: var(--plum);
}

.step:nth-child(3) .step-num {
  background: var(--gold);
}

.step strong {
  display: block;
  margin-bottom: 4px;
}

.step span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.setup-map {
  position: relative;
  min-height: 300px;
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #dde8da;
}

.setup-map::after {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 48%;
  border-left: 2px dashed rgba(255, 255, 255, 0.95);
  content: "";
}

.dashboard {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--field);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--vine-2);
  color: #fff;
  padding: 24px 20px;
}

.sidebar .brand-row {
  color: #fff;
}

.brand-stack strong {
  display: block;
  font-size: 16px;
}

.brand-stack span {
  display: block;
  margin-top: 2px;
  color: #bfd1c6;
  font-size: 11px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 6px;
  color: #dce8e1;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 720;
}

.nav a.active {
  background: #f6f7f2;
  color: var(--vine-2);
}

.nav-icon {
  display: grid;
  width: 18px;
  place-items: center;
  color: inherit;
  font-size: 14px;
  font-weight: 900;
}

.farm-card {
  border-radius: 6px;
  background: #234d43;
  padding: 14px;
}

.eyebrow {
  display: block;
  color: #bfd1c6;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.farm-card strong {
  display: block;
  margin-top: 8px;
  line-height: 1.25;
}

.farm-card span:last-child {
  display: block;
  margin-top: 8px;
  color: #dce8e1;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-spacer {
  flex: 1;
}

.user-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 6px;
  background: #123128;
  padding: 12px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.user-card strong {
  display: block;
  font-size: 13px;
}

.user-card span {
  color: #bfd1c6;
  font-size: 11px;
  font-weight: 700;
}

.main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

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

.topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.search {
  display: flex;
  align-items: center;
  width: 280px;
  height: 40px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.metric-card:nth-child(3) strong,
.metric-card:nth-child(3) small {
  color: var(--vine);
}

.metric-card:nth-child(4) strong,
.metric-card:nth-child(4) small {
  color: var(--plum);
}

.workspace {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 18px;
}

.workspace-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  border-bottom: 1px solid #e5eae3;
  padding: 0 16px;
}

.card-header strong {
  display: block;
  font-size: 17px;
}

.card-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-canvas {
  position: relative;
  min-height: 520px;
  flex: 1;
  overflow: hidden;
  background: #e2eadd;
}

.map-canvas::before,
.map-canvas::after {
  position: absolute;
  content: "";
  background: #c8d2c4;
  transform-origin: center;
}

.map-canvas::before {
  left: 32px;
  top: 178px;
  width: 760px;
  height: 14px;
  transform: rotate(14deg);
}

.map-canvas::after {
  left: 392px;
  top: -42px;
  width: 12px;
  height: 660px;
  transform: rotate(-31deg);
}

.block {
  position: absolute;
  z-index: 1;
  border: 2px solid #fff;
  clip-path: polygon(18% 0, 90% 16%, 100% 72%, 42% 100%, 0 58%);
  opacity: 0.9;
}

.block.one {
  left: 80px;
  top: 86px;
  width: 250px;
  height: 165px;
  background: var(--leaf);
}

.block.two {
  left: 340px;
  top: 116px;
  width: 270px;
  height: 190px;
  background: #8a6fa0;
}

.block.three {
  left: 150px;
  top: 304px;
  width: 310px;
  height: 170px;
  background: var(--gold);
}

.block.four {
  right: 86px;
  bottom: 70px;
  width: 220px;
  height: 145px;
  background: var(--water);
}

.cadastre-line {
  position: absolute;
  z-index: 2;
  top: 48px;
  bottom: 48px;
  left: 53%;
  border-left: 3px dashed #fff;
}

.legend {
  position: absolute;
  z-index: 3;
  left: 18px;
  top: 18px;
  width: 260px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 14px;
}

.legend strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #4a5751;
  font-size: 12px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--leaf);
}

.swatch.cad {
  border: 2px solid var(--vine-2);
  background: #fff;
}

.swatch.warn {
  background: var(--gold);
}

.right-column {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.panel {
  padding: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 17px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  border-radius: 6px;
  background: #f1e7f1;
  color: var(--plum);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
}

.task-list,
.season-list,
.saturn-list {
  display: grid;
  gap: 10px;
}

.task {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.task-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #fff6df;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.task p,
.season-item p {
  margin: 0;
  color: #4a5751;
  font-size: 13px;
  line-height: 1.35;
}

.progress {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.bar {
  overflow: hidden;
  height: 10px;
  border-radius: 5px;
  background: #e8eee6;
}

.bar span {
  display: block;
  width: 76%;
  height: 100%;
  border-radius: 5px;
  background: var(--vine);
}

.progress small {
  color: var(--vine);
  font-weight: 850;
}

.saturn-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.saturn-row span:last-child {
  color: var(--muted);
}

.saturn-row.error span:last-child {
  color: var(--danger);
}

.season-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .auth-page,
  .signup-page {
    grid-template-columns: 1fr;
  }

  .brand-panel,
  .setup-panel,
  .auth-panel {
    min-height: auto;
  }

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

  .sidebar {
    display: none;
  }

  .metrics,
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-page,
  .signup-page {
    padding: 16px;
  }

  .brand-panel,
  .auth-card,
  .signup-card,
  .setup-panel,
  .main {
    padding: 20px;
  }

  .form-row,
  .brand-metrics {
    grid-template-columns: 1fr;
  }

  .topbar,
  .top-actions,
  .form-line {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }
}
