/* Black Pay Style - V3 (Fixed Centered Icons) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #e4e4e7;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Sidebar Desktop Defaults */
.sidebar-hover {
    width: 5rem; /* 80px */
    background-color: #000000;
    border-right: 1px solid #1a1a1a;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 50;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-hover:hover {
    width: 16rem; /* 256px */
    background-color: #050505;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

/* Texto do Menu - TRUQUE PARA ALINHAMENTO */
.menu-text {
    display: none; /* Remove do fluxo quando fechado */
    white-space: nowrap;
    opacity: 0;
}

.sidebar-hover:hover .menu-text {
    display: inline-block; /* Volta ao fluxo */
    animation: fadeInText 0.3s forwards;
    margin-left: 0.75rem; /* Espaço entre ícone e texto */
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Logo */
.logo-container {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center; /* Centralizado por padrão */
    width: 100%;
    transition: all 0.3s;
    padding: 0.5rem 0 0 0;
}

.sidebar-hover:hover .logo-container {
    justify-content: flex-start;
    padding-left: 1.5rem;
}

/* Adjust logo margin when sidebar is expanded */
.sidebar-hover:hover .logo-container img {
    margin-left: -20px;
}

.logo-container img {
    transition: margin-left 0.3s ease-in-out;
}

/* Links do Menu - ÍCONES RETINHOS */
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center; /* ÍCONE CENTRALIZADO */
    height: 3rem; /* Altura fixa */
    width: 3.5rem; /* Largura quase total da sidebar fechada */
    margin: 0.25rem auto; /* Centraliza o bloco na sidebar */
    border-radius: 0.75rem;
    color: #a1a1aa;
    transition: all 0.2s;
}

/* Quando hover na sidebar, ajusta links para lista */
.sidebar-hover:hover .sidebar-link {
    width: 90%; /* Ocupa largura com margem */
    justify-content: flex-start; /* Alinha a esquerda */
    padding-left: 1rem;
    margin-left: 5%; /* Centraliza horizontalmente */
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: #1a1a1a;
    color: #fff !important;
}

.sidebar-link.active {
    background-color: #fff;
    color: #000 !important;
}

/* Ícone fixo */
.sidebar-link svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Conteúdo Principal */
.main-content {
    margin-left: 5rem;
    transition: margin-left 0.3s;
    background-color: #000;
    min-height: 100vh;
}

/* Navbar */
.navbar-glass {
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
    margin-left: 5rem;
    width: calc(100% - 5rem);
    transition: all 0.3s;
}

/* Cards & Inputs */
.card-modern {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
}
input, select, textarea {
    background-color: #050505 !important;
    border: 1px solid #1a1a1a !important;
    color: #fff !important;
}
input:focus {
    border-color: #333 !important;
    box-shadow: none !important;
}

/* Tabela */
table thead th { background: #050505; border-bottom: 1px solid #1a1a1a; color: #666; }
table tbody td { background: #000; border-bottom: 1px solid #1a1a1a; color: #ccc; }
table tbody tr:hover td { background: #0a0a0a; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .sidebar-hover {
        width: 16rem; /* Full drawer width */
        transform: translateX(-100%); /* Hidden by default */
        visibility: hidden;
        transition: transform 0.3s ease-in-out, visibility 0.3s;
    }
    
    /* Class to open sidebar via JS */
    .sidebar-hover.mobile-open {
        transform: translateX(0);
        visibility: visible;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }
    
    /* Disable hover expansion on mobile */
    .sidebar-hover:hover {
        width: 16rem;
    }

    /* Reset main content and navbar margins */
    .main-content {
        margin-left: 0;
    }
    .navbar-glass {
        margin-left: 0;
        width: 100%;
    }
    
    /* Force visible text in menu items on mobile */
    .menu-text {
        display: inline-block;
        opacity: 1;
        margin-left: 0.75rem;
    }
    
    /* Align links like expanded desktop version */
    .sidebar-link {
        width: 90%;
        justify-content: flex-start;
        padding-left: 1rem;
        margin-left: 5%;
    }

    .logo-container {
        justify-content: center;
        padding-left: 0;
    }
    
    /* Ensure mobile logo also respects the negative margin if needed or reset it */
    .sidebar-hover.mobile-open .logo-container img {
        margin-left: -20px;
    }
}
