/* ================================================================
   KYC PORTAL
   Asia Securities Wealth Management
================================================================ */


/* ================================================================
   RESET
================================================================ */

* {
    box-sizing: border-box;
}


:root {
    --kyc-navy: #062360;
    --kyc-navy-deep: #03183f;
    --kyc-blue-grey: #8dafcb;
    --kyc-blue-grey-soft: #eaf2f8;
    --kyc-ink: #172338;
    --kyc-muted: #5e6d81;
    --kyc-line: #d7e1ec;
    --kyc-surface: #ffffff;
    --kyc-page: #f3f7fb;
    --kyc-warning: #9b6a16;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding: 0;

    background:
        linear-gradient(135deg, rgba(141, 175, 203, 0.16), transparent 34%),
        var(--kyc-page);
    color: var(--kyc-ink);

    font-family: "Trebuchet MS", "Segoe UI", sans-serif;

    line-height: 1.5;
}


/* ================================================================
   PAGE
================================================================ */

.kyc-page {
    width: min(1100px, calc(100% - 32px));

    margin: 32px auto 60px;
}


/* ================================================================
   HEADER / LETTERHEAD
================================================================ */

.kyc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 24px;

    padding: 28px 32px;

    background: var(--kyc-surface);

    border-top: 5px solid var(--kyc-navy);
    border-bottom: 1px solid var(--kyc-line);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


.company-brand {
    padding-right: 20px;
}


.company-name {
    color: var(--kyc-navy);

    font-size: 25px;
    font-weight: 800;

    letter-spacing: 1.5px;
}


.company-subtitle {
    margin-top: 3px;

    color: #4b5563;

    font-size: 20px;
    font-weight: 600;

    letter-spacing: 1.2px;
}


.company-address,
.company-contact {
    max-width: 560px;

    color: var(--kyc-muted);

    font-size: 12px;
    line-height: 1.6;
}


.company-address {
    margin-top: 17px;

    padding-top: 13px;

    border-top: 1px solid var(--kyc-line);

    font-weight: 600;
}


.company-contact {
    margin-top: 4px;

    color: var(--kyc-navy);
    font-size: 11px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.kyc-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 250px;
    width: 500px;
    height: 150px;

    background: var(--kyc-navy);
    border: 1px solid var(--kyc-navy);
    overflow: visible;
}

.kyc-logo {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
}

.document-title {
    text-align: right;
}


.document-title-main {
    color: var(--kyc-navy);

    font-size: 20px;
    font-weight: 700;

    letter-spacing: 0.5px;
}


.document-title-sub {
    margin-top: 4px;

    color: #6b7280;

    font-size: 13px;
}


/* ================================================================
   INTRO
================================================================ */

.intro-section {
    margin-top: 22px;

    padding: 28px 32px;

    background: var(--kyc-surface);

    border: 1px solid var(--kyc-line);
}


.intro-section h1 {
    margin: 0 0 8px;

    color: var(--kyc-navy);

    font-size: 24px;
    font-weight: 700;
}


.intro-section p {
    margin: 0;

    color: #5b6573;

    font-size: 14px;
}


.notice {
    margin-top: 18px;

    padding: 13px 16px;

    background: var(--kyc-blue-grey-soft);

    border-left: 4px solid var(--kyc-navy);

    color: #46515f;

    font-size: 13px;
}


/* ================================================================
   CLIENT SUMMARY
================================================================ */

.client-summary {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    margin-top: 18px;

    background: var(--kyc-surface);

    border: 1px solid var(--kyc-line);
}


.summary-item {
    min-width: 0;

    padding: 17px 20px;

    border-right: 1px solid #e1e5ea;
}


.summary-item:last-child {
    border-right: none;
}


