/* ==========================================================================
   HALLOWEEN PAMATAI HILLS - MODERN PREMIUM SPOOKY DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-dark: #0a0512;
    --bg-surface: #140b24;
    --bg-card: rgba(26, 16, 46, 0.85);
    --bg-glass: rgba(35, 21, 61, 0.65);
    --border-subtle: rgba(255, 117, 24, 0.2);
    --border-active: #ff7518;
    --border-purple: rgba(168, 85, 247, 0.35);
    
    --orange-primary: #ff7518;
    --orange-glow: rgba(255, 117, 24, 0.5);
    --orange-bright: #ff8c3b;
    --purple-magic: #a855f7;
    --purple-dark: #581c87;
    --purple-glow: rgba(168, 85, 247, 0.4);
    --green-toxic: #22c55e;
    --gold-candy: #fbbf24;
    --red-blood: #ef4444;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --font-heading: 'Henny Penny', cursive, system-ui;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 117, 24, 0.15);
    --shadow-glow: 0 0 25px rgba(255, 117, 24, 0.35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

html, body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(255, 117, 24, 0.1) 0%, transparent 45%),
        linear-gradient(180deg, #090410 0%, #110820 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Typography */
h1, h2, h3, .brand-title {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.text-accent { color: var(--orange-primary); }
.text-purple { color: var(--purple-magic); }
.text-gold { color: var(--gold-candy); }
.text-green { color: var(--green-toxic); }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--red-blood); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.block { display: block; }

/* App Header & Hero */
.app-header {
    position: relative;
    background: linear-gradient(180deg, rgba(16, 7, 30, 0.95) 0%, rgba(10, 5, 18, 0.85) 100%);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.header-hero {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    filter: brightness(0.75) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 5, 18, 0.2) 0%, rgba(10, 5, 18, 0.85) 80%, var(--bg-dark) 100%);
}

.header-content-wrapper {
    max-width: 1300px;
    margin: -60px auto 0;
    padding: 0 20px 16px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo-img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    border: 3px solid var(--orange-primary);
    box-shadow: 0 0 20px var(--orange-glow), 0 0 40px rgba(168, 85, 247, 0.3);
    object-fit: cover;
    animation: floatingGlow 4s ease-in-out infinite alternate;
}

@keyframes floatingGlow {
    0% { transform: translateY(0); box-shadow: 0 0 15px var(--orange-glow); }
    100% { transform: translateY(-4px); box-shadow: 0 0 28px var(--orange-glow), 0 0 40px var(--purple-glow); }
}

