:root {
  --ink: #1d2945;
  --muted: #647085;
  --line: #d9dee7;
  --soft: #f4f1ea;
  --paper: #ffffff;
  --gold: #d2a33a;
  --gold-dark: #a97b19;
  --danger: #a43b3b;
  --green: #277a4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f5f0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.side {
  background: #15191e;
  color: #f7f7f2;
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 38px;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold);
  color: #101827;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  color: #b9c0ca;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  text-decoration: none;
  padding: 13px 14px;
  border-radius: 8px;
  color: #d9dde5;
  font-weight: 700;
}

.nav a.active,
.nav a:hover {
  background: #263143;
  color: #fff;
}

.main {
  padding: 34px clamp(18px, 3vw, 46px) 50px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(40px, 6vw, 74px);
  max-width: 980px;
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
}

h3 {
  font-size: 22px;
}

.sub {
  color: var(--muted);
  max-width: 760px;
  margin-top: 14px;
  font-size: 18px;
}

.button,
button {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button.gold,
button.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.button.danger,
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.grid {
  display: grid;
  gap: 18px;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(29, 41, 69, .08);
  padding: 24px;
}

.stat .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat .value {
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
}

.stat .hint {
  color: var(--muted);
  font-size: 14px;
}

.layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.amount.income {
  color: var(--green);
  font-weight: 800;
}

.amount.expense {
  color: var(--danger);
  font-weight: 800;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0eadb;
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form .wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.notice {
  border-left: 4px solid var(--gold);
  background: #fffaf0;
  padding: 16px;
  border-radius: 8px;
  color: var(--ink);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(21, 25, 30, .86), rgba(21, 25, 30, .42)),
    url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=2200&q=80");
  background-size: cover;
  background-position: center;
}

.login-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, .96);
  border-radius: 8px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.login-card h1 {
  font-size: 42px;
}

.login-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.error {
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 1020px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
    height: auto;
  }

  .stats,
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar,
  .login-actions {
    flex-direction: column;
    align-items: stretch;
  }

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