:root {
  font-family: Tahoma, Arial, sans-serif;
  color: #192d29;
  background: #f5f6f3;
  font-size: 14px;
  --green: #153e33;
  --gold: #b98d42;
  --muted: #64716b;
  --line: #dfe5de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 92px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand strong {
  letter-spacing: 1.6px;
  font:
    600 17px Georgia,
    serif;
}
.brand small {
  display: block;
  color: var(--muted);
  margin-top: 9px;
  font-size: 11px;
}
.mark {
  background: var(--green);
  color: #ecd5a1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font:
    22px Georgia,
    serif;
}
.top {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}
.layout {
  display: flex;
  min-height: calc(100vh - 135px);
}
nav {
  width: 210px;
  padding: 28px 18px;
  background: #fff;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
}
nav button {
  display: block;
  width: 100%;
  text-align: right;
  margin-bottom: 7px;
  background: none;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  padding: 14px;
}
nav button.active {
  background: #eaf0eb;
  color: var(--green);
  font-weight: bold;
}
main {
  padding: 35px 40px;
  min-width: 0;
  width: 100%;
  max-width: 1650px;
  margin: auto;
}
h1 {
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 10px;
}
h2 {
  font-size: 17px;
  margin: 0 0 20px;
}
h3 {
  font-size: 14px;
}
.subtitle {
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 27px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 3px 12px #19372904;
}
.auth {
  max-width: 420px;
  margin: 7vh auto;
}
.auth h1 {
  margin-bottom: 24px;
}
.form-grid,
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.cards .panel {
  margin: 0;
}
.metric {
  font-size: 25px;
  direction: ltr;
  text-align: right;
  margin: 15px 0;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.badge {
  display: inline-block;
  background: #edf4ee;
  color: #216649;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 11px;
}
.warning {
  background: #fff4dd;
  color: #855f23;
  padding: 14px;
  border-radius: 8px;
  line-height: 1.9;
}
.error {
  background: #fff0ed;
  color: #9b3d2a;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  color: #4e6058;
  margin: 0 0 17px;
}
input,
select,
textarea {
  font: inherit;
  font-size: 14px;
  color: #1a332a;
  border: 1px solid #d2dcd5;
  border-radius: 6px;
  background: #fff;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}
input[readonly] {
  background: #f6f7f5;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #b7cabb;
  outline-offset: 1px;
}
input[data-numeric] {
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
button {
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  background: var(--green);
  color: white;
  border-radius: 7px;
  padding: 11px 18px;
  min-height: 42px;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.secondary {
  background: #fff;
  border-color: #ced8d0;
  color: var(--green);
}
.danger {
  background: #873f31;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.row label {
  flex: 1;
  min-width: 140px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
  background: #fbfcfa;
}
.line .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.line label {
  margin-bottom: 4px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
th {
  background: #f7f8f5;
  color: var(--muted);
  font-size: 11px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 14px;
  border-bottom: 1px solid #eef1ec;
}
td.number {
  direction: ltr;
  text-align: right;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
  font-size: 12px;
  background: #f4f6f3;
  padding: 18px;
  border-radius: 6px;
}
#notice {
  position: fixed;
  left: 24px;
  bottom: 30px;
  max-width: 500px;
  z-index: 5;
  background: #173e32;
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 30px #0002;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  max-width: 650px;
  width: 90%;
}
dialog::backdrop {
  background: #152c2566;
}
footer {
  font-size: 11px;
  color: var(--muted);
  padding: 16px 36px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.loading {
  padding: 80px;
  text-align: center;
}
.ltr {
  direction: ltr;
}
a {
  color: var(--green);
}
.spacer {
  margin-top: 20px;
}
#connection.offline {
  color: #a16719;
}
.login-submit {
  width: 100%;
}
.hidden,
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  header {
    padding: 16px;
    height: auto;
  }
  .top {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: end;
  }
  #date {
    display: none;
  }
  .layout {
    display: block;
  }
  nav {
    width: 100%;
    padding: 10px;
    display: flex;
    overflow: auto;
    border-bottom: 1px solid var(--line);
  }
  nav button {
    width: auto;
    white-space: nowrap;
    margin: 0;
  }
  main {
    padding: 22px 16px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .brand strong {
    font-size: 12px;
  }
  .panel {
    padding: 18px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    font-size: 20px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 18mm;
  }
  header,
  nav,
  footer,
  #notice,
  .no-print {
    display: none !important;
  }
  .layout,
  main {
    display: block;
    padding: 0;
    margin: 0;
    max-width: none;
  }
  body {
    background: white;
  }
  button {
    display: none;
  }
  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  dialog {
    position: static;
    display: block;
    border: 0;
    width: 100%;
    max-width: none;
  }
  dialog::backdrop {
    display: none;
  }
  body:has(dialog[open]) .layout {
    display: none;
  }
}
