/* =============================================================================
   Atlas Pins — shared app styles (user-facing web pages) · CHARCOAL theme
   Charcoal canvas does ~90% of the work; white text ~8%; magenta + a cyan
   secondary accent used sparingly (~2%). Glow is reserved for primary actions
   (main button, active nav, avatar ring). Mobile-first; column capped for web.
   ========================================================================== */

:root {
    /* Accents — used sparingly */
    --magenta: #E879F9;
    --magenta-deep: #C026D3;
    --magenta-soft: rgba(232, 121, 249, 0.12);
    --grad: linear-gradient(135deg, #E879F9 0%, #C026D3 100%);

    --cyan: #52D8FF;                       /* secondary accent (liveness/status) */
    --cyan-soft: rgba(82, 216, 255, 0.12);
    --cyan-line: rgba(82, 216, 255, 0.30);
    --green: #34D399;                     /* organizer / organized-event accent */
    --green-soft: rgba(52, 211, 153, 0.12);
    --green-line: rgba(52, 211, 153, 0.34);

    /* Charcoal canvas (~90%) */
    --bg: #0F1015;
    --bg-2: #131319;
    --surface: #16161D;
    --surface-2: #1C1D26;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --line-mag: rgba(232, 121, 249, 0.24);

    /* Text (~8% white) */
    --ink: #F4F5F7;
    --muted: #A2A3AD;
    --muted-2: #6C6D78;

    --good: #34D399;
    --radius: 18px;
    --glow: 0 12px 34px -12px rgba(192, 38, 211, 0.55);   /* primary actions only */
    --shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.9);        /* soft, flat depth */
    --nav-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--magenta); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Fixed full-viewport backdrop layer (ATLAS.backdrop injects #atlas-bg). Sits
   behind all content and never scrolls, so there's no seam/tear on scroll. */
#atlas-bg { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; background-repeat: no-repeat; }

/* App column ---------------------------------------------------------------- */
.app {
    max-width: 480px; margin: 0 auto; min-height: 100%;
    /* Transparent so the fixed #atlas-bg backdrop shows through. */
    background: transparent;
    padding-bottom: calc(var(--nav-h) + 24px);
    position: relative;
}
.pad { padding: 0 18px; }

/* Top bar (generic appbar; used by non-profile pages) ----------------------- */
.appbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: rgba(15, 16, 21, 0.72);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.appbar .title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; flex: 1; }
.appbar .brandmark { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; flex: 1; }
.appbar .brandmark b { color: var(--magenta); }
.appbar .appbar-logo { width: 26px; height: 26px; flex: 0 0 auto; background-color: var(--magenta); }
.iconbtn {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); cursor: pointer; font-size: 17px;
}
.iconbtn:active { transform: scale(0.94); }

/* Recolorable monochrome icons — transparent glyphs used as a mask and filled
   with currentColor (or an explicit color), so they tint to the theme. */
.micon {
    display: inline-block; background-color: currentColor;
    -webkit-mask-image: var(--i); mask-image: var(--i);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
}
.iconbtn .micon { width: 20px; height: 20px; }
.bottom-nav a .nav-i { width: 25px; height: 25px; }
.brand-logo { width: 28px; height: 28px; vertical-align: middle; margin-left: 8px; }

/* Cover control buttons — for icons that are ALREADY finished button discs
   (settings/logout): show them as-is, don't tint. */
