/*
 * Login.cshtml 新版视觉样式（从页面 <style> 内联块抽出）。
 * 图形化背景插画 + 浅色配色 + 偏上居中登录卡 + 产品特点 ribbon。
 * 注意：此文件不会被 Razor 解析，故背景图用静态绝对路径 /Content/images/login-bg.jpg，
 *       不再使用 @Url.Content。
 */

/* ===== 重置：消除 body 默认外边距/滚动条占位造成的左右错位 ===== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== 新版视觉：图形化背景插画 + 浅色配色（覆盖 login.css 的 .login-bg） ===== */
body.login-bg {
    background: url(/Content/images/login-bg.jpg?v=20261114i) center / cover no-repeat,
                linear-gradient(135deg, #eaf2fc 0%, #e9f6f1 100%);
    background-attachment: fixed;   /* 背景相对视口定位，与 fixed 居中的卡片同参考系，避免左右错位 */
    overflow: hidden;
}

/* 浅色柔化遮罩：统一色调、保证品牌与登录框可读（不挡底部备案栏） */
body.login-bg::before {
    content: "";
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.16) 42%, rgba(255,255,255,.20) 100%);
}

/* 页面级品牌标题（纯文字，置于背景之上，非白卡，避免与登录卡叠卡片造成重复） */
.brand-top {
    position: fixed; top: 40px; left: 0; right: 0; z-index: 3;
    text-align: center; pointer-events: none;
}
.brand-title {
    font-size: 26px; font-weight: 800; color: #1f4e8f; letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(255,255,255,.85);
}
.brand-sub {
    font-size: 13px; color: #5d788f; letter-spacing: 4px; margin-top: 6px;
    text-shadow: 0 1px 6px rgba(255,255,255,.85);
}

