/* Keep a restrained palette and readable contrast for administrative actions. */
:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #173039;
  background: #f3f6f4;
  --line: #cbd8d5;
  --primary: #174d43;
}
body { margin: 0; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 68rem) / 2));
  color: #fff;
  background: #133c35;
}
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; }
.badge { border: 1px solid #8ebbb2; padding: .3rem .45rem; border-radius: .35rem; }
.environment { font-size: .85rem; color: #d3eee8; }

/* Let the forms stack on narrow screens without compressing fields. */
main { max-width: 68rem; margin: auto; padding: 2rem 1.25rem; }
h1, h2 { line-height: 1.2; margin: 0 0 .65rem; }
.intro { margin: 0; }
.grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; margin-top: 1rem; align-items: start; }
form { padding: 1.2rem; border: 1px solid var(--line); border-radius: .65rem; background: white; }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
label { display: block; margin: .7rem 0; font-weight: 600; }
input:not([type="checkbox"]), textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: .5rem;
  border: 1px solid #839e97;
  border-radius: .3rem;
  font: inherit;
}
fieldset { border: 1px solid var(--line); margin: 0 0 1rem; }
fieldset label { font-weight: 400; }
.hint { font-size: .9rem; margin-top: 0; }

/* Use native buttons and a visible keyboard focus ring. */
button { padding: .55rem .9rem; border: 1px solid transparent; border-radius: .35rem; color: white; background: var(--primary); font: inherit; cursor: pointer; }
button.secondary { color: var(--primary); background: white; border-color: var(--primary); }
button.danger { background: #8a2828; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #337cbd; outline-offset: 2px; }
#issued { padding-top: .75rem; }
#reports { margin-top: 1rem; }
#report-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1rem; }
#report-summary dt { font-weight: 600; }
#report-summary dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }
[hidden] { display: none !important; }
@media (max-width: 42rem) { .grid { grid-template-columns: 1fr; } }
