@font-face {
    font-family: 'Anek Telugu';
    font-style: normal;
    font-weight: 400 700;
    src: url('https://fonts.gstatic.com/s/anektelugu/v2/XLLzR22uF5ibqqY62zT2v2tK.ttf') format('truetype');
}

:root {
    --form-ink: #17233b;
    --form-muted: #63718a;
    --form-primary: #2357d8;
    --form-primary-dark: #1944b3;
    --form-accent: #12a895;
    --form-border: #dce4ef;
    --form-surface: #ffffff;
    --form-background: #f2f5fa;
}

body {
    min-height: 100vh;
    padding: 38px 0 64px;
    background:
        radial-gradient(ellipse at 10% 0%, rgba(35, 87, 216, 0.09), transparent 34rem),
        radial-gradient(ellipse at 100% 12%, rgba(18, 168, 149, 0.08), transparent 30rem),
        var(--form-background);
    color: var(--form-ink);
    font-family: 'Anek Telugu', 'Nirmala UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.container {
    max-width: 1100px;
}

.card {
    overflow: hidden;
    padding: clamp(22px, 4vw, 46px) !important;
    border: 1px solid rgba(220, 228, 239, 0.9);
    border-radius: 22px;
    background: var(--form-surface);
    box-shadow: 0 24px 70px rgba(27, 45, 80, 0.11);
}

.card > .text-center {
    position: relative;
    margin: calc(clamp(22px, 4vw, 46px) * -1) calc(clamp(22px, 4vw, 46px) * -1) 32px !important;
    padding: 36px 24px 30px;
    background: linear-gradient(125deg, #173775 0%, #2357d8 62%, #2777c8 100%);
    color: #fff;
}

.card > .text-center::after {
    position: absolute;
    right: -54px;
    bottom: -96px;
    width: 240px;
    height: 190px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    content: "";
    transform: rotate(-24deg);
}

.card > .text-center h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    color: #fff !important;
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: 0.01em;
}

.card > .text-center h3 i {
    color: #9af0df;
}

.card > .text-center p {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 1rem;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 23px 0 12px;
    padding: 9px 14px;
    border: 1px solid #e1e9f5;
    border-left: 4px solid var(--form-accent);
    border-radius: 11px;
    background: linear-gradient(100deg, #f3f7ff, #f8fbff);
    color: #203b70;
    font-size: 1.08rem;
    font-weight: 700;
}

.form-section-header i {
    color: var(--form-primary);
}

.form-step[hidden] {
    display: none !important;
}

.wizard-progress {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid var(--form-border);
    border-radius: 12px;
    background: #fbfcff;
}

.wizard-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    color: var(--form-muted);
    font-size: 0.9rem;
}

.wizard-progress-copy strong {
    color: var(--form-primary);
}

.wizard-progress .progress {
    height: 7px;
    border-radius: 999px;
    background: #e7edf7;
}

.wizard-progress .progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--form-primary), var(--form-accent));
    transition: width 0.2s ease;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e8edf5;
}

.btn-wizard {
    min-height: 42px;
    padding: 8px 20px;
    border: 1px solid var(--form-primary);
    border-radius: 10px;
    background: var(--form-primary);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
}

.btn-wizard:hover,
.btn-wizard:focus-visible {
    border-color: var(--form-primary-dark);
    background: var(--form-primary-dark);
    color: #fff;
}

.btn-wizard-back {
    border-color: var(--form-border);
    background: #fff;
    color: var(--form-ink);
}

.btn-wizard-back:hover,
.btn-wizard-back:focus-visible {
    border-color: #b7c5dd;
    background: #f3f6fb;
    color: var(--form-ink);
}

.additional-agreement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.additional-agreement-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--form-border);
    border-radius: 10px;
    background: #f8faff;
    color: var(--form-muted);
    font-size: 0.88rem;
}

.additional-agreement-summary strong {
    color: var(--form-primary);
    font-size: 1.15rem;
}

.additional-agreement-table {
    min-width: 720px;
    font-size: 0.88rem;
}

.additional-agreement-table th {
    background: #f3f7fd;
    color: #263650;
    white-space: nowrap;
}

.additional-agreement-table td:first-child {
    width: 70px;
    text-align: center;
}

