/* ------------
   Nuvilo Health
   Body font  : Hanken Grotesk 
   Logo font  : Chillax
   Primary    : #C36A4A  (terracotta)
   Forest     : #2C5F4A  (deep green — healthcare complement)
   Background : #FFFFFF → #F5F5DC gradient
   Radius     : 12px buttons / 16px cards
   ------------ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=chillax@200,300,400,500,600,700&display=swap');
/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* Brand */
    --primary:          #C36A4A;
    --primary-dark:     #A85538;
    --primary-light:    #FDF0EA;
    --primary-glow:     rgba(195,106,74,0.15);

    --forest:           #2C5F4A;
    --forest-light:     #EAF3EE;

    --success:          #2C5F4A;
    --success-light:    #EAF3EE;
    --danger:           #C0392B;
    --danger-light:     #FDECEA;
    --warning:          #B7791F;
    --warning-light:    #FEFCE8;

    /* Neutral text */
    --text-primary:     #1C2B3A;
    --text-secondary:   #5A6475;
    --text-muted:       #9AA3AE;
    --text-on-primary:  #FFFFFF;

    /* Backgrounds */
    --bg-app:           #FAFAF6;
    --bg-gradient:      linear-gradient(160deg, #FFFFFF 0%, #F5F5DC 100%);
    --bg-card:          #FFFFFF;
    --bg-input:         #F4F4EE;
    --bg-overlay:       rgba(195,106,74,0.06);

    /* Borders */
    --border:           #E8E8DC;
    --border-focus:     #C36A4A;

    /* Shape */
    --radius-xs:    4px;
    --radius-sm:    8px;
    --radius-md:    12px;     /* buttons */
    --radius-lg:    16px;     /* cards */
    --radius-xl:    24px;     /* modals */
    --radius-pill:  999px;    /* avatars only */

    /* Elevation */
    --shadow-xs:  0 1px 3px rgba(28,43,58,0.06);
    --shadow-sm:  0 2px 10px rgba(28,43,58,0.08);
    --shadow-md:  0 6px 24px rgba(28,43,58,0.10);
    --shadow-lg:  0 12px 48px rgba(28,43,58,0.14);
    --shadow-fab: 0 8px 28px rgba(195,106,74,0.40);

    /* Layout */
    --nav-height:  68px;
    --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
    --spring:      0.35s cubic-bezier(0.34,1.56,0.64,1);
}

/* Dark mode */
body.dark-mode {
    --bg-app:           #161410;
    --bg-card:          #201E1B;
    --bg-input:         #2A2724;
    --bg-overlay:       rgba(195,106,74,0.12);
    --border:           #332F2B;
    --text-primary:     #F0EDE8;
    --text-secondary:   #A8A09A;
    --text-muted:       #66605A;
    --primary-light:    #3A2218;
    --forest-light:     #182E25;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0; padding: 0;
    -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; overflow: hidden; }

body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fraunces used only for wordmark */
.wordmark {
    font-family: 'Chillax', sans-serif;
    font-optical-sizing: auto;
}

#app { position: relative; width: 100%; height: 100%; overflow: hidden; }

