/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Layout principal */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar .logo img {
    max-width: 150px;
    height: auto;
}

.sidebar ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar ul li {
    margin-bottom: 5px;
}

.sidebar ul li a {
    display: block;
    padding: 12px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

/* DESABILITADO - Causava comportamento inadequado de hover
.sidebar ul li a:hover {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border-left-color: #fff;
    transform: translateX(5px);
}
*/

.sidebar ul li strong {
    display: block;
    padding: 15px 25px 8px 25px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar ul li ul {
    padding: 0;
    margin: 0;
}

.sidebar ul li ul li a {
    padding: 8px 25px 8px 45px;
    font-size: 14px;
}

/* Conteúdo principal */
.main {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    min-height: 100vh;
}

/* Cards do dashboard */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card h5 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.card h3 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* Seções do dashboard */
.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* Títulos */
h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(90deg, #6c757d, #495057);
}

.btn-danger {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main {
        margin-left: 0;
        padding: 20px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .dashboard-section {
    animation: fadeIn 0.6s ease-out;
}

/* Menu colapsável */
.sidebar {
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .logo img {
    max-width: 40px;
}

.sidebar.collapsed ul li a,
.sidebar.collapsed ul li strong {
    padding: 12px 15px;
    text-align: center;
    font-size: 12px;
}

.sidebar.collapsed ul li strong {
    display: none;
}

.sidebar.collapsed ul li ul li a {
    padding: 8px 15px;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .menu-icon {
    font-size: 18px;
    margin-right: 0;
}

/* Botão de toggle */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 290px;
    z-index: 1001;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

.sidebar.collapsed + .sidebar-toggle {
    left: 70px;
}

/* Ajuste do conteúdo principal */
.main {
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main {
    margin-left: 60px;
}

/* Ícones do menu */
.menu-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* Submenu */
.sidebar ul li ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* DESABILITADO - Causava comportamento inadequado de hover
.sidebar ul li:hover ul {
    max-height: 500px;
}
*/

.sidebar.collapsed ul li ul {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 8px 8px 0;
    max-height: none;
    display: none;
}

/* DESABILITADO - Causava comportamento inadequado de hover
.sidebar.collapsed ul li:hover ul {
    display: block;
}
*/
