:root{--bg:#f3f4f6;--surface:#fff;--surface-muted:#f9fafb;--text:#111827;--text-muted:#6b7280;--border:#e5e7eb;--accent:#111827;--accent-contrast:#fff;--success:#166534;--radius-lg:20px;--radius-md:14px;--shadow:0 12px 35px rgba(17,24,39,.08);--max-width:720px}*{box-sizing:border-box}html{min-width:320px;background:var(--bg)}body{margin:0;min-height:100vh;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer}.app-shell{width:min(100% - 24px,var(--max-width));margin:0 auto;padding:20px 0 40px}.app-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:12px 4px 24px}.eyebrow{margin:0 0 6px;font-size:.72rem;font-weight:750;letter-spacing:.12em;color:var(--text-muted)}h1,h2,p{margin-top:0}h1{margin-bottom:6px;font-size:clamp(1.7rem,7vw,2.35rem);line-height:1.05;letter-spacing:-.035em}h2{margin-bottom:0;font-size:1.25rem;line-height:1.2}.subtitle,.helper-text,.shell-note{color:var(--text-muted)}.subtitle{margin-bottom:0;font-size:.92rem}.status-badge{flex:0 0 auto;padding:7px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--success);font-size:.76rem;font-weight:700}.entry-card,.overview-card{margin-bottom:16px;padding:20px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow)}.section-heading{margin-bottom:16px}.entry-form{display:grid;grid-template-columns:1fr auto;gap:10px}.entry-form input{width:100%;min-height:52px;padding:0 15px;border:1px solid #d1d5db;border-radius:var(--radius-md);outline:none;background:var(--surface);color:var(--text)}.entry-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(17,24,39,.08)}.primary-button{min-width:82px;min-height:52px;padding:0 18px;border:0;border-radius:var(--radius-md);background:var(--accent);color:var(--accent-contrast);font-weight:750}.helper-text,.shell-note,.message{margin:12px 0 0;font-size:.82rem;line-height:1.5}.message{min-height:1.25em}.placeholder-grid{display:grid;grid-template-columns:1fr;gap:10px}.metric-card{padding:15px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-muted)}.metric-card span,.metric-card strong{display:block}.metric-card span{margin-bottom:5px;color:var(--text-muted);font-size:.8rem}.metric-card strong{font-size:1.25rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (min-width:640px){.app-shell{padding-top:36px}.placeholder-grid{grid-template-columns:repeat(3,1fr)}}
/* Phase 3B — Transaction Preview */

.transaction-preview {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.transaction-preview[hidden] {
  display: none;
}

.preview-heading {
  margin-bottom: 16px;
}

.preview-heading h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

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

.preview-item {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.preview-item span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: #64748b;
}

.preview-item strong {
  display: block;
  font-size: 16px;
  color: #111827;
  word-break: break-word;
}

.preview-save-button {
  width: 100%;
  margin-top: 16px;
}

.preview-save-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.preview-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

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

/* Phase 3C-2 — Recent Transactions */

.history-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  margin-top: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.transaction-main {
  min-width: 0;
}

.transaction-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  overflow-wrap: anywhere;
}

.transaction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  font-size: 12px;
  color: #6b7280;
}

.transaction-amount {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.transaction-amount.expense {
  color: #111827;
}

.transaction-amount.income {
  color: #047857;
}

.empty-history {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  background: #f9fafb;
}

@media (max-width: 600px) {

  .history-card {
    padding: 20px;
  }

  .transaction-row {
    align-items: flex-start;
    padding: 14px;
  }

  .transaction-amount {
    font-size: 15px;
  }
}