/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #212121;
    line-height: 1.6;
}

/* Header */
header,
nav.navbar {
    background-color: #ffffff;
    color: #212121;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Logo Container */
.logo-container img {
    transition: opacity 0.3s ease;
}

.logo-container img[src] {
    opacity: 1;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions {
    margin-left: auto;
}

.logo img {
    height: 50px;
    width: auto;
}

.header-text {
    flex: 1;
    text-align: center;
}

header h1,
nav h1 {
    font-size: 26px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: #666;
}

.subtitle strong {
    font-weight: 700;
    color: #212121;
}

/* Main Container */
main {
    padding: 24px;
    margin-top: 0;
    padding-top: 140px;
}

main .container {
    padding: 0;
}

/* Modal customizações - Bootstrap já fornece estilos base */
#validation-errors-list {
    padding-left: 1.5rem;
}

#validation-errors-list li {
    margin-bottom: 0.5rem;
    color: #212529;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: visible;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.card.mb-3 {
    margin-bottom: 24px !important;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 24px;
}

/* View More Button */
.view-more-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 10;
}

.view-more-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Confirmation Fields - No special styling, looks like regular fields */
.confirmation-fields {
    /* No special styling needed */
}

/* Campo de status no header - alinhado com outros campos */
.status-field {
    display: none;
}

.status-field[style*="display: block"] {
    display: block !important;
}

.status-field small {
    font-weight: 500;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.status-field .text-success {
    color: #4caf50;
    font-size: 14px;
    display: block;
    font-weight: 500;
}

.status-value {
    font-weight: 500;
    color: #4caf50;
}

/* Sections */
.section,
.mb-4 {
    margin-bottom: 32px;
}

.section:last-child,
.mb-4:last-child {
    margin-bottom: 0;
}

.card-body .mb-4:not(:last-child) {
    margin-bottom: 32px;
}

.section-title,
h5.border-bottom {
    font-size: 18px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0 !important;
}

/* Bootstrap overrides e customizações */
.form-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.required {
    color: #d32f2f;
}

/* Ícones de status nos campos Contratado/Não contratado */
.status-field-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-icon {
    font-size: 1em;
    line-height: 1;
    flex-shrink: 0;
}

.status-icon-check {
    color: #4caf50;
    opacity: 0.7;
}

.status-icon-times {
    color: #dc3545;
    opacity: 0.7;
}

/* Readonly Values */
.readonly-value,
.form-control.bg-light.border {
    background-color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    color: #212121;
    font-size: 14px;
    min-height: calc(1.5em + 0.75rem + 2px);
    display: flex;
    align-items: center;
    pointer-events: none;
    user-select: none;
}

/* Garantir espaçamento adequado nos campos */
.row.g-3 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 1rem;
}

.row.g-3 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Form Controls - Bootstrap já fornece estilos base, apenas customizações */
.form-control,
.form-select {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.25rem rgba(25, 118, 210, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

/* Money Input */
.money-input {
    text-align: left;
}

/* Button Container */
.button-container,
.d-flex.justify-content-end.mt-4 {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.btn-confirm,
.btn.btn-primary {
    background-color: #1976d2;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Roboto', sans-serif;
}

.btn-confirm:hover,
.btn.btn-primary:hover {
    background-color: #125aa0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-confirm:active,
.btn.btn-primary:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-confirm-header {
    background-color: #1976d2;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Roboto', sans-serif;
}

.btn-confirm-header:hover {
    background-color: #125aa0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-confirm-header:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Success Screen */
.success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.success-content {
    background-color: #ffffff;
    padding: 48px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 64px;
    color: #4caf50;
    margin-bottom: 24px;
}

.success-content h2 {
    font-size: 24px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 16px;
}

.success-content p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Modal Customizations */
.modal-lg {
    max-width: 900px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Card spacing for view more button */
.card-body {
    padding-bottom: 60px;
}

/* Bottom Confirmation Section */
#bottom-confirmation-container {
    margin-top: 40px;
    margin-bottom: 60px;
}

.bottom-confirmation-section {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #1976d2;
}

.bottom-confirmation-section .btn-lg {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .card-header-content {
        grid-template-columns: 1fr;
    }

    .fields-grid {
        grid-template-columns: 1fr;
    }

    header h1,
    nav h1 {
        font-size: 22px;
    }

    .success-content {
        padding: 32px;
        margin: 20px;
    }
    
    .view-more-btn {
        position: static;
        width: 100%;
        margin-top: 16px;
    }
    
    .card-body {
        padding-bottom: 24px;
    }
}
