:root {
  --green-900: #1e3932;
  --green-700: #006241;
  --green-100: #eaf3ef;
  --surface: #ffffff;
  --surface-soft: #f7f6f2;
  --border: #dfe5e2;
  --text: #1f2a26;
  --muted: #68746f;
  --danger-soft: #fff2f0;
  --danger-text: #9f2d20;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-soft);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  font-size: 14px;
  line-height: 1.45;
}

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

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

.app-topbar {
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: var(--green-900);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.preview-badge {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  white-space: nowrap;
}

.topbar-action {
  margin: 0;
}

.text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 9px 10px;
}

.app-main {
  min-height: calc(100vh - 56px);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading h1 {
  margin: 2px 0 4px;
  color: var(--green-900);
  font-size: 25px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.section-block {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.section-meta {
  color: var(--muted);
  font-size: 12px;
}

.entity-list {
  border-top: 1px solid var(--border);
}

.entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.entity-main {
  min-width: 0;
}

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

.entity-title-row h3 {
  margin: 0;
  font-size: 15px;
}

.entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-ok {
  color: var(--green-700);
  background: var(--green-100);
}

.status-muted {
  color: #5d6763;
  background: #edf0ee;
}

.training-video {
  display: block;
  width: min(100%, 760px);
  max-height: 440px;
  border-radius: 8px;
}

.permission-matrix {
  display: grid;
  gap: 8px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(0, 2.2fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.permission-options label {
  font-size: 13px;
}

.permission-options-stack {
  display: grid;
  gap: 8px;
}

@media (max-width: 640px) {
  .permission-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.entity-cp-preview {
  display: grid;
  gap: 2px;
  min-width: 126px;
  text-align: right;
}

.entity-cp-preview .label {
  color: var(--muted);
  font-size: 11px;
}

.entity-cp-preview strong {
  font-size: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-item {
  min-height: 54px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.module-link,
.mobile-action-link,
.nav-link-item,
.secondary-link,
.back-link {
  text-decoration: none;
}

.module-link {
  cursor: pointer;
}

.module-item span {
  color: var(--muted);
  font-size: 11px;
}

.module-item.is-current {
  border-color: #b5d1c6;
  background: var(--green-100);
  color: var(--green-900);
}

.module-item:disabled {
  cursor: default;
  opacity: 0.72;
}

.a-mobile-categories,
.a-mobile-bottom-nav {
  display: none;
}

.mobile-category-section {
  scroll-margin-top: 68px;
}

.mobile-category-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mobile-category-heading h2 {
  margin: 1px 0 0;
  color: var(--green-900);
  font-size: 17px;
  line-height: 1.3;
}

.mobile-category-summary {
  margin: 0 0 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.mobile-category-summary span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-category-summary strong {
  color: var(--green-900);
  font-size: 12px;
}

.mobile-category-kicker,
.mobile-category-state {
  color: var(--muted);
  font-size: 11px;
}

.mobile-category-kicker {
  color: var(--green-700);
  font-weight: 700;
}

.mobile-action-list {
  border-top: 1px solid var(--border);
}

.mobile-action-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mobile-action-link {
  cursor: pointer;
}

.mobile-action-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mobile-action-row strong {
  font-size: 14px;
  line-height: 1.35;
}

.mobile-action-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mobile-action-row:disabled {
  opacity: 1;
}

.mobile-action-arrow {
  flex: 0 0 auto;
  color: #8a9691;
  font-size: 22px;
  font-weight: 300;
}

.history-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0 5px;
  scrollbar-width: thin;
}

.history-filter-link {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  background: #fff;
}

.history-filter-link small {
  color: inherit;
  font-size: 11px;
}

.history-filter-link.is-active {
  border-color: var(--green-700);
  color: var(--green-700);
  font-weight: 700;
  background: var(--surface-soft);
}

.history-row {
  grid-template-columns: minmax(0, 1fr) auto 24px;
}

.history-row-meta {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.history-detail-fields {
  display: grid;
  gap: 0;
}

.history-detail-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.history-detail-row:last-child {
  border-bottom: 0;
}

.history-detail-row span {
  color: var(--muted);
  font-size: 12px;
}

.history-detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
}

.history-body,
.history-timeline-row p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.history-json {
  max-width: 100%;
  margin-bottom: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.history-timeline-row {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 3px 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.history-timeline-row > span {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.history-timeline-row p {
  grid-column: 1 / -1;
  font-size: 13px;
}

.empty-state,
.preview-note {
  padding: 14px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
}

.login-layout {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-stack {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
}

.login-panel {
  width: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.public-pso-panel {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.public-pso-kicker {
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
}

.public-pso-panel h2 {
  margin: 2px 0 3px;
  color: var(--green-900);
  font-size: 17px;
  line-height: 1.3;
}

.public-pso-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.public-pso-button {
  min-height: 46px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #b5d1c6;
  border-radius: 7px;
  background: var(--green-100);
  color: var(--green-900);
  text-align: left;
}

.public-pso-button small {
  color: var(--muted);
  font-size: 11px;
}

.login-panel h1 {
  margin: 4px 0 5px;
  color: var(--green-900);
  font-size: 24px;
  line-height: 1.2;
}

.portal-switch {
  margin: 18px 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.portal-tab {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.portal-tab.is-active {
  border-color: var(--green-700);
  color: var(--green-700);
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bcc8c3;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bcc8c3;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.field textarea {
  resize: vertical;
}

.checkbox-list {
  max-height: 320px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid #bcc8c3;
  border-radius: 7px;
  background: #fff;
}

.checkbox-list > div {
  padding: 5px 0;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.checkbox-list input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
}

.field-error {
  color: var(--danger-text);
  font-weight: 500;
}

.business-form {
  display: grid;
  gap: 13px;
}

.form-page-shell {
  max-width: 760px;
}

.form-actions,
.submit-confirm-panel,
.cp-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.submit-confirm-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.submit-confirm-panel p,
.cp-callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.primary-button.inline-primary,
.secondary-button {
  min-height: 44px;
  padding: 9px 14px;
}

.secondary-button {
  border: 1px solid #b5d1c6;
  border-radius: 7px;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 700;
  cursor: pointer;
}

.secondary-link,
.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--green-700);
  font-weight: 700;
}

.back-link {
  margin-top: 12px;
}

.cp-list {
  border-top: 1px solid var(--border);
}

.cp-list-row {
  min-height: 68px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.cp-list-row.compact-row {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
}

.cp-list-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.cp-list-main span,
.cycle-window,
.cp-status-pair span {
  color: var(--muted);
  font-size: 12px;
}

.cp-status-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.cp-status-pair > div {
  display: grid;
  gap: 2px;
}

.cp-status-pair strong {
  color: var(--green-900);
  font-size: 12px;
}

.cp-row-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cp-history-diff,
.cp-history-diff-empty {
  grid-column: 1 / -1;
  font-size: 12px;
}

.cp-history-diff {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfdfc;
}

.cp-history-diff summary {
  color: var(--green-700);
  font-weight: 700;
  cursor: pointer;
}

.cp-history-diff-grid {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cp-history-diff-grid > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-left: 2px solid #b5d1c6;
}

.cp-history-diff-grid span,
.cp-history-diff p,
.cp-history-diff-empty {
  color: var(--muted);
}

.cp-history-diff p {
  margin: 8px 0 0;
}

.text-action {
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green-700);
  font-weight: 700;
  cursor: pointer;
}

.danger-action {
  color: var(--danger-text);
}

.notification-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.notification-row.is-unread {
  border-left: 3px solid var(--green-700);
  padding-left: 10px;
}

.notification-detail-body {
  display: grid;
  gap: 18px;
}

.notification-detail-body p {
  margin: 0;
  line-height: 1.75;
  white-space: pre-wrap;
}

.cycle-window {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
}

.field input:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.12);
}

.primary-button {
  min-height: 44px;
  margin-top: 2px;
  border: 0;
  border-radius: 7px;
  background: var(--green-700);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  background: #005238;
}

.alert {
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid #f0c4bd;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 13px;
}

.login-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.b-layout {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.b-sidebar {
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: #fff;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 14px;
  border-bottom: 1px solid var(--border);
}

.sidebar-user div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.avatar-placeholder {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 800;
}

.sidebar-nav {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.nav-item {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #33403b;
  text-align: left;
}

.nav-item.is-active {
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 700;
}

.nav-item:disabled {
  color: #6c7772;
}

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

.compact-heading {
  margin-bottom: 16px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.summary-strip > div,
.summary-strip > a {
  min-width: 0;
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--border);
}

.summary-strip > a {
  color: inherit;
  text-decoration: none;
}

.summary-strip > div:last-child,
.summary-strip > a:last-child {
  border-right: 0;
}

.agronomy-summary-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-strip span {
  color: var(--muted);
  font-size: 11px;
}

.summary-strip strong {
  color: var(--green-900);
  font-size: 20px;
  line-height: 1.15;
}

.survey-summary-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-review-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-review-form input {
  min-width: 220px;
  flex: 1 1 260px;
}

.workbook-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 8px;
}

.workbook-metric {
  min-height: 86px;
  padding: 13px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.workbook-metric span,
.workbook-metric-note,
.workbook-table small,
.candidate-row small {
  color: var(--muted);
  font-size: 12px;
}

.workbook-metric strong {
  color: var(--green-900);
  font-size: 24px;
}

.workbook-metric.is-active {
  border-color: var(--green-700);
  box-shadow: 0 0 0 2px rgba(0, 98, 65, 0.08);
}

.workbook-metric-note {
  margin: 0 0 14px;
}

.workbook-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
}

.workbook-filter-actions,
.workbook-export-form,
.candidate-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workbook-filter-actions {
  grid-column: 1 / -1;
}

.workbook-export-form {
  margin-top: 10px;
  justify-content: flex-end;
}

.button-link {
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.workbook-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.workbook-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
}

.workbook-table th,
.workbook-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.workbook-table th {
  background: var(--surface-soft);
  color: var(--green-900);
  white-space: nowrap;
}

.workbook-table td:first-child {
  min-width: 230px;
}

.workbook-table td:first-child,
.candidate-row span {
  display: grid;
  gap: 2px;
}

.workbook-attention {
  display: block;
  margin-top: 3px;
  color: var(--danger-text) !important;
  font-weight: 700;
}

.candidate-search {
  margin-bottom: 10px;
}

.candidate-search input {
  flex: 1;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bcc8c3;
  border-radius: 7px;
}

.candidate-list {
  margin-bottom: 12px;
  border-top: 1px solid var(--border);
}

.candidate-row {
  min-height: 56px;
  padding: 9px 4px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border);
}

.candidate-row input {
  width: 18px;
  height: 18px;
}

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

  .workbook-filter-form {
    grid-template-columns: 1fr;
  }

  .workbook-filter-actions {
    grid-column: auto;
  }

  .app-topbar {
    padding: 0 14px;
  }

  .page-shell,
  .b-content {
    padding: 16px 14px 24px;
  }

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

  .entity-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .entity-cp-preview {
    min-width: 0;
    text-align: left;
  }

  .b-layout {
    display: block;
  }

  .b-sidebar {
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-user {
    padding-bottom: 10px;
  }

  .sidebar-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    min-height: 44px;
    min-width: max-content;
    border: 1px solid var(--border);
    background: #fff;
  }

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

  .summary-strip > div:nth-child(2),
  .summary-strip > a:nth-child(2) {
    border-right: 0;
  }

  .summary-strip > div:nth-child(-n + 2),
  .summary-strip > a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .agronomy-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agronomy-summary-strip > a:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .cp-list-row,
  .cp-list-row.compact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 5px 10px;
  }

  .history-row .cp-list-main {
    grid-column: 1;
    grid-row: 1;
  }

  .history-row-meta {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .history-row > .mobile-action-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .history-detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .cp-status-pair {
    grid-template-columns: 1fr 1fr;
  }

  .cp-row-action {
    justify-content: flex-start;
  }

  .form-actions,
  .submit-confirm-panel,
  .cp-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-confirm-panel form,
  .submit-confirm-panel button,
  .cp-callout .secondary-link {
    width: 100%;
  }

  .a-portal-body .app-main,
  .a-home-shell,
  .a-section-shell {
    padding-bottom: 92px;
  }

  .a-modules-desktop {
    display: none;
  }

  .a-mobile-categories {
    display: grid;
    gap: 18px;
    margin-top: 18px;
  }

  .mobile-category-section {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
  }

  .a-mobile-bottom-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 62px;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 16px rgba(30, 57, 50, 0.06);
  }

  .mobile-nav-item {
    min-height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #61706a;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-nav-item.is-active {
    color: var(--green-700);
    font-weight: 800;
  }

  .mobile-nav-item.is-active::before {
    content: "";
    width: 22px;
    height: 3px;
    margin-bottom: -9px;
    border-radius: 999px;
    background: var(--green-700);
  }

}

@media (max-width: 480px) {
  .brand {
    font-size: 14px;
  }

  .preview-badge {
    display: none;
  }

  .page-heading h1,
  .login-panel h1 {
    font-size: 21px;
  }

  .section-block {
    padding: 13px;
    border-radius: 8px;
  }

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

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }
}
