.badge {
    background: var(--accent-red);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: auto;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.view-toggle {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: 0.2s;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.view-toggle:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.view-toggle.active {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    box-shadow: 0 0 15px rgba(218, 55, 60, 0.6);
}

.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.82rem;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(218, 55, 60, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.tags-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    width: 300px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.tags-dropdown-menu.show {
    display: block;
    animation: toastIn 0.2s ease;
}

.compose-tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.tag-pill.selected {
    background: rgba(218, 55, 60, 0.15);
    border-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 12px rgba(218, 55, 60, 0.3);
}

/* RIGHT SIDEBAR WIDGETS */
.right-sidebar {
    width: 320px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-dark);
    transition: opacity 0.5s;
}

.search-widget {
    position: relative;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    margin-bottom: 20px !important;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 12px;
    height: 44px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-input-wrapper:focus-within {
    border-color: rgba(218, 55, 60, 0.4);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 20px rgba(218, 55, 60, 0.15);
}

.search-input-wrapper i {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: 0.2s;
}

.search-input-wrapper:focus-within i {
    color: var(--accent-red);
    filter: drop-shadow(0 0 5px var(--accent-red));
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    width: 100%;
}

.search-widget {
    position: relative;
    z-index: 100;
    /* Garante que o widget de busca fique acima dos outros widgets */
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 400px;
    background: rgba(12, 12, 12, 0.9);
    backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    z-index: 5000;
    overflow-y: auto;
    display: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: slideInDropdown 0.25s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.search-result-item .res-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item .res-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.search-result-item .res-title {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* TRENDING TAGS WIDGET */
.trending-list {
    display: flex;
    flex-direction: column;
}

.trending-tag-item {
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid transparent;
}

.trending-tag-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(218, 55, 60, 0.2);
    transform: translateX(5px);
}

.trending-tag-item .t-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-ui);
}

.trending-tag-item .t-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-tag-item:hover .t-name {
    color: var(--accent-red);
}

/* CENTRAL DE INTELIGÊNCIA (NOTIFICAÇÕES) */
.notification-trigger {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.notification-trigger:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 15px rgba(218, 55, 60, 0.2);
}

.notification-trigger i {
    font-size: 1.1rem;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
}

/* INTELLIGENCE PANEL (NOTIFICATIONS) */
.notification-panel {
    position: fixed;
    right: 20px;
    top: 70px;
    width: 380px;
    max-height: 80vh;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.notification-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    display: flex;
}

.notif-header {
    background: linear-gradient(90deg, rgba(20, 20, 20, 0.9), rgba(5, 5, 5, 0.9));
    padding: 18px 20px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-red);
    letter-spacing: 2px;
}

.notif-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px 0;
}

.notif-list::-webkit-scrollbar {
    width: 6px;
}

.notif-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.notif-item {
    display: flex;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.notif-item.unread {
    background: rgba(218, 55, 60, 0.05);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

.notif-item img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

.notif-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.notif-text b {
    color: #fff;
    font-weight: 600;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--accent-red);
    display: block;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.notif-empty {
    padding: 50px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* MOBILE NOTIFICATION PANEL */
@media (max-width: 768px) {
    .notification-panel {
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        transform: none !important;
        left: auto !important;
        transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .notification-panel.active {
        right: 0 !important;
    }

    .notif-header {
        padding-top: 60px;
    }
}

/* RANKINGS / PATENTES */
.rank-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.rank-lvl-1 {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.rank-lvl-2 {
    background: rgba(0, 180, 216, 0.1);
    color: #00b4d8;
    border-color: rgba(0, 180, 216, 0.3);
}

.rank-lvl-3 {
    background: rgba(255, 159, 64, 0.1);
    color: #ff9f40;
    border-color: rgba(255, 159, 64, 0.3);
}

.rank-lvl-4 {
    background: rgba(218, 55, 60, 0.1);
    color: var(--accent-red);
    border-color: rgba(218, 55, 60, 0.3);
}

.rank-lvl-5 {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.4);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.2);
}

.xp-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: var(--accent-red);
    box-shadow: 0 0 5px var(--accent-red);
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 14px;
    margin-bottom: 12px;
    transition: border-color 0.25s;
}

.widget:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.widget-friends {
    padding: 0;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 0.62rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    opacity: 0.55;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 8px 6px;
    border-radius: 10px;
    transition: background 0.2s;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.035);
}

.trending-item:hover .t-title {
    color: var(--accent-red);
}

.t-topic {
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.t-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.t-meta {
    font-size: 0.7rem;
    color: rgba(218, 55, 60, 0.7);
    font-family: var(--font-mono);
}

.s-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
    padding: 8px 6px;
    border-radius: 12px;
    transition: background 0.2s;
}

.s-user:hover {
    background: rgba(255, 255, 255, 0.04);
}

.s-user img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    object-fit: cover;
}

