:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #17211f;
  --muted: #66716d;
  --line: #d9ddd6;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn-bg: #fff7d6;
  --warn-line: #e6c95e;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  min-height: 44px;
  padding: 0 14px;
}

button:active {
  background: var(--accent-strong);
}

.google-button {
  width: 100%;
  margin: 12px 0 14px;
  background: #fff;
  color: #17211f;
  border: 1px solid var(--line);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.google-button:active {
  background: #f0f3ef;
}

.google-mark {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  flex: none;
}

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

.shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.eyebrow,
.label,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.panel,
.notice,
.metrics {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  margin: 0 0 12px;
}

.notice {
  display: grid;
  gap: 6px;
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.account-line,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metrics div {
  display: grid;
  gap: 4px;
}

.metrics strong {
  font-size: 22px;
}

.transaction-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.transaction-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.list.empty {
  color: var(--muted);
}

.row-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.row-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.row-item small {
  color: var(--muted);
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.hidden {
  display: none !important;
}

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

@media (max-width: 480px) {
  .shell {
    padding: 12px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

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