:root {
    --primary-color: #2c3e50;
    --secondary-color: #7f8c8d;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
}

/* Form Header Styles */
.form-header-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    margin-top: 20px;
}

    .form-header-section h1 {
        font-size: 32px;
        font-weight: bold;
        margin-bottom: 15px;
    }

    .form-header-section .location {
        font-size: 20px;
        opacity: 0.95;
    }

/* Property Details Table */
.property-details-table {
    background: white;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

    .property-details-table table {
        margin: 0;
        font-size: 18px;
    }

    .property-details-table th {
        background-color: var(--primary-color);
        color: white;
        font-weight: 600;
        padding: 15px;
        text-align: center;
    }

    .property-details-table td {
        padding: 15px;
        text-align: center;
        font-weight: 500;
    }

/* Alert Disclaimer */
.alert-disclaimer {
    background-color: rgb(248, 215, 218);
    border: 2px solid rgb(88, 21, 28);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 18px;
}

    .alert-disclaimer strong {
        color: rgb(88, 21, 28);
    }

/* Alert Market Value */
.alert-warning-em {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 18px;
}

    .alert-warning-em strong {
        color: #856404;
    }

/* Form Sections */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 18px;
}

.form-control, .form-select {
    font-size: 18px;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    }

    .form-control:hover, .form-select:hover {
        border-color: var(--accent-color);
    }

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Property Field Rows */
.property-field-row {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    position: relative;
}

    /* Property Field Row Validation Messages */
    .property-field-row .field-validation-error,
    .property-field-row .invalid-feedback,
    .property-field-row .text-danger[data-valmsg-for] {
        display: block;
        width: 100%;
        font-size: 0.875rem;
        color: #dc3545 !important;
        min-height: 1.25rem; /* Reserve space to prevent layout shift */
        line-height: 1.25rem;
        position: absolute;
        bottom: 15px;
        left: 15px;
        right: 15px;
        margin: 0;
        padding: 0;
    }

    /* Position validation messages below the input groups */
    .property-field-row .current-updated-inputs {
        margin-bottom: 0;
    }

/* Reserve space for validation messages to prevent layout shift */
.property-field-row {
    padding-bottom: 45px; /* Extra space for validation message */
}


    /* Hide validation message when valid */
    .property-field-row .field-validation-valid,
    .property-field-row [data-valmsg-for].field-validation-valid {
        display: none !important;
    }

    /* Ensure only one validation message shows per property field row */
    .property-field-row .field-validation-error ~ .field-validation-error,
    .property-field-row .invalid-feedback ~ .invalid-feedback,
    .property-field-row [data-valmsg-for] ~ [data-valmsg-for] {
        display: none;
    }

    /* Readonly Field Styling */
    .property-field-row input[readonly] {
        background-color: #f5f5f5 !important;
        color: #000;
        border-style: dashed;
        border-color: #dee2e6;
        cursor: not-allowed;
        opacity: 0.8;
    }

    .property-field-row .input-group-text {
        font-weight: 600;
    }

    /* On File fields specific styling */
    .property-field-row .input-group:has(input[readonly]) .input-group-text {
        background-color: #e9ecef;
        color: #6c757d;
        border-style: dashed;
        border-color: #dee2e6;
    }

        /* Add lock icon to On File labels */
        .property-field-row .input-group:has(input[readonly]) .input-group-text::after {
            /*content: " 🔒";*/
            font-size: 0.875rem;
            margin-left: 4px;
        }

/* Mobile adjustments for readonly fields */
@media (max-width: 768px) {
    .property-field-row input[readonly] {
        background-color: #f0f0f0 !important;
        font-size: 0.95rem;
    }

    .property-field-row .input-group:has(input[readonly]) {
        margin-bottom: 0.5rem;
    }

    /* Adjust validation message positioning on mobile */
    .property-field-row {
        padding-bottom: 40px;
    }

        .property-field-row .field-validation-error,
        .property-field-row .invalid-feedback,
        .property-field-row .text-danger[data-valmsg-for] {
            bottom: 10px;
            left: 10px;
            right: 10px;
            font-size: 0.8125rem;
        }
}

.property-field-row label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.current-updated-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

    .current-updated-inputs .input-group {
        flex: 1;
    }

.input-group-text {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    min-width: 100px;
    justify-content: center;
}

