﻿
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.projectform-scope {
    --navy: #092b57;
    --blue: #0759a6;
    --bright: #1677d2;
    --sky: #eaf4ff;
    --pale: #f5f9ff;
    --ink: #172b4d;
    --muted: #63748b;
    --line: #d9e4f1;
    --white: #ffffff;
    --danger: #c62828;
    --danger-bg: #fff1f0;
    --success: #18794e;
    --success-bg: #eaf8f0;
    --shadow: 0 8px 28px rgba(9, 43, 87, .065);
    color: var(--ink);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    width: 100%;
}

    .projectform-scope *,
    .projectform-scope *::before,
    .projectform-scope *::after {
        box-sizing: border-box;
    }

    .projectform-scope [hidden] {
        display: none !important;
    }
[hidden] {
    display: none !important;
}


    .projectform-scope .page {
        width: 100%;
        max-width: 850px;
        margin: 0 auto;
        padding: 10px 0 48px;
        display: flex;
        flex-direction: column;
        gap: 22px;
    }

    .projectform-scope #projectForm {
        gap: 20px;
    }

    .projectform-scope .step {
        position: relative;
        min-width: 0;
        padding: 27px;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 17px;
        box-shadow: var(--shadow);
        display: flex;
        flex-direction: column;
        gap: 21px;
    }

    .projectform-scope .step-head {
        display: flex;
        align-items: center;
        gap: 13px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e9eff7;
    }

    .projectform-scope .num {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--navy), var(--bright));
        color: #fff;
        font-size: 15px;
        font-weight: 800;
        box-shadow: 0 5px 12px rgba(7, 89, 166, .18);
    }

    .projectform-scope h2 {
        margin: 0;
        color: var(--navy);
        font-size: 20px;
        font-weight: 800;
        letter-spacing: -.45px;
        line-height: 1.35;
    }

    .projectform-scope .sub {
        margin: 0;
        padding: 0;
        color: var(--navy);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .9px;
        text-transform: uppercase;
    }

        .projectform-scope .sub b,
        .projectform-scope .field label b {
            color: var(--danger);
        }

    .projectform-scope fieldset {
        border: 0;
        padding: 0;
        margin: 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 11px;
    }

    .projectform-scope legend {
        margin-bottom: 10px;
    }

    .projectform-scope .cards {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }

        .projectform-scope .cards.cols {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

    .projectform-scope .card {
        position: relative;
        min-width: 0;
        min-height: 66px;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
        border: 1.5px solid var(--line);
        border-radius: 12px;
        background: #fff;
        cursor: pointer;
        transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
    }

        .projectform-scope .card:hover {
            border-color: #83b7eb;
            background: #f8fbff;
        }

        .projectform-scope .card:has(input:checked) {
            border-color: var(--bright);
            background: var(--sky);
            box-shadow: 0 0 0 2px rgba(22, 119, 210, .07);
        }

        .projectform-scope .card input {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            opacity: 0;
            cursor: pointer;
        }

    .projectform-scope .dot {
        width: 20px;
        height: 20px;
        margin-top: 2px;
        flex: 0 0 20px;
        display: grid;
        place-items: center;
        border: 2px solid #9aabc0;
        border-radius: 50%;
        background: #fff;
    }

        .projectform-scope .dot::after {
            content: "";
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #fff;
            transform: scale(0);
            transition: transform .15s ease;
        }

    .projectform-scope .card:has(input:checked) .dot {
        border-color: var(--bright);
        background: var(--bright);
    }

        .projectform-scope .card:has(input:checked) .dot::after {
            transform: scale(1);
        }

    .projectform-scope .card:has(input:focus-visible) {
        outline: 3px solid rgba(22, 119, 210, .35);
        outline-offset: 3px;
    }

    .projectform-scope .t {
        display: block;
        min-width: 0;
        color: var(--navy);
        font-weight: 700;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .projectform-scope .s {
        display: block;
        margin-top: 3px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
    }

    .projectform-scope .tn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 25px;
        height: 25px;
        margin-right: 7px;
        border-radius: 7px;
        background: #e3efff;
        color: var(--blue);
        font-size: 12px;
        font-weight: 800;
        vertical-align: middle;
    }

    .projectform-scope .row2,
    .projectform-scope .row3 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 16px;
    }

    .projectform-scope .row3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .projectform-scope .field {
        display: flex;
        flex-direction: column;
        gap: 7px;
        min-width: 0;
    }

        .projectform-scope .field label {
            color: #344967;
            font-size: 13px;
            font-weight: 700;
            line-height: 1.5;
        }

            .projectform-scope .field label .opt {
                color: #8795a8;
                font-weight: 400;
            }

    .projectform-scope .input {
        width: 100%;
        min-width: 0;
        min-height: 47px;
        padding: 11px 13px;
        border: 1.5px solid #d5e0ed;
        border-radius: 10px;
        background: #fbfdff;
        color: var(--ink);
        font-family: inherit;
        font-size: 14px;
        line-height: 1.5;
        transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }

        .projectform-scope .input::placeholder {
            color: #9aa8b9;
        }

        .projectform-scope .input:hover {
            border-color: #a8bfd9;
        }

        .projectform-scope .input:focus {
            outline: none;
            border-color: var(--bright);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(22, 119, 210, .11);
        }

    .projectform-scope input[type="file"].input {
        padding: 9px;
        background: var(--pale);
    }

    .projectform-scope input[type="file"]::file-selector-button {
        margin-right: 12px;
        padding: 8px 12px;
        border: 0;
        border-radius: 7px;
        background: #dcecff;
        color: var(--navy);
        font-family: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .projectform-scope .invalid {
        border-color: var(--danger) !important;
        background: var(--danger-bg) !important;
        box-shadow: 0 0 0 2px rgba(198, 40, 40, .07);
    }

    .projectform-scope .card.invalid {
        background: var(--danger-bg) !important;
    }

    .projectform-scope .sep {
        width: 100%;
        height: 1px;
        border: 0;
        margin: 0;
        background: var(--line);
    }

    .projectform-scope .hint {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.7;
    }

    .projectform-scope .submit {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 5px 0;
    }

    .projectform-scope .actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .projectform-scope .btn {
        min-height: 49px;
        padding: 13px 24px;
        border: 1px solid var(--blue);
        border-radius: 10px;
        background: linear-gradient(135deg, var(--navy), var(--blue));
        color: #fff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        transition: box-shadow .18s ease, transform .18s ease, filter .18s ease;
    }

        .projectform-scope .btn:hover:not(:disabled) {
            filter: brightness(1.1);
            box-shadow: 0 7px 18px rgba(7, 89, 166, .2);
            transform: translateY(-1px);
        }

        .projectform-scope .btn:focus-visible {
            outline: 3px solid #8bc3fa;
            outline-offset: 3px;
        }

        .projectform-scope .btn:disabled {
            opacity: .6;
            cursor: wait;
            transform: none;
        }

    .projectform-scope .btn-ghost {
        border: 1.5px solid #ccd9e8;
        background: #fff;
        color: var(--navy);
        box-shadow: none;
    }

        .projectform-scope .btn-ghost:hover:not(:disabled) {
            border-color: var(--blue);
            background: var(--pale);
            color: var(--blue);
            filter: none;
            box-shadow: none;
        }

    .projectform-scope .btn-link {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--blue);
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        text-decoration: underline;
        cursor: pointer;
    }

    .projectform-scope .errors {
        margin: 0;
        padding: 15px 18px 15px 38px;
        border: 1px solid #f0b6b1;
        border-radius: 11px;
        background: var(--danger-bg);
        color: #a3211b;
        font-size: 13px;
    }

        .projectform-scope .errors li + li {
            margin-top: 5px;
        }

    .projectform-scope .success {
        width: 100%;
        margin: 0;
        padding: 15px 17px;
        border: 1px solid #b6e5cb;
        border-radius: 11px;
        background: var(--success-bg);
        color: var(--success);
        font-size: 14px;
        font-weight: 600;
    }

