:root {
    --primary: #409eff;
    --text: #303133;
    --muted: #606266;
    --line: #dcdfe6;
    --bg: #f3f6fb;
    --panel: #fff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--bg);
    font: 14px/1.6 "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-card {
    position: relative;
    width: min(420px, 100%);
    padding: 30px 28px 28px;
    border: 1px solid #e6ebf2;
    border-radius: 3px;
    background: var(--panel);
    box-shadow: 0 10px 34px rgba(15, 23, 42, 0.08);
}

.site-link {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--primary);
    font-weight: 600;
}

.login-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.login-mark {
    position: relative;
    overflow: hidden;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #6d5dfc 58%, #8b5cf6 100%);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-style: italic;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(64, 158, 255, 0.24);
}

.login-mark::after {
    content: "";
    position: absolute;
    inset: 8px 8px auto;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transform: rotate(-18deg);
}

.login-heading p,
.login-heading h1 {
    margin: 0;
}

.login-heading p {
    color: var(--muted);
    font-size: 13px;
}

.login-heading h1 {
    color: var(--text);
    font-size: 24px;
}

.login-form {
    display: grid;
    gap: 16px;
}

label,
.login-field {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

.login-field > label {
    display: block;
}

.login-password-field {
    position: relative;
}

input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 3px;
    outline: none;
    padding: 0 11px;
    color: var(--text);
    background: #fff;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.12);
}

.login-password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0 2px 2px 0;
    color: #6b7280;
    background: #fff;
}

.password-toggle:hover {
    color: var(--theme-primary, var(--primary));
    background: #f5f7fa;
}

.password-toggle:focus-visible {
    color: var(--theme-primary, var(--primary));
    outline: 2px solid color-mix(in srgb, var(--theme-primary, var(--primary)) 38%, transparent);
    outline-offset: -3px;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-toggle-hide {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-hide {
    display: block;
}

.login-submit {
    height: 40px;
    margin-top: 2px;
    border: 0;
    border-radius: 3px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
}

.login-submit:hover {
    background: #2f8ff0;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    background: rgba(17, 24, 39, 0.94);
}

.toast.error {
    background: rgba(185, 28, 28, 0.96);
}

.hidden {
    display: none !important;
}
