/* ==============================================
   ESTILOS ESPECÍFICOS PARA MODAL GERENCIAR ORÇAMENTOS
   Easy_Calc - Organizado em 26/12/2024 - Versão Profissional
   ============================================== */

/* =================== ESTILOS BASE DO MODAL =================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

/* =================== ESTRUTURA PRINCIPAL DO MODAL =================== */
.orcamentos-modal {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.orcamentos-modal .modal-content {
    height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background-color: #f8f9fa;
}

.orcamentos-modal .modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.orcamentos-modal .modal-header .header-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #f1c40f;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.orcamentos-modal .modal-header h2 {
    flex: 1;
    margin: 0;
    font-size: 22px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.orcamentos-modal .modal-header .close-modal {
    font-size: 24px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.orcamentos-modal .modal-header .close-modal:hover {
    opacity: 1;
    color: #f1c40f;
    background-color: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.orcamentos-modal .modal-body {
    padding: 0;
    overflow-y: auto;
    background-color: #f8f9fa;
}

/* =================== BARRA DE AÇÕES =================== */
.action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid #ced4da;
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.search-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.search-container .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.btn-action.primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-action.primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-action.secondary {
    background-color: white;
    color: #2c3e50;
    border: 1px solid #e9ecef;
}

.btn-action.secondary:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.btn-action .icon {
    font-size: 16px;
}

/* =================== CARDS DE RESUMO =================== */
.orcamentos-summary {
    display: flex;
    gap: 20px;
    padding: 0 25px 20px;
    margin-bottom: 1.5rem;
}

.summary-card {
    flex: 1;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: #3498db;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.summary-card#totalOrcamentos::before {
    background-color: #3498db;
}

.summary-card#totalAprovados::before {
    background-color: #2ecc71;
}

.summary-card#totalReprovados::before {
    background-color: #e74c3c;
}

.summary-value {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1;
}

.summary-label {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================== LISTA DE ORÇAMENTOS =================== */
.lista-orcamentos {
    padding: 0 25px 25px;
}

.orcamentos-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    background-color: white;
}

.orcamentos-table thead th {
    background-color: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orcamentos-table thead th:first-child {
    width: 60px;
    text-align: center;
    padding: 15px 10px;
}

.orcamentos-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.orcamentos-table tbody tr:hover {
    background-color: #f8f9fa;
}

.orcamentos-table tbody tr:last-child {
    border-bottom: none;
}

.orcamentos-table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
}

.orcamentos-table tbody td:first-child {
    text-align: center;
    font-weight: bold;
    color: #3498db;
    padding: 15px 10px;
    width: 60px;
}

.orcamentos-table td.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* =================== BOTÕES DA TABELA =================== */
.orcamentos-table button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    margin: 0 2px;
    min-width: 80px;
    text-align: center;
}

.orcamentos-table .btn-view {
    background-color: #3498db;
    color: white;
}

.orcamentos-table .btn-view:hover {
    background-color: #2980b9;
}

.orcamentos-table .btn-edit {
    background-color: #f39c12;
    color: white;
}

.orcamentos-table .btn-edit:hover {
    background-color: #d35400;
}

.orcamentos-table .btn-export {
    background-color: #2ecc71;
    color: white;
}

.orcamentos-table .btn-export:hover {
    background-color: #27ae60;
}

.orcamentos-table .btn-delete {
    background-color: #e74c3c;
    color: white;
}

.orcamentos-table .btn-delete:hover {
    background-color: #c0392b;
}

/* Botões de aprovar e reprovar */
.orcamentos-table .btn-approve {
    background-color: #2ecc71;
    color: white;
}

.orcamentos-table .btn-approve:hover {
    background-color: #27ae60;
}

.orcamentos-table .btn-reject {
    background-color: #e74c3c;
    color: white;
}

.orcamentos-table .btn-reject:hover {
    background-color: #c0392b;
}

.orcamentos-table .btn-approve:disabled,
.orcamentos-table .btn-reject:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Estados dos orçamentos */
.orcamento-aprovado {
    background-color: rgba(46, 204, 113, 0.05);
}

.orcamento-aprovado:hover {
    background-color: rgba(46, 204, 113, 0.1);
}

.orcamento-reprovado {
    background-color: rgba(231, 76, 60, 0.05);
}

.orcamento-reprovado:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* =================== ESTADO VAZIO =================== */
.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin: 25px;
}

.no-data i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 15px;
    display: block;
}

