/*
  ZahlMas - Premium Fintech Glassmorphic Design System
  Optimized for Mobile Viewports (max 480px, centered on desktop)
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* HSL Colors for clean opacity control */
  --bg-color: #060810;
  --bg-gradient: linear-gradient(145deg, #090b15 0%, #030408 100%);
  
  --glass-card: rgba(18, 22, 41, 0.7);
  --glass-card-hover: rgba(28, 33, 59, 0.85);
  --glass-card-active: rgba(35, 41, 74, 0.95);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(99, 102, 241, 0.4);
  
  /* Vibrant Accents */
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.40);
  --primary-light: #818cf8;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  
  --danger: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.35);
  
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.35);
  
  --info: #06b6d4;
  
  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  /* Dimensions & Spacing */
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Base Headings */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Main Mobile App Frame Wrapper */
#app-frame {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  max-height: 880px;
  background-color: #0b0d19;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* Adjust frame when in desktop view vs mobile view */
@media (max-width: 540px) {
  #app-frame {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
}

/* App Header styling */
header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 13, 25, 0.6);
  backdrop-filter: blur(15px);
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-section h1 {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

/* Network Sync Badge styling */
.sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sync-badge:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.sync-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulse 2s infinite;
}

.sync-dot.offline {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning-glow);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Main Content Area (Tab Views) */
main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 90px; /* Space for bottom tab bar */
  position: relative;
  scrollbar-width: none; /* Hide standard Firefox scrollbar */
}

main::-webkit-scrollbar {
  display: none; /* Hide Chrome/Safari scrollbar */
}

.tab-view {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

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

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

/* Floating Bottom Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(13, 17, 33, 0.85);
  backdrop-filter: blur(25px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 68px;
  height: 60px;
  border-radius: var(--border-radius-md);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-item:hover svg {
  stroke: var(--text-primary);
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--primary-light);
}

.nav-item.active svg {
  stroke: var(--primary-light);
  filter: drop-shadow(0 0 6px var(--primary-glow));
  transform: translateY(-2px) scale(1.05);
}

/* Button & General Element Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

/* Form inputs & Glass Card panels */
.glass-card {
  background-color: var(--glass-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-bottom: 16px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background-color: var(--glass-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: -6px;
  margin-bottom: 12px;
}

/* Custom visual list layouts */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  position: relative;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.input-field:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* 🧾 RECEIPT TAB & SCANNER SECTION */
.scanner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  padding: 30px 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  background: rgba(255, 255, 255, 0.01);
  position: relative;
  overflow: hidden;
  height: 190px;
}

.scanner-container:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--primary);
}

.scan-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.scan-icon-wrap svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary-light);
}

.scan-text {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.scan-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Animated Laser Scanner */
.laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0) 0%, #6366f1 50%, rgba(99, 102, 241, 0) 100%);
  box-shadow: 0 0 10px #6366f1, 0 0 20px #818cf8;
  opacity: 0;
  z-index: 10;
}

.scanning .laser-beam {
  opacity: 1;
  animation: laserSweep 2s ease-in-out infinite alternate;
}

.scanning-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 11, 20, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 50;
  padding: 20px;
}

.scanning .scanning-overlay {
  display: flex;
}

.scanner-log {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 15px;
  text-align: left;
  max-width: 100%;
  width: 80%;
  height: 60px;
  overflow: hidden;
  line-height: 1.4;
}

@keyframes laserSweep {
  from { top: 0%; }
  to { top: 100%; }
}

/* Demo Dinner Grid */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.demo-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 10px;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  color: var(--text-primary);
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary-light);
}

.demo-emoji {
  font-size: 1.25rem;
}

.demo-title {
  font-weight: 600;
}

.demo-price {
  color: var(--success);
  font-weight: 700;
}

/* Items List & Allocation Bar */
.item-list-container {
  margin-top: 15px;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition-fast);
}

