/* TERRAISE 経費精算 — 社内システムのデザインシステム（墨色＋シアン1色）に合わせる
   参照画像: 02_経営・組織・制度/経費精算システム/デザイン/UIパターン/ */
:root {
  --ink: #232323; --ink2: #4a4a4a;
  --accent: #41CEF4; --accent-strong: #22b8e6; --accent-bg: #e8f8fd; --accent-text: #0e9fcf;
  --bg: #f4f5f5; --card: #fff; --line: #e6e7e8; --line2: #d9dbdc; --chip: #f3f4f4;
  --g400: #bdbdbd; --g500: #9a9a9a; --g600: #6f7173;
  --danger: #e5484d; --danger-bg: #fdecec; --success: #23a55a; --success-bg: #e6f6ec;
  --warning: #b7791f; --warning-bg: #fdf0d2;
  --r: 14px; --rs: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.04);
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
p a, .note a, .small a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -.01em; }
.ic { flex: none; display: block; }
.muted { color: var(--g600); }
.small { font-size: 13px; }
.center { text-align: center; }
.danger { color: var(--danger); }
.accent { color: var(--accent-strong); }
[hidden] { display: none !important; }

/* ---------- 枠組み ---------- */
.top { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.logo { width: 18px; height: 18px; background: var(--accent); display: inline-block; flex: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #a9abad; color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; user-select: none; }
.avatar::-webkit-details-marker { display: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 46px; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 8px; }
.menu-pop a, .menu-pop .linkish { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 8px; width: 100%; text-align: left; }
.menu-pop a:hover, .menu-pop .linkish:hover { background: var(--chip); }
.menu-name { margin: 4px 10px 8px; font-weight: 700; }
.menu-name small, .side-user small { display: block; font-weight: 400; color: var(--g600); font-size: 12px; }
.shell { display: block; }
.side { display: none; }
.content { max-width: 560px; margin: 0 auto; padding: 14px 14px 110px; }

@media (min-width: 900px) {
  .top { height: 64px; padding: 0 24px; }
  .top .menu { display: none; }
  .brand { font-size: 19px; }
  .logo { width: 20px; height: 20px; }
  .shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
  .side { display: flex; flex-direction: column; justify-content: space-between; background: #f8f9f9; border-right: 1px solid var(--line);
    padding: 36px 8px 20px; position: sticky; top: 64px; height: calc(100vh - 64px); }
  .side nav { display: grid; gap: 8px; }
  .side nav a { display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 18px; border-radius: 10px; font-size: 16px; color: var(--ink); }
  .side nav a:hover { background: #eef0f0; }
  .side nav a.on { background: var(--accent-bg); color: var(--accent-strong); font-weight: 700; }
  .side-user { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 12px; font-size: 14px; }
  .side-user form { grid-column: 1 / -1; }
  .content { max-width: none; margin: 0; padding: 36px 48px 64px; }
  body.page-home .content, body.page-routes .content, body.page-password .content { max-width: 640px; }
  .page-home .content > *, .page-routes .content > * { max-width: 560px; }
}

/* ---------- 共通部品 ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad, .sheet.pad { padding: 18px; }
.pad-s { padding: 12px 16px; }
.narrow { max-width: 440px; margin: 20px auto; padding: 24px; }
.h1 { font-size: 22px; font-weight: 800; margin: 0 0 14px; letter-spacing: .01em; }
.h1.big { font-size: 34px; line-height: 1.25; margin: 8px 0 18px; }
.h2 { font-size: 18px; font-weight: 800; margin: 26px 2px 12px; }
.h3 { font-size: 17px; font-weight: 800; margin: 20px 0 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--line2); background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; list-style: none; }
.btn::-webkit-details-marker { display: none; }
.btn:hover { background: #fafafa; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--g600); }
.btn.block { width: 100%; }
.btn.lg { height: 52px; font-size: 17px; border-radius: 14px; letter-spacing: .04em; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.sq { width: 64px; height: 64px; padding: 0; font-size: 30px; font-weight: 400; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; color: var(--g600); }
.linkish.danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--g500); cursor: pointer; }
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.flash { max-width: 560px; margin: 0 auto 12px; padding: 12px 16px; border-radius: var(--rs); background: var(--success-bg); color: #17663a; font-weight: 600; font-size: 14px; }
.flash.error { background: var(--danger-bg); color: #a3262b; }
@media (min-width: 900px) { .flash { margin: 0 0 16px; } }
.err { color: #a3262b; background: var(--danger-bg); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.note { background: var(--accent-bg); color: #0b6f91; border-radius: var(--rs); padding: 10px 14px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.note.warn { background: var(--warning-bg); color: #7a5212; }
.empty { padding: 26px 18px; text-align: center; color: var(--g600); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.b-submitted { background: #fde7b0; color: #8a5a00; }
.b-approved { background: #d5f2df; color: #1b7a43; }
.b-returned { background: #fbd5d6; color: #b4262c; }
.b-draft { background: #e7e8e9; color: #55585b; }
.b-paid { background: #dceffd; color: #1666a3; }
.flag { display: inline-flex; align-items: center; gap: 2px; color: #a86500; font-size: 12px; font-style: normal; font-weight: 600; }
em.flag { background: var(--warning-bg); border-radius: 6px; padding: 1px 7px; margin: 4px 4px 0 0; }
em.flag.ai { background: #eef3ff; color: #3858b8; }

/* フォーム */
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; font-size: 16px; }
textarea { height: auto; padding: 10px 14px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, .tile:focus-within { outline: 3px solid rgba(65,206,244,.45); outline-offset: 1px; border-color: var(--accent); }
input:disabled, select:disabled { background: #fafafa; color: var(--ink2); }
.f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.yen { position: relative; display: block; }
.yen::before { content: "¥"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink); pointer-events: none; font-size: 16px; }
.yen input { padding-left: 30px !important; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; height: 56px; font-size: 19px; border-radius: 8px; min-width: 300px; }
.select::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--g600); border-bottom: 2px solid var(--g600); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- ホーム ---------- */
.hero { padding: 18px 16px 0; }
.hero-head { display: flex; align-items: center; gap: 4px; }
.hero-label { margin: 0; font-size: 14.5px; font-weight: 700; flex: 1; }
.hero-head .mnav:first-child { margin-left: -6px; }
.mnav { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--g500); }
.mnav:hover { background: var(--chip); color: var(--ink); }
.hero-amount { margin: 2px 0 12px; font-size: 44px; line-height: 1.15; font-weight: 800; color: var(--accent-strong); }
.chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip { background: var(--chip); border-radius: var(--rs); padding: 10px 12px 9px; min-width: 0; }
.chip span { display: block; font-size: 12.5px; }
.chip b { display: block; font-size: 18px; font-weight: 800; white-space: nowrap; }
.steps { list-style: none; display: flex; align-items: flex-start; justify-content: space-between; margin: 16px 2px 0; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.steps li { display: grid; justify-items: center; gap: 4px; min-width: 52px; }
.steps li i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #b5b7b9; color: #fff; font-style: normal; font-weight: 700; font-size: 15px; }
.steps li span { font-size: 14px; color: var(--g600); }
.steps li.on i { background: var(--accent); }
.steps li.on span { color: var(--accent-strong); font-weight: 700; }
.steps li.done i { background: #8fdcf3; }
.steps li.arrow { min-width: 0; color: var(--g400); font-size: 18px; padding-top: 3px; }
.hero-note { margin: 0; padding: 11px 0 13px; text-align: center; font-size: 13px; color: var(--g600); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tile { display: grid; justify-items: center; align-content: center; gap: 8px; height: 96px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 500; cursor: pointer; }
.tile:hover { background: #fcfcfc; }
.tile .ic { color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list a, .li-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 10px; min-height: 62px; }
.list a:hover { background: #fcfcfc; }
.li-ic { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: var(--ink2); border-radius: 6px; overflow: hidden; }
.li-ic img { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.li-body { flex: 1; min-width: 0; }
.li-body b { display: block; font-weight: 500; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.li-body small { display: block; color: var(--g600); font-size: 13px; }
.li-amt { font-weight: 800; font-size: 16px; text-align: right; white-space: nowrap; }
.li-amt small { display: block; font-size: 11px; color: var(--g500); font-weight: 400; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(244,245,245,0), var(--bg) 30%); z-index: 10; }
.sticky-cta form { max-width: 560px; margin: 0 auto; }
@media (min-width: 900px) { .sticky-cta { position: static; background: none; padding: 18px 0 0; } .sticky-cta form { margin: 0; } }

/* ---------- 領収書 ---------- */
.sheet { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.content > .sheet:first-child, .content > .flash + .sheet { margin-top: 0; }
@media (max-width: 899px) { .page-home .content > form.sheet, .content > form.sheet { margin: -14px -14px 0; border-radius: 0; box-shadow: none; } }
.photo { position: relative; background: #c9c9c7; min-height: 220px; display: grid; place-items: center; }
.photo.has { min-height: 0; }
.photo img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #c9c9c7; }
.photo .pdf { display: grid; justify-items: center; gap: 6px; padding: 40px; color: var(--ink2); }
.photo-pick { display: grid; justify-items: center; gap: 6px; cursor: pointer; color: var(--ink); font-weight: 700; padding: 30px; }
.photo.has .photo-pick { position: absolute; right: 10px; bottom: 10px; padding: 8px 12px; background: rgba(255,255,255,.92); border-radius: 10px; font-size: 13px; grid-auto-flow: column; gap: 6px; }
.photo.has .photo-pick .ic { width: 18px; height: 18px; }
.sheet-body { padding: 16px 14px 20px; }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 14px; padding: 6px 12px; background: var(--accent-bg); color: var(--accent-strong); border-radius: 8px; font-size: 14px; font-weight: 700; }
.ai-badge.wait { background: var(--chip); color: var(--g600); font-weight: 500; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 10px; }
.grid2 .row { grid-template-columns: auto minmax(0, 1fr); }
.grid2 input[type=date] { padding: 0 6px 0 10px; font-size: 14.5px; }
input[type=date]::-webkit-calendar-picker-indicator { margin: 0; padding: 0; width: 14px; }
.row input { min-width: 0; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 0; }
.row > span:first-child { white-space: nowrap; }
.row small { font-weight: 400; color: var(--g600); font-size: 12px; }
.row.wide { margin-top: 12px; }
.row.wide:has(small) { grid-template-columns: auto 1fr; }
.row.start { align-items: start; }
.row.start > span:first-child { padding-top: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; height: 46px; }
.seg label { display: contents; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; font-weight: 500; color: var(--g600); cursor: pointer; font-size: 15px; }
.seg input:checked + span { background: var(--accent); color: #fff; font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid rgba(65,206,244,.45); outline-offset: -3px; }
.seg.big { height: 50px; margin: 14px 0 0; background: #fff; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cats label { display: contents; }
.cats input { position: absolute; opacity: 0; pointer-events: none; }
.cats span { display: grid; place-items: center; height: 46px; border: 1px solid var(--line2); border-radius: 10px; font-weight: 500; font-size: 14.5px; cursor: pointer; background: #fff; }
.cats input:checked + span { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-strong); font-weight: 700; }
.cats input:focus-visible + span { outline: 3px solid rgba(65,206,244,.45); }
.sheet-body .btn.lg, .sheet.pad > .btn.lg { margin-top: 20px; }
.del-form { margin: 18px 0 0; }
.scan-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.85); display: grid; place-items: center; z-index: 50; font-weight: 700; }
.scan-overlay div { display: grid; justify-items: center; gap: 12px; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--accent-bg); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 900px) {
  form.sheet#receipt-form { display: grid; grid-template-columns: 1fr 1.1fr; max-width: 960px; }
  form.sheet#receipt-form .photo { min-height: 100%; }
  form.sheet#receipt-form .photo img { max-height: 640px; height: 100%; }
  .content > form.sheet { max-width: 640px; }
  .content > form#receipt-form { max-width: 960px; }
}

/* ---------- 交通費 ---------- */
.sheet.pad { background: transparent; box-shadow: none; overflow: visible; padding: 4px 0 0; }
.sheet.pad .h1.big { font-size: 36px; margin: 8px 0 6px; }
@media (max-width: 899px) { .content > form.sheet.pad { margin: 0; } }
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.route { position: relative; display: grid; place-items: center; min-height: 60px; padding: 6px 6px; text-align: center; background: #fff; border: 1px solid var(--line2); border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1.45; cursor: pointer; }
.route input { position: absolute; opacity: 0; pointer-events: none; }
.route:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-bg); }
.route:has(input:focus-visible) { outline: 3px solid rgba(65,206,244,.45); }
.route.add { font-weight: 600; color: var(--ink); }
.route-new { margin-top: 10px; padding: 14px; }
.route-new .f { margin-bottom: 10px; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.stepper output { text-align: center; font-size: 28px; font-weight: 800; }
.stepper output b { font-size: 50px; line-height: 1; }
.cal { margin-top: 14px; padding: 14px 12px 10px; }
.cal-title { margin: 0 4px 6px; font-size: 20px; font-weight: 800; }
.cal-title small { display: block; font-size: 12px; font-weight: 400; color: var(--g600); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; row-gap: 2px; }
.cal-grid .wd { font-size: 13px; color: var(--g600); padding: 6px 0; }
.day { position: relative; height: 40px; border: 0; background: none; font-size: 16px; font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 10px; }
.day:hover { background: var(--chip); }
.day.on::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--accent); }
.day.on { font-weight: 700; }
.day.today { color: var(--accent-strong); }
.calc { margin-top: 14px; padding: 16px 16px 12px; }
.calc p { margin: 0; font-size: 17px; }
.calc .calc-amount { font-size: 40px; font-weight: 800; color: var(--accent-strong); line-height: 1.2; }
.sheet.pad .row.wide { margin-top: 14px; grid-template-columns: auto 1fr; }

/* ---------- PC：報酬配分・振込一覧 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.title-nav { display: flex; align-items: center; gap: 4px; }
.title-nav .h1.big { margin: 8px 6px 18px; }
.title-nav .mnav { margin-bottom: 10px; }
.title-nav .badge { margin-bottom: 10px; }
.head-btns { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.head-btns .btn { height: 52px; padding: 0 22px; font-size: 16px; font-weight: 500; }
.dl { position: relative; }
.dl-pop { position: absolute; right: 0; top: 58px; z-index: 5; width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 6px; }
.dl-pop a { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 8px; font-size: 14px; }
.dl-pop a:hover { background: var(--chip); }
.pickers { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.pick-note { font-size: 13px; color: var(--g600); display: flex; align-items: center; gap: 6px; }
.stats3, .stats4 { display: grid; gap: 18px; margin-bottom: 18px; }
.stats3 { grid-template-columns: repeat(3, 1fr); }
.stats4 { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 22px 26px 24px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.stat > span:first-child { font-size: 17px; font-weight: 700; }
.stat b { font-size: 50px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.stats4 .stat b { font-size: 46px; }
.stats4 .stat > span:first-child { font-weight: 500; }
.stat-input input { height: 64px !important; font-size: 44px !important; font-weight: 800; color: var(--accent-strong); border-color: transparent !important; background: var(--chip) !important; padding-left: 40px !important; }
.stat-input.yen::before { font-size: 40px; font-weight: 800; color: var(--accent-strong); left: 10px; }
.table-card { padding: 18px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th { background: #f3f4f4; font-weight: 500; text-align: left; padding: 18px 20px; white-space: nowrap; }
.tbl th:first-child { border-radius: 8px 0 0 0; } .tbl thead th:last-child { border-radius: 0 8px 0 0; }
.tbl td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td + td, .tbl th + th { border-left: 1px solid var(--line); }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl tfoot th { background: #fff; font-weight: 800; font-size: 17px; border-top: 2px solid var(--line2); padding: 20px; }
.tbl.pay td { height: 70px; }
.tbl.pay tbody tr { cursor: pointer; }
.tbl.pay tbody tr:hover { background: #fafcfc; }
.tbl.pay tbody tr.sel { background: var(--accent-bg); }
.tbl.alloc td { padding: 8px 12px; height: 68px; }
.tbl.alloc input, .tbl.alloc select { border-color: transparent !important; background-color: transparent !important; height: 44px; font-size: 16px; }
.tbl.alloc input:hover, .tbl.alloc select:hover, .tbl.alloc input:focus { border-color: var(--line2) !important; background-color: #fff !important; }
.tbl.alloc input.r { text-align: right; }
.tbl.alloc .x { width: 44px; border-left: 0; padding: 0; }
.tbl.alloc th.x { border-left: 0; }
.table-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 22px 0 0; }
.table-foot > .btn { height: 52px; background: #f6f7f7; font-weight: 500; }
.table-foot .btn.primary { height: 56px; padding: 0 44px; font-size: 17px; font-weight: 500; }
.tbl.dim, tr.dim { opacity: .55; }
.user-row { display: grid; grid-template-columns: 1.2fr .8fr .9fr .8fr 1.4fr auto; gap: 10px; align-items: center; }
.user-row input, .user-row select { height: 40px; font-size: 15px; }
.tbl .linkish { white-space: nowrap; }
.card.pad + .table-card { margin-top: 18px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 160px auto; gap: 12px; align-items: end; }
.inline-form .f { margin: 0; }
.issued { padding: 18px 20px; margin-bottom: 18px; border: 2px solid var(--accent); }
.copy { background: var(--chip); padding: 12px 14px; border-radius: 8px; font-size: 15px; white-space: pre-wrap; }
.admin-grid { display: grid; gap: 18px; }
.admin-grid.with-panel { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.panel { padding: 22px 20px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel-head .h2 { margin: 0; font-size: 28px; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.thumb { aspect-ratio: 3 / 4; background: #f4f5f5; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; place-items: center; color: var(--g500); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.plist { list-style: none; margin: 0 0 14px; padding: 0; font-size: 14px; }
.plist li + li { border-top: 1px solid var(--line); }
.plist a, .plist li > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; }
.plist b { font-weight: 600; display: block; }
.plist small { display: block; color: var(--g600); font-size: 12px; }
.plist .num { font-weight: 700; white-space: nowrap; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 6px; }
.panel-actions .btn { width: 100%; height: 56px; font-size: 17px; font-weight: 500; }
.ret { grid-column: span 1; }
.ret[open] { grid-column: 1 / -1; }
.ret-form { display: grid; gap: 8px; margin-top: 8px; }
@media (max-width: 1199px) {
  .admin-grid.with-panel { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .stat b { font-size: 34px; } .stats4 .stat b { font-size: 30px; }
}
@media (max-width: 899px) {
  .h1.big { font-size: 26px; }
  .stats3, .stats4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 16px; } .stat > span:first-child { font-size: 13px; }
  .stat b, .stats4 .stat b { font-size: 24px; }
  .stat-input input { height: 48px !important; font-size: 24px !important; padding-left: 28px !important; }
  .stat-input.yen::before { font-size: 22px; left: 10px; }
  .tbl { font-size: 14px; } .tbl th, .tbl td { padding: 10px 10px; }
  .table-card { padding: 10px; }
  .select select { min-width: 0; width: 100%; height: 48px; font-size: 16px; }
  .pickers .select { flex: 1 1 160px; }
  .inline-form, .user-row { grid-template-columns: 1fr 1fr; }
  .head-btns .btn { height: 44px; font-size: 14px; padding: 0 14px; }
}

/* ---------- ログイン ---------- */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 28px 24px; }
.login-card .brand { margin: 0 0 18px; }
.login-card h1 { font-size: 22px; margin: 0 0 16px; }

/* 振込一覧：右に明細パネルを出しても7列が収まるように */
.tbl.pay th, .tbl.pay td { padding: 12px 14px; white-space: nowrap; }
.tbl.pay tfoot th { padding: 18px 14px; }
@media (min-width: 1200px) { .admin-grid.with-panel { grid-template-columns: minmax(0, 1fr) 330px; } }
.panel-actions .undo { grid-column: 1 / -1; text-align: center; }
.panel-actions .undo .linkish { font-size: 13px; }
.table-card > .note { margin: 16px 0 0; }

/* 2026-10-05 v2：源泉・AIの印・一括操作 */
.chip small { display: block; font-size: 11px; color: var(--g600); font-weight: 600; margin-top: -2px; }
.ai-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.ai-line .ai-badge { margin: 0; }
.ai-line small { font-size: 12.5px; color: var(--g600); }
.fld { position: relative; display: block; min-width: 0; }
.fld input[data-ai] { border-color: #9be3f8; }
.fld:has(input[data-ai])::after, .seg[data-ai]::after { content: "AI"; position: absolute; top: -8px; right: 8px; padding: 0 5px; border-radius: 4px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; line-height: 15px; letter-spacing: .04em; }
.seg[data-ai] { position: relative; overflow: visible; }
input[data-missing] { border-color: #e0a12a !important; background: #fffaf0 !important; }
.stepper .btn:disabled { opacity: .35; }
.gensen-note { margin: 14px 2px 0; }
.head-note { margin: -6px 0 14px; text-align: right; font-size: 12.5px; color: var(--g600); }
.danger-btn { border-color: var(--danger); color: var(--danger); }
.bulk { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.stat > span:first-child small { font-size: 14px; color: var(--g600); font-weight: 500; margin-left: 4px; }
.tbl td.muted { color: var(--g600); }
.panel-sum { display: flex; justify-content: flex-end; gap: 16px; margin: 0 0 14px; font-size: 14px; }
.panel-sum b { font-size: 18px; margin-left: 4px; }
.tbl.alloc td[data-tax] { color: var(--g600); white-space: nowrap; }
.stat .stat-sub { font-size: 15px; color: var(--g600); margin-top: -4px; }
.table-card > .bulk { margin: 4px 0 16px; }
.table-card > .bulk .btn { height: 44px; font-size: 15px; font-weight: 500; padding: 0 22px; }
.missing-note { display: block; margin: 4px 0 0; padding: 0; font-size: 12px; line-height: 1.4; color: #b36b00; }
.row .missing-note { color: #b36b00; font-size: 12px; font-weight: 500; }
.grid2 .row { align-items: start; }
.grid2 .row > span:first-child { padding-top: 11px; }
.tbl.alloc select[name="line_user[]"] { min-width: 140px; }
.tbl.alloc select[data-kind] { min-width: 190px; }
.tbl.alloc .yen { width: 150px; margin-left: auto; }
.tbl.alloc .yen::before { display: none; }
.tbl.alloc .yen input { padding-left: 14px !important; }
.tbl.alloc select:disabled, .tbl.alloc input:disabled { color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }

/* 2026-10-05 v3：Google ログイン・振込先・Hub・振込データ */
.g-btn { gap: 10px; height: 50px; font-weight: 600; border-color: #c9cbcd; }
.g-mark { flex: none; }
.or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--g600); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.set-card { max-width: 560px; margin-bottom: 16px; }
.set-card .h3 { margin-top: 0; }
.saved-bank { display: flex; gap: 8px; align-items: center; background: var(--chip); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.ac { position: relative; display: block; }
.ac-list { position: absolute; left: 0; right: 0; top: 50px; z-index: 6; background: #fff; border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.ac-item { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; background: #fff; font-size: 15px; cursor: pointer; }
.ac-item + .ac-item { border-top: 1px solid var(--line); }
.ac-item:hover { background: var(--accent-bg); }
.linked { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--chip); padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; }
.linked small { display: block; color: var(--g600); font-size: 12px; }
.b-hub { background: var(--accent-bg); color: var(--accent-strong); }
.hub-pick { margin-bottom: 18px; }
.hub-pick .row.wide:first-child { margin-top: 0; }
.hub-pick .select select { min-width: 0; width: 100%; height: 50px; font-size: 16px; }
.hub-ref { margin: 8px 0 0; font-size: 13px; color: var(--g600); }
.content > form > .hub-ref { margin: -10px 0 16px; }
.bank-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.bank-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.bank-top .f { margin: 0; max-width: 220px; }
.bank-sum { margin: 0 0 6px; font-size: 15px; }
.bank-sum b { font-size: 22px; margin: 0 2px; }
.table-card.flat { padding: 0; margin: 14px 0; box-shadow: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.kv dt { color: var(--g600); }
.kv dd { margin: 0; }
.warn-text { color: #a86500; font-weight: 600; }
@media (max-width: 1199px) { .bank-grid { grid-template-columns: 1fr; } }
.bank-grid .tbl td { white-space: nowrap; }
.bank-grid .table-card.flat { overflow-x: auto; }
.side-user small a { color: var(--accent-text); }

/* 2026-10-05 v4：振込の安全確認 */
.danger-note { background: var(--danger-bg); color: #a3262b; margin: 14px 0 0; }
.bank-grid .tbl tr.unpicked td { background: #f6f6f6; color: var(--g600); }
.pick-hint { display: block; font-size: 11.5px; color: var(--g600); white-space: normal; }
.bank-grid .tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.bank-grid .tbl .badge { font-size: 12px; padding: 2px 8px; }
.export-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; }
.export-bar .check { font-size: 15px; }
