:root {
  --green: #137d55;
  --blue: #143e84;
  --ink: #182d43;
  --muted: #78879a;
  --border: #e5ebf0;
  --bg: #f4f7fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--ink);
}
button:hover {
  filter: brightness(0.97);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
input,
select,
textarea {
  background: white;
  border: 1px solid #d7e0e8;
  border-radius: 7px;
  padding: 11px;
  color: var(--ink);
  max-width: 100%;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #94b8f0;
  outline-offset: 2px;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  background: white;
  padding: 22px 17px;
  border-right: 1px solid var(--border);
  z-index: 4;
  overflow: auto;
}
aside img {
  width: 205px;
  height: 83px;
  object-fit: contain;
}
.workspace {
  background: #f3f7fb;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  margin: 18px 0;
  font-size: 12px;
  font-weight: 700;
}
.workspace small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.workspace select {
  width: 100%;
  padding: 7px;
  margin-top: 9px;
  font-size: 12px;
}
nav {
  display: grid;
  gap: 4px;
}
nav button {
  border: 0;
  text-align: left;
  color: #64758a;
  padding: 12px 13px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
nav button.active {
  background: #eaf5ef;
  color: var(--green);
  font-weight: 700;
}
nav i {
  font-style: normal;
  font-size: 18px;
  width: 22px;
}
.brand-note {
  font-size: 11px;
  color: var(--blue);
  margin: 28px 13px;
}
.brand-note small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
main {
  margin-left: 245px;
}
header {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  border-radius: 50%;
  padding: 11px;
  background: #edf3fa;
  color: var(--blue);
  font-size: 11px;
}
.crumb {
  color: var(--muted);
  font-size: 12px;
}
#content {
  padding: 30px 32px;
  max-width: 1600px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
}
h2 {
  font-size: 17px;
  margin: 0 0 18px;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.65;
}
.muted,
.page-head p {
  color: var(--muted);
  font-size: 12px;
}
.page-head p {
  margin: 0;
}
.primary {
  background: var(--green);
  border: 0;
  color: white;
  font-weight: 600;
}
.danger {
  color: #b24c3f;
}
.small {
  font-size: 11px;
  padding: 7px 9px;
}
.link {
  color: var(--green);
  background: none;
  border: 0;
  padding: 0;
}
.hero {
  background: #103e38;
  color: white;
  border-radius: 13px;
  padding: 28px;
  margin-bottom: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  overflow: hidden;
}
.hero h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin: 10px 0;
}
.hero p {
  color: #bdd6ce;
  font-size: 12px;
  margin: 0;
}
.hero .eyebrow {
  color: #9dceb5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
.hero button {
  background: #ffffff12;
  color: white;
  border-color: #ffffff35;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}
.card {
  padding: 22px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  margin-bottom: 21px;
}
.stats .card {
  margin: 0;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.value {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.7px;
  margin: 13px 0 9px;
}
.sub {
  font-size: 11px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 21px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.section-head h2 {
  margin: 0;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f4;
}
.row:last-child {
  border: 0;
}
.row p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.progress {
  height: 7px;
  border-radius: 10px;
  background: #eaf0f4;
  overflow: hidden;
  margin: 13px 0;
}
.progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 10px;
  width: 0;
}
.badge {
  font-size: 10px;
  border-radius: 5px;
  padding: 5px 8px;
  display: inline-block;
  background: #e9f5ef;
  color: #137b50;
  white-space: nowrap;
}
.badge.pending {
  background: #fff4df;
  color: #9b7225;
}
.badge.rejected {
  background: #fff0ee;
  color: #b35445;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  padding: 12px 10px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid #edf1f4;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.money {
  font-weight: 650;
  white-space: nowrap;
}
.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.notice {
  background: #f4f8fc;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
}
.notice p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-line;
}
.warning {
  background: #fff8e9;
  color: #8a681f;
  border: 1px solid #eddfbf;
  padding: 13px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 20px;
}
.bill {
  background: #f0f7f3;
  border-radius: 8px;
  padding: 16px;
  margin: 15px 0;
  line-height: 1.8;
}
.positive {
  color: var(--green);
}
label {
  display: block;
  font-size: 12px;
  color: #5d7085;
  margin-bottom: 15px;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
}
label.check {
  display: flex;
  gap: 8px;
  align-items: center;
}
label.check input {
  width: auto;
  margin: 0;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-art {
  background: #103e38;
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-art img {
  width: 330px;
  max-width: 100%;
  border-radius: 12px;
}
.auth-art h1 {
  font-size: 42px;
  max-width: 480px;
  line-height: 1.18;
  margin: 45px 0 20px;
}
.auth-art p {
  color: #bfd7ce;
  max-width: 400px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
}
.auth-box .primary {
  width: 100%;
}
.auth-box h1 {
  font-size: 26px;
}
.auth-links {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}
.error {
  color: #b34b3b;
  font-size: 12px;
  white-space: pre-line;
}
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tabs .active {
  background: var(--green);
  color: white;
}
.bars {
  height: 150px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  padding-top: 12px;
}
.bar-column {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}
.bar {
  background: #22865e;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.bar-label {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  padding-top: 8px;
}
.profile-score {
  text-align: center;
  padding: 20px;
}
.profile-score strong {
  font-size: 42px;
  color: var(--green);
}
.heir {
  padding: 13px;
  background: #f4f7fa;
  border-radius: 8px;
  margin: 12px 0;
}
.heir .split {
  gap: 10px;
}
.heir label {
  margin-bottom: 8px;
}
.heir h3 {
  margin: 0 0 12px;
}
dialog {
  border: 0;
  border-radius: 13px;
  box-shadow: 0 25px 100px #10243830;
  width: 600px;
  max-width: 94vw;
  max-height: 90vh;
  padding: 27px;
}
dialog::backdrop {
  background: #0e253965;
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}
.modal-head button {
  border: 0;
  padding: 0 5px;
  font-size: 24px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #103e38;
  color: white;
  padding: 15px 22px;
  border-radius: 8px;
  box-shadow: 0 5px 25px #0002;
  display: none;
  z-index: 10;
  max-width: 85vw;
}
footer {
  padding: 20px 32px;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}
.mobile-menu {
  display: none;
}
.loading {
  padding: 60px;
  font-size: 20px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
}
details {
  margin: 10px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  aside {
    width: 210px;
  }
  aside img {
    width: 174px;
  }
  main {
    margin-left: 210px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .auth-art {
    padding: 35px;
  }
  .auth-art h1 {
    font-size: 32px;
  }
}
@media (max-width: 700px) {
  aside {
    display: none;
    width: 245px;
    box-shadow: 0 0 0 100vw #10243a65;
  }
  .menu-open aside {
    display: block;
  }
  main {
    margin: 0;
  }
  .mobile-menu {
    display: block;
  }
  .crumb {
    display: none;
  }
  header {
    padding: 0 16px;
    height: 65px;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions button {
    padding: 8px;
    font-size: 11px;
  }
  #content {
    padding: 23px 16px;
  }
  .page-head {
    gap: 12px;
  }
  h1 {
    font-size: 23px;
  }
  .page-head button {
    font-size: 11px;
  }
  .hero {
    padding: 22px;
  }
  .hero h2 {
    font-size: 20px;
  }
  .stats {
    gap: 10px;
  }
  .card {
    padding: 17px;
  }
  .value {
    font-size: 20px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .auth {
    display: block;
  }
  .auth-art {
    padding: 25px;
  }
  .auth-art img {
    width: 210px;
  }
  .auth-art h1 {
    font-size: 26px;
    margin: 20px 0 5px;
  }
  .auth-art p {
    display: none;
  }
  .auth-panel {
    padding: 30px 23px;
  }
  .hero .row-actions {
    display: none;
  }
  footer {
    padding: 18px 16px;
  }
}
:root {
  color-scheme: light;
}
@media print {
  body {
    background: white;
  }
  #app,
  #toast,
  .modal-head,
  #modal-submit,
  #modal-error,
  [data-action="print"] {
    display: none !important;
  }
  dialog[open] {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 20px;
  }
  dialog::backdrop {
    background: white;
  }
  .receipt {
    display: block;
    color: black;
  }
  .receipt .row {
    page-break-inside: avoid;
  }
}

/* v1.1.0 */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.95em;
  white-space: nowrap;
}
.small {
  font-size: 0.85rem;
}
input[type="file"] {
  padding: 8px;
}
