/* ==========================================================================
   Componente de Histórico de Orçamentos
   ========================================================================== */

.history-section {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--box-shadow);
    width: 100%;
    box-sizing: border-box;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.history-title {
    color: var(--white-color);
    margin: 0;
    font-size: 1.2rem;
}

.clear-history-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-history-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    transform: translateY(-1px);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.history-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.history-date {
    color: var(--text-color-light);
    font-size: 0.9rem;
}

.history-value {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.history-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 12px;
}

.history-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.load-btn, .delete-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
}

.load-btn {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
}

.load-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-1px);
}

.delete-btn {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    transform: translateY(-1px);
}

.history-empty {
    text-align: center;
    color: var(--text-color-light);
    padding: 30px;
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE - CORREÇÕES ESPECÍFICAS
   ========================================================================== */

/* Tablets */
@media (max-width: 768px) {
    .history-section {
        margin-top: 30px;
        padding: 15px;
    }
    
    .history-details {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .history-title {
        font-size: 1.1rem;
    }
}

/* Mobile - Geral */
@media (max-width: 600px) {
    .history-section {
        margin-top: 40px;
        padding: 12px;
        clear: both;
        position: relative;
        z-index: 1;
    }
    
    .history-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: center;
    }
