/* =========================
   LEFT MENU CONTAINER
========================= */
#left-menu {
    height: 100%;
    width: 100%;
    box-shadow: 4px 0px 15px rgba(27, 94, 48, 0.15);
    overflow: hidden;
    background-color: var(--brand-green-dark);
    font-family: var(--ui-font);
    color: white;
    display: flex;
    flex-direction: column;
}

.left-menu-btns {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    overflow-y: auto; /* Mantido como segurança apenas para telas muito pequenas */
}

/* =========================
   BUTTONS (Formato Pílula Moderno)
========================= */
.btn-left-menu {
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Ícone um pouquinho mais perto do texto */
    width: calc(100% - 2rem);
    margin: 0.15rem 1rem; /* Margem vertical reduzida para caber mais botões */
    border: none !important;
    border-radius: 8px;
    text-align: left;
    
    /* MELHORIA DE CONTRASTE E LEITURA: */
    color: rgba(255, 255, 255, 0.95) !important; /* Branco quase puro */
    font-weight: 500; /* Letra com mais "massa" (Medium) */
    letter-spacing: 0.03em; /* Leve respiro entre as letras */
    
    transition: all 0.2s ease;
    background: transparent;
}

.btn-left-menu:hover {
    color: #ffffff !important; /* Branco 100% no hover */
    background-color: rgba(255, 255, 255, 0.1) !important;
    font-weight: 600; /* Fica Semi-bold */
}

.btn-left-menu.active {
    color: #ffffff !important; /* Branco 100% no ativo */
    background-color: rgba(255, 255, 255, 0.15) !important;
    font-weight: 600; /* Fica Semi-bold */
    box-shadow: inset 4px 0 0 var(--brand-yellow) !important;
}

.btn-left-menu:active, .btn-left-menu:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* =========================
   DIVIDERS (Linhas Separadoras)
========================= */
.menu-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 0.5rem 1.5rem; /* Margem reduzida pela metade para economizar altura */
    flex-shrink: 0;
}

/* =========================
   FOOTER (Versão do Banco)
========================= */
.left-menu-footer {
    margin-top: auto;
    padding: 1rem; /* Preenchimento reduzido */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.db-version {
    font-family: var(--ui-font);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.db-date {
    font-family: var(--ui-font);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

/* =========================
   RESPONSIVIDADE (Ajustes finos de altura)
========================= */
@media(max-width: 1920px) and (min-width: 1701px) {
    #left-menu { padding: 1.5rem 0 0 0; } /* Topo muito menor */
    .btn-left-menu { padding: 1rem 1.5rem; height: auto; font-size: 1.1rem; }
}

@media(max-width: 1700px) and (min-width: 1315px){
    #left-menu { padding: 1.5rem 0 0 0; } /* Topo muito menor */
    .btn-left-menu { padding: 0.75rem 1.25rem; height: auto; font-size: 0.95rem; } /* Botão mais fino */
    .btn_left_menu_icon { font-size: 1.3rem !important; } /* Ícone proporcional */
}

@media(max-width: 1314px) and (min-width: 600px){
    #left-menu { padding: 1rem 0 0 0; }
    .btn-left-menu { flex-direction: column; padding: 0.5rem 1rem; height: auto; text-align: center; font-size: 0.6rem; margin: 0.2rem 0.5rem; width: calc(100% - 1rem); }
    .btn_left_menu_icon { font-size: 1.5rem !important; }
    .menu-divider { margin: 1rem 0.5rem; }
    .left-menu-footer { padding: 1rem 0.5rem; }
    .db-version { font-size: 0.6rem; }
    .db-date { display: none; }
}

@media (max-width: 1313px) and (min-width: 972px){
    .btn-left-menu-collaborators { word-break: break-word; }
}

@media (max-height: 900px) and (min-width: 972px){
    #left-menu { padding: 1rem 0 0 0; }
    .btn-left-menu { padding: 0.65rem 1.25rem; height: auto; font-size: 0.9rem; }
    .btn_left_menu_icon { font-size: 1.2rem !important; }
}

@media (max-height: 780px) and (min-width: 972px){
    #left-menu { padding: 0.5rem 0 0 0; }
    .btn-left-menu { padding: 0.5rem 1.1rem; height: auto; font-size: 0.85rem; margin: 0.1rem 1rem; }
    .btn_left_menu_icon { font-size: 1.1rem !important; }
    .menu-divider { margin: 0.25rem 1.5rem; }
}

@media (max-width: 600px){
    .menu-divider { display: none; }
    .left-menu-footer { display: none; }
}

/* =========================
   LOGOUT MODAL
========================= */
.modal-header {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 0;
    background-color: var(--card-bg);
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-bottom: none;
}

.logout-modal-img {
    position: relative;
    width: 60px;
    height: auto;
}

.btn-close-logout-modal {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    font-size: 2rem !important;
    color: var(--text-muted);
}

.btn-close-logout-modal:hover {
    color: var(--brand-green-dark);
    background-color: rgba(41, 130, 70, 0.1);
    border-radius: 50%;
}

.logout-modal-title {
    font-family: var(--title-font);
    color: var(--brand-green-dark);
    font-weight: var(--bold);
    text-align: center;
    margin: 0;
}

.logout-modal-content {
    display: flex;
    flex-direction: column;
    font-family: var(--ui-font);
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
    padding: 1.5rem 2rem 2rem;
    gap: 1.5rem;
}

.logout-modal-text {
    line-height: 1.5;
}

.btn-logout-modal-group {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.btn-logout-modal-confirm {
    border: none;
    background-color: var(--brand-green);
    color: white;
    width: 50%;
    font-weight: 600;
}

.btn-logout-modal-confirm:hover {
    background-color: var(--brand-green-dark);
}

.btn-logout-modal-cancel {
    border-color: var(--border-color);
    color: var(--text-muted);
    background-color: white;
    width: 50%;
    font-weight: 600;
}

.btn-logout-modal-cancel:hover {
    background-color: var(--background);
    color: var(--text-main);
}
