/* ============================================================
   BUTELKOMATOWO – Premium Design System
   Colors from Flutter app: Primary #2E7D32, Secondary #4CAF50
   ============================================================ */

:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --accent: #8BC34A;
    --bg: #f0f4f0;
    --surface: #ffffff;
    --surface-alt: #f5f8f5;
    --text: #1a1a1a;
    --text-secondary: #6b7280;
    --border: #e2e8e0;
    --shadow: rgba(0,0,0,0.08);
    --shadow-lg: rgba(0,0,0,0.12);
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --danger: #DC2626;
    --warning: #F59E0B;
    --info: #3B82F6;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --radius-full: 999px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
    --nav-h: 60px;
    --bottom-nav-h: 68px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    height: 100dvh;
}

/* ============== TYPOGRAPHY ============== */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text-secondary); font-size: 0.9rem; }

svg path { fill: currentColor; }

/* ============== TOP NAVBAR (Desktop) ============== */
.top-navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    display: none;
}
.top-nav-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; height: 100%;
    padding: 0 24px; gap: 32px;
}
.top-nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: white;
    font-weight: 800; font-size: 1.2rem;
    flex-shrink: 0;
}
.brand-icon { font-size: 1.5rem; }
.top-nav-links { display: flex; gap: 4px; flex: 1; }
.top-nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-full);
    color: rgba(255,255,255,0.8); text-decoration: none;
    font-weight: 500; font-size: 0.9rem;
    transition: var(--transition);
}
.top-nav-link:hover { background: rgba(255,255,255,0.15); color: white; }
.top-nav-link.active { background: rgba(255,255,255,0.2); color: white; }
.nav-icon { font-size: 1rem; }
.top-nav-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.btn-download-apk {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: var(--radius-full);
    background: var(--accent); color: var(--primary-dark);
    text-decoration: none; font-weight: 700; font-size: 0.85rem;
    transition: var(--transition);
    border: none; cursor: pointer;
}
.btn-download-apk:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,195,74,0.4); }
.btn-auth-nav {
    padding: 8px 20px; border-radius: var(--radius-full);
    background: white; color: var(--primary);
    border: none; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; transition: var(--transition);
}
.btn-auth-nav:hover { transform: scale(1.05); }

/* ============== BOTTOM NAV (Mobile) ============== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: var(--bottom-nav-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex; align-items: center;
    box-shadow: 0 -2px 12px var(--shadow);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 8px 0; border: none; background: none;
    color: var(--text-secondary);
    font-size: 0.65rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg { width: 24px; height: 24px; transition: var(--transition); }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { transform: scale(1.15); }

/* ============== APP MAIN ============== */
.app-main {
    position: fixed; top: 0; left: 0; right: 0;
    bottom: var(--bottom-nav-h);
    overflow: hidden;
}
.view {
    position: absolute; inset: 0;
    display: none;
    background: var(--bg);
}
.view.active { display: flex; flex-direction: column; }
.view-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 16px 16px 32px;
    -webkit-overflow-scrolling: touch;
}
.view-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 16px 8px; flex-shrink: 0;
}
.view-header h1 { flex: 1; }
.header-action-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: var(--primary-light);
    color: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.header-action-btn:hover { transform: scale(1.1); }
.back-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); color: var(--text);
}
.back-btn:hover { background: var(--bg); }

