/* 农事提醒与用肥日历 */
:root {
  --fc-green: #1a4d2e;
  --fc-soft: #e8f4ec;
  --fc-bg: #eef3f0;
  --fc-r: 12px;
}

.fc-page {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--fc-bg);
  color: #222;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.fc-page .p2-layout-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 14px 88px;
  box-sizing: border-box;
}

.fc-hero h1 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--fc-green);
  font-weight: 700;
}

.fc-hero p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #555;
  line-height: 1.55;
}

.fc-back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--fc-green);
  text-decoration: none;
  font-size: 14px;
}

.fc-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: calc(100vh - 200px);
}

.fc-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.fc-card.fc-card--main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fc-card.fc-card--main .fc-fields {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.fc-card.fc-card--history {
  flex-shrink: 0;
  max-height: 200px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fc-card.fc-card--history .fc-history {
  flex: 1;
  min-height: 0;
}

.fc-col--right {
  min-height: 0;
}

.fc-col--right .fc-tabs {
  flex-shrink: 0;
}

.fc-col--right #fcOut {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .fc-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .fc-col--right #fcOut {
    max-height: none;
  }
  .fc-card.fc-card--main {
    max-height: none;
  }
  .fc-card.fc-card--main .fc-fields {
    max-height: none;
  }
}

.fc-card {
  background: #fff;
  border-radius: var(--fc-r);
  border: 1px solid #e2e8e4;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.fc-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--fc-green);
}

.fc-fields label {
  display: block;
  font-size: 12px;
  color: #666;
  margin: 8px 0 4px;
}

.fc-fields input,
.fc-fields select,
.fc-fields textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cfd8d1;
  border-radius: 8px;
  font-size: 14px;
}

.fc-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fc-btn-row button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #c8d4cc;
  background: var(--fc-green);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.fc-btn-row button.fc-muted {
  background: #fff;
  color: var(--fc-green);
}

.fc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.fc-tabs button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.fc-tabs button.on {
  background: var(--fc-soft);
  border-color: var(--fc-green);
  color: var(--fc-green);
  font-weight: 700;
}

.fc-timeline {
  border-left: 3px solid var(--fc-green);
  padding-left: 14px;
  margin-left: 8px;
}

.fc-tl-item {
  position: relative;
  padding: 10px 0 14px 4px;
}

.fc-tl-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 14px;
  width: 10px;
  height: 10px;
  background: var(--fc-green);
  border-radius: 50%;
}

.fc-tl-item time {
  font-size: 12px;
  color: #888;
}

.fc-tl-item h4 {
  margin: 4px 0 6px;
  font-size: 15px;
  color: var(--fc-green);
}

.fc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.fc-node-card {
  background: #fff;
  border: 1px solid #dde8df;
  border-radius: var(--fc-r);
  padding: 12px;
  font-size: 13px;
}

.fc-node-card h4 {
  margin: 0 0 6px;
  color: var(--fc-green);
  font-size: 14px;
}

.fc-history {
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
}

.fc-history li {
  list-style: none;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.fc-history button {
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
}

.fc-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(26, 77, 46, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.fc-toast.show {
  opacity: 1;
}

.fc-print-area {
  background: #fff;
  padding: 16px;
  border-radius: var(--fc-r);
  border: 1px solid #ddd;
  box-sizing: border-box;
}

@media print {
  body * {
    visibility: hidden;
  }
  .fc-print-area,
  .fc-print-area * {
    visibility: visible;
  }
  .fc-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
  }
}
