─────────────────────────────────────────────────────────── */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

* {
    box-sizing: border-box;
}

body {
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #ECEAEB !important;
    color: #08223D;
    font-family: 'DM Sans', 'Avenir', 'Avenir Next', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}

#contentToExport {
    background-color: #ECEAEB;
    max-width: 1020px;
    margin: 0 auto;
    padding: 2rem 1.5rem !important;
}

.bg-white {
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 24px !important;
    box-shadow: 0 4px 24px rgba(8, 34, 61, 0.07) !important;
}
.bg-white h2 {
    color: #3A5A40;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    display: inline-block;
    padding: 0.3rem 0rem;
    margin-bottom: 1.25rem;
}

.bg-gray-100 {
    background-color: #ECEAEB !important;
}
.bg-gray-50 {
    background-color: #f0eeec !important;
}

input,
select,
textarea {
    border: none !important;
    border-radius: 14px !important;
    background-color: #f0eeec !important;
    color: #08223D !important;
    padding: 0.6rem 1rem !important;
    transition: box-shadow 0.2s, background-color 0.2s;
    font-size: 16px !important;
}
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    background-color: #e8ede8 !important;
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.22) !important;
}

.input-container .flex.items-center {
    background-color: #f0eeec !important;
    border: none !important;
    border-radius: 14px !important;
    overflow: hidden;
}
.input-container .flex.items-center:focus-within {
    background-color: #e8ede8 !important;
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.22) !important;
}
.input-container .flex.items-center span {
    background-color: transparent !important;
    border-right: none !important;
    color: #738B65 !important;
    font-weight: 700;
    padding-left: 1rem !important;
    padding-right: 0.25rem !important;
}
.input-container .flex.items-center input {
    background-color: transparent !important;
    border-radius: 0 !important;
    padding-left: 0.25rem !important;
    box-shadow: none !important;
}

#deliveryPercentage,
#constructionPeriod {
    background-color: rgba(58, 90, 64, 0.09) !important;
    border: none !important;
    border-radius: 14px !important;
    color: #3A5A40 !important;
    font-weight: 600;
    padding: 0.6rem 1rem;
}

.bg-blue-600 {
    background-color: #08223D !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(8, 34, 61, 0.22) !important;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none !important;
}
.bg-blue-600:hover,
.hover\:bg-blue-700:hover {
    background-color: #3A5A40 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(58, 90, 64, 0.28) !important;
}

#languageToggle {
    color: #3A5A40 !important;
    border: none !important;
    background-color: rgba(58, 90, 64, 0.1) !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.15s;
}
#languageToggle:hover,
.hover\:bg-green-100:hover {
    background-color: rgba(58, 90, 64, 0.2) !important;
    transform: translateY(-1px);
}

#monthlyInstallment {
    color: #3A5A40 !important;
    font-size: 2.75rem !important;
}

div.bg-purple-50 {
    background-color: #3A5A40 !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 16px rgba(58, 90, 64, 0.18) !important;
}
div.bg-purple-50 p.text-sm {
    color: rgba(236, 234, 235, 0.75) !important;
}
div.bg-purple-50 .text-purple-600,
.text-purple-600 {
    color: #ffffff !important;
}
div.bg-purple-50 p.font-bold {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}

div.bg-blue-50 {
    background-color: #08223D !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 16px rgba(8, 34, 61, 0.16) !important;
}
div.bg-blue-50 p.text-sm {
    color: rgba(236, 234, 235, 0.65) !important;
}
div.bg-blue-50 .text-blue-600,
.text-blue-600 {
    color: #ffffff !important;
}
div.bg-blue-50 p.font-bold {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}

div.bg-green-50 {
    background-color: #B87432 !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 16px rgba(184, 116, 50, 0.22) !important;
}
div.bg-green-50 p.text-sm {
    color: rgba(236, 234, 235, 0.78) !important;
}
div.bg-green-50 .text-green-600,
.text-green-600 {
    color: #ffffff !important;
}
div.bg-green-50 p.font-bold {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}

div.bg-blue-50.p-3 {
    background-color: rgba(8, 34, 61, 0.07) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}
