* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f4f7f4;
  color: #1f2a24;
}
a { color: #2E7D32; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 18px 0 12px; }
h2 { font-size: 16px; margin: 22px 0 10px; color: #2f4a3a; }
.muted { color: #7a8a80; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.num { font-weight: 600; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  background: #2E7D32; color: #fff; padding: 0 22px; height: 52px;
}
.topbar a { color: #fff; }
.brand a { font-weight: 700; font-size: 17px; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { opacity: .82; padding: 4px 0; }
.topbar nav a.on { opacity: 1; border-bottom: 2px solid #fff; }
.topbar .user { margin-left: auto; font-size: 13px; opacity: .9; }

main { max-width: 1240px; margin: 0 auto; padding: 0 22px 40px; }
footer { text-align: center; color: #9aa89f; font-size: 12px; padding: 24px 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 6px; }
.kpi {
  background: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 4px;
}
.kpi span { color: #7a8a80; font-size: 13px; }
.kpi b { font-size: 26px; color: #1b5e20; }
.kpi small { color: #7a8a80; margin-left: 2px; }

.cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.card {
  background: #fff; border-radius: 8px; padding: 10px 14px; min-width: 150px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 4px;
}
.card span { color: #7a8a80; font-size: 12px; }

.table {
  width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); font-size: 13px;
}
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #eef2ee; }
.table th { background: #e8f3e9; color: #2f4a3a; font-weight: 600; }
.table tr:hover td { background: #f6fbf6; }
.table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.badge.ok { background: #e3f3e4; color: #1b5e20; }
.badge.warn { background: #fff1e0; color: #8a5200; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 8px 0 14px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5c6f63; }
.filters input, .filters select {
  height: 34px; padding: 0 8px; border: 1px solid #cfdcd3; border-radius: 6px; background: #fff;
  font-size: 13px; min-width: 120px;
}
.filters button, .login-card button {
  height: 34px; padding: 0 18px; border: 0; border-radius: 6px; background: #2E7D32;
  color: #fff; font-size: 13px; cursor: pointer;
}
.filters button:hover, .login-card button:hover { background: #1b5e20; }

.pager { display: flex; gap: 12px; align-items: center; margin: 14px 0; font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip { background: #e8f3e9; color: #2f4a3a; border-radius: 12px; padding: 3px 10px; font-size: 12px; }

.chart { width: 100%; height: 320px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; background: #eef2ee; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
}

.flash { background: #fff1e0; color: #8a5200; padding: 8px 12px; border-radius: 6px; margin: 10px 0; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #eef4ee; }
.login-card {
  background: #fff; padding: 30px 34px; border-radius: 12px; width: 320px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 12px;
}
.login-card h1 { margin: 0; font-size: 20px; }
.login-card p { margin: 0 0 6px; font-size: 13px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #5c6f63; }
.login-card input {
  height: 36px; padding: 0 10px; border: 1px solid #cfdcd3; border-radius: 6px; font-size: 14px;
}
.login-card button { height: 38px; margin-top: 4px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.form-card h2 { margin-top: 0; }
.form-card label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 13px; color: #5c6f63; }
.form-card input[type=text], .form-card textarea, .form-card select {
  padding: 8px; border: 1px solid #cfdcd3; border-radius: 6px; font-size: 13px; background: #fff;
}
.form-card textarea { min-height: 110px; resize: vertical; }
.platform-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.platform-row label.inline { display: flex; flex-direction: row; gap: 6px; align-items: center; margin-bottom: 0; }
.platform-row input[type=text] { flex: 1; }
.platform-row label.top input { width: 60px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.form-actions button { height: 36px; padding: 0 20px; background: #2E7D32; color: #fff; border: 0; border-radius: 6px; cursor: pointer; }
.form-actions .link { font-size: 13px; }
.btn-link { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; background: #e8f3e9; color: #1b5e20; border-radius: 6px; font-size: 13px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
