/* 学员网页外壳：登录卡 + 顶栏 + 铺满的聊天区。聊天本身的样式在 /shared/yyd-ai-chat.css */
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#f3f7fd;color:#16202e;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:14px}
button,input{font:inherit}
button{border:0;cursor:pointer}
.hidden{display:none!important}

/* 登录 / 注册 */
.auth{min-height:100vh;display:grid;place-items:center;padding:24px;
  background:radial-gradient(circle at 15% 10%,#dcebff 0,transparent 45%),radial-gradient(circle at 90% 90%,#e3f0ff 0,transparent 40%),#f3f7fd}
.auth-card{width:min(400px,100%);padding:30px 28px 24px;background:#fff;border:1px solid #e3ebf7;border-radius:22px;
  box-shadow:0 20px 50px rgba(27,99,204,.12)}
.auth-logo{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:16px;color:#fff;font-size:24px;
  background:linear-gradient(135deg,#2f7bea,#1b63cc);box-shadow:0 10px 24px rgba(27,99,204,.3)}
.auth h1{margin:0;text-align:center;font-size:21px}
.auth-sub{margin:4px 0 18px;text-align:center;color:#6b7789;font-size:13px}
.auth-tabs{display:flex;padding:3px;margin-bottom:16px;border-radius:12px;background:#eaf0fa}
.auth-tabs button{flex:1;height:34px;border-radius:10px;background:none;color:#4a5a70;font-weight:700}
.auth-tabs button.on{background:#fff;color:#1b63cc;box-shadow:0 2px 8px rgba(27,99,204,.14)}
.auth label,.modal label{display:block;margin-bottom:12px}
.auth label span,.modal label span{display:block;margin-bottom:5px;font-size:12px;font-weight:700;color:#5c6a7d}
.auth input,.modal input{width:100%;height:42px;padding:0 13px;border:1px solid #d5e0f1;border-radius:11px;background:#fff;color:#16202e;outline:none}
.auth input:focus,.modal input:focus{border-color:#7eacf7;box-shadow:0 0 0 3px rgba(27,99,204,.1)}
.auth-err{min-height:20px;margin:0 0 6px;font-size:12px;color:#c43749}
.auth-btn{width:100%;height:44px;border-radius:12px;color:#fff;font-weight:700;background:linear-gradient(135deg,#2f7bea,#1b63cc);box-shadow:0 8px 20px rgba(27,99,204,.25)}
.auth-btn:disabled{opacity:.5;cursor:not-allowed}
.auth-tip{margin:14px 0 0;font-size:12px;line-height:1.7;color:#8793a5;text-align:center}

/* 应用外壳 */
.app{display:flex;flex-direction:column;height:100vh;height:100dvh}
.bar{flex:none;display:flex;align-items:center;gap:10px;padding:10px 16px;background:#fff;border-bottom:1px solid #e3ebf7}
.bar-t{font-size:15px}
.bar-t span{color:#1b63cc}
.bar-q{margin-left:auto;padding:3px 11px;border-radius:999px;background:#eaf2ff;color:#1b63cc;font-size:12px;font-weight:700;white-space:nowrap}
.bar-q.low{background:#fff4e0;color:#a15c07}
.bar-u{font-size:12px;color:#6b7789}
.bar-b{height:30px;padding:0 12px;border-radius:9px;border:1px solid #dce4ee;background:#fff;color:#4a5a70;font-size:12px}
.bar-b:hover{color:#1b63cc;border-color:#8db4f0}
.chat-host{flex:1;min-height:0;padding:12px 16px 16px;--yac-h:100%}
.chat-host .yac{height:100%}

/* 改密码弹窗 / 提示 */
.modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:rgba(14,27,48,.42)}
.modal-card{width:min(360px,100%);padding:22px;background:#fff;border-radius:18px;box-shadow:0 20px 50px rgba(14,27,48,.25)}
.modal-card h3{margin:0 0 14px}
.modal-row{display:flex;gap:10px}
.modal-row .auth-btn{flex:1}
.modal-row .bar-b{height:44px;padding:0 18px}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:60;max-width:86vw;padding:10px 18px;border-radius:12px;
  background:rgba(22,32,46,.92);color:#fff;font-size:13px}

@media(max-width:860px){
  .chat-host{padding:0}
  .bar{padding:8px 12px;gap:8px}
  .bar-u{display:none}
}

/* 游客态 / 登录浮层 / 小程序宣传 */
.bar-login{margin-left:auto;height:32px;padding:0 16px;border-radius:999px;color:#fff;font-weight:700;background:linear-gradient(135deg,#2f7bea,#1b63cc);box-shadow:0 4px 12px rgba(27,99,204,.25)}
.bar-qr{margin-left:auto}
.bar-qr+.bar-login{margin-left:0}
.auth{position:fixed;inset:0;z-index:40;background:rgba(243,247,253,.96);backdrop-filter:blur(4px)}
.auth-close{position:absolute;top:16px;right:18px;width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid #dce4ee;color:#4a5a70;font-size:20px;line-height:1}
.chat-inner{height:100%}
.chat-inner .yac{height:100%}
.promo-qr{display:grid;place-items:center;min-height:120px;margin-bottom:6px}
.promo-qr img,.qr-box img{display:block;width:140px;height:140px;margin:0 auto;border-radius:10px;border:1px solid #d6e5fa;background:#fff}
.qr-miss{margin:0;padding:12px;font-size:12px;line-height:1.6;color:#4a5a70}
.qr-card{text-align:center}
.qr-sub{margin:-6px 0 14px;font-size:13px;color:#6b7789}
.qr-box{display:grid;place-items:center;min-height:150px;margin-bottom:16px}
.qr-box img{width:180px;height:180px}
@media(max-width:860px){.bar-q{margin-left:auto}}
