@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-2: #232733;
  --surface-3: #2c3040;
  --border: #2e3244;
  --text: #e8eaed;
  --text-muted: #8b8fa3;
  --text-dim: #5a5f73;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00b894;
  --green-dim: rgba(0,184,148,0.12);
  --red: #ff6b6b;
  --red-dim: rgba(255,107,107,0.12);
  --orange: #fdcb6e;
  --orange-dim: rgba(253,203,110,0.12);
  --blue: #74b9ff;
  --blue-dim: rgba(116,185,255,0.12);
  --pink: #fd79a8;
  --pink-dim: rgba(253,121,168,0.12);
  --david: #74b9ff;
  --monika: #fd79a8;
  --radius: 14px;
  --radius-sm: 10px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ═══ PIN SCREEN ═══ */
.pin-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100vh;
}
.pin-screen.hidden { display: none; }
.pin-logo {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(108,92,231,0.3);
}
.pin-title { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.pin-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 40px; transition: color 0.3s; }
.pin-subtitle.error { color: var(--red); }
.pin-dots { display: flex; gap: 14px; margin-bottom: 40px; }
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); transition: all 0.2s;
}
.pin-dot.filled { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(108,92,231,0.5); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.pin-key {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 24px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.pin-key:active { background: var(--surface-2); transform: scale(0.93); }
.pin-key.empty { visibility: hidden; }

/* ═══ APP SHELL ═══ */
.app { display: none; flex-direction: column; min-height: 100vh; }
.app.active { display: flex; }

.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; background: var(--bg);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.top-bar-avatar.david { background: rgba(116,185,255,0.15); color: var(--david); }
.top-bar-avatar.monika { background: rgba(253,121,168,0.15); color: var(--monika); }
.top-bar h1 { font-size: 20px; font-weight: 600; }
.top-bar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-family: inherit;
}

.content {
  flex: 1; padding: 16px 20px 100px;
  max-width: 600px; margin: 0 auto; width: 100%;
}

/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 6px 0; color: var(--text-dim);
  cursor: pointer; font-size: 10px; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s; background: none; border: none; font-family: inherit;
  position: relative;
}
.nav-item.active { color: var(--accent-light); }
.nav-item svg { width: 22px; height: 22px; }
.nav-badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}

