:root {
  --forest: #124210;
  --emerald: #65DB82;
  --lime: #24D140;
  --willow: #BEDB88;
  --onyx: #11170D;
  --paper: #F7FAF6;
  --line: #DDE9D8;
  --muted: #66715F;
  --warning-bg: #FFF1DF;
  --warning-text: #8A4B10;
  --danger: #B42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--onyx);
  background: var(--paper);
  font-size: 14px;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: var(--forest);
  color: #fff;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--emerald);
  color: var(--forest);
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 34px;
}

.sidebar-nav a {
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--emerald);
  color: var(--forest);
}

.main-content {
  padding: 24px;
  min-width: 0;
}

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

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-chip {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
}

.menu-toggle {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--willow);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--onyx);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--onyx);
  font-weight: 600;
}

.btn,
.icon-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.btn-primary {
  background: var(--lime);
  color: #fff;
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--willow);
  color: var(--forest);
}

.btn-danger {
  background: #FEE4E2;
  color: var(--danger);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-grid.three {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.metric-card {
  min-height: 132px;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  transition: transform 160ms ease, filter 160ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.metric-card span {
  font-size: 13px;
  font-weight: 700;
}

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

.metric-card.emerald,
.metric-card.lime,
.metric-card.willow {
  color: var(--forest);
}

.metric-card.onyx,
.metric-card.forest {
  color: #fff;
}

.emerald { background: var(--emerald); }
.lime { background: var(--lime); }
.willow { background: var(--willow); }
.onyx { background: var(--onyx); }
.forest { background: var(--forest); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid.lower {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.panel,
.settings-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(18, 66, 16, 0.06);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

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

.panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.chart-panel {
  min-height: 330px;
}

.chart-panel canvas {
  min-height: 250px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--forest);
  font-size: 13px;
  background: #F2F8F2;
}

tbody tr:hover {
  background: #F2F8F2;
}

.row-warning {
  background: #FFF8ED;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.status.baik {
  background: #E8F9ED;
  color: var(--forest);
}

.status.perlu_tinjau {
  background: #FFF1DF;
  color: var(--warning-text);
}

.alert-panel {
  background: var(--warning-bg);
  border-color: #FFD8A8;
}

.alert-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #FFD8A8;
}

.alert-item strong {
  color: var(--warning-text);
}

.alert-item span,
.empty-state,
.hint {
  color: var(--muted);
}

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

.form-grid.compact {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: end;
}

.harvest-form {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.full {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input,
.checkbox-group input {
  width: auto;
}

.checkbox-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.checkbox-group.inline {
  grid-template-columns: repeat(2, minmax(90px, 1fr));
}

.actions {
  display: flex;
  gap: 8px;
  min-width: 160px;
}

.flash {
  margin-bottom: 18px;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
}

.flash.success {
  background: #E8F9ED;
  color: var(--forest);
}

.flash.error {
  background: #FEE4E2;
  color: var(--danger);
}

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

.settings-tile {
  display: grid;
  gap: 10px;
}

.settings-tile strong {
  color: var(--forest);
  font-size: 18px;
}

.settings-tile span {
  color: var(--muted);
  line-height: 1.5;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(140deg, #F7FAF6 0%, #E8F9ED 100%);
}

.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(18, 66, 16, 0.12);
}

.auth-brand {
  color: var(--forest);
  margin-bottom: 22px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-card p {
  color: var(--muted);
}

.landing-body {
  background: #fff;
}

.landing-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 40px;
  color: #fff;
  background: rgba(17, 23, 13, 0.68);
  backdrop-filter: blur(12px);
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.landing-nav nav a:not(.btn) {
  color: rgba(255, 255, 255, 0.86);
}

.landing-hero {
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: 118px 40px 56px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(17, 23, 13, 0.84) 0%, rgba(18, 66, 16, 0.58) 47%, rgba(17, 23, 13, 0.12) 100%),
    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1800&q=82') center / cover;
}

.landing-hero-content {
  width: min(760px, 100%);
}

.landing-kicker,
.section-label {
  display: inline-flex;
  color: var(--emerald);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-hero p {
  width: min(640px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.7;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn-light {
  color: var(--forest);
  background: #fff;
}

.landing-section {
  padding: 64px 40px;
}

.landing-overview,
.data-story {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 40px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.landing-section h2 {
  margin: 0;
  color: var(--forest);
  font-size: 34px;
  line-height: 1.16;
}

.landing-section p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  background: #F2F8F2;
}

.feature-band article {
  min-height: 180px;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.feature-band strong {
  display: block;
  color: var(--forest);
  font-size: 20px;
  margin-bottom: 12px;
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
}

.landing-stats div {
  min-height: 138px;
  display: grid;
  align-content: space-between;
  padding: 20px;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
}

.landing-stats strong {
  font-size: 30px;
}

.landing-stats span {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .metric-grid,
  .metric-grid.three {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

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

  .form-grid.compact,
  .harvest-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .feature-band,
  .landing-stats {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding: 16px;
  }

  .menu-toggle {
    display: inline-flex;
    background: var(--forest);
    color: #fff;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 150px;
  }

  .metric-grid,
  .metric-grid.three,
  .form-grid,
  .form-grid.compact,
  .harvest-form {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 112px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .landing-nav {
    position: absolute;
    height: auto;
    padding: 16px;
    align-items: flex-start;
  }

  .landing-nav nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
  }

  .landing-nav nav a:not(.btn) {
    display: none;
  }

  .landing-hero {
    min-height: 82vh;
    padding: 116px 18px 42px;
    background:
      linear-gradient(90deg, rgba(17, 23, 13, 0.9) 0%, rgba(18, 66, 16, 0.7) 62%, rgba(17, 23, 13, 0.35) 100%),
      url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1200&q=78') center / cover;
  }

  .landing-hero h1 {
    font-size: 42px;
  }

  .landing-hero p {
    font-size: 16px;
  }

  .landing-section {
    padding: 42px 18px;
  }

  .landing-overview,
  .data-story {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .landing-section h2 {
    font-size: 27px;
  }
}

/* Enhanced dashboard polish */
:root {
  --surface: #FFFFFF;
  --soft-green: #F2F8F2;
  --shadow-sm: 0 10px 24px rgba(18, 66, 16, 0.07);
  --shadow-md: 0 18px 42px rgba(18, 66, 16, 0.11);
}

body:not(.auth-body):not(.landing-body) {
  background:
    linear-gradient(180deg, rgba(190, 219, 136, 0.18) 0, rgba(247, 250, 246, 0) 320px),
    var(--paper);
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  padding: 26px 18px;
  background: linear-gradient(180deg, #124210 0%, #0D300C 100%);
  box-shadow: 12px 0 36px rgba(17, 23, 13, 0.12);
}

.sidebar-nav {
  gap: 7px;
  margin-top: 38px;
}

.sidebar-nav a {
  padding: 12px 15px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  transform: translateX(2px);
}

.main-content {
  padding: 28px;
}

.topbar {
  gap: 22px;
  margin-bottom: 20px;
}

.topbar-actions {
  max-width: 780px;
}

input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(36, 209, 64, 0.14);
}

.btn,
.icon-button {
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--emerald));
  box-shadow: 0 10px 22px rgba(36, 209, 64, 0.22);
}

.dashboard-brief {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(190, 219, 136, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 242, 0.94)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-brief span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-brief h2 {
  margin: 0;
  color: var(--forest);
  font-size: 26px;
  line-height: 1.18;
}

.dashboard-brief p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.metric-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.metric-grid .metric-card:nth-child(1),
.metric-grid .metric-card:nth-child(4) {
  grid-column: span 3;
}

.metric-grid .metric-card:nth-child(2),
.metric-grid .metric-card:nth-child(3),
.metric-grid .metric-card:nth-child(5) {
  grid-column: span 2;
}

.metric-grid.three .metric-card {
  grid-column: span 4;
}

.metric-card {
  min-height: 138px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  filter: brightness(1.03);
  box-shadow: var(--shadow-md);
}

.metric-card span {
  opacity: 0.88;
}

.metric-card strong {
  font-size: clamp(24px, 2.1vw, 32px);
  overflow-wrap: anywhere;
}

.emerald { background: linear-gradient(140deg, var(--emerald), #8CE9A0); }
.lime { background: linear-gradient(140deg, var(--lime), var(--emerald)); }
.willow { background: linear-gradient(140deg, var(--willow), #DCEBB8); }
.onyx { background: linear-gradient(140deg, var(--onyx), #27321F); }
.forest { background: linear-gradient(140deg, var(--forest), #1E5D1B); }

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-grid.lower {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.panel,
.settings-tile {
  background: rgba(255, 255, 255, 0.96);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.panel-header h2 {
  color: var(--forest);
  line-height: 1.25;
}

.chart-panel {
  min-height: 350px;
}

.chart-panel canvas {
  min-height: 262px;
}

table {
  background: #fff;
}

th {
  background: var(--soft-green);
}

tbody tr:hover {
  background: var(--soft-green);
}

.table-empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.alert-panel {
  background: linear-gradient(180deg, #FFF6EA, var(--warning-bg));
}

.alert-item {
  padding: 13px 0;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

  .metric-grid,
  .metric-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid .metric-card,
  .metric-grid.three .metric-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .app-shell,
  .dashboard-brief,
  .metric-grid,
  .metric-grid.three {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 16px;
  }

  .dashboard-brief {
    padding: 18px;
  }

  .dashboard-brief h2 {
    font-size: 22px;
  }

  .metric-card {
    min-height: 116px;
  }
}

/* Icon-led visual refinement */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-nav i,
.topbar i,
.panel-header i,
.metric-card i,
.btn i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.topbar-actions {
  padding: 7px;
  border: 1px solid rgba(190, 219, 136, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(18, 66, 16, 0.05);
}

.filter-control {
  min-width: 156px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.filter-control:focus-within {
  border-color: var(--willow);
  box-shadow: 0 0 0 4px rgba(190, 219, 136, 0.18);
}

.filter-control select,
.filter-control input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  box-shadow: none;
}

.filter-control select:focus,
.filter-control input:focus {
  box-shadow: none;
}

.search-control {
  min-width: 180px;
}

.profile-chip {
  box-shadow: 0 10px 24px rgba(18, 66, 16, 0.18);
}

.dashboard-brief {
  position: relative;
  overflow: hidden;
}

.dashboard-brief::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -38px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(101, 219, 130, 0.18);
  pointer-events: none;
}

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

.metric-top i {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
}

.metric-card.onyx .metric-top i,
.metric-card.forest .metric-top i {
  background: rgba(255, 255, 255, 0.13);
}

.metric-card small {
  color: currentColor;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.72;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.panel {
  backdrop-filter: blur(10px);
}

.panel-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-header h2 i {
  color: var(--lime);
}

.chart-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.chart-panel::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(190, 219, 136, 0.18);
  pointer-events: none;
}

.chart-frame {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 300px;
  overflow: hidden;
}

.chart-frame-trend {
  height: 308px;
}

.chart-frame-commodity {
  height: 300px;
}

.chart-frame-farmer-productivity {
  height: 340px;
}

.chart-frame canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0 !important;
}

.admin-productivity-row {
  margin-bottom: 20px;
}

.farmer-productivity-panel {
  max-width: 860px;
}

.chart-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 90%);
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--willow);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .chart-frame,
  .chart-frame-trend,
  .chart-frame-commodity,
  .chart-frame-farmer-productivity {
    height: 288px;
  }
}

@media (max-width: 768px) {
  .chart-frame,
  .chart-frame-trend,
  .chart-frame-commodity,
  .chart-frame-farmer-productivity {
    height: 250px;
  }
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  min-width: 860px;
}

th:first-child {
  border-top-left-radius: 8px;
}

th:last-child {
  border-top-right-radius: 8px;
}

.alert-panel .panel-header h2 i {
  color: var(--warning-text);
}

.empty-state {
  padding: 16px;
  border: 1px dashed #FFD8A8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

@media (max-width: 1100px) {
  .topbar-actions {
    max-width: none;
  }

  .filter-control,
  .search-control {
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar-actions > *,
  .filter-control,
  .search-control {
    width: 100%;
    min-width: 0;
  }

  .metric-top i {
    width: 34px;
    height: 34px;
  }
}

/* Collapsible sidebar and profile footer */
.app-shell {
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: width 180ms ease, padding 180ms ease, transform 180ms ease;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-text,
.sidebar-nav a span,
.sidebar-profile-copy,
.sidebar-logout span {
  transition: opacity 140ms ease, width 160ms ease;
}

.sidebar-collapse {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.sidebar-collapse i {
  width: 18px;
  height: 18px;
}

.sidebar-nav {
  flex: 1;
  align-content: start;
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--emerald);
  color: var(--forest);
  font-weight: 800;
}

.sidebar-profile-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-profile-copy strong,
.sidebar-profile-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-copy strong {
  color: #fff;
  font-size: 14px;
}

.sidebar-profile-copy span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.sidebar-logout {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
}

.sidebar-logout:hover {
  background: var(--emerald);
  color: var(--forest);
}

.sidebar-logout i {
  width: 17px;
  height: 17px;
}

.menu-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--forest);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-left: 16px;
  padding-right: 16px;
}

.app-shell.sidebar-collapsed .sidebar-head {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .sidebar-nav a span,
.app-shell.sidebar-collapsed .sidebar-profile-copy,
.app-shell.sidebar-collapsed .sidebar-logout span {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-shell.sidebar-collapsed .sidebar-collapse {
  position: absolute;
  top: 74px;
  left: 70px;
  background: var(--forest);
  box-shadow: 0 12px 26px rgba(17, 23, 13, 0.16);
}

.app-shell.sidebar-collapsed .sidebar-collapse i {
  transform: rotate(180deg);
}

.app-shell.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app-shell.sidebar-collapsed .sidebar-profile {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 10px;
}

.app-shell.sidebar-collapsed .sidebar-logout {
  width: 42px;
  height: 42px;
  min-height: 42px;
  margin-top: 0;
}

@media (max-width: 768px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    width: 280px;
    padding: 22px 16px;
  }

  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .sidebar-nav a span,
  .app-shell.sidebar-collapsed .sidebar-profile-copy,
  .app-shell.sidebar-collapsed .sidebar-logout span {
    width: auto;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }

  .app-shell.sidebar-collapsed .sidebar-head {
    justify-content: space-between;
  }

  .app-shell.sidebar-collapsed .sidebar-nav a {
    justify-content: flex-start;
    padding: 12px 15px;
  }

  .app-shell.sidebar-collapsed .sidebar-profile {
    grid-template-columns: 42px minmax(0, 1fr);
    justify-items: stretch;
  }

  .app-shell.sidebar-collapsed .sidebar-logout {
    width: auto;
  }

  .app-shell.sidebar-collapsed .sidebar-collapse {
    position: static;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    z-index: 24;
    inset: 0;
    background: rgba(17, 23, 13, 0.34);
  }

  body.sidebar-open .sidebar {
    z-index: 30;
  }
}

/* CRUD polish */
.page-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(190, 219, 136, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(242,248,242,0.92));
  box-shadow: var(--shadow-sm);
}

.page-intro span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.page-intro h2 {
  margin: 0;
  color: var(--forest);
  font-size: 24px;
  line-height: 1.2;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.form-panel {
  margin-bottom: 18px;
}

.user-form {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.user-form label {
  font-size: 14px;
}

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

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 42px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row span {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #DFE8DA;
  position: relative;
  transition: background 160ms ease;
}

.switch-row span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 23, 13, 0.18);
  transition: transform 160ms ease;
}

.switch-row input:checked + span {
  background: var(--lime);
}

.switch-row input:checked + span::after {
  transform: translateX(18px);
}

.commodity-picker {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #F8FBF6;
}

.commodity-picker > span {
  color: var(--forest);
  font-weight: 800;
}

.commodity-picker p {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.commodity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commodity-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.commodity-options input {
  width: auto;
  accent-color: var(--lime);
}

.table-panel .panel-header {
  align-items: center;
}

.table-search {
  width: min(280px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-search input {
  border: 0;
  padding-left: 0;
  background: transparent;
}

.table-search input:focus {
  box-shadow: none;
}

.management-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.management-table th[data-sort]::after {
  content: "sort";
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
}

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

.entity-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #E8F9ED;
  color: var(--forest);
  font-weight: 800;
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success,
.badge-green {
  background: #E8F9ED;
  color: var(--forest);
}

.badge-muted,
.chip.muted {
  background: #EEF2EA;
  color: var(--muted);
}

.badge-onyx {
  background: var(--onyx);
  color: #fff;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 360px;
}

.chip {
  background: #F2F8F2;
  color: var(--forest);
  border: 1px solid var(--line);
}

.btn-sm {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 13px;
}

.actions form {
  margin: 0;
}

@media (max-width: 1100px) {
  .page-intro,
  .user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-intro,
  .user-form {
    grid-template-columns: 1fr;
  }

  .page-intro {
    padding: 18px;
  }

  .page-intro h2 {
    font-size: 21px;
  }

  .table-panel .panel-header {
    align-items: stretch;
  }

  .table-search {
    width: 100%;
  }

  .actions {
    flex-wrap: wrap;
  }
}

/* Professional dashboard layout reset */
.main-content {
  width: 100%;
}

.dashboard-brief {
  min-height: 0;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.dashboard-brief h2 {
  font-size: 23px;
}

.dashboard-brief::after,
.chart-panel::before {
  display: none;
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid .metric-card,
.metric-grid .metric-card:nth-child(1),
.metric-grid .metric-card:nth-child(2),
.metric-grid .metric-card:nth-child(3),
.metric-grid .metric-card:nth-child(4),
.metric-grid .metric-card:nth-child(5) {
  grid-column: auto;
}

.metric-card {
  min-height: 118px;
  padding: 16px;
}

.metric-card strong {
  font-size: clamp(22px, 1.9vw, 30px);
}

.metric-card small {
  font-size: 12px;
}

.metric-top i {
  width: 32px;
  height: 32px;
  padding: 7px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

.dashboard-grid > .chart-panel:first-child {
  grid-column: span 7;
}

.dashboard-grid > .chart-panel:nth-child(2) {
  grid-column: span 5;
}

.insight-grid .farmer-productivity-panel {
  grid-column: span 7;
}

.insight-grid .alert-panel {
  grid-column: span 5;
}

.dashboard-grid.lower .table-panel {
  grid-column: span 8;
}

.dashboard-grid.lower .alert-panel {
  grid-column: span 4;
}

.dashboard-table-row {
  display: block;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
  border-color: rgba(190, 219, 136, 0.68);
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header h2 {
  font-size: 18px;
}

.chart-panel {
  min-height: 0;
  overflow: hidden;
}

.chart-frame,
.chart-frame-trend,
.chart-frame-commodity,
.chart-frame-farmer-productivity {
  height: 260px;
}

.chart-frame-farmer-productivity {
  height: 280px;
}

.farmer-productivity-panel {
  max-width: none;
}

.alert-panel {
  min-height: 100%;
}

.alert-item:last-child {
  border-bottom: 0;
}

.table-panel .table-wrap {
  max-height: none;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid > .chart-panel:first-child,
  .dashboard-grid > .chart-panel:nth-child(2),
  .insight-grid .farmer-productivity-panel,
  .insight-grid .alert-panel,
  .dashboard-grid.lower .table-panel,
  .dashboard-grid.lower .alert-panel {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .dashboard-brief {
    grid-template-columns: 1fr;
    padding: 16px;
  }

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

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

  .dashboard-grid > .chart-panel:first-child,
  .dashboard-grid > .chart-panel:nth-child(2),
  .insight-grid .farmer-productivity-panel,
  .insight-grid .alert-panel,
  .dashboard-grid.lower .table-panel,
  .dashboard-grid.lower .alert-panel {
    grid-column: auto;
  }

  .chart-frame,
  .chart-frame-trend,
  .chart-frame-commodity,
  .chart-frame-farmer-productivity {
    height: 240px;
  }
}

/* Dashboard card layout bugfix */
.dashboard-grid {
  align-items: start;
}

.insight-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
}

.insight-grid .farmer-productivity-panel,
.insight-grid .alert-panel {
  grid-column: auto;
}

.insight-grid .alert-panel {
  min-height: 0;
  align-self: start;
}

.insight-grid .alert-panel [data-low-lands] {
  display: grid;
  gap: 10px;
}

.chart-frame-farmer-productivity {
  height: 230px;
}

.chart-frame-commodity {
  height: 240px;
}

.panel {
  min-width: 0;
}

.alert-panel .empty-state {
  margin: 0;
}

.dashboard-table-row {
  margin-top: 2px;
}

@media (max-width: 1280px) {
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-grid .farmer-productivity-panel,
  .insight-grid .alert-panel {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .chart-frame-farmer-productivity,
  .chart-frame-commodity {
    height: 220px;
  }
}

/* Overview header and first-screen refinement */
body:not(.auth-body):not(.landing-body) {
  background:
    linear-gradient(180deg, rgba(190, 219, 136, 0.2) 0, rgba(247, 250, 246, 0) 260px),
    #F7FAF6;
}

.main-content {
  padding-top: 22px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(520px, auto);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar > div {
  min-width: 0;
}

.topbar h1 {
  font-size: 28px;
  line-height: 1.05;
}

.topbar p {
  font-size: 14px;
}

.topbar-actions {
  width: min(880px, 100%);
  max-width: none;
  display: grid;
  grid-template-columns: 150px 190px 170px minmax(180px, 1fr) 140px;
  gap: 8px;
  justify-self: end;
  padding: 8px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(190, 219, 136, 0.9);
}

.filter-control,
.search-control {
  min-width: 0;
  height: 44px;
}

.topbar-actions .btn {
  min-height: 44px;
}

.dashboard-brief {
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.dashboard-brief span {
  margin-bottom: 6px;
}

.dashboard-brief h2 {
  font-size: 24px;
}

.dashboard-brief p {
  font-size: 14px;
}

.metric-grid {
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 108px;
  padding: 15px 16px;
}

.metric-card strong {
  font-size: clamp(21px, 1.7vw, 28px);
}

.dashboard-grid {
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 16px;
}

.panel-header {
  margin-bottom: 10px;
}

.chart-frame,
.chart-frame-trend,
.chart-frame-commodity {
  height: 230px;
}

.chart-frame-farmer-productivity {
  height: 220px;
}

@media (max-width: 1500px) {
  .topbar {
    grid-template-columns: auto minmax(220px, 1fr);
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(180px, 1.2fr) 140px;
  }
}

@media (max-width: 1050px) {
  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .btn {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .topbar {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

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

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

/* Analysis page */
.analysis-intro {
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 360px);
}

.analysis-selector {
  display: grid;
  align-items: end;
}

.analysis-selector label {
  color: var(--forest);
}

.analysis-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.analysis-chart-frame {
  height: 280px;
}

.analysis-chart-grid .panel {
  min-width: 0;
}

.management-table a {
  color: var(--forest);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .analysis-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .analysis-intro,
  .analysis-metrics {
    grid-template-columns: 1fr;
  }

  .analysis-chart-frame {
    height: 240px;
  }
}

/* Landing and login optimization */
.landing-body {
  background: #FFFFFF;
}

.landing-hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(320px, 760px) minmax(280px, 420px);
  gap: 36px;
  align-items: end;
  padding: 126px 48px 58px;
}

.landing-hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 48px rgba(17, 23, 13, 0.18);
}

.landing-hero-panel div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.landing-hero-panel strong {
  color: #fff;
  font-size: 16px;
}

.landing-hero-panel span {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.feature-band {
  padding-left: 48px;
  padding-right: 48px;
}

.feature-band article {
  position: relative;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #E8F9ED;
  color: var(--forest);
  font-weight: 800;
}

.workflow-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  gap: 42px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.workflow-copy h2 {
  margin: 0 0 16px;
  color: var(--forest);
  font-size: 34px;
  line-height: 1.16;
}

.workflow-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.workflow-list {
  display: grid;
  gap: 14px;
}

.workflow-list div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.workflow-list strong {
  color: var(--forest);
  font-size: 17px;
}

.workflow-list span {
  color: var(--muted);
  line-height: 1.6;
}

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 48px;
  border: 1px solid rgba(190, 219, 136, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, #FFFFFF, #F2F8F2);
  box-shadow: var(--shadow-sm);
}

.landing-cta h2 {
  max-width: 640px;
}

.auth-body {
  place-items: stretch;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(18, 66, 16, 0.92), rgba(17, 23, 13, 0.76)),
    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1800&q=80') center / cover;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 480px);
  gap: 42px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.auth-info {
  color: #fff;
}

.auth-brand {
  color: #fff;
}

.auth-kicker {
  display: inline-flex;
  margin: 34px 0 14px;
  color: var(--emerald);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.auth-info h1 {
  width: min(660px, 100%);
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.auth-info p {
  width: min(620px, 100%);
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.75;
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  width: min(620px, 100%);
  margin-top: 26px;
}

.auth-benefits div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.auth-benefits strong {
  color: #fff;
}

.auth-benefits span {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.auth-card {
  width: 100%;
  padding: 30px;
}

.auth-card-head span {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card-head h2 {
  margin: 8px 0 8px;
  color: var(--onyx);
  font-size: 28px;
}

.auth-card-head p {
  margin: 0 0 22px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form input {
  min-height: 46px;
}

.auth-form .btn {
  min-height: 48px;
  margin-top: 4px;
}

.login-help {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #F2F8F2;
}

.login-help p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-help span {
  color: var(--forest);
  font-weight: 800;
}

@media (max-width: 980px) {
  .landing-hero,
  .workflow-section,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .landing-hero-panel {
    width: min(560px, 100%);
  }

  .auth-info {
    display: none;
  }

  .auth-shell {
    width: min(520px, calc(100% - 32px));
  }
}

@media (max-width: 768px) {
  .landing-hero {
    padding: 116px 18px 42px;
  }

  .landing-cta {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 18px;
    margin-right: 18px;
  }

  .workflow-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .workflow-copy h2 {
    font-size: 27px;
  }
}

/* Attached institution logos */
.brand-logo-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(17, 23, 13, 0.12);
}

.brand-logo-group img {
  width: 31px;
  height: 31px;
  object-fit: contain;
  display: block;
}

.auth-logo-group img {
  width: 38px;
  height: 38px;
}

.auth-card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-card-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.app-shell.sidebar-collapsed .brand-logo-group {
  gap: 0;
  padding: 4px;
}

.app-shell.sidebar-collapsed .brand-logo-group img {
  width: 30px;
  height: 30px;
}

.app-shell.sidebar-collapsed .brand-logo-group img + img {
  display: none;
}

@media (max-width: 768px) {
  .app-shell.sidebar-collapsed .brand-logo-group img + img {
    display: block;
  }
}
