/* ==============================
   Reset & Base
   ============================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 14px;
  background: #f4f5f7;
  color: #1a1a1a;
  line-height: 1.5;
}

/* ==============================
   Login screen
   ============================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 10px;
  padding: 36px 32px 28px;
}

.login-title {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 600;
  color: #111;
}

.login-subtitle {
  margin: 0 0 24px;
  font-size: 13px;
  color: #888;
}

/* ==============================
   App shell (sidebar + content)
   ============================== */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ==============================
   Sidebar
   ============================== */
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e4e8;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eee;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.sidebar-company {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}

.nav-item:hover {
  background: #f0f1f3;
  color: #222;
}

.nav-item.active {
  background: #eef2ff;
  color: #3b5bdb;
  font-weight: 500;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-email {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.btn-logout {
  font-size: 12px;
  color: #999;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.btn-logout:hover {
  color: #c0392b;
  border-color: #e0a9a5;
}

/* ==============================
   Content area
   ============================== */
.content {
  flex: 1;
  overflow-y: auto;
  background: #f4f5f7;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.page-bar {
  background: #fff;
  border-bottom: 1px solid #e2e4e8;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #111;
}

.page-badge {
  font-size: 12px;
  color: #888;
  background: #f0f1f3;
  padding: 3px 10px;
  border-radius: 4px;
}

.page-body {
  padding: 24px 28px 40px;
  max-width: 800px;
}

/* ==============================
   Cards
   ============================== */
.card {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 14px;
  color: #111;
}

/* ==============================
   Form elements
   ============================== */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-weight: 500;
  font-size: 13px;
  color: #333;
}

.form-control {
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #111;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: #3b5bdb;
  box-shadow: 0 0 0 2px rgba(59, 91, 219, 0.1);
}

.company-picker {
  position: relative;
}

.company-picker-input {
  width: 100%;
}

.company-picker-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.company-picker-item {
  padding: 9px 12px;
  font-size: 13px;
  color: #111;
  cursor: pointer;
}

.company-picker-item:hover,
.company-picker-item.active {
  background: #eef2ff;
}

.company-picker-empty {
  padding: 9px 12px;
  font-size: 13px;
  color: #888;
}

.form-hint {
  font-size: 12px;
  color: #888;
}

/* チェックボックス + ラベルを 1 行に並べる（.form-field は縦積みなので入れ子で使う） */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.form-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #3b5bdb;
  cursor: pointer;
}

.form-error {
  font-size: 12px;
  color: #c0392b;
  min-height: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

/* ==============================
   Buttons
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: #3b5bdb;
  color: #fff;
  border-color: #3b5bdb;
}

.btn-primary:hover {
  background: #364fc7;
  border-color: #364fc7;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==============================
   Result panel
   ============================== */
.result-panel {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  min-height: 100px;
  padding: 14px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #333;
  line-height: 1.6;
}

/* ==============================
   Utilities
   ============================== */
.hidden {
  display: none !important;
}

/* ==============================
   算定基礎届 (santei)
   ============================== */
.santei-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  border-radius: 6px;
  font-size: 12px;
  color: #8a6d3b;
  line-height: 1.6;
}

.santei-card-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.santei-seq-field { width: 90px; }
.santei-name-field { width: 220px; }
.santei-kijun-field { width: 200px; }

.santei-card-head .santei-del {
  margin-left: auto;
}

.santei-table-wrap {
  overflow-x: auto;
}

.santei-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.santei-table th,
.santei-table td {
  border: 1px solid #e2e4e8;
  padding: 6px;
  text-align: center;
}

.santei-table th {
  background: #f4f5f7;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.santei-table td.santei-mlabel {
  background: #fafafa;
  font-weight: 600;
  white-space: nowrap;
  width: 56px;
}

.santei-table .form-control {
  width: 100%;
  text-align: right;
  padding: 6px 8px;
}

.santei-totals {
  margin-top: 14px;
}

/* 労働保険申告書: 列数が多い表は最小幅を確保して横スクロール */
.roudou-table {
  min-width: 640px;
}
.roudou-table td.roudou-na {
  color: #aaa;
  background: #fafafa;
}
.roudou-table .form-control {
  min-width: 72px;
}

.santei-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.santei-actions-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.santei-btn-ghost {
  background: #fff;
  color: #3b5bdb;
  border-color: #d1d5db;
}

.santei-btn-ghost:hover {
  border-color: #3b5bdb;
}

/* ==============================
   決算審査: タスク一覧の進捗表示
   ============================== */
.audit-jobs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audit-refresh-btn {
  padding: 5px 14px;
  font-size: 12px;
  background: #fff;
  color: #3b5bdb;
  border-color: #d1d5db;
}

.audit-refresh-btn:hover {
  border-color: #3b5bdb;
}

