/* ニッコー支払。土台（色・ボタン・入力・表・ログイン）は base.css（ニッコー本体から移したもの）。ここは支払アプリだけの部分 */
.brand b small{font-size:15px;font-weight:700;color:var(--sub);margin-left:6px}
.month{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--line);background:var(--paper);border-radius:var(--r-c)}
.month b{min-width:7.5em;text-align:center;font-size:17px}
.month .ibtn{min-width:40px}
.bar{display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center;margin:4px 0 14px}
.bar .grow{flex:1}
.stat{display:flex;flex-direction:column;line-height:1.3}
.stat span{font-size:13px;color:var(--sub)}
.stat b{font-size:22px;font-family:var(--figure);font-variant-numeric:tabular-nums}
.scroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-b)}
.scroll .tbl th:first-child,.scroll .tbl td:first-child{padding-left:14px;min-width:10em}
.tbl tfoot td{font-weight:700;background:var(--field)}
.tbl td.warn{color:var(--red);font-weight:700;font-size:14px;min-width:12em}
.tbl td.muted,.muted{color:var(--sub)}
.tbl td.nw,.tbl th.nw{white-space:nowrap}
.tag{display:inline-block;border:1px solid var(--line);border-radius:var(--r-s);padding:0 6px;font-size:13px;color:var(--sub);white-space:nowrap}
h2{font-size:20px;margin:6px 0 4px}
.lead{color:var(--sub);margin:0 0 14px;font-size:15px}

/* 支払の入力（右から出る画面） */
.drawer{width:min(760px,100vw)}
.lines{width:100%;border-collapse:collapse;margin-top:6px}
.lines th{text-align:left;font-size:13px;color:var(--sub);padding:0 4px 4px;font-weight:700}
.lines td{padding:3px 4px;vertical-align:middle}
.lines td.amt{width:9.5em}
.lines td.del{width:44px}
.lines input,.lines select{min-height:40px;padding:6px 8px}
.lines input.r,input.r{text-align:right;font-family:var(--figure);font-variant-numeric:tabular-nums}
.calc{display:grid;grid-template-columns:auto auto;justify-content:end;gap:2px 18px;margin:14px 0 0;font-size:15px}
.calc dt{color:var(--sub);text-align:right}
.calc dd{margin:0;text-align:right;font-family:var(--figure);font-variant-numeric:tabular-nums}
.calc .pay{font-size:19px;font-weight:900}
.warns{margin:10px 0 0;padding:8px 12px;background:var(--red-bg);color:var(--red);border-radius:var(--r-c);font-weight:700;font-size:14px}
.warns p{margin:0}
select.in{appearance:auto}
.check{display:flex;align-items:center;gap:8px;min-height:44px;font-weight:700}
.check input{width:20px;height:20px}

/* 支払通知書（画面では紙のように並べ、印刷では A5 横に1社1ページ） */
.notices{display:flex;flex-direction:column;gap:18px;align-items:center}
/* A5横（148mm）から余白7mm×2を引いた134mm に、明細8行＋消費税＋合計5行が入る寸法 */
.notice{width:210mm;height:148mm;background:#fff;color:#000;padding:7mm;font-size:9pt;line-height:1.35;border:1px solid var(--line);box-sizing:border-box;overflow:hidden}
.notice .nh{display:flex;justify-content:space-between;gap:8mm}
.notice h1{font-size:13pt;margin:0;letter-spacing:.3em;line-height:1.3}
.notice .to{font-size:12pt;font-weight:700;border-bottom:1px solid #000;margin:.5mm 0;min-width:85mm}
.notice .from{text-align:right;font-size:8pt;white-space:nowrap}
.notice .from b{font-size:10pt}
.notice p{margin:.5mm 0}
.notice table{width:100%;border-collapse:collapse;margin-top:1.5mm}
.notice th,.notice td{border:1px solid #000;padding:0 2mm;height:5.2mm}
.notice th{background:#eee;font-weight:700;text-align:center}
.notice td.r{text-align:right;font-variant-numeric:tabular-nums;width:30mm;white-space:nowrap}
.notice td.k{width:34mm}
.notice tr.sum td{font-weight:700}
.notice tr.pay td{font-weight:900;font-size:10.5pt}
.notice .notes{margin-top:1mm;font-size:7pt;line-height:1.3;white-space:pre-line}
/* 印刷：いま開いている画面の表だけを出す。一覧表は A4 横、支払通知書は A5 横（名前付きのページ） */
.ptitle{display:none}
@page{size:A4 landscape;margin:10mm}
@page notice{size:A5 landscape;margin:7mm}
@media print{
  :root{color-scheme:light}
  html,body{background:#fff!important;color:#000!important;padding:0!important;margin:0}
  .top,.noprint,#layer,#toastHost,.bar .btn{display:none!important}
  .wrap{max-width:none}
  .ptitle{display:block;font-size:13pt;font-weight:700;margin:0 0 3mm}
  .bar{margin:0 0 3mm}
  .stat b{font-size:13pt}
  .lead{display:none}
  .scroll{overflow:visible;border:0}
  .tbl{font-size:8.5pt}
  .tbl th,.tbl td{padding:2px 5px;border:1px solid #888!important;background:#fff!important;color:#000!important}
  .tbl th{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .tbl tfoot td{background:#f3f3f3!important}
  .tbl thead{display:table-header-group}
  .tbl tr{break-inside:avoid}
  .scroll .tbl th:first-child,.scroll .tbl td:first-child{min-width:0}
  .notices{display:block}
  .notice{page:notice;border:0;padding:0;width:auto;height:134mm;break-after:page;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .notice:last-child{break-after:auto}
}
@media (max-width:640px){
  .notices{align-items:stretch;overflow-x:auto}
  .lines thead{display:none}
  .lines tr{display:grid;grid-template-columns:1fr 1fr 44px;gap:4px;padding:6px 0;border-bottom:1px solid var(--line)}
  .lines td{padding:0}
  .lines td.site{grid-column:1/3;grid-row:1}.lines td.del{grid-column:3;grid-row:1;width:auto}
  .lines td.lab{grid-column:1/4;grid-row:2}
  .lines td.amt{grid-column:1;grid-row:3;width:auto}.lines td.note{grid-column:2/4;grid-row:3}
}
