* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --accent: #2f6fed;
  --accent-2: #22c55e;
  --text: #1c1e21;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 16px;
  padding-bottom: 48px;
}

#card-section {
  margin-bottom: 16px;
}

.card {
  background: linear-gradient(135deg, var(--accent), #5b8bff);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 8px 24px rgba(47, 111, 237, 0.25);
}

.card-label {
  font-size: 13px;
  opacity: 0.85;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.card-number {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
}

.balance {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-top: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.balance-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--accent-2);
}

.balance-unit {
  font-size: 16px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.item-title {
  font-weight: 700;
}

.item-amount {
  font-weight: 800;
}

.item-amount.plus { color: var(--accent-2); }
.item-amount.minus { color: #ef4444; }

.item-date,
.item-comment {
  font-size: 13px;
  color: var(--muted);
}

.item-comment {
  margin-top: 4px;
}

/* Catalog */
.catalog-item {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.catalog-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.catalog-body {
  padding: 12px;
}

.catalog-name {
  font-weight: 700;
  font-size: 16px;
}

.catalog-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.catalog-price {
  margin-top: 8px;
  font-weight: 700;
  color: var(--accent-2);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.error {
  text-align: center;
  color: #ef4444;
  padding: 16px;
  font-weight: 600;
}
