* { margin: 0; padding: 0; box-sizing: border-box; }
.site-nav {
  width: 100%;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.site-nav a {
  color: #3d7a26;
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav .crumb { color: #888; }
body {
  font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #f0f7ec 0%, #e4f0da 100%);
  min-height: 100vh;
  padding: 20px 20px 40px;
}
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
}
.container {
  max-width: 1200px;
  width: 100%;
}
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 32px;
  margin-bottom: 24px;
}
h1 {
  font-size: 28px;
  color: #2d5a1e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.subtitle code {
  background: #eef7e9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #3a7a2a;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}
.form-group {
  min-width: 0;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group button {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #dce8d4;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #6aab4a;
}
.btn {
  padding: 10px 32px;
  background: #4d8f32;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: #3d7a26; }
.btn:active { transform: scale(0.97); }
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.preset-btn {
  padding: 6px 16px;
  border: 2px solid #dce8d4;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #555;
  transition: all 0.2s;
}
.preset-btn:hover { border-color: #6aab4a; color: #2d5a1e; }
.preset-btn.active {
  background: #eef7e9;
  border-color: #6aab4a;
  color: #2d5a1e;
  font-weight: 600;
}

/* Summary */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-item {
  background: #f6faf3;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.summary-item .label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.summary-item .value {
  font-size: 22px;
  font-weight: 700;
  color: #2d5a1e;
}
.summary-item .value .unit {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}
.highlight-green {
  background: #dff0d6;
  border: 2px solid #6aab4a;
}
.highlight-green .value { color: #236b10; }

/* Table */
.schedule-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: #eef7e9;
  color: #2d5a1e;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #cde0c2;
  white-space: nowrap;
}
tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8f0e2;
  white-space: nowrap;
}
tbody tr:hover { background: #f9fcf7; }
tbody tr.water-row td:first-child { font-weight: 600; color: #2d5a1e; }
tbody tr:last-child td { border-bottom: none; }
.tag-water {
  display: inline-block;
  background: #4d8f32;
  color: #fff;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.tag-harvest {
  display: inline-block;
  background: #e8a820;
  color: #fff;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.tag-wait {
  display: inline-block;
  background: #dce8d4;
  color: #555;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
}
.tag-ready {
  display: inline-block;
  background: #e8a820;
  color: #fff;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #999;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

@media (max-width: 800px) {
  body { padding: 16px 10px; }
  .card { padding: 20px; }
  h1 { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .schedule-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .modal-box { max-width: 95%; }
}

/* Two-column layout — CSS Grid with auto-responsive stacking */
.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.col-main { min-width: 0; overflow: hidden; }
.col-extra { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-main > .card { margin-bottom: 20px; overflow: hidden; }

.side-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  padding: 20px;
}
.side-card input[type="number"],
.side-card select {
  width: 100%; padding: 10px 14px;
  border: 2px solid #dce8d4; border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.side-card input[type="number"]:focus,
.side-card select:focus { outline: none; border-color: #6aab4a; }
.side-presets {
  display: flex; gap: 6px; margin-top: 6px;
}
.side-presets .preset-btn {
  flex: 1; padding: 4px 6px; border-width: 1px; border-radius: 8px;
  font-size: 12px;
}

/* Split time inputs */
.time-split {
  display: flex;
  align-items: center;
  gap: 3px;
}
.time-split .part-wrap { display: flex; align-items: center; gap: 1px; }
.time-split input[type="number"] {
  width: 46px;
  padding: 6px 2px;
  text-align: center;
  border: 2px solid #dce8d4;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #2d5a1e;
  background: #fff;
}
.time-split input[type="number"]::-webkit-inner-spin-button,
.time-split input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.time-split input[type="number"]:focus { outline: none; border-color: #6aab4a; }
.time-split .unit { font-size: 11px; color: #888; min-width: 14px; }

/* Mode toggle */
.mode-toggle {
  display: flex;
  gap: 0;
  border: 2px solid #dce8d4;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.mode-toggle .mode-opt { flex: 1; position: relative; }
.mode-toggle .mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle .mode-opt label {
  display: block; padding: 7px 6px; text-align: center;
  font-size: 12px; font-weight: 600; font-family: inherit;
  color: #888; cursor: pointer; transition: all 0.2s; user-select: none;
}
.mode-toggle .mode-opt input:checked + label { background: #eef7e9; color: #2d5a1e; }
.mode-toggle .mode-opt:not(:last-child) label { border-right: 1px solid #e0ecda; }

input[type="time"] {
  width: 100%; padding: 8px 12px;
  border: 2px solid #dce8d4; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  color: #2d5a1e; background: #fff;
}
input[type="time"]:focus { outline: none; border-color: #6aab4a; }

/* Side panel labels */
.side-label {
  font-size: 12px; font-weight: 600; color: #444;
  margin-bottom: 4px; display: block;
}

/* Vertical timeline — absolute positioning for pixel-perfect alignment */
.tl-track {
  position: relative; margin: 8px 0;
}
.tl-bg-line {
  position: absolute; left: 67px; top: 12px; bottom: 12px;
  width: 3px; background: #d0e0c8; border-radius: 2px;
  transform: translateX(-50%);
}
.tl-item {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center;
}
.tl-time {
  width: 56px; flex-shrink: 0;
  font-size: 11px; font-weight: 600; color: #555;
  text-align: right; padding-right: 10px;
  line-height: 24px;
}
.tl-mid {
  width: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tl-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 3px solid; background: #fff;
  position: relative; z-index: 1; flex-shrink: 0;
}
.tl-dot.water { border-color: #2980b9; background: #d6edff; }
.tl-dot.now {
  width: 14px; height: 14px;
  border-color: #e74c3c; background: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.2);
}
.tl-dot.harvest-end {
  width: 14px; height: 14px;
  border-color: #e8a820; background: #e8a820;
  box-shadow: 0 0 0 3px rgba(232,168,32,0.2);
}
.tl-info {
  flex: 1; padding-left: 10px;
  font-size: 13px; line-height: 24px; color: #333;
}
.tl-info .tag-e {
  display: inline-block;
  font-size: 11px; padding: 1px 8px; border-radius: 10px;
  font-weight: 600; line-height: 1.6;
}
.tl-info .tag-e.water { background: #d6edff; color: #1a5a8a; }
.tl-info .tag-e.harvest { background: #fef0c8; color: #8a6a20; }
.tl-info .tag-e.now { background: #fde8e8; color: #c0392b; }
.tl-wait-info {
  font-size: 11px; color: #888; line-height: 24px;
  display: flex; align-items: center; gap: 4px;
}
.tl-wait-info .bar {
  display: inline-block; width: 28px; height: 3px;
  background: #b8daa4; border-radius: 2px; flex-shrink: 0;
}

/* Notification modal */
.modal-overlay {
  display: none; position: fixed; z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.35); justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; padding: 28px 32px;
  max-width: 420px; width: 90%; box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.modal-box h3 { font-size: 18px; color: #2d5a1e; margin-bottom: 16px; }
.modal-box .field { margin-bottom: 14px; }
.modal-box .field label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 4px; }
.modal-box .field input, .modal-box .field select {
  width: 100%; padding: 10px 14px; border: 2px solid #dce8d4; border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.modal-box .field input:focus, .modal-box .field select:focus { outline: none; border-color: #6aab4a; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-actions .btn { padding: 8px 24px; font-size: 14px; }
.modal-actions .btn-cancel { background: #e8e8e8; color: #666; }
.modal-actions .btn-cancel:hover { background: #ddd; }

/* Notification list */
.notif-card { margin-top: 0; }
.notif-card .notif-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid #f0f5ec; font-size: 13px;
}
.notif-card .notif-item:last-child { border-bottom: none; }
.notif-card .notif-time { color: #555; font-weight: 600; flex-shrink: 0; }
.notif-card .notif-text { flex: 1; color: #333; }
.notif-card .notif-status { font-size: 11px; color: #888; flex-shrink: 0; }
.notif-card .notif-del { cursor: pointer; color: #ccc; font-size: 16px; flex-shrink: 0; }
.notif-card .notif-del:hover { color: #e74c3c; }
.tl-time-click {
  cursor: pointer; color: #2980b9; font-weight: 700;
  border-bottom: 2px dashed #2980b9; padding-bottom: 1px;
  transition: all 0.2s;
}
.tl-time-click:hover {
  color: #1a5a8a; border-bottom-color: #1a5a8a;
  background: #e8f4ff; border-radius: 3px; padding: 0 2px;
}

.section-heading { font-size: 18px; color: #2d5a1e; margin-bottom: 16px; }
.section-heading.tight { margin-bottom: 8px; }
.warn-box {
  background: #fff3cd; border: 1px solid #ffc107; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 13px; color: #856404;
}
.meta-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 4px; font-size: 13px; color: #666; }
.muted { font-size: 12px; color: #888; font-weight: 400; }
.tips-box {
  margin-top: 16px; padding: 16px; background: #f6faf3; border-radius: 10px;
  font-size: 13px; color: #555; line-height: 1.7;
}
.tips-box strong { color: #2d5a1e; }
.harvest-row { background: #fef7e0; }
.empty-inline { color: #999; font-size: 13px; text-align: center; padding: 20px; }

.notif-banner { padding: 16px 20px; }
.notif-banner-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.notif-banner-actions { display: flex; gap: 8px; }
.btn-link {
  padding: 6px 14px; border: 1px solid #dce8d4; border-radius: 8px;
  font-size: 13px; color: #6a8a5a; text-decoration: none; font-weight: 600;
}
.btn-link.primary { background: #4d8f32; color: #fff; border-color: #4d8f32; }
.btn-link:hover { opacity: 0.9; }
.notif-pending { color: #e8a820; font-size: 13px; font-weight: 600; }
.notif-muted { color: #999; font-size: 13px; }
.notif-hint { margin-top: 10px; font-size: 12px; color: #888; line-height: 1.5; }
.notif-advance-row {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px;
}
.notif-advance-row label { color: #555; font-weight: 600; }
.notif-advance-row select {
  padding: 6px 10px; border: 2px solid #dce8d4; border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.site-nav .nav-notif { margin-left: auto; }
