/* DogeSeeds.org — clean map-first UI (lavandariaceg-style) */

:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --accent: #F5A623;
    --accent-dark: #E09612;
    --surface: #ffffff;
    --text: #1A2B45;
    --muted: #6b7c8f;
    --border: #e8eef3;
    --bg: #f4f8fb;
    --shadow: 0 8px 32px rgba(26, 43, 69, 0.12);
    --radius: 16px;
    --nav-h: 60px;
    --filter-h: 46px;
    --people-green: #4CAF50;
    --business-blue: #42A5F5;
    --volunteer-orange: #FF9800;
    --scout-purple: #7E57C2;
    --ngo-pink: #EC407A;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

body.sheet-open { overflow: hidden; }

/* —— Full-screen map —— */
#map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.map-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 248, 251, 0.9);
    font-weight: 700;
    color: var(--muted);
    pointer-events: none;
    transition: opacity 0.3s;
}

.map-overlay.hidden { opacity: 0; pointer-events: none; }

/* —— Splash (card → logo) —— */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.splash-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg);
    transition: opacity 0.65s ease;
}

.splash-screen.exiting .splash-backdrop {
    opacity: 0;
}

.splash-card {
    position: relative;
    z-index: 2;
    width: min(78vw, 300px);
    height: auto;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(26, 43, 69, 0.22);
    transform-origin: center center;
    will-change: transform, opacity;
    animation: splashCardIn 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes splashCardIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

.splash-card.fly-to-logo {
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(26, 43, 69, 0.18);
}

.leaflet-top.leaflet-left {
    top: calc(var(--nav-h) + var(--filter-h) + 10px) !important;
    left: 10px !important;
    right: auto !important;
    width: auto !important;
    z-index: 900 !important;
    overflow: visible !important;
}

.leaflet-top.leaflet-left.map-controls-cluster {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px;
}

.leaflet-top.leaflet-left.map-controls-cluster .leaflet-control {
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

.leaflet-top.leaflet-left.map-controls-cluster .leaflet-control-zoom {
    order: 1;
    flex-shrink: 0;
}

.leaflet-top.leaflet-left.map-controls-cluster .leaflet-control-geocoder {
    order: 2;
    flex: 0 0 auto;
    width: auto;
    max-width: 320px;
}

.leaflet-control-geocoder {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    border: 2px solid var(--border) !important;
    font-family: 'Nunito', sans-serif !important;
    background: #fff !important;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.leaflet-control-geocoder .leaflet-control-geocoder-icon {
    display: none !important;
}

.leaflet-control-geocoder-form,
.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    vertical-align: middle;
}

.leaflet-control-geocoder-form input {
    font-family: inherit !important;
    font-size: 0.95rem !important;
    width: 280px;
    max-width: 280px;
    min-width: 0;
    flex: 1 1 auto;
    box-sizing: border-box;
    border-radius: 10px !important;
    padding: 8px 12px !important;
}

.leaflet-control-geocoder-alternatives {
    position: absolute !important;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1100 !important;
    max-height: min(52vh, 420px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14) !important;
    background: #fff !important;
    -webkit-overflow-scrolling: touch;
}

.leaflet-control-geocoder-alternatives a {
    font-family: inherit !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #f0f4f8;
    white-space: normal !important;
    word-break: break-word;
}

.leaflet-control-geocoder-alternatives a:hover,
.leaflet-control-geocoder-selected {
    background: rgba(76, 175, 80, 0.1) !important;
}

.custom-pin .material-icons { line-height: 1; }

.leaflet-control-zoom a {
    border: 2px solid var(--border) !important;
    color: var(--text) !important;
    font-family: inherit !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-popup-content-wrapper {
    border-radius: 14px;
    border: 2px solid var(--border);
    font-family: 'Nunito', sans-serif;
    box-shadow: var(--shadow);
}

.leaflet-popup-content { margin: 12px; font-size: 0.9rem; }
.popup-title { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.popup-type { font-size: 0.8rem; color: var(--muted); }
.popup-items { margin-top: 8px; font-size: 0.85rem; }
.popup-photo { margin: -4px -4px 8px; border-radius: 10px; overflow: hidden; }
.popup-photo-img { display: block; width: 100%; max-height: 100px; object-fit: cover; }

/* —— Top nav (solid white for logo) —— */
.site-navbar {
    position: relative;
    z-index: 1200;
    padding: 8px 12px;
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(26, 43, 69, 0.08);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.site-navbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(var(--nav-h) - 16px);
}

.site-brand { justify-self: start; }
.site-nav-center-desktop { justify-self: center; }
.site-nav-actions { justify-self: end; }
.site-nav-toggler { justify-self: end; display: none; }

.site-nav-actions-mobile {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    gap: 8px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}

.site-brand:hover { transform: scale(1.02); opacity: 0.92; }

.logo {
    height: 44px;
    width: auto;
    max-width: 200px;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.site-brand.logo-ready .logo {
    opacity: 1;
}

.site-nav-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.site-nav-toggler:hover {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.08);
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.2);
}

.site-nav-toggler .material-icons { font-size: 24px; }

.navbar-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
}

.navbar-collapse.open { display: flex; }

.site-nav-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 2px solid transparent;
    border-radius: 99px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.nav-pill .material-icons {
    font-size: 20px;
    color: var(--primary);
}

.nav-pill:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.14), rgba(76, 175, 80, 0.06));
    border-color: rgba(76, 175, 80, 0.4);
    color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.18);
    transform: translateY(-1px);
}