.cover-btn { width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cover-btn:active { transform: scale(0.93); }
.cover-btn img { width: 100%; height: 100%; display: block; }

/* Buttons — the primary button keeps the glow; ghost/others stay flat -------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px 20px; font: inherit; font-size: 16px; font-weight: 700;
    border: none; border-radius: 14px; cursor: pointer;
    background: var(--grad); color: #fff; box-shadow: var(--glow);
    transition: transform 0.06s ease, filter 0.15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
    background: transparent; color: var(--ink);
    border: 1.5px solid var(--line-strong); box-shadow: none;
}
.btn.ghost:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.btn + .btn { margin-top: 10px; }
.btn.slim { width: auto; padding: 9px 16px; font-size: 14px; border-radius: 11px; }

/* Inputs -------------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.input {
    width: 100%; padding: 14px 15px; font: inherit; font-size: 16px;
    border: 1.5px solid var(--line); border-radius: 13px; outline: none;
    background: var(--surface); color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-soft); }
.input::placeholder { color: var(--muted-2); }

/* Profile cover banner ------------------------------------------------------ */
.cover { position: relative; width: 100%; height: 260px; overflow: hidden; background: var(--surface-2); }
.cover > img { width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }
.cover .scrim {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 28%),
        linear-gradient(to bottom, rgba(15, 16, 21, 0) 55%, var(--bg) 100%);
}
.cover .topbar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2;
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
}
.cover .topbar .brandmark { flex: 1; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }
.cover .topbar .brandmark b { color: #fff; }
.cover .topbar .iconbtn {
    background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* Profile header — brand centered top + logo right, tall cover, then a large
   avatar overlapping the banner (LEFT) with controls on the RIGHT, and
   left-justified user data below. */
.topnav { display: flex; align-items: center; padding: 16px 18px 10px; }
.topnav .tn-side { flex: 1; display: flex; align-items: center; }
.topnav .tn-logo { justify-content: flex-end; align-items: center; gap: 15px; color: var(--magenta); }
.tn-bell { position: relative; display: inline-flex; align-items: center; -webkit-tap-highlight-color: transparent; }
.tn-bell .bell-ic { width: 24px; height: 24px; display: inline-block; background-color: var(--cyan); }
.tn-bell .bell-badge { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; line-height: 15px; padding: 0 4px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: 10.5px; font-weight: 800; text-align: center; border: 2px solid var(--bg); }
.topnav .tn-brand { flex: 0 0 auto; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; text-align: center; }
.topnav .tn-brand b { color: var(--magenta); }
.topnav .brand-logo { width: 26px; height: 26px; margin: 0; }

.prow { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px; margin-top: -70px; position: relative; z-index: 3; }
.prow .avatar-ring { margin: 0; width: 140px; height: 140px; }
.prow .avatar-ring .ph { font-size: 52px; }
.prow .avatar-ring .badge { width: 38px; height: 38px; font-size: 16px; right: 6px; bottom: 6px; }
.prow-actions { display: flex; gap: 10px; padding-bottom: 8px; }
.pbtn { width: 42px; height: 42px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pbtn:active { transform: scale(0.93); }
.pbtn img { width: 100%; height: 100%; display: block; filter: invert(1); }  /* white on the dark bg */

.pinfo { text-align: left; padding-top: 20px; }
.pinfo h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.pinfo .handle { color: var(--magenta); font-weight: 600; font-size: 15px; margin-top: 2px; }
.pinfo .bio { color: var(--muted); font-size: 15px; margin-top: 12px; line-height: 1.5; }
.pinfo .bio .bio-add { color: var(--muted-2); font-weight: 600; }
.pinfo .city { color: var(--muted-2); font-size: 13px; margin-top: 8px; }
.city-pin, .venue-pin { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; background-color: var(--magenta); }

/* Profile hero (legacy centered variant; kept for other pages) -------------- */
.hero { padding: 8px 18px 4px; text-align: center; }
.hero.overlap { margin-top: -60px; position: relative; z-index: 3; }
.avatar-ring {
    width: 116px; height: 116px; border-radius: 50%;
    margin: 4px auto 14px; padding: 4px; position: relative;
    background: var(--grad); box-shadow: var(--glow);   /* active avatar ring keeps its glow */
}
.avatar-ring > img, .avatar-ring .ph {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--magenta); font-size: 42px; font-weight: 800;
    border: 3px solid var(--bg);
}
.avatar-ring .badge {
    position: absolute; right: 4px; bottom: 4px;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--grad); border: 3px solid var(--bg);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);   /* neutral — disc is tinted per-designation via JS */
}
.avatar-ring .badge .badge-ic { width: 19px; height: 19px; }
.prow .avatar-ring .badge .badge-ic { width: 22px; height: 22px; }
.hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.hero .handle { color: var(--magenta); font-weight: 600; font-size: 15px; margin-top: 1px; }
.vibe-chip {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
    padding: 6px 13px; border-radius: 99px; font-size: 13px; font-weight: 700;
    background: var(--cyan-soft); color: var(--cyan); border: 1px solid var(--cyan-line);
}
.hero .bio { color: var(--muted); font-size: 15px; margin: 12px auto 0; max-width: 330px; }
.hero .city { color: var(--muted-2); font-size: 13px; margin-top: 6px; }

