/* Orçamentos Page Styles */
.orcamentos-content {
    padding: 25px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header positioning override */
.header {
    position: relative;
}

.settings-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

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

.btn-new-orcamento {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-new-orcamento:hover {
    background-color: #2980b9;
}

/* Search Styles */
.search-container {
    flex: 1;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #3498db;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
}

.pagination-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.pagination-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

/* Table Styles */
.table-container {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

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

.orcamentos-table thead {
    background-color: #2c3e50;
    color: white;
}

.orcamentos-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.orcamentos-table th:last-child {
    border-right: none;
}

.orcamentos-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.orcamentos-table tbody tr:nth-child(even) {
    background-color: #f0f8ff;
}

.orcamentos-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

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

.orcamentos-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: #333;
    border-right: 1px solid #e0e0e0;
}

.orcamentos-table td:last-child {
    border-right: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-view,
.btn-download,
.btn-edit,
.btn-delete {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-download {
    background-color: #27ae60;
}

.btn-download:hover {
    background-color: #229954;
}

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

.btn-edit:hover {
    background-color: #e67e22;
}

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

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.orcamento-modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 95%;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.view-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 95%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #bdc3c7;
}

.modal-content form {
    padding: 20px;
}

.form-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

/* Item Rows */
.item-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 40px;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.item-field {
    display: flex;
    flex-direction: column;
}

.item-field label {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

.item-field input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.item-field input[readonly] {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.btn-remove-item {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
    padding: 6px 10px;
    transition: background-color 0.3s ease;
}

.btn-remove-item:hover {
    background-color: #c0392b;
}

.btn-add-item {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-add-item:hover {
    background-color: #229954;
}

/* Total Section */
.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    border-radius: 4px;
    margin-bottom: 20px;
}

.total-section label {
    font-size: 16px;
    font-weight: 600;
}

.total-section span {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
}

.btn-save {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-save:hover {
    background-color: #229954;
}

/* View Modal Content */
#viewContent {
    padding: 20px;
}

.orcamento-view {
    font-family: Arial, sans-serif;
}

.orcamento-view-header {
    text-align: center;
    margin-bottom: 20px;
}

.orcamento-view-header img {
    max-width: 100%;
    height: auto;
}

.orcamento-view-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.orcamento-view-info p {
    margin: 5px 0;
    font-size: 14px;
}

.orcamento-view-items {
    margin-bottom: 20px;
}

.orcamento-view-items table {
    width: 100%;
    border-collapse: collapse;
}

.orcamento-view-items th,
.orcamento-view-items td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.orcamento-view-items th {
    background-color: #2c3e50;
    color: white;
}

.orcamento-view-total {
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 20px;
}

.orcamento-view-signature {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Responsive Design for Orçamentos Page */
@media (max-width: 768px) {
    .orcamentos-content {
        padding: 20px 15px;
    }

    .orcamentos-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: 100%;
    }

    .orcamentos-table {
        font-size: 12px;
    }

    .orcamentos-table th,
    .orcamentos-table td {
        padding: 8px 10px;
    }

    .btn-new-orcamento {
        width: 100%;
    }

    .orcamento-modal-content {
        width: 98%;
        margin: 1% auto;
    }

    .item-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .item-field input {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .orcamentos-table th:nth-child(4),
    .orcamentos-table td:nth-child(4) {
        display: none;
    }
}
