/* ====== 基础重置 ====== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

/* ====== 自定义字体声明（科技感等宽字体回退） ====== */
body.signin {
    min-height: 100vh;
    background: #0a0f1e;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ====== Canvas粒子网络背景 ====== */
#techCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ====== 网格底纹 ====== */
body.signin::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    animation: gridScroll 8s linear infinite;
}

@keyframes gridScroll {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 60px 60px, 60px 60px;
    }
}

/* ====== 光晕 ====== */
body.signin::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 25% 25%, rgba(0, 180, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(100, 0, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 255, 200, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ====== 主容器 ====== */
.login-wrapper {
    position: relative;
    z-index: 2;
    width: 960px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* ====== 左侧品牌区 ====== */
.login-left {
    flex: 1;
    color: #fff;
    padding-right: 60px;
}

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

/* 锁图标 - 圆形科技风格 */
.login-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 35px rgba(0, 200, 255, 0.2);
    position: relative;
}

.login-icon::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 200, 255, 0.25);
    animation: ringRotate 18s linear infinite;
}

.login-icon::after {
    content: "";
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    border: 1px dotted rgba(0, 200, 255, 0.12);
    animation: ringRotate 28s linear infinite reverse;
}

.login-icon img {
    width: 60px;
    height: 60px;
    opacity: 0.95;
}

@keyframes ringRotate {
    100% {
        transform: rotate(360deg);
    }
}

.company-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a0e9ff 50%, #60d0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 12px rgba(0, 200, 255, 0.3));
}

.system-title {
    font-size: 15px;
    color: rgba(180, 220, 255, 0.9);
    letter-spacing: 2px;
    font-weight: 300;
}

/* 数据流装饰 */
.data-stream {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 12px;
    color: rgba(0, 255, 255, 0.12);
    line-height: 1.7;
    max-width: 380px;
    word-break: break-all;
    margin-top: 35px;
    user-select: none;
    position: relative;
}

.data-stream::before {
    content: ">>> SYS_CHECK: OK";
    display: block;
    color: rgba(0, 255, 100, 0.25);
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 1px;
}

.data-line {
    opacity: 0.5;
    animation: dataFlicker 3s ease-in-out infinite;
}

.data-line:nth-child(2) {
    animation-delay: 0.8s;
}

.data-line:nth-child(3) {
    animation-delay: 1.6s;
}

@keyframes dataFlicker {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.9;
    }
}

/* ====== 右侧登录卡片 ====== */
.login-card {
    width: 380px;
    min-height: 350px;
    background: rgba(10, 25, 55, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 2px;
    padding: 38px 34px;
    position: relative;
    color: #e0f0ff;
    box-shadow: 0 0 40px rgba(0, 100, 200, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

/* 卡片扫描线 */
.login-card::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 255, 255, 0.06) 50%,
    transparent 100%);
    animation: scanLine 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes scanLine {
    0% {
        top: -40px;
    }
    100% {
        top: 100%;
    }
}

/* 卡片边框发光 */
.login-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 2px;
    padding: 1px;
    background: linear-gradient(180deg,
    rgba(0, 200, 255, 0.5) 0%,
    rgba(0, 200, 255, 0.05) 40%,
    rgba(0, 255, 255, 0.05) 60%,
    rgba(0, 200, 255, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 卡片内容层级 */
.login-card > * {
    position: relative;
    z-index: 2;
}

.login-card h4 {
    margin: 0 0 28px 0;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #e0f0ff;
    text-align: center;
    text-transform: uppercase;
}

.login-card h4::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ff, transparent);
    margin: 10px auto 0;
}

.login-card .form-control {
    height: 46px;
    border-radius: 2px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    padding: 10px 14px;
    font-size: 14px;
    color: #e0f0ff;
    background: rgba(0, 40, 80, 0.5);
    box-shadow: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.login-card .form-control::placeholder {
    color: rgba(180, 210, 240, 0.45);
    letter-spacing: 1px;
}

.login-card .form-control:focus {
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.15), inset 0 0 10px rgba(0, 200, 255, 0.05);
    outline: none;
    background: rgba(0, 50, 100, 0.6);
}

.login-card .btn-login {
    height: 46px;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 4px;
    margin-top: 10px;
    background: transparent !important;
    color: #0ff !important;
    border: 1px solid rgba(0, 255, 255, 0.5) !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-card .btn-login::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.2);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.login-card .btn-login:hover {
    border-color: #0ff !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.08) !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    letter-spacing: 6px;
}

.login-card .btn-login:hover::before {
    width: 400px;
    height: 400px;
}

.login-card .btn-login.loading {
    cursor: not-allowed;
    opacity: 0.85;
}

.login-card .btn-login.loading .btn-text {
    display: none;
}

.login-card .btn-login.loading .btn-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 255, 255, 0.25);
    border-top-color: #0ff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes btnSpin {
    100% {
        transform: rotate(360deg);
    }
}

