* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    color: #26445f;
    background: #172033;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(150, 184, 255, 0.35), transparent 24%),
        radial-gradient(circle at 75% 12%, rgba(255, 255, 255, 0.18), transparent 20%),
        linear-gradient(135deg, #1c2540 0%, #392851 45%, #243547 100%);
    padding: 42px 20px 54px;
}

.page {
    width: min(100%, 860px);
    min-height: 560px;
    border-radius: 4px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.topbar {
    height: 52px;
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 8px rgba(39, 55, 77, 0.18);
}

.brand,
.tab {
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: 18px;
    color: #4b5563;
    border-right: 1px solid #e5e7eb;
    background: #ffffff;
}

.brand::before {
    content: "♣";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin-right: 10px;
    color: #ffffff;
    background: #7bed1a;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
}

.tab::before {
    content: "✉";
    margin-right: 10px;
}

.hero {
    display: flex;
    justify-content: center;
    padding: 54px 0 34px;
}

.logo {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: linear-gradient(160deg, #afff62 0%, #64ec0a 68%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 86px;
    font-weight: 700;
    border: 4px solid #77ec1c;
}

.alert {
    width: min(100%, 680px);
    margin: 18px auto;
    min-height: 54px;
    padding: 17px 18px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.18);
}

.alert.info,
.alert.warn {
    color: #8a6d3b;
    border: 1px solid #f1d275;
    background: #fff7cf;
}

.alert.ok {
    color: #2f6f27;
    border: 1px solid #b7dba2;
    background: #d9f1cf;
}

.form-panel {
    width: min(100%, 680px);
    margin: 0 auto 24px;
    padding: 18px 18px 24px;
    border-radius: 4px;
    border: 1px solid #9bd0e7;
    background: #c8eaf6;
    box-shadow: 0 2px 7px rgba(44, 62, 80, 0.16);
}

.row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 12px 0;
}

.action-row {
    margin-top: 14px;
}

#resetForm {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#resetForm.form-panel {
    width: min(100%, 760px);
}

#resetForm .row {
    width: min(100%, 720px);
    grid-template-columns: 86px minmax(0, 520px) 86px;
    column-gap: 14px;
}

#resetForm .action-row {
    display: flex;
    justify-content: center;
}

#resetForm .action-row span {
    display: none;
}

#resetForm .action-row button {
    justify-self: center;
}

#resetForm .row > input {
    grid-column: 2;
}

#sendForm {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sendForm.form-panel {
    width: min(100%, 760px);
}

#sendForm .row {
    width: min(100%, 720px);
    grid-template-columns: 112px minmax(0, 520px) 112px;
    column-gap: 14px;
}

#sendForm .row > input,
#sendForm .captcha-control {
    grid-column: 2;
}

#sendForm .action-row {
    display: flex;
    justify-content: center;
}

#sendForm .action-row span {
    display: none;
}

#sendForm .action-row button {
    justify-self: center;
}

.password-rules {
    width: min(100%, 520px);
    margin: 8px auto 4px;
    padding: 10px 12px;
    border: 1px solid #98c8de;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.52);
    color: #31566f;
    font-size: 13px;
    line-height: 1.7;
}

.rules-title {
    margin-bottom: 2px;
    color: #246185;
    font-weight: 700;
}

label {
    text-align: right;
    font-weight: 700;
    font-size: 16px;
    color: #246185;
}

input {
    width: 100%;
    height: 36px;
    border: 1px solid #c5ccd3;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 15px;
    background: #ffffff;
    outline: none;
}

input:focus {
    border-color: #4ba3e6;
    box-shadow: 0 0 0 3px rgba(75, 163, 230, 0.18);
}

.captcha-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
    align-items: center;
}

.captcha-control img {
    width: 118px;
    height: 36px;
    border: 1px solid #b9c6d3;
    border-radius: 4px;
    background: #f7fafc;
    cursor: pointer;
}

button {
    min-width: 112px;
    width: 112px;
    height: 34px;
    padding: 0 16px;
    border: 1px solid #2f8c2f;
    border-radius: 4px;
    background: linear-gradient(#62c462, #3ca33c);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

button:disabled {
    opacity: 0.65;
    cursor: default;
}

.hidden {
    display: none !important;
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    text-align: center;
    line-height: 32px;
    color: #555;
    background: rgba(255, 255, 255, 0.86);
}

@media (max-width: 720px) {
    body {
        padding: 16px 10px 44px;
    }

    .page {
        min-height: auto;
        padding: 12px;
    }

    .hero {
        padding: 34px 0 22px;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .password-rules {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    #resetForm .row {
        width: 100%;
        grid-template-columns: 1fr;
    }

    #sendForm .row {
        width: 100%;
        grid-template-columns: 1fr;
    }

    label {
        text-align: left;
    }

    .captcha-control {
        grid-template-columns: minmax(0, 1fr) 112px;
    }

    .captcha-control img {
        width: 112px;
    }
}
