/* ==========================================================================
   Social Layout - Layout 3 colunas estilo rede social
   ========================================================================== */

/* --- Topbar --- */
.social-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ds-bg-secondary);
    border-bottom: 1px solid var(--ds-border);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 var(--ds-space-4);
}

.social-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: var(--ds-space-4);
}

.social-topbar__logo {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    text-decoration: none;
    flex-shrink: 0;
}

.social-topbar__logo img {
    height: 32px;
    width: 32px;
}

.social-topbar__logo span {
    font-size: var(--ds-font-size-lg);
    font-weight: 800;
    color: var(--ds-text-primary);
    letter-spacing: -0.5px;
}

.social-topbar__search {
    flex: 1;
    max-width: 400px;
}

.social-topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
}

.social-topbar__action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ds-radius-full);
    color: var(--ds-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--ds-transition);
    text-decoration: none;
}

.social-topbar__action:hover {
    background: var(--ds-bg-hover);
    color: var(--ds-text-primary);
}

.social-topbar__action .ds-notification-count {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
}

.social-topbar__user {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    padding: 4px;
    padding-right: var(--ds-space-3);
    border-radius: var(--ds-radius-full);
    cursor: pointer;
    transition: background var(--ds-transition);
    text-decoration: none;
    color: var(--ds-text-primary);
}

.social-topbar__user:hover {
    background: var(--ds-bg-hover);
    color: var(--ds-text-primary);
}

.social-topbar__user img {
    width: 32px;
    height: 32px;
    border-radius: var(--ds-radius-full);
    object-fit: cover;
}

.social-topbar__user span {
    font-size: var(--ds-font-size-sm);
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Mobile menu toggle --- */
.social-topbar__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ds-radius-md);
    color: var(--ds-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
}

/* --- Layout Container 3 colunas --- */
.social-layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
}

/* --- Sidebar Esquerda --- */
.social-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: var(--ds-space-4) var(--ds-space-3);
    border-right: 1px solid var(--ds-border);
    scrollbar-width: thin;
}

.social-sidebar::-webkit-scrollbar {
    width: 4px;
}

/* --- Conteúdo Central --- */
.social-main {
    flex: 1;
    min-width: 0;
    max-width: 680px;
    border-right: 1px solid var(--ds-border);
    padding: var(--ds-space-4);
}

/* --- Sidebar Direita --- */
.social-aside {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: var(--ds-space-4) var(--ds-space-3);
    scrollbar-width: thin;
}

.social-aside::-webkit-scrollbar {
    width: 4px;
}

/* --- Sidebar Components --- */
.sidebar-mini-profile {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3);
    border-radius: var(--ds-radius-lg);
    margin-bottom: var(--ds-space-4);
    transition: background var(--ds-transition);
    text-decoration: none;
    color: var(--ds-text-primary);
}

.sidebar-mini-profile:hover {
    background: var(--ds-bg-hover);
    color: var(--ds-text-primary);
}

.sidebar-mini-profile__info {
    min-width: 0;
}

.sidebar-mini-profile__name {
    font-weight: 700;
    font-size: var(--ds-font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-mini-profile__role {
    font-size: var(--ds-font-size-xs);
    color: var(--ds-text-secondary);
}

/* --- Navegação da sidebar --- */
.sidebar-nav-section {
    margin-bottom: var(--ds-space-6);
}

.sidebar-nav-title {
    font-size: var(--ds-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ds-text-tertiary);
    padding: 0 var(--ds-space-3);
    margin-bottom: var(--ds-space-2);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    padding: var(--ds-space-2) var(--ds-space-3);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-text-secondary);
    font-size: var(--ds-font-size-sm);
    font-weight: 500;
    transition: all var(--ds-transition);
    text-decoration: none;
    position: relative;
}

.sidebar-nav-item:hover {
    background: var(--ds-bg-hover);
    color: var(--ds-text-primary);
}

.sidebar-nav-item.active {
    background: var(--ds-primary-light);
    color: var(--ds-primary);
    font-weight: 700;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav-item .ds-notification-count {
    margin-left: auto;
}

/* Botão CTA na sidebar */
.sidebar-cta {
    margin-top: var(--ds-space-4);
    padding: 0 var(--ds-space-3);
}

.sidebar-cta .ds-btn {
    width: 100%;
}

/* --- Aside Widgets --- */
.aside-widget {
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    padding: var(--ds-space-4);
    margin-bottom: var(--ds-space-4);
}

.aside-widget-title {
    font-size: var(--ds-font-size-base);
    font-weight: 700;
    margin-bottom: var(--ds-space-3);
}

.aside-widget-item {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    padding: var(--ds-space-2) 0;
    border-bottom: 1px solid var(--ds-border);
}

.aside-widget-item:last-child {
    border-bottom: none;
}

/* --- Footer override (esconder no layout social) --- */
.social-layout ~ .footer {
    display: none;
}

/* --- Mobile overlay --- */
.social-sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

/* Tablet: esconder sidebar direita */
@media (max-width: 1100px) {
    .social-aside {
        display: none;
    }

    .social-main {
        max-width: none;
    }
}

/* Mobile: sidebar vira drawer */
@media (max-width: 768px) {
    .social-topbar__menu-toggle {
        display: flex;
    }

    .social-topbar__search {
        display: none;
    }

    .social-topbar__user span {
        display: none;
    }

    .social-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 999;
        background: var(--ds-bg-secondary);
        transform: translateX(-100%);
        transition: transform var(--ds-transition-slow);
        border-right: 1px solid var(--ds-border);
    }

    .social-sidebar.open {
        transform: translateX(0);
    }

    .social-sidebar-overlay.open {
        display: block;
    }

    .social-main {
        max-width: none;
        border-right: none;
        padding: var(--ds-space-3);
    }

    .social-layout {
        flex-direction: column;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .social-topbar__logo span {
        display: none;
    }

    .social-main {
        padding: var(--ds-space-2);
    }
}

/* ==========================================================================
   Page header padrão para conteúdo central
   ========================================================================== */
.page-header {
    padding-bottom: var(--ds-space-4);
    margin-bottom: var(--ds-space-4);
    border-bottom: 1px solid var(--ds-border);
}

.page-header h1 {
    font-size: var(--ds-font-size-xl);
    margin-bottom: var(--ds-space-1);
}

.page-header p {
    color: var(--ds-text-secondary);
    margin-bottom: 0;
}
