:root {
    --black: #000000;
    --black-soft: #171717;
    --white: #ffffff;
    --page: #f4f4f2;
    --text: #111111;
    --muted: #777777;
    --border: #dddddd;
    --border-dark: #bdbdbd;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 24px 0;
}

.form-wrap {
    width: 100%;
    max-width: 720px;
}

.form-card,
.success-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
}

.form-card {
    padding: clamp(24px, 4vw, 40px);
    animation: fade-up 0.4s ease both;
}

.form-card h1,
.success-card h1 {
    margin: 0;
    color: var(--black);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.form-card h1 {
    margin-bottom: 28px;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.form-label {
    margin-bottom: 7px;
    color: #222222;
    font-size: 0.84rem;
    font-weight: 600;
}

.form-label span {
    color: var(--black);
}

.form-label small {
    margin-left: 6px;
    color: #9a9a9a;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-control {
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--white);
    padding: 11px 13px;
    color: var(--text);
    box-shadow: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.form-control:hover {
    border-color: var(--border-dark);
}

.form-control:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger);
    box-shadow: none;
}

.invalid-feedback {
    font-size: 0.75rem;
}

.alert {
    margin-bottom: 22px;
    border-radius: 9px;
    font-size: 0.86rem;
}

.client-toggle {
    margin-top: 22px;
    padding: 14px 0;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}

.form-switch {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin: 0;
    padding-left: 3.25rem;
}

.form-switch .form-check-input {
    width: 2.55rem;
    height: 1.35rem;
    margin-top: 0;
    margin-left: -3.25rem;
    border-color: #b9b9b9;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    border-color: var(--black);
    background-color: var(--black);
}

.form-switch .form-check-input:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.form-check-label {
    color: var(--black);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.client-fields {
    padding-top: 22px;
    animation: reveal 0.22s ease both;
}

.btn-dark {
    --bs-btn-bg: var(--black);
    --bs-btn-border-color: var(--black);
    --bs-btn-hover-bg: var(--black-soft);
    --bs-btn-hover-border-color: var(--black-soft);
    --bs-btn-active-bg: var(--black);
    --bs-btn-active-border-color: var(--black);
    --bs-btn-disabled-bg: var(--black);
    --bs-btn-disabled-border-color: var(--black);
}

.submit-button,
.success-card .btn {
    min-height: 50px;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 600;
}

.submit-button {
    margin-top: 24px;
}

/* Success */
.success-card {
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(32px, 6vw, 56px);
    animation: fade-up 0.4s ease both;
}

.success-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-icon circle,
.success-icon path {
    fill: none;
    stroke: var(--black);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-icon circle {
    stroke-width: 2.4;
    stroke-dasharray: 185;
    stroke-dashoffset: 185;
    animation: draw 0.5s 0.08s ease forwards;
}

.success-icon path {
    stroke-width: 3.6;
    stroke-dasharray: 58;
    stroke-dashoffset: 58;
    animation: draw 0.4s 0.5s ease forwards;
}

.success-card h1 {
    font-size: clamp(1.9rem, 5vw, 2.5rem);
}

.success-card p {
    margin: 10px 0 24px;
    color: var(--muted);
    font-size: 0.94rem;
}

.confirmation-box {
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fafafa;
}

.confirmation-box span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.confirmation-box strong {
    color: var(--black);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 575.98px) {
    .page-shell {
        align-items: flex-start;
        padding: 14px 0;
    }

    .form-card,
    .success-card {
        border-radius: 14px;
    }

    .form-card h1 {
        margin-bottom: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
