* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f7fb;
  color: #1c2430;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: #ffffff;
  border-bottom: 1px solid #dbe3ec;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.subtitle {
  margin: 6px 0 0;
  color: #607086;
}

.badge {
  background: #e8f7ec;
  color: #1f7a3e;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: bold;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card,
.panel,
.plant-item,
.detail-card {
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.card {
  padding: 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #607086;
}

.big {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
}

.danger {
  color: #c62828;
}

.panel {
  padding: 20px;
}

.panel-head h2 {
  margin: 0 0 6px;
}

.panel-head p {
  margin: 0 0 18px;
  color: #607086;
}

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

.plant-item {
  padding: 18px;
}

.selectable {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: #fff;
}

.selectable.selected {
  border: 2px solid #2b6de5;
}

.plant-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.plant-main h3 {
  margin: 0 0 6px;
}

.plant-main p {
  margin: 0;
  color: #607086;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.status-ok {
  background: #e8f7ec;
  color: #1f7a3e;
}

.status-warning {
  background: #fff4db;
  color: #9a6b00;
}

.status-error {
  background: #fdeaea;
  color: #b42318;
}

.plant-metrics,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

.plant-metrics span,
.detail-grid span,
.plant-form span {
  display: block;
  font-size: 13px;
  color: #607086;
  margin-bottom: 6px;
}

.plant-metrics strong,
.detail-grid strong {
  font-size: 18px;
}

.detail-content p {
  margin: 0;
  color: #607086;
}

.detail-card {
  padding: 18px;
}

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

.detail-top h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.detail-top p {
  margin: 0;
  color: #607086;
}

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

.plant-form label {
  display: block;
}

.plant-form input,
.plant-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}

.form-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions button {
  border: 0;
  border-radius: 10px;
  background: #2b6de5;
  color: #fff;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.form-message {
  margin: 0;
  color: #607086;
}

.success-text {
  color: #1f7a3e;
}

.error-text {
  color: #b42318;
}

@media (max-width: 900px) {
  .layout,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .container {
    padding: 16px;
  }

  .plant-main,
  .detail-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
