:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #07100d;
  color: #f3f7f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 75% 15%, rgba(54, 211, 153, 0.16), transparent 28rem),
    radial-gradient(circle at 5% 90%, rgba(45, 125, 94, 0.13), transparent 25rem),
    #07100d;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.page-shell {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  flex-direction: column;
}

.site-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(100, 234, 183, 0.35);
  border-radius: 10px;
  background: rgba(57, 188, 138, 0.11);
  color: #7be6bc;
  font-family: Georgia, serif;
  font-size: 17px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #abbab3;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #b4c2bc;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.text-button:hover {
  color: #79e2ba;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59d5a5;
  box-shadow: 0 0 12px rgba(89, 213, 165, 0.8);
}

main {
  display: grid;
  flex: 1;
  align-items: center;
  padding: 72px 0;
}

.hero {
  display: grid;
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
}

.eyebrow {
  margin: 0 0 18px;
  color: #6fe0b5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-description {
  max-width: 560px;
  margin: 28px 0 0;
  color: #a9b8b1;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  margin-top: 38px;
  align-items: center;
  gap: 18px;
  color: #75847d;
  font-size: 12px;
}

.primary-button {
  padding: 13px 18px;
  border: 1px solid rgba(105, 229, 181, 0.2);
  border-radius: 10px;
  background: #58d2a3;
  color: #06120d;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  box-shadow: 0 10px 30px rgba(49, 185, 134, 0.2);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.text-button:focus-visible {
  outline: 2px solid #7be6bc;
  outline-offset: 4px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.auth-message {
  min-height: 18px;
  margin: 16px 0 0;
  color: #f0a8a8;
  font-size: 12px;
}

.preview-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(8, 21, 16, 0.88);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.preview-card::after {
  position: absolute;
  top: -130px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(72, 211, 157, 0.09);
  content: "";
  filter: blur(8px);
}

.preview-header,
.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-header p,
.activity-heading span {
  margin: 0 0 8px;
  color: #788981;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-header h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}

.preview-lock {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(108, 226, 180, 0.2);
  border-radius: 12px;
  background: rgba(54, 187, 136, 0.08);
  color: #66dcaf;
  font-size: 9px;
}

.metric-grid {
  display: grid;
  gap: 12px;
  margin: 30px 0 14px;
  grid-template-columns: repeat(2, 1fr);
}

.metric-grid article,
.activity-panel {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.12);
}

.metric-grid article {
  display: flex;
  min-height: 126px;
  padding: 18px;
  border-radius: 15px;
  flex-direction: column;
}

.metric-grid span {
  color: #84938c;
  font-size: 11px;
}

.metric-grid strong {
  margin: 18px 0 8px;
  color: #d8e5df;
  font-size: 23px;
  letter-spacing: 0.12em;
}

.metric-grid small,
.activity-row small,
.activity-heading small {
  color: #65756e;
  font-size: 10px;
}

.activity-panel {
  padding: 18px;
  border-radius: 15px;
}

.activity-heading {
  margin-bottom: 8px;
}

.activity-heading span {
  margin: 0;
}

.activity-row {
  display: grid;
  padding: 15px 0;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  grid-template-columns: auto 1fr;
}

.activity-row:last-child {
  padding-bottom: 4px;
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: rgba(83, 205, 158, 0.09);
  color: #6fd9b1;
  font-size: 11px;
  font-weight: 800;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong {
  margin-bottom: 5px;
  font-size: 12px;
}

.dashboard {
  width: 100%;
}

.dashboard-heading {
  display: grid;
  align-items: end;
  gap: 50px;
  grid-template-columns: 1fr auto;
}

.dashboard-heading h1 {
  max-width: 760px;
  font-size: clamp(46px, 6vw, 72px);
}

.identity-card {
  display: flex;
  min-width: 260px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  flex-direction: column;
}

.identity-card span,
.identity-card small {
  color: #718078;
  font-size: 10px;
}

.identity-card strong {
  margin: 10px 0 7px;
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  margin-top: 54px;
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid article {
  position: relative;
  min-height: 235px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.card-number {
  color: #5f7168;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.dashboard-grid h2 {
  margin: 50px 0 12px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
}

.dashboard-grid p {
  margin: 0;
  color: #83928a;
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-message {
  min-height: 20px;
  margin: 26px 0 0;
  color: #dcae76;
  font-size: 12px;
}

.summary-grid {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  grid-template-columns: repeat(4, 1fr);
}

.summary-grid article {
  display: flex;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  flex-direction: column;
}

.summary-grid span,
.summary-grid small {
  color: #75867d;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.summary-grid strong {
  margin: 18px 0 10px;
  color: #e9f4ef;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

.summary-grid small {
  margin-top: auto;
  letter-spacing: 0;
  text-transform: none;
}

.ledger-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(8, 21, 16, 0.86);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.ledger-heading,
.ledger-footer,
.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ledger-heading h2,
.dialog-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}

.ledger-heading .eyebrow,
.dialog-heading .eyebrow {
  margin-bottom: 8px;
}

.ledger-heading > span,
.ledger-footer {
  color: #72827a;
  font-size: 11px;
}

.filters {
  display: grid;
  gap: 10px;
  margin: 24px 0 18px;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
}

.filters label,
.edit-dialog label {
  display: flex;
  gap: 7px;
  flex-direction: column;
  color: #84948c;
  font-size: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  outline: 0;
  background: #0c1914;
  color: #dbe6e1;
  font: inherit;
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 90px;
  padding: 11px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(105, 229, 181, 0.5);
  box-shadow: 0 0 0 3px rgba(89, 213, 165, 0.08);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.025);
  color: #65776e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

tbody tr:hover,
tbody tr:focus {
  outline: 0;
  background: rgba(91, 214, 166, 0.055);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-excluded {
  opacity: 0.52;
}

td div strong,
td div small {
  display: block;
}

td div small {
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: #718079;
  font-size: 10px;
  text-overflow: ellipsis;
}

.amount-column {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tag-list {
  display: flex;
  max-width: 250px;
  gap: 5px;
  overflow: hidden;
}

.tag-list span {
  padding: 4px 7px;
  border: 1px solid rgba(89, 213, 165, 0.13);
  border-radius: 999px;
  background: rgba(89, 213, 165, 0.05);
  color: #8bcfb4;
  font-size: 9px;
}

.ledger-footer {
  padding-top: 18px;
}

.ledger-footer > div,
.dialog-actions {
  display: flex;
  gap: 8px;
}

.secondary-button {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #b5c4bd;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.secondary-button:hover {
  border-color: rgba(105, 229, 181, 0.25);
  color: #7be6bc;
}

.secondary-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.edit-dialog {
  width: min(520px, calc(100% - 30px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  background: #0a1712;
  color: #f3f7f4;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.65);
}

.edit-dialog::backdrop {
  background: rgba(1, 6, 4, 0.74);
  backdrop-filter: blur(5px);
}

.edit-dialog form {
  display: flex;
  padding: 26px;
  gap: 18px;
  flex-direction: column;
}

.dialog-close {
  border: 0;
  background: transparent;
  color: #77887f;
  cursor: pointer;
  font-size: 25px;
}

.edit-dialog label span small {
  margin-left: 5px;
  color: #5f6e67;
}

.checkbox-field {
  align-items: center;
  flex-direction: row !important;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
}

.dialog-message {
  min-height: 16px;
  margin: 0;
  color: #e7a875;
  font-size: 11px;
}

.coming-soon {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 8px;
  border: 1px solid rgba(89, 213, 165, 0.12);
  border-radius: 999px;
  color: #73cbaa;
  font-size: 9px;
  text-transform: uppercase;
}

[hidden] {
  display: none !important;
}

footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #65736d;
  font-size: 11px;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(680px, calc(100% - 36px));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .dashboard-heading,
  .dashboard-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .identity-card {
    min-width: 0;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-description {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 520px);
  }

  .site-header {
    min-height: 76px;
  }

  .status-pill {
    padding: 7px 9px;
  }

  .header-actions {
    gap: 8px;
  }

  main {
    padding: 52px 0;
  }

  h1 {
    font-size: 44px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .preview-card {
    padding: 19px;
    border-radius: 19px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-heading {
    gap: 28px;
  }

  .dashboard-grid {
    margin-top: 32px;
  }

  .summary-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .ledger-panel {
    padding: 16px;
  }

  footer {
    padding: 20px 0;
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
