/* ============================================================
 * 夜言客服台 - 高级登录界面样式（补丁式，不改动原业务逻辑）
 * 应用对象：仅 login/login.html；主页及其它页面不受影响
 * 背景图：login/login-bg.jpg（用户指定）
 * ============================================================ */

/* ---------- 全局背景层（固定，不随滚动）---------- */
html.login-page,
body.login-page { min-height: 100vh; }

/* 背景图 + 晚霞色调遮罩：仅作用于登录页 body（由 JS 添加 login-page class） */
body.login-page {
    background: #1a1533 !important;
}
body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/login/login-bg.jpg') center center / cover no-repeat;
    z-index: -2;
    transform: scale(1.02);
}
body.login-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 21, 51, 0.28) 0%, rgba(26, 21, 51, 0.55) 45%, rgba(12, 10, 30, 0.82) 100%),
        linear-gradient(135deg, rgba(102, 126, 234, 0.22) 0%, rgba(236, 110, 173, 0.18) 100%);
    z-index: -1;
}

/* ---------- 通用玻璃卡片 ---------- */
.hy-glass {
    background: rgba(255, 255, 255, 0.10) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 18px 60px rgba(10, 8, 30, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
}

/* 标题渐变文字 */
.hy-title {
    background: linear-gradient(100deg, #ffffff 0%, #ffd9ec 45%, #c9d4ff 100%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* ---------- 品牌标识（卡片顶部）---------- */
.hy-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 26px !important;
}
.hy-brand-logo {
    width: 62px !important;
    height: 62px !important;
    border-radius: 18px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    object-fit: contain !important;
    margin-bottom: 14px !important;
}
.hy-brand-name {
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
}
.hy-brand-sub {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    margin-top: 5px !important;
    letter-spacing: 0.5px !important;
}

/* ============================================================
 * 移动端（<768px）：居中玻璃卡片
 * ============================================================ */
@media (max-width: 767px) {
    html, body { background: transparent !important; }

    .login-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-height: 100vh !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 32px 22px calc(32px + env(safe-area-inset-bottom)) !important;
    }

    /* 卡片本体 */
    .login-container::before {
        /* 占位：保留结构，实际玻璃效果加在内层容器见 login-ui.js */
        content: none;
    }

    .input-label {
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 600 !important;
    }

    .input-group input {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        color: #ffffff !important;
        border-radius: 14px !important;
        padding: 15px 16px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
        transition: border-color .2s, background .2s, box-shadow .2s !important;
    }
    .input-group input::placeholder { color: rgba(255, 255, 255, 0.48) !important; }
    .input-group input:focus {
        background: rgba(255, 255, 255, 0.18) !important;
        border-color: rgba(255, 214, 236, 0.75) !important;
        box-shadow: 0 0 0 3px rgba(236, 110, 173, 0.18) !important;
    }
}

/* ============================================================
 * 桌面端（>=768px）：左侧品牌 + 右侧玻璃登录卡
 * ============================================================ */
@media (min-width: 768px) {
    * { box-sizing: border-box; }
    html, body { background: transparent !important; }

    .page-wrapper {
        background: transparent !important;
        position: relative !important;
    }

    /* 左侧品牌区：改用背景图 + 文案 */
    .brand-panel {
        background: transparent !important;
        position: relative !important;
        padding: 60px !important;
    }
    .brand-panel::before { content: none !important; }
    .brand-content {
        max-width: 460px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
        backdrop-filter: blur(20px) saturate(150%) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        box-shadow: 0 18px 60px rgba(10, 8, 30, 0.35) !important;
        border-radius: 28px !important;
        padding: 48px 40px !important;
    }
    .brand-logo {
        width: 84px !important;
        height: 84px !important;
        border-radius: 22px !important;
        padding: 16px !important;
        margin-bottom: 26px !important;
        background: rgba(255, 255, 255, 0.18) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    .brand-title {
        font-size: 34px !important;
        font-weight: 800 !important;
        letter-spacing: 2px !important;
        color: #ffffff !important;
        background: linear-gradient(100deg, #ffffff 0%, #ffd9ec 50%, #c9d4ff 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }
    .brand-desc { color: rgba(255, 255, 255, 0.78) !important; }
    .brand-divider { background: rgba(255, 255, 255, 0.5) !important; }

    /* 右侧登录区 */
    .login-panel { background: transparent !important; }

    /* 登录卡片玻璃化 */
    .login-card {
        background: rgba(255, 255, 255, 0.10) !important;
        -webkit-backdrop-filter: blur(26px) saturate(160%) !important;
        backdrop-filter: blur(26px) saturate(160%) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        box-shadow: 0 20px 70px rgba(10, 8, 30, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
        border-radius: 26px !important;
        padding: 46px 40px !important;
    }
    .login-card .card-title {
        color: #ffffff !important;
        font-size: 28px !important;
        font-weight: 800 !important;
    }
    .login-card .card-sub { color: rgba(255, 255, 255, 0.65) !important; }
    .login-card .input-label { color: rgba(255, 255, 255, 0.85) !important; }
    .login-card .input-group input {
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        color: #ffffff !important;
        border-radius: 14px !important;
        padding: 15px 16px !important;
    }
    .login-card .input-group input::placeholder { color: rgba(255, 255, 255, 0.48) !important; }
    .login-card .input-group input:focus {
        background: rgba(255, 255, 255, 0.18) !important;
        border-color: rgba(255, 214, 236, 0.75) !important;
        box-shadow: 0 0 0 3px rgba(236, 110, 173, 0.18) !important;
    }
    .login-card .bottom-link { color: rgba(255, 255, 255, 0.6) !important; }
}

/* ============================================================
 * 右滑解锁组件
 * ============================================================ */
.hy-slide {
    position: relative !important;
    width: 100% !important;
    height: 54px !important;
    margin-top: 18px !important;
    border-radius: 27px !important;
    background: linear-gradient(135deg, rgba(236, 110, 173, 0.28), rgba(102, 126, 234, 0.28)) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(10, 8, 30, 0.25) !important;
    overflow: hidden !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: pan-y !important;
    cursor: grab !important;
}
.hy-slide:active { cursor: grabbing !important; }
/* 未填写账号密码时淡化 */
.hy-slide:not(.ready) {
    opacity: 0.62 !important;
}
.hy-slide.ready {
    background: linear-gradient(135deg, rgba(236, 110, 173, 0.42), rgba(102, 126, 234, 0.42)) !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
}

.hy-slide-text {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    color: rgba(255, 255, 255, 0.92) !important;
    padding-left: 40px !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.hy-slide-thumb {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #ffffff 0%, #ffe4f1 100%) !important;
    box-shadow: 0 4px 14px rgba(10, 8, 30, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    color: #ec6ead !important;
    z-index: 2 !important;
    pointer-events: none !important;
    will-change: transform !important;
    transition: transform .28s cubic-bezier(.22,.61,.36,1) !important;
}
.hy-slide.dragging .hy-slide-thumb { transition: none !important; }

/* 原登录按钮隐藏（逻辑保留，由滑块触发 click） */
.login-btn {
    display: none !important;
}
