/* =========================================================
   CREWDATA FLAG VERIFICATION PORTAL
   Corporate / Maritime Administration Theme
========================================================= */


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

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    position: relative;
    overflow-x: hidden;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #f4f6f8;
    color: #182433;

    font-size: 14px;
    line-height: 1.55;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: calc(100% - 40px);
    max-width: 1100px;

    margin-left: auto;
    margin-right: auto;
}


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

.site-header {
    position: relative;
    z-index: 10;

    flex-shrink: 0;

    background: #ffffff;

    border-bottom: 1px solid #dce2e8;
}

.header-inner {
    width: calc(100% - 40px);
    max-width: 1100px;

    min-height: 76px;

    margin-left: auto;
    margin-right: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 14px;

    color: inherit;

    text-decoration: none;
}

.brand-logo {
    display: block;

    width: 48px;
    height: 48px;

    flex-shrink: 0;

    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    color: #10263d;

    font-size: 16px;
    line-height: 1.3;

    font-weight: 700;
}

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

    color: #748292;

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


/* =========================================================
   HEADER RIGHT
========================================================= */

.header-right {
    display: flex;
    align-items: center;
}

.powered-by {
    color: #7a8795;

    font-size: 12px;

    text-decoration: none;

    transition: color 0.15s ease;
}

.powered-by strong {
    color: #274d70;

    font-weight: 700;
}

.powered-by:hover,
.powered-by:hover strong {
    color: #173a5e;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    z-index: 5;

    flex-shrink: 0;

    overflow: hidden;

    background: #173a5e;

    border-bottom: 3px solid #315f87;

    color: #ffffff;

    padding: 34px 0 32px;
}


/* =========================================================
   HERO DOT PATTERN
========================================================= */

.hero::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 62%;
    height: 100%;

    pointer-events: none;

    background-image:
        radial-gradient(
            circle,
            rgba(100, 184, 230, 0.48) 1.5px,
            transparent 1.8px
        );

    background-size: 16px 16px;

    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            rgba(0, 0, 0, 0.12) 12%,
            rgba(0, 0, 0, 0.45) 35%,
            rgba(0, 0, 0, 0.85) 65%,
            #000000 100%
        );

    mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            rgba(0, 0, 0, 0.12) 12%,
            rgba(0, 0, 0, 0.45) 35%,
            rgba(0, 0, 0, 0.85) 65%,
            #000000 100%
        );
}


/* =========================================================
   HERO CONTENT
========================================================= */

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    max-width: 760px;

    margin: 0;

    color: #ffffff;

    font-size: 34px;
    line-height: 1.15;

    font-weight: 700;

    letter-spacing: -0.6px;
}

.hero p {
    margin: 10px 0 0;

    color: #d7e2ec;

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


/* =========================================================
   MAIN BACKGROUND DOT PATTERN
========================================================= */

/*
   Continuation of the blue dot pattern
   below the hero.

   Strongest at the upper-right area,
   then gradually disappears downwards.
*/

body::before {
    content: "";

    position: absolute;

    top: 205px;
    right: 0;

    width: 60%;
    height: 650px;

    pointer-events: none;

    z-index: 0;

    background-image:
        radial-gradient(
            circle,
            rgba(38, 123, 174, 0.24) 1.45px,
            transparent 1.75px
        );

    background-size: 16px 16px;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            #000000 0%,
            rgba(0, 0, 0, 0.90) 18%,
            rgba(0, 0, 0, 0.60) 42%,
            rgba(0, 0, 0, 0.25) 68%,
            transparent 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            #000000 0%,
            rgba(0, 0, 0, 0.90) 18%,
            rgba(0, 0, 0, 0.60) 42%,
            rgba(0, 0, 0, 0.25) 68%,
            transparent 100%
        );
}


/* =========================================================
   HORIZONTAL DOT FADE
========================================================= */

/*
   Makes the lower pattern disappear towards
   the center of the page.

   Right side remains clearly visible.
*/

body::after {
    content: "";

    position: absolute;

    top: 205px;
    right: 0;

    width: 60%;
    height: 650px;

    pointer-events: none;

    z-index: 0;

    background:
        linear-gradient(
            to right,
            #f4f6f8 0%,
            rgba(244, 246, 248, 0.82) 12%,
            rgba(244, 246, 248, 0.42) 30%,
            rgba(244, 246, 248, 0.12) 50%,
            transparent 68%
        );
}


