/* ============================================================
   components/sidebar-produtor.css
   Sidebar do portal do produtor
   cafedireto.com.br
   Direto do produtor pra sua mesa
   ============================================================ */

.produtor-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    background:
        linear-gradient(180deg, var(--color-primary-dark), var(--color-bg-darker));
    color: var(--color-white);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

/* Cabeçalho fixo dentro da sidebar */
.produtor-sidebar-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.produtor-sidebar-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-coffee));
    color: var(--color-gold-soft);
    font-size: 0.85rem;
    font-weight: 900;
}

.produtor-sidebar-header strong,
.produtor-sidebar-header span {
    display: block;
}

.produtor-sidebar-header strong {
    font-size: 0.95rem;
    line-height: 1.15;
}

.produtor-sidebar-header span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    line-height: 1.2;
}

/* Card do produtor fixo abaixo do header */
.produtor-profile-card {
    flex: 0 0 auto;
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.produtor-profile-card span,
.produtor-profile-card strong,
.produtor-profile-card small {
    display: block;
}

.produtor-profile-card span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.produtor-profile-card strong {
    margin-top: 3px;
    color: var(--color-white);
    font-size: 0.92rem;
    line-height: 1.2;
}

.produtor-profile-card small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    line-height: 1.2;
}

.produtor-profile-card em {
    margin-top: 9px;
    font-style: normal;
}

/* Apenas o menu rola */
.produtor-menu {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 5px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

.produtor-menu::-webkit-scrollbar {
    width: 6px;
}

.produtor-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.produtor-menu::-webkit-scrollbar-track {
    background: transparent;
}

.produtor-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: 0.16s ease;
    position: relative;
    z-index: 1;
}

.produtor-menu a:hover,
.produtor-menu a.active {
    background: rgba(255, 255, 255, 0.11);
    color: var(--color-white);
}

.produtor-menu .menu-icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.75rem;
    font-weight: 900;
}

.produtor-menu-divider {
    height: 1px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.14);
}

.produtor-menu-label {
    margin: 7px 4px 3px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.produtor-menu-label.active {
    color: var(--color-gold-soft);
}

/* Footer fixo no final da sidebar */
.produtor-sidebar-footer {
    flex: 0 0 auto;
    display: grid;
    gap: 7px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.produtor-sidebar-footer a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    line-height: 1.25;
    text-decoration: none;
}

.produtor-sidebar-footer a:hover {
    color: var(--color-gold-soft);
}

.produtor-sidebar-footer .logout-link {
    color: #ffd4d4;
    font-weight: 800;
}

/* Responsivo */
@media (max-width: 960px) {
    .produtor-sidebar {
        position: relative;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .produtor-menu {
        grid-template-columns: repeat(2, 1fr);
        overflow: visible;
        max-height: none;
        padding-right: 0;
    }

    .produtor-sidebar-footer {
        margin-top: 0;
    }
}

@media (max-width: 700px) {
    .produtor-sidebar {
        padding: 16px;
    }

    .produtor-menu {
        grid-template-columns: 1fr;
    }
}