.screen {
    position: absolute; inset: 0;
    display: none; flex-direction: column;
    background: var(--bg-app);
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.screen.active { display: flex; }
.screen.overlay-screen { z-index: 200; }


/* ----- SPLASH SCREEN ----- */
#splash-screen {
    background: linear-gradient(170deg, #FFFFFF 0%, #F5F5DC 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 20px;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: splashReveal 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes splashReveal {
    from { opacity: 0; transform: translateY(24px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Icon mark — clean healthcare cross on terracotta */
.splash-icon-mark {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    animation: iconPulse 2.8s ease-in-out infinite 0.8s;
}


.splash-icon-mark svg {
    width: 48px;
    height: 48px;
}

/* Wordmark */
.splash-wordmark {
    font-family: 'Chillax', sans-serif;
    font-optical-sizing: auto;
    font-size: 45px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1;
}

/* Thin loader line at bottom */
.splash-loader {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 2px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.splash-loader-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 99px;
    animation: loaderFill 1.8s ease forwards 0.4s;
}

@keyframes loaderFill {
    from { width: 0%; }
    to   { width: 100%; }
}


/* ---- GET STARTED SCREEN --- */
#get-started-screen {
    background: linear-gradient(170deg, #FFFFFF 0%, #F5F5DC 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 72px 0 52px;
    overflow: hidden;
}

/* Entrance animation — children stagger in */
.gs-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 32px;
    animation: gsStagger 0.6s ease both;
}

.gs-icon-mark {
    width: 75px;
    height: 75px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gs-icon-mark svg { width: 40px; height: 40px; }

.gs-wordmark {
    font-family: 'Chillax', sans-serif;
    font-optical-sizing: auto;
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1.2px;
    line-height: 1;
}

.gs-tagline {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    max-width: 260px;
    line-height: 1.55;
}

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

/* -- Scrolling image strip -- */
.gs-strip-wrap {
    width: 100%;
    overflow: hidden;
    padding: 30px 0; /* Extra padding so rotated corners don't get clipped */
    animation: gsStagger 0.6s ease 0.15s both;
}

.gs-strip {
    display: flex;
    gap: 16px; 
    animation: stripScroll 52s linear infinite;
    width: max-content;
    align-items: center; 
}

/* Pause scroll on touch */
.gs-strip-wrap:active .gs-strip { animation-play-state: paused; }

@keyframes stripScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.gs-card-img {
    width: 120px;
    height: 150px;
    border-radius: 20px; 
    background: var(--bg-card);
    border: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* Slightly softer shadow like the screenshot */
    position: relative;
    
    /* Default rotation */
    transform: rotate(-5deg); 
}

/* Alternate rotation for a more "scattered" look */
.gs-card-img:nth-child(even) {
    transform: rotate(5deg);
    margin-top: 10px;
}

.gs-card-img:nth-child(odd) {
    margin-top: -10px; /* Offsets the other way */
}

/* Ensure the image fills the rotated card perfectly */
.gs-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Bottom buttons ── */
.gs-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 24px;
    width: 100%;
    animation: gsStagger 0.6s ease 0.28s both;
}

.gs-actions .btn-text-link {
    background: none;
    border: none;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    padding: 4px;
}

.gs-actions .btn-text-link span {
    color: var(--primary);
    font-weight: 600;
}


/* BUTTONS  */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 22px;
    border-radius: var(--radius-md);   /* 12px */
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform var(--spring), box-shadow var(--transition), opacity var(--transition), background var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 18px rgba(195,106,74,0.38);
}
.btn-primary:hover  { background: var(--primary-dark); }
.btn-primary:active { box-shadow: 0 2px 8px rgba(195,106,74,0.25); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-forest {
    background: var(--forest);
    color: #FFFFFF;
    box-shadow: 0 4px 18px rgba(44,95,74,0.28);
}

.btn-danger {
    background: var(--danger);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(192,57,43,0.30);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 14px;
    padding: 10px 16px;
}

.btn-full  { width: 100%; }
.btn.loading { opacity: 0.65; pointer-events: none; }

.btn-social {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}


/* ------------
   AUTH DIVIDER
   ------------ */
.auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 4px 0;
}
.auth-divider span {
    font-size: 12px; color: var(--text-muted); white-space: nowrap;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}


/* ------------
   HOME SCREEN HEADER
   ------------ */
#home-screen { padding-bottom: var(--nav-height); }

.home-header {
    background: var(--primary);
    padding: 52px 20px 18px;
    position: relative;
    border-radius: 0 0 35px 35px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
}

/* Subtle warm texture */
.home-header::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.08);
    border-radius: 50% !important;
    pointer-events: none;
}

.home-header-top {
    display: flex; align-items: center; gap: 12px;
    position: relative; z-index: 2;
}

.header-avatar {
    width: 44px; height: 44px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.22);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    color: #FFFFFF;
    overflow: hidden; cursor: pointer; flex-shrink: 0;
    transition: transform var(--spring);
}
.header-avatar:active { transform: scale(0.92); }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

