*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --page-bg: #e5e6e6;
    --nav-blue: #3778df;
    --notice-red: #ff1d17;
    --text-dark: #1f2d3d;
    --link-blue: #2b74d6;
    --line-gray: #b4b4b4;
    --card-bg: #efefef;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: var(--page-bg);
    color: var(--text-dark);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

a {
    color: var(--link-blue);
    text-decoration: none;
}

.site-header {
    width: 100%;
    padding: 10px 20px 10px;
}

.header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gov-logo {
    width: 105px;
    height: auto;
}

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

.header-title h1 {
    margin: 10px 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.header-title p {
    margin: 0;
    font-size: 16px;
    color: #3f84d8;
}

.notice {
    width: 100%;
    padding: 4px 0 6px;
}

.notice-ticker {
    background: var(--notice-red);
    width: 100%;
    overflow: hidden;
}

.notice-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    padding-left: 100%;
    animation: notice-scroll 44s linear infinite;
}

.notice-item {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    padding: 8px 42px;
    display: inline-block;
}

@keyframes notice-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.main-nav {
    width: 100%;
    background: var(--nav-blue);
    height: 40px;
}

.nav-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    min-height: 40px;
    height: 40px;
}

.nav-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.nav-links li + li::before {
    content: "|";
    color: rgba(255, 255, 255, 0.78);
    margin: 0 7px;
}

.nav-links a {
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.pill-btn {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 2px;
    background: #ffa500;
    animation: pill-color-swap 0.9s step-start infinite;
}

@keyframes pill-color-swap {
    0%,
    100% {
        background: #ffa500;
    }
    50% {
        background: #40e0d0;
    }
}

.lang-switch a {
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.nav-h5-row {
    display: none;
}

.main-content {
    width: 100%;
    padding: 30px 0 135px;
}

.login-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 16px;
}

.login-card {
    width: 33.33vw;
    background: #fff;
    border: 1px solid #c8c8c8;
    padding: 38px 38px 24px;
}

.avatar-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.avatar-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #c7c7c7;
    position: relative;
    display: block;
}

.avatar-icon::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #a8a8a8;
    position: absolute;
    left: 31px;
    top: 10px;
}

.avatar-icon::after {
    content: "";
    width: 62px;
    height: 32px;
    border-radius: 32px 32px 24px 24px;
    background: #a8a8a8;
    position: absolute;
    left: 17px;
    bottom: 12px;
}

.login-form {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
}

.login-form label {
    display: block;
}

.login-form input {
    width: 100%;
    height: 45px;
    border: 0;
    border-bottom: 1px solid var(--line-gray);
    background: transparent;
    padding: 8px 0 11px;
    font-size: 15px;
    color: #5c5c5c;
}

.login-form input:focus {
    outline: none;
    border-bottom-color: #26a69a;
}

.login-form input.field-empty {
    background: rgb(255, 228, 225);
}

.captcha-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.captcha-input-wrap {
    flex: 1 1 auto;
}

.captcha-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.captcha-code {
    min-width: 130px;
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 26px;
    letter-spacing: 2px;
    color: #fff;
    background: #0d1425;
    line-height: 1;
    padding: 8px 12px;
}

.refresh-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refresh-icon {
    display: block;
    width: 22px;
    height: 22px;
    background-image: url("./imgs/refresh.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.submit-btn {
    width: 100%;
    border: 0;
    background: #3e78db;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 6px;
    padding: 12px 10px;
    cursor: pointer;
}

.form-message {
    margin: 4px 0 0;
    min-height: 16px;
    font-size: 12px;
    color: #c62828;
}

.login-links {
    margin-top: 22px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.tagline {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #c3c3c3;
    color: #1c1c1c;
    background: #f6f6f6;
    font-style: italic;
    font-size: 12px;
}

.site-footer {
    width: 100%;
    padding: 26px 20px 4px 16px;
}

.footer-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.brand-left {
    width: 108px;
    height: auto;
}

.brand-right {
    width: 196px;
    height: auto;
}

.footer-center {
    flex: 1 1 auto;
    text-align: center;
    font-size: 16px;
    color: #1f1f1f;
}

.footer-center p {
    margin: 5px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 6px;
    font-weight: 600;
}

.footer-links a + a::before {
    content: "|";
    color: currentColor;
    margin-right: 12px;
}

.copyright {
    color: #8f8f8f;
}

.app-download {
    margin-top: 8px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.google-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #5f6368;
    border-radius: 4px;
    padding: 6px 12px;
    color: #202124;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.google-play-icon {
    width: 14px;
    height: 14px;
    background-image: url("./imgs/google-play.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.img-box {
    width: 200px;
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 12px 8px;
    }

    .header-row {
        display: block;
    }

    .gov-logo {
        display: block;
        margin: 0 auto;
    }

    .header-title {
        width: 100%;
        margin-top: 8px;
        text-align: right;
    }

    .header-title h1,
    .header-title p {
        display: block;
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-links li {
        display: none;
    }

    .nav-links li:first-of-type,
    .nav-links li:last-of-type {
        display: flex;
    }

    .nav-row > .nav-actions,
    .nav-row > .lang-switch {
        display: none;
    }

    .nav-h5-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 12px;
    }

    .nav-h5-row .nav-actions {
        margin-left: 0;
    }

    .nav-h5-row .pill-btn {
        padding: 6px 12px;
    }
    .nav-h5-row .lang-switch {
        background: var(--nav-blue);
        padding: 4px 16px;
    }
    .nav-h5-row .lang-switch a {
        display: inline-block;
        min-width: 44px;
        text-align: right;
    }

    .main-content {
        padding: 50px 0 30px;
    }

    .login-section {
        padding: 0 12px;
        row-gap: 12px;
    }

    .login-card {
        width: 100%;
        padding: 40px 30px 20px;
    }

    .avatar-wrap {
        margin-bottom: 16px;
    }

    .login-form {
        row-gap: 12px;
    }

    .login-form input {
        height: 44px;
        font-size: 16px;
        padding: 8px 0;
    }

    .captcha-row {
        align-items: center;
        gap: 8px;
    }

    .captcha-input-wrap {
        min-width: 0;
    }

    .captcha-preview {
        gap: 6px;
    }

    .captcha-code {
        min-width: 94px;
        font-size: 18px;
        letter-spacing: 1px;
        padding: 9px 8px;
    }

    .refresh-btn {
        width: 28px;
        height: 28px;
    }

    .submit-btn {
        min-height: 44px;
        font-size: 15px;
        margin-top: 2px;
    }

    .form-message {
        min-height: 18px;
    }

    .login-links {
        margin-top: 14px;
        font-size: 14px;
    }

    .tagline {
        padding: 8px 14px;
    }

    .app-download {
        margin-top: 4px;
    }
    .footer-links{
        column-gap: 6px;
    }
    .footer-links a + a::before{
      margin-right: 6px;
    }
    .footer-row{
      flex-direction: column;
    }
    .img-box{
      width: auto;
    }
}
