/* =========================================================
   xcax — design system
   O DNA azul + rosa do Orkut, reformulado para hoje.
   ========================================================= */
:root {
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --bg: #f2f5fb;
    --surface: #ffffff;
    --surface-2: #f5f7fc;
    --surface-3: #ebeff8;
    --border: #e3e8f2;
    --border-strong: #cfd8e8;

    --text: #121a2e;
    --text-2: #3f4a63;
    --muted: #6b7690;

    --blue: #3461d9;
    --blue-hover: #2a52bf;
    --blue-soft: #e8eefc;
    --pink: #e8177d;
    --pink-hover: #cc0f6b;
    --pink-soft: #fde8f2;
    --grad: linear-gradient(120deg, #e8177d 0%, #9b3fd8 50%, #3461d9 100%);
    --grad-soft: linear-gradient(135deg, #fbd3e6 0%, #dcd4f7 50%, #cfdcfa 100%);

    --ok: #168a4c;
    --ok-soft: #e3f6ec;
    --error: #c42b3c;
    --error-soft: #fde9ec;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(18, 26, 46, .05);
    --shadow: 0 1px 2px rgba(18, 26, 46, .04), 0 6px 24px rgba(18, 26, 46, .05);
    --shadow-lg: 0 12px 40px rgba(18, 26, 46, .14);
    --ring: 0 0 0 4px rgba(52, 97, 217, .16);

    --topbar-h: 64px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1020;
        --surface: #141a2e;
        --surface-2: #1a2138;
        --surface-3: #222a44;
        --border: #263050;
        --border-strong: #34406a;
        --text: #eef1f8;
        --text-2: #c3cadc;
        --muted: #8b94ad;
        --blue: #5b84f0;
        --blue-hover: #7598f5;
        --blue-soft: #1d2a52;
        --pink: #f2479b;
        --pink-hover: #f76aae;
        --pink-soft: #3a1830;
        --grad-soft: linear-gradient(135deg, #3a1b35 0%, #2b2350 50%, #1b2a55 100%);
        --ok: #4ccb86;
        --ok-soft: #12301f;
        --error: #ff6b7c;
        --error-soft: #3a1520;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
        --ring: 0 0 0 4px rgba(91, 132, 240, .25);
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.icon { flex-shrink: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marca ---------- */
.logo {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -.045em;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-bottom: 2px;
}
.logo:hover { color: transparent; filter: saturate(1.2); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Topo ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.topsearch {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}
.topsearch .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.topsearch input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--surface-3);
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.topsearch input::placeholder { color: var(--muted); }
.topsearch input:focus { outline: none; background: var(--surface); border-color: var(--blue); box-shadow: var(--ring); }

.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav a {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--text-2);
    transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--surface-3); color: var(--text); }
.topnav a.active { color: var(--blue); background: var(--blue-soft); }
.topnav .badge { position: absolute; top: 4px; right: 2px; }
.topnav-me { margin-left: 6px; }
.topnav-me .avatar { width: 36px; height: 36px; }
.topnav-me.active .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Estrutura ---------- */
.page {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.split-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 16px; }
.col-left { position: sticky; top: calc(var(--topbar-h) + 24px); }
.col-right { position: sticky; top: calc(var(--topbar-h) + 24px); }
.col-main { min-width: 0; }
.col-main > .card + .card { margin-top: 16px; }
.narrow, .single-post { max-width: 680px; display: flex; flex-direction: column; gap: 16px; }
.feed { display: flex; flex-direction: column; gap: 16px; }
.feed:empty { display: none; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.card-head h2 { font-size: 18px; }
.card-head > a { font-size: 13px; font-weight: 600; }
.count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.section-title { font-size: 16px; font-weight: 700; margin-top: 8px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .icon { color: var(--pink); }

/* ---------- Coluna esquerda ---------- */
.me-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 18px;
    overflow: hidden;
    color: var(--text);
    text-align: center;
    transition: transform .15s, box-shadow .15s;
}
.me-card:hover { color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.me-cover { align-self: stretch; height: 72px; margin: 0 -16px; background: var(--grad) center / cover; }
.me-card .avatar-lg { margin-top: -40px; box-shadow: 0 0 0 4px var(--surface); }
.me-name { margin-top: 10px; font-weight: 700; font-size: 16px; }
.me-place { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--muted); font-size: 13px; }

.side-menu { display: flex; flex-direction: column; gap: 2px; }
.side-menu a, .side-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--text-2);
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.side-menu a:hover, .side-menu button:hover { background: var(--surface); color: var(--text); }
.side-menu a.active { background: var(--surface); color: var(--pink); box-shadow: var(--shadow-sm); }
.side-menu .badge { margin-left: auto; box-shadow: none; }
.side-menu form { margin: 0; }

/* ---------- Avatares ---------- */
.avatar { display: block; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar-xs { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 84px; height: 84px; }
.avatar-xl { width: 148px; height: 148px; box-shadow: 0 0 0 5px var(--surface), var(--shadow); }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s, color .15s;
}
.btn:hover { color: var(--text); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(52, 97, 217, .28); }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-brand { background: var(--grad); background-size: 140% 100%; color: #fff; box-shadow: 0 4px 16px rgba(232, 23, 125, .28); }
.btn-brand:hover { color: #fff; background-position: 100% 0; }
.btn-soft { background: var(--surface-3); color: var(--text-2); }
.btn-soft:hover { background: var(--border); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-friends { color: var(--ok); background: var(--ok-soft); }
.btn-friends:hover { color: var(--error); background: var(--error-soft); }

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--error); }
.icon-btn-primary { color: var(--blue); }
.icon-btn-primary:hover { background: var(--blue-soft); color: var(--blue); }

.linklike { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.chip:hover { background: var(--surface-3); }
.chip-photo .icon { color: var(--ok); }
.chip-select { padding: 0 6px 0 4px; }
.chip-select select { border: 0; background: transparent; font-weight: 600; font-size: 13px; padding: 0 8px; cursor: pointer; }
.chip-select select:focus { outline: none; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=date],
.form select, .form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    font-size: 15px;
    font-weight: 500;
    transition: border-color .15s, box-shadow .15s;
}
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row > div { display: flex; flex-direction: column; gap: 6px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--text-2); }
.form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pink); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.input-prefix { display: flex; margin-top: 6px; }
.input-prefix span {
    display: grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 600;
}
.input-prefix input { margin-top: 0 !important; border-radius: 0 12px 12px 0 !important; }
.field-error { color: var(--error); font-size: 13px; font-weight: 600; }

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
}
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--error-soft); color: var(--error); }

