邹景立 8916e5a653 style(login): 优化登录页布局与验证弹窗
将登录容器调整为可滚动的居中弹性布局,补充桌面与移动端内边距,避免表单在小屏或内容较多时被裁切。

移除登录表单顶部的站点元信息展示,改为居中标题,并整理输入框、图标和提交按钮的对齐、自动填充背景及交互阴影。

统一滑块验证弹窗、图片舞台、滑块手柄和状态提示的视觉表现,减少多余阴影和轨迹填充,使验证码区域更简洁稳定。
2026-05-20 22:09:16 +08:00

482 lines
12 KiB
PHP

@charset "UTF-8";
body,
html {
height: 100%;
min-height: 100%;
display: block;
}
body {
color: #e2e8f0;
background-color: #08101d;
}
body.login-verify-active {
overflow: hidden;
}
body,
.login-container {
vertical-align: middle;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
transition: background-image 1s linear;
-o-transition: background-image 1s linear;
-moz-transition: background-image 1s linear;
-webkit-transition: background-image 1s linear;
}
.login-container {
height: auto;
min-height: 100%;
display: flex;
overflow-x: hidden;
overflow-y: auto;
position: relative;
isolation: isolate;
padding: 72px 20px 104px;
box-sizing: border-box;
align-items: center;
justify-content: center;
--cursor-x: 78%;
--cursor-y: 22%;
}
.login-container:before {
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
z-index: 0;
position: absolute;
pointer-events: none;
background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(96, 165, 250, 0.2), transparent 30%), radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.14), transparent 26%), linear-gradient(135deg, rgba(8, 16, 29, 0.8) 0%, rgba(8, 18, 34, 0.52) 48%, rgba(15, 23, 42, 0.82) 100%);
}
.login-container:after {
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
z-index: 0;
position: absolute;
pointer-events: none;
background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
background-size: 38px 38px;
mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
opacity: 0.22;
}
.login-container .header {
top: 0;
left: 0;
width: 100%;
height: 48px;
position: absolute;
z-index: 2;
display: flex;
padding: 0 32px;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
}
.login-container .header:before {
left: 32px;
right: 32px;
bottom: 0;
height: 1px;
content: '';
position: absolute;
background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
}
.login-container .header .title {
color: #fff;
font-size: 18px;
line-height: 48px;
font-weight: 600;
text-indent: 0;
letter-spacing: 0.08em;
text-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
}
.login-container .header .title span {
opacity: 0.72;
font-size: 11px;
padding-left: 8px;
}
.login-container .header a,
.login-container .header a:focus,
.login-container .header a:hover {
color: #fff;
letter-spacing: 0.08em;
text-decoration: none;
}
.login-container .header > a.pull-right {
top: 0;
right: 0;
z-index: 1;
line-height: 0;
position: absolute;
}
.login-container .header > a.pull-right img {
display: block;
}
.login-container form {
z-index: 2;
width: min(420px, 100%);
flex: 0 0 auto;
position: relative;
padding: 28px 28px 30px;
margin: 0;
overflow: hidden;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 20px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.82) 100%);
backdrop-filter: blur(20px);
box-shadow: 0 28px 100px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.login-container form:before {
top: 0;
left: 0;
right: 0;
height: 4px;
content: '';
position: absolute;
background: linear-gradient(90deg, #14b8a6 0%, #60a5fa 58%, #a78bfa 100%);
}
.login-container form:after {
inset: 0;
content: '';
position: absolute;
pointer-events: none;
background: radial-gradient(circle at 0 0, rgba(45, 212, 191, 0.12), transparent 30%), radial-gradient(circle at 100% 18%, rgba(59, 130, 246, 0.12), transparent 32%);
}
.login-container form > * {
z-index: 1;
position: relative;
}
.login-container form h2 {
color: #0f172a;
padding: 0 0 18px;
font-size: 30px;
text-align: center;
font-weight: 700;
letter-spacing: 0.02em;
}
.login-container form ul li {
margin-top: 16px;
}
.login-container form ul li label {
display: block;
position: relative;
}
.login-container form ul li i.layui-icon {
color: #64748b;
z-index: 2;
top: 0;
left: 16px;
width: 24px;
height: 52px;
display: flex;
font-size: 18px;
position: absolute;
padding: 0;
line-height: 52px;
align-items: center;
pointer-events: none;
justify-content: center;
transition: color 0.2s ease;
}
.login-container form ul li input {
color: #1f2937;
z-index: 1;
height: 52px;
display: block;
position: relative;
padding: 0 56px 0 52px;
font-size: 14px;
line-height: normal;
box-sizing: border-box;
background-clip: padding-box;
text-indent: 0;
border: 1px solid rgba(148, 163, 184, 0.24) !important;
border-radius: 14px;
letter-spacing: 0;
background: rgba(255, 255, 255, 0.78);
text-shadow: none;
-webkit-text-fill-color: #1f2937 !important;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.login-container form ul li input:hover,
.login-container form ul li input:focus,
.login-container form ul li input:active,
.login-container form ul li input:-webkit-autofill,
.login-container form ul li input:-webkit-autofill:hover,
.login-container form ul li input:-webkit-autofill:focus,
.login-container form ul li input:-webkit-autofill:active {
border: 1px solid rgba(37, 99, 235, 0.4) !important;
background: rgba(255, 255, 255, 0.92);
text-shadow: none;
box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.92) inset, 0 0 0 4px rgba(59, 130, 246, 0.1), 0 14px 30px rgba(15, 23, 42, 0.08) !important;
-webkit-text-fill-color: #1f2937 !important;
-webkit-transition-delay: 9999s !important;
-webkit-transition: color 9999s ease-out, background-color 9999s ease-out !important;
}
.login-container form ul li label:focus-within i.layui-icon {
color: #2563eb;
}
.login-container form ul li span {
letter-spacing: 1px;
color: #dc2626 !important;
}
.login-container form ul li button {
display: flex !important;
color: #fff !important;
height: 52px !important;
border: none !important;
line-height: normal !important;
align-items: center;
background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%) !important;
border-radius: 14px !important;
justify-content: center;
letter-spacing: 0.16em !important;
box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.login-container form ul li button:hover {
opacity: 1;
filter: brightness(1.03);
transform: translateY(-1px);
box-shadow: 0 20px 42px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.login-container form ul li button.layui-disabled {
opacity: 0.78;
box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.login-container .login-verify-popup {
inset: 0;
z-index: 4;
position: absolute;
}
.login-container .login-verify-popup .login-verify-mask {
inset: 0;
position: absolute;
background: rgba(8, 15, 28, 0.38);
backdrop-filter: blur(6px);
}
.login-container .login-verify-popup .login-verify-dialog {
top: 50%;
left: 50%;
z-index: 1;
width: min(440px, calc(100% - 32px));
position: absolute;
padding: 22px;
transform: translate(-50%, -46%) scale(0.96);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 24px;
background: rgba(248, 250, 252, 0.96);
box-shadow: none;
opacity: 0;
transition: opacity 0.22s ease, transform 0.22s ease;
}
.login-container .login-verify-popup.is-visible .login-verify-dialog {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.login-container .login-verify-popup .slider-title {
color: #0f172a;
font-size: 14px;
line-height: 1.7em;
margin-bottom: 12px;
font-weight: 600;
text-align: center;
letter-spacing: 0.02em;
}
.login-container .login-verify-popup .slider-panel {
padding: 12px;
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 18px;
background: rgba(248, 250, 252, 0.88);
box-shadow: none;
}
.login-container .login-verify-popup .slider-stage {
height: auto;
aspect-ratio: 2 / 1;
overflow: hidden;
position: relative;
border: 1px solid rgba(148, 163, 184, 0.12);
border-radius: 16px;
background: #e2e8f0;
}
.login-container .login-verify-popup .slider-bg,
.login-container .login-verify-popup .slider-piece {
top: 0;
left: 0;
height: 100%;
position: absolute;
}
.login-container .login-verify-popup .slider-bg {
width: 100%;
display: block;
object-fit: fill;
}
.login-container .login-verify-popup .slider-piece {
width: 16.6667%;
display: block;
pointer-events: none;
filter: none;
box-shadow: none;
}
.login-container .login-verify-popup .slider-bar {
height: 48px;
margin-top: 10px;
overflow: hidden;
position: relative;
box-sizing: border-box;
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 14px;
background: rgba(255, 255, 255, 0.86);
box-shadow: none;
}
.login-container .login-verify-popup .slider-bar-track {
top: 0;
left: 0;
width: 0;
height: 100%;
display: none;
position: absolute;
border-radius: 13px 0 0 13px;
background: transparent;
}
.login-container .login-verify-popup .slider-bar-text {
top: 0;
left: 0;
right: 0;
z-index: 1;
color: #64748b;
font-size: 13px;
line-height: 48px;
position: absolute;
text-align: center;
letter-spacing: 0;
}
.login-container .login-verify-popup .slider-handle {
top: 0;
left: 0;
z-index: 2;
width: 54px;
height: 100%;
color: #0f172a;
display: flex;
cursor: grab;
position: absolute;
box-sizing: border-box;
align-items: center;
justify-content: center;
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 14px;
background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
box-shadow: none;
}
.login-container .login-verify-popup .slider-handle.is-active {
cursor: grabbing;
box-shadow: none;
}
.login-container .login-verify-popup .slider-handle i {
color: #0f766e;
padding: 0;
font-size: 18px;
position: static;
}
.login-container .login-verify-popup .slider-actions {
display: flex;
font-size: 12px;
margin-top: 8px;
align-items: center;
justify-content: space-between;
color: #64748b;
letter-spacing: 0;
}
.login-container .login-verify-popup .slider-actions a {
color: #0f766e;
text-decoration: none;
}
.login-container .login-verify-popup .slider-panel.is-success .slider-bar-track {
background: transparent;
}
.login-container .login-verify-popup .slider-panel.is-success .slider-bar-text {
color: #0f766e;
}
.login-container .login-verify-popup .slider-panel.is-error .slider-bar-track {
background: transparent;
}
.login-container .login-verify-popup .slider-panel.is-error .slider-bar-text {
color: #dc2626;
}
.login-container .footer {
left: 0;
bottom: 0;
z-index: 2;
color: rgba(255, 255, 255, 0.78);
width: 100%;
position: absolute;
text-align: center;
line-height: 30px;
padding: 0 24px 14px;
box-sizing: border-box;
text-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
letter-spacing: 0.04em;
}
.login-container .footer a,
.login-container .footer span {
color: rgba(255, 255, 255, 0.78);
}
.login-container .footer a:hover {
color: #fff;
}
@media (max-width: 768px) {
.login-container {
padding: 64px 18px 92px;
}
.login-container:after {
opacity: 0.14;
}
.login-container form {
padding: 24px 20px 24px;
border-radius: 18px;
}
.login-container form h2 {
font-size: 26px;
}
.login-container .login-verify-popup .login-verify-dialog {
padding: 18px;
}
.login-container .footer {
line-height: 1.8em;
padding: 0 18px 12px;
}
}
@media (max-width: 480px) {
.login-container {
padding: 58px 14px 86px;
}
.login-container .header {
padding: 0 16px;
}
.login-container .header:before {
left: 16px;
right: 16px;
}
.login-container .header .title {
font-size: 16px;
}
.login-container form {
width: 100%;
padding: 22px 18px 22px;
}
.login-container .login-verify-popup .login-verify-dialog {
width: calc(100% - 20px);
padding: 16px;
}
.login-container .login-verify-popup .slider-stage {
height: auto;
}
}