/* ==========================================================================
   SmilePro 登录页
   与官网共用一套视觉：深空底 + 紫青流光，白字黑底，去掉「若依」默认皮肤。

   为什么单独开一个文件而不改 login.css：
   login.css / login.min.css 还被 register.html 用着，改它们会连带影响注册页；
   这里只覆盖登录页需要的部分，加载顺序放在最后即可。
   ========================================================================== */

html,
body.sm-signin {
    height: 100%;
    margin: 0;
}

body.sm-signin {
    background: #05060f;
    color: #e8edf9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 背景层：封面图 + 渐变遮罩，保证任何尺寸下文字都可读 */
.sm-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    /* 第一层 = 外置封面（${profile}/img/hero.jpg），加载失败时自动露出第二层 jar 内副本 */
    background-image: url("/img/ext/hero.jpg"), url("../img/smile/hero.jpg");
    background-color: #05060f;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.sm-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 12% 30%, rgba(5, 6, 15, 0.86) 0%, rgba(5, 6, 15, 0.35) 52%, rgba(5, 6, 15, 0) 78%),
        linear-gradient(180deg, rgba(5, 6, 15, 0.55) 0%, rgba(5, 6, 15, 0.18) 38%, rgba(5, 6, 15, 0.82) 100%);
}

/* 极细网格，增加「工业感」，不抢视觉 */
.sm-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(to right, rgba(160, 180, 255, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(160, 180, 255, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(120% 90% at 50% 40%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 20%, transparent 78%);
}

.sm-wrap {
    position: relative;
    z-index: 2;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.sm-shell {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 56px;
    align-items: center;
}

/* ------------------------------------------------------------------ 左侧 */
.sm-brand .sm-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.sm-brand .sm-logo:hover,
.sm-brand .sm-logo:focus {
    color: #fff;
    text-decoration: none;
}

.sm-brand .sm-logo img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(80, 100, 255, 0.45);
}

.sm-brand .sm-logo b {
    font-size: 21px;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.sm-brand .sm-logo span {
    display: block;
    font-size: 11px;
    letter-spacing: 2.4px;
    color: #8d9bc4;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 2px;
}

.sm-headline {
    margin: 34px 0 0;
    font-size: 44px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.sm-headline em {
    font-style: normal;
    background: linear-gradient(96deg, #8b7bff 8%, #4f9dff 52%, #22d3ee 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sm-sub {
    margin: 18px 0 0;
    max-width: 470px;
    font-size: 15px;
    line-height: 1.85;
    color: #a8b5d6;
}

.sm-points {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    max-width: 470px;
}

.sm-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #93a1c4;
    line-height: 1.6;
}

.sm-points i {
    color: #4fd1e8;
    font-size: 14px;
    margin-top: 2px;
}

.sm-site-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 9px 16px;
    border: 1px solid rgba(140, 165, 255, 0.26);
    border-radius: 999px;
    color: #b8c6ea;
    font-size: 13px;
    text-decoration: none;
    background: rgba(120, 140, 255, 0.06);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sm-site-link:hover {
    color: #fff;
    text-decoration: none;
    border-color: rgba(140, 165, 255, 0.5);
    background: rgba(120, 140, 255, 0.12);
}

/* ------------------------------------------------------------------ 表单卡 */
.sm-card {
    position: relative;
    padding: 34px 32px 26px;
    border-radius: 20px;
    border: 1px solid rgba(150, 170, 255, 0.16);
    background: linear-gradient(180deg, rgba(16, 20, 38, 0.88) 0%, rgba(9, 11, 24, 0.92) 100%);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* 卡片顶部的一道光，模拟「边缘高光」 */
.sm-card::before {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(140, 170, 255, 0.85), transparent);
}

.sm-card h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.sm-card .sm-hint {
    margin: 0 0 24px;
    font-size: 12.5px;
    color: #7c8aad;
}

.sm-card .form-group {
    margin-bottom: 14px;
}

.sm-field {
    position: relative;
}

.sm-field > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7ba0;
    font-size: 14px;
    pointer-events: none;
}

.sm-card .form-control {
    height: 44px !important;
    padding: 6px 14px 6px 38px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(140, 160, 220, 0.18) !important;
    background: rgba(8, 11, 22, 0.72) !important;
    color: #e8edf9 !important;
    font-size: 14px;
    box-shadow: none !important;
    transition: border-color 0.18s, background 0.18s;
}

.sm-card .form-control::placeholder {
    color: #5e6c8e;
}

.sm-card .form-control:-ms-input-placeholder {
    color: #5e6c8e;
}

.sm-card .form-control:focus {
    border-color: rgba(90, 150, 255, 0.75) !important;
    background: rgba(10, 14, 28, 0.95) !important;
}

.sm-card .code {
    padding-left: 14px !important;
    letter-spacing: 2px;
}

.sm-card .imgcode {
    height: 44px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(140, 160, 220, 0.18);
    background: #0b0f1e;
    cursor: pointer;
    object-fit: cover;
}

/* 记住我 */
.sm-card .checkbox-custom {
    margin: 4px 0 2px;
    padding-left: 24px;
}

.sm-card .checkbox-custom label {
    color: #93a1c4;
    font-size: 13px;
}

.sm-card .checkbox-custom label::before {
    border-color: rgba(140, 160, 220, 0.4);
    background: rgba(8, 11, 22, 0.9);
}

.sm-card .checkbox-custom input[type="checkbox"]:checked + label::after {
    color: #7fd8ea;
}

/* 主按钮 */
.sm-card .btn-sm-login {
    width: 100%;
    height: 46px;
    margin-top: 16px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #06080f;
    background: linear-gradient(96deg, #8b7bff 0%, #4f9dff 48%, #22d3ee 100%);
    box-shadow: 0 12px 28px rgba(80, 120, 255, 0.35);
    transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}

.sm-card .btn-sm-login:hover,
.sm-card .btn-sm-login:focus {
    filter: brightness(1.06);
    box-shadow: 0 16px 34px rgba(80, 120, 255, 0.45);
    color: #06080f;
}

.sm-card .btn-sm-login:active {
    transform: translateY(1px);
}

.sm-card .btn-sm-login[disabled] {
    filter: grayscale(0.25) brightness(0.9);
    cursor: not-allowed;
}

.sm-card .sm-register {
    margin: 18px 0 0;
    font-size: 13px;
    color: #7c8aad;
    text-align: center;
}

.sm-card .sm-register a {
    color: #74b6ff;
    text-decoration: none;
}

.sm-card .sm-register a:hover {
    color: #a5d3ff;
    text-decoration: underline;
}

/* 表单校验提示：若依默认样式是白字飘在输入框下方，这里改成红色小块 */
.sm-card label.error {
    display: block;
    margin-top: 6px;
    padding: 0;
    font-size: 12px;
    color: #ff8a9b;
    position: static;
}

/* ------------------------------------------------------------------ 页脚 */
.sm-foot {
    position: relative;
    z-index: 2;
    padding: 0 24px 26px;
    text-align: center;
    font-size: 12px;
    color: #5d6a8b;
}

.sm-foot a {
    color: #7d8cb1;
    text-decoration: none;
}

.sm-foot a:hover {
    color: #a9bae0;
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 980px) {
    .sm-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
        max-width: 460px;
    }

    .sm-headline {
        font-size: 32px;
        margin-top: 26px;
    }

    .sm-sub,
    .sm-points {
        max-width: none;
    }

    .sm-points {
        display: none;
    }

    .sm-wrap {
        padding: 32px 18px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .sm-card {
        padding: 26px 20px 20px;
        border-radius: 16px;
    }

    .sm-headline {
        font-size: 27px;
    }

    .sm-brand .sm-logo img {
        width: 40px;
        height: 40px;
    }
}
