/* css/style.css - ADICIONE/ATUALIZE ESTAS REGRAS */

/* Reset e Estilos Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Container Principal */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar - MELHORIAS PARA MOBILE */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo {
    padding: 0 20px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.logo i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #3498db;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin: 0 15px 20px;
}

.user-info i {
    font-size: 2rem;
    margin-right: 15px;
    color: #3498db;
}

.user-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 0.8rem;
    color: #bdc3c7;
}

.menu {
    padding: 0 15px;
}

.menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #ecf0f1;
}

.menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu a:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.menu a.active {
    background: rgba(52, 152, 219, 0.3);
    color: #3498db;
    font-weight: 600;
}

/* Botão Menu Mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: #3498db;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e6ed;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    flex: 1;
    min-width: 200px;
}

.date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Cards - RESPONSIVO */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 120px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.card-saldo .card-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card-receita .card-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.card-despesa .card-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.card-content {
    flex: 1;
    min-width: 0; /* Permite que o texto quebre */
}

.card-content h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.valor {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.positivo {
    color: #27ae60;
}

.negativo {
    color: #e74c3c;
}

/* Content Grid - RESPONSIVO */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container, .recent-transactions {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h2, .recent-transactions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Gráfico - RESPONSIVO */
.chart {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    padding-top: 20px;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 10px;
}

.chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    flex-shrink: 0;
}

.chart-bar-container {
    height: 200px;
    width: 30px;
    position: relative;
    margin-bottom: 10px;
}

.chart-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

.chart-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    color: #7f8c8d;
    width: 100%;
}

.chart-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.chart-value {
    font-weight: 600;
    margin-top: 5px;
    color: #2c3e50;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Lista de Transações - RESPONSIVO */
.transactions-list {
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
    flex-wrap: wrap;
    gap: 10px;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.transaction-info {
    flex: 1;
    min-width: 150px;
}

.transaction-info h4 {
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-category {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 3px;
}

.transaction-date {
    font-size: 0.8rem;
    color: #95a5a6;
}

.transaction-value {
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
}

/* Botões - RESPONSIVO */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #ecf0f1;
    color: #7f8c8d;
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #7f8c8d;
    transition: all 0.3s ease;
    margin-right: 5px;
    flex-shrink: 0;
}

.btn-action:hover {
    background: #3498db;
    color: white;
}

.btn-danger:hover {
    background: #e74c3c;
}

/* Formulários - RESPONSIVO */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.login-box .logo i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
}

.login-box .logo h1 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: #3498db;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* Filtros - RESPONSIVO */
.filters {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: 100%;
    overflow: hidden;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Permite que os inputs se ajustem */
}

.filter-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

/* Tabela - RESPONSIVO */
.transactions-table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Suaviza scroll no iOS */
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Largura mínima para tablets/desktop */
}

.transactions-table th {
    text-align: left;
    padding: 15px;
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.transactions-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.transactions-table tbody tr:hover {
    background: #f8f9fa;
}

/* Badges */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.tipo-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.tipo-badge.receita {
    background: #d4edda;
    color: #155724;
}

.tipo-badge.despesa {
    background: #f8d7da;
    color: #721c24;
}

.actions {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
    font-style: italic;
    width: 100%;
}

/* Estatísticas - RESPONSIVO */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-item h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* RESPONSIVIDADE - MEDIA QUERIES */

/* Tablets (até 1024px) */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container, .recent-transactions {
        min-height: 350px;
    }
    
    .chart-bars {
        height: 200px;
    }
    
    .chart-bar-container {
        height: 180px;
    }
}

