/* Estilos principais do sistema */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #1abc9c;
    --light: #ecf0f1;
    --dark: #34495e;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: white;
    height: 100vh;
    position: fixed;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 3px 0 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header h3 {
    font-size: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu i {
    margin-right: 15px;
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

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

.sidebar.collapsed .sidebar-menu i {
    margin-right: 0;
    font-size: 1.5rem;
}

/* Conteúdo principal */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    padding: 20px;
}

.content.expanded {
    margin-left: 70px;
}

/* Header */
.header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-sidebar {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-sidebar:hover {
    background: #2980b9;
}

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

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary);
}

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

.card.available { border-left-color: var(--success); }
.card.leased { border-left-color: var(--info); }
.card.sold { border-left-color: var(--secondary); }
.card.maintenance { border-left-color: var(--warning); }
.card.lost { border-left-color: var(--danger); }
.card.damaged { border-left-color: var(--dark); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #219653;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-available { background: #e8f5e9; color: #2e7d32; }
.status-leased { background: #e3f2fd; color: #1565c0; }
.status-sold { background: #e3f2fd; color: #0d47a1; }
.status-maintenance { background: #fff8e1; color: #f57f17; }
.status-lost { background: #ffebee; color: #c62828; }
.status-damaged { background: #fbe9e7; color: #bf360c; }

/* Formulários */
.form-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

.form-group {
    flex: 1 0 300px;
    padding: 0 10px;
    margin-bottom: 15px;
}

.form-group.full {
    flex: 1 0 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Gráficos */
.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    margin: 0;
    color: var(--primary);
}

/* Responsividade */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .toggle-sidebar-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        flex: 1 0 100%;
    }
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 30px;
    color: var(--primary);
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #2980b9;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: var(--primary);
    border-radius: 3px;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination .current {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
}