.s-user-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.s-user-meta strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f1f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s-user-meta span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.new-user-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    border: 2px solid var(--bg-dark);
    box-shadow: 0 4px 10px rgba(218, 55, 60, 0.4);
    pointer-events: none;
    z-index: 10;
}

.btn-follow {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.footer-links {
    margin-top: auto;
    padding: 20px 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    opacity: 0;
    transition: 0.2s ease;
}

/* LINHA SEGURA: TERMINAL DE CHAT */
/* LINHA SEGURA: TERMINAL DE CHAT */
.chat-terminal {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 350px;
    height: 500px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(218, 55, 60, 0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 5000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(218, 55, 60, 0.15);
    animation: slideUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(218, 55, 60, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(218, 55, 60, 0.08);
}

.chat-header i {
    color: var(--accent-red);
    font-size: 1.1rem;
}

.chat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
    font-size: 1.1rem;
}

.chat-close:hover {
    opacity: 1;
    color: var(--accent-red);
    transform: rotate(90deg);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-system-msg {
    align-self: center;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-msg-bubble {
    max-width: 80%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.msg-them .msg-content {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-radius: 18px 18px 18px 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.msg-me .msg-content {
    background: linear-gradient(135deg, var(--accent-red), #b91c1c);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 12px rgba(218, 55, 60, 0.3);
}

.msg-me {
    align-self: flex-end;
}

.msg-them {
    align-self: flex-start;
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.chat-input-area input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chat-input-area input:focus {
    border-color: var(--accent-red);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

.chat-input-area button {
    background: var(--accent-red);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button:hover {
    transform: scale(1.1);
    background: #b91c1c;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
}

/* SISTEMA DE AMIGOS */
.friend-request-item {
    background: rgba(218, 55, 60, 0.06);
    border: 1px solid rgba(218, 55, 60, 0.2);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-request-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.friend-request-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.friend-request-actions {
    display: flex;
    gap: 8px;
}

.friend-request-actions button {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-accept-friend {
    background: #22c55e;
    color: #fff;
}

.btn-decline-friend {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.friend-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.friend-contact-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.friend-contact-item img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.friend-contact-item .friend-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.friend-contact-item:hover .friend-name {
    color: var(--text-primary);
}

.friend-contact-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.friend-contact-status.online {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.badge-count {
    background: var(--accent-red);
    color: #fff;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-left: 6px;
    box-shadow: 0 0 10px rgba(218, 55, 60, 0.4);
}

/* ============================================================
   MOBILE IMPROVEMENTS — Components
   ============================================================ */
@media (max-width: 768px) {

    /* Chat terminal: bottom sheet no mobile (igual WhatsApp) */
    .chat-terminal {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 85dvh;
        height: 85vh;
        /* fallback */
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Prevent iOS zoom no input do chat */
    .chat-input-area input {
        font-size: 16px;
    }

    /* Handle de arraste no chat */
    .chat-terminal::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 2px;
        margin: 12px auto 0;
        flex-shrink: 0;
    }

    /* Notif panel: padding top para safe area */
    .notif-header {
        padding-top: max(60px, calc(20px + env(safe-area-inset-top)));
    }

    /* Modal box: bottom sheet no mobile */
    .modal-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .modal-overlay {
        align-items: flex-end;
    }

    /* Botões de aceitar/recusar amizade: touch targets maiores */
    .friend-request-actions button {
        min-height: 44px;
        font-size: 0.85rem;
    }

    /* Links na sidebar que viram botões no mobile */
    .nav-item {
        min-height: 44px;
    }

    /* Usuários sugeridos: cards mais compactos */
    .s-user {
        padding: 8px;
        margin-bottom: 8px;
    }

    .s-user img {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}

/* ============================================================
   SAFE AREA: Garantia universal para iPhones com notch
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}