.header-greeting { flex: 1; min-width: 0; }
.header-greeting h2 { font-size: 16px; font-weight: 700; color: #FFFFFF; letter-spacing: -0.2px; }
.header-greeting p {
    font-size: 12px; color: rgba(255,255,255,0.65);
    display: flex; align-items: center; gap: 3px; margin-top: 2px;
}
.header-greeting p svg { width: 11px; height: 11px; }

.header-notif-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative; flex-shrink: 0;
    transition: background var(--transition);
}
.header-notif-btn:active { background: rgba(255,255,255,0.24); }
.header-notif-btn svg { width: 20px; height: 20px; color: #FFFFFF; }

.notif-dot {
    position: absolute; top: 9px; right: 9px;
    width: 7px; height: 7px; background: #F5C2B0;
    border-radius: 50%; border: 1.5px solid var(--primary);
}

.home-search-row {
    display: flex; gap: 10px;
    margin-top: 14px; position: relative; z-index: 2;
}

.home-search-pill {
    flex: 1;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; transition: background var(--transition);
}
.home-search-pill:active { background: rgba(255,255,255,0.24); }
.home-search-pill svg { width: 16px; height: 16px; color: rgba(255,255,255,0.65); flex-shrink: 0; }
.home-search-pill span { font-size: 13px; color: rgba(255,255,255,0.60); font-weight: 500; }

.home-filter-btn {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
    transition: background var(--transition);
}
.home-filter-btn:active { background: rgba(255,255,255,0.26); }
.home-filter-btn svg { width: 20px; height: 20px; color: #FFFFFF; }


/* ------------
   BOTTOM NAVIGATION — centre FAB
   ------------ */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 500;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 16px rgba(28,43,58,0.06);
}

.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    flex: 1; cursor: pointer; padding: 10px 0 6px;
    background: none; border: none;
    transition: transform var(--spring); position: relative;
}
.nav-item:active { transform: scale(0.88); }

.nav-icon-wrap {
    position: relative; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
}

/* Active bar indicator above icon */
.nav-item.active .nav-icon-wrap::before {
    content: '';
    position: absolute; top: -9px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 3px;
    background: var(--primary);
    border-radius: 99px;
}

.nav-item svg { width: 22px; height: 22px; color: var(--text-muted); transition: color var(--transition), transform var(--spring); }
.nav-item span { font-size: 10px; font-weight: 600; color: var(--text-muted); transition: color var(--transition); }
.nav-item.active svg  { color: var(--primary); transform: scale(1.1); }
.nav-item.active span { color: var(--primary); }

/* Centre FAB */
.nav-fab {
    flex: 0 0 64px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; background: none; border: none;
    padding: 0 0 4px; transition: transform var(--spring);
}
.nav-fab:active { transform: scale(0.88); }

.nav-fab-inner {
    width: 50px; height: 50px;
    background: var(--primary);
    border-radius: 150px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-fab);
    border: 3px solid var(--bg-card);
    margin-bottom: 2px;
}
.nav-fab-inner svg { width: 22px; height: 22px; color: #FFFFFF; }
.nav-fab span { font-size: 10px; font-weight: 600; color: var(--primary); }

.nav-badge {
    position: absolute; top: 5px; right: 3px;
    background: var(--danger); color: #FFFFFF;
    font-size: 9px; font-weight: 700;
    width: 15px; height: 15px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--bg-card);
}


/* ------------
   AUTH SCREENS
   ------------ */
.auth-screen-inner {
    flex: 1; display: flex; flex-direction: column;
    padding: 0 24px 40px; overflow-y: auto;
}

.auth-header { padding: 60px 0 26px; display: flex; flex-direction: column; gap: 6px; }
.auth-header h2 { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.auth-header p  { font-size: 14px; color: var(--text-secondary); }

.auth-back-btn {
    position: absolute; top: 52px; left: 20px;
    width: 40px; height: 40px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-xs); z-index: 10;
    transition: background var(--transition);
}
.auth-back-btn:active { background: var(--bg-input); }


