:root {
    --bg: #f5f8ff;
    --surface: #ffffff;
    --ink: #303133;
    --ink-soft: #7d8794;
    --line: #dadbde;
    --primary: #0877fb;
    --primary-strong: #0668dd;
    --shadow: 0 28px 60px rgba(8, 36, 84, 0.12);
    --radius-xl: 38px;
    --stage-width: 430px;
    --font-stack: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    font-family: var(--font-stack);
    background:
        radial-gradient(circle at top center, rgba(8, 119, 251, 0.1), transparent 18%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login-stage {
    width: min(100%, var(--stage-width));
    min-height: 100vh;
    background: var(--surface);
}

.login-hero {
    position: relative;
    min-height: 336px;
    padding: 22px 24px 0;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(8, 20, 58, 0.08) 0%, rgba(8, 20, 58, 0.02) 56%, rgba(8, 20, 58, 0) 100%),
        url("../images/loginbg.png") center top / cover no-repeat;
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 34, 78, 0.06), rgba(14, 34, 78, 0));
    pointer-events: none;
}

.hero-topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-pill,
.hero-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-pill {
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-link {
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.88rem;
    font-weight: 600;
}

.login-sheet {
    position: relative;
    z-index: 2;
    margin-top: -78px;
    min-height: calc(100vh - 258px);
    padding: 34px 28px 30px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.sheet-header h1 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.1;
}

.sheet-header p {
    margin: 12px 0 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.8;
}

.message-box {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.message-box.error {
    color: #ba2c42;
    background: rgba(230, 74, 96, 0.1);
    border: 1px solid rgba(230, 74, 96, 0.18);
}

.message-box.warning {
    color: #b16a18;
    background: rgba(199, 114, 31, 0.1);
    border: 1px solid rgba(199, 114, 31, 0.18);
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.field-group {
    display: grid;
    gap: 10px;
}

.field-group label {
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.field-shell {
    display: flex;
    align-items: center;
    min-height: 57px;
    padding: 0 17px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-shell:focus-within {
    border-color: rgba(8, 119, 251, 0.34);
    box-shadow: 0 0 0 4px rgba(8, 119, 251, 0.08);
}

.field-shell input {
    width: 100%;
    height: 24px;
    padding: 0;
    color: var(--ink);
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
}

.field-shell input::placeholder {
    color: #c0c4cc;
    font-size: 0.94rem;
    font-weight: 400;
}

.field-shell--password input {
    padding-right: 12px;
}

.text-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
}

.remember-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.helper-note {
    color: #909193;
    font-size: 0.84rem;
    line-height: 1.5;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 57px;
    border: 0;
    border-radius: 28px;
    font-size: 1.06rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 18px 34px rgba(8, 119, 251, 0.22);
}

.button.primary:hover {
    background: var(--primary-strong);
}

.sheet-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.sheet-divider {
    width: 1px;
    height: 10px;
    background: #cbd5e1;
}

@media (min-width: 720px) {
    .page-shell {
        padding: 30px 16px;
    }

    .login-stage {
        min-height: auto;
        border-radius: 38px;
        overflow: hidden;
        box-shadow: 0 36px 80px rgba(15, 23, 42, 0.16);
    }

    .login-sheet {
        min-height: auto;
        padding-bottom: 34px;
    }
}

@media (max-width: 420px) {
    .login-hero {
        padding-left: 20px;
        padding-right: 20px;
    }

    .login-sheet {
        margin-top: -68px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .form-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}