/* Stats — icon + white number + label; flat card, tri-color icons ---------- */
.stats {
    display: flex; margin: 24px 0 6px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { flex: 1; text-align: center; padding: 16px 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .stat-ic { display: inline-block; width: 26px; height: 26px; margin-bottom: 8px; background-color: var(--magenta); }
.stat .stat-ic.cyan { background-color: var(--cyan); }
.stat .stat-ic.plain { background-color: var(--muted); }
.stat .num { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.stat .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Section header ------------------------------------------------------------ */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.section-head a { font-size: 14px; font-weight: 700; }

/* Featured (next-up) card — flat, image-forward ---------------------------- */
.featured {
    position: relative; display: block; border-radius: var(--radius);
    overflow: hidden; min-height: 220px; color: #fff;
    border: 1px solid var(--line); box-shadow: var(--shadow);
    background: var(--surface-2);
}
.featured > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured .fbg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 15% 0%, rgba(232, 121, 249, 0.16), rgba(28, 29, 38, 0) 62%), var(--surface-2); }
.featured .fscrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.82) 26%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.32) 100%); }
.featured .ribbon {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 6px 11px; border-radius: 99px; border: 1px solid var(--cyan-line);
}
.featured .fbody { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.featured .fdate { font-size: 13px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.95; }
.featured .ftitle { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; margin: 3px 0 5px; }
.featured .fvenue { font-size: 14px; opacity: 0.92; }
.featured .fmeta { margin-top: 11px; font-size: 13px; opacity: 0.92; display: flex; align-items: center; gap: 9px; }
.featured .fmeta .pill { background: rgba(255, 255, 255, 0.18); padding: 4px 11px; border-radius: 99px; font-weight: 700; }

/* CTA card (empty state) — friendly, flat; only the button inside glows ----- */
.cta {
    text-align: center; border-radius: var(--radius); padding: 32px 24px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta .emoji { font-size: 40px; }
.cta .cta-logo { display: block; width: 56px; height: 56px; margin: 0 auto 12px; background-color: var(--magenta); opacity: 0.95; }
.cta .t { font-size: 20px; font-weight: 800; margin: 8px 0 6px; }
.cta .s { color: var(--muted); font-size: 14px; margin: 0 auto 22px; max-width: 300px; }

/* Pin cards ----------------------------------------------------------------- */
.pin-card {
    display: block; background: var(--surface); color: inherit;
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
    transition: transform 0.08s ease, border-color 0.15s ease;
}
.pin-card:active { transform: scale(0.99); }
.pin-card:hover { border-color: var(--line-strong); }
.pin-card .thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(120% 120% at 25% 15%, rgba(232, 121, 249, 0.13), rgba(28, 29, 38, 0) 60%), var(--surface-2); }
.pin-card .thumb > img { width: 100%; height: 100%; object-fit: cover; }
.pin-card .thumb .ph-pin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--magenta); opacity: 0.85; }
.pin-card .thumb .ph-pin .micon { width: 46px; height: 46px; }
.pin-card .datebadge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #fff; font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18);
    text-transform: uppercase; letter-spacing: 0.02em;
}
.pin-card .body { padding: 13px 15px 15px; }
.pin-card .ttl { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 5px; }
.pin-card .venue { font-size: 14px; color: var(--muted); }
.pin-card .meta { display: flex; align-items: center; gap: 10px; margin-top: 11px; font-size: 13px; color: var(--muted); }
.pin-card .rsvp-pill { margin-left: auto; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 99px; background: var(--cyan-soft); color: var(--cyan); border: 1px solid var(--cyan-line); }
/* Organized-event (Organizer paid tier) pins render green instead of magenta. */
.pin-card.organized { border-color: var(--green-line); }
.pin-card.organized .thumb { background: radial-gradient(120% 120% at 25% 15%, rgba(52, 211, 153, 0.14), rgba(28, 29, 38, 0) 60%), var(--surface-2); }
.pin-card.organized .thumb .ph-pin { color: var(--green); }
.pin-card .org-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: var(--green); }