.item-row:hover {
  padding-left: 4px;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-header {
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-calories {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 10px;
}

.item-category-tag {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.item-category-tag.Food {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
}

.item-category-tag.Drink {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
}

.item-category-tag.Dessert {
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger);
}

.item-price {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Dynamic Item Split Assignment progress bar */
.split-indicator-bar {
  grid-column: 1 / span 2;
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
  position: relative;
}

.split-indicator-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.split-indicator-fill.fully-assigned {
  background: var(--success);
  box-shadow: 0 0 4px var(--success);
}

/* Avatars attached below item split bars */
.item-assigned-avatars {
  grid-column: 1 / span 2;
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.mini-avatar {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  padding: 2px 6px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 👥 PEOPLE & SPLITTING SCREEN */
.people-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px 14px 4px; /* Enhanced horizontal scroll padding */
  margin-bottom: 12px;
  scrollbar-width: none;
  touch-action: pan-x; /* Instructs mobile browsers to skip gesture delay */
  -webkit-overflow-scrolling: touch; /* Forces hardware-accelerated momentum swipe */
}

.people-list::-webkit-scrollbar {
  display: none;
}

.person-card {
  flex: 0 0 80px; /* Wider card for a much better mobile hit area */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px; /* Widen inner spacing */
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  z-index: 5; /* Keep clickable card above background decorators */
  user-select: none;
  -webkit-user-select: none; /* Block accidental text highlighting on tap */
}

.person-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
  box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.15);
}

.person-avatar {
  font-size: 1.5rem;
  margin-bottom: 4px;
  transition: var(--transition-fast);
}

.person-card.active .person-avatar {
  transform: scale(1.15);
}

.person-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  max-width: 72px; /* Widen name tag bounding box */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-subtotal {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  margin-top: 3px;
}

/* Add person drawer */
.add-person-btn {
  flex: 0 0 80px; /* Match standard card size */
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: transparent;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  z-index: 5;
  user-select: none;
  -webkit-user-select: none;
  transition: var(--transition-fast);
}

.add-person-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.add-person-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Splitting Matrix Drawer / Interactive Item Picker */
.split-matrix {
  margin-top: 15px;
}

.split-matrix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.split-matrix-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.split-matrix-row.assigned {
  border-color: var(--primary-glow);
  background: rgba(99, 102, 241, 0.04);
}

.split-matrix-row.assigned-fully {
  border-color: var(--success-glow);
  background: rgba(16, 185, 129, 0.04);
}

.checkbox-visual {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.split-matrix-row.checked .checkbox-visual {
  background-color: var(--primary);
  border-color: var(--primary);
}

.split-matrix-row.checked .checkbox-visual::after {
  content: "✓";
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
}

/* 💳 SETTLE UP SCREEN */
.payer-select-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 12px 4px; /* Enhanced horizontal scroll padding */
  margin-bottom: 4px;
  touch-action: pan-x; /* Instructs mobile browsers to skip gesture delay */
  -webkit-overflow-scrolling: touch; /* Forces hardware-accelerated momentum swipe */
  scrollbar-width: none;
}

.payer-select-wrap::-webkit-scrollbar {
  display: none;
}

.payer-option {
  flex: 0 0 80px; /* Use fixed pixel width to prevent shrinking on smaller devices */
  padding: 12px 6px; /* Widen hit area */
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  z-index: 5;
  user-select: none;
  -webkit-user-select: none;
}

.payer-option.selected {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.06);
}

/* Settle balances layout */
.bill-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  margin-top: 4px;
}

/* Debts & Settlement list */
.settlement-card {
  padding: 12px;
  background: rgba(244, 63, 94, 0.04);
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
}

.settlement-card.no-debt {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.debt-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.debt-line:last-child {
  border-bottom: none;
}

.debt-direction {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debt-arrow {
  color: var(--danger);
  font-size: 1.1rem;
}

.settle-action-btn {
  padding: 4px 10px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.settle-action-btn:hover {
  background: var(--success);
  border-color: var(--success);
}

/* Next Round Payer Suggestion Panel */
.next-payer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--border-radius-md);
  margin-top: 14px;
}

.next-payer-avatar {
  font-size: 2.2rem;
  animation: dance 2s infinite ease-in-out;
}

@keyframes dance {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}

.next-payer-info {
  display: flex;
  flex-direction: column;
}

.next-payer-label {
  font-size: 0.7rem;
  color: var(--warning);
  font-weight: 700;
  text-transform: uppercase;
}

.next-payer-name {
  font-size: 0.95rem;
  font-weight: 700;
}

/* 📊 STATS & GROUP HISTORY SCREEN */
.stats-badge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.badge-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-icon {
  font-size: 1.8rem;
}

.badge-meta {
  display: flex;
  flex-direction: column;
}

.badge-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-user {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* History log item card */
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-item:last-child {
  border-bottom: none;
}

.history-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.history-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-amount-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.history-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--success);
}

.history-payer {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* 🎡 "WHERE TO EAT NEXT" ROULETTE WHEEL */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 15px 0;
}

.wheel-outer {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 10px solid #1e293b;
  box-shadow: 0 0 20px rgba(0,0,0,0.5), 0 0 0 4px var(--primary-glow);
  overflow: hidden;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  transition: transform 6s cubic-bezier(0.1, 0.8, 0.1, 1);
  transform: rotate(0deg);
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--danger);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  z-index: 10;
}

.wheel-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 9;
}

.spinner-inputs {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  width: 100%;
}

.wheel-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: center;
}

.wheel-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wheel-tag-remove {
  color: var(--danger);
  cursor: pointer;
  font-weight: bold;
}

/* COLLABORATION ROOM WELCOME / LOCK CARD overlay */
.room-join-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.room-logo {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.or-divider {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.or-divider::before, .or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--glass-border);
  margin: 0 10px;
}

/* Toast Notifications styling */
#toast-container {
  position: absolute;
  top: 76px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--primary-glow);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
  transform: translateY(-20px);
  opacity: 0;
  animation: slideIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

@keyframes slideIn {
  to { transform: translateY(0); opacity: 1; }
}

.toast.success {
  border-color: var(--success-glow);
}

.toast.danger {
  border-color: var(--danger-glow);
}

.toast-icon {
  font-size: 1rem;
}

/* Person card deletions close button */
.delete-person-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
  z-index: 10;
}

.delete-person-btn:hover {
  background: var(--danger);
  color: #fff;
  opacity: 1;
  transform: scale(1.15);
}

/* Guided Tour interactive elements highlight class */
.tour-highlight {
  position: relative;
  z-index: 9998 !important;
  outline: 2px solid var(--warning) !important;
  outline-offset: 2px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.25) !important;
  transition: all 0.3s ease;
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  70% { transform: scale(1.02) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