.nav-pill.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.08));
    border-color: rgba(76, 175, 80, 0.5);
    color: var(--primary-dark);
}

.nav-pill-lang { min-width: 88px; justify-content: center; }

.lang-chevron {
    font-size: 20px !important;
    color: var(--muted) !important;
    margin-left: -2px;
    transition: transform 0.2s;
}

.lang-dropdown.open .lang-chevron { transform: rotate(180deg); }

.flag {
    width: 22px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.lang-dropdown { position: relative; }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1300;
    min-width: 200px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(26, 43, 69, 0.14);
}

.lang-menu[hidden] { display: none; }

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.lang-option:hover {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.25);
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.16), rgba(76, 175, 80, 0.06));
    border-color: rgba(76, 175, 80, 0.45);
    color: var(--primary-dark);
}

.lang-check {
    margin-left: auto;
    font-size: 20px !important;
    color: var(--primary);
    opacity: 0;
}

.lang-option.active .lang-check { opacity: 1; }

.user-chip {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* —— Floating filter bar —— */
.filter-bar {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(232, 238, 243, 0.8);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar.hidden { display: none; }

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 2px solid var(--border);
    border-radius: 99px;
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.filter-pill .material-icons { font-size: 16px; }

.filter-pill:hover {
    border-color: rgba(76, 175, 80, 0.4);
    color: var(--primary-dark);
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

.filter-pill.active .material-icons { color: #fff; }

.filter-pill-nearby {
    margin-left: auto;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.14), rgba(76, 175, 80, 0.06));
    border-color: rgba(76, 175, 80, 0.45);
    color: var(--primary-dark);
}

.filter-pill-nearby:hover {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.18);
}

.filter-pill-nearby .material-icons { color: var(--primary-dark); }

.filter-pill-nearby.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* —— Map hint chip (bottom) —— */
.map-hint {
    position: fixed;
    z-index: 1050;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 24px);
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.97);
    border: 2px solid var(--border);
    border-radius: 99px;
    box-shadow: var(--shadow);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    box-sizing: border-box;
    transition: opacity 0.3s, transform 0.3s;
}

.map-hint-icon {
    font-size: 18px !important;
    color: var(--primary);
    flex-shrink: 0;
    line-height: 1;
    transition: opacity 0.28s ease, color 0.3s ease;
}

.map-hint-icon.fading { opacity: 0; }

.map-hint-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.map-hint-text {
    display: inline-block;
    white-space: nowrap;
    transition: opacity 0.28s ease;
}

.map-hint-text.fading { opacity: 0; }