/* ------------
   FORM ELEMENTS
   ------------ */
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-wrap { position: relative; }
.input-wrap > svg:first-child {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; z-index: 1;
}
.input-wrap input, .input-wrap select { padding-left: 42px; }

input, select, textarea {
    width: 100%; padding: 13px 15px;
    background: var(--bg-input); border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px; font-weight: 500; color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); font-weight: 400; }
input:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea { resize: none; line-height: 1.6; }

.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 48px; }
.toggle-pw-btn {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    display: flex; align-items: center; padding: 4px; border-radius: 6px;
    transition: color var(--transition);
}
.toggle-pw-btn:active { color: var(--primary); }


/* ------------
   EMERGENCY BANNER
   ------------ */
.emergency-banner {
    margin: 16px 16px 0;
    background: var(--danger);
    border-radius: var(--radius-lg);
    padding: 15px 16px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(192,57,43,0.28);
    transition: transform var(--spring), box-shadow var(--transition);
}
.emergency-banner:active { transform: scale(0.97); }
.emergency-banner-icon {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.18); 
    border-radius: 50px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}
.emergency-banner-text h3 { font-size: 14px; font-weight: 700; color: #FFF; }
.emergency-banner-text p  { font-size: 11px; color: rgba(255,255,255,0.78); margin-top: 1px; }


/* ------------
   SECTION HEADERS
   ------------ */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; margin: 18px 0 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.section-link {
    font-size: 12px; font-weight: 600; color: var(--primary);
    background: none; border: none; cursor: pointer;
    font-family: 'Hanken Grotesk', sans-serif;
}


/* ------------
   CATEGORY CHIPS
   ------------ */
.category-scroll { display: flex; gap: 10px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }

.category-chip {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    flex-shrink: 0; cursor: pointer; transition: transform var(--spring);
}
.category-chip:active { transform: scale(0.92); }

.category-chip-icon {
    width: 58px; height: 58px;
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-xs);
}
.category-chip-icon svg { width: 24px; height: 24px; color: var(--text-secondary); transition: color var(--transition); }

.category-chip.active .category-chip-icon {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(195,106,74,0.32);
}
.category-chip.active .category-chip-icon svg { color: #FFFFFF; }
.category-chip span { font-size: 10px; font-weight: 600; color: var(--text-secondary); text-align: center; max-width: 64px; line-height: 1.3; transition: color var(--transition); }
.category-chip.active span { color: var(--primary); }


/* ------------
   RESOURCE CARDS
   ------------ */
.resource-list { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 16px; }

.resource-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 14px; display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow-xs); border: 1px solid var(--border);
    cursor: pointer; transition: box-shadow var(--transition), transform var(--spring);
}
.resource-card:active { transform: scale(0.98); box-shadow: var(--shadow-md); }

.resource-logo {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    object-fit: cover; background: var(--primary-light); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.resource-info { flex: 1; min-width: 0; }
.resource-info h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-info p  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

.status-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-xs); letter-spacing: 0.2px; }
.status-badge.open   { background: var(--success-light); color: var(--success); }
.status-badge.closed { background: var(--danger-light);  color: var(--danger); }
.distance-text { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.sponsored-tag { font-size: 10px; font-weight: 700; background: var(--warning-light); color: var(--warning); padding: 2px 7px; border-radius: var(--radius-xs); }


/* ------------ MAP SCREEN ------------ */
#map-screen { padding-bottom: var(--nav-height); }
#map-container { flex: 1; position: relative; }
#map { width: 100%; height: 100%; min-height: calc(100vh - var(--nav-height) - 56px); }

.map-search-bar {
    position: absolute; top: 14px; left: 14px; right: 14px; z-index: 10;
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 11px 16px; display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.map-search-bar svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.map-search-bar input { border: none; background: transparent; font-size: 14px; padding: 0; box-shadow: none; flex: 1; }
.map-search-bar input:focus { box-shadow: none; border: none; }

.map-voice-btn {
    background: var(--primary-light); border: none; border-radius: var(--radius-sm);
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: background var(--transition);
}
.map-voice-btn svg { width: 15px; height: 15px; color: var(--primary); }
.map-voice-btn.listening { background: var(--danger); animation: voicePulse 1s ease-in-out infinite; }
.map-voice-btn.listening svg { color: #FFFFFF; }

@keyframes voicePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.5); }
    50%     { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}

.map-radius-control {
    position: absolute; bottom: 24px; left: 14px; right: 14px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 14px 16px; box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.map-radius-control label { font-size: 12px; font-weight: 600; color: var(--text-secondary); display: flex; justify-content: space-between; }
.map-radius-control input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--primary); background: transparent; border: none; padding: 0; box-shadow: none; }


