/* theme.css — BUDU professional redesign (2026-11-11)
   Loaded last. Turns the app into a quiet, business-first interface:
     • one typeface (Instrument Sans), smaller headings, 8–10px corners, hairline borders, no drop shadows
     • white cards on a cool grey canvas, one blue accent (tokens are set in ui.css; the old
       --violet / --sun names now hold the blue values so every older rule follows)
     • desktop: a top bar with search instead of the left sidebar, content on a centred 1128px column
     • Home feed with a "you" column on the left and jobs / people on the right
     • business member cards, and a profile header with a plain cover band
   Nothing here changes behaviour; removing this file brings the previous layout back. */

:root {
    --canvas: #f3f5f7;
    --topbar: 56px;
    --page: 1128px;
    --band: #dfe7f3;                 /* cover band behind avatars */
    --ok: #0b7a5b;
}

/* ── Type ──────────────────────────────────────────────────────────── */
body { font-family: var(--f-ui); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-ui); letter-spacing: -.01em; }
.view { background: var(--canvas); }

/* ── View headers: a plain white bar ───────────────────────────────── */
.view-header { background: var(--card); border-bottom: 1px solid var(--line); box-shadow: none; }
.view-header h2 { font: 700 20px/1.2 var(--f-ui); letter-spacing: -.015em; }
.header-stats { font-size: 13px; color: var(--muted); }
.view-search input { border-radius: 8px; background: var(--canvas); border-color: transparent; height: 42px; }
.view-search input:focus { background: #fff; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-50); }

/* ── Controls ──────────────────────────────────────────────────────── */
.btn, .ac-btn, .header-invite-btn, .nav-invite, .cg-input, .pro-act, .pro-own-row .btn, .pro-cta-row .btn,
.pro-detail > .btn-block, .pro-own .btn-block, .wk-follow, .pf-actions .btn, .pe-save .btn { border-radius: 8px; }
.btn-primary, .ac-btn-ink { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: none; }
.btn-primary:hover, .ac-btn-ink:hover { background: var(--violet-600); }
.ac-btn-sun { background: var(--violet-50); color: var(--violet); }
.ac-btn-soft { background: var(--violet-50); color: var(--violet); }
.btn-secondary { background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: none; }
.btn-secondary:hover { border-color: var(--ink-2); }
.ac-tabs { border-radius: 8px; padding: 3px; background: var(--canvas); border: 0; }
.ac-tabs button { border-radius: 6px; font-weight: 600; }
.ac-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(22,32,44,.06); }
.ac-dist, .pp-chip, .wk-chip { border-radius: 8px; }
.wk-chip b { border-radius: 4px; }

/* ── Cards everywhere: 10px corners, hairline, flat ────────────────── */
.wk-card, .ac-side-card, .ac-row, .ac-post, .ac-online, .ac-inline, .ac-mcard, .feed-compose-bar, .pro-app, .pro-rec, .wk-people,
.wk-stat, .wk-sg, .pro-own, .pro-note, .group-card, .gp-card, .conv-item, .profile-card, .profile-section, .pf-complete,
.pf-quick button, .pf-open-i, .ac-empty, .req-card, .al-row, .pe-group, .pf-mode, .pro-apply-me, .ac-wkc {
    border-radius: 10px; box-shadow: none;
}
.wk-card:hover { box-shadow: none; border-color: var(--line-2); }
.wk-logo { border-radius: 8px; }
.wk-logo.lg { border-radius: 10px; }
.wk-tag, .pp-skills span { border-radius: 4px; }
.pro-item-ic, .ac-wkc-ic { border-radius: 8px; }
.wk-card h3, .wk-person-main b, .wk-sg b, .pro-head h2, .wk-stat b, .ac-side-card h3 { font-family: var(--f-ui); }
.wk-card h3 { font-size: 15.5px; font-weight: 700; }
.pro-head h2 { font-size: 22px; }
.report-modal-card { border-radius: 12px; }

