:root {
  --canvas: #f5f1e8;
  --surface: #fffdf8;
  --soft: #f0ebdf;
  --ink: #2c2d24;
  --muted: #827f74;
  --line: rgba(143, 101, 56, 0.18);
  --gold: #9f7f44;
  --green: #5c8f52;
  --red: #b04747;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse at 2% 0%,
      rgba(195, 194, 110, 0.18),
      transparent 38%
    ),
    var(--canvas);
  font:
    15px "DM Sans",
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  max-width: 100%;
}
button:hover,
a.primary:hover {
  filter: brightness(0.96);
}
:focus-visible {
  outline: 3px solid #b4a15c;
  outline-offset: 3px;
}
.navigation {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 34px;
  position: sticky;
  top: 0;
  background: rgba(236, 229, 214, 0.96);
  z-index: 10;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #9f7f44, #c3c26e);
  box-shadow: 0 8px 22px #8f653820;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #8f6538;
  margin-top: 6px;
}
.navigation nav {
  display: flex;
  gap: 8px;
}
.navigation nav a {
  padding: 12px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
}
.navigation nav a:hover,
.navigation nav a.active {
  background: #9f7f4417;
}
.live {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 13px;
  font-size: 12px;
  white-space: nowrap;
}
.live:before,
.dot {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #90c976;
  margin-right: 8px;
}
.logout {
  color: var(--muted);
  font-size: 12px;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 32px 42px 48px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.eyebrow {
  color: #8f6538;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.eyebrow:before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #b9b772;
  vertical-align: middle;
  margin-right: 12px;
}
h1 {
  font-size: 34px;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 8px 0 0;
}
h1 span {
  color: var(--gold);
}
h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.month-control {
  display: flex;
  align-items: center;
  background: var(--surface);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.month-control input,
.month-control button {
  border: 0;
  background: transparent;
}
.month-control input {
  font-weight: 600;
}
.month-control button {
  font-size: 22px;
}
.command-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 12px 0;
  margin-bottom: 20px;
}
.command-strip > div {
  padding: 7px 20px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.command-strip > div:last-child {
  border: 0;
}
.command-strip small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.command-strip strong {
  display: block;
  color: var(--ink);
  margin-top: 6px;
  font-size: 12px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 26px;
  margin-bottom: 22px;
  min-width: 0;
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
}
.filters label {
  flex: 1;
  min-width: 130px;
}
.filters .search {
  flex: 2;
  min-width: 220px;
}
label {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.primary {
  background: linear-gradient(135deg, #9f7f44, #b8ac65);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 20px;
}
.metric > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
}
.metric > div span {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.metric > strong {
  display: block;
  font-size: 27px;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.metric > small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel-head {
  margin-bottom: 22px;
}
.panel-head p,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bars {
  display: grid;
  gap: 16px;
  max-height: 350px;
  overflow: auto;
  padding-right: 6px;
}
.bar {
  display: block;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 0;
  min-height: 38px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 7px;
}
.track {
  height: 9px;
  border-radius: 99px;
  background: var(--soft);
  overflow: hidden;
}
.fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #9f7f44, #c3c26e);
}
.chart {
  overflow-x: auto;
  padding-bottom: 6px;
}
.chart svg {
  display: block;
  width: 100%;
  height: 210px;
}
.chart text {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  fill: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  padding: 13px 15px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 15px;
  vertical-align: top;
}
td:first-child {
  white-space: nowrap;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.number {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}
details {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
details p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 650px;
}
summary {
  cursor: pointer;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  font-size: 13px;
}
.calendar {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 12px;
}
.calendar article {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 15px;
  min-width: 155px;
}
.calendar small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 99px;
  background: #5c8f5212;
  color: var(--green);
  font-size: 11px;
}
.empty {
  color: var(--muted);
  padding: 22px;
  text-align: center;
}
.error,
.warning {
  border: 1px solid #d7a5a5;
  background: #fff0eb;
  color: var(--red);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 20px;
}
.error a {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 35px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login main {
  max-width: 620px;
  padding: 40px;
  margin: 25px;
}
.login p {
  line-height: 1.6;
}
.login .primary {
  margin-top: 15px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1200px) {
  .navigation {
    gap: 12px;
    padding: 16px 24px;
  }
  .live {
    display: none;
  }
  .logout {
    margin-left: auto;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 800px) {
  main {
    padding: 24px 18px;
  }
  .navigation {
    flex-wrap: wrap;
    padding: 14px 18px;
    position: relative;
  }
  .navigation nav {
    order: 3;
    width: 100%;
  }
  .navigation nav a {
    flex: 1;
    text-align: center;
    padding: 9px 5px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  h1 {
    font-size: 29px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .command-strip {
    grid-template-columns: 1fr 1fr;
  }
  .command-strip > div {
    padding: 12px;
  }
  .command-strip > div:nth-child(2) {
    border: 0;
  }
  .panel {
    padding: 20px;
  }
  .split {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .metric {
    padding: 17px;
  }
  .metric > strong {
    font-size: 22px;
  }
  .filters {
    gap: 10px;
  }
  .filters label,
  .filters .search {
    min-width: calc(50% - 10px);
  }
  td,
  th {
    padding: 12px 9px;
  }
  table {
    min-width: 560px;
  }
  .login main {
    padding: 25px;
  }
}
@media (max-width: 400px) {
  .metrics {
    grid-template-columns: 1fr;
  }
  .filters label,
  .filters .search {
    min-width: 100%;
  }
  .command-strip {
    grid-template-columns: 1fr;
  }
  .command-strip > div {
    border-right: 0;
  }
  .month-control {
    width: 100%;
    justify-content: space-between;
  }
}
