:root {
  --green: #4eaa37;
  --green-dark: #357c2d;
  --ink: #28343a;
  --line: #e4e8e7;
  --soft: #f7faf7;
}
* { box-sizing: border-box; }
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  margin: 0;
  background: #fff;
  font-size: 14px;
}
.shell {
  max-width: 1060px;
  margin: auto;
  padding: 26px 20px 80px;
}
.brand {
  text-align: center;
  margin: 12px 0 22px;
}
.brand img, .brand svg {
  max-width: 290px;
  width: 65%;
  height: auto;
}
.sub {
  text-align: center;
  color: #68736f;
  margin-top: -10px;
  margin-bottom: 25px;
}
h1 {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin: 12px 0 24px;
}
h2 {
  font-size: 17px;
  margin: 27px 0 11px;
  color: #357c2d;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.muted { color: #6a7671; }
.btn, button {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
button:hover:not(:disabled), .btn:hover { background: #43972e; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn { display: inline-block; text-decoration: none; }
.btn.alt, button.alt { background: #66736d; }
.btn.alt:hover, button.alt:hover:not(:disabled) { background: #535f59; }
.btn.sm, button.sm { padding: 6px 11px; font-size: 12px; }
a { color: #337f2d; text-decoration: none; }
a:hover { text-decoration: underline; }
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 18px;
}
th {
  text-align: left;
  background: #eef5eb;
  color: #31592e;
  padding: 12px 9px;
  border-bottom: 1px solid #c9dcc6;
}
td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
}
table.num th:nth-last-child(-n+3),
table.num td:nth-last-child(-n+3) {
  text-align: right;
}
input[type=number] {
  width: 82px;
  padding: 9px;
  border: 1px solid #cdd7ce;
  border-radius: 4px;
  text-align: center;
  font: inherit;
}
input[type=text], input[type=password], input[type=email], select, textarea {
  padding: 11px;
  border: 1px solid #cdd7ce;
  border-radius: 4px;
  width: 100%;
  font: inherit;
}
textarea { min-height: 90px; }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  margin: 18px 0;
}
.login {
  max-width: 410px;
  margin: 40px auto;
}
.field { margin: 15px 0; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: bold;
}
.summary {
  background: var(--soft);
  border: 1px solid #dbe9d8;
  border-radius: 8px;
  padding: 20px;
  margin-top: 25px;
}
.summary .total {
  font-size: 25px;
  font-weight: bold;
  color: #31802a;
}
.right { text-align: right; }
.error {
  padding: 12px;
  background: #fff0ed;
  color: #9e3325;
  border: 1px solid #f4c9c1;
  border-radius: 5px;
  margin-bottom: 15px;
}
.success {
  padding: 12px;
  background: #ecf8eb;
  color: #2e762e;
  border: 1px solid #c3e4c0;
  border-radius: 5px;
  margin-bottom: 15px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}
.badge.ok { background: #ecf8eb; color: #2e762e; }
.badge.warn { background: #fff7e6; color: #9a6700; }
.badge.off { background: #f1f3f2; color: #66736d; }
.small { font-size: 12px; }
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar input { max-width: 320px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(40, 52, 58, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}
.modal {
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}
@media (max-width: 650px) {
  .shell { padding: 16px 10px 60px; }
  table { font-size: 12px; }
  td, th { padding: 8px 4px; }
  input[type=number] { width: 58px; padding: 7px 2px; }
  .hide-mobile { display: none; }
  .top { flex-wrap: wrap; }
  .brand img, .brand svg { max-width: 230px; }
}