/* Been-to strip ------------------------------------------------------------- */
.strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.strip::-webkit-scrollbar { display: none; }
.strip .mini { flex: 0 0 138px; border-radius: 15px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: inherit; }
.strip .mini .thumb { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: radial-gradient(120% 120% at 25% 15%, rgba(232, 121, 249, 0.13), rgba(28, 29, 38, 0) 60%), var(--surface-2); }
.strip .mini .thumb > img { width: 100%; height: 100%; object-fit: cover; }
.strip .mini .thumb .ph-pin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--magenta); opacity: 0.85; }
.strip .mini .thumb .ph-pin .micon { width: 34px; height: 34px; }
.strip .mini .check { position: absolute; right: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--cyan); color: #06283a; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.strip .mini .cap { padding: 9px 10px; }
.strip .mini .cap .t { font-size: 13px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.strip .mini .cap .d { font-size: 11px; color: var(--muted-2); margin-top: 3px; }

/* Connections avatar strip -------------------------------------------------- */
.avatar-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.avatar-strip::-webkit-scrollbar { display: none; }
.fav { flex: 0 0 auto; width: 60px; text-align: center; color: inherit; }
.fav-av { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); }
.fav-av img { width: 100%; height: 100%; object-fit: cover; }
.fav-av .fi { font-size: 20px; font-weight: 800; color: var(--magenta); }
.fav-nm { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* States -------------------------------------------------------------------- */
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 10px; }
.msg { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(239, 68, 68, 0.14); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.3); }
.msg.ok { background: rgba(52, 211, 153, 0.14); color: #6EE7B7; border: 1px solid rgba(52, 211, 153, 0.3); }

/* Invite picker (ATLAS.invitePicker) — search connections/groups + @username -- */
.ipk-q { margin-bottom: 8px; }
.ipk-results { display: flex; flex-direction: column; gap: 6px; }
.ipk-row { display: flex; flex-direction: row; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.03); color: var(--ink); font: inherit; cursor: pointer; }
.ipk-row:hover { border-color: var(--line-strong); }
.ipk-av { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); }
.ipk-av img { width: 100%; height: 100%; object-fit: cover; }
.ipk-av .ipk-ini { font-size: 15px; font-weight: 800; color: var(--magenta); }
.ipk-rt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ipk-row .ipk-rl { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipk-row .ipk-rs { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipk-row.ipk-lookup { color: var(--cyan); font-weight: 700; }
.ipk-head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); margin: 12px 2px 2px; }
.ipk-head:first-child { margin-top: 2px; }
.ipk-none { font-size: 13px; color: var(--muted-2); padding: 8px 2px; }
.ipk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ipk-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 8px 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 700; background: var(--magenta-soft); color: var(--ink); border: 1px solid var(--line); }
.ipk-chip .ipk-gtag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cyan); }
.ipk-chip button { width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.ipk-chip button:hover { background: rgba(255, 255, 255, 0.16); color: var(--ink); }

/* Bottom nav — active tab (magenta) + drop button keep their emphasis ------- */
.bottom-nav {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 100%; max-width: 480px; height: var(--nav-h);
    background: rgba(18, 19, 25, 0.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-around; padding: 0 8px; z-index: 30;
}
.bottom-nav a { position: relative; flex: 1; text-align: center; color: var(--muted-2); font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; }
.bottom-nav .nav-badge { position: absolute; top: 3px; left: 50%; margin-left: 3px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: 10px; font-weight: 800; text-align: center; box-shadow: 0 0 0 2px rgba(18, 19, 25, 0.92); }
.bottom-nav a .ic { font-size: 21px; line-height: 1; }
.bottom-nav a.active { color: var(--magenta); }
.bottom-nav a.drop { flex: 0 0 auto; }
.bottom-nav a.drop .ic {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    margin-top: -20px; box-shadow: var(--glow);
}

/* Map markers — the Atlas pin logo instead of Leaflet's default teardrop. Shared
   by map.php and pin.php (both use L.divIcon with className 'atlas-marker'). The
   white halo + drop-shadow keep the magenta pin legible on any map background. */
.leaflet-div-icon.atlas-marker { background: transparent; border: none; }
.atlas-marker .am-pin {
    display: block; width: 34px; height: 34px;
    background-color: #F65CFF;   /* brighter magenta for the marker */
    -webkit-mask: url(/assets/icons/atlaspins_logo.svg) center / contain no-repeat;
    mask: url(/assets/icons/atlaspins_logo.svg) center / contain no-repeat;
    filter:
        drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 7px rgba(246, 92, 255, 0.95))
        drop-shadow(0 0 15px rgba(246, 92, 255, 0.6))
        drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.atlas-marker.organized .am-pin {
    background-color: #38FBA6;   /* brighter green for organized events */
    filter:
        drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 7px rgba(56, 251, 166, 0.95))
        drop-shadow(0 0 15px rgba(56, 251, 166, 0.65))
        drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
/* Dark black-and-white map — grayscale + invert the (reliable, keyless) OSM
   tiles: dark land, light roads/labels. Only the tile images are affected;
   markers and controls (other Leaflet panes) keep their colors, so the magenta
   pins are the only color on the map. */
.leaflet-tile { filter: grayscale(1) invert(1) contrast(0.9) brightness(1.05); }

/* Centered auth page -------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 22px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand img { width: 66px; height: 66px; margin: 0 auto 12px; filter: drop-shadow(0 6px 20px rgba(192, 38, 211, 0.5)); }
.auth-brand .n { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.auth-brand .n b { color: var(--magenta); }
.auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