.summary-label {
    display: block;

    margin-bottom: 5px;

    color: #6b7280;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}


.summary-value {
    display: block;

    color: #1f2937;

    font-size: 14px;
    font-weight: 600;

    overflow-wrap: anywhere;
}


/* ================================================================
   FORM SECTION
================================================================ */

.form-section {
    margin-top: 22px;

    background: var(--kyc-surface);

    border: 1px solid var(--kyc-line);
}


.section-heading {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    padding: 22px 26px;

    background: linear-gradient(90deg, var(--kyc-blue-grey-soft), #ffffff);

    border-bottom: 1px solid var(--kyc-line);
}


.section-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    background: var(--kyc-navy);
    color: #ffffff;

    border-radius: 4px;

    font-size: 17px;
    font-weight: 700;
}


.section-heading h2 {
    margin: 0;

    color: var(--kyc-navy);

    font-size: 19px;
    font-weight: 700;
}


.section-heading p {
    margin: 4px 0 0;

    color: #6b7280;

    font-size: 13px;
}


/* ================================================================
   SUBSECTION
================================================================ */

.subsection {
    padding: 26px;

    border-bottom: 1px solid #e5e7eb;
}


.subsection:last-child {
    border-bottom: none;
}


.subsection h3 {
    margin: 0 0 17px;

    color: #293442;

    font-size: 15px;
    font-weight: 700;
}


.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 18px;
}


.subsection-title-group {
    min-width: 0;
}


.subsection-header h3 {
    margin-bottom: 3px;
}


/* ================================================================
   FORM GRID
================================================================ */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.address-fields {
    display: grid;

    gap: 15px;
}


/* ================================================================
   FORM GROUP
================================================================ */

.form-group {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.form-group label,
.proof-field > label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 13px;
    font-weight: 600;
}


.required {
    color: #b42318;
}


.form-group input,
.form-group textarea,
.form-group select,
.proof-field input,
.proof-field textarea,
.proof-field select {
    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    background: #ffffff;

    border: 1px solid #cbd3dc;
    border-radius: 4px;

    color: #1f2933;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}


.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.proof-field input:focus,
.proof-field textarea:focus,
.proof-field select:focus {
    border-color: #17365d;

    box-shadow:
        0 0 0 3px rgba(23, 54, 93, 0.08);
}


.form-group input[readonly] {
    background: #f3f5f7;

    color: #59636f;

    cursor: not-allowed;
}


.form-group input:disabled {
    background: #f3f5f7;

    color: #59636f;

    cursor: not-allowed;
}


.form-group textarea,
.proof-field textarea {
    resize: vertical;

    min-height: 90px;
}


.field-help {
    margin: 7px 0 0;

    color: #737d89;

    font-size: 12px;
}


/* ================================================================
   CHECKBOX
================================================================ */

.checkbox-label {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 9px 12px;

    border: 1px solid #d7dde4;
    border-radius: 4px;

    color: #374151;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


.checkbox-label:hover {
    background: #f8fafc;
}


.checkbox-label input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #17365d;
}


/* ================================================================
   CONDITIONAL ADDRESS NOTICE
================================================================ */

.conditional-notice {
    margin-top: 20px;

    padding: 15px 17px;

    background: #fff9ed;

    border: 1px solid #ead9af;
    border-left: 4px solid #b7791f;

    color: #5f4a22;

    font-size: 13px;
}


.notice-title {
    margin-bottom: 4px;

    color: #5f4314;

    font-weight: 700;
}


.conditional-notice p {
    margin: 0;
}


/* ================================================================
   PROOF OF RESIDENCY SECTION
================================================================ */

.proof-residency-section {
    padding: 26px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;
}


.proof-header {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    margin-bottom: 24px;

    padding: 18px;

    background: #f8fafc;

    border: 1px solid #e1e6ec;
}


.proof-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    background: #ffffff;

    border: 1px solid #d7dde4;
    border-radius: 4px;

    font-size: 19px;
}


.proof-header h3 {
    margin: 0 0 4px;

    color: #293442;

    font-size: 16px;
}


.proof-header p {
    margin: 0;

    color: #626d79;

    font-size: 13px;
}


/* ================================================================
   PROOF FIELDS
================================================================ */

.proof-field {
    margin-top: 20px;
}


.proof-field:first-of-type {
    margin-top: 0;
}


/* ================================================================
   DOCUMENT SELECT
================================================================ */