/* ============== MAP VIEW ============== */
#view-map { display: none; position: relative; }
#view-map.active { display: block; position: relative; overflow: hidden; height: 100%; }
.map-container { 
    flex: 1; 
    min-height: 300px; 
    height: 100%; 
    width: 100%;
    z-index: 1; 
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.map-search-bar {
    position: absolute; top: 12px; left: 12px; right: 12px;
    z-index: 10;
}
.search-input-wrap {
    display: flex; align-items: center;
    background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 2px 12px var(--shadow-lg);
    padding: 0 14px; height: 48px;
}
.search-icon { width: 20px; height: 20px; color: var(--text-secondary); flex-shrink: 0; }
.search-input-wrap input {
    flex: 1; border: none; outline: none; padding: 0 10px;
    font-size: 0.9rem; font-family: var(--font);
    background: transparent; color: var(--text);
}
.search-input-wrap input::placeholder { color: var(--text-secondary); }
.search-spinner {
    width: 18px; height: 18px; border: 2px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.search-clear {
    background: none; border: none; font-size: 1.4rem;
    color: var(--text-secondary); cursor: pointer; padding: 0 4px;
    line-height: 1;
}
.search-suggestions {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 4px 16px var(--shadow-lg);
    margin-top: 6px; overflow: hidden;
}
.search-suggestion {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer;
    transition: var(--transition); font-size: 0.85rem;
    color: var(--text);
}
.search-suggestion:hover { background: var(--surface-alt); }
.search-suggestion svg { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }

.map-filter-bar {
    position: absolute; top: 68px; left: 12px; right: 12px;
    z-index: 10; display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.filter-toggle {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: var(--radius-full);
    background: var(--surface); border: none;
    box-shadow: 0 2px 8px var(--shadow);
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); font-family: var(--font); color: var(--text);
}
.filter-toggle.active { background: var(--primary); color: white; }
.filter-toggle svg { fill: currentColor; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-select {
    padding: 7px 12px; border-radius: var(--radius-full);
    background: rgba(0,0,0,0.75); color: white;
    border: none; font-size: 0.8rem; font-family: var(--font);
    cursor: pointer; outline: none;
}
.filter-select option { background: #333; color: white; }
.filter-favorites {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: var(--radius-full);
    background: var(--surface); border: none;
    box-shadow: 0 2px 8px var(--shadow);
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); font-family: var(--font); color: var(--text);
}
.filter-favorites svg { fill: #dc2626; }
.filter-favorites:hover { background: #fef2f2; }
.filter-favorites.active { background: #dc2626; color: white; }
.filter-favorites.active svg { fill: white; }

.points-count {
    display: flex; align-items: center; gap: 4px;
    padding: 7px 12px; border-radius: var(--radius-full);
    background: var(--surface); box-shadow: 0 2px 8px var(--shadow);
    font-size: 0.8rem; font-weight: 700; color: var(--primary);
}
.points-count svg { fill: var(--primary); }

.map-actions {
    position: absolute; bottom: 16px; right: 12px;
    z-index: 10; display: flex; flex-direction: column; gap: 8px;
}
.map-action-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--surface); border: none;
    box-shadow: 0 2px 10px var(--shadow-lg);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
    color: var(--text-secondary);
}
.map-action-btn svg { width: 22px; height: 22px; }
.map-action-btn:hover { transform: scale(1.1); }
.map-action-btn.accent { background: var(--primary); color: white; }

/* ============== WALLET VIEW ============== */
.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg); padding: 24px;
    color: white; margin-bottom: 20px;
    box-shadow: 0 8px 28px rgba(46,125,50,0.3);
}
.balance-card-top { display: flex; justify-content: space-between; align-items: center; }
.balance-label { font-size: 0.85rem; opacity: 0.8; font-weight: 500; }
.guest-badge {
    background: var(--warning); color: white;
    padding: 2px 10px; border-radius: var(--radius-full);
    font-size: 0.7rem; font-weight: 700;
}
.balance-amount { font-size: 2.2rem; font-weight: 800; margin: 8px 0 16px; }
.balance-stats { display: flex; gap: 24px; }
.balance-stat { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; opacity: 0.75; font-weight: 500; }
.stat-value { font-size: 1.1rem; font-weight: 700; }

.info-box {
    border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
}
.info-box.blue {
    background: #eff6ff; border: 1px solid #bfdbfe;
}
.info-box-header {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 0.9rem; color: #1d4ed8;
    margin-bottom: 8px;
}
.info-box-header svg { fill: #1d4ed8; }
.info-box p { font-size: 0.85rem; color: #1e40af; }

.section-title {
    font-size: 1rem; font-weight: 700; margin: 4px 0 12px;
}

.kaucja-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); padding: 14px;
    border-radius: var(--radius); margin-bottom: 8px;
    box-shadow: 0 1px 4px var(--shadow);
}
.kaucja-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.kaucja-icon.blue { background: #dbeafe; color: #2563eb; }
.kaucja-icon.green { background: #dcfce7; color: #16a34a; }
.kaucja-icon.orange { background: #ffedd5; color: #ea580c; }
.kaucja-label { flex: 1; font-size: 0.85rem; font-weight: 500; }
.kaucja-price {
    padding: 4px 14px; border-radius: var(--radius-full);
    font-weight: 800; font-size: 0.9rem;
}
.kaucja-price.blue { background: #dbeafe; color: #2563eb; }
.kaucja-price.green { background: #dcfce7; color: #16a34a; }
.kaucja-price.orange { background: #ffedd5; color: #ea580c; }

.tips-box {
    background: rgba(46,125,50,0.05); border-radius: var(--radius);
    padding: 16px; margin-bottom: 20px;
}
.tips-box h3 { font-size: 0.95rem; margin-bottom: 10px; }
.tip-item {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.82rem; color: var(--text-secondary);
    margin-bottom: 6px;
}
.tip-check { flex-shrink: 0; }

.returns-history { margin-bottom: 20px; }
.return-item {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--surface); padding: 14px; border-radius: var(--radius);
    margin-bottom: 8px; box-shadow: 0 1px 4px var(--shadow);
}
.return-info { font-size: 0.85rem; }
.return-info strong { font-weight: 600; }
.return-date { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.return-amount { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

/* ============== DOWNLOAD CTA ============== */
.download-cta {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 60%, #4CAF50 100%);
    border-radius: var(--radius-lg); padding: 28px 24px; margin: 20px 0;
    text-align: center; color: white;
}
.download-cta.small { padding: 20px; }
.download-cta h3 { font-size: 1.1rem; color: white; margin-bottom: 6px; }
.download-cta p { color: rgba(255,255,255,0.85); margin-bottom: 16px; font-size: 0.85rem; }
.btn-download-big {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-full);
    background: white; color: var(--primary-dark);
    text-decoration: none; font-weight: 800; font-size: 0.95rem;
    transition: var(--transition); border: none; cursor: pointer;
}
.btn-download-big:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

/* ============== RANKING VIEW ============== */
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.ranking-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); padding: 14px;
    border-radius: var(--radius); transition: var(--transition);
    border: 1px solid var(--border);
}
.ranking-item:hover { transform: translateX(3px); }
.ranking-item.current-user { background: rgba(46,125,50,0.08); border-color: var(--primary); }
.ranking-item.top-3 { box-shadow: 0 2px 10px var(--shadow); }
.rank-badge {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: white;
    flex-shrink: 0; background: var(--text-secondary);
}
.rank-badge.gold { background: var(--gold); color: #7a5c00; }
.rank-badge.silver { background: var(--silver); color: #555; }
.rank-badge.bronze { background: var(--bronze); color: #4a2f00; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-city { font-size: 0.75rem; color: var(--text-secondary); }
.rank-stats { text-align: right; flex-shrink: 0; }
.rank-earnings { font-weight: 800; font-size: 0.95rem; color: var(--primary); }
.rank-containers { font-size: 0.75rem; color: var(--text-secondary); }

/* ============== PROFILE VIEW ============== */
.profile-card {
    background: var(--primary); border-radius: var(--radius-lg);
    padding: 24px; color: white; margin-bottom: 20px;
}
.profile-card.logged-out { text-align: center; padding: 40px 24px; }
.profile-card.logged-out .profile-avatar { margin: 0 auto 16px; }
.profile-card.logged-out h2 { color: white; margin-bottom: 8px; }
.profile-card.logged-out p { color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.profile-card.logged-out .btn-primary { margin-bottom: 10px; }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-header-row { display: flex; align-items: center; gap: 16px; }
.profile-info { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name { font-weight: 700; font-size: 1.15rem; }
.profile-email { font-size: 0.85rem; opacity: 0.8; }

.guest-upgrade-card {
    background: rgba(46,125,50,0.08); border: 1px solid rgba(46,125,50,0.25);
    border-radius: var(--radius); padding: 20px; text-align: center; margin-bottom: 20px;
}
.upgrade-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.guest-upgrade-card h3 { margin-bottom: 4px; }
.guest-upgrade-card p { margin-bottom: 14px; }

.profile-stats {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 10px; margin-bottom: 20px;
}
.profile-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 8px; border-radius: var(--radius);
    text-align: center; gap: 4px;
}
.profile-stat.green { background: rgba(46,125,50,0.08); color: var(--primary); }
.profile-stat.primary { background: rgba(76,175,80,0.1); color: var(--primary-light); }
.profile-stat.orange { background: #fff7ed; color: #ea580c; }
.profile-stat svg { opacity: 0.7; }
.stat-val { font-weight: 800; font-size: 1rem; color: var(--text); }
.stat-lbl { font-size: 0.7rem; color: var(--text-secondary); font-weight: 500; }

.profile-menu { margin-bottom: 20px; }
.profile-menu-item {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 14px; margin-bottom: 6px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    transition: var(--transition); font-family: var(--font);
    text-align: left;
}
.profile-menu-item:hover { border-color: var(--primary); }
.menu-icon { font-size: 1.4rem; flex-shrink: 0; }
.menu-text { flex: 1; display: flex; flex-direction: column; }
.menu-title { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.menu-sub { font-size: 0.75rem; color: var(--text-secondary); }
.menu-arrow { font-size: 1.3rem; color: var(--text-secondary); }

.btn-logout {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; margin-top: 8px;
    background: none; border: 2px solid var(--danger); border-radius: var(--radius);
    color: var(--danger); font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: var(--transition); font-family: var(--font);
}
.btn-logout:hover { background: #fef2f2; }

/* ============== FORMS ============== */
.form-card {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 20px; box-shadow: 0 2px 8px var(--shadow);
}
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block; font-weight: 600; font-size: 0.85rem;
    margin-bottom: 6px; color: var(--text);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.9rem;
    font-family: var(--font); color: var(--text);
    transition: var(--transition); background: var(--surface);
    outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
}
.form-group textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-location-box {
    background: var(--surface-alt); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.location-status {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--primary); margin-bottom: 10px;
}
.btn-get-location {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px; border-radius: var(--radius-sm);
    background: var(--primary); color: white; border: none;
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    transition: var(--transition); font-family: var(--font);
}
.btn-get-location:hover { background: var(--primary-dark); }
.form-msg {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.85rem; margin-bottom: 12px;
}
.form-msg.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.form-msg.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ============== BUTTONS ============== */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-full);
    background: var(--primary); color: white; border: none;
    font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: var(--transition); font-family: var(--font);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary.full { width: 100%; }
.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-full);
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: var(--transition); font-family: var(--font);
}
.btn-outline:hover { background: rgba(46,125,50,0.05); }
.btn-outline.full { width: 100%; }

.btn-spinner {
    width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ============== MODALS ============== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: flex-end; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-sheet {
    background: var(--surface); border-radius: 24px 24px 0 0;
    width: 100%; max-width: 500px; max-height: 90vh;
    overflow-y: auto; padding: 12px 24px 32px;
    animation: slideUp 0.3s ease;
    position: relative;
}
.modal-sheet.small { max-height: 60vh; }
.modal-sheet.point-sheet { max-height: 85vh; }
.modal-handle {
    width: 40px; height: 4px; border-radius: 2px;
    background: var(--border); margin: 0 auto 16px;
}
.modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 1.6rem;
    color: var(--text-secondary); cursor: pointer; line-height: 1;
}
.modal-desc { margin-bottom: 16px; }

.auth-alt { margin-top: 12px; }
.auth-toggle { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-secondary); }
.auth-toggle a { color: var(--primary); font-weight: 700; text-decoration: none; }

.earn-amount-display {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(46,125,50,0.08); border: 1px solid rgba(46,125,50,0.2);
    border-radius: var(--radius); padding: 14px; margin: 12px 0;
}
.earn-label { font-size: 0.8rem; color: var(--text-secondary); }
.earn-info { font-size: 0.7rem; color: var(--text-secondary); display: block; }
.earn-value { font-weight: 800; font-size: 1.3rem; color: var(--primary); }

.confirm-sheet { text-align: center; padding-top: 32px; }
.confirm-sheet h2 { margin-bottom: 10px; }
.confirm-sheet p { margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* ============== POINT DETAILS ============== */
.pd-header { margin-bottom: 16px; }
.pd-name-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pd-name { font-size: 1.15rem; font-weight: 700; flex: 1; }
.pd-favorite-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: #fef2f2; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
}
.pd-favorite-btn svg { fill: #dc2626; }
.pd-favorite-btn:hover { background: #fecaca; transform: scale(1.1); }
.pd-favorite-btn.active { background: #dc2626; }
.pd-favorite-btn.active svg { fill: white; }
.pd-address { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.pd-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-badge {
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 700;
}
.pd-badge.active { background: #dcfce7; color: #15803d; }
.pd-badge.full { background: #fff7ed; color: #c2410c; }
.pd-badge.broken { background: #fef2f2; color: #b91c1c; }
.pd-badge.unknown { background: #f3f4f6; color: #6b7280; }

.pd-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.pd-stars { color: var(--warning); font-size: 1rem; }
.pd-rating-text { font-size: 0.85rem; color: var(--text-secondary); }

.pd-info-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px;
}

.pd-section-title { font-size: 0.9rem; font-weight: 700; margin: 18px 0 10px; }

.pd-status-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.status-chip {
    padding: 6px 14px; border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    border: 1px solid; transition: var(--transition);
    background: transparent; font-family: var(--font);
}
.status-chip.green { color: #15803d; border-color: #86efac; }
.status-chip.green:hover { background: #dcfce7; }
.status-chip.orange { color: #c2410c; border-color: #fdba74; }
.status-chip.orange:hover { background: #fff7ed; }
.status-chip.red { color: #b91c1c; border-color: #fca5a5; }
.status-chip.red:hover { background: #fef2f2; }

.pd-reviews { margin-top: 12px; }
.pd-review {
    background: var(--surface-alt); border-radius: var(--radius-sm);
    padding: 12px; margin-bottom: 8px;
}
.pd-review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pd-review-user { font-weight: 600; font-size: 0.85rem; }
.pd-review-rating { color: var(--warning); font-size: 0.8rem; }
.pd-review-comment { font-size: 0.82rem; color: var(--text-secondary); }
.pd-review-date { font-size: 0.7rem; color: var(--text-secondary); margin-top: 4px; }

.pd-add-review { margin-top: 16px; }
.pd-add-review h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.star-rating {
    display: flex; gap: 4px; margin-bottom: 10px;
}
.star-btn {
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #d1d5db; transition: var(--transition);
    padding: 2px;
}
.star-btn.active { color: var(--warning); }
.star-btn:hover { transform: scale(1.2); }

/* ============== TOAST ============== */
.toast-container {
    position: fixed; top: 16px; right: 16px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 14px 20px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 600; color: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
    pointer-events: auto; max-width: 360px;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #2563eb; }

/* ============== EMPTY STATE ============== */
.empty-state {
    text-align: center; padding: 40px 20px;
    color: var(--text-secondary); font-size: 0.9rem;
}

/* ============== UTILITIES ============== */
.hidden { display: none !important; }

/* ============== ANIMATIONS ============== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============== LEAFLET OVERRIDES ============== */
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; box-shadow: 0 4px 16px var(--shadow-lg) !important; }
.leaflet-popup-content { margin: 12px 16px !important; font-family: var(--font) !important; font-size: 0.85rem !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet+ (≥768px) */
@media (min-width: 768px) {
    .top-navbar { display: block; }
    .bottom-nav { display: none; }
    .app-main { top: var(--nav-h); bottom: 0; }

    .modal-overlay { align-items: center; }
    .modal-sheet { border-radius: var(--radius-lg); max-height: 85vh; }

    .view-scroll { padding: 24px; max-width: 800px; margin: 0 auto; }
    .view-header { padding: 24px 24px 12px; max-width: 800px; margin: 0 auto; }

    .map-search-bar { top: 20px; left: 20px; right: auto; width: 400px; }
    .map-filter-bar { top: 80px; left: 20px; right: auto; }
    .map-actions { bottom: 24px; right: 24px; }

    .wallet-balance-card { padding: 32px; }
    .balance-amount { font-size: 2.8rem; }

    .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .form-row { grid-template-columns: 1fr 1fr; }

    .toast-container { top: calc(var(--nav-h) + 16px); }
}

/* Desktop (≥1024px) */
@media (min-width: 1024px) {
    .map-search-bar { width: 420px; }
    .ranking-list { max-width: 700px; margin: 0 auto; }
}

/* Small phones */
@media (max-width: 360px) {
    .balance-amount { font-size: 1.8rem; }
    .balance-stats { gap: 16px; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .profile-stat { padding: 12px 4px; }
    .stat-val { font-size: 0.85rem; }
    .form-row { grid-template-columns: 1fr; }
}

/* ============== COOKIE CONSENT ============== */
.cookie-consent {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
    color: white; padding: 20px;
    animation: slideUp 0.4s ease;
}
.cookie-consent.hidden { display: none; }
.cookie-consent-inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 280px; }
.cookie-text h3 { font-size: 1.05rem; margin-bottom: 6px; }
.cookie-text p { font-size: 0.85rem; opacity: 0.85; line-height: 1.5; }
.cookie-text a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ============== LOCATION OVERLAY ============== */
.location-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.location-overlay.hidden { display: none !important; }
.location-card {
    background: white; border-radius: var(--radius-lg);
    padding: 40px; text-align: center; max-width: 400px; width: 90%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}
.location-icon { font-size: 3rem; margin-bottom: 16px; }
.location-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text); }
.location-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5; }
.location-card .btn-primary { width: 100%; margin-bottom: 10px; }
.btn-text {
    background: none; border: none; color: var(--text-secondary);
    font-size: 0.85rem; cursor: pointer; padding: 8px;
    font-family: var(--font);
}
.btn-text:hover { color: var(--text); }

/* ============== CITY SEO ARTICLE ============== */
.city-article { padding: 0 16px 32px; }
.city-article h2 {
    font-size: 1.3rem; font-weight: 700; color: var(--text);
    margin: 28px 0 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}
.city-article p { font-size: 0.95rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 14px; }
.city-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin: 20px 0;
}
.city-stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border-radius: var(--radius);
    padding: 20px; text-align: center;
}
.city-stat-card .stat-num { font-size: 2rem; font-weight: 800; display: block; }
.city-stat-card .stat-lbl { font-size: 0.8rem; opacity: 0.9; }
.city-points-list { margin: 16px 0; }
.city-point-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; background: var(--surface);
    border-radius: var(--radius-sm); margin-bottom: 8px;
    border: 1px solid var(--border); cursor: pointer;
    transition: var(--transition);
}
.city-point-item:hover { transform: translateX(4px); border-color: var(--primary-light); }
.city-point-status {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.city-point-status.active { background: #22c55e; }
.city-point-status.full { background: #f59e0b; }
.city-point-status.broken { background: #ef4444; }
.city-point-status.unknown { background: #9ca3af; }
.city-point-info { flex: 1; }
.city-point-name { font-weight: 600; font-size: 0.9rem; }
.city-point-addr { font-size: 0.8rem; color: var(--text-secondary); }
.city-map-container {
    height: 300px; border-radius: var(--radius);
    margin: 16px 0; overflow: hidden;
    border: 1px solid var(--border);
}
.city-cta-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white; border-radius: var(--radius-lg); padding: 28px;
    text-align: center; margin: 24px 0;
}
.city-cta-box h3 { font-size: 1.2rem; margin-bottom: 8px; }
.city-cta-box p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 16px; }
.city-cta-box .btn-primary { background: white; color: var(--primary-dark); }

/* ============== WALLET CHARTS ============== */
.wallet-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}
.chart-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}
.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
@media (max-width: 600px) {
    .wallet-charts { grid-template-columns: 1fr; }
}

/* ============== SAVINGS GOAL ============== */
.savings-goal-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #fcd34d;
}
.goal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.goal-icon { font-size: 1.4rem; }
.goal-title {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
    color: #92400e;
}
.goal-edit-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.goal-edit-btn:hover { background: rgba(0,0,0,0.1); }
.goal-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 12px;
}
.goal-progress-bar {
    height: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}
.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 6px;
    transition: width 0.5s ease;
}
.goal-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #92400e;
}
.goal-stats span:first-child { font-weight: 700; }
.goal-preview {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}
.goal-preview span { font-size: 0.85rem; color: var(--text-secondary); }
.goal-preview strong { font-size: 1rem; color: var(--primary); }