.no-data h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-data p {
    color: #7f8c8d;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* =================== DETALHES DO ORÇAMENTO =================== */
#detalhesOrcamento {
    padding: 25px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin: 0 25px 25px;
    animation: fadeIn 0.3s ease;
}

.orcamento-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.orcamento-header h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
}

.orcamento-header p {
    color: #7f8c8d;
    font-size: 14px;
}

.itens-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.itens-table th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.itens-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.itens-table .total-label {
    font-weight: 700;
    text-align: right;
    color: #2c3e50;
    font-size: 16px;
}

.itens-table .total-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

.actions-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.actions-buttons .btn-group-left {
    display: flex;
    gap: 10px;
}

.actions-buttons .btn-group-right {
    display: flex;
    gap: 10px;
}

.actions-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#btnVoltarLista {
    background-color: #95a5a6;
    color: white;
}

#btnVoltarLista:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

#btnImprimirDetalhes {
    background-color: #3498db;
    color: white;
}

#btnImprimirDetalhes:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

#btnAprovarOrcamento {
    background-color: #2ecc71;
    color: white;
}

#btnAprovarOrcamento:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

#btnReprovarOrcamento {
    background-color: #e74c3c;
    color: white;
}

#btnReprovarOrcamento:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* =================== ANIMAÇÕES =================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =================== RESPONSIVIDADE =================== */
@media screen and (max-width: 1200px) {
    .orcamentos-summary {
        flex-wrap: wrap;
    }
    
    .summary-card {
        flex: 1 1 calc(33.333% - 20px);
        min-width: 200px;
    }
}

@media screen and (max-width: 992px) {
    .summary-card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media screen and (max-width: 768px) {
    .action-toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .search-container {
        max-width: 100%;
    }
    
    .btn-group {
        width: 100%;
        justify-content: space-between;
    }

    .orcamentos-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-card {
        width: 100%;
    }

    .orcamentos-table td.actions {
        flex-direction: column;
    }

    .actions-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .actions-buttons .btn-group-left,
    .actions-buttons .btn-group-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .actions-buttons button {
        flex: 1;
    }
}

@media screen and (max-width: 576px) {
    .orcamentos-modal .modal-header {
        padding: 15px;
    }
    
    .orcamentos-modal .modal-header h2 {
        font-size: 18px;
    }
    
    .lista-orcamentos,
    .orcamentos-summary {
        padding: 0 15px 15px;
    }
    
    #detalhesOrcamento {
        padding: 15px;
        margin: 0 15px 15px;
    }
    
    .itens-table {
        font-size: 14px;
    }
    
    .orcamento-header h2 {
        font-size: 20px;
    }
    
    .btn-action {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .orcamentos-table thead th,
    .orcamentos-table tbody td {
        padding: 10px;
    }
    
    .orcamentos-table {
        font-size: 13px;
    }
}

/* =================== NOTIFICAÇÕES E FEEDBACK =================== */
.notification-float {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
}

.notification-float .icon {
    font-size: 24px;
}

.notification-float .content {
    flex: 1;
}

.notification-float .content h4 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
}

.notification-float .content p {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
}

.notification-float .close {
    cursor: pointer;
    font-size: 18px;
    color: #95a5a6;
    transition: color 0.2s;
}

.notification-float .close:hover {
    color: #2c3e50;
}

.notification-float.success {
    border-left: 4px solid #2ecc71;
}

.notification-float.success .icon {
    color: #2ecc71;
}

.notification-float.error {
    border-left: 4px solid #e74c3c;
}

.notification-float.error .icon {
    color: #e74c3c;
}

.notification-float.warning {
    border-left: 4px solid #f1c40f;
}

.notification-float.warning .icon {
    color: #f1c40f;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =================== LOADING E ESTADOS =================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(52, 152, 219, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================== ESTILOS DE IMPRESSÃO =================== */
@media print {
    .orcamentos-modal {
        position: relative;
        height: auto;
    }

    .action-toolbar,
    .btn-group,
    .search-container,
    .close-modal,
    .actions-buttons {
        display: none !important;
    }

    .modal-body {
        overflow: visible !important;
    }

    .orcamentos-table {
        page-break-inside: avoid;
        box-shadow: none;
    }

    .summary-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    #detalhesOrcamento {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* =================== STATUS DOS ORÇAMENTOS =================== */
.status-pendente,
.status-aprovado,
.status-reprovado {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pendente {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-aprovado {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-reprovado {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
} 
