/* ==========================================================================
   Home Budget - Modern Mobile-First Glassmorphic Design System
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-primary: #0a0f1d;
  --bg-surface: #111827;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 69, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.5);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Vibrant Accents */
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-blue: #38bdf8;
  --accent-blue-glow: rgba(56, 189, 248, 0.35);
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  /* Gradients */
  --grad-property: linear-gradient(135deg, #059669 0%, #10b981 50%, #38bdf8 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --grad-card: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  --grad-hero: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 50%),
                    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.08), transparent 50%);

  /* Spacing & Sizing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --bottom-bar-height: 72px;
  
  /* Shadows & Blur */
  --glass-blur: blur(16px);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.2);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  background-image: var(--grad-hero);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-bar-height) + 24px);
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(10, 15, 29, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--grad-property);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px var(--accent-emerald-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 40%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  line-height: 1;
}

/* Header User Switcher Pill */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheets-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheets-badge.connected {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.sheets-badge.connected .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.active-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-user-pill:hover, .active-user-pill:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.user-avatar-tiny {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
}

/* Tab Views */
.view-section {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Property Goal Card (Hero) */
.property-hero-card {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.85) 60%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: var(--shadow-glow);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.goal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.goal-amount-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.goal-current-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.goal-target-number {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin: 14px 0 10px 0;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--grad-property);
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 0 12px var(--accent-emerald);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.goal-footer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.substat-item {
  display: flex;
  flex-direction: column;
}

.substat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.substat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Daily Pace Hero Gauge Card */
.pace-hero-card {
  text-align: center;
  padding: 24px 20px;
}

.pace-ring-container {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pace-svg-ring {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
}

.ring-indicator {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.pace-ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pace-center-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.pace-center-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.pace-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 6px;
}

.pace-status-pill.on_track {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.pace-status-pill.caution {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
}

.pace-status-pill.over_budget {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}

.pace-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.pace-metric {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Quick Action Camera Button */
.cta-button-glowing {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--grad-property);
  color: #0b0f19;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
  margin-bottom: 20px;
}

.cta-button-glowing:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.55);
}

.cta-button-glowing:active {
  transform: translateY(1px);
}

/* Family Members Matrix Grid */
.family-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

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

.member-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.member-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.member-numbers {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  margin-top: 4px;
}

.member-spent {
  font-weight: 700;
  color: var(--text-main);
}

.member-budget {
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* Transaction List Items */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px 0;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.section-subtitle-link {
  font-size: 0.8rem;
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: none;
}

.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.expense-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.expense-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.expense-details {
  display: flex;
  flex-direction: column;
}

.expense-desc {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.expense-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.receipt-tag:hover {
  background: rgba(56, 189, 248, 0.25);
}

.expense-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.expense-amount {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.expense-user-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Category Bars */
.cat-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-item-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.cat-name {
  color: var(--text-main);
  font-weight: 500;
}

.cat-amount {
  color: var(--text-muted);
  font-weight: 600;
}

.cat-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-blue);
}

/* Log Expense Modal / View */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 16px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.amount-large-input {
  padding-left: 40px !important;
  font-size: 1.8rem !important;
  font-weight: 800;
  color: var(--accent-emerald) !important;
}

/* Camera & Receipt Capture Container */
.receipt-capture-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
  cursor: pointer;
}

.receipt-capture-zone:hover {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.04);
}

.camera-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.camera-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.camera-btn.primary {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-blue);
}

.receipt-preview-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 220px;
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
}

.receipt-preview-img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.remove-receipt-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  background: #111827;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Bottom Navigation Bar (PWA Style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-item .nav-icon {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--accent-emerald);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* Center Highlighted Add Button */
.nav-fab {
  transform: translateY(-16px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--grad-property);
  border: 4px solid var(--bg-primary);
  color: #0b0f19;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-emerald-glow);
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-fab:hover, .nav-fab:active {
  transform: translateY(-18px) scale(1.05);
  box-shadow: 0 8px 24px var(--accent-emerald-glow);
}

/* Lightbox Receipt Zoom Modal */
.lightbox-modal {
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  animation: toastIn 0.3s ease-out forwards;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.5);
  color: var(--accent-rose);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility buttons */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   Upcoming Bills & Multi-Person Confirmation Styling
   ========================================================================== */

.bill-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.bill-filter-bar::-webkit-scrollbar {
  display: none;
}

.bill-filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bill-filter-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.bill-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.bill-item-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.bill-item-card.is-fully-paid {
  opacity: 0.75;
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.2);
}

.bill-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bill-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bill-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.bill-title-text {
  font-weight: 700;
  font-size: 0.98rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bill-badge-tag {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bill-badge-tag.shared {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.bill-badge-tag.indiv {
  background: rgba(236, 72, 153, 0.18);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.bill-due-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bill-due-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.bill-due-pill.today {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.bill-due-pill.overdue {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.bill-due-pill.upcoming {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.bill-amount-box {
  text-align: right;
  flex-shrink: 0;
}

.bill-amount-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.bill-amount-split {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* Multi-Person Member Pay Status Bar */
.bill-members-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.members-avatar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.member-chip-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: default;
  transition: all 0.2s ease;
}

.member-chip-status.paid {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #ffffff;
}

.member-chip-status .status-icon {
  font-size: 0.75rem;
}

.member-chip-status.paid .status-icon {
  color: var(--accent-emerald);
}

.bill-footer-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.bill-status-summary-text {
  font-size: 0.74rem;
  font-weight: 600;
  flex: 1;
}

.bill-status-summary-text.all-paid {
  color: var(--accent-emerald);
}

.bill-status-summary-text.pending {
  color: var(--accent-amber);
}

/* Interactive Pay Checkbox / Button */
.bill-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.btn-toggle-bill-pay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-toggle-bill-pay.unpaid {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid var(--accent-blue);
  color: #ffffff;
}

.btn-toggle-bill-pay.unpaid:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.btn-toggle-bill-pay.paid {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-toggle-bill-pay.paid:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}

