/* 
 * CSS Administrativo Responsivo Premium v3.0
 * Otimizado para orcamento.lavanderiaumarizal.com.br
 */

/* Layout Base */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--gradient-primary);
}

/* Sidebar Otimizada */
.sidebar {
    width: 280px;
    background: rgba(10, 38, 64, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sidebar-brand h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 1rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(188, 216, 95, 0.15);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

.sidebar-menu i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 25px;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    width: calc(100% - 280px);
    transition: all 0.4s ease;
}

/* Header Admin */
.admin-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.2rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.6rem;
    margin: 0;
    color: #fff;
}

/* Cards de Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: block;
}

.stat-card-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabelas Responsivas Premium */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden; /* Container pai não rola */
}

.table-responsive {
    width: 100%;
    overflow-x: auto; /* Apenas a tabela rola */
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
}

.table {
    width: 100%;
    min-width: 600px; /* Garante que a tabela não esmague em mobile */
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table th {
    background: rgba(188, 216, 95, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
}

.table td {
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    vertical-align: middle;
    border: none;
    font-size: 0.95rem;
}

.table tr td:first-child { border-radius: 10px 0 0 10px; }
.table tr td:last-child { border-radius: 0 10px 10px 0; }

.table tbody tr:hover td {
    background: rgba(255,255,255,0.08);
}

/* Formulários */
.form-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 2rem;
}

.form-control {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

.form-control:focus {
    background: rgba(0,0,0,0.3);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(188, 216, 95, 0.2);
    color: #fff;
}

/* Botão Menu Sanduíche */
.menu-toggle {
    display: none;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1200;
    position: fixed;
    top: 15px;
    left: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 1050;
}

/* RESPONSIVIDADE EXTREMA (MOBILE) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 80px; /* Espaço para o botão de menu */
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar.active + .sidebar-overlay {
        display: block;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .admin-header h1 {
        font-size: 1.4rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    /* Ajuste de fontes em mobile */
    body {
        font-size: 14px;
    }
    
    .stat-card-value {
        font-size: 1.6rem;
    }
    
    /* Tabelas em Mobile - Forçar Scroll e manter legibilidade */
    .table-container {
        padding: 1rem;
    }
    
    .table th, .table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Botões em Mobile */
    .btn {
        width: 100%; /* Botões ocupam largura total em mobile para facilitar toque */
        margin-bottom: 0.5rem;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-sm {
        width: auto;
        display: inline-block;
    }
    
    /* Boxes de formulário */
    .form-container {
        padding: 1.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 1.2rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .table-responsive {
        margin-top: 0.5rem;
    }
}

/* Utilitários */
.text-secondary { color: var(--secondary-color) !important; }
.bg-dark-soft { background: rgba(0,0,0,0.2); }
.rounded-lg { border-radius: 15px; }
.shadow-premium { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
