/* writer-programs.js（作家福利）专用样式（2026-10-12 界面改版）。通用组件和设计变量在 app.css；这里只放本页独有的类。 */

/* ── 全勤奖结算 ── */
/* 标题右侧的结算月份、状态与“结算该月”排成一行，高度、字号用卡片头的共享小号控件（app.css .card-header，30px）。
   说明较长：宽度不够时整组控件换到说明下方，而不是把说明挤成窄条 */
.awards-card>.card-header{flex-wrap:wrap}
.awards-card>.card-header>div:first-child{flex:1 1 380px}
.award-controls{flex-wrap:nowrap;gap:8px}
/* 共享样式让卡片头控件按内容定宽；月份框的内容宽度随浏览器变，固定 160 让“2026年09月”和日历图标留足空间。
   日历图标会把月份框撑高 1px：固定为小号高度，和状态下拉、按钮上下对齐 */
.award-controls input[type=month]{width:160px;height:var(--control-h-sm)}
/* 各状态人数与金额：横向统计条（dt 在上、dd 在下，一列一个状态），放在表格上方单独的内边距块里；
   灰色填充、无边框，圆角同弹窗里的键值面板（2026-11-24） */
.metadata.award-totals{grid-template-columns:none;grid-template-rows:auto auto;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0;margin:0;border:0;border-radius:14px;background:var(--field-bg);overflow:hidden}
.award-totals dt{padding:12px 18px 0;font-size:12px;font-weight:500;color:var(--muted)}
.award-totals dd{padding:2px 18px 12px;font-size:15px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums}
.award-totals dt:not(:first-of-type),.award-totals dd:not(:first-of-type){border-left:1px solid var(--separator)}
.award-summary>.notice{margin:16px 0 0}
/* 规则说明折成一行，放在统计条上面；设置卡片里的说明与表单留出间距 */
.card-body.award-help{padding-bottom:0}
.award-help>.help-note{margin:0}
.award-settings-note{margin:0 0 16px}
/* 不通过、取消的原因最多两行，全文在悬停提示里 */
.award-note{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-width:220px;overflow:hidden}
/* 全勤奖结算、作家等级两张列表和其他页面的列表一样贴满卡片宽度（不再套一层边框），首尾列内边距沿用共享样式。
   十二列的全勤奖表格中间各列略窄，让“操作”尽量留在视野里。两张表的操作列都用共享的 .sticky-actions 固定在右侧（writer-programs.js） */
/* 列间距 8px（2026-11-24 由 10px 收窄）：iOS 风格的侧栏离窗口边留了缝，内容区窄了约 30px，收回来，操作列盖住的部分不比原来多 */
.attendance-awards :is(th,td):not(:first-child){padding-left:8px}
.attendance-awards :is(th,td):not(:last-child){padding-right:8px}
/* 操作列左边少留 2px，抵掉按钮列加宽的 2px（见下面 .award-review）：1440 宽时“收款核验”的徽标仍完整露在固定的操作列左边 */
.attendance-awards :is(th,td):last-child{padding-left:8px}
/* 全勤奖审核（2026-10-19）：参加条件拆成累计首发字数、当月广告收益、均订三列，每列主值在上、门槛等小字在下；
   作品类型标签和“未达到”标记另起一行；表头“当月广告收益”下的小字说明口径（扣运营费和分成之前） */
td.award-condition{min-width:132px}
td.award-condition .badge,td.award-name .award-track{margin-top:4px}
.attendance-awards th .award-header-note{font-weight:400;white-space:normal;max-width:150px}
td.award-name{min-width:100px}
td.award-short{white-space:nowrap;font-variant-numeric:tabular-nums}
td.award-tier{min-width:96px}
td.award-payee{min-width:120px}
td.award-payee .badge{white-space:nowrap}
td.award-payee .button.link{margin-top:4px}
/* 状态列放得下取消原因（不被压成每行几个字）；1440 及以上整表放得下时，结算时间不拆成日期、时间两行
   （更窄时十列本来就要横向滚动，不再额外加宽） */
