/* security.js（安全与告警、双重验证）专用样式（2026-10-12 从 app.css 拆出）。通用组件和设计变量在 app.css；这里只放本页独有的类。 */
/* 后台双重验证与告警邮件 (2026-10-07): the login step (QR code, secret, recovery codes) and the 安全与告警 page. */
.two-factor-steps{margin:0 0 16px;padding-left:20px;font-size:13px;line-height:1.85;color:var(--text-2)}
.two-factor-steps li::marker{color:var(--primary-text);font-weight:600}
/* 动态码表单：出错提示由通用表单插在提交按钮之前（输入框与按钮之间），“改用恢复码”留在最下、居中 */
.two-factor-form{display:flex;flex-direction:column}
.two-factor-form>label{margin-bottom:6px}
.two-factor-form>.form-error{margin:12px 0 0}
.two-factor-form>.button.quiet{width:fit-content;margin:12px auto 0}
/* 二维码保持白底（深色识别更稳），加细边与轻阴影像一张卡片 */
.two-factor-qr{display:block;width:196px;height:196px;margin:6px auto 16px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow-xs)}
/* 密钥：灰色填充的一条，同弹窗里的信息块（2026-11-24：去掉边框） */
.two-factor-secret{display:flex;align-items:center;gap:12px;padding:10px 10px 10px 14px;border:0;border-radius:12px;background:var(--field-bg);font-size:12px;color:var(--muted)}
.two-factor-secret>span{flex-shrink:0;font-weight:600}
.two-factor-secret code{flex:1;min-width:0;font-family:var(--mono);font-size:13px;letter-spacing:.5px;line-height:1.6;color:var(--text);overflow-wrap:anywhere}
.two-factor-secret .button{flex-shrink:0}
.two-factor-secret+.form-hint{margin:8px 0 22px}
/* 恢复码：两列编号，等宽字；虚线框表示“请抄下/保存” */
.recovery-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 28px;margin:0;padding:14px 14px 14px 34px;border:1px dashed var(--border-strong);border-radius:14px;background:var(--field-bg);font-size:12px;color:var(--subtle)}
.recovery-codes li::marker{font-variant-numeric:tabular-nums}
.recovery-codes code{font-family:var(--mono);font-size:13px;white-space:nowrap;color:var(--text)}
/* 登录卡片较窄：恢复码用 12px，第二列的编号（如“10.”）不会顶到第一列 */
.login-card .recovery-codes code{font-size:12px}
.recovery-actions{justify-content:flex-start;margin:12px 0 16px}
.recovery-form .check-label{font-size:13px}
.login-card .recovery-form{margin-top:0}
/* 在弹窗里显示新的恢复码：弹窗标题已写明“新的恢复码”，正文不再重复登录页的小标题和大标题，直接从提醒开始 */
#action-dialog .dialog-body>:is(.eyebrow,h1):has(~.recovery-form){display:none}
/* 小标题和大标题藏起来后，提醒就是正文第一块：去掉上外边距，和其他弹窗一样紧贴内容区顶部的内边距
   （app.css 的 .notice:first-child 认不出前面两个隐藏的元素） */
