@charset "UTF-8";
/* ============================================================
   上号器管理系统 · 登录 / 注册 / 找回密码 统一设计系统
   【任务18 · 2026-11-05】黑白灰极简风，参照主人给的参考图
   - 极淡浅灰背景 + 纯白卡片 + 20px 大圆角 + 极微弱阴影
   - 黑白灰为主，方角 10px 控件，主按钮全宽纯黑
   - 输入框保留「方案A 浮动标签」交互（label 平时当占位，focus/有值时上浮）
   ============================================================ */

:root{
    --bg:        #f5f6f7;   /* 极淡浅灰背景 */
    --card:      #ffffff;
    --ink:       #0e0e11;   /* 主文字/主按钮 近黑 */
    --ink-soft:  #3f3f46;
    --muted:     #8b8b94;
    --muted-2:   #a4a4ac;
    --line:      #e8e8ec;   /* 卡片描边 */
    --line-2:    #dcdee2;   /* 输入框描边 */
    --line-3:    #c9ccd2;
    --slot:      #f2f3f5;   /* 灰底槽（tab / 后缀 / ghost 按钮） */
    --logo-bg:   #eef1f5;   /* 浅灰蓝 Logo 底框 */
    --logo-line: #e4e8ee;
    --radius:    20px;      /* 卡片大圆角 */
    --ctl:       10px;      /* 控件方角 */
    --shadow:    0 1px 2px rgba(15,17,20,.04), 0 10px 30px rgba(15,17,20,.05);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

*,*::before,*::after{ margin:0; padding:0; box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
    font-family: var(--font);
    background: var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* ==================== 卡片 ==================== */
.auth-card{
    width: 100%;
    max-width: 392px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 24px 22px;
}

/* ==================== 品牌区 ==================== */
.brand{ text-align: center; margin-bottom: 22px; }

.brand-logo{
    width: 76px; height: 76px;
    border-radius: 22px;
    background: var(--logo-bg);
    border: 1px solid var(--logo-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 14px;
    /* 换成图片后需要裁切，圆角外不留白边 */
    overflow: hidden;
    padding: 0;
    /* 圆角裁切在各浏览器都稳妥（含老 WebKit） */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}
/* 图片版品牌图标：填满方块，保持圆角 */
.brand-logo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
/* 字体字形版保留（万一想回退） */
.brand-logo i{
    font-style: normal;
    line-height: 1;
}

.brand h1{
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--ink);
    line-height: 1.35;
}

.brand-sub{
    font-size: 12px;
    color: var(--muted);
    margin-top: 7px;
    letter-spacing: .45px;
}

/* ==================== Tab 切换（弹性滑块指示器） ==================== */
.tabs{
    position: relative;
    display: flex;
    gap: 4px;
    background: var(--slot);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    isolation: isolate;
}

/* 滑块：靠 data-index 驱动，位移交给 transition 做丝滑弹性 */
.tabs-pill{
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc((100% - 8px - 4px) / 2);
    height: calc(100% - 8px);
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15,17,20,.05);
    transform: translateX(calc(var(--i, 0) * (100% + 4px)));
    transition: transform .42s cubic-bezier(.34,1.3,.64,1);
    z-index: 0;
    pointer-events: none;
}
.tabs[data-index="0"]{ --i: 0; }
.tabs[data-index="1"]{ --i: 1; }

.tab{
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
    padding: 9px 4px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transition: color .28s ease, font-weight .1s;
}

.tab:hover{ color: var(--ink-soft); }

/* 选中态：默认自己画白底（用于 register.php 独立页，那里没有滑块） */
.tab.active{
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
    box-shadow: 0 1px 2px rgba(15,17,20,.05);
    font-weight: 700;
}

/* 有滑块时（login.php 同页双面板），白底交给滑块，避免出现两个白块 */
.tabs-pill ~ .tab.active{
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* ==================== 提示条 ==================== */
.alert{
    display: flex;
    align-items: flex-start;
    gap: 7px;
    background: #fdf3f3;
    border: 1px solid #f2dcdc;
    color: #a83232;
    padding: 9px 12px;
    border-radius: var(--ctl);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.55;
    margin-bottom: 15px;
    word-break: break-word;
}
.alert i{ font-size: 14px; line-height: 1.45; flex-shrink: 0; }

.alert.ok{
    background: #f1f8f4;
    border-color: #d9ebe0;
    color: #256b46;
}

.notice{
    background: var(--slot);
    border: 1px solid var(--line);
    border-radius: var(--ctl);
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin-bottom: 15px;
    word-break: break-all;
}
.notice b{ color: var(--ink); font-weight: 700; }

/* ==================== 表单 ==================== */
.auth-form{ display: flex; flex-direction: column; gap: 14px; }

/* 浮动标签输入框（方案A） */
.ff{ position: relative; }

.ff input{
    width: 100%;
    padding: 21px 13px 9px;
    border: 1px solid var(--line-2);
    border-radius: var(--ctl);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ff input::placeholder{ color: transparent; }
.ff input:hover{ border-color: var(--line-3); }
.ff input:focus{
    border-color: #a9adb5;
    box-shadow: 0 0 0 3px rgba(15,17,20,.05);
}
/* 自动填充时也保持白底 */
.ff input:-webkit-autofill{
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--ink);
}

.ff label{
    position: absolute;
    left: 13px;
    top: 15px;
    font-size: 13.5px;
    color: var(--muted);
    pointer-events: none;
    transform-origin: left top;
    transition: transform .16s cubic-bezier(.4,0,.2,1), color .16s ease;
    white-space: nowrap;
}

.ff input:focus + label,
.ff input:not(:placeholder-shown) + label{
    transform: translateY(-9px) scale(.8);
    color: #6b6b74;
    font-weight: 600;
}

.req{ color: var(--ink); font-weight: 700; margin-left: 1px; }

/* 错误态 */
.ff.err input{ border-color: #e2b6b6; }
.ff.err input:focus{ box-shadow: 0 0 0 3px rgba(168,50,50,.06); }
.ff.err label{ color: #a83232; }

/* 密码显隐按钮 */
.ff.has-eye input{ padding-right: 44px; }
.ff-eye{
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: none; border-radius: 8px;
    color: var(--muted-2);
    font-size: 16px; line-height: 1;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}
.ff-eye:hover{ color: var(--ink); background: var(--slot); }

/* QQ 号 + 固定 @qq.com 后缀 */
.ff-suffix{ display: flex; align-items: stretch; }
.ff-suffix .ff{ flex: 1; min-width: 0; }
.ff-suffix .ff input{ border-radius: var(--ctl) 0 0 var(--ctl); }
.ff-suffix .suffix-box{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    margin-left: -1px;
    border: 1px solid var(--line-2);
    border-left: 0;
    border-radius: 0 var(--ctl) var(--ctl) 0;
    background: var(--slot);
    color: var(--ink-soft);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    letter-spacing: .2px;
}

/* ==================== 按钮 ==================== */
.btn-primary{
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--ctl);
    background: var(--ink);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: inherit;
    cursor: pointer;
    margin-top: 2px;
    transition: background .18s ease, transform .1s ease;
}
.btn-primary:hover{ background: #26262c; }
.btn-primary:active{ transform: scale(.985); }

.btn-ghost{
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--ctl);
    background: #fff;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .3px;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}
.btn-ghost:hover{ background: var(--slot); border-color: var(--line-3); }

/* ==================== 同页双面板丝滑切换（登录/注册） ==================== */
.panel-viewport{
    position: relative;
    overflow: hidden;
}
.panel-track{
    display: flex;
    width: 200%;
    transition: transform .32s cubic-bezier(.22,.9,.3,1);
}
.panel-track.show-reg{ transform: translateX(-50%); }
.panel{
    width: 50%;
    flex-shrink: 0;
    padding: 2px;
}
.panel-login{ padding-right: 14px; }
.panel-register{ padding-left: 14px; }

/* 面板滑入滑出时的轻微淡入淡出 */
.panel{ transition: opacity .24s ease; }
.panel-inactive{ opacity: .35; pointer-events: none; }
.panel-active{ opacity: 1; pointer-events: auto; }

@media (max-width: 340px){
    .panel-login{ padding-right: 8px; }
    .panel-register{ padding-left: 8px; }
}

/* 页面切换过渡：进入时淡入上浮 */
@keyframes pageIn{
    from{ opacity: 0; transform: translateY(6px); }
    to{ opacity: 1; transform: translateY(0); }
}
body.page-enter .auth-card{
    animation: pageIn .28s cubic-bezier(.22,.9,.3,1);
}
body.page-leave{
    opacity: 0;
    transition: opacity .16s ease;
}

/* 输入框下方的小字提示（与验证码"看不清"同一字号/颜色） */
.field-hint{
    font-size: 11.5px;
    color: #a4a4ac;
    line-height: 1.4;
    letter-spacing: .15px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.field-hint i{
    font-size: 11.5px;
    flex-shrink: 0;
    color: #a4a4ac;
}

/* ==================== 邮箱验证码 6 格 OTP ==================== */
.otp-label{
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
}
.oti{
    display: flex;
    gap: 6px;
    justify-content: center;
}
.otp-cell{
    width: 44px;
    height: 50px;
    border: 1.5px solid var(--line-2);
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.otp-cell:focus{
    border-color: var(--line-3);
    box-shadow: 0 0 0 3px rgba(15,17,20,.06);
    transform: translateY(-2px);
}

/* ==================== 页脚 / 辅助链接 ==================== */
.foot-note{
    margin-top: 16px;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted-2);
    line-height: 1.65;
    letter-spacing: .15px;
}

.aux-links{
    margin-top: 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}
.aux-links a{
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    transition: color .16s ease;
}
.aux-links a:hover{ color: var(--ink); text-decoration: underline; }
.dot-sep{ margin: 0 7px; color: #d2d4d9; }

/* ==================== 页面小标题（找回密码等） ==================== */
.page-title{
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .3px;
    margin-bottom: 5px;
}
.page-sub{
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ==================== QQ 头像实时预览 ==================== */
.qqav-row{
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin-top: -2px;
    border: 1px solid var(--line);
    border-radius: var(--ctl);
    background: #fafafb;
    min-height: 60px;
}
.qqav-row.hide{ display: none; }
.qqav-img{
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e9eaee;
    opacity: 0;
    transform: scale(.86);
    transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.4,.64,1);
}
.qqav-img.show{ opacity: 1; transform: scale(1); }
.qqav-loading{
    width: 42px; height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(90deg,#eceef1,#f6f7f9,#eceef1);
    background-size: 200% 100%;
    animation: qqShine 1.1s linear infinite;
}
@keyframes qqShine{ 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
.qqav-meta{ min-width: 0; flex: 1; }
.qqav-name{ font-size: 12.5px; font-weight: 650; color: var(--ink); word-break: break-all; }
.qqav-sub{ font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* ==================== 完成态 ==================== */
.done-box{ text-align: center; padding: 6px 0 2px; }
.done-ico{
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #f1f8f4;
    color: #256b46;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}
.done-box p{ font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }
/* ==================== 2026-11-05 · 同页双面板（iframe 嵌入模式） ==================== */
/* register.php?embed=1 被嵌入时，去掉外层卡片/背景，只留表单 */
body.embed-mode{
    background: transparent !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}
body.embed-mode .auth-card.auth-card-embed{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    animation: none !important;
}

/* 登录页里的面板容器 */
.panel-wrap{ position: relative; }
.auth-panel{ display: none; }
.auth-panel.active{ display: block; animation: panelIn .28s cubic-bezier(.22,1,.36,1); }
@keyframes panelIn{
    from{ opacity: 0; transform: translateY(8px); }
    to  { opacity: 1; transform: translateY(0); }
}

/* 面板内 iframe（注册内容）自适应高度 */
.auth-frame{
    display: block;
    width: 100%;
    border: 0;
     background: transparent;
     overflow: hidden;
 }