#residency-document-type {
    min-height: 48px;

    padding-right: 40px;

    cursor: pointer;
}


/*
 * Long option text is allowed to wrap where the browser supports it.
 * The select itself remains responsive on small screens.
 */

#residency-document-type option {
    white-space: normal;
}


/* ================================================================
   UPLOAD
================================================================ */

.upload-box {
    position: relative;

    width: 100%;

    border: 1px dashed #aeb9c6;
    border-radius: 6px;

    background: #fafbfc;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}


.upload-box:hover {
    border-color: #17365d;

    background: #f8fafc;
}


.upload-box input[type="file"] {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    overflow: hidden;

    pointer-events: none;
}


.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 145px;

    padding: 24px;

    cursor: pointer;

    text-align: center;
}


.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    margin-bottom: 10px;

    background: #eef2f6;

    border-radius: 50%;

    color: #17365d;

    font-size: 23px;
    font-weight: 700;
}


.upload-main-text {
    color: #293442;

    font-size: 14px;
    font-weight: 700;
}


.upload-sub-text {
    margin-top: 3px;

    color: #7a8490;

    font-size: 12px;
}


/* ================================================================
   SELECTED FILE
================================================================ */

.selected-file {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 10px;

    padding: 12px 14px;

    background: #f3f7fb;

    border: 1px solid #d7e0ea;
    border-radius: 5px;
}


.file-icon {
    flex: 0 0 auto;

    font-size: 17px;
}


.selected-file-name {
    min-width: 0;

    color: #344050;

    font-size: 13px;
    font-weight: 600;

    overflow-wrap: anywhere;
}


/* ================================================================
   DOCUMENT NOTE
================================================================ */

.document-note {
    margin-top: 22px;

    padding: 15px 17px;

    background: #f8fafc;

    border-left: 3px solid #8a96a3;

    color: #5e6874;

    font-size: 12px;
}


.document-note strong {
    display: block;

    margin-bottom: 4px;

    color: #424c58;
}


.document-note p {
    margin: 0;
}


/* ================================================================
   COMING SOON
================================================================ */

.coming-soon {
    margin: 26px;

    padding: 18px;

    background: #fafafa;

    border: 1px dashed #cbd3dc;

    color: #7a8490;

    font-size: 13px;

    text-align: center;
}


/* ================================================================
   VISIBILITY
================================================================ */

.hidden {
    display: none !important;
}


/* ================================================================
   FORM ACTIONS
================================================================ */

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 15px;

    margin-top: 24px;
}


.btn {
    min-width: 120px;

    min-height: 44px;

    padding: 10px 22px;

    border-radius: 4px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}


.btn:active {
    transform: translateY(1px);
}


.btn-primary {
    background: #17365d;

    border: 1px solid #17365d;

    color: #ffffff;
}


.btn-primary:hover {
    background: #102b4b;
}


.btn-secondary {
    background: #ffffff;

    border: 1px solid #bfc8d2;

    color: #374151;
}


.btn-secondary:hover {
    background: #f6f8fa;
}


/* ================================================================
   FOOTER
================================================================ */

.kyc-footer {
    margin-top: 30px;

    padding: 20px;

    color: #7b8490;

    font-size: 11px;

    text-align: center;
}


.kyc-footer p {
    margin: 3px 0;
}


/* ================================================================
   TABLET
================================================================ */

@media (max-width: 768px) {

    .kyc-page {
        width: calc(100% - 20px);

        margin: 10px auto 35px;
    }


    .kyc-header {
        flex-direction: column;

        gap: 18px;

        padding: 22px;
    }


    .company-brand {
        width: 100%;
        padding-right: 0;
    }


    .kyc-logo-container {
        flex: 0 1 320px;
        width: min(100%, 320px);
        height: auto;
        aspect-ratio: 16 / 9;
    }


    .company-address,
    .company-contact {
        max-width: none;
    }


    .document-title {
        width: 100%;

        text-align: left;
    }


    .intro-section {
        padding: 22px;
    }


    .client-summary {
        grid-template-columns: 1fr;
    }


    .summary-item {
        border-right: none;
        border-bottom: 1px solid #e1e5ea;
    }


    .summary-item:last-child {
        border-bottom: none;
    }


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


    .subsection-header {
        flex-direction: column;

        gap: 12px;
    }


    .checkbox-label {
        width: 100%;
    }


    .section-heading,
    .subsection,
    .proof-residency-section {
        padding: 20px;
    }


    .proof-header {
        padding: 15px;
    }


    .coming-soon {
        margin: 20px;
    }


    .form-actions {
        margin-top: 20px;
    }

}