.map-hint-scroll.is-marquee .map-hint-text {
    animation: hintMarquee var(--hint-marquee-duration, 14s) linear infinite;
    padding-right: 20px;
}

@keyframes hintMarquee {
    0%, 12% { transform: translateX(0); }
    48%, 52% { transform: translateX(var(--hint-marquee-offset, 0px)); }
    88%, 100% { transform: translateX(0); }
}

.map-hint.hidden { opacity: 0; transform: translateX(-50%) translateY(8px); pointer-events: none; }

/* —— Bottom sheets / modals —— */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(26, 43, 69, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.sheet-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sheet-card {
    width: 100%;
    max-width: 480px;
    max-height: min(90dvh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 20px;
    border: 3px solid var(--primary);
    box-shadow: 0 24px 64px rgba(26, 43, 69, 0.22);
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.sheet-card-wide { max-width: 520px; }

.sheet-backdrop.open .sheet-card {
    transform: scale(1) translateY(0);
}

.sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 12px;
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.1) 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sheet-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.sheet-title .material-icons { font-size: 26px; color: var(--primary); }

.sheet-sub {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.btn-sheet-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.btn-sheet-close:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: rgba(76, 175, 80, 0.08);
    transform: rotate(90deg);
}

.sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* —— Cards & content —— */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    border-color: rgba(76, 175, 80, 0.45);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.12);
}

.info-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.08));
    color: var(--primary-dark);
}

.info-card-icon .material-icons { font-size: 24px; }

.info-card strong { display: block; margin-bottom: 4px; }

.info-card-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

.donation-card {
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.donation-card.has-photo {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
}

.donation-card-photo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
}

.donation-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.donation-card-body { flex: 1; min-width: 0; }

.donation-card:hover {
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.donation-card h3 { font-size: 1rem; margin-bottom: 4px; }

.donation-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 8px;
}

.detail-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fafbfc;
}

.detail-item h4 { font-size: 0.95rem; margin-bottom: 4px; }

.detail-photo {
    margin: 0 0 14px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.detail-photo-img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 800;
}

.badge-food { background: #FFF8E1; color: #F57F17; }
.badge-clothing { background: #E3F2FD; color: #1565C0; }
.badge-toys { background: #E0F2F1; color: #00695C; }
.badge-essentials { background: rgba(76, 175, 80, 0.15); color: var(--primary-dark); }

.stakeholders {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.stakeholder-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-radius: 12px;
    border: 2px solid transparent;
    min-width: 80px;
    flex: 1;
    max-width: 100px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
}

.stakeholder-pill .material-icons { font-size: 22px; margin-bottom: 4px; }

.pill-people { background: #E8F5E9; color: var(--people-green); }
.pill-business { background: #E3F2FD; color: #1565C0; }
.pill-volunteer { background: #FFF3E0; color: #E65100; }
.pill-scout { background: #EDE7F6; color: var(--scout-purple); }
.pill-ngo { background: #FCE4EC; color: var(--ngo-pink); }

.wallet-box {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
}

.wallet-box label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}

.wallet-box code {
    display: block;
    word-break: break-all;
    font-size: 0.85rem;
    padding: 10px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
}

.wallet-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 14px;
}

.wallet-qr img {
    display: block;
    border-radius: 8px;
}

.wallet-qr-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
}

.info-card-icon-doge {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.25), rgba(245, 166, 35, 0.1));
    color: var(--accent-dark);
}

.doge-symbol {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    font-family: 'Nunito', system-ui, sans-serif;
}

.btn-doge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--text);
    text-decoration: none;
    margin-bottom: 10px;
}

.btn-doge:hover {
    filter: brightness(1.05);
    color: var(--text);
}

.btn-doge .doge-symbol { font-size: 1.2rem; }

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--muted);
}

.empty-state .material-icons { font-size: 48px; color: var(--accent); margin-bottom: 8px; }

/* —— Forms —— */
.sheet-form label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 12px 0 6px;
}

.sheet-form input,
.sheet-form select,
.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s;
}

