:root {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #213342;
  background: #f4f7f9;
  font-size: 14px;
  font-synthesis: none;
  --teal: #087f79;
  --line: #e3e9ed;
  --muted: #73828f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid #dce4e7;
  border-radius: 6px;
  padding: 9px 14px;
  background: #fff;
  color: #344d5d;
  transition: background 0.15s;
}
button:hover {
  background: #eef6f5;
  border-color: #92c5bf;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
button.primary:hover {
  background: #066963;
}
button.danger {
  color: #b54444;
}
button.small {
  padding: 5px 9px;
  font-size: 12px;
}
input,
select,
textarea {
  border: 1px solid #dce4e7;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: #243c4b;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  outline: 2px solid #d3eeea;
}
input[type="checkbox"] {
  accent-color: var(--teal);
}
input[type="number"] {
  width: 110px;
}
textarea {
  resize: vertical;
}
a {
  color: var(--teal);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 25px;
  letter-spacing: 0.3px;
  margin-bottom: 7px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 212px;
  background: #122b37;
  color: #adc0c9;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  height: 91px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 25px;
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 2px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: #0a9c91;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  font-size: 22px;
  letter-spacing: 0;
}
.nav-label {
  padding: 18px 26px 9px;
  color: #748f9d;
  font-size: 11px;
  letter-spacing: 2px;
}
.nav {
  padding: 0 12px;
}
.nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b8c9d0;
  padding: 12px 14px;
  margin-bottom: 4px;
}
.nav button.active {
  color: #fff;
  background: #1c4854;
}
.nav button:hover {
  background: #1b3c49;
}
.nav-icon {
  font-size: 17px;
  width: 20px;
  text-align: center;
}
.sidebar-foot {
  margin-top: auto;
  padding: 23px 25px;
  border-top: 1px solid #29414c;
  font-size: 12px;
  line-height: 1.8;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #49c4ad;
  border-radius: 50%;
  margin-right: 7px;
}
.main {
  margin-left: 212px;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
  gap: 16px;
}
.topbar .context {
  display: flex;
  gap: 13px;
  align-items: center;
}
.topbar select {
  max-width: 290px;
  background: #f7f9fa;
}
.user {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 31px;
  height: 31px;
  background: #e5f2ee;
  color: #207e66;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.content {
  padding: 30px 32px;
  max-width: 1680px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
}
.page-head p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.stat-value {
  font-size: 30px;
  font-weight: 650;
  margin: 13px 0 8px;
  font-variant-numeric: tabular-nums;
}
.stat-foot {
  font-size: 12px;
  color: #80919b;
}
.stat-icon {
  color: #2a978c;
  background: #e7f6f0;
  border-radius: 6px;
  padding: 5px 8px;
  margin-top: -5px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panel-head h3 {
  margin: 0;
}
.panel-body {
  padding: 22px;
}
.toolbar {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar .search {
  min-width: 220px;
  flex: 1;
  max-width: 360px;
}
.voucher-query {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}
.query-title {
  color: #365563;
  font-weight: 600;
  margin-right: 4px;
}
.range-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.range-filter input[type="number"] {
  width: 104px;
}
.range-filter input[type="date"] {
  width: 145px;
}
.voucher-actions {
  justify-content: flex-end;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 12px;
  font-weight: 500;
  background: #f7f9fa;
  color: #728391;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 18px;
  border-bottom: 1px solid #edf1f3;
  font-size: 13px;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfdfd;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.company {
  font-weight: 600;
  color: #263c49;
}
.subline {
  font-size: 11px;
  color: #8c9aa3;
  margin-top: 5px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 11px;
  background: #eef2f4;
  color: #647d8c;
}
.badge.green {
  color: #22856e;
  background: #e7f5ef;
}
.badge.amber {
  color: #a47a29;
  background: #fff3dd;
}
.badge.red {
  color: #aa4c4c;
  background: #fceceb;
}
.badge.blue {
  color: #4b79a2;
  background: #ebf2fa;
}
.empty {
  padding: 62px 25px;
  text-align: center;
  color: #80929d;
}
.empty h3 {
  color: #405967;
  font-size: 18px;
  margin-bottom: 9px;
}
.empty-icon {
  font-size: 34px;
  color: #79b7ae;
  margin-bottom: 14px;
}
.table-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #80909a;
  font-size: 12px;
}
.note {
  padding: 12px 16px;
  border: 1px solid #dceee8;
  background: #f1f9f6;
  color: #47816d;
  border-radius: 6px;
  line-height: 1.8;
  font-size: 12px;
  margin-bottom: 18px;
}
.warning {
  background: #fff9ed;
  border-color: #f1e6ce;
  color: #9b793c;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  font-size: 12px;
  color: #657985;
}
.field input,
.field select {
  width: 100%;
}
.span2 {
  grid-column: span 2;
}
.form-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.editor {
  border: 1px solid #bdcece;
}
.editor-title {
  text-align: center;
  padding: 26px 20px 10px;
  font-size: 23px;
  letter-spacing: 6px;
  color: #274a4c;
}
.voucher-meta {
  padding: 12px 22px 22px;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.voucher-meta label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #71848b;
}
.entry-table th {
  background: #eaf3f2;
  color: #4e7874;
  border-right: 1px solid #dce8e6;
  text-align: center;
}
.entry-table td {
  padding: 0;
  border: 1px solid #e1e9e8;
  height: 58px;
}
.entry-table input {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.entry-table td:first-child {
  width: 42px;
  text-align: center;
  color: #a1b1b7;
}
.entry-table td:last-child {
  width: 42px;
  text-align: center;
}
.entry-table .amount {
  width: 160px;
  text-align: right;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px #c2ddd8;
}
.entry-table td.amount-cell {
  border-left: 2px solid #b7d9d3;
  border-right: 2px solid #b7d9d3;
  background: #fbfefd;
}
.entry-table .summary {
  min-width: 240px;
}
.entry-table .account {
  min-width: 220px;
}
.entry-table tfoot td {
  padding: 18px;
  background: #f1f8f5;
  height: auto;
  font-weight: 600;
}
.editor-bottom {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.editor-preferences {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: #66818a;
}
.editor-preferences label {
  display: flex;
  gap: 6px;
  align-items: center;
}
.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
}
.auth-intro {
  background: #142f3b;
  color: #fff;
  padding: 13vh 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-intro h1 {
  font-size: 40px;
  line-height: 1.45;
  margin: 40px 0 20px;
}
.auth-intro p {
  color: #a6c2cd;
  line-height: 2;
}
.auth-form {
  max-width: 390px;
  width: 85%;
  margin: auto;
}
.auth-form h2 {
  font-size: 26px;
  margin-bottom: 10px;
}
.auth-form form {
  display: grid;
  gap: 17px;
  margin-top: 30px;
}
.auth-foot {
  font-size: 11px;
  color: #8da0aa;
  margin-top: 28px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: #527a78;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #183a43;
  color: white;
  box-shadow: 0 6px 28px #1235;
  border-radius: 7px;
  padding: 14px 24px;
  z-index: 20;
  display: none;
  max-width: 80%;
}
#toast.visible {
  display: block;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  width: 540px;
  max-width: 92vw;
  box-shadow: 0 20px 80px #1233;
}
dialog::backdrop {
  background: #112b3966;
}
dialog h2 {
  margin-bottom: 22px;
}
details summary {
  cursor: pointer;
  color: #476575;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.summary-line strong {
  font-size: 18px;
}
#print-area {
  display: none;
}
.eye .editor {
  background: #f2f8ed;
}
.eye .entry-table input {
  background: #f2f8ed;
}
.wide .sidebar {
  display: none;
}
.wide .main {
  margin-left: 0;
}
.filebox {
  border: 2px dashed #cfe2dd;
  background: #f8fcfa;
  padding: 30px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 22px;
}
.filebox input {
  max-width: 100%;
}
.month-input {
  max-width: 157px;
}
.risk {
  color: #b95645;
}
.nowrap {
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 180px;
  }
  .main {
    margin-left: 180px;
  }
  .content {
    padding: 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .cards {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .topbar .context select {
    max-width: 210px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    width: 65px;
  }
  .brand {
    padding: 0 15px;
  }
  .brand-name,
  .nav-text,
  .nav-label,
  .sidebar-foot {
    display: none;
  }
  .nav {
    padding: 4px;
  }
  .nav button {
    padding: 13px;
  }
  .main {
    margin-left: 65px;
  }
  .content {
    padding: 17px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 21px;
  }
  .topbar {
    padding: 10px;
    height: auto;
    flex-wrap: wrap;
  }
  .topbar .context {
    gap: 5px;
  }
  .topbar .context select {
    max-width: 150px;
  }
  .user .username {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .auth-wrap {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    display: none;
  }
  .auth-form {
    margin: 14vh auto;
  }
  .editor-bottom {
    flex-wrap: wrap;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
  }
  #app,
  #toast,
  dialog {
    display: none !important;
  }
  #print-area {
    display: block;
  }
  .print-voucher {
    page-break-after: always;
    padding: 10mm 5mm;
    font-size: 12px;
  }
  .print-voucher h2 {
    text-align: center;
    letter-spacing: 5px;
    font-size: 24px;
  }
  .print-voucher table {
    white-space: normal;
    border: 1px solid #000;
    margin: 20px 0;
  }
  .print-voucher th,
  .print-voucher td {
    border: 1px solid #777;
    padding: 10px;
    color: #000;
    background: #fff;
  }
  .print-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }
  .print-voucher:last-child {
    page-break-after: auto;
  }
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
}
.opening-dialog {
  width: 1000px;
}
.opening-dialog input {
  width: 160px;
}