div.bg-blue-50.p-3 p {
    color: #08223D !important;
}
div.bg-green-50.p-3 {
    background-color: rgba(184, 116, 50, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}
div.bg-green-50.p-3 p {
    color: #7a4a10 !important;
}
div.bg-purple-50.p-3 {
    background-color: rgba(58, 90, 64, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}
div.bg-purple-50.p-3 p {
    color: #3A5A40 !important;
}
.text-blue-800 { color: #08223D !important; }
.text-green-800 { color: #3A5A40 !important; }
.text-purple-800 { color: #3A5A40 !important; }

.payment-schedule-table {
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
}
.payment-schedule-table thead tr {
    background-color: #3A5A40 !important;
}
.payment-schedule-table thead th {
    color: #ECEAEB !important;
    background-color: #3A5A40 !important;
    font-family: inherit;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}
.payment-schedule-table thead th:first-child {
    border-radius: 12px 0 0 0;
}
.payment-schedule-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

tr.bg-purple-50 {
    background-color: rgba(58, 90, 64, 0.08) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
tr.bg-green-50 {
    background-color: rgba(184, 116, 50, 0.07) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
tr.bg-blue-50 {
    background-color: rgba(8, 34, 61, 0.04) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
tr.bg-purple-50 td,
tr.bg-green-50 td,
tr.bg-blue-50 td {
    color: #08223D !important;
}
.hover\:bg-gray-50:hover {
    background-color: rgba(115, 139, 101, 0.1) !important;
}
.divide-y.divide-gray-200 > tr {
    border-top: 1px solid rgba(8, 34, 61, 0.06);
}

.date-edit-icon {
    color: #3A5A40;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s;
}
.amount-edit-icon {
    color: #B87432;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s;
}
.date-edit-icon:hover,
.amount-edit-icon:hover {
    opacity: 1;
}

#dateEditModal .bg-white,
#amountEditModal .bg-white {
    border-radius: 24px !important;
    box-shadow: 0 12px 48px rgba(8, 34, 61, 0.18) !important;
}
.bg-yellow-50 {
    background-color: rgba(184, 116, 50, 0.1) !important;
    border: none !important;
    border-radius: 14px !important;
}
.text-yellow-800 {
    color: #7a4a10 !important;
}
#saveEditDate,
#saveEditAmount {
    background-color: #3A5A40 !important;
    border-radius: 50px !important;
    border: none !important;
}
#saveEditDate:hover,
#saveEditAmount:hover {
    background-color: #2d4732 !important;
}
#cancelEditDate,
#cancelEditAmount {
    border-radius: 50px !important;
    background-color: #f0eeec !important;
    color: #08223D !important;
    border: none !important;
}
#cancelEditDate:hover,
#cancelEditAmount:hover {
    background-color: #e0dcda !important;
}

.error-input {
    background-color: rgba(220, 38, 38, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25) !important;
}
.error-message {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.success-message {
    color: #3A5A40;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.warning-message {
    color: #B87432;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
#globalErrors {
    border-radius: 18px !important;
    border: none !important;
    background-color: rgba(220, 38, 38, 0.08) !important;
}

.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}
.input-container {
    position: relative;
}
.text-gray-600,
.text-gray-700 {
    color: #5a6a7a !important;
}
.text-gray-900 {
    color: #08223D !important;
}
label {
    color: #08223D !important;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}
input[type="checkbox"] {
    border-radius: 6px !important;
    background-color: #f0eeec !important;
    accent-color: #3A5A40;
    width: 1rem;
    height: 1rem;
    padding: 0 !important;
}

@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    .space-y-3 > * + * {
        margin-top: 1rem;
    }
    .hide-on-mobile {
        display: none;
    }
    #checkboxsplit {
        padding-top: 0.5rem !important;
        padding-left: 0.5rem !important;
    }
    .payment-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .payment-summary-grid > div:last-child {
        grid-column: 1 / -1;
    }
    .payment-schedule-table {
        min-width: 400px;
    }
}
@media (min-width: 768px) {
    .payment-summary-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: #ffffff !important;
    }
    .bg-white {
        box-shadow: none !important;
    }
}