#action-dialog .dialog-body>.notice:has(+.recovery-form){margin-top:0}
/* 弹窗里的“完成”与其他弹窗主按钮一致：普通尺寸、右对齐（登录卡里仍是整行宽） */
#action-dialog .recovery-form>.form-actions:last-child>.button.wide{width:auto;min-height:36px;font-size:13px}
/* 邮件正文随弹窗内容区一起滚动，不在弹窗里再套一层滚动框 */
.alert-body{margin:16px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:13px;line-height:1.8;padding:14px 18px;border:0;border-radius:14px;background:var(--field-bg);color:var(--text-2)}
/* 我的双重验证：四项状态横排成一条概要；说明文字与“重新生成恢复码”在底部同一行（按钮在右） */
.security-mine{display:flex;flex-wrap:wrap}
.security-mine>*{flex:1 1 100%}
.security-mine>.notice{margin:0 0 12px}
/* 灰色填充、无边框，圆角同弹窗里的键值面板（2026-11-24） */
.security-mine>.metadata{grid-template-columns:none;grid-template-rows:auto auto;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px 24px;padding:14px 18px;border:0;border-radius:14px;background:var(--field-bg)}
.security-mine>.metadata dt{font-size:12px}
.security-mine>.metadata dd{font-size:14px;font-weight:600}
.security-mine>.form-hint{order:1;flex:1 1 320px;display:flex;align-items:center;margin:18px 0 0;padding-top:16px;border-top:1px solid var(--separator)}
.security-mine>.form-actions{order:2;flex:0 0 auto;margin:18px 0 0;padding:16px 0 0 24px;border-top:1px solid var(--separator)}
/* 告警邮件：宽屏时左边是表单，右边是发信说明和发送规则；窄屏按原顺序上下排 */
.alert-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);grid-template-rows:auto 1fr;column-gap:32px}
.alert-layout>form{grid-column:1;grid-row:1/span 2;min-width:0}
.alert-notes{grid-column:2;grid-row:1}
.alert-notes .notice{margin:0 0 12px}
.alert-layout>.form-hint{grid-column:2;grid-row:2;align-self:start;margin:0;padding:12px 16px;border:0;border-radius:14px;background:var(--field-bg);line-height:1.75}
/* 告警设置是 glass.css 的分组列表（.ios-list，2026-11-24，security.js）：一项一行，开关在右 */
/* 团队与发送记录表：时间、岗位、类型等短列不折行；窄屏横向滚动，而不是把字挤成竖排 */
.security-team table{min-width:720px}
.security-team td:nth-child(2),.security-team td:nth-child(4),.security-team td:nth-child(5),.security-team td:last-child{white-space:nowrap}
/* 岗位下方的“已停用”徽标单独一行，岗位列不因它变宽 */
.security-team td:nth-child(2)>.badge{display:flex;width:fit-content;margin-top:4px}
/* 成员列：头像 + 姓名 / 账号（同团队账号页）；保留够放下常见账号的宽度，超长的名字和账号才折行 */
.security-team td:first-child{min-width:210px}
.security-team .member-cell{max-width:280px}
.security-team .member-cell .table-sub{overflow-wrap:anywhere}
.security-deliveries table{min-width:960px}
.security-deliveries td:nth-child(1),.security-deliveries td:nth-child(2),.security-deliveries td:last-child{white-space:nowrap}
.security-deliveries td:nth-child(3){min-width:220px}
/* 收件人：常见地址（如 support@yutounovels.com）放得下一行（宽度含左右内边距）；anywhere 只兜底超长地址 */
.security-deliveries td:nth-child(4){min-width:210px;overflow-wrap:anywhere}
/* 两张表比卡片宽时（笔记本、平板、手机）要横向滚动：操作列由 app.css 的 .sticky-actions 固定在右侧，不滚也能“重置 / 查看内容” */
@media(min-width:761px) {
  /* 发送时间只有几个选项，宽屏不必拉满；手机上与收件人输入框同宽 */
  [data-alert-settings] select{max-width:240px;justify-self:end}
}
@media(max-width:1180px) {
  /* 笔记本、平板：团队表列间距收到 12px，“最近验证”可在日期和时间之间换行，六列在卡片里放得下，不必横向滚动 */
  .security-team :is(th,td):not(:first-child){padding-left:12px}
  .security-team :is(th,td):not(:last-child){padding-right:12px}
  .security-team td:nth-child(4){white-space:normal}
}
@media(max-width:1080px) {
  /* 平板：概要四项排成两列两行，避免日期被挤成两行 */
  .security-mine>.metadata{grid-template-rows:repeat(4,auto)}
  .security-mine>.metadata dd:nth-of-type(odd){margin-bottom:10px}
  .alert-layout{display:block}
  .alert-notes{margin-bottom:18px}
  .alert-notes .notice:last-child{margin-bottom:0}
  .alert-layout>.form-hint{margin-top:18px}
}
@media(max-width:760px) {
  /* 手机：概要回到“标签 + 值”两列；按钮放到说明文字下方 */
  .security-mine>.metadata{grid-template-columns:88px minmax(0,1fr);grid-template-rows:none;grid-auto-flow:row;gap:8px 12px;padding:12px 14px}
  .security-mine>.metadata dd:nth-of-type(odd){margin-bottom:0}
  .security-mine>.form-actions{flex:1 1 100%;margin-top:12px;padding:0;border-top:0;justify-content:flex-start}
}
@media(max-width:480px) {
  .recovery-codes{grid-template-columns:1fr}
  .two-factor-qr{width:176px;height:176px}
}
