/* Farm requirement actions + relic material drill-down */
#workspace-farm .farm-filter-buttons {
  gap: 10px;
}
#workspace-farm .farm-filter-buttons button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}
#workspace-farm .farm-filter-buttons button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #d8e4f3;
  font-size: .68rem;
}
#workspace-farm .farm-filter-buttons button.active {
  border-color: #78e9e5;
  background: rgba(75, 196, 198, .20);
  color: #f4ffff;
  box-shadow: 0 0 0 2px rgba(94, 225, 220, .10), 0 6px 18px rgba(0,0,0,.18);
}
#workspace-farm .farm-filter-buttons button[data-journey-filter="far"] {
  border-color: rgba(255, 142, 82, .48);
  color: #ffc18b;
}
#workspace-farm .farm-filter-buttons button[data-journey-filter="close"] {
  border-color: rgba(245, 220, 98, .46);
  color: #fff09a;
}
#workspace-farm .farm-filter-buttons button[data-journey-filter="ready"] {
  border-color: rgba(99, 230, 168, .42);
  color: #8ff0c2;
}
#workspace-farm .farm-filter-buttons button[data-journey-filter="all"] {
  color: #d9e6f6;
}

#workspace-farm .farm-metric-action {
  position: relative;
  min-height: 72px;
  padding-bottom: 20px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#workspace-farm .farm-metric-action:hover,
#workspace-farm .farm-metric-action:focus {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.24);
  border-color: #79dfe8;
}
#workspace-farm .farm-metric-detail-label {
  position: absolute;
  left: 7px;
  bottom: 5px;
  color: #b9ecf2;
  font-size: .53rem;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.farm-material-dialog {
  width: min(940px, calc(100vw - 28px));
  max-width: 940px;
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 0;
  border: 1px solid #3c5478;
  border-radius: 18px;
  background: #091321;
  color: #eef6ff;
  box-shadow: 0 26px 90px rgba(0,0,0,.6);
}
.farm-material-dialog::backdrop { background: rgba(0, 5, 14, .76); backdrop-filter: blur(4px); }
.farm-material-dialog #farmMaterialDialogBody { padding: 24px; }
.farm-material-close {
  position: sticky;
  z-index: 3;
  top: 12px;
  float: right;
  margin: 12px 12px -52px 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,130,130,.35);
  border-radius: 10px;
  background: #172034;
  color: #ffabab;
  font-size: 1.15rem;
}
.farm-material-dialog h2 { margin: 4px 0 18px; font-size: 1.55rem; }
.farm-material-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 18px;
}
.farm-material-hero > div {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid #314968;
  border-radius: 11px;
  background: #0d1a2d;
}
.farm-material-hero span { color: #8196b2; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.farm-material-hero strong { color: #f3f9ff; font-size: 1.3rem; }
.farm-material-hero i { align-self: center; color: #6dded6; font-size: 1.3rem; font-style: normal; }
.farm-material-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #263b59;
}
.farm-material-section-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 11px; }
.farm-material-section-head span { color: #7188a6; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 850; }
.farm-material-section-head h3 { margin: 3px 0 0; font-size: 1rem; color: #dce9f9; }
.farm-material-section-head small { color: #8195b0; }
.farm-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}
.farm-material-item {
  padding: 12px;
  border: 1px solid #314967;
  border-radius: 10px;
  background: #0d192b;
}
.farm-material-item.signal { border-color: rgba(88, 211, 233, .42); background: rgba(44, 143, 163, .09); }
.farm-material-item.scrap { border-color: rgba(239, 177, 86, .38); background: rgba(168, 104, 37, .08); }
.farm-material-item.currency { border-color: rgba(127, 151, 190, .35); }
.farm-material-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.farm-material-item-head strong { color: #f2f7ff; font-size: .81rem; }
.farm-material-item-head b { color: #85eee1; font-size: 1rem; }
.farm-material-item > span { display: block; margin-top: 6px; color: #d0dded; font-size: .68rem; font-weight: 850; }
.farm-material-item p { margin: 4px 0 0; color: #889bb5; font-size: .67rem; line-height: 1.45; }
.farm-source-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.farm-source-guide article {
  padding: 12px 13px;
  border: 1px solid #2e4564;
  border-radius: 10px;
  background: #0b1728;
}
.farm-source-guide strong { color: #9eece7; }
.farm-source-guide p,
.farm-material-copy { margin: 5px 0 0; color: #9caec4; font-size: .74rem; line-height: 1.55; }
.farm-material-boundary {
  margin: 15px 0 0;
  padding: 11px 12px;
  border: 1px solid #3b4760;
  border-radius: 9px;
  background: #101726;
  color: #aab7ca;
  font-size: .72rem;
  line-height: 1.5;
}
.farm-material-complete {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(99,230,168,.38);
  border-radius: 10px;
  background: rgba(99,230,168,.08);
  color: #8ff0c2;
  font-weight: 850;
}
.farm-open-planner {
  width: 100%;
  min-height: 46px;
  margin-top: 15px;
  border-color: #6fe4de;
  background: #67ded5;
  color: #061416;
  font-weight: 950;
}

@media (max-width: 700px) {
  #workspace-farm .farm-filter-buttons { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  #workspace-farm .farm-filter-buttons button { width: 100%; }
  .farm-material-dialog #farmMaterialDialogBody { padding: 18px 14px; }
  .farm-material-hero { grid-template-columns: 1fr 1fr; }
  .farm-material-hero i { display: none; }
  .farm-source-guide { grid-template-columns: 1fr; }
}