/* ── People: Business | Social switch ──────────────────────────────── */
.view-search .pp-mode {
    position: absolute; right: 4px; top: 4px; height: 34px; display: inline-flex; padding: 2px; gap: 2px;
    background: var(--card); border: 1px solid var(--line); border-radius: 7px;
}
.pp-mode button {
    display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 5px; background: none;
    font: 600 12.5px var(--f-ui); color: var(--muted); cursor: pointer;
}
.pp-mode button i { position: static; transform: none; font-size: 12px; color: inherit; }
.pp-mode button.on { background: var(--ink); color: #fff; }
.pp-mode button:focus-visible { outline: 3px solid var(--violet-100); outline-offset: 1px; }
#viewNearby .view-search input { padding-right: 190px; }

/* ── People: business cards ────────────────────────────────────────── */
body.biz #nearbyList { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
#nearbyList > .pc-card { grid-column: auto; }
.pc-card > * { flex-shrink: 0; }
body.biz #nearbyList { grid-auto-rows: max-content; }
.pc-card { height: auto; min-height: 248px; box-sizing: border-box; }
.member-card.pc-card { margin: 0; box-shadow: none; transform: none; }
.pc-card {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
    padding: 0 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    font: inherit; color: var(--ink); cursor: pointer; min-width: 0;
}
.pc-card:hover { border-color: var(--line-2); }
.pc-card:focus-visible { outline: 3px solid var(--violet-100); outline-offset: 2px; }
.pc-band { align-self: stretch; height: 46px; margin: 0 -12px; background: var(--band); }
.pc-av {
    position: relative; width: 76px; height: 76px; margin-top: -40px; border-radius: 50%; border: 3px solid var(--card);
    background: hsl(var(--h, 215) 34% 86%); display: grid; place-items: center; flex: 0 0 auto;
}
.pc-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pc-av > span:first-child { font: 700 28px var(--f-ui); color: hsl(var(--h, 215) 38% 34%); }
.pc-live { position: absolute; right: 2px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--live); border: 3px solid var(--card); }
.pc-name { margin-top: 6px; font: 700 15.5px/1.25 var(--f-ui); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-new { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--violet-50); color: var(--violet); font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.pc-head { font-size: 13px; line-height: 1.35; color: var(--ink-2); min-height: 35px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-where { font-size: 12px; color: var(--muted); display: inline-flex; gap: 5px; align-items: baseline; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-where i { font-size: 10px; color: var(--violet); }
.pc-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; max-height: 24px; overflow: hidden; }
.pc-skills span { padding: 2px 7px; border-radius: 4px; background: var(--canvas); font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pc-open { font-size: 11.5px; color: var(--ok); font-weight: 600; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cta {
    margin-top: auto; align-self: stretch; height: 34px; display: grid; place-items: center; border-radius: 8px;
    border: 1px solid var(--violet); color: var(--violet); font: 700 13px var(--f-ui);
}
.pc-card > .pc-cta { margin-top: auto; }
.pc-card > :nth-last-child(2) { margin-bottom: 12px; }
.pc-card:hover .pc-cta { background: var(--violet-50); }

/* ── Profile header: cover band, round photo, dark text ────────────── */
.profile-card.pf-hero {
    background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 0 18px 18px;
}
.pf-hero .pf-bg { inset: 0 0 auto 0; height: 92px; filter: none; transform: none; background: var(--band) !important; z-index: 0; }
.pf-hero::after { display: none; }
.pf-hero .pf-top { position: relative; z-index: 1; padding-top: 36px; min-height: 0; align-items: flex-end; }
.pf-hero .profile-avatar { width: 112px; height: 112px; border-radius: 50%; border: 4px solid var(--card); box-shadow: none; background: var(--canvas); }
.pf-hero .pf-online { border-color: var(--card); right: 6px; bottom: 8px; }
.pf-hero .pf-cam { right: 0; bottom: 0; background: var(--card); color: var(--ink-2); border: 1px solid var(--line-2); box-shadow: none; }
.pf-hero .pf-status { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; margin-bottom: 6px; font-weight: 500; }
.pf-hero .pf-status::before { display: none; }
.pf-hero .pf-status-empty { background: var(--card); color: var(--muted); border: 1px dashed var(--line-2); }
.pf-hero .pf-id { position: relative; z-index: 1; }
.pf-hero .pf-name { font: 700 24px/1.2 var(--f-ui); color: var(--ink); margin-top: 12px; text-shadow: none; }
.pf-hero .pf-age { color: var(--muted); opacity: 1; font-size: 20px; font-weight: 500; }
.pf-hero .pf-headline { color: var(--ink); font-size: 15.5px; font-weight: 500; margin-top: 4px; }
.pf-hero .pf-work, .pf-hero .pf-where, .pf-hero .pf-pronouns, .pf-hero .pf-seen { color: var(--muted); opacity: 1; font-weight: 500; font-size: 14px; }
.pf-hero .pf-headline + .pf-work { opacity: 1; }
.pf-hero .pf-work i, .pf-hero .pf-where i { color: var(--faint); opacity: 1; }
.pf-hero .pf-seen { background: none; padding: 0; margin-top: 6px; }
.pf-hero .pf-seen.on { color: var(--ok); }
.pf-hero .pf-verified { color: var(--violet); }
.pf-gear { background: var(--card) !important; color: var(--ink-2) !important; border: 1px solid var(--line-2) !important; box-shadow: none !important; }
.pf-sec h3, .pro-sec h3 { font: 700 17px/1.3 var(--f-ui); }
.pf-chip, .pro-skill { border-radius: 6px; }
.pf-open-i { background: var(--card); border: 1px solid var(--line); }
.pf-open-i i, .pf-open-i .pf-open-ic { border-radius: 6px; }
.pf-complete { background: var(--card); border: 1px solid var(--line); }

/* ── Home feed ─────────────────────────────────────────────────────── */
.ac-left { display: none; }
.ac-row, .ac-post, .feed-compose-bar, .ac-online, .ac-side-card { border: 1px solid var(--line); background: var(--card); }
.ac-side-card h3 { font-size: 15px; font-weight: 700; }
.ac-side-invite { background: var(--card) !important; color: var(--ink) !important; }
.ac-side-invite h3 { color: var(--ink) !important; }
.ac-side-invite p { color: var(--muted) !important; }
.ac-me { padding: 0 0 4px !important; overflow: hidden; gap: 0 !important; }
.ac-me-band { display: block; height: 54px; background: var(--band); }
.ac-me-top { display: grid; justify-items: center; gap: 2px; padding: 0 14px 14px; border: 0; background: none; cursor: pointer; font: inherit; text-align: center; width: 100%; }
.ac-me-top img { width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--card); margin-top: -34px; object-fit: cover; background: var(--canvas); }
.ac-me-top b { font-size: 16px; color: var(--ink); margin-top: 6px; }
.ac-me-top span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ac-me-top em { font-style: normal; font-size: 12px; color: var(--faint); }
.ac-me-links { border-top: 1px solid var(--line); padding: 6px 0; display: grid; }
.ac-me-links button, .ac-me-nav button {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border: 0; background: none; cursor: pointer;
    font: 600 13px var(--f-ui); color: var(--muted); text-align: left; width: 100%;
}
.ac-me-links button b { color: var(--violet); }
.ac-me-links button i { font-size: 10px; color: var(--faint); }
.ac-me-links button:hover, .ac-me-nav button:hover { background: var(--canvas); color: var(--ink); }
.ac-me-nav { padding: 6px 0 !important; gap: 0 !important; }
.ac-me-nav button { justify-content: flex-start; color: var(--ink-2); padding: 9px 14px; }
.ac-me-nav button i { width: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.ac-side-jobs { display: grid; gap: 2px; }
.ac-side-job { display: grid; gap: 1px; padding: 8px; margin: 0 -8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; }
.ac-side-job:hover { background: var(--canvas); }
.ac-side-job b { font-size: 14px; color: var(--ink); }
.ac-side-job span { font-size: 12.5px; color: var(--muted); }
@media (min-width: 1200px) {
    #feedList > .ac-layout { max-width: var(--page); }
    .ac-layout { grid-template-columns: 225px minmax(0, 1fr) 300px; gap: 24px; }
    .ac-left { display: grid; gap: 10px; position: sticky; top: 4px; }
    .ac-side { gap: 10px; }
    .ac-main { gap: 10px; }
}

/* ── Phones: bottom bar ────────────────────────────────────────────── */
.bottom-nav { background: var(--card); border-top: 1px solid var(--line); box-shadow: none; }
.nav-item { color: var(--muted); }
.nav-item.active, .nav-bell.active, .nav-msgs.active { color: var(--ink); }
.nav-item.active .nav-icon-wrap { background: none !important; }
.nav-search { display: none; }
@media (max-width: 1023px) {
    .bottom-nav .nav-item.active::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; margin-left: -14px; height: 2px; background: var(--ink); border-radius: 0 0 2px 2px; }
    .bottom-nav .nav-item { position: relative; }
}
@media (max-width: 420px) {
    .pp-mode button span { display: none; }
    .pp-mode button { padding: 0 9px; }
    #viewNearby .view-search input { padding-right: 84px; }
    body.biz #nearbyList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Desktop: top bar, centred page ────────────────────────────────── */
@media (min-width: 1024px) {
    :root { --sidebar: 0px; }
    .bottom-nav {
        top: 0; bottom: auto; left: 0; right: 0; width: auto; height: var(--topbar);
        flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 0;
        padding: 0 max(24px, calc((100vw - var(--page)) / 2)); border-right: 0; border-bottom: 1px solid var(--line); z-index: 3000;
    }
    .nav-brand { padding: 0; margin-right: 16px; align-self: center; }
    .nav-brand span { font: 700 22px/1 var(--f-ui); letter-spacing: .01em; color: var(--violet); }   /* the name is the logo */
    .nav-search { display: flex; align-items: center; position: relative; align-self: center; margin-right: auto; width: min(300px, 24vw); }
    .nav-search i { position: absolute; left: 12px; font-size: 13px; color: var(--muted); pointer-events: none; }
    .nav-search input {
        width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 6px; border: 1px solid transparent; background: var(--canvas);
        font: 500 14px var(--f-ui); color: var(--ink);
    }
    .nav-search input:focus { outline: none; background: #fff; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-50); }
    .nav-item {
        flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 3px; width: 82px; height: auto; padding: 0;
        border-radius: 0; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
    }
    .nav-item:hover { background: none; color: var(--ink); }
    .nav-item .nav-label { font-size: 12px; font-weight: 500; }
    .nav-item i { font-size: 19px; }
    .nav-item.active, .nav-bell.active, .nav-msgs.active { background: none; color: var(--ink); border-bottom-color: var(--ink); }
    .nav-item[data-view="profile"] { order: 0; margin-top: 0; border-left: 1px solid var(--line); margin-left: 6px; padding-left: 6px; width: 88px; }
    .nav-foot { display: none; }
    .msgs-badge, .bell-badge { top: -5px !important; right: -8px !important; }

    .view, .app-main .view { left: 0; top: var(--topbar); }
    #viewMap { left: 0; top: var(--topbar); }
    .view-header { padding: 16px max(24px, calc((100vw - var(--page)) / 2)) 12px; }
    .view-header h2 { font-size: 20px; }
    #feedList, #groupsList, #wkList, #nearbyList, #profileContent { padding-left: max(24px, calc((100vw - var(--page)) / 2)); padding-right: max(24px, calc((100vw - var(--page)) / 2)); }
    #feedList { padding-top: 20px; }
    #profileContent > .pf { max-width: 800px; margin: 0 auto; }
    body.biz #nearbyList { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
    .detail-panel, .detail-panel.with-nav { top: var(--topbar); }
    .detail-scrim { inset: var(--topbar) 0 0 0; background: rgba(22,32,44,.32); }
    .chat-panel { top: var(--topbar); }
    .dm { left: 0; }
    .toast { left: 50%; }
    .wk-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
    .wk-stats, .wk-people { max-width: none; }
}

/* ── Messages ──────────────────────────────────────────────────────── */
.dm-ih h2 { font: 700 20px/1.2 var(--f-ui); letter-spacing: -.015em; }
@media (min-width: 1024px) { .dm { top: var(--topbar); } }

/* ── Feed: new members, smaller photos ─────────────────────────────── */
.ac-mcard .ac-photo, .ac-mcard > .ac-photo img { max-height: 132px; }
.ac-row-head h3, .ac-online h3, .ac-new h3 { font-family: var(--f-ui); }

/* ── Signed-out landing ────────────────────────────────────────────── */
.guest { background: var(--canvas); }
.guest h1 { font: 700 34px/1.12 var(--f-ui); letter-spacing: -.025em; color: var(--ink); max-width: 16ch; }
.guest-lede { color: var(--ink-2); max-width: 52ch; }
.guest-brand span { font: 700 26px/1 var(--f-ui); letter-spacing: .01em; color: var(--violet); }
.guest-stats dd { font: 700 26px/1 var(--f-ui); color: var(--ink); letter-spacing: -.02em; }
.guest-points a, .guest-links a, .guest-places a { color: var(--violet); text-decoration: none; }
.guest-points a:hover, .guest-links a:hover { text-decoration: underline; }
.guest-points li i { border-radius: 8px; }
.auth-card { border-radius: 12px; box-shadow: none; border: 1px solid var(--line); }
.auth-card input { border-radius: 8px; }
.auth-title { font: 700 20px/1.2 var(--f-ui); }
@media (min-width: 1024px) {
    .guest h1 { font-size: 46px; }
    .guest-stats dd { font-size: 30px; }
    .guest-points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
}