.sheet-form input:focus,
.sheet-form select:focus,
.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pick-map {
    height: 180px;
    border-radius: 14px;
    border: 2px solid var(--border);
    margin: 10px 0;
    overflow: hidden;
}

.hint { font-size: 0.82rem; color: var(--muted); margin: 8px 0; }
.warning-hint { color: #c0392b; font-weight: 600; }

.step-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.92rem;
    margin: 16px 0 8px;
    color: var(--text);
}

.step-section-title .material-icons { font-size: 20px; color: var(--primary); }

.option-cards {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.option-cards-org { grid-template-columns: repeat(3, 1fr); }
.option-cards-cat { grid-template-columns: repeat(2, 1fr); }

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.option-card input { display: none; }

.option-card .material-icons {
    font-size: 28px;
    color: var(--muted);
    transition: color 0.2s;
}

.option-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.18);
}

.option-card:has(input:checked) .material-icons { color: var(--primary); }

.switch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.switch-row:hover {
    border-color: rgba(76, 175, 80, 0.35);
}

.switch-row:has(input:checked) {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.08);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12);
}

.switch-row-block {
    margin-top: 14px;
}

.switch-row-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    min-width: 0;
}

.switch-row-label .material-icons {
    font-size: 22px;
    color: var(--muted);
    flex-shrink: 0;
    transition: color 0.2s;
}

.switch-row:has(input:checked) .switch-row-label .material-icons {
    color: var(--primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: #c5ced6;
    border-radius: 99px;
    transition: background 0.25s;
    cursor: pointer;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(26, 43, 69, 0.18);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch input:checked + .switch-slider {
    background: var(--primary);
}

.switch input:focus-visible + .switch-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(22px);
}

.photo-upload { margin: 8px 0 4px; }

.photo-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: #fafbfc;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.photo-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(76, 175, 80, 0.06);
}

.photo-upload-btn .material-icons { font-size: 22px; }

.photo-preview {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.photo-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(26, 43, 69, 0.72);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-remove .material-icons { font-size: 18px; }

.slide-submit {
    position: relative;
    height: 52px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    margin-top: 16px;
}

.slide-submit .track-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--muted);
    pointer-events: none;
    padding-left: 40px;
}

.slide-submit .thumb {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.45);
    z-index: 2;
}