/* Center the complete verification panel */
.projectform-scope #verifyPanel.verify-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Center heading and description */
.projectform-scope #verifyPanel .step-head {
    justify-content: center;
    width: 100%;
}

.projectform-scope #verifyPanel > .hint {
    width: 100%;
    text-align: center;
}

/* Center input and label */
.projectform-scope #verifyPanel .verify-field {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

    .projectform-scope #verifyPanel .verify-field label {
        display: block;
        text-align: center;
    }

.projectform-scope #verifyPanel #txtSecretCode {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 10px auto 0;
    text-align: center;
    font-size: 22px;
    letter-spacing: 6px;
}

/* Center button */
.projectform-scope #verifyPanel .verify-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Center error messages and progress panel */
.projectform-scope #verifyPanel #verifyErrors {
    width: 100%;
    max-width: 420px;
    text-align: left;
}

.projectform-scope #verifyPanel .verify-progress {
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0;
    text-align: center;
}

/* Respect the hidden attribute even if other CSS sets display */
.projectform-scope #verifyPanel [hidden] {
    display: none !important;
}

.projectform-scope .panel {
    gap: 17px;
    align-items: center !important;
    text-align: center !important;
    padding: 28px;
}

        .projectform-scope .panel h2 {
            font-size: 23px;
        }

        .projectform-scope .panel p {
            margin: 0;
            max-width: 600px;
            color: var(--muted);
            font-size: 14px;
        }

    .projectform-scope .done {
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

        .projectform-scope .done li {
            display: flex;
            align-items: flex-start;
            gap: 13px;
            min-width: 0;
            padding: 15px;
            border: 1px solid var(--line);
            border-radius: 11px;
            background: #fbfdff;
        }

        .projectform-scope .done .n {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            flex: 0 0 32px;
            border-radius: 9px;
            background: var(--success-bg);
            color: var(--success);
            font-size: 12px;
            font-weight: 800;
        }

        .projectform-scope .done .ttl {
            display: block;
            color: var(--navy);
            font-size: 14px;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        .projectform-scope .done .meta {
            display: block;
            margin-top: 4px;
            color: var(--muted);
            font-size: 12px;
        }

    .projectform-scope .remember {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        padding: 13px 16px;
        border: 1px solid #c8dff7;
        border-radius: 11px;
        background: var(--sky);
        color: var(--navy);
        font-size: 12px;
    }

    .projectform-scope .modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(5, 27, 56, .65);
        backdrop-filter: blur(4px);
    }

    .projectform-scope .modal-box {
        width: 100%;
        max-width: 450px;
        padding: 32px;
        border: 1px solid #e4edf7;
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
        text-align: center;
        animation: projectFormAppear .22s ease-out;
    }

    .projectform-scope .modal-icon {
        width: 65px;
        height: 65px;
        margin: 0 auto 18px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: var(--success-bg);
        color: var(--success);
        font-size: 32px;
        font-weight: 800;
    }

    .projectform-scope .modal-box h2 {
        margin-bottom: 12px;
        font-size: 22px;
    }

    .projectform-scope .modal-box p {
        margin: 10px 0;
        color: var(--muted);
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .projectform-scope .modal-box .btn {
        width: 100%;
        margin-top: 12px;
    }

.projectform-scope .save-progress-panel {
    margin: 22px 0;
    padding: 18px;
    background: #f5f9ff;
    border: 1px solid #d5e7fb;
    border-radius: 12px;
}

.projectform-scope .progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #092b57;
}

.projectform-scope .progress-track {
    height: 12px;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #dce9f7;
}

.projectform-scope .progress-fill {
    width: 0;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #0759a6, #1677d2);
    transition: width .2s ease;
}

.projectform-scope .progress-message {
    margin-top: 9px;
    font-size: 13px;
    color: #526780;
}

.projectform-scope .progress-fill.indeterminate {
    width: 35%;
    animation: projectProgressMove 1.1s ease-in-out infinite alternate;
}
#saveActions {
    position: static !important;
    float: none !important;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    clear: both;
}
@media (max-width: 576px) {
    #saveActions {
        flex-wrap: wrap;
    }

        #saveActions .btn {
            max-width: 100%;
        }
}
@keyframes projectProgressMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(185%);
    }
}

