/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #FF6B35;
  --orange-light: #FF8C5A;
  --sand: #FFF3E0;
  --teal: #00BCD4;
  --teal-dark: #0097A7;
  --blue: #1E88E5;
  --green: #43A047;
  --purple: #7B1FA2;
  --dark: #1A1A2E;
  --card-bg: #FFFFFF;
  --text: #2D2D2D;
  --text-light: #666;
  --border: #E8E8E8;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius: 16px;
  --radius-sm: 10px;
}
body { font-family: 'Nunito', sans-serif; background: var(--sand); color: var(--text); min-height: 100vh; }
.hidden { display: none !important; }

/* ===== AUTH SCREEN ===== */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 40%, #00BCD4 100%); }
.auth-bg { position: fixed; inset: 0; z-index: 0; }
.wave { position: absolute; width: 200%; height: 200%; border-radius: 45%; opacity: 0.15; animation: spin 12s linear infinite; }
.wave1 { background: white; bottom: -60%; left: -50%; animation-duration: 10s; }
.wave2 { background: #FFD54F; bottom: -65%; left: -50%; animation-duration: 16s; animation-direction: reverse; }
.wave3 { background: #80DEEA; bottom: -70%; left: -50%; animation-duration: 20s; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.auth-container { position: relative; z-index: 1; width: 100%; max-width: 480px; padding: 20px; }
.auth-hero { text-align: center; margin-bottom: 24px; color: white; }
.palm-icon { font-size: 64px; line-height: 1; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.auth-hero h1 { font-size: 2.2rem; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.auth-subtitle { font-size: 1.1rem; font-weight: 700; opacity: 0.9; margin-top: 4px; }
.auth-tagline { font-size: 0.95rem; opacity: 0.8; margin-top: 4px; }

.auth-card { background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.form-hint { color: var(--text-light); font-size: 0.9rem; margin-bottom: 18px; }

.name-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.name-btn { background: var(--sand); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 12px 8px; font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.name-btn:hover { background: var(--orange); color: white; border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,107,53,0.4); }

.selected-user-display { display: flex; align-items: center; gap: 10px; background: var(--sand); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; font-weight: 700; font-size: 1.1rem; }
.form-input { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: 'Nunito', sans-serif; font-size: 1rem; margin-bottom: 12px; transition: border-color 0.2s; outline: none; }
.form-input:focus { border-color: var(--orange); }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form-textarea { min-height: 120px; resize: vertical; }

.btn-primary { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: white; border: none; border-radius: var(--radius-sm); font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,0.4); }
.btn-back { background: none; border: none; color: var(--text-light); font-family: 'Nunito', sans-serif; font-size: 0.9rem; cursor: pointer; margin-top: 12px; padding: 8px; }
.btn-back:hover { color: var(--orange); }

.auth-error { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 10px; font-size: 0.9rem; }

/* ===== APP HEADER ===== */
.app-header { background: linear-gradient(135deg, var(--orange) 0%, #FF8C5A 100%); color: white; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(255,107,53,0.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.header-title { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 900; }
.header-emoji { font-size: 1.4rem; }
.header-user { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; background: rgba(255,255,255,0.2); border-radius: 50px; padding: 6px 12px; }
.chevron { font-size: 0.8rem; }
.user-menu { position: absolute; top: 60px; right: 12px; background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 200; min-width: 150px; overflow: hidden; }
.user-menu button { width: 100%; padding: 14px 16px; background: none; border: none; font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: left; }
.user-menu button:hover { background: var(--sand); }

/* ===== TAB NAV ===== */
.tab-nav { display: flex; overflow-x: auto; gap: 0; background: white; border-bottom: 2px solid var(--border); scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 12px 14px; background: none; border: none; border-bottom: 3px solid transparent; font-family: 'Nunito', sans-serif; font-size: 0.82rem; font-weight: 700; cursor: pointer; color: var(--text-light); transition: all 0.2s; white-space: nowrap; }
.tab-btn:hover { color: var(--orange); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ===== APP MAIN ===== */
.app-main { max-width: 640px; margin: 0 auto; }
.tab-content { display: none; padding: 16px; }
.tab-content.active { display: block; }

/* ===== HOME TAB ===== */
.countdown-card { background: linear-gradient(135deg, #FF6B35, #FF8C5A); color: white; border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 16px; box-shadow: var(--shadow); }
.countdown-card h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.countdown-number { font-size: 3.5rem; font-weight: 900; display: block; line-height: 1.1; }
.countdown-sub { font-size: 1.1rem; opacity: 0.9; }
.countdown-date { font-size: 0.85rem; opacity: 0.8; margin-top: 8px; font-weight: 600; }

.location-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 16px; }
.location-img-wrapper { position: relative; height: 200px; background: linear-gradient(135deg, #00BCD4, #1E88E5); display: flex; align-items: center; justify-content: center; }
.location-img { width: 100%; height: 100%; object-fit: cover; }
.location-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5), transparent); display: flex; align-items: flex-end; padding: 16px; }
.location-badge { background: white; color: var(--text); padding: 6px 14px; border-radius: 50px; font-weight: 700; font-size: 0.85rem; }
.location-details { padding: 16px; }
.location-details h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.location-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.location-stats span { font-size: 0.85rem; font-weight: 600; color: var(--text-light); }
.airbnb-link { display: inline-block; background: var(--sand); color: var(--orange); border-radius: 8px; padding: 8px 16px; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.airbnb-link:hover { background: var(--orange); color: white; }

.family-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.family-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.family-member { background: var(--sand); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; font-size: 0.8rem; font-weight: 700; }
.family-member .member-avatar { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.family-member .member-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin-top: 4px; }
.family-member .member-status.registered { background: var(--green); }

.quick-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card { background: white; border-radius: var(--radius); padding: 16px 12px; text-align: center; box-shadow: var(--shadow); }
.stat-emoji { font-size: 1.6rem; display: block; margin-bottom: 4px; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: var(--orange); display: block; }
.stat-label { font-size: 0.75rem; color: var(--text-light); font-weight: 600; }

/* ===== CHECKLIST ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header h2 { font-size: 1.2rem; font-weight: 800; }
.section-hint { color: var(--text-light); font-size: 0.9rem; margin-bottom: 14px; }
.btn-add { background: var(--orange); color: white; border: none; border-radius: 50px; padding: 8px 16px; font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-add:hover { background: var(--orange-light); transform: translateY(-1px); }

.checklist-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: none; }
.checklist-filters::-webkit-scrollbar { display: none; }
.filter-btn { flex-shrink: 0; padding: 6px 14px; border: 2px solid var(--border); border-radius: 50px; background: white; font-family: 'Nunito', sans-serif; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.filter-btn.active { background: var(--orange); border-color: var(--orange); color: white; }

.checklist-progress { background: white; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.progress-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; font-weight: 700; }
.progress-bar { height: 10px; background: var(--border); border-radius: 50px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--teal)); border-radius: 50px; transition: width 0.5s ease; }

.category-group { margin-bottom: 16px; }
.category-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.95rem; font-weight: 800; color: var(--text-light); margin-bottom: 8px; padding: 4px 0; }
.cat-delete-btn { background: none; border: none; color: #ccc; font-size: 1.1rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all 0.2s; }
.cat-delete-btn:hover { color: #e53935; background: rgba(229,57,53,0.1); }
.checklist-item { background: white; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.2s; cursor: pointer; }
.checklist-item:hover { box-shadow: var(--shadow); }
.checklist-item.checked { opacity: 0.65; background: #f9f9f9; }
.check-circle { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; transition: all 0.2s; }
.checklist-item.checked .check-circle { background: var(--green); border-color: var(--green); color: white; }
.item-info { flex: 1; min-width: 0; }
.item-title { font-weight: 700; font-size: 0.95rem; }
.checklist-item.checked .item-title { text-decoration: line-through; }
.item-meta { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.item-delete { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1rem; padding: 4px; }
.item-delete:hover { color: #e53935; }

/* ===== BLOG ===== */
.blog-post { background: white; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.post-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.post-emoji { font-size: 2rem; flex-shrink: 0; }
.post-meta { flex: 1; }
.post-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.post-author { font-size: 0.82rem; color: var(--text-light); font-weight: 600; }
.post-content { font-size: 0.95rem; line-height: 1.6; color: var(--text); margin-bottom: 14px; }
.post-actions { display: flex; gap: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.post-action-btn { background: none; border: none; font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 700; color: var(--text-light); cursor: pointer; display: flex; align-items: center; gap: 5px; padding: 4px 0; transition: color 0.2s; }
.post-action-btn:hover, .post-action-btn.liked { color: var(--orange); }

/* ===== ACTIVITIES ===== */
.activity-card { background: white; border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.activity-info { flex: 1; }
.activity-title { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.activity-desc { font-size: 0.88rem; color: var(--text-light); margin-bottom: 8px; }
.activity-meta { font-size: 0.8rem; color: var(--text-light); font-weight: 600; }
.vote-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--sand); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; cursor: pointer; font-family: 'Nunito', sans-serif; font-weight: 800; transition: all 0.2s; flex-shrink: 0; }
.vote-btn:hover, .vote-btn.voted { background: var(--orange); border-color: var(--orange); color: white; }
.vote-count { font-size: 1.2rem; }
.vote-label { font-size: 0.7rem; }

/* ===== SHARED ITEMS ===== */
.shared-item { background: white; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.shared-info { flex: 1; }
.shared-title { font-weight: 800; font-size: 0.95rem; }
.shared-desc { font-size: 0.82rem; color: var(--text-light); margin-top: 2px; }
.shared-responsible { font-size: 0.82rem; margin-top: 6px; font-weight: 700; color: var(--teal-dark); }
.claim-btn { background: var(--teal); color: white; border: none; border-radius: 50px; padding: 8px 14px; font-family: 'Nunito', sans-serif; font-size: 0.82rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.claim-btn:hover { background: var(--teal-dark); }
.claimed-badge { background: var(--sand); border-radius: 50px; padding: 6px 12px; font-size: 0.82rem; font-weight: 700; color: var(--green); white-space: nowrap; }

/* ===== INFO SECTION ===== */
.info-section { display: flex; flex-direction: column; gap: 14px; }
.info-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-left: 4px solid var(--orange); }
.info-card.accent-orange { border-left-color: var(--orange); }
.info-card.accent-blue { border-left-color: var(--blue); }
.info-card.accent-green { border-left-color: var(--green); }
.info-card.accent-purple { border-left-color: var(--purple); }
.info-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.info-item { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.info-item span { font-size: 1.3rem; flex-shrink: 0; }
.info-item strong { display: block; font-weight: 700; font-size: 0.9rem; }
.info-item p { font-size: 0.85rem; color: var(--text-light); margin-top: 2px; }
.info-link { color: var(--orange); font-weight: 700; text-decoration: none; }

/* ===== MODALS ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: white; width: 100%; max-width: 600px; border-radius: var(--radius) var(--radius) 0 0; padding: 0; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: white; }
.modal-header h3 { font-size: 1.1rem; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-light); padding: 4px; }
.modal-body { padding: 20px; }

.emoji-picker { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.emoji-opt { background: var(--sand); border: 2px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 1.3rem; cursor: pointer; transition: all 0.2s; }
.emoji-opt.active { border-color: var(--orange); background: #fff3ec; }

/* ===== COMMENTS ===== */
.comment-item { display: flex; gap: 10px; margin-bottom: 14px; }
.comment-avatar { font-size: 1.4rem; flex-shrink: 0; }
.comment-bubble { background: var(--sand); border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm); padding: 10px 14px; flex: 1; }
.comment-author { font-size: 0.82rem; font-weight: 700; margin-bottom: 4px; }
.comment-text { font-size: 0.9rem; }
.comment-form { display: flex; gap: 8px; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; flex-direction: column; }

/* ===== EMPTY STATES ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .empty-emoji { font-size: 3rem; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; }

@media (min-width: 640px) {
  .modal { border-radius: var(--radius); max-width: 520px; align-self: center; }
  .modal-overlay { align-items: center; }
}

/* ===== ROUTE MAP ===== */
.route-map-wrapper { position: relative; height: 240px; }
#route-map { height: 100%; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
.map-legend { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.92); border-radius: 50px; padding: 6px 14px; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.15); z-index: 1000; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot-amersfoort { background: #1E88E5; }
.dot-nieuwerkerk { background: #FF6B35; }
.dot-vakantie { background: #43A047; }
.location-address { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; line-height: 1.5; }
.location-address small { font-size: 0.78rem; }
/* Verberg de Leaflet Routing Machine instructies widget */
.leaflet-routing-container { display: none !important; }
