:root {
  --green: #20a464;
  --green-dark: #137747;
  --green-soft: #eaf8f1;
  --ink: #17251f;
  --muted: #66756e;
  --line: #dce7e1;
  --surface: #ffffff;
  --background: #f4f8f6;
  --danger: #c63d3d;
  --shadow: 0 20px 55px rgba(24, 62, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  min-height: 100vh;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 8vw, 110px);
  color: white;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(145deg, #116d42, #22aa68);
}

.brand-mark,
.logo-small {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  color: var(--green-dark);
  background: white;
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.brand-panel h1 {
  margin: 14px 0 10px;
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.055em;
}

.brand-copy {
  max-width: 470px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 20px;
  line-height: 1.55;
}

.eyebrow {
  margin: 28px 0 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.brand-panel .eyebrow {
  color: rgba(255,255,255,.72);
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.form-panel.centered {
  grid-column: 1 / -1;
}

.card {
  width: min(100%, 450px);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 8px 0 8px;
  font-size: 32px;
  letter-spacing: -.035em;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: block;
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #cbd9d1;
  border-radius: 11px;
  outline: none;
  background: white;
  color: var(--ink);
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(32, 164, 100, .13);
}

button {
  border: 0;
  border-radius: 11px;
  padding: 13px 19px;
  color: white;
  background: var(--green);
  font-weight: 750;
  cursor: pointer;
}

.card button {
  width: 100%;
  margin-top: 14px;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.dashboard {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.logo-small {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-size: 19px;
  box-shadow: none;
}

.user-area {
  color: var(--muted);
  font-size: 14px;
}

.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 76px);
}

aside {
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: white;
}

aside button {
  width: 100%;
  margin-bottom: 7px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

aside button:hover,
aside .nav-active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.content {
  padding: clamp(30px, 5vw, 70px);
}

.content > h1 {
  margin: 8px 0;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -.045em;
}

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

.stats article,
.upload-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.stats span {
  color: var(--muted);
}

.stats strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.upload-card .eyebrow {
  margin-top: 0;
}

.upload-card h2 {
  margin: 7px 0;
}

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

  .brand-panel {
    min-height: 300px;
    padding: 42px 28px;
  }

  .form-panel {
    padding: 24px 16px 45px;
  }

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

  aside {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  aside button {
    width: auto;
    white-space: nowrap;
  }

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

  .upload-card,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .user-area {
    justify-content: space-between;
  }
}