/* ---------- Composer ---------- */
.composer { padding: 16px 20px; }
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea {
    flex: 1;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 22px;
    background: var(--surface-2);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    transition: box-shadow .15s, background .15s;
}
.composer textarea::placeholder { color: var(--muted); }
.composer textarea:focus { outline: none; background: var(--surface-3); }
.composer-previews { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0 56px; }
.composer-previews:empty { display: none; }
.composer-previews img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.composer-bar { display: flex; gap: 8px; align-items: center; margin: 12px 0 0 56px; }
.composer-bar .btn { margin-left: auto; }

/* ---------- Abas ---------- */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--pink); box-shadow: var(--shadow-sm); }

/* ---------- Posts ---------- */
.post { padding: 18px 20px 14px; }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-meta { flex: 1; min-width: 0; }
.post-author { display: block; color: var(--text); font-weight: 700; }
.post-author:hover { color: var(--text); text-decoration: underline; }
.post-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.post-sub a { color: inherit; }
.post-sub a:hover { text-decoration: underline; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.post-body { margin-top: 12px; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.post-body-lg { font-size: 19px; font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.post-images { display: grid; gap: 4px; margin: 14px -20px 0; overflow: hidden; }
.post-images a { display: block; background: var(--surface-3); }
.post-images img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.post-images a:hover img { opacity: .93; }
.post-images.n-1 img { height: auto; max-height: 620px; object-fit: contain; }
.post-images.n-2, .post-images.n-3, .post-images.n-4 { grid-template-columns: 1fr 1fr; }
.post-images.n-2 a, .post-images.n-3 a, .post-images.n-4 a { aspect-ratio: 1; }
.post-images.n-3 a:first-child { grid-column: 1 / -1; aspect-ratio: 2; }

.post-actions { display: flex; gap: 4px; margin: 12px -8px 0; }
.action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.action:hover { background: var(--surface-3); color: var(--text); }
.action-like:hover { background: var(--pink-soft); color: var(--pink); }
.action-like.active { color: var(--pink); }
.action-like.active .icon { fill: currentColor; animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }

.comments { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.more-comments { margin-bottom: 6px; font-size: 13px; }
.comment { display: flex; gap: 10px; margin: 10px 0; }
.comment > div { min-width: 0; }
.comment-bubble { padding: 8px 14px; border-radius: 18px; background: var(--surface-2); overflow-wrap: anywhere; }
.comment-author { color: var(--text); font-weight: 700; font-size: 13px; }
.comment-author:hover { color: var(--text); text-decoration: underline; }
.comment-text { font-size: 14px; }
.comment-meta { display: flex; gap: 10px; padding: 3px 14px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.comment-meta .linklike { color: var(--muted); font-size: 12px; }
.comment-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.comment-input { flex: 1; display: flex; align-items: center; min-width: 0; padding-right: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.comment-input:focus-within { border-color: var(--blue); box-shadow: var(--ring); background: var(--surface); }
.comment-input input { flex: 1; min-width: 0; height: 38px; padding: 0 16px; border: 0; background: transparent; font-size: 14px; }
.comment-input input:focus { outline: none; }

/* ---------- Pessoas ---------- */
.friend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.friend-grid a { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 600; text-align: center; }
.friend-grid a:hover { color: var(--text); }
.friend-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--surface-3); transition: transform .15s; }
.friend-grid a:hover img { transform: scale(1.04); }
.friend-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-align: center; transition: box-shadow .15s, transform .15s; }
.person:hover { color: var(--text); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.person .avatar { width: 84px; height: 84px; margin-bottom: 6px; }
.person strong { font-size: 14px; }
.person small { font-size: 12px; }

.user-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; flex-wrap: wrap; }
.user-row + .user-row { border-top: 1px solid var(--border); }
.user-row-info { flex: 1; min-width: 110px; }
.user-row-name { display: block; color: var(--text); font-weight: 700; font-size: 14px; }
.user-row-name:hover { color: var(--text); text-decoration: underline; }
.col-right .user-row .friend-actions { width: 100%; padding-left: 56px; }
.friend-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.friend-actions form { margin: 0; }

.fortune { background: var(--grad-soft); border: 0; }
.fortune-label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--pink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fortune p { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.45; }

/* ---------- Perfil ---------- */
.profile-header { padding: 0; overflow: hidden; margin-bottom: 24px; }
.profile-cover { height: 260px; background: var(--grad) center / cover; }
.profile-info { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 0 28px 22px; margin-top: -64px; }
.profile-text { flex: 1; min-width: 220px; padding-bottom: 6px; }
.profile-text h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.profile-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 500; }
.profile-sub span { display: inline-flex; align-items: center; gap: 5px; }
.profile-actions { padding-bottom: 8px; }
.bio { margin-bottom: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts .icon { margin-top: 2px; color: var(--muted); }

.photo-editor { position: relative; margin-bottom: 52px; }
.cover-preview {
    display: block;
    position: relative;
    height: 180px;
    border-radius: var(--radius);
    background: var(--grad) center / cover;
    cursor: pointer;
    overflow: hidden;
}
.avatar-picker { position: absolute !important; left: 24px; bottom: -52px; cursor: pointer; }
.avatar-picker .avatar-xl { width: 116px; height: 116px; }
.photo-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(10, 14, 28, .6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.photo-btn-round { right: 2px; bottom: 6px; width: 36px; padding: 0; justify-content: center; box-shadow: 0 0 0 3px var(--surface); }

/* ---------- Notificações ---------- */
.notif-list { list-style: none; margin: 0 -10px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-list a { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; color: var(--text-2); font-size: 14px; transition: background .15s; }
.notif-list a:hover { background: var(--surface-2); color: var(--text-2); }
.notif-list strong { color: var(--text); }
.notif-list li.unread a { background: var(--blue-soft); }
.notif-avatar { position: relative; flex-shrink: 0; }
.notif-type { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--blue); box-shadow: 0 0 0 2px var(--surface); }
.notif-like { background: var(--pink); }
.notif-comment { background: var(--ok); }
.notif-friend_accept { background: var(--ok); }

/* ---------- Busca ---------- */
.search-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; }
.search-form .icon { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font-size: 16px; }
.search-form input:focus { outline: none; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; }
.back-link:hover { color: var(--text); }

/* ---------- Visitantes ---------- */
.guest { min-height: 100vh; }
.guest-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(600px circle at 10% 10%, rgba(232, 23, 125, .16), transparent 60%),
        radial-gradient(700px circle at 90% 20%, rgba(52, 97, 217, .16), transparent 60%),
        radial-gradient(600px circle at 50% 100%, rgba(155, 63, 216, .12), transparent 60%),
        var(--bg);
}
.guest-wrap { max-width: 1040px; margin: 0 auto; padding: 48px 20px 24px; }
.logo-xl { display: inline-block; font-size: 44px; margin-bottom: 40px; }
.guest-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.welcome h1 { font-size: 46px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.lead { margin-top: 16px; font-size: 18px; color: var(--text-2); max-width: 460px; }
.welcome-list { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.welcome-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); font-size: 14px; }
.welcome-list strong { display: block; color: var(--text); font-size: 15px; }
.welcome-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); color: var(--pink); box-shadow: var(--shadow); flex-shrink: 0; }
.login-box, .register-box { padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.login-box h2, .register-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.register-box { max-width: 580px; margin: 0 auto 16px; }
.register-box h2 { margin-bottom: 4px; }
.register-box > .muted { margin-bottom: 22px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--muted); font-size: 13px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.text-page { max-width: 760px; margin: 0 auto 16px; padding: 32px; }
.text-page h1 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.text-page h2 { font-size: 17px; margin: 24px 0 8px; }
.text-page p, .text-page li { color: var(--text-2); }
.text-page p + p { margin-top: 8px; }
.error-box { max-width: 440px; margin: 0 auto; padding: 44px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error-code { font-size: 80px; font-weight: 800; line-height: 1; letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.footer { padding: 24px 20px 40px; color: var(--muted); font-size: 13px; text-align: center; }
.footer a { color: var(--muted); font-weight: 600; }
.footer a:hover { color: var(--text); }

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 60;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 12px 20px;
    border-radius: 14px;
    background: #121a2e;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.bottomnav, .logout-mobile { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .page { grid-template-columns: 76px minmax(0, 1fr); }
    .me-card { display: none; }
    .side-menu a, .side-menu button { justify-content: center; padding: 12px; font-size: 0; gap: 0; }
    .side-menu .icon { width: 22px; height: 22px; }
    .side-menu .badge { position: absolute; margin: -18px 0 0 18px; font-size: 10px; }
    .side-menu a { position: relative; }
}

@media (max-width: 900px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .col-right { position: static; }
    .col-right .user-row .friend-actions { width: auto; padding-left: 0; }
    .guest-grid { grid-template-columns: 1fr; gap: 32px; }
    .welcome h1 { font-size: 36px; }
}

@media (max-width: 720px) {
    body { font-size: 15px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .guest { padding-bottom: 0; }
    .topbar-inner { gap: 14px; padding: 0 16px; }
    .topnav { display: none; }
    .topsearch { max-width: none; }
    .page { grid-template-columns: minmax(0, 1fr); margin-top: 16px; padding: 0 16px; }
    .col-left { display: none; }
    .card { padding: 16px; border-radius: 14px; }
    .card.profile-header { padding: 0; }
    .tabs .icon { display: none; }
    .post { padding: 16px 16px 12px; }
    .post-images { margin: 12px -16px 0; }
    .composer { padding: 14px 16px; }
    .composer-previews, .composer-bar { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .profile-cover { height: 150px; }
    .profile-info { padding: 0 18px 18px; margin-top: -54px; gap: 12px; }
    .avatar-xl { width: 108px; height: 108px; }
    .profile-text h1 { font-size: 23px; }
    .profile-actions { width: 100%; }
    .tabs a { padding: 0 12px; font-size: 13px; }
    .welcome h1 { font-size: 32px; }
    .lead { font-size: 16px; }
    .logo-xl { margin-bottom: 28px; }
    .login-box, .register-box, .text-page { padding: 22px; }
    .logout-mobile { display: block; margin-top: 16px; }
    .footer { padding-bottom: 24px; }

    .bottomnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--surface) 88%, transparent);
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border-top: 1px solid var(--border);
    }
    .bottomnav a {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 0;
        border-radius: 12px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }
    .bottomnav a.active { color: var(--pink); }
    .bottomnav .avatar { width: 24px; height: 24px; }
    .bottomnav a.active .avatar { box-shadow: 0 0 0 2px var(--pink); }
    .bottomnav .badge { position: absolute; top: 2px; left: calc(50% + 6px); }
}
