/* ==========================================================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
  /* Brand Palette: Warm Orange & Amber + Rich Espresso Brown */
  --primary: #f97316;          /* Bright Warm Orange (Food warmth) */
  --primary-hover: #ea580c;
  --primary-light: #ffedd5;
  --primary-glow: rgba(249, 115, 22, 0.25);

  --cafe-accent: #854d0e;       /* Roasted Coffee Brown */
  --cafe-light: #fef3c7;
  --cafe-glow: rgba(133, 77, 14, 0.25);

  --secondary: #0f172a;        /* Deep Slate Navy */
  --secondary-light: #1e293b;

  /* Neutral Backgrounds & Surfaces */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  /* Status & Highlights */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px var(--primary-glow);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TOP ANNOUNCEMENT BAR
   ========================================================================== */
.announcement-bar {
  background: linear-gradient(90deg, #7c2d12, #9a3412, #b45309);
  color: #fed7aa;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 8px 0;
  letter-spacing: 0.2px;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: #ffffff;
}

.announcement-badge i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.logo-icon-wrapper {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.logo-icon {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.logo-icon.food {
  transform: translate(-3px, -2px) scale(0.9);
}

.logo-icon.cafe {
  position: absolute;
  transform: translate(4px, 4px) scale(0.8);
  opacity: 0.9;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #ea580c, #7c2d12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* Hero Random Button CTA */
.btn-random-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  border: 1px solid #fed7aa;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.08);
}

.btn-random-cta:hover {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.16);
}

.btn-random-cta i {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-bounce);
}

.btn-random-cta:hover i {
  transform: rotate(45deg);
}

/* Auth Section in Header */
.auth-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c 0%, #b45309 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

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

.user-display-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.btn-logout {
  color: var(--text-muted);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.btn-logout i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   BUTTONS SYSTEM
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-demo-quick {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all var(--transition-fast);
}

.btn-demo-quick:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-demo-quick i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   HERO & 3 MAIN TABS
   ========================================================================== */
.hero-section {
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 100%);
  padding: 40px 0 20px;
  text-align: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-title span {
  background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 30px;
}

/* 3 Navigation Tabs Container */
.main-tabs-wrapper {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.main-tabs {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  gap: 6px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Category specific tab style for food / cafe */
.tab-btn[data-tab="food"].active {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.tab-btn[data-tab="cafe"].active {
  background: linear-gradient(135deg, #854d0e 0%, #713f12 100%);
  box-shadow: 0 4px 14px var(--cafe-glow);
}

.tab-btn[data-tab="add"].active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon i {
  width: 18px;
  height: 18px;
}

.tab-counter {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.tab-btn.active .tab-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-auth-lock {
  background: #fee2e2;
  color: #ef4444;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  transition: all var(--transition-fast);
}

.tab-auth-lock i {
  width: 12px;
  height: 12px;
}

.tab-auth-lock.unlocked {
  background: #d1fae5;
  color: #10b981;
}

/* ==========================================================================
   FILTER & CONTROLS TOOLBAR
   ========================================================================== */
.main-content {
  padding-top: 30px;
  padding-bottom: 60px;
  flex: 1;
}

.filter-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.search-box-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-box-wrapper input {
  width: 100%;
  padding: 10px 38px 10px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.search-box-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  color: var(--text-subtle);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  color: var(--text-main);
  background: var(--border-subtle);
}

.clear-search-btn i {
  width: 14px;
  height: 14px;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.control-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.control-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 10px 32px 10px 36px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.control-select-wrapper select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.control-select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.8rem;
}

/* Active filter summary */
.active-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: #9a3412;
  margin-bottom: 24px;
}

.btn-reset-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #ea580c;
  font-size: 0.825rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-reset-filters:hover {
  background: rgba(234, 88, 12, 0.1);
}

.btn-reset-filters i {
  width: 14px;
  height: 14px;
}

/* Button Quay Ngẫu Nhiên trong thanh công cụ */
.btn-random-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-random-picker:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}

.btn-random-picker i,
.btn-random-picker svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-bounce);
}

.btn-random-picker:hover i,
.btn-random-picker:hover svg {
  transform: rotate(35deg) scale(1.15);
}

/* ==========================================================================
   SECTION HEADING & GRID
   ========================================================================== */
.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--secondary);
}

.section-desc {
  display: none !important;
}

.result-count-badge {
  display: none !important;
}

/* Responsive Places Grid */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ==========================================================================
   PLACE CARD DESIGN (PREMIUM LOOK)
   ========================================================================== */
.place-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.place-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(249, 115, 22, 0.3);
}