.slide-submit.done .thumb { background: #2ecc71; }
.slide-submit.done .track-text { color: #2ecc71; }

.btn-outline {
    background: #fff;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(76, 175, 80, 0.1);
    box-shadow: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 99px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-block { width: 100%; margin-top: 16px; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fafbfc;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.auth-tab.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

.auth-form label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 12px 0 6px;
}

.hidden { display: none !important; }

/* —— Desktop —— */
@media (min-width: 769px) {
    .map-hint-scroll {
        flex: 0 1 auto;
        overflow: visible;
    }
}

@media (min-width: 992px) {
    .site-nav-toggler { display: none !important; }
    .site-nav-center-desktop { display: block; }
    .site-nav-actions { display: flex; }
    .navbar-collapse { display: none !important; }
    .nav-pill-account-label { display: inline; }
}

/* —— Mobile —— */
@media (max-width: 991.98px) {
    .logo {
        height: 38px;
        max-width: 150px;
    }

    .site-navbar-inner {
        grid-template-columns: 1fr auto;
    }

    .site-nav-center-desktop { display: none; }
    .site-nav-actions:not(.site-nav-actions-mobile) { display: none; }
    .site-nav-toggler { display: inline-flex !important; }

    .navbar-collapse.open {
        display: flex;
        flex-direction: column;
        margin-top: 12px;
        padding: 12px;
        background: #fafbfc;
        border-radius: 16px;
        border: 2px solid var(--border);
    }

    .site-nav-pills {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-pill { justify-content: flex-start; width: 100%; }

    .site-nav-actions-mobile {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }

    .user-chip { display: none; }

    .leaflet-top.leaflet-left {
        left: 8px !important;
        right: 8px !important;
        width: calc(100% - 16px) !important;
    }

    .leaflet-top.leaflet-left.map-controls-cluster {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 8px;
    }

    .leaflet-top.leaflet-left.map-controls-cluster .leaflet-control-zoom {
        order: 1;
        flex-shrink: 0;
        align-self: flex-start;
    }

    .leaflet-top.leaflet-left.map-controls-cluster .leaflet-control-geocoder {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        width: auto !important;
    }

    .leaflet-control-geocoder {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: auto !important;
        min-height: 0 !important;
    }

    .leaflet-control-geocoder-form,
    .leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100%;
        min-width: 0;
    }

    .leaflet-control-geocoder-form input {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 1 1 auto;
    }
}

@media (max-width: 767px) {
    .sheet-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .sheet-card {
        max-width: 100%;
        max-height: min(94dvh, 100%);
        border-radius: 20px 20px 0 0;
        border-bottom: none;
        transform: translateY(100%);
    }

    .sheet-backdrop.open .sheet-card {
        transform: translateY(0);
    }

    .sheet-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .filter-pill-nearby {
        margin-left: 0;
    }

    .map-hint {
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        transform: none;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        font-size: 0.78rem;
        padding: 10px 14px;
        gap: 6px;
    }

    .map-hint.hidden { transform: translateY(8px); }

    .option-cards-org { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}

/* —— Onboarding wizard —— */
.onboarding-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(26, 43, 69, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.onboarding-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.onboarding-card {
    width: 100%;
    max-width: 520px;
    max-height: min(92vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(26, 43, 69, 0.28);
    overflow: hidden;
    animation: onboardingIn 0.35s ease;
}

@keyframes onboardingIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.onboarding-header {
    text-align: center;
    padding: 24px 24px 12px;
    border-bottom: 1px solid var(--border);
}

.onboarding-logo {
    height: 48px;
    width: auto;
    margin-bottom: 12px;
}

.onboarding-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.onboarding-sub {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.4;
}

.onboarding-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.onboarding-question {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 12px;
    text-align: center;
}

.wizard-choices {
    display: grid;
    gap: 12px;
}

.wizard-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: #fafbfc;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.wizard-choice .material-icons {
    font-size: 36px;
    color: var(--primary);
}

.wizard-choice strong {
    font-size: 1rem;
    color: var(--text);
}

.wizard-choice span:last-child {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
}

.wizard-choice:hover,
.wizard-choice:focus-visible {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.08);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.18);
    transform: translateY(-2px);
    outline: none;
}

.wizard-cat-grid,
.wizard-org-grid {
    margin-top: 8px;
}

.wizard-org-grid {
    grid-template-columns: repeat(3, 1fr);
}

.wizard-intent-block {
    margin-bottom: 16px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #fafbfc;
}

.wizard-intent-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
}

.wizard-intent-head .material-icons {
    font-size: 22px;
    color: var(--primary);
}

.wizard-intent-head input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.wizard-intent-cats {
    margin-top: 10px;
}

.onboarding-done-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.onboarding-done-icon .material-icons {
    font-size: 52px;
    color: var(--primary);
    background: rgba(76, 175, 80, 0.12);
    padding: 16px;
    border-radius: 50%;
}

.onboarding-tips {
    list-style: none;
    margin-top: 16px;
}

.onboarding-tips li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.88rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.onboarding-tips li:last-child { border-bottom: none; }

.onboarding-tips .material-icons {
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.onboarding-actions-stack {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.onboarding-footer {
    padding: 14px 24px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}

.onboarding-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.onboarding-dismiss {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 12px;
    cursor: pointer;
}

.onboarding-dismiss input {
    accent-color: var(--primary);
}

.onboarding-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.onboarding-nav .btn-sm {
    padding: 10px 18px;
    font-size: 0.88rem;
}

.onboarding-nav #onboardingSkip {
    margin-left: auto;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    padding: 12px 16px;
    font-family: inherit;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(26, 43, 69, 0.06);
}

@media (max-width: 520px) {
    .onboarding-backdrop { padding: 0; align-items: flex-end; }
    .onboarding-card {
        max-width: none;
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
    }
    .wizard-org-grid { grid-template-columns: repeat(2, 1fr); }
}