.audit-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.audit-progress-text {
  display: block;
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

.audit-progress-bar {
  margin-top: 4px;
  height: 4px;
  width: 100%;
  max-width: 180px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
}

.audit-progress-bar > span {
  display: block;
  height: 100%;
  background: #3b5bdb;
  transition: width 0.3s;
}

.audit-stale {
  display: block;
  font-size: 12px;
  color: #e8590c;
  margin-top: 2px;
}

.audit-field-hint {
  margin-left: 8px;
  font-weight: 400;
  font-size: 11px;
  color: #3b5bdb;
}

.audit-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.audit-pager-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-pager-info {
  font-size: 12px;
  color: #555;
}

.audit-delete-btn {
  padding: 3px 10px;
  font-size: 12px;
  background: #fff;
  color: #c0392b;
  border-color: #e0b4ae;
}

.audit-delete-btn:hover:not(:disabled) {
  border-color: #c0392b;
}

.audit-delete-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==============================
   Segmented radio (種類 / 支払方法)
   点选芯片。ページ既存の主色（#3b5bdb）を流用する。
   ============================== */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seg input[type="radio"] {
  /* 隠すが display を none にはしない（キーボード焦点も読屏も拾えなくなる）。裁剪法で隠す */
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.seg label {
  padding: 8px 16px;
  border: 1px solid #d5d9e0;
  border-radius: 8px;
  background: #fff;
  color: #333;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  line-height: 1.2;
  transition: background 0.12s, border-color 0.12s;
}
.seg label:hover {
  background: #f4f6fa;
}
.seg input[type="radio"]:checked + label {
  background: #3b5bdb;
  border-color: #3b5bdb;
  color: #fff;
  font-weight: 600;
}
.seg input[type="radio"]:focus-visible + label {
  /* キーボード操作が見えるように */
  outline: 2px solid #3b5bdb;
  outline-offset: 2px;
}

/* ==============================
   弥生出力 (yayoi)
   ============================== */
.yayoi-actions {
  gap: 10px;
  margin-top: 14px;
}
.yayoi-block {
  margin-top: 16px;
}
.yayoi-block-title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  margin-bottom: 6px;
}
.yayoi-block .santei-hint {
  margin: 0 0 8px;
}
.yayoi-table td {
  text-align: left;
  white-space: nowrap;
}
.yayoi-table td.yayoi-wrap {
  white-space: normal;
  min-width: 220px;
}

/* 確認結果（件数タイル） */
.result-panel.yayoi-summary {
  white-space: normal;
  font-family: inherit;
}
.yayoi-summary-head {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}
.yayoi-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.yayoi-tile {
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.yayoi-tile-label { font-size: 12px; color: #666; }
.yayoi-tile-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.yayoi-tile-amt { font-size: 13px; color: #555; font-variant-numeric: tabular-nums; }
.yayoi-tile-ok { border-color: #b2dfbd; background: #f3fbf5; }
.yayoi-tile-ok .yayoi-tile-num { color: #2b8a3e; }
.yayoi-tile-danger { border: 2px solid #c0392b; background: #fdecea; }
.yayoi-tile-danger .yayoi-tile-num,
.yayoi-tile-danger .yayoi-tile-amt,
.yayoi-tile-danger .yayoi-tile-label { color: #c0392b; }
.yayoi-tile-warn { border: 2px solid #d9480f; background: #fff4e6; }
.yayoi-tile-warn .yayoi-tile-num,
.yayoi-tile-warn .yayoi-tile-label { color: #d9480f; }
.yayoi-tile-muted .yayoi-tile-num { color: #999; }

/* 赤・橙の注意書き（日本語 + 中文） */
.yayoi-alert {
  border-radius: 6px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}
.yayoi-alert-ja { font-weight: 700; }
.yayoi-alert-danger { background: #fdecea; border-left: 5px solid #c0392b; color: #a61e1e; }
.yayoi-alert-warn { background: #fff4e6; border-left: 5px solid #d9480f; color: #a63c06; }

/* 出力しなかった仕訳・注意の一覧 */
.yayoi-block-danger,
.yayoi-block-warn {
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 18px;
}
.yayoi-block-danger { border: 2px solid #c0392b; background: #fffafa; }
.yayoi-block-warn { border: 2px solid #d9480f; background: #fffcf7; }
.yayoi-block-danger .yayoi-block-title { color: #c0392b; font-size: 15px; }
.yayoi-block-warn .yayoi-block-title { color: #d9480f; font-size: 15px; }

/* 確認チェック + ダウンロード */
.yayoi-confirm {
  margin-top: 20px;
  padding: 14px 16px;
  border: 2px dashed #c0392b;
  border-radius: 8px;
  background: #fffafa;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.yayoi-confirm.hidden { display: none; }
.yayoi-confirm-label {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #a61e1e;
  line-height: 1.6;
  cursor: pointer;
}
.yayoi-confirm-label input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.yayoi-confirm .yayoi-alert { flex-basis: 100%; }

/* ==============================
   レシート確認画面（/review）
   左＝一覧・中央＝原画像・右＝入力欄の 3 列。既存画面のクラスには触れない（rv- 接頭辞）。
   ============================== */
.rv-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.rv-top {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid #e2e4e8; flex-shrink: 0;
}
.rv-back { color: #666; text-decoration: none; font-size: 13px; }
.rv-back:hover { color: #3b5bdb; }
.rv-title { margin: 0; font-size: 16px; font-weight: 600; }
.rv-company { min-width: 260px; padding: 6px 10px; }
.rv-spacer { flex: 1; }
.rv-email { font-size: 12px; color: #999; }

.rv-main { flex: 1; display: grid; grid-template-columns: 280px 1fr 460px; min-height: 0; }

/* 左: 一覧 */
.rv-list-pane { display: flex; flex-direction: column; border-right: 1px solid #e2e4e8; background: #fff; min-height: 0; }
.rv-tabs { display: flex; border-bottom: 1px solid #e2e4e8; flex-shrink: 0; }
.rv-tab {
  flex: 1; padding: 10px 0; background: none; border: none; border-bottom: 2px solid transparent;
  font-size: 13px; color: #666; cursor: pointer;
}
.rv-tab.active { color: #1a1a1a; font-weight: 600; border-bottom-color: #3b5bdb; }
.rv-list { flex: 1; overflow-y: auto; }
.rv-item {
  display: flex; width: 100%; text-align: left; gap: 8px; padding: 10px 14px;
  background: #fff; border: none; border-bottom: 1px solid #eef0f3; cursor: pointer; font: inherit;
}
.rv-item:hover { background: #f6f7f9; }
.rv-item.active { background: #eef2ff; box-shadow: inset 3px 0 0 #3b5bdb; }
.rv-item-main { flex: 1; min-width: 0; }
.rv-item-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.rv-item-amt { font-size: 15px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rv-item-lines { font-size: 11px; color: #888; margin-left: 6px; }
.rv-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rv-item-date { font-size: 12px; color: #888; }
.rv-stamp {
  font-size: 10px; color: #2b8a3e; border: 1.5px solid #2b8a3e; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.rv-stamp-x { color: #c0392b; border-color: #c0392b; }
.rv-stamp-m { color: #b7791f; border-color: #b7791f; }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; background: #3b5bdb; }
.rv-empty { padding: 24px; color: #999; font-size: 13px; text-align: center; }

/* 中央: 原画像 */
.rv-viewer-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #eceef1; }
.rv-viewer-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: #fff; border-bottom: 1px solid #e2e4e8; flex-shrink: 0;
}
.rv-tool {
  min-width: 36px; padding: 5px 10px; background: #fff; border: 1px solid #d1d5db;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.rv-tool:hover { background: #f4f6fa; }
.rv-zoom-label { font-size: 12px; color: #888; margin-left: 6px; }
.rv-open { margin-left: auto; font-size: 12px; color: #3b5bdb; }
.rv-stage { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 12px; min-height: 0; }
.rv-img { display: block; max-width: none; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); transform-origin: center center; }
.rv-pdf { width: 100%; height: 100%; border: none; background: #fff; }

/* 右: 入力欄 */
.rv-form-pane { display: flex; flex-direction: column; border-left: 1px solid #e2e4e8; background: #fff; min-height: 0; position: relative; }
.rv-form { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.rv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rv-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rv-field .form-control { padding: 7px 10px; }
.rv-label { font-size: 12px; color: #666; }
.rv-req { font-style: normal; font-size: 10px; color: #c0392b; margin-left: 4px; }
.rv-num { text-align: right; font-variant-numeric: tabular-nums; }
.rv-err { font-size: 11px; color: #c0392b; min-height: 0; }
.rv-err:empty { display: none; }
.rv-invalid { border-color: #c0392b !important; background: #fff6f5; }
.rv-form-pane .seg { gap: 4px; }
.rv-form-pane .seg label { padding: 6px 10px; font-size: 13px; }
.rv-lines-head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.rv-link { background: none; border: none; color: #3b5bdb; cursor: pointer; font-size: 12px; }
.rv-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv-lines th { font-weight: 500; color: #666; font-size: 11px; text-align: left; padding: 4px 4px; border-bottom: 1px solid #e2e4e8; }
.rv-lines td { padding: 4px; vertical-align: middle; }
.rv-lines .form-control { width: 100%; padding: 6px 8px; }
.rv-lines { table-layout: fixed; }
.rv-lines th:nth-child(1) { width: 66px; }
.rv-lines th:nth-child(2) { width: 84px; }
.rv-lines th:nth-child(3) { width: 32%; }
.rv-lines th:nth-child(5) { width: 24px; }
.rv-lines .rv-rate { padding: 6px 2px 6px 6px; }
.rv-x { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 15px; }
.rv-journal { border-top: 1px dashed #e2e4e8; padding-top: 10px; }
.rv-note { font-size: 11px; color: #999; margin: 0; }
.rv-muted { font-size: 12px; color: #888; }
.rv-warn { color: #b7791f; font-size: 12px; }
.rv-err-block { color: #c0392b; font-size: 12px; }
.rv-banner { padding: 10px 12px; border-radius: 6px; background: #fff7e6; color: #8a5a00; font-size: 13px; }
.rv-banner-ok { background: #ebfbee; color: #2b8a3e; }

.rv-actions { border-top: 1px solid #e2e4e8; padding: 10px 18px; flex-shrink: 0; background: #fff; }
.rv-main-actions, .rv-exclude-box { display: flex; align-items: center; gap: 8px; }
.rv-exclude-box .form-control { flex: 1; padding: 7px 10px; }
.rv-quiet { background: #fff; border-color: #d1d5db; color: #333; font-weight: 500; }
.rv-quiet:hover { background: #f4f6fa; }
.rv-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.rv-danger-text { color: #c0392b; }
.rv-keys { margin-top: 8px; font-size: 11px; color: #999; }
.rv-keys kbd {
  font-family: inherit; font-size: 10px; border: 1px solid #ccc; border-radius: 3px;
  padding: 0 4px; background: #fafafa;
}
.rv-toast {
  position: absolute; left: 18px; right: 18px; bottom: 110px; padding: 10px 14px; border-radius: 6px;
  background: #1f2937; color: #fff; font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 10;
}
.rv-toast-error { background: #c0392b; }
/* display:flex を持つ要素でも hidden 属性を効かせる（この画面の中だけ） */
.rv-body [hidden] { display: none !important; }
.rv-item-company { font-size: 11px; color: #3b5bdb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 勘定科目コンボボックス（番号ショートカット＋ID 表示） */
.rv-acc-menu {
  position: fixed; z-index: 1000; overflow-y: auto; background: #fff; border: 1px solid #d1d5db;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.15); padding: 4px 0; font-size: 13px;
}
.rv-acc-menu[hidden] { display: none; }
.rv-acc-opt { display: flex; align-items: baseline; gap: 10px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.rv-acc-opt.is-active { background: #e8edff; }
.rv-acc-id { flex: 0 0 36px; text-align: right; color: #3b5bdb; font-variant-numeric: tabular-nums; font-size: 12px; }
.rv-acc-name { overflow: hidden; text-overflow: ellipsis; }
.rv-acc-none { padding: 6px 10px; color: #999; }

/* ==============================
   銀行明細確認（/bank-review）。rv-* の 3 列部品の上に固有部分だけ足す（br- 接頭辞）
   ============================== */
.br-link { font-size: 12px; color: #3b5bdb; text-decoration: none; }
.br-tabs .rv-tab { font-size: 12px; padding: 10px 0; }
.br-dir { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.br-out { background: #fff0f0; color: #c0392b; }
.br-in { background: #ebfbee; color: #2b8a3e; }
.br-status { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: #eef0f3; color: #555; white-space: nowrap; }
.br-st-settled, .br-st-direct, .br-st-attached { background: #ebfbee; color: #2b8a3e; }
.br-st-pending_receipt { background: #fff7e6; color: #8a5a00; }
.br-st-excluded { background: #fff0f0; color: #c0392b; }
.br-line { border: 1px solid #e2e4e8; border-radius: 8px; padding: 12px 14px; }
.br-line-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #666; }
.br-bank { margin-left: auto; font-size: 12px; color: #888; }
.br-amount { font-size: 24px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.br-desc { font-size: 14px; margin-top: 4px; word-break: break-all; }
.br-meta { font-size: 12px; color: #888; margin-top: 2px; }
.br-selected { font-size: 12px; color: #888; }
.br-selected.ok { color: #2b8a3e; font-weight: 600; }
.br-selected.ng { color: #c0392b; }
.br-cands { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.br-cand {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e2e4e8;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.br-cand:hover { background: #f6f7f9; }
.br-cand.exact { border-color: #b2c7ff; }
.br-cand.picked { background: #eef2ff; border-color: #3b5bdb; }
.br-kind { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #eef0f3; color: #555; white-space: nowrap; }
.br-kind-first_leg { background: #eef2ff; color: #3b5bdb; }
.br-kind-payroll { background: #f3f0ff; color: #6741d9; }
.br-kind-legacy { background: #fff7e6; color: #8a5a00; }
.br-c-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.br-c-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-c-sub { font-size: 11px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-c-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.br-direct { border: 1px dashed #b2c7ff; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
