* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 16px 40px;
  color: #1b1b1b;
  font-size: 14px;
}

h1 {
  font-size: 18px;
  margin-bottom: 4px;
}

a {
  color: #6b2c81;
}

.intro {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin-top: 0;
}

.status {
  font-size: 12px;
  color: #6b2c81;
  min-height: 18px;
  margin: 12px 0;
}

.status-error {
  color: #eb5757;
}

.muted {
  font-size: 12px;
  color: #888;
}

.hidden {
  display: none !important;
}

.empty {
  font-size: 13px;
  color: #888;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #6b2c81;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #582269;
}

button:disabled {
  background: #ccc;
  cursor: default;
}

/* The table is the widest thing on the page, so it scrolls inside its own
   container on narrow screens rather than pushing the body sideways. */
.txn-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  display: block;
  overflow-x: auto;
}

.txn-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  text-align: left;
  font-weight: 700;
  padding: 8px 8px 6px;
  white-space: nowrap;
}

.txn-table td {
  padding: 6px 8px;
  border-top: 1px solid #f0f0f0;
  vertical-align: middle;
}

.txn-table tbody tr:hover {
  background: #faf7fb;
}

.col-check {
  width: 28px;
}

.col-date {
  white-space: nowrap;
  color: #888;
  font-size: 12px;
}

.col-payee {
  min-width: 200px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.amount-credit {
  color: #22875a;
}

.col-category select {
  width: 100%;
  min-width: 180px;
  padding: 5px 6px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
}

.col-category select.unsuggested {
  border-color: #ddd;
  color: #888;
}

.col-why {
  white-space: nowrap;
}

.chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-rule {
  background: #f1e7f5;
  color: #6b2c81;
}

.chip-high {
  background: #e4f3ec;
  color: #22875a;
}

.chip-medium {
  background: #fdf0e3;
  color: #b56a1c;
}

.chip-low {
  background: #f2f2f2;
  color: #777;
}

.chip-none {
  background: transparent;
  color: #bbb;
  font-weight: 400;
}

.row-applied {
  opacity: 0.45;
}

.row-error td {
  background: #fdeaea;
}

.row-error-message {
  font-size: 11px;
  color: #eb5757;
}

.page-footer {
  margin-top: 24px;
  text-align: right;
}

.page-footer a {
  margin-left: 12px;
  font-size: 13px;
}