/* ================================================================
   MOBILE
================================================================ */

@media (max-width: 480px) {

    body {
        background: #f4f6f8;
    }


    .kyc-page {
        width: 100%;

        margin: 0 auto 25px;
    }


    .kyc-header {
        padding: 20px;

        border-top-width: 4px;
    }


    .kyc-logo-container {
        flex-basis: 240px;
        width: min(100%, 240px);
    }


    .company-name {
        font-size: 21px;

        letter-spacing: 1px;
    }


    .company-subtitle {
        font-size: 9px;

        letter-spacing: 0.8px;
    }


    .document-title-main {
        font-size: 17px;
    }


    .document-title-sub {
        font-size: 12px;
    }


    .intro-section {
        margin-top: 10px;

        padding: 20px;

        border-left: none;
        border-right: none;
    }


    .intro-section h1 {
        font-size: 21px;
    }


    .intro-section p {
        font-size: 13px;
    }


    .client-summary {
        margin-top: 10px;

        border-left: none;
        border-right: none;
    }


    .summary-item {
        padding: 14px 20px;
    }


    .form-section {
        margin-top: 10px;

        border-left: none;
        border-right: none;
    }


    .section-heading {
        gap: 12px;

        padding: 18px 20px;
    }


    .section-number {
        width: 34px;
        height: 34px;

        flex-basis: 34px;

        font-size: 15px;
    }


    .section-heading h2 {
        font-size: 17px;
    }


    .section-heading p {
        font-size: 12px;
    }


    .subsection,
    .proof-residency-section {
        padding: 18px 20px;
    }


    .subsection h3 {
        font-size: 15px;
    }


    .form-group input,
    .form-group select,
    .proof-field input,
    .proof-field select,
    .proof-field textarea {
        font-size: 16px;
    }


    /*
     * 16px prevents mobile browsers such as iOS Safari
     * from automatically zooming when the user focuses
     * on a form field.
     */


    .proof-header {
        flex-direction: column;

        gap: 10px;

        padding: 15px;
    }


    .proof-icon {
        width: 38px;
        height: 38px;

        flex-basis: 38px;
    }


    .proof-header h3 {
        font-size: 15px;
    }


    .proof-header p {
        font-size: 12px;
    }


    .upload-label {
        min-height: 130px;

        padding: 20px 15px;
    }


    .upload-main-text {
        font-size: 13px;
    }


    .form-actions {
        padding: 0 20px;

        margin-top: 15px;
    }


    .btn {
        min-width: 0;

        flex: 1;

        padding: 10px 15px;
    }


    .kyc-footer {
        padding: 18px 20px;
    }

}


/* ================================================================
   SHARED THEME FINISH
================================================================ */

input,
select,
textarea,
button {
    font: inherit;
}


.form-group input,
.form-group textarea,
.form-group select,
.proof-field input,
.proof-field textarea,
.proof-field select {
    border-color: var(--kyc-blue-grey);
    border-radius: 6px;
}


.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.proof-field input:focus,
.proof-field textarea:focus,
.proof-field select:focus {
    border-color: var(--kyc-navy);
    box-shadow: 0 0 0 3px rgba(6, 35, 96, 0.12);
}


.btn-primary {
    background: var(--kyc-navy);
    border-color: var(--kyc-navy);
}


.btn-primary:hover {
    background: var(--kyc-navy-deep);
}


.btn-secondary:hover {
    border-color: var(--kyc-blue-grey);
    background: var(--kyc-blue-grey-soft);
}