/* =========================================================
   CAREFORCE - FORMS / AUTH / ONBOARDING
   Page-specific form styles. Depends on variables in main.css.
========================================================= */

.form-page {
    background: #f5f5f5;
}

.form-page .site-footer,
.auth-page .site-footer,
.confirmation-page .site-footer {
    display: none;
}

/* =========================================================
   COMMON FORM CONTROLS
========================================================= */

.cf-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #3e3e3e;
    font-size: 0.88rem;
}

.form-control {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--blue);
    border-radius: 12px;
    outline: none;
    background: var(--white);
    color: #222;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

textarea.form-control {
    min-height: 95px;
    padding: 15px 16px;
    resize: vertical;
}

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

.form-control::placeholder {
    color: #aaa;
}

select.form-control {
    appearance: auto;
}

.form-control-readonly {
    background: #f3f5f7;
    color: #666;
    cursor: not-allowed;
}

.form-help {
    margin-top: 6px;
    color: #888;
    font-size: 0.74rem;
}

/* =========================================================
   AUTH
========================================================= */

.auth-shell,
.confirmation-shell {
    min-height: calc(100vh - var(--header-height));
    background-position: center;
    background-size: cover;
}

.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-image:
        linear-gradient(rgba(39, 52, 53, 0.57), rgba(39, 52, 53, 0.57)),
        var(--auth-bg);
}

.auth-card {
    width: min(1170px, 100%);
    min-height: 720px;
    display: flex;
    justify-content: center;
    padding: 65px 30px;
    border-radius: 38px;
    background: var(--white);
}

.auth-content {
    width: min(580px, 100%);
}

.auth-title {
    margin: 0 0 42px;
    text-align: center;
    font-size: 2rem;
    font-weight: 500;
}

.brand-blue {
    color: var(--blue);
}

.brand-green {
    color: var(--green);
}

.auth-card .form-control {
    border-color: #c8c8c8;
}

.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: none;
    color: #888;
    font: inherit;
    cursor: pointer;
}