/* ------------
   SEARCH SCREEN
   ------------ */
#search-screen { padding-bottom: var(--nav-height); }

.search-header {
    padding: 56px 20px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.search-header h2 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 14px; letter-spacing: -0.4px; }

.search-input-wrap { position: relative; }
.search-input-wrap > svg:first-child {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; z-index: 1;
}
.search-input-wrap input { padding-left: 44px; padding-right: 80px; border-radius: var(--radius-md); }

.search-input-actions {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; gap: 4px;
}

.search-voice-btn {
    background: var(--primary-light); border: none; border-radius: var(--radius-sm);
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background var(--transition);
}
.search-voice-btn svg { width: 15px; height: 15px; color: var(--primary); }
.search-voice-btn.listening { background: var(--danger); animation: voicePulse 1s ease-in-out infinite; }
.search-voice-btn.listening svg { color: #FFFFFF; }

.search-clear-btn {
    background: var(--text-muted); border: none; border-radius: 50%;
    width: 18px; height: 18px; display: none; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
}
.search-clear-btn svg { width: 9px; height: 9px; color: #FFFFFF; }


/* ------------
   PROFILE SCREEN
   ------------ */
#profile-screen { padding-bottom: var(--nav-height); }

.profile-hero {
    background: var(--primary);
    padding: 58px 24px 76px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: relative; overflow: hidden;
}
.profile-hero::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 200px; height: 200px; background: rgba(255,255,255,0.07); border-radius: 50%;
}

.profile-avatar-wrap { position: relative; }
.profile-avatar {
    width: 88px; height: 88px; border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.22); border: 3px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 800; color: #FFFFFF; overflow: hidden; cursor: pointer;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
    position: absolute; bottom: 0; right: 0; width: 26px; height: 26px;
    background: var(--bg-card); border-radius: var(--radius-pill);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); cursor: pointer;
}
.profile-avatar-edit svg { width: 12px; height: 12px; color: var(--primary); }

.profile-name  { font-size: 20px; font-weight: 800; color: #FFFFFF; letter-spacing: -0.3px; }
.profile-email { font-size: 13px; color: rgba(255,255,255,0.7); }

.profile-body { margin-top: -40px; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 14px; }

.profile-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); border: 1px solid var(--border); }
.profile-section-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.9px; padding: 14px 16px 6px; }

.profile-row {
    display: flex; align-items: center; gap: 12px; padding: 13px 16px;
    border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition);
}
.profile-row:last-child { border-bottom: none; }
.profile-row:active { background: var(--bg-overlay); }

.profile-row-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-row-icon svg { width: 17px; height: 17px; color: var(--primary); }
.profile-row-icon.danger { background: var(--danger-light); }
.profile-row-icon.danger svg { color: var(--danger); }