/* =========================================================
   MAIN
========================================================= */

.main-content {
    position: relative;
    z-index: 2;

    flex: 1 0 auto;

    width: calc(100% - 40px);
    max-width: 1100px;

    padding-top: 38px;
    padding-bottom: 55px;
}


/* =========================================================
   SEARCH GRID
========================================================= */

.search-grid {
    display: grid;

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

    gap: 24px;
}


/* =========================================================
   SEARCH CARD
========================================================= */

.search-card {
    position: relative;
    z-index: 2;

    background: rgba(255, 255, 255, 0.985);

    border: 1px solid #d9e0e6;

    border-radius: 6px;

    padding: 28px 30px 30px;

    box-shadow:
        0 4px 14px
        rgba(20, 40, 60, 0.04);
}


/* =========================================================
   CARD ICON
========================================================= */

.card-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 4px;

    background: #eaf3f8;
    color: #1c648f;

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

.person-icon {
    background: #eef1f4;
    color: #4e6072;
}


/* =========================================================
   CARD TYPOGRAPHY
========================================================= */

.search-card h2 {
    margin: 0 0 7px;

    color: #17283a;

    font-size: 16px;
    line-height: 1.3;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.3px;
}

.card-description {
    min-height: 44px;

    margin: 0 0 22px;

    color: #657586;

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   FORM LABELS
========================================================= */

label {
    display: block;

    margin: 0 0 6px;

    color: #33475b;

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


/* =========================================================
   INPUTS
========================================================= */

input {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    margin: 0 0 18px;

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

    outline: none;

    background: #ffffff;
    color: #17283a;

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

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

input::placeholder {
    color: #9aa5af;
}

input:hover {
    border-color: #aebbc6;
}

input:focus {
    border-color: #315f87;

    box-shadow:
        0 0 0 3px
        rgba(49, 95, 135, 0.10);
}


/* =========================================================
   NAME ROW
========================================================= */

.name-row {
    display: grid;

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

    gap: 14px;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-button,
.secondary-button {
    width: 100%;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 4px;

    padding: 0 20px;

    cursor: pointer;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.15s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.primary-button {
    background: #1d608a;
    color: #ffffff;
}

.primary-button:hover {
    background: #174f73;

    box-shadow:
        0 3px 8px
        rgba(23, 79, 115, 0.15);
}


/* =========================================================
   SECONDARY BUTTON
========================================================= */

.secondary-button {
    background: #344f68;
    color: #ffffff;
}

.secondary-button:hover {
    background: #293f53;

    box-shadow:
        0 3px 8px
        rgba(41, 63, 83, 0.15);
}

.primary-button:active,
.secondary-button:active {
    transform: translateY(1px);
}


/* =========================================================
   RESULT CARD
========================================================= */

.result-card {
    position: relative;
    z-index: 2;

    margin-top: 28px;

    background: #ffffff;

    border: 1px solid #d9e0e6;

    border-radius: 6px;

    box-shadow:
        0 4px 14px
        rgba(20, 40, 60, 0.04);
}


/* =========================================================
   ERROR RESULT
========================================================= */

.error-result {
    display: flex;
    align-items: center;

    gap: 18px;

    padding: 24px 28px;

    border-left: 4px solid #b94444;
}

.result-status-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fbeeee;
    color: #b33b3b;

    font-size: 22px;
}

.result-label {
    margin-bottom: 3px;

    color: #a73939;

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

    letter-spacing: 1px;
}

.error-result h2 {
    margin: 0;

    color: #17283a;

    font-size: 17px;
}

.error-result p {
    margin: 3px 0 0;

    color: #697888;

    font-size: 13px;
}


/* =========================================================
   SUCCESS RESULT
========================================================= */

.success-result {
    overflow: hidden;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 24px 28px;

    border-bottom: 1px solid #e2e7eb;
}

.result-header h2 {
    margin: 7px 0 0;

    color: #14283b;

    font-size: 21px;
    line-height: 1.25;
}


/* =========================================================
   VALID BADGE
========================================================= */

.valid-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 3px;

    background: #e8f3ec;
    color: #28613e;

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

    letter-spacing: 0.7px;
}

.administration-name {
    max-width: 300px;

    color: #506376;

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

    text-align: right;
}


/* =========================================================
   RESULT SECTIONS
========================================================= */

.result-section {
    padding: 25px 28px;

    border-bottom: 1px solid #e6eaee;
}

.section-title {
    margin-bottom: 17px;

    color: #607487;

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

    text-transform: uppercase;

    letter-spacing: 1px;
}


/* =========================================================
   DETAILS GRID
========================================================= */

.details-grid {
    display: grid;

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

    gap: 22px 30px;
}

.detail {
    min-width: 0;
}

.detail-label {
    display: block;

    margin-bottom: 4px;

    color: #788796;

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

.detail strong {
    display: block;

    color: #1b2e41;

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

    word-break: break-word;
}


/* =========================================================
   CERTIFICATE NUMBER
========================================================= */

.certificate-number strong {
    color: #174f75;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    letter-spacing: 0.2px;
}


/* =========================================================
   VERIFICATION NOTE
========================================================= */

.verification-note {
    padding: 15px 28px;

    background: #f7f9fa;

    color: #71808e;

    font-size: 11px;
}


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

.site-footer {
    position: relative;
    z-index: 10;

    flex-shrink: 0;

    margin-top: auto;

    border-top: 1px solid #dce2e8;

    background: #ffffff;
}

.footer-inner {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color: #788592;

    font-size: 11px;
}

.footer-inner a {
    color: #315f87;

    font-weight: 600;

    text-decoration: none;
}

.footer-inner a:hover {
    color: #173a5e;

    text-decoration: underline;
}


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

@media (max-width: 800px) {

    .header-inner {
        min-height: 68px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand-title {
        font-size: 14px;
    }

    .brand-subtitle {
        font-size: 11px;
    }


    /* HERO */

    .hero {
        padding: 28px 0 27px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 13px;
    }

    .hero::after {
        width: 68%;

        background-size: 15px 15px;
    }


    /* MAIN DOTS */

    body::before,
    body::after {
        top: 185px;

        width: 68%;
        height: 500px;
    }

    body::before {
        background-size: 15px 15px;
    }


    /* MAIN */

    .main-content {
        padding-top: 26px;
        padding-bottom: 45px;
    }


    /* SEARCH */

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


    /* RESULT */

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


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

@media (max-width: 560px) {

    .container,
    .header-inner,
    .main-content {
        width: calc(100% - 28px);
    }


    /* HEADER */

    .header-right {
        display: none;
    }

    .header-inner {
        min-height: 64px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }


    /* HERO */

    .hero {
        padding: 25px 0 24px;
    }

    .hero h1 {
        max-width: 88%;

        font-size: 25px;
        line-height: 1.15;
    }

    .hero p {
        max-width: 85%;

        margin-top: 8px;

        font-size: 12px;
    }

    .hero::after {
        width: 75%;

        background-size: 14px 14px;
    }


    /* MAIN DOTS */

    body::before,
    body::after {
        top: 170px;

        width: 82%;
        height: 400px;
    }

    body::before {
        background-size: 14px 14px;

        opacity: 0.80;
    }


    /* MAIN */

    .main-content {
        padding-top: 22px;
        padding-bottom: 35px;
    }


    /* SEARCH CARD */

    .search-card {
        padding: 23px 20px 24px;
    }

    .card-description {
        min-height: 0;
    }


    /* FORM */

    .name-row {
        grid-template-columns: 1fr;

        gap: 0;
    }


    /* RESULT */

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

        gap: 16px;
    }

    .result-header {
        align-items: flex-start;
        flex-direction: column;

        padding: 21px 20px;
    }

    .administration-name {
        text-align: left;
    }

    .result-section {
        padding: 22px 20px;
    }

    .verification-note {
        padding: 14px 20px;
    }

    .error-result {
        padding: 20px;
    }


    /* FOOTER */

    .footer-inner {
        min-height: auto;

        padding: 18px 0;

        flex-direction: column;
        align-items: flex-start;

        gap: 5px;
    }
}