/* nanaFX顧客管理 — ワイヤーフレーム(Customer_CRM/wireframe/project/*.dc.html)の配色・部品に合わせる */
body{margin:0;font-family:"Noto Sans JP",system-ui,-apple-system,"Hiragino Sans","Yu Gothic UI",sans-serif;color:#1f2937;background:#f3f4f6;font-size:14px}
a{color:#1d4ed8}a:hover{color:#1e40af}
.layout{display:flex;flex-wrap:wrap;min-height:100vh}
.nav{width:220px;background:#0f172a;padding:20px 12px;box-sizing:border-box;display:flex;flex-direction:column;gap:4px}
.nav .brand{color:#fff;font-weight:700;font-size:16px;padding:0 14px 16px}
.nav a{display:block;padding:10px 14px;border-radius:6px;color:#e5e7eb;text-decoration:none}
.nav a:hover{background:#1e293b;color:#fff}
.nav a.on{background:#1d4ed8;color:#fff}
.nav .soon{font-size:11px;color:#94a3b8;margin-left:4px}
.nav .foot{margin-top:auto;color:#94a3b8;font-size:12px;padding:14px}
.nav .foot button{background:none;border:1px solid #475569;color:#e5e7eb;border-radius:6px;padding:4px 10px;margin-top:8px;cursor:pointer;font-family:inherit}
main{flex:999 1 560px;min-width:0;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;gap:16px}
h1{font-size:20px;margin:0}
.head{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:16px;box-sizing:border-box}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.kpi .v{font-size:22px;font-weight:700;margin:4px 0}
.kpi .s{font-size:12px;color:#6b7280}
.h2{font-size:15px;font-weight:700;margin:0 0 10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.scroll{overflow-x:auto}
.t{width:100%;border-collapse:collapse;font-size:13px}
.t th{text-align:left;background:#f9fafb;border-bottom:1px solid #e5e7eb;padding:8px;font-weight:500;color:#4b5563;white-space:nowrap}
.t td{padding:8px;border-bottom:1px solid #f1f5f9;white-space:nowrap;vertical-align:middle}
.t td.wrap{white-space:normal;min-width:200px}
.t tr.cancel td{color:#9ca3af}
.t tr.attention td{background:#fdf2f8}
.t.compact td{padding:4px 6px}
.num{text-align:right}
.red{color:#dc2626}
.muted{color:#6b7280}.small{font-size:12px}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:500;white-space:nowrap}
.b-purple{background:#ede9fe;color:#5b21b6}.b-red{background:#fee2e2;color:#991b1b}.b-amber{background:#fef3c7;color:#92400e}.b-blue{background:#dbeafe;color:#1e40af}.b-green{background:#dcfce7;color:#166534}.b-gray{background:#e5e7eb;color:#374151}
.btn{display:inline-block;padding:7px 12px;border-radius:6px;border:1px solid #d1d5db;background:#fff;color:#1f2937;font-size:13px;font-family:inherit;cursor:pointer;min-height:36px;text-decoration:none;box-sizing:border-box;line-height:20px}
.btn:hover{background:#f9fafb;color:#1f2937}
.btn-p{background:#1d4ed8;color:#fff;border-color:#1d4ed8}.btn-p:hover{background:#1e40af;color:#fff}
.btn-d{color:#b91c1c;border-color:#fca5a5}
.btn-s{padding:4px 10px;min-height:30px;font-size:12px;line-height:20px}
.sel,.inp,input[type=text],input[type=number],input[type=date],input[type=password],input[type=month],select,textarea{padding:6px 8px;border:1px solid #d1d5db;border-radius:6px;background:#fff;font-family:inherit;font-size:13px;min-height:34px;box-sizing:border-box}
textarea{width:100%;min-height:80px}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.lab{font-size:13px;color:#4b5563}
.box{border:1px solid #e5e7eb;border-radius:8px;padding:12px;background:#f8fafc}
.chip{display:inline-block;padding:4px 12px;border-radius:999px;border:1px solid #d1d5db;background:#fff;color:#374151;font-size:12px;cursor:pointer;min-height:30px;box-sizing:border-box;line-height:20px;text-decoration:none}
.chip.on{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chips .lab{min-width:70px}
.form{display:grid;grid-template-columns:160px 1fr;gap:10px 14px;align-items:center;max-width:860px}
.form > label{font-size:13px;color:#4b5563}
.form .full{grid-column:1 / -1}
.flash{padding:10px 14px;border-radius:6px;font-size:13px}
.flash.ok{background:#dcfce7;color:#166534}.flash.error{background:#fee2e2;color:#991b1b}.flash.info{background:#dbeafe;color:#1e40af}
.dl{display:grid;grid-template-columns:140px 1fr;gap:6px 12px;font-size:13px}
.dl dt{color:#6b7280}.dl dd{margin:0}
.hist{border-left:3px solid #e5e7eb;padding:6px 12px;margin:8px 0}
.hist .when{font-size:12px;color:#6b7280}
.okline{color:#166534;font-weight:700}.ngline{color:#b91c1c;font-weight:700}
.allclear{text-align:center;padding:28px 12px;color:#166534}
.allclear .big{font-size:18px;font-weight:700}
.login{max-width:380px;margin:80px auto}
.pager{display:flex;gap:6px;align-items:center}
@media (max-width:720px){
  .nav{width:100%;flex-direction:row;flex-wrap:wrap;padding:10px}
  .nav .brand{width:100%;padding:0 6px 6px}
  .nav a{padding:6px 10px}
  .nav .foot{margin:0;padding:6px}
  main{padding:16px}
  .form{grid-template-columns:1fr}
  .dl{grid-template-columns:1fr}
}
.bar{height:8px;background:#93c5fd;border-radius:4px;min-width:1px}
.bar.paid{background:#fdba74}
tr.total td{font-weight:700;background:#f9fafb}
/* 数値の列: 見出しも右寄せ(.t th の左寄せより強く)、桁の幅をそろえる */
.t th.num,.t td.num{text-align:right;font-variant-numeric:tabular-nums}
.num{font-variant-numeric:tabular-nums}
/* 集計の表: 列幅を固定して見出しと数値の位置をそろえる(横に長い表は .scroll で横に送る) */
.t.grid{table-layout:fixed;width:100%}
.t.grid th,.t.grid td{white-space:normal;overflow-wrap:anywhere}
.t.grid th{line-height:1.3;vertical-align:bottom}
.t.grid td.num{white-space:nowrap}
.t.grid .c-ev{width:150px}.t.grid .c-date{width:64px}.t.grid .c-n{width:88px}.t.grid .c-cnt{width:84px}
.t.grid .c-yen{width:116px}.t.grid .c-bar{width:140px}.t.grid .c-wide{width:auto;min-width:220px;white-space:normal}
details summary{cursor:pointer}

/* ===== 2026-11-06 デザインの見直し(Codex のデザインレビュー A1・A8。明るい配色・文字は大きめ・ひと目で分かる) ===== */
/* A1 文字: 本文・表 16px / 補足 14px / 見出し 26px / 主要な金額 30px。補足の文字色を濃く(白地で 7:1 以上) */
body{font-size:16px;line-height:1.6}
.t{font-size:16px}
.t th{font-size:14px;color:#374151}
.t.compact td{padding:6px 8px}
.small{font-size:14px}
.muted,.kpi .s{color:#4b5563}
.nav .foot{color:#cbd5e1}
h1{font-size:26px;line-height:1.35}
.h2{font-size:19px}
.kpi .v{font-size:30px;line-height:1.25}
.kpi .s{font-size:14px}
.badge{font-size:14px;padding:3px 10px}
.flash{font-size:15px}
/* A1 ボタン: 高さ44px以上・文字16px。主操作=塗り(btn-p)/ 補助=枠線(btn)/ 書き出し=控えめ(btn-x) */
.btn,.btn-s{min-height:44px;font-size:16px;line-height:24px;padding:9px 16px}
.btn-s{padding:9px 12px}
.btn-x{background:#fff;color:#374151;border:1px solid #e5e7eb;font-size:15px}
.btn-x:hover{background:#f3f4f6;color:#111827}
.btn-d{background:#fff}
.chip{font-size:15px;min-height:40px;line-height:30px;padding:4px 14px}
.sel,.inp,input[type=text],input[type=number],input[type=date],input[type=password],input[type=month],select,textarea{font-size:16px;min-height:44px}
input[type=checkbox],input[type=radio]{width:20px;height:20px;vertical-align:middle}
.nav a{font-size:16px}
.nav .later{display:block;font-size:13px;color:#94a3b8;font-weight:400}
.nav a.dim{color:#94a3b8}
.legend{display:inline-flex;gap:14px;align-items:center;font-size:14px;color:#374151;font-weight:400}
.legend i{display:inline-block;width:14px;height:10px;border-radius:3px;background:#93c5fd;margin-right:4px}
.legend i.paid{background:#fdba74}
.bigmoney{font-size:28px;font-weight:700;line-height:1.2}
.todo{border:1px solid #fde68a;background:#fffbeb;border-radius:8px;padding:14px 16px;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;justify-content:space-between;margin-bottom:10px}
.todo .ttl{font-size:18px;font-weight:700;color:#92400e}
.todo .who{font-size:16px}
.sticky-bar{position:sticky;bottom:0;z-index:5;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px 16px;box-shadow:0 -4px 12px rgba(0,0,0,.06);display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;justify-content:space-between}
.confirm-box{border:2px solid #fca5a5;background:#fff7f7;border-radius:8px;padding:16px}
.confirm-box dt{color:#374151}
details.more>summary{display:inline-block;margin-top:8px}
.nav-toggle,.nav-burger{display:none}

/* A8 スマホ(768px以下): ページ全体を横に広げない。横スクロールは表の枠の中だけ。メニューは開閉式のヘッダー */
@media (max-width:768px){
  .layout{display:block;width:100%}
  main{width:100%;min-width:0;padding:12px;box-sizing:border-box}
  .nav{width:100%;flex-direction:row;flex-wrap:wrap;align-items:center;padding:8px 12px;gap:2px}
  .nav .brand{width:auto;flex:1;padding:6px 4px}
  .nav-burger{display:inline-block;color:#fff;border:1px solid #475569;border-radius:6px;padding:8px 14px;font-size:16px;cursor:pointer;min-height:44px;box-sizing:border-box}
  .nav .menu{display:none;width:100%}
  .nav-toggle:checked ~ .menu{display:block}
  .nav .menu a{padding:12px 10px}
  .nav .foot{padding:8px 10px}
  .scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .scroll::before{content:"← 左右に動かして表示 →";display:block;font-size:13px;color:#4b5563;margin-bottom:4px}
  .cards{grid-template-columns:1fr}
  .head{align-items:flex-start}
  .dl{grid-template-columns:1fr}
  .dl dd{overflow-wrap:anywhere}
  .row{flex-wrap:wrap}
  .card{padding:12px;max-width:100%;overflow-wrap:anywhere}
  .chips{flex-wrap:wrap}
  .form{grid-template-columns:1fr}
}
@media (min-width:769px){ .nav .menu{display:flex;flex-direction:column;gap:4px;flex:1} }