.password-toggle-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-icon-hide {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-icon-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-icon-hide {
    display: block;
}

.auth-link {
    color: var(--green);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 64px;
    margin-top: 25px;
    border: 0;
    border-radius: var(--pill);
    background: var(--blue);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.auth-secondary {
    margin: 56px 0;
    text-align: center;
    color: #777;
}

.auth-terms {
    margin: 38px 0 26px;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 65px;
}

.social-divider::before,
.social-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d6d6d6;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 34px;
    margin-top: 25px;
}

.social-login img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.auth-account-notice {
    margin: 10px 0 24px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.auth-account-notice a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-account-notice a:hover {
    text-decoration: underline;
}


/* =========================================================
   SHARED ONBOARDING / REQUEST PANELS
========================================================= */

.onboarding-page,
.request-page,
.preview-page,
.consent-page {
    background: #f5f5f5;
}

.onboarding-page {
    padding: 60px 0;
}

.onboarding-card,
.request-card {
    display: grid;
    overflow: hidden;
    border-radius: 38px;
    background: var(--white);
}

.onboarding-card {
    grid-template-columns: 44% 56%;
    min-height: 720px;
}

.onboarding-intro,
.request-intro {
    position: relative;
    overflow: hidden;
    border-radius: 90px 0 90px 0;
    color: var(--white);
}

.onboarding-intro {
    min-height: 720px;
    padding: 80px 90px;
    background: linear-gradient(160deg, #03487c 0%, #0069c8 62%, #0784ef 100%);
}

.onboarding-intro h1,
.request-intro h1 {
    margin: 0 0 25px;
    line-height: 1.08;
}

.onboarding-intro h1 {
    max-width: 430px;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.onboarding-intro p {
    max-width: 420px;
    margin: 0 0 18px;
}

.onboarding-intro a,
.request-intro a {
    color: var(--green);
    text-decoration: underline;
}

.onboarding-character,
.request-character {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
}

.onboarding-character {
    width: 68%;
    max-height: 55%;
    object-fit: contain;
    object-position: bottom;
}

.onboarding-content {
    padding: 34px 52px 40px;
}

.onboarding-content h2 {
    margin: 30px 0;
    font-size: 1.35rem;
}

/* =========================================================
   STEPPER
========================================================= */

.nurse-steps {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.nurse-step {
    position: relative;
    flex: 1;
    text-align: center;
}

.nurse-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 60%;
    width: 80%;
    border-top: 2px dashed #969fa8;
}

.nurse-step.is-done:not(:last-child)::after,
.nurse-step.is-active:not(:last-child)::after {
    border-color: var(--blue);
}

.step-circle {
    position: relative;
    z-index: 2;
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    margin: auto;
    border: 2px solid #949da7;
    border-radius: 50%;
    background: var(--white);
    color: #737d88;
}

.nurse-step.is-done .step-circle {
    border-color: var(--blue);
    color: var(--blue);
}

.nurse-step.is-active .step-circle {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

.step-label {
    display: block;
    margin-top: 10px;
    color: #949ba4;
    font-size: 0.72rem;
}

.nurse-step.is-active .step-label,
.nurse-step.is-done .step-label {
    color: var(--blue);
}

.nurse-step.is-active .step-label {
    font-weight: 600;
}

.nurse-step {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.nurse-step:hover .step-circle {
    border-color: #087ee5;
}

.nurse-step:hover .step-label {
    color: #087ee5;
}

/* =========================================================
   PROFILE / FILE UPLOAD
========================================================= */

.personal-layout {
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 30px;
}

.profile-upload,
.upload-guide-item {
    text-align: center;
}

.profile-drop {
    width: 130px;
    height: 135px;
    display: grid;
    place-items: center;
    border: 1px dashed #6f7983;
    overflow: hidden;
    cursor: pointer;
}

.profile-drop span {
    color: #75808a;
    font-size: 2rem;
}

.profile-upload-button {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 11px;
    border: 1px solid var(--green);
    border-radius: 5px;
    background: var(--white);
    color: var(--green-dark);
    font-size: 0.72rem;
    cursor: pointer;
}

.profile-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-guide {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 20px 0 28px;
}

.upload-guide-item {
    font-size: 0.68rem;
}

.upload-guide-item img {
    width: 100%;
    aspect-ratio: 1.3;
    margin-bottom: 8px;
    border-radius: 7px;
    object-fit: cover;
}

.file-drop {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border: 1px solid var(--blue);
    border-radius: 12px;
    cursor: pointer;
}

.file-drop strong {
    color: #6469ff;
    font-weight: 400;
}

/* =========================================================
   RATING CONTROLS
========================================================= */

.rating-card {
    margin-bottom: 20px;
    padding: 17px 20px 12px;
    border: 1px solid var(--blue);
    border-radius: 12px;
}

.rating-card h3 {
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.rating-options {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 10px;
}

.rating-options input {
    position: absolute;
    opacity: 0;
}

.rating-options label {
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #d9dee4;
    border-radius: 9px;
    cursor: pointer;
}

.rating-options input:checked + label {
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 2px 6px rgba(0, 126, 239, 0.2);
}

.rating-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.72rem;
}

.rating-scale span:first-child {
    color: #ff8500;
}

.rating-scale span:last-child {
    color: #00a96a;
}

/* =========================================================
   KIT
========================================================= */

.kit-heading {
    margin: 0 0 25px;
    text-align: center;
    font-size: 1rem;
}

.kit-list {
    display: grid;
    gap: 20px;
}

.kit-item {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 28px;
}

.kit-item img {
    width: 128px;
    height: 115px;
    border-radius: 12px;
    object-fit: cover;
}

.kit-item h3 {
    margin: 5px 0 8px;
    font-size: 0.95rem;
}

.kit-item p {
    margin: 0 0 13px;
    color: #999;
    font-size: 0.78rem;
}

.kit-choice {
    display: flex;
    gap: 38px;
}

.choice-btn,
.form-previous,
.edit-btn {
    background: var(--white);
    cursor: pointer;
}

.choice-btn {
    padding: 7px 18px;
    border: 1px solid var(--blue);
    border-radius: var(--pill);
    color: var(--blue);
}

.choice-btn.no {
    border-color: #e73b49;
    color: #d82938;
}

/* =========================================================
   FORM NAVIGATION
========================================================= */

.form-next {
    width: min(380px, 100%);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 30px auto 0;
    border: 0;
    border-radius: var(--pill);
    background: var(--blue);
    color: var(--white);
    font-size: 1.15rem;
    cursor: pointer;
}

.form-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 35px;
}

.form-previous {
    padding: 10px 20px;
    border: 1px solid #168c82;
    border-radius: var(--pill);
    color: #168c82;
}

/* =========================================================
   REQUEST CARE
========================================================= */

.request-page {
    padding: 50px 0;
}

.request-card {
    grid-template-columns: 42% 58%;
}

.request-intro {
    min-height: 690px;
    padding: 80px 62px;
    background: linear-gradient(165deg, #034a7e, var(--blue));
}

.request-intro h1 {
    margin-bottom: 30px;
    font-size: 2.8rem;
}

.request-character {
    width: 64%;
}

.request-form {
    padding: 50px;
}

/* =========================================================
   CONFIRMATION
========================================================= */

.confirmation-shell {
    display: grid;
    place-items: center;
    padding: 25px;
    background-image:
        linear-gradient(rgba(38, 51, 52, 0.55), rgba(38, 51, 52, 0.55)),
        var(--confirm-bg);
}

.confirmation-card {
    position: relative;
    width: min(1220px, 100%);
    min-height: 750px;
    overflow: hidden;
    padding: 75px 40px 0;
    border-radius: 38px;
    background: var(--white);
    text-align: center;
}

.confirmation-card h1 {
    margin: 0 0 22px;
}

.confirmation-card p {
    max-width: 650px;
    margin: auto;
    font-size: 1.03rem;
}

.confirmation-card .btn {
    width: min(370px, 100%);
    margin-top: 65px;
}

.confirmation-image {
    width: 340px;
    max-height: 390px;
    margin: 25px auto 0;
    object-fit: contain;
    object-position: bottom;
}

/* =========================================================
   PREVIEW
========================================================= */

.preview-page {
    padding: 35px 0 60px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.preview-header h1 {
    margin: 0;
    color: var(--blue);
    font-size: 1.5rem;
}

.preview-step {
    color: var(--green);
    font-size: 1.4rem;
    font-weight: 600;
}

.preview-card {
    margin-bottom: 28px;
    padding: 28px;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    background: var(--white);
}

.preview-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.preview-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 60px;
}

.preview-label {
    display: block;
    color: #606060;
}

.preview-value {
    display: block;
    margin-top: 3px;
    font-size: 1.12rem;
    font-weight: 600;
}

.edit-btn {
    padding: 8px 17px;
    border: 1px solid #299f43;
    border-radius: var(--pill);
    color: #299f43;
}

/* =========================================================
   CONSENT
========================================================= */

.consent-page {
    position: relative;
    padding: 190px 0 70px;
}

.consent-card {
    position: relative;
    width: min(940px, calc(100% - 40px));
    margin: auto;
    padding: 38px 52px 60px;
    border-radius: 0 80px 0 0;
    background: var(--white);
}

.consent-top-image {
    position: absolute;
    width: 190px;
    top: -175px;
    left: 50%;
    transform: translateX(-50%);
}

.consent-bottom-image {
    position: absolute;
    width: 170px;
    right: -110px;
    bottom: 0;
}

.consent-card > h1,
.consent-card > p {
    text-align: center;
}

.consent-card section {
    margin-top: 35px;
}

.consent-card section h2 {
    color: var(--blue);
    font-size: 1.15rem;
}

.consent-card li {
    margin-bottom: 10px;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 17px 0;
    font-weight: 600;
}

.profile-drop.is-dragging,
.file-drop.is-dragging {
    background: rgba(8, 125, 229, 0.06);
    border-color: var(--blue);
}

.profile-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.choice-btn.is-selected {
    background: var(--blue);
    color: var(--white);
}

.choice-btn.no.is-selected {
    background: #e73b49;
    color: var(--white);
}















/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 950px) {
    .onboarding-card,
    .request-card {
        grid-template-columns: 1fr;
    }

    .onboarding-intro,
    .request-intro {
        min-height: 430px;
    }

    .onboarding-character,
    .request-character {
        width: 280px;
    }

    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .form-row,
    .personal-layout {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        padding: 15px;
    }

    .auth-card {
        min-height: auto;
        padding: 45px 20px;
        border-radius: 24px;
    }

    .onboarding-page {
        padding: 15px 0;
    }

    .onboarding-card {
        border-radius: 24px;
    }

    .onboarding-intro {
        padding: 55px 28px;
    }

    .onboarding-content {
        padding: 30px 22px;
    }

    .nurse-steps {
        overflow-x: auto;
    }

    .nurse-step {
        min-width: 105px;
    }

    .upload-guide {
        grid-template-columns: repeat(2, 1fr);
    }

    .rating-options {
        grid-template-columns: repeat(6, 1fr);
    }

    .kit-item {
        grid-template-columns: 90px 1fr;
    }

    .kit-item img {
        width: 90px;
        height: 90px;
    }

    .request-form {
        padding: 30px 22px;
    }

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

    .confirmation-card {
        min-height: 650px;
    }

    .consent-card {
        padding: 30px 24px 50px;
    }

    .consent-bottom-image {
        display: none;
    }
}


/* =========================================================
   CARE REQUEST OTP / ACCOUNT / WALLET
========================================================= */

.form-feedback {
    min-height: 20px;
    color: #a72828;
}

.care-otp-panel {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid #cfe4f8;
    border-radius: 14px;
    background: #f8fcff;
}

.care-otp-panel h3 {
    margin: 0 0 8px;
}

.care-otp-input {
    max-width: 240px;
    font-size: 1.35rem;
    letter-spacing: 0.3em;
    text-align: center;
}

.account-page {
    min-height: 70vh;
    padding: 55px 0 80px;
    background: #f6f8fb;
}

.account-shell {
    display: grid;
    gap: 26px;
}

.account-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.account-heading h1 {
    margin: 0;
}

.account-heading p {
    margin: 5px 0 0;
    color: #6d737a;
}

.account-heading .account-holder-name {
    margin-top: 10px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.wallet-card,
.account-requests {
    padding: 26px;
    border: 1px solid #e3e7ec;
    border-radius: 16px;
    background: #fff;
}

.wallet-card > span {
    display: block;
    color: #6b7178;
    font-size: 0.82rem;
}

.wallet-card > strong {
    display: block;
    margin: 6px 0 20px;
    font-size: 2rem;
}

.wallet-card small {
    display: block;
    margin: -14px 0 18px;
    color: #777d84;
}

.wallet-action {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.wallet-action-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.recent-care-requests {
    min-width: 0;
}

.account-request-table-wrap {
    max-width: 100%;
    margin: 18px 0 24px;
    overflow-x: auto;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
}

.account-request-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
    font-size: 0.9rem;
}

.request-recipient-col {
    width: 34%;
}

.request-type-col {
    width: 46%;
}

.request-status-col {
    width: 20%;
}

.account-request-table th,
.account-request-table td {
    padding: 14px 16px;
    vertical-align: middle;
    overflow-wrap: anywhere;
    border-bottom: 1px solid #e3e7ec;
}

.account-request-table th {
    background: #eef3f8;
    color: #43566c;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.account-request-table tbody tr:last-child td {
    border-bottom: 0;
}

.account-request-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.account-request-table tbody tr:hover {
    background: #f1f6fc;
}

@media (max-width: 760px) {
    .wallet-grid,
    .wallet-action-row {
        grid-template-columns: 1fr;
    }

    .account-request-table th,
    .account-request-table td {
        padding: 12px;
    }
}


/* =========================================================
   WORK-SCHEDULE AGREEMENTS
========================================================= */

.agreement-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.agreement-card {
    padding: 20px;
    border: 1px solid #e2e7ec;
    border-radius: 14px;
    background: #fbfcfe;
}

.agreement-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.agreement-card-heading span,
.agreement-details span {
    display: block;
    color: #70767d;
    font-size: 0.76rem;
}

.agreement-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf5ff;
    color: var(--blue) !important;
    white-space: nowrap;
}

.agreement-details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.agreement-details strong {
    display: block;
    margin-top: 3px;
    font-size: 0.88rem;
}

.agreement-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.agreement-note {
    margin: 0;
    color: #666d74;
    font-size: 0.86rem;
}

@media (max-width: 850px) {
    .agreement-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .agreement-card-heading,
    .agreement-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .agreement-details {
        grid-template-columns: 1fr;
    }
}


.profile-photo-error {
    min-height: 18px;
    color: #b42318;
}


.document-check-message[data-state="error"] {
    color: #b42318;
}

.document-check-message[data-state="success"] {
    color: #168c82;
}


.preview-photo-wrap {
    display: flex;
    justify-content: flex-end;
}

.preview-profile-photo {
    width: 145px;
    height: 145px;
    border: 1px solid #69c77a;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.preview-document-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #e2e6eb;
    border-radius: 10px;
}

.preview-document-name {
    display: block;
    margin: 3px 0;
    font-weight: 600;
}

.preview-document-row small {
    color: #9aa0a6;
}

.preview-document-actions {
    display: flex;
    gap: 22px;
}

.preview-document-actions a:first-child {
    color: var(--blue);
}

.preview-document-actions a:last-child {
    color: var(--green-dark);
}

.preview-card .preview-value {
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .preview-document-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-photo-wrap {
        justify-content: flex-start;
    }
}