/* Tablets Pequenos (até 768px) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 70px 15px 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .valor {
        font-size: 1.3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .transaction-icon {
        margin-right: 0;
        align-self: flex-start;
    }
    
    .transaction-info {
        width: 100%;
    }
    
    .transaction-value {
        text-align: left;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .transactions-table {
        min-width: 600px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

/* Celulares (até 480px) */
@media (max-width: 480px) {
    .main-content {
        padding: 60px 10px 10px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .card-icon {
        margin-right: 0;
    }
    
    .chart-container, .recent-transactions {
        padding: 15px;
    }
    
    .chart-container h2, .recent-transactions h2 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .chart-bars {
        height: 180px;
        justify-content: flex-start;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .chart-item {
        width: 50px;
    }
    
    .chart-bar-container {
        width: 25px;
    }
    
    .chart-label {
        font-size: 0.7rem;
    }
    
    .form-container {
        padding: 20px 15px;
    }
    
    .alert {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .menu-toggle {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    
    .user-info i {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 1.5rem;
    }
    
    .logo {
        padding: 0 10px 20px;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .logo h2 {
        font-size: 1rem;
    }
    
    .transactions-table {
        font-size: 0.9rem;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 10px 8px;
    }
    
    .btn-action {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* Telas muito pequenas (até 360px) */
@media (max-width: 360px) {
    .chart-item {
        width: 45px;
    }
    
    .chart-bar-container {
        width: 22px;
    }
    
    .chart-label span {
        font-size: 0.65rem;
    }
    
    .valor {
        font-size: 1.2rem;
    }
    
    .transaction-value {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Ajustes para orientação paisagem em celulares */
@media (max-height: 600px) and (orientation: landscape) {
    .login-container {
        padding: 10px;
    }
    
    .login-box {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .sidebar {
        overflow-y: auto;
    }
    
    .transactions-list {
        max-height: 250px;
    }
}

/* Ajustes para telas grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
    
    .cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dark Mode Opcional (adicione esta classe ao body para ativar) */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .card,
body.dark-mode .chart-container,
body.dark-mode .recent-transactions,
body.dark-mode .form-container,
body.dark-mode .filters,
body.dark-mode .transactions-table-container {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .header h1,
body.dark-mode .card-content h3,
body.dark-mode .chart-container h2,
body.dark-mode .recent-transactions h2,
body.dark-mode .form-group label,
body.dark-mode .filter-group label {
    color: #e0e0e0;
}

body.dark-mode .transactions-table th {
    background: #3d3d3d;
    color: #e0e0e0;
}

body.dark-mode .transactions-table td {
    border-color: #444;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .filter-group select,
body.dark-mode .filter-group input {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .transaction-item:hover {
    background: #3d3d3d;
}

body.dark-mode .btn-secondary {
    background: #444;
    color: #e0e0e0;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Otimização para transições */
.card, .btn, .menu a {
    will-change: transform;
}
/* Tabela Responsiva como Cards em Mobile */
@media (max-width: 768px) {
    .transactions-table {
        display: block;
        min-width: 100%;
    }
    
    .transactions-table thead {
        display: none;
    }
    
    .transactions-table tbody {
        display: block;
    }
    
    .transactions-table tr {
        display: block;
        margin-bottom: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 15px;
        border: 1px solid #e0e6ed;
    }
    
    .transactions-table td {
        display: block;
        text-align: right;
        padding: 8px 0;
        border: none;
        position: relative;
        padding-left: 50%;
        box-sizing: border-box;
    }
    
    .transactions-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .transactions-table td:last-child {
        border-bottom: none;
    }
    
    .category-badge, .tipo-badge {
        display: inline-block;
        margin-top: 5px;
    }
    
    .actions {
        justify-content: flex-end;
        margin-top: 10px;
    }
}
/* Login Responsivo */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-box {
        padding: 25px 15px;
        border-radius: 10px;
    }
    
    .login-box .logo i {
        font-size: 2.5rem;
    }
    
    .login-box .logo h1 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Ajustes para teclado virtual em mobile */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Evita zoom automático no iOS */
    }
    
    .login-box form {
        margin-top: 20px;
    }
}
/* Estilos para página de edição */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 180px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.info-box {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: #2c3e50;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-body {
    padding: 20px;
    color: #2c3e50;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e6ed;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
}
/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e6ed;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.breadcrumb-item:not(:last-child):after {
    content: '/';
    margin-left: 10px;
    color: #bdc3c7;
}

.breadcrumb-item a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #2c3e50;
    font-weight: 600;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 0;
    }
    
    .breadcrumb-item {
        font-size: 0.85rem;
    }
}
/* Estilos para validação de formulário */
.field-error-active {
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
}

.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos para botão de modo escuro */
.dark-mode-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: #34495e;
    transform: scale(1.1);
}

/* Melhorias para o gráfico */
.chart-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

/* Ajustes para mobile */
@media (max-width: 768px) {
    .dark-mode-toggle {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Melhorias para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .back-to-top,
    .dark-mode-toggle,
    .btn {
        transition: none !important;
    }
}
/* Estilo para select desabilitado */
select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

select option:disabled {
    color: #6c757d;
}

/* Estilo para opções escondidas */
select option[style*="display: none"] {
    display: none !important;
}

/* Indicador visual para campos obrigatórios */
.form-group label[for]:after {
    content: " *";
    color: #e74c3c;
}

.form-group label[for]:not([for*="required"]):after {
    content: "";
}