/* 岩国商工会議所 小口現金管理 — PCブラウザ主体、タブレットでも崩れない程度に可変 */
:root{
  --navy:#12305c; --navy-dark:#0b2244;
  --ink:#1a1d21; --sub:#5b6572; --line:#d8dee6; --bg:#f4f6f9; --card:#fff;
  --ok:#0f7a4d; --ng:#b3261e; --warn:#a8620a;
  --tap:44px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font:15px/1.65 "Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic UI",Meiryo,sans-serif;
}
a{color:var(--navy)}
h1,h2,h3{margin:0 0 .6em; line-height:1.35}
h1{font-size:22px}
h2{font-size:18px; padding-bottom:6px; border-bottom:2px solid var(--navy)}
h3{font-size:15px; color:var(--sub)}

/* ---------------------------------------------------------------- 枠組み */
.topbar{
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  background:var(--navy); color:#fff; padding:0 18px; min-height:52px;
}
.brand a{color:#fff; text-decoration:none; font-weight:700; white-space:nowrap}
.brand span{font-weight:400; opacity:.75; font-size:12px; display:block; margin-top:-4px}
.mainnav{display:flex; gap:2px; flex:1; flex-wrap:wrap}
.mainnav a{
  color:#dce5f2; text-decoration:none; padding:14px 14px; font-size:14px;
  border-bottom:3px solid transparent; min-height:var(--tap);
}
.mainnav a:hover{background:rgba(255,255,255,.08)}
.mainnav a.on{color:#fff; border-bottom-color:#ffc94d; font-weight:700}
.me{display:flex; align-items:center; gap:10px; font-size:12px; color:#c7d3e6}
.me .uname{color:#fff; font-weight:700; font-size:14px}
.me .urole{background:rgba(255,255,255,.15); padding:2px 8px; border-radius:10px}
.me a{color:#c7d3e6}

.wrap{max-width:1180px; margin:20px auto 60px; padding:0 18px}
.wrap.narrow{max-width:820px}
footer{
  text-align:center; color:var(--sub); font-size:12px; padding:18px;
  border-top:1px solid var(--line);
}

.flash{padding:12px 18px; font-weight:600}
.flash.ok{background:#e7f5ee; color:var(--ok); border-bottom:1px solid #b9e0cd}
.flash.ng{background:#fdeceb; color:var(--ng); border-bottom:1px solid #f3c4c1}

/* ---------------------------------------------------------------- カード */
.card{background:var(--card); border:1px solid var(--line); border-radius:8px; padding:18px; margin-bottom:18px}
.card > h2:first-child{margin-top:0}
.cards{display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.muted{color:var(--sub)}
.small{font-size:13px}

/* 残高パネル */
.balance{background:var(--card); border:1px solid var(--line); border-radius:8px; overflow:hidden}
.balance header{background:var(--navy); color:#fff; padding:10px 16px; font-weight:700; display:flex; justify-content:space-between}
.balance header .kind{font-weight:400; font-size:12px; opacity:.8}
.balance .body{padding:14px 16px}
.balance .row{display:flex; justify-content:space-between; padding:5px 0; font-size:14px}
.balance .row.total{border-top:2px solid var(--ink); margin-top:8px; padding-top:10px; font-size:19px; font-weight:700}
.balance .row .num{font-variant-numeric:tabular-nums}
.balance .diff-ok{color:var(--ok)}
.balance .diff-ng{color:var(--ng); font-weight:700}
.balance footer{padding:10px 16px; background:#f8fafc; border-top:1px solid var(--line); font-size:12px; display:flex; gap:12px; flex-wrap:wrap}

/* ---------------------------------------------------------------- 表 */
table{width:100%; border-collapse:collapse; background:#fff; font-size:14px}
th,td{border:1px solid var(--line); padding:7px 9px; text-align:left; vertical-align:top}
thead th{background:#eef2f7; font-weight:700; white-space:nowrap; position:sticky; top:0}
td.num,th.num{text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap}
td.ctr,th.ctr{text-align:center; white-space:nowrap}
tbody tr:hover{background:#fafcff}
tr.voided td{color:#9aa3ad; text-decoration:line-through}
tfoot td{background:#eef2f7; font-weight:700}
.scroll{overflow-x:auto}

/* ---------------------------------------------------------------- フォーム */
label{display:block; margin-bottom:12px; font-size:13px; font-weight:600; color:var(--sub)}
input,select,textarea{
  display:block; width:100%; margin-top:4px; padding:9px 10px; min-height:var(--tap);
  font:inherit; color:var(--ink); background:#fff;
  border:1px solid #b9c2cd; border-radius:5px;
}
input:focus,select:focus,textarea:focus{outline:2px solid #7aa7e6; border-color:#7aa7e6}
input[type=checkbox],input[type=radio]{width:20px; height:20px; min-height:0; display:inline-block; margin:0 6px 0 0; vertical-align:-4px}
input.money{text-align:right; font-variant-numeric:tabular-nums; font-size:17px; font-weight:700}
textarea{min-height:70px}
.grid{display:grid; gap:0 16px}
.g2{grid-template-columns:1fr 1fr}
.g3{grid-template-columns:1fr 1fr 1fr}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:820px){.g2,.g3,.g4{grid-template-columns:1fr}}
fieldset{border:1px solid var(--line); border-radius:6px; padding:14px 16px; margin:0 0 16px}
legend{font-weight:700; color:var(--navy); padding:0 6px}
.inline-check{font-weight:400; color:var(--ink); display:inline-flex; align-items:center; margin-right:16px}

button,.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:var(--tap); padding:10px 20px; font:inherit; font-weight:700;
  border:1px solid var(--navy); border-radius:5px; background:var(--navy); color:#fff;
  cursor:pointer; text-decoration:none;
}
button:hover,.btn:hover{background:var(--navy-dark)}
.btn.sub,button.sub{background:#fff; color:var(--navy)}
.btn.sub:hover,button.sub:hover{background:#eef2f7}
.btn.danger,button.danger{background:var(--ng); border-color:var(--ng)}
.btn.small,button.small{min-height:32px; padding:4px 12px; font-size:13px; font-weight:600}
.actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:16px}
.actions.sticky{position:sticky; bottom:0; background:rgba(244,246,249,.95); padding:12px 0; border-top:1px solid var(--line)}

/* ホームの操作タイル。窓口で迷わず押せるよう、通常のボタンより縦にも大きく取る */
.bigactions{
  display:grid; gap:16px; margin:0 0 24px;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
}
.bigbtn{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  min-height:168px; padding:24px 18px;
  background:#fff; color:var(--navy); text-decoration:none; text-align:center;
  border:2px solid var(--navy); border-radius:14px;
  box-shadow:0 2px 6px rgba(18,48,92,.10);
  transition:transform .08s, box-shadow .12s, background .12s;
}
.bigbtn:hover{transform:translateY(-2px); box-shadow:0 6px 18px rgba(18,48,92,.20); background:#f2f6fc}
.bigbtn:active{transform:translateY(0)}
.bigbtn .ico{font-size:40px; line-height:1; font-weight:400}
.bigbtn .t{font-size:24px; font-weight:700; line-height:1.3}
.bigbtn .d{font-size:14px; font-weight:400; color:var(--sub)}
.bigbtn .d .todo{color:var(--ng)}
.bigbtn.primary{background:var(--navy); color:#fff}
.bigbtn.primary:hover{background:var(--navy-dark)}
.bigbtn.primary .d{color:#c7d3e6}
@media(max-width:560px){
  .bigactions{grid-template-columns:1fr 1fr; gap:12px}
  .bigbtn{min-height:132px; padding:18px 12px}
  .bigbtn .ico{font-size:32px}
  .bigbtn .t{font-size:19px}
}

.filters{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-bottom:14px}
.filters label{margin-bottom:0}
.filters input,.filters select{width:auto; min-width:130px}

/* 状態バッジ */
.badge{display:inline-block; padding:2px 9px; border-radius:11px; font-size:12px; font-weight:700; white-space:nowrap}
.b-issued,.b-paid,.b-settled{background:#e7f5ee; color:var(--ok)}
.b-pending{background:#fff4e0; color:var(--warn)}
.b-approved{background:#e8eefb; color:var(--navy)}
.b-draft,.b-open{background:#eef1f4; color:var(--sub)}
.b-voided,.b-rejected{background:#fdeceb; color:var(--ng)}

.warn-box{background:#fff8e8; border:1px solid #f0d9a8; border-left:4px solid var(--warn); padding:12px 14px; border-radius:0 5px 5px 0; margin-bottom:16px}
.err-box{background:#fdeceb; border:1px solid #f3c4c1; border-left:4px solid var(--ng); padding:12px 14px; border-radius:0 5px 5px 0; margin-bottom:16px}
.info-box{background:#eef4fd; border:1px solid #cddcf3; border-left:4px solid var(--navy); padding:12px 14px; border-radius:0 5px 5px 0; margin-bottom:16px}

/* 金種表 */
.denoms{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px}
.denom{border:1px solid var(--line); border-radius:6px; padding:8px 10px; background:#fff}
.denom .face{font-weight:700; font-size:15px}
.denom input{font-size:20px; text-align:right; font-weight:700}
.denom .sub{text-align:right; font-size:13px; color:var(--sub); font-variant-numeric:tabular-nums}

/* 明細行 */
.lines td{padding:5px}
.lines input,.lines select{margin-top:0}

/* 不具合・要望 */
.nav-badge{
  display:inline-block; min-width:18px; margin-left:6px; padding:0 6px;
  background:#ffc94d; color:#3a2a00; border-radius:9px;
  font-size:11px; font-weight:700; line-height:18px; text-align:center; vertical-align:1px;
}
.report-fab{
  position:fixed; right:18px; bottom:18px; z-index:50;
  background:#3d4a5c; color:#fff; text-decoration:none;
  padding:11px 18px; border-radius:22px; font-size:13px; font-weight:700;
  box-shadow:0 3px 12px rgba(0,0,0,.28);
}
.report-fab:hover{background:var(--navy)}
.comment{border-left:3px solid var(--line); padding:6px 0 6px 12px; margin-bottom:12px}
.shots{display:flex; gap:14px; flex-wrap:wrap; margin-bottom:14px}
.shots figure{margin:0; max-width:320px}
.shots img{max-width:100%; border:1px solid var(--line); border-radius:5px; display:block}
.shots figcaption{margin:4px 0}

/* 画面の写しを入れる箱。貼り付け先だと分かるように点線で囲う */
.shotbox{
  border:2px dashed #9fb0c6; border-radius:8px; background:#f8fafc;
  padding:14px 16px; transition:background .15s, border-color .15s;
}
.shotbox.over{border-color:var(--navy); background:#eef4fd}
.shotbox .hint{margin:0 0 10px; font-size:14px; line-height:1.9}
.shotbox .shots{margin-top:12px}
.shotbox .shots figure{max-width:240px}
.key{
  display:inline-block; border:1px solid #999; border-bottom-width:2px; border-radius:4px;
  padding:1px 7px; background:#fff; font-size:13px; font-weight:700; white-space:nowrap;
}

/* 起案 */
.filerow{display:flex; gap:10px; align-items:center; margin-bottom:8px; flex-wrap:wrap}
.filerow select{width:auto; min-width:140px; margin-top:0}
.filerow input[type=file]{width:auto; flex:1; min-width:220px; margin-top:0}
tr.nowturn td{background:#fff8e8}
tr.nowturn td:first-child{box-shadow:inset 4px 0 0 var(--warn)}

/* ---------------------------------------------------------------- 使い方 */
.help h2{margin-top:34px; font-size:20px}
.help h3{color:var(--ink); font-size:17px; margin-top:24px}
.help p, .help li{font-size:15.5px; line-height:1.85}
.help .steps{list-style:none; counter-reset:step; padding:0; margin:12px 0}
.help .steps > li{
  counter-increment:step; position:relative;
  padding:12px 12px 12px 52px; margin-bottom:10px;
  background:#fff; border:1px solid var(--line); border-radius:7px;
}
.help .steps > li::before{
  content:counter(step); position:absolute; left:12px; top:12px;
  width:28px; height:28px; border-radius:50%; background:var(--navy); color:#fff;
  font-weight:700; font-size:15px; display:flex; align-items:center; justify-content:center;
}
.help .steps b{color:var(--navy)}
.help .flow{display:flex; align-items:stretch; gap:0; flex-wrap:wrap; margin:16px 0}
.help .flow .box{
  flex:1; min-width:150px; background:#fff; border:2px solid var(--navy);
  border-radius:8px; padding:12px; text-align:center;
}
.help .flow .box .t{font-weight:700; color:var(--navy)}
.help .flow .box .d{font-size:13px; color:var(--sub); margin-top:4px}
.help .flow .arrow{
  display:flex; align-items:center; padding:0 8px; color:var(--navy);
  font-size:22px; font-weight:700;
}
@media(max-width:700px){ .help .flow .arrow{transform:rotate(90deg); padding:6px 0; width:100%; justify-content:center} }
.help .key{
  display:inline-block; border:1px solid #999; border-bottom-width:2px; border-radius:4px;
  padding:1px 7px; background:#fafafa; font-size:13px; font-weight:700;
}
.help .toc{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px}
.help .toc a{
  display:block; padding:12px 14px; background:#fff; border:1px solid var(--line);
  border-radius:7px; text-decoration:none; font-weight:700;
}
.help .toc a:hover{background:#eef2f7}
.help .toc a span{display:block; font-weight:400; font-size:13px; color:var(--sub); margin-top:2px}
.help .ng{color:var(--ng); font-weight:700}
.help .ok{color:var(--ok); font-weight:700}

/* ---------------------------------------------------------------- ログイン */
.loginpage{display:flex; align-items:center; justify-content:center; min-height:100vh; background:var(--navy)}
.loginbox{background:#fff; padding:34px; border-radius:10px; width:min(400px,92vw)}
.loginbox h1{font-size:19px; color:var(--navy)}
.loginbox h1 span{display:block; font-size:13px; color:var(--sub); font-weight:400}
.loginbox button{width:100%; margin-top:8px}
.loginbox .err{background:#fdeceb; color:var(--ng); padding:10px; border-radius:5px; font-size:14px}

/* ---------------------------------------------------------------- 印刷 */
@media print{
  .no-print,.topbar,footer,.actions,.filters{display:none !important}
  body{background:#fff; font-size:12pt}
  .wrap{margin:0; max-width:none; padding:0}
  .card{border:none; padding:0}
  thead th{position:static; background:#eee !important; -webkit-print-color-adjust:exact; print-color-adjust:exact}
  @page{size:A4; margin:14mm}
}

/* 領収書 */
.receipt-sheet{width:180mm; margin:0 auto 10mm; padding:8mm 10mm; border:1px solid #333; background:#fff; page-break-inside:avoid}
.receipt-sheet .rc-head{display:flex; justify-content:space-between; align-items:flex-start}
.receipt-sheet .rc-title{font-size:26px; font-weight:700; letter-spacing:.5em; border-bottom:2px solid #333; padding-bottom:2px}
.receipt-sheet .rc-copy{font-size:13px; border:1px solid #333; padding:2px 10px; height:fit-content}
.receipt-sheet .rc-no{font-size:12px; text-align:right}
.receipt-sheet .rc-to{font-size:19px; border-bottom:1px solid #333; padding:10px 4px 4px; margin:14px 0 4px}
.receipt-sheet .rc-to small{font-size:13px}
.receipt-sheet .rc-amount{font-size:30px; font-weight:700; border-bottom:2px solid #333; padding:8px 10px; text-align:center; font-variant-numeric:tabular-nums; margin:12px 0}
.receipt-sheet .rc-words{text-align:center; font-size:12px; color:#444; margin-top:-8px}
.receipt-sheet .rc-body{display:flex; gap:16px; margin-top:10px}
.receipt-sheet .rc-body > div{flex:1}
.receipt-sheet table{font-size:12px}
.receipt-sheet .rc-org{text-align:right; font-size:13px; line-height:1.6; margin-top:12px}
.receipt-sheet .rc-org .name{font-size:17px; font-weight:700}
.receipt-sheet .rc-stamp{border:1px dashed #888; width:26mm; height:26mm; display:inline-flex; align-items:center; justify-content:center; font-size:10px; color:#888; text-align:center}
.receipt-sheet .rc-note{font-size:11px; color:#555; margin-top:6px}