/* Card Cover Image */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #e2e8f0;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.place-card:hover .card-image {
  transform: scale(1.05);
}

.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.badge-food {
  background: rgba(234, 88, 12, 0.9);
}

.badge-cafe {
  background: rgba(133, 77, 14, 0.9);
}

.card-category-badge i {
  width: 12px;
  height: 12px;
}

.card-rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fbbf24;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.card-rating-badge i {
  width: 14px;
  height: 14px;
  fill: #fbbf24;
}

.card-rating-badge .reviews {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.7rem;
}

/* Card Body */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.3;
}

.card-city-pill {
  font-size: 0.725rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.card-price-pill {
  font-size: 0.725rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Address & Price rows */
.card-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-info-item i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.card-info-item.address i {
  color: #ef4444;
}

.card-info-item.price {
  font-weight: 700;
  color: #059669;
}

.card-info-item.price i {
  color: #10b981;
}

/* Recommended Dish Highlight */
.card-highlight-dish {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.825rem;
  color: #92400e;
  line-height: 1.4;
}

.card-highlight-dish strong {
  color: #78350f;
}

/* Tags */
.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.card-tag {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.725rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Card Footer: SUGGESTED BY BADGE (Crucial Requirement) */
.card-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.suggested-by-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.suggested-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ea580c;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggested-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}

.suggested-label {
  font-size: 0.65rem;
  color: #9a3412;
  font-weight: 600;
  line-height: 1;
}

.suggested-name {
  font-size: 0.825rem;
  font-weight: 800;
  color: #7c2d12;
  line-height: 1.2;
}

.card-actions-quick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.card-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.card-action-btn i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-subtle);
  max-width: 520px;
  margin: 20px auto;
}

.empty-icon-wrap {
  width: 64px;
  height: 64px;
  background: #fef2f2;
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.empty-icon-wrap i {
  width: 32px;
  height: 32px;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ==========================================================================
   TAB 3: ADD PLACE VIEW & GUEST GATE
   ========================================================================== */
.add-place-section {
  max-width: 800px;
  margin: 0 auto;
}

/* Guest Lock Screen Gate */
.guest-gate-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 50px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.lock-illustration {
  margin-bottom: 24px;
}

.lock-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.15);
}

.lock-circle i {
  width: 38px;
  height: 38px;
}

.gate-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
}

.gate-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.gate-desc strong {
  color: var(--text-main);
}

.gate-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Logged In Add Form */
.add-form-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.badge-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-hover);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.badge-accent i {
  width: 14px;
  height: 14px;
}

.form-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--secondary);
}

