:root {
  font-family: system-ui, "Noto Sans Khmer", sans-serif;
  color: #203a36;
  background: #f3f6f2;
  line-height: 1.6;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #123d36;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  gap: 16px;
}
header b {
  display: block;
  letter-spacing: 0.1em;
  font-size: 22px;
}
header span {
  font-size: 13px;
  display: block;
  opacity: 0.85;
}
header select {
  background: #fff;
  color: #163d34;
}
#layout {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 75vh;
}
nav {
  padding: 28px 16px;
  border-right: 1px solid #d7e0d7;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  background: transparent;
  color: #234d40;
  border-color: transparent;
}
nav button.active {
  background: #dceade;
  border-color: #8cab96;
}
main {
  padding: 30px 4%;
  min-width: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  margin-top: 0;
}
h2 {
  font-size: 21px;
}
h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
button,
.button {
  display: inline-block;
  border: 1px solid #245c4d;
  border-radius: 9px;
  background: #245c4d;
  color: white;
  padding: 11px 16px;
  min-height: 46px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: #fff;
  color: #245c4d;
}
a {
  color: #245c4d;
}
input,
select,
textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #9bae9e;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #203a36;
  min-height: 46px;
}
input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  vertical-align: middle;
  margin-right: 9px;
}
textarea {
  min-height: 90px;
}
label {
  display: block;
  margin-bottom: 14px;
}
small,
.muted {
  color: #51655b;
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid #d4dfd5;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.card .icon {
  font-size: 30px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 120px;
}
.pill {
  display: inline-block;
  border-radius: 30px;
  background: #e9efda;
  padding: 3px 11px;
  font-size: 13px;
}
.notice {
  background: #fff8df;
  border-left: 4px solid #b08920;
  padding: 14px;
  margin: 16px 0;
}
.error {
  background: #fde8e5;
  color: #8c271c;
}
.success {
  background: #dcf2e2;
  color: #165d36;
}
#status:not(:empty) {
  padding: 14px 5%;
  border-bottom: 1px solid #ccc;
}
code {
  font-size: 12px;
  word-break: break-all;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  min-height: 44px;
}
footer {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #526b5b;
}
progress {
  width: 100%;
  height: 20px;
}
fieldset {
  border: 1px solid #d4dfd5;
  border-radius: 8px;
  margin-bottom: 12px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b18c27;
  outline-offset: 3px;
}
@media (max-width: 720px) {
  #layout {
    display: block;
  }
  nav {
    display: flex;
    overflow: auto;
    padding: 12px;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid #ccc;
  }
  nav button {
    width: auto;
    white-space: nowrap;
    margin: 0;
  }
  main {
    padding: 24px 16px;
  }
  header {
    padding: 16px;
  }
  header b {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 25px;
  }
}