/* ═══ COMMON ═══ */
.screen { display: none; }
.screen.active { display: block; }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; margin-top: 20px;
}
.section-header:first-child { margin-top: 0; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.section-action {
  font-size: 13px; color: var(--accent-light); cursor: pointer;
  background: none; border: none; font-weight: 500; font-family: inherit;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
}

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state .emoji { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; line-height: 1.5; }

.tab-row { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-pill {
  padding: 8px 16px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.tab-pill.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ═══ BALANCE CARD ═══ */
.balance-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(108,92,231,0.3); border-radius: 18px;
  padding: 24px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.balance-card::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(108,92,231,0.15);
}
.balance-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.balance-lines { margin-bottom: 4px; }
.balance-line { font-size: 16px; color: var(--accent-light); margin-bottom: 4px; }
.balance-line strong { font-size: 22px; font-weight: 700; color: var(--text); }
.balance-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.btn {
  padding: 10px 16px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.btn-full { width: 100%; }
.btn-green { background: var(--green); color: white; }
.btn-red { background: var(--red); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--text-muted); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ═══ RECURRING BILLS ═══ */
.recurring-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.recurring-item.overdue { border-color: var(--red); background: var(--red-dim); }
.recurring-item.due { border-color: var(--orange); }
.recurring-item.paid { opacity: 0.7; border-color: var(--green); background: var(--green-dim); }
.recurring-status {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.recurring-status.paid { background: var(--green); }
.recurring-status.due { background: var(--orange); }
.recurring-status.overdue { background: var(--red); animation: pulse 1.5s infinite; }
.recurring-status.upcoming { background: var(--text-dim); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.recurring-info { flex: 1; min-width: 0; }
.recurring-name { font-size: 14px; font-weight: 500; }
.recurring-due { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.recurring-amount { font-size: 15px; font-weight: 600; text-align: right; }
.recurring-actions { display: flex; gap: 6px; }
.recurring-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 4px; margin-top: 12px;
  background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--border); border-bottom: none;
}
.recurring-header:first-child { margin-top: 0; }
.recurring-header-info { display: flex; flex-direction: column; gap: 2px; }
.recurring-header-name { font-size: 14px; font-weight: 600; }
.recurring-header-amount { font-size: 12px; color: var(--text-muted); }
.recurring-header + .recurring-item { border-radius: 0; margin-top: 0; }
.recurring-header + .recurring-item:last-of-type,
.recurring-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-bottom: 12px; }

/* ═══ EXPENSE LIST ═══ */
.expense-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.expense-item:last-child { border-bottom: none; }
.expense-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.expense-info { flex: 1; min-width: 0; }
.expense-name { font-size: 15px; font-weight: 500; }
.expense-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.expense-right { text-align: right; }
.expense-amount { font-size: 15px; font-weight: 600; }
.expense-payer { font-size: 11px; margin-top: 2px; }
.expense-notes {
  font-size: 12px; color: var(--text-dim); margin-top: 4px;
  font-style: italic;
}
.expense-item { cursor: pointer; transition: background 0.2s; border-radius: 8px; padding: 14px 8px; }
.expense-item:hover { background: var(--surface-2); }

/* Upcoming toggle */
.upcoming-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
}
.upcoming-arrow { transition: transform 0.2s; font-size: 14px; }
.upcoming-arrow.open { transform: rotate(180deg); }
.upcoming-section {
  display: none; padding-top: 8px;
}
.upcoming-section.open { display: block; }

/* Desktop: always show upcoming, hide toggle */
@media (min-width: 768px) {
  .upcoming-toggle { display: none; }
  .upcoming-section { display: block !important; padding-top: 0; }
}

/* Mobile: compact expense items */
@media (max-width: 767px) {
  .expense-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
  .expense-item { padding: 10px 4px; gap: 10px; }
  .expense-name { font-size: 14px; }
  .expense-meta { font-size: 11px; }
  .expense-amount { font-size: 14px; }
  .expense-notes { display: none; }
  .balance-card { padding: 18px; }
  .balance-line { font-size: 14px; }
  .balance-line strong { font-size: 18px; }
}

/* ═══ FORECAST ═══ */
.forecast-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.forecast-month { font-size: 14px; font-weight: 500; }
.forecast-breakdown { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.forecast-total { font-size: 16px; font-weight: 600; }

/* ═══ CALENDAR ═══ */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cal-month { font-size: 18px; font-weight: 600; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  margin-bottom: 20px;
}
.cal-day-label {
  text-align: center; font-size: 11px; color: var(--text-dim);
  padding: 8px 0; font-weight: 500;
}
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 10px; font-size: 14px; cursor: pointer; position: relative;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.today { background: var(--accent); font-weight: 600; box-shadow: 0 2px 10px rgba(108,92,231,0.4); }
.cal-day.has-event::after {
  content: ''; position: absolute; bottom: 4px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.cal-day.other-month { color: var(--text-dim); }

.cal-event {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.cal-event-bar { width: 4px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.cal-event-info { flex: 1; }
.cal-event-title { font-size: 14px; font-weight: 500; }
.cal-event-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cal-event-del {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 16px; padding: 4px;
}

/* ═══ NOTES ═══ */
.note-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.2s;
}
.note-card:hover { border-color: var(--accent); }
.note-card.pinned { border-left: 3px solid var(--orange); }
.note-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.note-title { font-size: 15px; font-weight: 600; }
.note-pin { font-size: 14px; }
.note-preview {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.note-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.note-meta { font-size: 11px; color: var(--text-dim); }
.note-tags { display: flex; gap: 6px; }
.note-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 500; }
.note-tag.house { background: var(--blue-dim); color: var(--blue); }
.note-tag.admin { background: var(--orange-dim); color: var(--orange); }
.note-tag.general { background: var(--green-dim); color: var(--green); }
.note-attachments { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.note-attachment {
  font-size: 11px; color: var(--text-muted); background: var(--surface-2);
  padding: 3px 8px; border-radius: 6px; display: flex; align-items: center; gap: 4px;
}

/* ═══ HOUSE PROJECT ═══ */
.timeline-item {
  display: flex; gap: 16px; padding-bottom: 20px; position: relative;
}
.timeline-item:not(:last-child)::after {
  content: ''; position: absolute;
  left: 15px; top: 38px; bottom: 0; width: 2px; background: var(--border);
}
.timeline-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px; z-index: 1;
}
.timeline-dot.done { background: var(--green-dim); color: var(--green); }
.timeline-dot.active { background: var(--accent); box-shadow: 0 0 12px rgba(108,92,231,0.4); }
.timeline-dot.upcoming { background: var(--surface-2); border: 2px solid var(--border); }
.timeline-content { flex: 1; }
.timeline-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.timeline-date { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.timeline-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ═══ RENOVATION ═══ */
.reno-summary-grid { display: flex; gap: 12px; margin-bottom: 16px; }
.reno-summary-card {
  flex: 1;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(108,92,231,0.3); border-radius: 14px;
  padding: 16px;
}
.reno-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--accent-light); margin-bottom: 4px;
}
.reno-total-row strong { color: var(--text); font-size: 14px; }
.reno-net {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px; margin-top: 6px;
  font-size: 15px; color: var(--text);
}
.reno-net strong { font-size: 18px; }

/* Table — shared */
.reno-table { width: 100%; border-collapse: collapse; }
.reno-table th {
  padding: 8px 10px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  text-align: left; background: var(--surface);
  position: sticky; top: 0; z-index: 5;
  border-bottom: 2px solid var(--accent);
}
.reno-table th.r { text-align: right; }
.reno-cat-divider td {
  padding: 10px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.reno-cat-subtotal { float: right; font-weight: 400; color: var(--text-muted); }
.reno-table .reno-row td {
  padding: 7px 10px; font-size: 13px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.reno-table .reno-row:hover td { background: var(--surface-2); cursor: pointer; }
.reno-table .reno-row td.r { text-align: right; font-weight: 500; }
.reno-table .reno-row td:first-child { width: 24px; text-align: center; }
.reno-item-name-cell { font-weight: 500; }
.reno-item-sub-cell { font-size: 11px; color: var(--text-muted); }
.reno-tbd { color: var(--text-dim); font-style: italic; }
.reno-notes-peek {
  font-size: 11px; color: var(--text-dim); max-width: 250px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reno-grant-cell { color: var(--green); font-size: 12px; }

.pri-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pri-must { background: var(--red); }
.pri-probably { background: var(--orange); }
.pri-low { background: var(--text-dim); }
.pri-on_hold { background: var(--blue); }

/* Desktop columns — hidden on mobile */
.reno-col-desktop { display: none; }

@media (min-width: 768px) {
  .reno-col-desktop { display: table-cell; }
  .reno-summary-grid { gap: 16px; }
  .reno-table th, .reno-table .reno-row td { padding: 8px 14px; }

  /* Wider content on desktop */
  #screen-house .fade-in { max-width: 1100px; margin: 0 auto; }
}

/* Override content max-width for house on desktop */
@media (min-width: 768px) {
  #screen-house { max-width: 1200px; }
}

.snapshot-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.snapshot-item:hover { color: var(--accent-light); }
.snapshot-item:last-child { border-bottom: none; }

.budget-overview {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.budget-spent { font-size: 24px; font-weight: 700; }
.budget-total { font-size: 14px; color: var(--text-muted); }
.budget-bar-wrap { margin-bottom: 8px; }
.budget-bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.budget-bar-name { font-size: 13px; color: var(--text-muted); }
.budget-bar-amount { font-size: 13px; font-weight: 500; }
.budget-track { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.budget-fill { height: 100%; border-radius: 4px; }

/* ═══ FILES ═══ */
.file-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.file-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  cursor: pointer; transition: border-color 0.2s; position: relative;
}
.file-card:hover { border-color: var(--accent); }
.file-icon { font-size: 28px; margin-bottom: 10px; }
.file-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11px; color: var(--text-dim); }
.file-del {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 50%; width: 24px; height: 24px;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; color: var(--text-muted);
}
.file-card:hover .file-del { display: flex; }

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; color: var(--text-muted);
  font-size: 14px; cursor: pointer; transition: border-color 0.2s;
  margin-top: 16px;
}
.upload-zone:hover { border-color: var(--accent); }
.upload-hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ═══ FAB ═══ */
.fab {
  position: fixed; bottom: 80px; right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); border: none; color: white; font-size: 28px;
  cursor: pointer; z-index: 99;
  box-shadow: 0 4px 20px rgba(108,92,231,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.9); }

/* ═══ MODAL ═══ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 600px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow-y: auto;
}
.modal-handle { width: 36px; height: 4px; background: var(--surface-3); border-radius: 2px; margin: 0 auto 20px; }
.modal h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 20px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.modal-close:active { background: var(--surface-3); }

.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block; font-weight: 500; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; font-family: inherit; outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input.amount { font-size: 28px; font-weight: 600; }
.form-textarea {
  width: 100%; padding: 12px 14px; min-height: 120px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; resize: vertical;
}
.form-textarea:focus { border-color: var(--accent); }

.payer-toggle { display: flex; gap: 8px; }
.payer-btn {
  flex: 1; padding: 12px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface-2);
  color: var(--text); cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 500; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.payer-btn.selected-david { border-color: var(--david); background: rgba(116,185,255,0.1); }
.payer-btn.selected-monika { border-color: var(--monika); background: rgba(253,121,168,0.1); }

.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip {
  padding: 8px 14px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all 0.2s;
}
.category-chip.selected {
  background: rgba(108,92,231,0.15); border-color: var(--accent);
  color: var(--accent-light);
}

.tag-chips { display: flex; gap: 8px; }
.tag-chip {
  padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--border); font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.tag-chip.selected { border-width: 2px; }
.tag-chip[data-tag="general"] { background: var(--green-dim); color: var(--green); }
.tag-chip[data-tag="admin"] { background: var(--orange-dim); color: var(--orange); }
.tag-chip[data-tag="house"] { background: var(--blue-dim); color: var(--blue); }
.tag-chip.selected[data-tag="general"] { border-color: var(--green); }
.tag-chip.selected[data-tag="admin"] { border-color: var(--orange); }
.tag-chip.selected[data-tag="house"] { border-color: var(--blue); }

/* ═══ TOAST ═══ */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: white; padding: 10px 20px;
  border-radius: 10px; font-size: 14px; font-weight: 500;
  z-index: 300; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
