
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
  margin: 0;
  background: #0b1120;
  color: #e5e7eb;
}

/* PIN overlay */

.pin-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #111827, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.pin-box {
  background: #020617;
  border-radius: 18px;
  padding: 20px 18px 16px;
  width: min(360px, 92vw);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  border: 1px solid #1f2937;
}

.pin-box h2 {
  margin: 0 0 6px;
}

.pin-box p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #9ca3af;
}

#pinInput {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.4em;
}

#pinSubmitBtn {
  margin-top: 10px;
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 9px 14px;
  background: #4f46e5;
  color: #e5e7eb;
  font-weight: 600;
}

.pin-error {
  min-height: 16px;
  font-size: 12px;
  color: #fca5a5;
}

.pin-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

/* App layout */

.hidden {
  display: none;
}

.top-bar {
  background: #020617;
  padding: 12px 16px 6px;
  border-bottom: 1px solid #111827;
}

.brand-pill {
  display: inline-block;
  background: #e5e7eb;
  color: #020617;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.top-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #9ca3af;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 12px 4px;
  align-items: center;
  flex-wrap: wrap;
  background: #020617;
}

.tab-button {
  flex: 0 0 auto;
  border-radius: 999px;
  border: none;
  padding: 8px 18px;
  background: #111827;
  color: #e5e7eb;
  font-weight: 500;
  font-size: 14px;
}

.tab-button.active {
  background: #e5e7eb;
  color: #020617;
}

.new-wreath {
  margin-left: auto;
  border-radius: 999px;
  border: none;
  padding: 8px 18px;
  background: #22c55e;
  color: #022c22;
  font-weight: 600;
}

main {
  padding: 8px 12px 80px;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* Filters row */

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.filter-group {
  display: flex;
  gap: 6px;
}

.filter-button {
  border-radius: 999px;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.filter-button.active {
  background: #eab308;
  color: #020617;
  border-color: #eab308;
}

.ceremony-badge {
  margin-left: auto;
  font-size: 11px;
  color: #9ca3af;
}

/* Wreath cards */

.wreath-card {
  background: #020617;
  border-radius: 18px;
  padding: 14px 14px 10px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.9);
  border: 1px solid #111827;
}

.wreath-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.wreath-ceremony {
  font-weight: 600;
  font-size: 14px;
  color: #e5e7eb;
}

.wreath-meta {
  font-size: 11px;
  color: #9ca3af;
}

.badge-paid,
.badge-unpaid {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.badge-paid {
  background: #14532d;
  color: #bbf7d0;
}

.badge-unpaid {
  background: #7f1d1d;
  color: #fecaca;
}

.wreath-message {
  font-size: 13px;
  margin: 4px 0;
}

.wreath-row {
  font-size: 12px;
  margin-bottom: 2px;
}

.wreath-label {
  font-weight: 600;
  color: #d1d5db;
}

.wreath-amount {
  font-weight: 700;
  color: #f59e0b;
}

.wreath-buttons {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.wreath-buttons button {
  border-radius: 999px;
  padding: 5px 12px;
  border: none;
  font-size: 12px;
}

.wreath-buttons .edit {
  background: #1d4ed8;
  color: #e5e7eb;
}

.wreath-buttons .delete {
  background: #7f1d1d;
  color: #fee2e2;
}

.wreath-buttons .toggle-paid {
  background: #16a34a;
  color: #ecfdf5;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #020617;
  border-radius: 18px;
  padding: 16px 16px 12px;
  width: min(420px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #1f2937;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

#wreathForm label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}

#wreathForm input,
#wreathForm select,
#wreathForm textarea {
  border-radius: 10px;
  border: 1px solid #374151;
  padding: 7px 10px;
  font-size: 14px;
  background: #020617;
  color: #e5e7eb;
}

#wreathForm textarea {
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.modal-actions button {
  border-radius: 999px;
  border: none;
  padding: 7px 14px;
  font-size: 14px;
}

#cancelWreathBtn {
  background: #111827;
  color: #e5e7eb;
}

#saveWreathBtn {
  background: #22c55e;
  color: #022c22;
}

/* Stats */

#statsContent p {
  font-size: 14px;
  margin: 4px 0;
}

/* Footer */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  background: #020617;
  border-top: 1px solid #111827;
}