.additional-agreement-table td:nth-child(3) {
    width: 170px;
}

.additional-agreement-table td:last-child {
    width: 100px;
}

.additional-agreement-table textarea {
    min-width: 280px;
}

.additional-total-status {
    margin-top: 16px;
    font-weight: 650;
}

.needs-validation .row.g-3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px 18px;
    margin-right: 0;
    margin-left: 0;
}

.needs-validation .row.g-3 > [class*="col-"] {
    width: auto;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.needs-validation .row.g-3 > .col-md-12 {
    grid-column: 1 / -1;
}

.needs-validation .flat-details-grid {
    grid-template-columns: minmax(0, 1fr);
}

.needs-validation .row.g-3.basic-details-grid {
    grid-template-columns: minmax(0, 1fr);
}

.basic-details-grid.has-two-purchasers {
    grid-template-columns: minmax(0, 1fr);
}

.building-info-card {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid #dce8f8;
    border-left: 4px solid var(--form-primary);
    border-radius: 12px;
    background: #f4f8ff;
}

.building-info-card h6 {
    margin-bottom: 8px !important;
    font-size: 1rem;
}

.building-info-card .text-muted {
    row-gap: 8px;
}

.form-label {
    margin-bottom: 4px;
    color: #263650;
    font-size: 0.96rem;
    font-weight: 650;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 39px;
    border-color: var(--form-border);
    border-radius: 9px;
    background-color: #fff;
    color: var(--form-ink);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control,
.form-select {
    padding: 6px 11px;
}

.input-group > .form-control,
.input-group > .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background: #f3f6fb;
    color: #43536d;
}

.form-control::placeholder {
    color: #9aa6b8;
    opacity: 1;
    font-size: 0.86rem;
}

textarea.form-control {
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #7da3f5;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(35, 87, 216, 0.12);
}

.form-control[readonly] {
    background: #f4f7fc;
    color: #254c9d;
    font-weight: 650;
}

.date-picker-group {
    position: relative;
}

.date-picker-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    border: 1px solid var(--form-border);
    border-left: 0;
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
    background: #f3f6fb;
    color: #43536d;
    cursor: pointer;
}

.date-picker-button:hover,
.date-picker-button:focus-visible {
    background: #e7eef9;
    color: var(--form-primary);
}

.date-picker-button:focus-visible {
    position: relative;
    z-index: 2;
    outline: 3px solid rgba(35, 87, 216, 0.3);
    outline-offset: 1px;
}

.date-picker-source {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.form-text {
    margin-top: 3px;
    color: var(--form-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.registration-value-breakdown {
    padding: 6px 9px;
    border-left: 3px solid var(--form-accent);
    border-radius: 0 6px 6px 0;
    background: #f3f8f8;
    color: #43536d;
    line-height: 1.55;
}

.invalid-feedback {
    font-size: 0.84rem;
}

.btn-submit {
    min-height: 44px;
    padding: 9px 28px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(115deg, var(--form-primary), #3475eb);
    box-shadow: 0 10px 24px rgba(35, 87, 216, 0.24) !important;
    color: #fff;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-submit:hover,
.btn-submit:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(115deg, var(--form-primary-dark), #2865d4);
    box-shadow: 0 14px 28px rgba(35, 87, 216, 0.3) !important;
    color: #fff;
}

.submission-footer {
    margin-top: 30px;
    padding: 20px 16px 8px;
    border-top: 1px solid #e8edf5;
}

.submission-footer .form-text {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    body {
        padding: 12px 0 28px;
    }

    .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .card {
        border-radius: 16px;
    }

    .card > .text-center {
        padding: 28px 17px 24px;
    }

    .form-section-header {
        margin-top: 18px;
        padding: 8px 12px;
        font-size: 1rem;
    }

    .btn-submit {
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    .wizard-navigation .btn {
        flex: 1;
    }

    .additional-agreement-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 768px) {
    .needs-validation .row.g-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .needs-validation .flat-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .needs-validation .row.g-3.basic-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .basic-details-grid.has-two-purchasers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .needs-validation .row.g-3:not(.flat-details-grid) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .needs-validation .row.g-3.basic-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .needs-validation .row.g-3.basic-details-grid.has-two-purchasers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .needs-validation .row.g-3.additional-owner-fields {
        grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 2fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
