:root {
  --navy: #12253d;
  --ink: #14243a;
  --green: #215e43;
  --paper: #f4f5f2;
  --line: #dde3de;
  --muted: #627169;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.45 Arial,
    Helvetica,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
button:hover {
  background: #eef4ef;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.primary:hover {
  background: #174c34;
}
.danger {
  color: #a53b3b;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #bdc9c0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  margin-top: 5px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #669780;
  outline-offset: 1px;
}
input[type="checkbox"] {
  width: auto;
  display: inline;
}
label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
h1 {
  font-size: 29px;
  margin: 0 0 8px;
}
h2 {
  font-size: 20px;
  margin: 0 0 14px;
}
h3 {
  font-size: 16px;
  margin: 10px 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.layout {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: white;
  padding: 28px 16px;
}
.brand {
  font-size: 23px;
  letter-spacing: 2px;
  padding: 0 12px 25px;
}
.brand small {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  color: #b3c5ce;
  margin-top: 4px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav button {
  background: transparent;
  border: 0;
  color: #cbd6dc;
  text-align: left;
  padding: 12px;
}
.sidebar nav button.selected {
  background: #ffffff17;
  color: #fff;
  box-shadow: inset 3px 0 0 #84bea1;
}
.workspace {
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 18px 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
main {
  padding: 30px 32px;
  max-width: 1450px;
  margin: auto;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin: 18px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 140px;
}
.row button {
  flex: 0 0 auto;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 15px 0;
}
.actions label {
  min-width: 180px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: middle;
}
th {
  background: #edf3ee;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
td input {
  min-width: 85px;
  max-width: 125px;
}
td button {
  padding: 7px 10px;
  white-space: nowrap;
  font-size: 13px;
}
.tag {
  display: inline-block;
  padding: 4px 9px;
  background: #e8f3ed;
  border-radius: 20px;
  color: var(--green);
  font-size: 12px;
}
.login {
  max-width: 450px;
  margin: 12vh auto;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.login label {
  margin: 16px 0;
}
.login button {
  width: 100%;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat strong {
  display: block;
  font-size: 27px;
}
.stat small {
  color: var(--muted);
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  font-weight: bold;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 24px;
  max-width: 90%;
  background: var(--navy);
  color: white;
  border-radius: 9px;
  box-shadow: 0 8px 24px #0002;
  z-index: 5;
}
#notice.error {
  background: #9a3030;
}
.activity {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  margin: 12px 0;
}
.right {
  text-align: right;
}
.wide {
  grid-column: 1/-1;
}
.empty {
  padding: 25px;
  text-align: center;
  color: var(--muted);
}
a {
  color: var(--green);
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 14px;
  }
  .brand {
    padding: 0 8px 10px;
    font-size: 19px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .sidebar nav button {
    white-space: nowrap;
  }
  .brand small {
    display: none;
  }
  main {
    padding: 20px 14px;
  }
  .topbar {
    padding: 14px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .grid,
  .stats {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 15px;
  }
  .topbar {
    flex-wrap: wrap;
  }
  .login {
    margin: 40px 16px;
  }
  .row > * {
    min-width: 100%;
  }
  h1 {
    font-size: 24px;
  }
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 28px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 70px #172b4560;
}
dialog::backdrop {
  background: #172b4580;
}
