:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f3;
  color: #18201d;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 17px; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #d9ded6;
  padding-bottom: 20px;
}

.topbar p { color: #657067; margin-top: 4px; }
.actions { display: flex; gap: 8px; }

.iconButton {
  width: 40px;
  height: 40px;
  border: 1px solid #cfd6cc;
  background: #ffffff;
  color: #233029;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.metric {
  min-height: 92px;
  background: #ffffff;
  border: 1px solid #dce2d8;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric span { color: #68746b; font-size: 13px; }
.metric strong { font-size: 22px; }

.workspace, .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.entry, .panel {
  background: #ffffff;
  border: 1px solid #dce2d8;
  border-radius: 8px;
  padding: 16px;
}

.panel { margin-bottom: 14px; }
.panel h2 { margin-bottom: 14px; }

.panelTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.formGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wide { grid-column: span 3; }

input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #ccd5c8;
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcfa;
  color: #18201d;
}

.primary {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #25634f;
  color: white;
  cursor: pointer;
  margin-top: 12px;
}

.tableWrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left;
  border-bottom: 1px solid #edf0eb;
  padding: 10px 8px;
  white-space: nowrap;
}
th {
  color: #5f6d64;
  font-size: 12px;
  text-transform: uppercase;
}

.empty { color: #677269; padding: 10px 0; }

.notice, .formError {
  color: #8c2f23;
  background: #fff0ec;
  border: 1px solid #f0c7bd;
  border-radius: 8px;
  padding: 10px 12px;
}

.notice { margin-top: 18px; }
.formError { margin-top: 10px; }

.loginShell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.loginBox {
  width: min(380px, 100%);
  background: #ffffff;
  border: 1px solid #dce2d8;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.loginBox label {
  display: grid;
  gap: 6px;
  color: #4c5a51;
  font-size: 14px;
}

.bigSpin {
  width: 34px;
  height: 34px;
  border: 3px solid #ccd5c8;
  border-top-color: #25634f;
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 850px) {
  .metrics, .workspace, .grid { grid-template-columns: 1fr; }
  .formGrid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .topbar { align-items: flex-start; }
}