.projectform-scope .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.projectform-scope .btn-draft {
    background: #fff;
    color: #0759a6;
    border: 1px solid #0759a6;
}

.projectform-scope .btn-submit {
    background: #0759a6;
    color: #fff;
    border: 1px solid #0759a6;
}

.projectform-scope .form-actions button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .projectform-scope .form-actions button {
        width: 100%;
    }
}

.projectform-scope .project-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 24px;
}

.projectform-scope .project-count {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    border: 1px solid #d5e7fb;
    border-radius: 12px;
    background: #f5f9ff;
    color: #526780;
    font-size: 13px;
}

    .projectform-scope .project-count span:first-child {
        color: #0759a6;
        font-size: 28px;
        font-weight: 800;
    }

.projectform-scope .project-list {
    display: grid;
    gap: 12px;
    margin: 16px 0 24px;
}

.projectform-scope .project-list-card {
    padding: 16px;
    border: 1px solid #d5e7fb;
    border-radius: 12px;
    background: #fff;
}

.projectform-scope .project-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

    .projectform-scope .project-list-heading h4 {
        margin: 0;
        color: #092b57;
        font-size: 16px;
        overflow-wrap: anywhere;
    }

.projectform-scope .project-status {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

    .projectform-scope .project-status.draft {
        color: #0759a6;
        background: #eaf4ff;
    }

    .projectform-scope .project-status.submitted {
        color: #166534;
        background: #dcfce7;
    }

.projectform-scope .project-list-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    font-size: 13px;
    color: #526780;
}

