:root {
  color-scheme: dark;
  --bg: #0b1518;
  --panel: #111e22;
  --panel2: #17262b;
  --line: #24363b;
  --text: #e5efeb;
  --muted: #8da5a7;
  --green: #a4e8b7;
  --teal: #52c9b6;
  --red: #f28c88;
  --purple: #a4a1eb;
  --radius: 20px;
  font-family: Tahoma, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 72% 0, #15302c66, transparent 40%), var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  padding: 10px 17px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  filter: brightness(1.12);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: #0d191d;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 0;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
}
input[type="date"] {
  direction: ltr;
}
input[type="color"] {
  padding: 3px;
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}
a {
  color: var(--green);
  text-decoration: none;
}
.primary {
  color: #10251b;
  background: var(--green);
  font-weight: bold;
}
.quiet,
.icon-button {
  background: #203237;
  color: var(--text);
}
.danger {
  background: #482d2f;
  color: #ffc5c2;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 2.4px;
  color: var(--muted);
  margin: 0 0 10px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.6;
  margin-bottom: 0;
  font-weight: 600;
}
h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
h3 {
  font-size: 15px;
}
.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: 240px;
  border-left: 1px solid var(--line);
  padding: 30px 22px;
  background: #0d191de8;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: bold;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
}
.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: #173d29;
  font: 35px Georgia;
}
.workspace {
  margin: 32px 0 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.workspace small {
  margin-right: auto;
  color: var(--muted);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px #52c9b677;
}
.nav-caption {
  color: #6f898e;
  font-size: 10px;
  margin: 0 10px 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
nav button {
  text-align: right;
  background: none;
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}
nav button.active {
  background: #a4e8b715;
  color: var(--green);
  border-right: 2px solid var(--green);
}
nav .nav-icon {
  display: inline-block;
  width: 27px;
  font: 18px Arial;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.sidebar-bottom small {
  display: block;
  font-size: 9px;
  color: #607b81;
}
.shield {
  font-size: 28px;
  color: var(--green);
}
main {
  margin-right: 240px;
  padding: 34px 38px;
  max-width: 1700px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.icon-button {
  padding: 6px 12px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.date-range,
.toolbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-range label {
  flex-direction: row;
  align-items: center;
  font-size: 11px;
}
.date-range input {
  font-size: 11px;
  width: 135px;
  padding: 8px;
}
.transaction-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.transaction-filters label {
  min-width: 0;
  font-size: 12px;
}
.transaction-filters input,
.transaction-filters select {
  width: 100%;
}
.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}
.toolbar select {
  font-size: 12px;
}
#notice {
  padding: 14px 20px;
  border: 1px solid #4e7667;
  background: #203b32;
  border-radius: 12px;
  margin-bottom: 20px;
}
#notice.error {
  border-color: #80524f;
  background: #362428;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1c2e30b0, #112024d9);
  padding: 22px;
  border-radius: var(--radius);
  position: relative;
}
.stat.hero {
  background: linear-gradient(135deg, #b5ebc2, #8dd5aa);
  color: #173d2c;
  border: 0;
}
.stat .label {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 12px;
}
.stat .value {
  font:
    27px Tahoma,
    sans-serif;
  white-space: nowrap;
  letter-spacing: -1px;
}
.stat .unit {
  font-size: 10px;
  opacity: 0.7;
  margin-right: 4px;
  letter-spacing: 0;
}
.stat .hint {
  font-size: 10px;
  opacity: 0.65;
  margin-top: 12px;
}
.stat-icon {
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 19px;
  opacity: 0.7;
}
.grid-two {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #152428cc, #101d21ee);
  padding: 24px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-head h2 {
  margin: 0;
}
.panel-head small {
  color: var(--muted);
  font-size: 10px;
}
.chart-wrap {
  height: 215px;
  margin-top: 20px;
  position: relative;
}
canvas {
  width: 100%;
  height: 100%;
}
.legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
}
.legend span:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-left: 6px;
}
.legend span:nth-child(2):before {
  background: var(--purple);
}
.category-line,
.account-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.category-line:last-child,
.account-line:last-child {
  border: 0;
}
.category-line strong,
.account-line strong {
  margin-right: auto;
  font-weight: normal;
  font-size: 12px;
}
.category-line .dot {
  height: 9px;
  width: 9px;
  border-radius: 50%;
  background: var(--green);
}
.category-label {
  font-size: 12px;
}
.account-icon {
  width: 38px;
  height: 38px;
  background: #253e39;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--green);
}
.account-line small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 38px 15px;
  color: var(--muted);
  font-size: 12px;
}
.empty .empty-icon {
  font-size: 34px;
  color: #4e6c69;
  display: block;
  margin-bottom: 12px;
}
.empty h3 {
  color: var(--text);
  margin-bottom: 6px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: right;
  color: var(--muted);
  font-size: 10px;
  font-weight: normal;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid #24363b88;
}
tbody tr:last-child td {
  border: 0;
}
td.note {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amount-income {
  color: var(--green);
}
.amount-expense {
  color: var(--red);
}
.amount-transfer {
  color: var(--purple);
}
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 10px;
  background: #223a35;
  color: var(--green);
}
.badge.voided {
  color: #9ba6a7;
  background: #283337;
}
.tiny {
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 6px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.resource-card {
  padding: 22px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.resource-card h3 {
  margin-bottom: 8px;
}
.resource-card p {
  font-size: 12px;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 8px;
  border: 0;
  accent-color: var(--green);
  border-radius: 9px;
  margin-bottom: 12px;
}
progress::-webkit-progress-bar {
  background: #24353a;
  border-radius: 9px;
}
progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 9px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.resource-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.backup-note {
  color: var(--muted);
  font-size: 12px;
  max-width: 720px;
  line-height: 2;
}
.backup-list {
  display: grid;
  gap: 12px;
}
.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 10px;
  gap: 10px;
}
.backup-item code {
  font-size: 11px;
  direction: ltr;
  overflow-wrap: anywhere;
}
dialog {
  width: 520px;
  max-width: calc(100vw - 28px);
  border: 1px solid #3e5959;
  border-radius: 22px;
  background: #142428;
  color: var(--text);
  padding: 26px;
  max-height: 90vh;
  box-shadow: 0 30px 100px #0008;
}
dialog::backdrop {
  background: #020b10ba;
  backdrop-filter: blur(7px);
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-heading h2 {
  margin: 0;
}
#fields {
  display: grid;
  gap: 15px;
}
#fields input,
#fields textarea,
#fields select {
  width: 100%;
}
.field-hint {
  font-size: 10px;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
#form-error,
#login-error {
  color: var(--red);
  font-size: 12px;
  margin: 15px 0 0;
}
footer {
  display: flex;
  gap: 15px;
  align-items: center;
  color: #537177;
  font-size: 9px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid #24363b77;
}
footer span:first-child {
  letter-spacing: 1.5px;
  font: 9px Arial;
}
footer span:last-child {
  margin-right: auto;
}
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  gap: 100px;
}
.login-card {
  max-width: 400px;
  width: 100%;
}
.login-card .brand-icon {
  margin-bottom: 22px;
}
.login-card h1 {
  font-size: 33px;
  margin-bottom: 20px;
  line-height: 1.8;
}
.login-card form {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}
.login-card .eyebrow {
  margin-bottom: 12px;
}
.login-foot {
  font-size: 10px;
  color: #688a89;
  margin-top: 28px;
}
.login-art {
  width: 420px;
  height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.login-art > span {
  font-size: 160px;
  color: var(--green);
  text-shadow: 0 0 80px #4fb88a55;
  z-index: 1;
}
.login-art > p {
  font-size: 24px;
  color: #9ab8af;
  z-index: 1;
  text-align: center;
  line-height: 2;
}
.orbit {
  position: absolute;
  border: 1px solid #4b8f6f44;
  border-radius: 50%;
  width: 430px;
  height: 430px;
  transform: rotate(-25deg) scaleY(0.5);
}
.orbit.two {
  transform: rotate(45deg) scaleY(0.6);
  width: 380px;
  height: 380px;
}
.upload-label {
  margin-top: 20px;
  max-width: 400px;
}
.nav-mobile {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  main {
    padding: 45px 55px;
  }
  .stat .value {
    font-size: 32px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 200px;
    padding: 25px 15px;
  }
  main {
    margin-right: 200px;
    padding: 28px 24px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat .value {
    font-size: 22px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .grid-two {
    grid-template-columns: 1.2fr 1fr;
  }
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-art {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: auto;
    padding: 12px 16px;
    inset: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 14px;
  }
  .brand .brand-icon {
    width: 30px;
    height: 30px;
    font-size: 25px;
  }
  .brand small,
  .workspace,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    margin-top: 10px;
    gap: 3px;
    scrollbar-width: none;
  }
  nav button {
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 11px;
  }
  nav button.active {
    border-right: 0;
    border-bottom: 2px solid var(--green);
  }
  nav .nav-icon {
    width: 20px;
    font-size: 15px;
  }
  main {
    margin-right: 0;
    padding: 22px 16px;
  }
  header {
    margin-bottom: 22px;
  }
  h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions #today {
    display: none;
  }
  .toolbar {
    gap: 14px;
  }
  .toolbar-end {
    width: 100%;
    justify-content: space-between;
  }
  .date-range {
    width: 100%;
    gap: 6px;
  }
  .date-range label {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .date-range input {
    width: 100%;
    padding: 7px 5px;
    font-size: 10px;
  }
  .date-range button {
    align-self: flex-end;
    padding: 6px 10px;
  }
  .transaction-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-actions {
    grid-column: 1 / -1;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat .value {
    font-size: 23px;
  }
  .stat .label {
    font-size: 10px;
  }
  .stat .hint {
    font-size: 9px;
  }
  .stat-icon {
    font-size: 15px;
    left: 13px;
    top: 12px;
  }
  .grid-two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .panel {
    padding: 18px;
  }
  .panel h2 {
    font-size: 16px;
  }
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .chart-wrap {
    height: 195px;
  }
  .page-heading {
    gap: 10px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading button {
    white-space: nowrap;
    font-size: 11px;
  }
  .backup-item {
    flex-wrap: wrap;
  }
  .login-view {
    padding: 28px;
  }
  .login-card h1 {
    font-size: 30px;
  }
  footer {
    font-size: 8px;
  }
  .table-wrap {
    margin: 0 -7px;
  }
  .login-card .primary {
    margin-top: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media (max-width: 760px) {
  table th:nth-child(2),
  table td:nth-child(2),
  table th:nth-child(4),
  table td:nth-child(4) {
    display: none;
  }
  td.note {
    max-width: 150px;
  }
  table td {
    padding: 12px 8px;
  }
  table .tiny {
    display: block;
    margin: 3px 0;
  }
  .stat .value {
    font-size: 22px;
  }
}
