* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sidebar */
.sidebar {
    background-color: #34495e;
    color: white;
    width: 250px;
    height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
}

.sidebar nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar nav ul li {
    padding: 0.5rem 1rem;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #2c3e50;
}

/* Content */
.content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 60px);
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

table tr:hover {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.card h3 {
    margin-bottom: 1rem;
    color: #7f8c8d;
}

.card p {
    font-size: 1.5rem;
    font-weight: bold;
}

.saldo {
    color: #27ae60;
}

.entrada {
    color: #27ae60;
}

.saida {
    color: #e74c3c;
}

.categorias {
    color: #9b59b6;
}

.produtos {
    color: #f39c12;
}

.transacoes {
    color: #3498db;
}

/* Dashboard Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

/* View All Link */
.view-all {
    text-align: center;
    margin-top: 1rem;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.login-container p {
    text-align: center;
    margin-bottom: 2rem;
    color: #7f8c8d;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #e74c3c !important;
}

.logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo h1 {
    color: #2a5298;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.logo p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.credentials {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.credentials h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.credential-value {
    font-weight: 600;
    color: #e74c3c;
}

.footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        display: none;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}