/* ==========================================================================
   认证类页面主题 (login / register / forgetPwd / modifyPwd / changeLanguage)
   需在 tabler*.css 与 theme.css 之后引入。
   设计令牌与 crmProd_usk 的 login.html / modifyPwd.html 一致。
   ========================================================================== */

body {
    background: linear-gradient(135deg, #081218 0%, #0d1a24 25%, #1a2d40 50%, #0d1a24 75%, #081218 100%);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
    color: #ffffff;
}

/* ---------- 动态背景粒子 ---------- */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(14, 165, 233, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50%      { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* ---------- 金融市场动态线条 ---------- */
.market-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.market-lines .line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scaleX(1); }
    50%      { opacity: 1; transform: scaleX(1.2); }
}

/* ---------- 主容器 ---------- */
.auth-container {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* 表单较长的页面（注册/找回密码）顶部对齐，避免溢出 */
.auth-container.auth-top {
    align-items: flex-start;
    padding-top: 30px;
    padding-bottom: 60px;
}

.auth-box {
    background: rgba(33, 28, 18, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 16px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(14, 165, 233, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 50px 45px;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* 宽版（注册页字段较多） */
.auth-box.auth-box-wide {
    max-width: 720px;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* 让内容浮在扫光之上 */
.auth-box > * {
    position: relative;
    z-index: 1;
}

/* ---------- Logo 区域 ---------- */
.logo-container {
    margin-bottom: 35px;
    position: relative;
}

.logo-container img {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: block;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.company-name {
    color: #ffffff;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    letter-spacing: 1px;
}

/* ---------- 标题 ---------- */
.auth-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1.6rem;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.auth-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #0EA5E9, #22D3EE);
    border-radius: 2px;
}

/* ---------- 表单 ---------- */
.auth-box .mb-3,
.auth-box .mb-2 {
    margin-bottom: 22px !important;
    position: relative;
    text-align: left;
}

.auth-box .form-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
    text-align: left;
}

.auth-box .form-label-description {
    float: right;
    font-weight: 400;
}

.auth-box .form-label-description a,
.forgot-password {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.auth-box .form-label-description a:hover,
.forgot-password:hover {
    color: #0EA5E9;
}

.auth-box .form-control,
.auth-box .form-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(48, 40, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff !important;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-box .form-control:focus,
.auth-box .form-select:focus {
    outline: none;
    border-color: #0EA5E9;
    background: rgba(48, 40, 25, 0.8);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.2);
    color: #ffffff !important;
}

.auth-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-box .form-select option {
    background: #0d1a24;
    color: #ffffff;
}

/* 自动填充保持白字 */
.auth-box .form-control:-webkit-autofill,
.auth-box .form-control:-webkit-autofill:hover,
.auth-box .form-control:-webkit-autofill:focus,
.auth-box .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(48, 40, 25, 0.8) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.auth-box .form-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 6px;
    text-align: left;
}

/* 两列表单网格（注册页） */
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    text-align: left;
}

.auth-grid .full-width {
    grid-column: 1 / -1;
}

/* ---------- 验证码 ---------- */
.verification-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.verification-input {
    flex: 1;
}

.verification-img {
    width: 120px;
    height: 54px;
    background: linear-gradient(45deg, #1a2d40, #0d1a24);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
    flex-shrink: 0;
}

.verification-img:hover {
    border-color: #0EA5E9;
    background: linear-gradient(45deg, #4a3d24, #1a2d40);
}

/* 发送验证码按钮 */
.send-code-btn {
    padding: 16px 18px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 12px;
    color: #0EA5E9;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.send-code-btn:hover {
    background: rgba(14, 165, 233, 0.3);
    border-color: #0EA5E9;
    color: #ffffff;
}

.send-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- 主按钮 ---------- */
.auth-box .btn-primary,
.auth-box .submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #0EA5E9, #22D3EE);
    border: none;
    border-radius: 12px;
    /* 琥珀底为亮色，白字仅 2.15:1，改用深棕黑字（8.85:1） */
    color: #081218;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.auth-box .btn-primary:hover,
.auth-box .submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
    color: #081218;
}

.auth-box .btn-primary:active {
    transform: translateY(0);
}

.auth-box .form-footer {
    margin-top: 10px;
}

/* ---------- 底部链接 ---------- */
.auth-box .text-center.text-muted,
.auth-footer-link {
    text-align: center;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 14px;
}

.signup-link {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: #22D3EE;
    text-decoration: underline;
}

/* 复选框（注册页条款） */
.auth-box .form-check {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-box .form-check-input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: #0EA5E9;
    background: rgba(48, 40, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.auth-box .form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.auth-box .form-check-label a {
    color: #0EA5E9;
    text-decoration: none;
}

.auth-box .form-check-label a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Tabler 原生卡片变体
   适用于仍保留 .page-center + .card.card-md 结构的认证页
   （modifyPwd / changeLanguage / forgetPwd / register），
   与 crmProd_usk 的做法一致：不改 HTML 结构，只覆盖样式。
   ========================================================================== */

.page,
.page-center {
    background: transparent !important;
}

.page-center {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 15px 15px 80px;
}

.auth-page .card {
    background: rgba(33, 28, 18, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(14, 165, 233, 0.2) !important;
    border-radius: 16px !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(14, 165, 233, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    padding: 35px 30px 40px 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    color: #ffffff;
}

/* 字段较多的注册页给更宽的卡片 */
.auth-page.auth-page-wide .card {
    max-width: 720px;
}

.auth-page .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.auth-page .card-body {
    background: transparent !important;
    position: relative;
    z-index: 1;
    padding: 0;
}

.auth-page .card-title,
.auth-page .card-body > h2 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1.6rem;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
    display: block;
}

.auth-page .card-title::after,
.auth-page .card-body > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #0EA5E9, #22D3EE);
    border-radius: 2px;
}

.auth-page .mb-3,
.auth-page .mb-2 {
    margin-bottom: 20px !important;
    position: relative;
}

.auth-page .form-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.5px;
}

.auth-page .form-label-description {
    float: right;
    font-weight: 400;
}

.auth-page .form-label-description a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-page .form-label-description a:hover {
    color: #0EA5E9;
}

.auth-page .input-group {
    position: relative;
    border-radius: 12px !important;
    overflow: visible;
}

.auth-page .form-control,
.auth-page .form-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(48, 40, 25, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.auth-page .form-control:focus,
.auth-page .form-select:focus {
    outline: none;
    border-color: #0EA5E9;
    background: rgba(48, 40, 25, 0.9);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.auth-page .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-page .form-select option {
    background: #0d1a24;
    color: #ffffff;
}

.auth-page .form-control:-webkit-autofill,
.auth-page .form-control:-webkit-autofill:hover,
.auth-page .form-control:-webkit-autofill:focus,
.auth-page .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(48, 40, 25, 0.9) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.auth-page input[type="text"],
.auth-page input[type="email"],
.auth-page input[type="password"] {
    border-radius: 12px !important;
    -webkit-appearance: none;
    appearance: none;
}

.auth-page .form-text,
.auth-page .form-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.auth-page .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.auth-page .btn-primary {
    background: linear-gradient(135deg, #0EA5E9, #22D3EE);
    border: none;
    border-radius: 15px;
    /* 琥珀底为亮色，白字仅 2.15:1，改用深棕黑字（8.85:1） */
    color: #081218;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 14px 20px;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
    letter-spacing: 0.5px;
}

.auth-page .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-page .btn-primary:hover::before {
    left: 100%;
}

.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.5);
    color: #081218;
}

.auth-page .btn-primary:active {
    transform: translateY(0);
}

.auth-page .btn-primary.w-100 {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    font-size: 15px;
}

.auth-page .form-footer {
    margin-top: 10px;
}

/* 卡片外的 logo 与底部链接 */
.auth-page .navbar-brand img,
.auth-page .card-body img.auth-logo {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.auth-page .card + .text-center,
.auth-page .text-center.text-muted.mt-3 {
    position: relative;
    z-index: 20;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 20px;
}

.auth-page .card + .text-center a,
.auth-page .text-center.text-muted.mt-3 a {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
}

.auth-page .card + .text-center a:hover,
.auth-page .text-center.text-muted.mt-3 a:hover {
    color: #22D3EE;
    text-decoration: underline;
}

/* 返回登录 --------- */
.top-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 30;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.back-to-login:hover,
.back-to-login:focus {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(14, 165, 233, 0.32);
    transform: translateX(-2px);
    text-decoration: none;
}

.back-icon {
    margin-right: 6px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.back-to-login:hover .back-icon {
    transform: translateX(-2px);
}

@media (max-width: 768px) {
    .page-center {
        padding: 10px 10px 20px;
    }

    .auth-page .card,
    .auth-page.auth-page-wide .card {
        margin: 0;
        padding: 25px 20px 30px 20px;
        max-width: 100%;
    }

    .auth-page .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    .auth-page .btn-primary.w-100 {
        padding: 14px;
        font-size: 14px;
        margin-top: 12px;
    }

    .top-nav {
        top: 15px;
        left: 15px;
    }

    .back-to-login {
        font-size: 13px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .page-center {
        padding: 5px 5px 20px;
    }

    .auth-page .card {
        padding: 20px 15px 25px 15px;
        border-radius: 12px;
    }

    .auth-page .card-title,
    .auth-page .card-body > h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .auth-page .mb-3 {
        margin-bottom: 12px !important;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .auth-box,
    .auth-box.auth-box-wide {
        margin: 20px 0;
        padding: 35px 25px;
        max-width: 100%;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .company-name { font-size: 20px; }
    .auth-title { font-size: 1.35rem; }

    .logo-container img {
        width: 64px;
        height: 64px;
    }

    .market-lines { display: none; }
}