/* 两大产品系列展示：车间计量刷卡电子秤（蓝）+ 收购自动化控制系统（青绿） */
.feature-ribbon {
    position: fixed; left: 0; right: 0; bottom: 58px; z-index: 3;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; padding: 0 16px;
}
.product-group {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.86); border: 1px solid rgba(120,160,210,.22);
    border-radius: 14px; padding: 10px 18px 10px 10px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px rgba(40,90,160,.12);
    max-width: 480px;
}
.pg-icon {
    width: 42px; height: 42px; border-radius: 11px; flex: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(40,90,160,.16);
}
.pg-icon svg { width: 22px; height: 22px; display: block; }
.pg-icon.blue { background: linear-gradient(135deg, #5aa2ff, #2f7ff0); }
.pg-icon.green { background: linear-gradient(135deg, #2fd3b3, #16b89a); }
.pg-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pg-title { font-size: 14px; font-weight: 700; color: #1f4e8f; white-space: nowrap; }
.pg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-tags span {
    font-size: 11px; line-height: 1; color: #3a5a86;
    background: rgba(47,127,240,.10); border-radius: 20px; padding: 4px 9px; white-space: nowrap;
}
.group-purchase .pg-title { color: #0f7a63; }
.group-purchase .pg-tags span { background: rgba(22,184,154,.12); color: #0f7a63; }
.pg-icon.purple { background: linear-gradient(135deg, #9a7bff, #6a4cff); }
.group-bluetooth .pg-title { color: #5a3fe0; }
.group-bluetooth .pg-tags span { background: rgba(106,76,255,.12); color: #5a3fe0; }

.layui-tab-brief > .layui-tab-title .layui-this {
    color: #4391FF !important;
}
.layui-tab-brief > .layui-tab-more li.layui-this:after,
.layui-tab-brief > .layui-tab-title .layui-this:after {
    border-bottom: 2px solid #4391FF !important;
}

/* 登录页只有“微信登录/账号登录”两个固定 tab，不需要 layui 自动生成的“更多”折叠按钮（∨）。
   element 模块初始化时误判标题宽度超限会插入 .layui-tab-bar，这里隐藏掉。 */
.login-card .layui-tab-bar {
    display: none !important;
}

/* 登录卡片：页面正中央，白底圆角 + 柔和阴影。
   用 fixed 直接基于视口定位，避免 body 外边距/relative 导致的绝对定位偏左。 */
.login-card {
    width: 400px;
    min-height: 520px;
    background-color: #fff;
    border-radius: 16px;
    border: 1px solid rgba(120,160,210,.18);
    box-shadow: 0 22px 60px rgba(40,90,160,.22);
    position: fixed;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    z-index: 2;
    box-sizing: border-box;
    padding: 0 30px 15px;   /* 左右对称内边距，保证内部内容对称留白 */
    overflow: hidden;
}

/* 登录卡片头部：品牌行（logo+公司名）+ 主标题 + 标语 + 分隔线，参照图2 把品牌整合进卡片，整页唯一卡片 */
.login-head {
    text-align: center;
    padding: 4px 0 14px;
    margin-top: 8px;
    border-bottom: 1px solid rgba(120,160,210,.18);
}
/* 单位标识行：小圆形图标 + 单位名称（替代原"带英文的整张 logo 图"，参考图2） */
.login-head-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 12px;
}
.login-head-icon {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #5aa2ff, #2f7ff0);
    box-shadow: 0 4px 10px rgba(47,127,240,.28);
}
.login-head-icon svg { width: 20px; height: 20px; display: block; }
.login-head-name { font-size: 16px; font-weight: 700; color: #1f4e8f; letter-spacing: 1px; }
/* 欢迎登录：参考图2，短蓝下划线 */
.login-head-title {
    font-size: 22px; font-weight: 800; color: #1f4e8f; letter-spacing: 2px;
    display: inline-block; padding-bottom: 6px; border-bottom: 3px solid #4391FF;
}

/* tab 容器占满卡片内容区（配合卡片左右对称 padding），不再左移，保证内部居中 */
.titleoptions {
    width: 100%;
    margin-left: 0;
}

/* 微信二维码区域：wxLogin.js 会往这里追加一个 300x400 的 iframe */
.wx-qr-box {
    width: 300px;
    min-height: 400px;
    margin: 0 auto;
}
.wx-qr-box iframe {
    border: medium none;
}

.qr-tip {
    display: none;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    color: #808080;
}
.qr-tip a {
    color: #4391FF;
    text-decoration: none;
}

/* 底部备案栏：透明背景，不再遮挡背景插画底部；仅保留极淡上边框 */
.footer-bar {
    height: 46px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: transparent;
    border-top: 1px solid rgba(120,160,210,.14);
}
.footer-bar .inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #46566a;
    gap: 6px;
}
.footer-bar .inner img {
    height: 16px;
    width: 16px;
}
.footer-bar .inner a {
    color: #2f5d8f;
    text-decoration: none;
}

/* 矮屏 / 笔记本小屏（视口高度不足，固定定位的标题与底部产品 ribbon 会和居中登录卡重叠）：
   收缩标题尺寸，并把登录卡高度限制为“视口高度 - 上下留白”，超出则内部滚动，
   保证登录卡始终完整、不与顶部标题 / 底部元素重叠。 */
@media (max-height: 900px) {
    .brand-top { top: 16px; }
    .brand-title { font-size: 21px; letter-spacing: 1px; }
    .brand-sub { font-size: 11px; margin-top: 3px; letter-spacing: 2px; }
    .login-card {
        min-height: 0;
        max-height: calc(100vh - 180px);   /* 给顶部品牌与底部 ribbon/备案预留空间，绝不越界 */
        overflow-y: auto;
    }
    .feature-ribbon { bottom: 46px; gap: 10px; padding: 0 12px; }
    .product-group { padding: 8px 14px 8px 8px; }
}
/* 极矮屏（常见于 768 高度的小笔记本）：进一步隐藏标语与产品 ribbon，优先保证登录卡完整可见 */
@media (max-height: 800px) {
    .brand-sub { display: none; }
    .feature-ribbon { display: none; }
    .login-card { max-height: calc(100vh - 90px); }
}

/* 窄屏：取消绝对定位，改正常文档流，避免卡片/标签重叠 */
@media (max-width: 720px) {
    body.login-bg { overflow: auto; }
    .brand-top { position: static; padding-top: 28px; }
    .login-card { position: static; transform: none; margin: 22px auto 20px; top: auto; left: auto; }
    .feature-ribbon { position: static; margin: 18px auto 66px; }
}