.login-card .login-link {
    display: block;
    text-align: right;
    margin-top: 16px;
    color: rgba(0, 220, 255, 0.65);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.login-card .login-link:hover {
    color: #0ff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    text-decoration: none;
}

.alert-danger {
    background-color: rgba(255, 50, 50, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
    border-radius: 2px;
    margin-top: 15px;
    padding: 10px 15px;
    text-shadow: 0 0 6px rgba(255, 100, 100, 0.2);
    min-height: 44px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

/* ====== 底部版权 ====== */
.login-footer {
    position: fixed;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(120, 180, 220, 0.5);
    font-size: 11px;
    z-index: 1;
    letter-spacing: 1px;
}

/* ====== 修改密码弹窗（通用） ====== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
}

.pwd-modal {
    width: 470px;
    background: rgba(15, 30, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 2px;
    box-shadow: 0 0 60px rgba(0, 150, 255, 0.2);
    overflow: hidden;
}

.pwd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: rgba(0, 180, 255, 0.06);
    border-bottom: 1px solid rgba(0, 200, 255, 0.15);
}

.pwd-modal-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    color: #d0e8ff;
    letter-spacing: 2px;
}

.pwd-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: rgba(180, 210, 240, 0.7);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.pwd-modal-header .close-btn:hover {
    color: #0ff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.pwd-modal-body {
    padding: 28px 22px;
}

.pwd-form-group {
    margin-bottom: 20px;
}

.pwd-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(180, 210, 240, 0.8);
    font-weight: 400;
    letter-spacing: 1px;
}

.pwd-form-group .form-control {
    height: 42px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 2px;
    padding: 8px 14px;
    font-size: 14px;
    width: 100%;
    color: #e0f0ff;
    background: rgba(0, 30, 60, 0.5);
    transition: all 0.3s;
}

.pwd-form-group .form-control:focus {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.1);
    outline: none;
}

.pwd-form-group .form-control::placeholder {
    color: rgba(160, 200, 230, 0.4);
}

.pwd-error-msg {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.pwd-modal-footer {
    padding: 14px 22px;
    background: rgba(0, 180, 255, 0.04);
    border-top: 1px solid rgba(0, 200, 255, 0.12);
    text-align: right;
}

.pwd-modal-footer .btn-update {
    height: 36px;
    padding: 0 28px;
    border-radius: 2px;
    border: 1px solid rgba(0, 200, 255, 0.5);
    background: transparent;
    color: #0ff;
    font-size: 13px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.pwd-modal-footer .btn-update:hover {
    background: rgba(0, 200, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.25);
}

.pwd-modal-footer .btn-update:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ====== 响应式 ====== */
@media screen and (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        width: 100%;
        padding: 30px 20px;
    }

    .login-left {
        padding-right: 0;
        text-align: center;
        margin-bottom: 30px;
    }

    .login-brand {
        justify-content: center;
    }

    .data-stream {
        display: none;
    }

    .login-card {
        width: 100%;
        max-width: 370px;
        min-height: 350px;
    }

    .pwd-modal {
        width: calc(100% - 40px);
        max-width: 470px;
    }

    #techCanvas {
        opacity: 0.4;
    }
}