.brand-text h1 {
    font-size: 1.85rem;
    color: #fff;
    text-shadow: 0 0 12px var(--orange-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-badge {
    background: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
    border: 1px solid var(--border-purple);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
    animation: datePulse 3s infinite alternate ease-in-out;
}

@keyframes datePulse {
    0% { border-color: var(--border-purple); box-shadow: 0 0 8px rgba(168, 85, 247, 0.2); }
    100% { border-color: var(--orange-primary); box-shadow: 0 0 16px rgba(255, 117, 24, 0.35); }
}

.btn-icon-sound {
    background: rgba(168, 85, 247, 0.25);
    border: 1px solid var(--border-purple);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    padding: 0;
    flex-shrink: 0;
}

.btn-icon-sound:hover {
    background: rgba(255, 117, 24, 0.35);
    border-color: var(--orange-primary);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--orange-glow);
}

.btn-icon-sound.sound-muted {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    opacity: 0.7;
}

/* Statistics Pills */
.stats-bar {
    max-width: 720px;
    margin: 12px auto 18px;
    padding: 0 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-pill {
    background: rgba(22, 12, 38, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 117, 24, 0.28);
    border-radius: var(--radius-full);
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-pill:hover {
    transform: translateY(-2px);
    border-color: var(--orange-primary);
    box-shadow: 0 6px 20px rgba(255, 117, 24, 0.25);
}

.stat-pill.stat-pill-accent {
    border-color: rgba(168, 85, 247, 0.35);
}

.stat-pill.stat-pill-accent:hover {
    border-color: var(--purple-magic);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.pill-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.pill-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.pill-count {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-right: 2px;
}

.stat-pill-accent .pill-count {
    color: var(--orange-bright);
    text-shadow: 0 0 12px rgba(255, 117, 24, 0.45);
}

/* Nav Tabs */
.app-nav {
    max-width: 720px;
    margin: 0 auto 20px;
    padding: 0 16px;
}

.nav-tabs-container {
    display: flex;
    gap: 6px;
    background: rgba(18, 9, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 5px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-tabs-container::-webkit-scrollbar {
    display: none;
}

.nav-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-align: center;
}

.nav-tab-btn:hover {
    color: #fff;
    background: rgba(255, 117, 24, 0.1);
}

.nav-tab-btn.active {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #d95a09 100%);
    color: #fff;
    box-shadow: 0 4px 16px var(--orange-glow);
}

.tab-icon {
    font-size: 1rem;
    line-height: 1;
}

.tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Container */
.app-main {
    max-width: 1300px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* Map Section */
.map-view-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    background: #000;
}

.map-controls-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    pointer-events: none;
}

.map-controls-left, .map-controls-right {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-search-wrapper {
    position: relative;
    min-width: 220px;
}

.map-search-input {
    background: rgba(18, 10, 32, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 8px 14px 8px 34px;
    outline: none;
    width: 100%;
    transition: all 0.2s ease;
}

.map-search-input:focus {
    border-color: var(--orange-primary);
    box-shadow: 0 0 10px var(--orange-glow);
}

.map-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.7;
}

.layer-switch-group {
    background: rgba(18, 10, 32, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-full);
    padding: 3px;
    display: flex;
    gap: 4px;
}

.btn-map-layer {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-map-layer.active {
    background: var(--purple-magic);
    color: #fff;
    box-shadow: 0 0 10px var(--purple-glow);
}

.btn-map-action {
    background: rgba(18, 10, 32, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-purple);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-map-action:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
    transform: translateY(-1px);
}

#neighborhood-map {
    width: 100%;
    height: 600px;
    z-index: 1;
}

/* Quick List Drawer under Map */
.map-participants-drawer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 16px 20px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.drawer-title {
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.quick-house-card {
    background: var(--bg-card);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-house-card:hover {
    border-color: var(--orange-primary);
    transform: translateX(3px);
    background: rgba(35, 21, 61, 0.85);
}

.card-lot-badge {
    background: rgba(255, 117, 24, 0.2);
    color: var(--orange-bright);
    border: 1px solid var(--orange-primary);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.card-details {
    flex: 1;
    overflow: hidden;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Forms (Registration & Modification) */
.form-card-container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px 36px;
    position: relative;
}

.form-header {
    text-align: center;
    margin-bottom: 24px;
}

.form-title {
    font-size: 1.8rem;
    color: var(--orange-bright);
    margin-bottom: 8px;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Privacy Notice Banner */
.privacy-banner {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid var(--border-purple);
    border-left: 4px solid var(--purple-magic);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.privacy-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.privacy-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.privacy-text strong {
    color: #fff;
}

/* Organizer Help Banner in Edit Tab */
.organizer-help-banner {
    background: rgba(168, 85, 247, 0.12);
    border: 1px dashed var(--purple-magic);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 0.88rem;
    color: #e9d5ff;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.organizer-help-banner strong {
    color: #fff;
}

/* Form Groups & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

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

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

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-input, .form-textarea {
    background: rgba(12, 6, 20, 0.75);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 14px;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--orange-primary);
    box-shadow: 0 0 12px var(--orange-glow);
    background: rgba(18, 9, 30, 0.9);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.input-hint.hint-valid { color: var(--green-toxic); font-weight: 600; }
.input-hint.hint-error { color: var(--red-blood); font-weight: 600; }

/* Stepper Component for Kids Count */
.stepper-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--purple-magic);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.stepper-btn:hover {
    background: var(--purple-magic);
    box-shadow: 0 0 12px var(--purple-glow);
    transform: scale(1.05);
}

.stepper-input {
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--orange-bright);
}

/* PIN Input Group with Eye Icon */
.pin-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-toggle-pin-view {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding: 4px;
}

.btn-toggle-pin-view:hover {
    color: #fff;
}

/* Custom Checkbox */
.checkbox-card {
    background: rgba(255, 117, 24, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-card:hover {
    border-color: var(--orange-primary);
}

.checkbox-input {
    width: 22px;
    height: 22px;
    accent-color: var(--orange-primary);
    cursor: pointer;
}

.checkbox-label-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.checkbox-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

/* Embedded In-Form Location Picker Box */
.form-picker-wrapper {
    margin-bottom: 22px;
}

.picker-instruction-header {
    background: linear-gradient(90deg, rgba(255, 117, 24, 0.18) 0%, rgba(168, 85, 247, 0.18) 100%);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--orange-bright);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.location-picker-card {
    background: rgba(15, 8, 25, 0.7);
    border: 1px dashed var(--border-purple);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.picker-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#picker-map {
    width: 100%;
    height: 340px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-purple);
    overflow: hidden;
    z-index: 10;
}

.picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* REAL PUMPKIN MARKER WITH NEEDLE POINTER FOR PICKER */
.picker-custom-div-icon {
    background: transparent;
    border: none;
}

.interactive-picker-pin {
    position: relative;
    width: 48px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
    transition: transform 0.15s ease;
    user-select: none;
}

.interactive-picker-pin:active {
    cursor: grabbing;
    transform: scale(1.08) translateY(-4px);
}

.picker-guide-tag {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 5, 18, 0.95);
    border: 1px solid var(--orange-primary);
    color: var(--orange-bright);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.picker-pumpkin-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid var(--orange-primary);
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 14px var(--orange-glow), inset 0 0 8px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 2;
}

.picker-pumpkin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Needle pointer extending underneath */
.picker-pointer-needle {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 18px solid var(--orange-primary);
    margin-top: -3px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* Sharp white/gold center core in the needle to make the touchpoint ultra clear */
.picker-pointer-needle::after {
    content: '';
    position: absolute;
    top: -18px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 14px solid #fff;
}

/* Pinpoint target dot right at the needle tip */
.picker-target-point {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border: 1.5px solid var(--orange-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px #fff, 0 0 10px var(--orange-primary);
    z-index: 3;
}

/* Pulse ring around the needle tip */
.picker-beacon {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 117, 24, 0.4);
    animation: beaconPulse 2s infinite ease-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes beaconPulse {
    0% { transform: translateX(-50%) scale(0.6); opacity: 0.9; }
    100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

/* Bottom Share Section */
.bottom-share-section {
    max-width: 1200px;
    margin: 32px auto 8px;
    padding: 0 20px;
}

.bottom-share-card {
    background: linear-gradient(135deg, rgba(35, 21, 61, 0.92) 0%, rgba(20, 11, 36, 0.95) 100%);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.share-card-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 260px;
}

.share-card-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px var(--orange-glow));
}

.share-card-text .share-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--orange-bright);
    margin-bottom: 4px;
}

.share-card-text .share-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.btn-share-card {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #d95a09 100%);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 16px var(--orange-glow);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-share-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(255, 117, 24, 0.6);
    filter: brightness(1.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #d95a09 100%);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 20px var(--orange-glow);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 117, 24, 0.6);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(168, 85, 247, 0.2);
    color: #fff;
    border: 1px solid var(--purple-magic);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 15px var(--purple-glow);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success.confirmed {
    background: #059669;
    border: 1px solid #34d399;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #ef4444;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-outline-primary {
    background: rgba(255, 117, 24, 0.15);
    color: var(--orange-bright);
    border-color: var(--orange-primary);
}

.btn-outline-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--gold-candy);
    border-color: var(--gold-candy);
}

.btn-outline-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: var(--red-blood);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 2, 10, 0.88);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(168, 85, 247, 0.2);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 28px 32px;
}

.modal-content.modal-content-sm {
    max-width: 480px;
}

.modal-content.modal-content-admin-edit {
    max-width: 580px;
}

#admin-picker-map {
    height: 220px;
    width: 100%;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
}

.modal-title {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.btn-close-modal:hover {
    color: #fff;
}

/* Admin Table */
.admin-table-container {
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: rgba(30, 16, 52, 0.95);
    color: var(--text-secondary);
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-purple);
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tr:hover {
    background: rgba(255, 117, 24, 0.05);
}

.badge-kids {
    background: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.spooky-toast {
    background: rgba(20, 10, 35, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-active);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px var(--orange-glow);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.spooky-toast.toast-show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-color: var(--green-toxic); }
.toast-warning { border-color: var(--gold-candy); }
.toast-error { border-color: var(--red-blood); }

/* LEAFLET CUSTOMIZATIONS */
.custom-leaflet-pumpkin-icon {
    background: transparent !important;
    border: none !important;
}

.pumpkin-marker-wrapper {
    position: relative;
    width: 48px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pumpkin-marker-wrapper:hover {
    transform: scale(1.15) translateY(-4px);
}

.marker-pulse {
    position: absolute;
    width: 36px;
    height: 36px;
    top: 6px;
    border-radius: 50%;
    background: rgba(255, 117, 24, 0.4);
    animation: markerPulse 2.5s infinite;
    z-index: 1;
}

@keyframes markerPulse {
    0% { transform: scale(0.8); opacity: 0.9; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

.marker-pin-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker-pumpkin-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ff7518;
    box-shadow: 0 0 12px var(--orange-glow);
    object-fit: cover;
    background: #000;
}

.marker-lot-badge {
    position: absolute;
    bottom: -6px;
    background: #110722;
    color: #ffaa5a;
    border: 1px solid #ff7518;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.marker-kids-tag {
    position: absolute;
    top: -6px;
    right: -4px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    border: 1px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

/* Draggable Location Picker Pin */
.interactive-picker-pin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
}

.pin-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7518 0%, #d95a09 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 20px var(--orange-glow), 0 4px 10px rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 2;
    animation: bouncePin 1.5s infinite alternate ease-in-out;
}

.interactive-picker-pin.confirmed .pin-icon-box {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.7);
    animation: none;
}

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

.pin-guide-tag {
    position: absolute;
    bottom: -24px;
    background: #0f071d;
    color: #fff;
    border: 1px solid var(--orange-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
    pointer-events: none;
}

.pin-guide-tag.confirmed-tag {
    border-color: #22c55e;
    color: #86efac;
}

/* Spooky Leaflet Popups */
.leaflet-popup-content-wrapper {
    background: rgba(18, 9, 32, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-active) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--orange-glow) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.5 !important;
}

.leaflet-popup-tip {
    background: rgba(18, 9, 32, 0.95) !important;
    border-top: 1px solid var(--border-active) !important;
    border-left: 1px solid var(--border-active) !important;
}

.spooky-popup-card {
    padding: 16px 18px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.popup-lot-badge {
    background: rgba(255, 117, 24, 0.2);
    color: var(--orange-bright);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--orange-primary);
}

.popup-candy-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.popup-house-name {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-weight: 700;
}

.popup-kids-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(168, 85, 247, 0.1);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.popup-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.popup-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(8, 4, 15, 0.95);
    padding: 24px 16px 36px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.footer-admin-row {
    margin-top: 6px;
}

.btn-footer-admin {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    opacity: 0.65;
    padding: 4px 8px;
    border-radius: 4px;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.btn-footer-admin:hover {
    opacity: 1;
    color: var(--orange-bright);
}

/* Zero scrollbars on mobile viewports */
@media (max-width: 768px) {
    /* Hide scrollbars across the whole document and sub-containers */
    html, body, .app-nav, .nav-tabs-container, .stats-bar, .header-content-wrapper,
    .quick-houses-grid, .map-view-container, .form-card-container, div, section, main {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* Header & Hero adjustments */
    .header-hero {
        height: 125px;
    }

    .header-content-wrapper {
        margin-top: -46px;
        padding: 0 14px 12px;
        gap: 12px;
        justify-content: center;
    }

    .brand-section {
        gap: 12px;
        width: 100%;
        justify-content: flex-start;
    }

    .brand-logo-img {
        width: 64px;
        height: 64px;
        border-width: 2.5px;
    }

    .brand-text h1 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .brand-subtitle {
        font-size: 0.78rem;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 4px;
    }

    .location-badge, .date-badge {
        padding: 2px 8px;
        font-size: 0.74rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .header-actions .btn-secondary {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: var(--radius-full);
    }

    /* Stats bar on mobile */
    .stats-bar {
        gap: 8px;
        margin: 10px auto 14px;
        padding: 0 12px;
    }

    .stat-pill {
        padding: 6px 14px;
        font-size: 0.86rem;
        gap: 7px;
    }

    .pill-icon {
        font-size: 1.1rem;
    }

    .pill-count {
        font-size: 1.05rem;
    }

    /* Navigation tabs on mobile */
    .app-nav {
        padding: 0 12px;
        margin-bottom: 16px;
    }

    .nav-tabs-container {
        padding: 4px;
        gap: 4px;
        border-radius: 14px;
    }

    .nav-tab-btn {
        padding: 8px 6px;
        font-size: 0.8rem;
        border-radius: 10px;
        gap: 4px;
    }

    /* Main Container */
    .app-main {
        padding: 0 12px;
        margin-bottom: 24px;
    }

    /* Forms */
    .form-card-container {
        padding: 20px 14px;
        border-radius: 16px;
    }

    .form-header {
        margin-bottom: 16px;
    }

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

    .form-subtitle {
        font-size: 0.85rem;
    }

    .privacy-banner {
        padding: 12px 14px;
        margin-bottom: 18px;
        font-size: 0.82rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 18px;
    }

    .form-input, .form-textarea {
        padding: 11px 12px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .stepper-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .btn-primary {
        width: 100%;
        padding: 13px 20px;
        font-size: 1rem;
        border-radius: 12px;
    }

    /* In-form Map Picker on mobile */
    .location-picker-card {
        padding: 12px;
        gap: 10px;
    }

    .picker-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #btn-picker-gps {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .layer-switch-group {
        width: 100%;
        display: flex;
    }

    .layer-switch-group .btn-map-layer {
        flex: 1;
        text-align: center;
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    #picker-map {
        height: 240px;
        border-radius: 12px;
    }

    .picker-status-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 12px;
    }

    #btn-confirm-location {
        width: 100%;
        padding: 11px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    /* Map Tab on mobile */
    #neighborhood-map {
        height: 460px;
        border-radius: 14px;
    }

    .map-controls-overlay {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(14, 7, 24, 0.95);
        padding: 10px;
        border-radius: 14px 14px 0 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .map-controls-left, .map-controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .map-search-wrapper {
        width: 100%;
        min-width: 0;
    }

    .btn-map-action {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
}

/* Extra small mobile screen optimizations (< 520px) */
@media (max-width: 520px) {
    .tab-label-full {
        display: none;
    }

    .brand-section {
        flex-direction: row;
        align-items: center;
    }

    .brand-text h1 {
        font-size: 1.25rem;
    }

    .stat-pill {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

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

/* ==========================================================================
   SITE AUTHENTICATION GATE (VISITOR LOCK SCREEN)
   ========================================================================== */
.auth-gate-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(circle at 50% 30%, rgba(35, 21, 61, 0.98) 0%, rgba(10, 5, 18, 0.99) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

/* Zero flash: if client already has cookie or localStorage, hide gate instantly */
.site-authenticated #site-auth-gate {
    display: none !important;
}

.auth-gate-backdrop.auth-gate-unlocking {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.auth-gate-card {
    background: linear-gradient(145deg, rgba(26, 16, 46, 0.95) 0%, rgba(15, 8, 28, 0.98) 100%);
    border: 1.5px solid var(--border-active);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 35px var(--orange-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    text-align: center;
    position: relative;
    animation: gateCardPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gateCardPop {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-gate-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--orange-primary);
    box-shadow: 0 0 20px var(--orange-glow);
    margin: 0 auto 12px;
    display: block;
    object-fit: cover;
}

.auth-gate-title {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 6px;
}

.auth-gate-badge {
    display: inline-block;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--border-purple);
    color: #e9d5ff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.auth-gate-intro {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 22px;
}

.auth-gate-footer {
    margin-top: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