/* Form Check */
.form-check {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

    .form-check:hover {
        background-color: #e9ecef;
        transform: translateX(5px);
    }

.form-check-input {
    width: 24px;
    height: 24px;
    margin-top: 0;
    margin-right: 15px;
    cursor: pointer;
}

.form-check-label {
    font-size: 18px;
    cursor: pointer;
    font-weight: 500;
}

/* Progress Indicator */
.progress-indicator {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.progress-step {
    text-align: center;
    position: relative;
}

    .progress-step::before {
        content: attr(data-step);
        display: inline-block;
        width: 40px;
        height: 40px;
        line-height: 40px;
        background-color: #e9ecef;
        color: var(--secondary-color);
        border-radius: 50%;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .progress-step.active::before {
        background-color: var(--accent-color);
        color: white;
    }

    .progress-step.completed::before {
        background-color: var(--success-color);
        color: white;
    }

    .progress-step span {
        display: block;
        font-size: 14px;
        color: var(--primary-color);
    }

/* Buttons */
.btn {
    transition: all 0.3s ease;
    font-size: 20px;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

.btn-primary {
    background-color: var(--accent-color);
    border: none;
}

    .btn-primary:hover {
        background-color: #2980b9;
    }

.btn-secondary {
    background-color: var(--secondary-color);
    border: none;
    font-size: 20px;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: 600;
}

/* Help Icon */
.help-icon {
    color: var(--accent-color);
    cursor: pointer;
    margin-left: 5px;
}

.tooltip-inner {
    font-size: 16px;
    padding: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-header-section h1 {
        font-size: 24px;
    }

    .form-header-section .location {
        font-size: 16px;
    }

    .property-details-table {
        overflow-x: auto;
    }

        .property-details-table table {
            font-size: 14px;
        }

    .current-updated-inputs {
        flex-direction: column;
    }

        .current-updated-inputs .input-group {
            width: 100%;
        }

    .form-section {
        padding: 20px;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }

    .progress-step span {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 16px;
    }

    .property-details-table th,
    .property-details-table td {
        padding: 10px 5px;
        font-size: 14px;
    }
}

/* Print Styles - Comprehensive for proper scaling and layout */
@media print {
    /* Hide non-printable elements */
    .no-print,
    .screen-only {
        display: none !important;
    }

    /* Remove backgrounds and shadows */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Page break controls */
    .page-break-before {
        page-break-before: always;
    }

    .page-break-after {
        page-break-after: always;
    }
}

/* Page setup for printing */
@page {
    size: a3;
    margin: 0.5in;
}

/* Attachment Section Styles - Modern Clean Design */
.attachment-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.info-alert {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    font-size: 15px;
}

    .info-alert i {
        margin-top: 2px;
    }

.warning-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    font-size: 15px;
}

    .warning-alert i {
        margin-top: 2px;
    }

.attachment-upload-area {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.upload-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.upload-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.btn-add-files {
    background: white;
    color: #3498db;
    border: 1px solid #3498db;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

    .btn-add-files:hover {
        background: #3498db;
        color: white;
    }

.upload-container {
    padding: 20px;
    min-height: 120px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    position: relative;
}

    .upload-container.drag-over {
        background: #e3f2fd;
        border: 2px dashed #2196F3;
    }

.empty-state {
    color: #7f8c8d;
}

    .empty-state i {
        font-size: 36px;
        color: #bdc3c7;
        margin-bottom: 8px;
        display: block;
    }

    .empty-state p {
        margin: 0;
        font-size: 14px;
        color: #6c757d;
    }

    .empty-state .drag-hint {
        margin-top: 8px;
        font-size: 13px;
        color: #868e96;
    }

/* Attachment Overlay Styles - Relative to attachment section */
.attachment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 8px;
    min-height: 200px;
}

    .attachment-overlay.active {
        display: flex;
    }

.attachment-overlay-content {
    text-align: center;
    padding: 20px;
}

.attachment-overlay .upload-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.attachment-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.3em;
    color: #3498db;
}

.attachment-overlay .status-message {
    margin: 0;
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.attachment-overlay .status-submessage {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
}

.attachment-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .attachment-list .attachment-item {
        background: white;
        border: 1px solid #e8e8e8;
        border-radius: 4px;
        padding: 10px 14px;
        margin-bottom: 6px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.2s ease;
    }

        .attachment-list .attachment-item:hover {
            background: #f8f9fa;
            border-color: #dee2e6;
        }

.attachment-item .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attachment-item .file-name {
    font-size: 14px;
    color: var(--text-dark);
}

.delete-attachment {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

    .delete-attachment:hover {
        background-color: #e74c3c;
        color: white;
    }

/* Modal Progress Bar */
#uploadProgress .progress {
    height: 8px;
}

#uploadProgress .progress-bar {
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

/* Upload Status */
#uploadStatus {
    margin-bottom: 0;
    padding: 10px 12px;
    font-size: 14px;
}

/* Dashboard Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

    .card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.card-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.btn-block {
    width: 100%;
}

/* File type icons */
.bi-file-earmark {
    color: var(--accent-color);
}

/* Dashboard specific styles */
.display-4 {
    font-size: 3rem;
}

.h-100 {
    height: 100%;
}

/* Additional responsive adjustments for attachments */
@media (max-width: 768px) {
    #attachmentsContainer {
        max-height: 200px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .card-body .btn {
        font-size: 14px;
        padding: 8px 12px;
    }
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}