.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card + .card {
  margin-top: 1rem;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.field input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-strong);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

.error-box {
  display: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.error-box.visible {
  display: block;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-logo {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-title {
  text-align: center;
  margin-bottom: 1.25rem;
}

.totals {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.total span {
  display: block;
  font-size: 0.85rem;
}

.total strong {
  font-size: 1.35rem;
}

.account-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.35rem;
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.account-row:first-child {
  border-top: none;
}

a.account-row:hover {
  background: var(--bg);
}

.account-name {
  font-weight: 600;
}

.account-meta {
  font-size: 0.85rem;
}

.account-balance {
  font-weight: 700;
  white-space: nowrap;
}

.account-balance.negative {
  color: var(--danger);
}

.amount-credit {
  color: var(--success);
  font-weight: 600;
  white-space: nowrap;
}

.amount-debit {
  font-weight: 600;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

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

.tx-table th {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.tx-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.tx-table .num {
  text-align: right;
}

.radio {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-right: 1.25rem;
}

.field .radio input {
  width: auto;
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.checkpoint-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.checkpoint-form input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  max-width: 11rem;
}

details summary {
  cursor: pointer;
  font-size: 0.85rem;
}

.brand a {
  color: inherit;
  text-decoration: none;
}