td.award-status{min-width:104px}
@media (min-width:1440px){
  td.award-time{white-space:nowrap}
}
/* 操作列：按钮上下排列且等宽，未核验的说明放在按钮下方 */
.award-review{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
/* 按钮列最窄 84px（2026-11-12，原来随按钮是 82px）：下面的说明每行正好排得下七个字，“作者还没有完成收款信息核验”
   从三行变两行，这一行矮一截；1600 以下整表本来就要横向滚动，不再多加宽 */
.award-review .table-actions{display:grid;gap:6px;min-width:84px}
.award-review .muted{max-width:160px;line-height:1.55}
/* 窄屏把展示次数收进悬停提示；宽屏：次数放回来，按钮并排，说明一行放下，一条记录不超过三行高 */
.award-wide{display:none}
@media (min-width:1600px){
  .award-wide{display:inline}
  .award-review .table-actions{display:flex;flex-wrap:nowrap}
  .award-review .muted{max-width:none;white-space:nowrap}
}

/* ── 审核、结算、加分弹窗 ── */
/* 审核弹窗的操作对象是共享的 .dialog-subject；入账后取消要扣回余额时，琥珀色提示条紧跟在它下方。
   服务端错误由 formError 插在按钮行前（app.js），这里只定间距 */
.award-form{display:flex;flex-direction:column}
.award-form>.notice:not(.form-error){margin:0 0 18px}
.award-form>p:not(.dialog-subject){margin-bottom:14px}
.award-form>p.muted{margin-bottom:0}
.award-form>.form-error{margin:14px 0 0}

/* ── 全勤奖设置、作家等级设置 ── */
/* 2026-11-24 iOS 风格：开关和输入项是 glass.css 的分组列表（.ios-list，writer-programs.js），一项一行，名称在左、开关和数字在右；
   表单不拉满大屏的整行（同稿费结算、收款核验的设置），数字离名称不远。小节仍用细分隔线和加粗的小标题隔开
   （glass.css 会把紧挨着分组列表的 h3 画成灰色小字，这里带上 form 盖回来，同一张表单里的小节标题一个样） */
.writer-settings{max-width:960px}
form.settings-form.writer-settings>h3{margin:28px 0 14px;padding-top:22px;border-top:1px solid var(--separator);font-size:14px;font-weight:650;color:var(--text)}
form.settings-form.writer-settings>h3:first-child{margin-top:0;padding-top:0;border-top:0}
.writer-settings h3+.form-hint{margin:-6px 0 16px}
/* 子类（免费广告作品、付费作品）：灰色小字，同 iOS 分组列表上面的组名（原来前面有一条紫色短竖条） */
.writer-settings h4{margin:20px 4px 8px;font-size:13px;font-weight:600;color:var(--muted)}
.writer-settings h3+.form-hint+h4{margin-top:0}
/* 汇率表、档位表、加分项表：细线圈出的小表格（同分组列表的圆角），删除按钮靠右 */
.writer-settings .rate-table,.writer-settings .edit-table{border-radius:12px;box-shadow:0 0 0 1px var(--separator)}
.writer-settings .rate-table+.form-hint{margin-top:8px}
.writer-settings .rate-actions{margin-top:10px}
.writer-settings .edit-table table{min-width:560px}
.writer-settings .edit-table th,.writer-settings .edit-table td{padding:9px 12px}
.writer-settings .edit-table th:first-child,.writer-settings .edit-table td:first-child{padding-left:16px}
.writer-settings .edit-table th:last-child,.writer-settings .edit-table td:last-child{width:1%;padding-right:16px;text-align:right}
.writer-settings .edit-table tbody tr:hover>td,.writer-settings .rate-table tbody tr:hover>td{background:transparent}
/* “＋ 增加…”在左、保存在右（与表格的间距用共享的 24px） */
.writer-settings>.form-actions{justify-content:space-between}

/* ── 作家等级 ── */
/* 标题右侧的搜索框：高度、字号用卡片头的共享小号控件；共享样式按内容定宽，这里给足 240 放下占位文字和输入的笔名 */
.author-tools input.author-search{width:240px}
td.author-name{min-width:130px}
/* 笔名与“平台”徽标：放不下时徽标换到下一行并左对齐，不再缩进一截 */
.author-name-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.level-pill{display:inline-flex;align-items:center;padding:1px 9px;border-radius:999px;background:var(--primary-soft);color:var(--primary-text);font-size:12px;font-weight:650;line-height:1.6;white-space:nowrap;font-variant-numeric:tabular-nums}
/* 附加分一条一个小块，放得下就排在同一行 */
.bonus-entry{display:inline-flex;align-items:center;gap:8px;margin:2px 12px 2px 0}
/* 只在宽屏让“构成”和附加分不折行；1280 以下允许折行，免得把“附加分”“加附加分”挤出可视区 */
@media (min-width:1281px){
  td.author-parts{white-space:nowrap}
  .bonus-entry{min-width:150px;white-space:nowrap}
}
/* “构成”是“成长 100 · 创作 40 · …”这种固定格式：折行时只在空格处断开，不把“稿费”拆成两行 */
td.author-parts{word-break:keep-all}
/* 窄屏：单元格略窄；附加分列放得下“省级文学奖”和“撤销”并排 */
@media (min-width:761px) and (max-width:1280px){
  .authors-card :is(th,td):not(:first-child){padding-left:10px}
  .authors-card :is(th,td):not(:last-child){padding-right:10px}
  td.author-name{min-width:100px}
  td.author-bonus{min-width:150px}
}
/* 1024 笔记本（容器约 728）：去掉共享的 760 最小宽度，八列整表放得下，“加附加分”完整可见。
   平板（820，容器约 524）本来就要横向滚动，保留 760，免得各列被压成很多行 */
@media (min-width:901px) and (max-width:1280px){
  .authors-card .table-scroll table{min-width:0}
}

@media (max-width:1080px){
  /* 820 宽时容器约 524px：档位表、加分项表与手机一样最小 460，“删除”不被裁掉 */
  .writer-settings .edit-table table{min-width:460px}
}
@media (max-width:760px){
  /* 手机：标题下方的控件和全站筛选栏一样一列排开，月份、状态、按钮各占一整行 */
  .award-controls,.author-tools{flex-wrap:wrap;width:100%}
  .award-controls>*{flex:1 1 100%}
  .author-tools input.author-search{width:100%}
  /* 统计条改为两列清单，避免四列挤成多行 */
  .metadata.award-totals{grid-template-columns:auto minmax(0,1fr);grid-template-rows:none;grid-auto-flow:row;grid-auto-columns:auto}
  .award-totals dt,.award-totals dd{padding:9px 14px}
  .award-totals dd{font-size:14px;text-align:right}
  .award-totals dt:not(:first-of-type),.award-totals dd:not(:first-of-type){border-left:0;border-top:1px solid var(--border-soft)}
  .settings-form.writer-settings .rate-table th,.settings-form.writer-settings .rate-table td{padding:8px}
  .settings-form.writer-settings .rate-table td:first-child input{width:64px}
  .settings-form.writer-settings .rate-cell{gap:6px}
  .settings-form.writer-settings .rate-cell input{width:84px}
  /* 档位表、加分项表：手机上整表放进卡片（不横向滚动），“删除”始终看得见。固定列宽分配，
     不让自动布局把数字列压到看不全“10000”：删除列 62px，档位名称、编号略宽，分值较窄，其余均分 */
  .writer-settings .edit-table table{min-width:0;table-layout:fixed}
  .writer-settings .edit-table th:last-child{width:62px}
  .writer-settings .tier-table th:first-child{width:30%}
  .writer-settings .bonus-table th:first-child{width:34%}
  .writer-settings .bonus-table th:nth-child(3){width:18%}
  .writer-settings .edit-table th{white-space:normal}
  .writer-settings .edit-table th,.writer-settings .edit-table td{padding:8px 5px}
  .writer-settings .edit-table th:first-child,.writer-settings .edit-table td:first-child{padding-left:10px}
  .writer-settings .edit-table th:last-child,.writer-settings .edit-table td:last-child{padding-right:10px}
  .settings-form.writer-settings .edit-table td input{min-width:0;padding-left:6px;padding-right:6px}
  /* 数字框的上下箭头在手机上用不到（弹出数字键盘），却占掉十几像素：去掉，让“10000”“200”完整显示 */
  .writer-settings .edit-table input[type=number]{-moz-appearance:textfield;appearance:textfield}
  .writer-settings .edit-table input[type=number]::-webkit-inner-spin-button,.writer-settings .edit-table input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
}