.profile-row-body { flex: 1; min-width: 0; }
.profile-row-body strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.profile-row-body span   { font-size: 12px; color: var(--text-secondary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-row > svg:last-child { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }


/* ------------
   DETAIL SCREEN
   ------------ */
#detail-screen { padding-bottom: var(--nav-height); position: fixed; z-index: 300; }

.detail-hero { width: 100%; height: 200px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.detail-back, .detail-save {
    position: absolute; top: 48px; width: 40px; height: 40px;
    background: var(--bg-card); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); cursor: pointer; z-index: 10; border: 1px solid var(--border);
}
.detail-back { left: 16px; } .detail-save { right: 16px; }

.detail-body { padding: 18px 18px 32px; display: flex; flex-direction: column; gap: 18px; }
.detail-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.detail-name-row h2 { font-size: 19px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; flex: 1; }

.verified-badge { display: flex; align-items: center; gap: 4px; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm); flex-shrink: 0; }

.detail-action-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.detail-action-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 13px 8px; cursor: pointer; transition: background var(--transition); text-decoration: none; }
.detail-action-btn:active { background: var(--primary-light); border-color: var(--primary); }
.detail-action-btn svg { width: 21px; height: 21px; color: var(--primary); }
.detail-action-btn span { font-size: 11px; font-weight: 600; color: var(--text-secondary); }

.detail-info-block { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.detail-info-row { display: flex; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--border); }
.detail-info-row:last-child { border-bottom: none; }
.detail-info-row svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.detail-info-row-content strong { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.detail-info-row-content span, .detail-info-row-content a { font-size: 14px; color: var(--text-primary); font-weight: 500; text-decoration: none; }
.detail-info-row-content a { color: var(--primary); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { background: var(--bg-input); color: var(--text-secondary); font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }


/* ------------
   SAVED SCREEN
   ------------ */
#saved-screen { padding-bottom: var(--nav-height); }


/* ------------
   SKELETON LOADERS
   ------------ */
.skeleton-item { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border-radius: var(--radius-lg); padding: 14px; border: 1px solid var(--border); }
.skeleton-icon { width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--border); flex-shrink: 0; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 11px; background: var(--border); border-radius: 4px; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-line.short   { width: 60%; } .skeleton-line.shorter { width: 38%; }
.skeleton-btn { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--border); animation: shimmer 1.4s ease-in-out infinite; }

@keyframes shimmer { 0%,100%{opacity:1;} 50%{opacity:0.45;} }


/* ------------
   TOAST
   ------------ */
.toast-container { position: fixed; bottom: calc(var(--nav-height)+16px); left: 16px; right: 16px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }

.toast { background: var(--text-primary); color: #FFFFFF; padding: 13px 16px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease; pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--primary); }

@keyframes toastIn { from{opacity:0;transform:translateY(16px);} to{opacity:1;transform:translateY(0);} }


/* ------------
   SUCCESS OVERLAY
   ------------ */
#success-overlay { position: fixed; inset: 0; background: rgba(28,43,58,0.6); z-index: 9998; display: none; align-items: center; justify-content: center; backdrop-filter: blur(6px); }

.success-card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 38px 30px; text-align: center; max-width: 290px; width: 90%; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: successPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes successPop { from{transform:scale(0.85);opacity:0;} to{transform:scale(1);opacity:1;} }

.success-icon { width: 68px; height: 68px; background: var(--success-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.success-icon svg { width: 34px; height: 34px; color: var(--success); }
.success-card h3 { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.success-card p  { font-size: 14px; color: var(--text-secondary); }


/* ------------
   TOGGLE
   ------------ */
.toggle { position: relative; width: 46px; height: 25px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 99px; cursor: pointer; transition: background var(--transition); border: none; padding: 0; width: 46px; height: 25px; }
.toggle-slider::after { content: ''; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; background: #FFFFFF; border-radius: 50%; transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::after { transform: translateX(21px); }


/* ------------
   INFO SCREENS
   ------------ */
.info-screen-header { padding: 56px 20px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.info-screen-header h2 { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.info-screen-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.info-screen-body h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.info-screen-body p  { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }


/* ------------
   UTILITIES
   ------------ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-secondary); font-size: 13px; }
.mt-4{margin-top:4px;} .mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mb-16{margin-bottom:16px;}
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8{gap:8px;} .gap-12{gap:12px;}
.link-btn { background: none; border: none; color: var(--primary); font-family: 'Hanken Grotesk', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; padding: 0; }
.screen-pad { padding: 20px; } .screen-pad-top { padding: 56px 20px 20px; }