.projectform-scope .project-detail {
    overflow-wrap: anywhere;
}

    .projectform-scope .project-detail strong {
        color: #092b57;
    }

@media (max-width: 600px) {
    .projectform-scope .project-summary {
        grid-template-columns: 1fr;
    }

    .projectform-scope .project-list-details {
        grid-template-columns: 1fr;
    }
}



/* Keep action buttons visible while saving or uploading */
.projectform-scope .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.projectform-scope .form-actions .saving-active {
    /*position: sticky;*/
    bottom: 0;
    z-index: 100;
    padding: 12px;
    margin-left: -12px;
    margin-right: -12px;
    background: #ffffff;
    border-top: 1px solid #d5e7fb;
    box-shadow: 0 -5px 18px rgba(9, 43, 87, 0.10);
}

/* Mobile layout */
@media (max-width: 600px) {
    .projectform-scope .form-actions.saving-active {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .projectform-scope .form-actions.saving-active button {
        width: 100%;
    }
}

@keyframes projectFormAppear {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .projectform-scope .page {
        padding: 8px 0 30px;
        gap: 15px;
    }

    .projectform-scope .step,
    .projectform-scope .panel {
        padding: 19px;
        border-radius: 13px;
        gap: 18px;
    }

    .projectform-scope .cards.cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .projectform-scope .row2,
    .projectform-scope .row3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .projectform-scope .step-head {
        gap: 11px;
    }

    .projectform-scope h2 {
        font-size: 18px;
    }

    .projectform-scope .panel h2 {
        font-size: 21px;
    }

    .projectform-scope .actions {
        flex-direction: column;
        align-items: stretch;
    }

        .projectform-scope .actions .btn {
            width: 100%;
        }

    .projectform-scope #btnStart {
        width: 100%;
    }

    .projectform-scope .modal-box {
        padding: 24px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .projectform-scope *,
    .projectform-scope *::before,
    .projectform-scope *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}



.consent-box {
    margin: 24px 0;
    padding: 20px;
    background: #f5f9ff;
    border: 1px solid #c8def7;
    border-left: 5px solid #0759a6;
    border-radius: 12px;
    color: #183451;
}

    .consent-box h3 {
        margin: 0 0 12px;
        color: #092b57;
        font-size: 18px;
        font-weight: 800;
    }

    .consent-box p {
        margin: 0 0 12px;
        line-height: 1.7;
    }

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    margin-top: 14px;
    background: #fff;
    border: 1px solid #c8def7;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

    .consent-check input {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        margin-top: 3px;
        accent-color: #0759a6;
        cursor: pointer;
    }

.consent-error {
    margin-top: 10px !important;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
}

#btnSaveDraft:disabled,
#btnSubmitProject:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.loadingModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    background: rgba(9, 43, 87, .35);
    backdrop-filter: blur(3px);
}

.loading-card {
    width: 210px;
    padding: 25px 20px;
    text-align: center;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(9, 43, 87, .2);
}

    .loading-card img {
        width: 65px;
        height: auto;
        margin-bottom: 12px;
    }

    .loading-card p {
        margin: 0;
        color: var(--navy);
        font-size: 13px;
        font-weight: 600;
    }