.form-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.user-preview-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.user-avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ea580c;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-role-label {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.user-name-label {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Form Layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-label .required {
  color: var(--danger);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i,
.input-with-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-subtle);
  pointer-events: none;
  flex-shrink: 0;
  z-index: 2;
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.925rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.input-with-icon select {
  cursor: pointer;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.error-feedback {
  font-size: 0.75rem;
  color: var(--danger);
  display: none;
}

.error-feedback.show {
  display: block;
}

/* Category Radio Selection Buttons */
.category-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.category-radio {
  cursor: pointer;
}

.category-radio input {
  display: none;
}

.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  transition: all var(--transition-fast);
  text-align: center;
  gap: 6px;
}

.radio-card i {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.radio-title {
  font-weight: 800;
  font-size: 1rem;
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-radio input:checked + .radio-card {
  border-color: var(--primary);
  background: #fff7ed;
}

.category-radio input:checked + .radio-card i {
  color: var(--primary);
}

.category-radio input:checked + .radio-card .radio-title {
  color: #9a3412;
}

/* Preset Image Selection */
.preset-images-group {
  margin-top: 10px;
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.preset-label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.preset-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-badge-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.preset-badge-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Image Upload from Device (iOS, Windows, Mac, Android) */
.image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-input-hidden {
  display: none;
}

.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-surface);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.upload-dropzone:hover,
.upload-dropzone.drag-active {
  border-color: var(--primary);
  background: #fff7ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.upload-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffedd5;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-icon-circle i,
.upload-icon-circle svg {
  width: 24px;
  height: 24px;
}

.upload-text-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Upload Preview Box */
.upload-preview-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.upload-preview-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.upload-preview-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.preview-filename {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-filesize {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.upload-preview-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-danger {
  background: transparent;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-outline-danger:hover {
  background: #fef2f2;
}

/* URL Input Directly Visible */
.upload-url-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.url-input-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.url-input-label i,
.url-input-label svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

/* Author confirmation & Account preview box */
.author-confirm-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
}

.author-confirm-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.author-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.author-label {
  font-size: 0.725rem;
  color: #065f46;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.author-name-row strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #064e3b;
}

.author-role-tag {
  background: #d1fae5;
  color: #047857;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-profile-view {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Account Info Modal */
.account-card-view {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.account-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c 0%, #b45309 100%);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
  flex-shrink: 0;
}

.account-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.acc-role {
  font-size: 0.8rem;
  color: #ea580c;
  font-weight: 700;
  background: #ffedd5;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.account-stats-grid.single-stat {
  grid-template-columns: 1fr;
}

.input-readonly {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  cursor: not-allowed;
  border-color: #cbd5e1 !important;
}

.role-rank-progress {
  font-size: 0.775rem;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 4px;
  font-weight: 600;
  line-height: 1.35;
}

.account-password-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
}

.password-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--secondary, #1e293b);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.password-section-header i,
.password-section-header svg {
  width: 16px;
  height: 16px;
  color: var(--primary, #ea580c);
}

.change-password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-box {
  padding: 12px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  text-align: center;
}

.stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #c2410c;
}

.stat-lbl {
  font-size: 0.75rem;
  color: #9a3412;
  font-weight: 600;
}

.account-edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.account-modal-actions .btn {
  flex: 1;
}

.btn-danger-soft {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger-soft:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* My Places Management in Account Modal */
.account-my-places-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-places-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.my-place-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition-fast);
}

.my-place-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.my-place-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.my-place-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.my-place-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.my-place-name {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-place-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.my-place-badge-type {
  font-weight: 700;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.my-place-badge-type.food {
  background: #ffedd5;
  color: #ea580c;
}

.my-place-badge-type.cafe {
  background: #ecfdf5;
  color: #059669;
}

.my-place-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-action.edit {
  color: #0284c7;
}

.btn-icon-action.edit:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.btn-icon-action.delete {
  color: #dc2626;
}

.btn-icon-action.delete:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.btn-icon-action i,
.btn-icon-action svg {
  width: 15px;
  height: 15px;
}

.my-places-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.my-places-empty i {
  width: 36px;
  height: 36px;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.edit-place-modal-card {
  max-width: 520px;
}

.btn-account-info-icon {
  color: var(--text-muted);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.btn-account-info-icon:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

.user-profile-badge {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-badge:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 200ms ease;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalPop 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--text-subtle);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-icon-badge i {
  width: 26px;
  height: 26px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Quick Demo Box inside Auth Modal */
.demo-login-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.demo-badge {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.demo-name {
  font-size: 0.85rem;
  color: #0369a1;
}

.divider-text {
  text-align: center;
  position: relative;
  margin: 18px 0;
}

.divider-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border-subtle);
}

.divider-text span {
  position: relative;
  background: var(--bg-surface);
  padding: 0 12px;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-subtle);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-tab:hover {
  color: var(--text-main);
}

.auth-tab.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.account-modal-tabs {
  gap: 2px;
}

.account-modal-tabs .auth-tab {
  font-size: 0.8rem;
  padding: 9px 6px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .account-modal-tabs .auth-tab {
    font-size: 0.72rem;
    padding: 8px 2px;
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   RANDOM WHEEL / MYSTERY MODAL DESIGN
   ========================================================================== */
.random-modal-card {
  max-width: 520px;
}

.dice-spin {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  color: #ea580c;
  animation: pulse 1.5s infinite ease-in-out;
}

/* Random Modal Filter Row (Thành phố từ DB & Mức giá) */
.random-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.random-filter-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.random-filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.random-filter-label i {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.random-filter-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.random-filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.random-empty-notice {
  text-align: center;
  padding: 24px 16px;
  background: #fff1f2;
  border: 1px dashed #f43f5e;
  border-radius: var(--radius-md);
  color: #9f1239;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.random-wheel-box {
  background: #0f172a;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #ffffff;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.slot-container {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #94a3b8;
}

.spin-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  animation: spin 1s linear infinite;
}

/* Winner Reveal Card */
.winner-reveal-card {
  border: 2px solid #fbbf24;
  background: #fffbeb;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2);
  animation: revealCard 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-badge {
  background: linear-gradient(90deg, #d97706, #b45309);
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.775rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.winner-badge i {
  width: 14px;
  height: 14px;
}

.winner-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.winner-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.winner-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.winner-category {
  font-size: 0.75rem;
  font-weight: 800;
  color: #b45309;
  text-transform: uppercase;
}

.winner-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 9999px;
}

.winner-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
}

.winner-address, .winner-price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.winner-address i, .winner-price i {
  width: 16px;
  height: 16px;
  color: #ea580c;
}

.winner-dish {
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.winner-dish i {
  width: 16px;
  height: 16px;
  color: #d97706;
}

.winner-suggested {
  margin-top: 4px;
}

.badge-suggested {
  display: inline-block;
  background: #ea580c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.random-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideInRight 250ms ease;
  min-width: 280px;
  border-left: 4px solid var(--primary);
}

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

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

.toast.info {
  border-left-color: var(--info);
}


/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes revealCard {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET - OPTIMIZED FOR IPHONE 13 - 15)
   iPhone 13/14/15 screen width: 390px - 393px
   iPhone 13/14/15 Plus/Pro Max: 428px - 430px
   ========================================================================== */
@media (max-width: 768px) {
  .header-inner {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .brand-logo {
    gap: 8px;
  }

  .logo-icon-wrapper {
    width: 36px;
    height: 36px;
  }

  .logo-title {
    font-size: 1.15rem;
  }

  .logo-subtitle {
    font-size: 0.7rem;
  }

  .hero-section {
    padding: 24px 0 16px;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.3;
    padding: 0 4px;
  }

  .hero-desc {
    font-size: 0.875rem;
    margin-bottom: 20px;
    padding: 0 8px;
  }

  .main-tabs-wrapper {
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .main-tabs {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    border-radius: var(--radius-lg);
  }

  .tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: var(--radius-md);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
  }

  .tab-icon {
    width: 22px;
    height: 22px;
  }

  .tab-icon i,
  .tab-icon svg {
    width: 16px;
    height: 16px;
  }

  .tab-label {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
  }

  .tab-counter {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 1px 5px;
    font-size: 0.625rem;
    line-height: 1;
    min-width: 14px;
    text-align: center;
    border-radius: var(--radius-full);
  }

  .tab-auth-lock {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    margin-left: 0;
  }

  .tab-auth-lock i,
  .tab-auth-lock svg {
    width: 9px;
    height: 9px;
  }

  /* Filter toolbar */
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .filter-controls-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .control-select-wrapper {
    flex: 1;
  }

  .control-select-wrapper select {
    width: 100%;
    padding: 9px 26px 9px 30px;
    font-size: 0.825rem;
  }

  .control-icon {
    left: 8px;
    width: 14px;
    height: 14px;
  }

  .btn-random-picker {
    padding: 9px 14px;
    font-size: 0.825rem;
    flex-shrink: 0;
  }

  .btn-random-picker span {
    font-size: 0.8rem;
  }

  /* Places Grid on mobile */
  .places-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card-image-wrap {
    height: 200px;
  }

  .card-body {
    padding: 14px 16px;
  }

  .card-title {
    font-size: 1.15rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-header {
    flex-direction: column;
  }

  /* Modals on iPhone */
  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-card {
    padding: 24px 18px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-card.edit-place-modal-card {
    max-height: 92vh;
  }

  .modal-close-btn {
    top: 12px;
    right: 12px;
  }

  .random-modal-card {
    border-radius: 20px;
    align-self: center;
    margin: auto;
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 36px);
    max-height: calc(100vh - 36px);
    padding: 18px 15px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .random-modal-card .modal-close-btn {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: var(--bg-subtle);
    border-radius: 50%;
  }

  .random-modal-card .modal-header {
    margin-bottom: 12px;
  }

  .random-modal-card .modal-icon-badge {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
  }

  .random-modal-card .modal-icon-badge i {
    width: 20px;
    height: 20px;
  }

  .random-modal-card .modal-title {
    font-size: 1.15rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .random-modal-card .modal-desc {
    font-size: 0.775rem;
    line-height: 1.35;
    margin-bottom: 0;
  }

  .random-filter-row {
    padding: 8px 10px;
    gap: 8px;
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .random-filter-select {
    padding: 6px 6px;
    font-size: 0.78rem;
  }

  .random-filter-label {
    font-size: 0.7rem;
    gap: 3px;
  }

  .random-filter-label i {
    width: 12px;
    height: 12px;
  }

  .random-wheel-box {
    padding: 16px;
    margin-bottom: 12px;
  }

  .winner-reveal-card {
    margin-bottom: 12px;
    border-radius: 14px;
  }

  .winner-badge {
    padding: 5px 10px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .winner-image {
    height: 130px;
  }

  .winner-info {
    padding: 10px 12px;
    gap: 5px;
  }

  .winner-category {
    font-size: 0.7rem;
  }

  .winner-name {
    font-size: 1.15rem;
    line-height: 1.2;
  }

  .winner-address {
    font-size: 0.78rem;
    line-height: 1.3;
    gap: 4px;
  }

  .winner-address i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .winner-dish {
    padding: 5px 8px;
    font-size: 0.76rem;
    border-radius: 6px;
    line-height: 1.3;
  }

  .winner-dish i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .badge-suggested {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .random-modal-actions {
    display: grid;
    grid-template-columns: 1.18fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
    box-sizing: border-box;
  }

  .random-modal-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    justify-content: center;
    text-align: center;
    letter-spacing: -0.2px;
    white-space: nowrap;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .random-modal-actions .btn i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  .account-card-view {
    padding: 12px;
    gap: 12px;
  }

  .account-avatar-large {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .my-place-item {
    padding: 8px 10px;
  }

  .my-place-thumb {
    width: 42px;
    height: 42px;
  }

  .my-place-name {
    font-size: 0.875rem;
  }

  /* Add Place Form - Responsive on Mobile & iPhone 13-15 */
  .add-place-section {
    padding: 0 4px;
    width: 100%;
    box-sizing: border-box;
  }

  .guest-gate-card {
    padding: 28px 16px;
    border-radius: 20px;
  }

  .lock-circle {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }

  .lock-circle i,
  .lock-circle svg {
    width: 30px;
    height: 30px;
  }

  .gate-title {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .gate-desc {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .gate-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .add-form-container {
    padding: 22px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }

  .form-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
  }

  .form-title {
    font-size: 1.3rem;
    letter-spacing: -0.2px;
  }

  .user-preview-badge {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    padding: 9px 12px;
    border-radius: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-group {
    gap: 5px;
  }

  .form-label {
    font-size: 0.825rem;
  }

  /* Prevent iOS Safari 16px font-size auto-zoom & icon overlap on iPhone 15 */
  .input-with-icon input,
  .input-with-icon select,
  .input-with-icon textarea {
    font-size: 16px !important;
    padding: 12px 14px 12px 48px !important;
    border-radius: 10px;
    min-height: 48px;
    box-sizing: border-box;
  }

  .input-with-icon i,
  .input-with-icon svg {
    left: 14px !important;
    width: 18px !important;
    height: 18px !important;
    pointer-events: none;
    z-index: 2;
  }

  .category-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .radio-card {
    padding: 12px 8px;
    border-radius: 12px;
    gap: 4px;
  }

  .radio-card i,
  .radio-card svg {
    width: 22px;
    height: 22px;
  }

  .radio-title {
    font-size: 0.85rem;
    font-weight: 800;
  }

  .radio-desc {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .upload-dropzone {
    padding: 14px 12px;
    gap: 12px;
    border-radius: 14px;
  }

  .upload-icon-circle {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .upload-icon-circle i,
  .upload-icon-circle svg {
    width: 20px;
    height: 20px;
  }

  .upload-title {
    font-size: 0.875rem;
  }

  .upload-hint {
    font-size: 0.725rem;
    line-height: 1.35;
  }

  .upload-preview-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
  }

  .upload-preview-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
  }

  .upload-preview-meta {
    flex: 1;
    min-width: 140px;
  }

  .upload-preview-btns {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
  }

  .upload-preview-btns .btn,
  .upload-preview-btns button {
    width: 100%;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.775rem;
  }

  .author-confirm-box {
    padding: 14px 14px;
    border-radius: 14px;
  }

  .author-confirm-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .author-avatar-sm {
    flex-shrink: 0;
  }

  .author-details {
    flex: 1;
    min-width: 170px;
  }

  .btn-profile-view {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.825rem;
    min-height: 42px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .form-actions #resetFormBtn {
    min-height: 42px;
    font-size: 0.875rem;
    font-weight: 600;
  }

  /* Safe Area for iPhone Home Indicator */
  body {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
}

/* Extra fine-tuning for compact mobile screens (iPhone 13 / 14 / 15 viewport <= 430px) */
@media (max-width: 430px) {
  .hero-title {
    font-size: 1.35rem;
  }

  .btn-random-picker {
    padding: 8px 10px;
  }

  .btn-random-picker span {
    display: inline;
    font-size: 0.775rem;
  }

  .btn-random-picker i,
  .btn-random-picker svg {
    width: 15px;
    height: 15px;
  }

  .user-profile-badge {
    padding: 3px 8px 3px 4px;
    gap: 6px;
  }

  .user-display-name {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* iPhone 13-15 specific tweaks (390px - 430px) */
  .input-with-icon input,
  .input-with-icon select,
  .input-with-icon textarea {
    padding-left: 48px !important;
    padding-right: 14px !important;
  }

  .add-form-container {
    padding: 18px 12px;
    border-radius: 16px;
  }

  .form-title {
    font-size: 1.2rem;
  }

  .category-radio-group {
    gap: 8px;
  }

  .radio-card {
    padding: 10px 6px;
  }

  .radio-title {
    font-size: 0.8rem;
  }

  .radio-desc {
    font-size: 0.65rem;
  }

  .author-name-row strong {
    font-size: 0.875rem;
  }

  .author-role-tag {
    font-size: 0.675rem;
    padding: 2px 6px;
  }
}
