/* ============================================================================
   components.css — Estate System Cloud 共通部品
   ----------------------------------------------------------------------------
   全画面で共通の見た目を持たせる部品と、統一ルールをここに置きます。
   ・色と寸法は design-tokens.css の変数だけを使うこと（生の色コード禁止）
   ・特定の1画面だけのための指定はここに書かないこと
   ・estate_ui.css の後に読み込むため、旧CSSより優先されます

   収録している部品
     ・全画面統一ルール（角丸／表の見出し背景／入力欄の高さ／ボタンの高さ）
     ・表の罫線（格子）
     ・KPIストリップ
   ============================================================================ */
/* ============================================================================
   11. 全画面のデザイン統一（実測で見つかった不統一の是正）
   ・角丸は2px以下（旧CSSが table.common に付ける5pxを打ち消す）
   ・表の見出し背景を1色に統一
   ・入力欄の高さを1つに統一
   ・ボタンの高さを役割ごとに統一（一覧の操作34px／見出し40px／下部バー44px）
   ============================================================================ */

/* 11-1. 角丸 ---------------------------------------------------------------- */
#body.esb-shelled table.common,
#body.esb-shelled table.common th,
#body.esb-shelled table.common td,
#body.esb-shelled .esb-panel,
#body.esb-shelled .esb-list-panel,
#body.esb-shelled .esb-form-section{ border-radius:0 !important; }

/* 入力欄・ボタン・ページャも角丸なしに揃える（旧CSS/Bootstrap由来の丸みを打ち消す）*/
#body.esb-shelled #container input,
#body.esb-shelled #container select,
#body.esb-shelled #container textarea,
#body.esb-shelled #container button,
#body.esb-shelled #container .page-link,
#body.esb-shelled #container .pagination li,
#body.esb-shelled .esb-head-actions button,
#body.esb-shelled .esb-form-actions button,
#body.esb-shelled .esb-sidebar a,
#body.esb-shelled .esb-topbar button{ border-radius:0 !important; }

/* 11-2. 表の見出し背景（全画面で同じ色に） ---------------------------------- */
#body.esb-shelled .esb-table-wrap thead th,
#body.esb-shelled .esb-breakdown-table thead th,
#body.esb-shelled #container table.common > tbody > tr > th,
#body.esb-shelled #container table.common > thead > tr > th{
  background:var(--table-head) !important;
}
#body.esb-shelled .esb-breakdown-table th.esb-grp,
#body.esb-shelled .esb-breakdown-table thead .esb-grand{ background:#e8f0f9 !important; }
#body.esb-shelled .esb-list-scroll table.common > tbody > tr > td{ background:transparent; }

/* 11-3. 入力欄の高さ（全画面で42px。タッチ操作の下限に合わせる） ------------ */
#body.esb-shelled #container input[type=text],
#body.esb-shelled #container input[type=password],
#body.esb-shelled #container input[type=number],
#body.esb-shelled #container select{
  height:42px !important; min-height:42px !important;
}
/* 表の中の入力欄は行が間延びしないよう据え置き */
#body.esb-shelled .esb-list-scroll table.common input[type=text],
#body.esb-shelled .esb-list-scroll table.common select{
  height:36px !important; min-height:36px !important;
}

/* 11-4. ボタンの高さ（役割ごとに1つ） -------------------------------------- */
#body.esb-shelled .esb-sec-toggle{ height:34px !important; width:34px !important; }
#body.esb-shelled .esb-head-actions button{ height:40px !important; min-height:40px !important; }
#body.esb-shelled .esb-form-actions button{ height:44px !important; min-height:44px !important; }
#body.esb-shelled .esb-list-panel button.click_event{ height:34px !important; min-height:34px !important; }


/* ============================================================================
   12. 表の罫線（列の区切りを明確にする）
   横線だけでは列の対応が追いにくいため、縦罫線を入れて格子にする。
   線は細く淡い色にとどめ、業務表としての一覧性を優先する。
   ============================================================================ */
#body.esb-shelled #container table.common > tbody > tr > td,
#body.esb-shelled #container table.common > tbody > tr > th,
#body.esb-shelled #container table.common > thead > tr > th,
#body.esb-shelled .esb-table-wrap th,
#body.esb-shelled .esb-table-wrap td,
#body.esb-shelled .esb-breakdown-table th,
#body.esb-shelled .esb-breakdown-table td{
  border:1px solid var(--line-2) !important;
}
/* 外周は少し濃くして表の輪郭を出す */
#body.esb-shelled .esb-list-scroll > table.common,
#body.esb-shelled .esb-table-wrap > table{
  border-collapse:collapse;
  border:1px solid var(--line) !important;
}
/* 見出しの下だけ濃くして、ヘッダーと本体を分ける */
#body.esb-shelled .esb-list-scroll table.common > tbody > tr:nth-child(2) > th,
#body.esb-shelled .esb-table-wrap thead tr:last-child > th,
#body.esb-shelled .esb-breakdown-table thead tr:last-child > th{
  border-bottom:2px solid var(--line) !important;
}
/* グループの区切り（家賃関連／入出金関連 など）は太めに */
#body.esb-shelled #container table.common .left_line,
#body.esb-shelled .esb-breakdown-table th.esb-grp,
#body.esb-shelled .esb-breakdown-table .esb-grand{
  border-left:2px solid var(--line) !important;
}
/* 合計行・収支行は上罫線を強調 */
#body.esb-shelled .esb-table-wrap tfoot tr.esb-total > td,
#body.esb-shelled .esb-breakdown-table tbody tr:last-child > td,
#body.esb-shelled .esb-breakdown-table tbody tr:last-child > th{
  border-top:2px solid var(--navy) !important;
}

/* KPIストリップは常に横一杯の1段で表示する */
#body.esb-shelled .esb-metrics{display:block;width:100%;}
#body.esb-shelled .esb-metric-strip{grid-template-columns:repeat(4,minmax(0,1fr));width:100%;}
#body.esb-shelled .esb-metric-mini{border-left:4px solid var(--accent);}

/* ==========================================================================
   14. 登録・編集画面の2カラム構成（Figma「登録・編集」画面）
       左  … 入力するセクション   右 … 参照する情報と合計額
       ※ DOMは移動のみ。受け皿はフォームの内側にあるため送信内容は変わらない。
   ========================================================================== */
#body.esb-shelled .esb-form-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:16px;
  align-items:start;
  width:100%;
}
#body.esb-shelled .esb-form-layout-single{grid-template-columns:minmax(0,1fr);}
#body.esb-shelled .esb-form-main,
#body.esb-shelled .esb-form-aside{
  display:flex; flex-direction:column; gap:16px; min-width:0;
}
/* 右カラムは通常どおりページと一緒にスクロールさせる。
   position:sticky にすると、右カラムが画面より縦に長いときに
   下端（売却情報など）へ到達できなくなるため使わない。 */
#body.esb-shelled .esb-form-aside{position:static;}
#body.esb-shelled .esb-form-layout .esb-form-section{margin:0 !important;}

/* 右カラムの参照情報は1枚にまとめて、罫線の重なりを無くす。
   本文側は12列グリッド（.esb-property-grid）や .esb-field-row だが、
   右カラムでは「項目名｜値」の1列リストにする。 */
#body.esb-shelled .esb-form-aside .esb-form-section-body{padding:0;}
#body.esb-shelled .esb-form-aside .esb-property-grid,
#body.esb-shelled .esb-form-aside .esb-field-row{
  display:block; gap:0;
}
#body.esb-shelled .esb-form-aside .esb-property-grid > .esb-field,
#body.esb-shelled .esb-form-aside .esb-field-row > .esb-field{
  display:grid !important;
  grid-column:auto !important;
  grid-template-columns:116px minmax(0,1fr);
  align-items:stretch;
  gap:0;
  border-bottom:1px solid var(--line-2);
  min-height:36px;
}
#body.esb-shelled .esb-form-aside .esb-property-grid > .esb-field:last-child,
#body.esb-shelled .esb-form-aside .esb-field-row > .esb-field:last-child{border-bottom:0;}
#body.esb-shelled .esb-form-aside .esb-property-grid .esb-field > label,
#body.esb-shelled .esb-form-aside .esb-field-row .esb-field > label{
  display:flex !important; align-items:center;
  margin:0 !important;
  padding:8px 12px;
  background-color:var(--table-head);
  border-right:1px solid var(--line-2);
  font-size:12.5px; font-weight:700; color:var(--navy);
  line-height:1.4;
}
#body.esb-shelled .esb-form-aside .esb-property-grid .esb-field-controls,
#body.esb-shelled .esb-form-aside .esb-field-row .esb-field-controls{
  display:flex; align-items:center; flex-wrap:wrap; gap:4px;
  padding:8px 12px; min-height:0 !important; font-size:12.5px;
}
#body.esb-shelled .esb-form-aside .esb-property-grid input[type="text"], #body.esb-shelled .esb-form-aside .esb-property-grid select,
#body.esb-shelled .esb-form-aside .esb-field-row input[type="text"], #body.esb-shelled .esb-form-aside .esb-field-row select{
  width:100%; height:36px; min-height:36px; font-size:13px;
}
#body.esb-shelled .esb-form-aside .esb-property-grid textarea, #body.esb-shelled .esb-form-aside .esb-field-row textarea{min-height:64px;}

/* 対象（物件名・入出金ID・家賃年月）の帯 */
#body.esb-shelled .esb-target-bar{
  display:flex; flex-wrap:wrap; align-items:center; gap:12px 28px;
  background-color:var(--panel) !important;
  border:1px solid var(--line);
  border-radius:0;
  padding:14px 20px;
  margin:0 0 16px;
}
#body.esb-shelled .esb-target-bar .esb-field-row{
  display:flex; flex-wrap:wrap; align-items:center; gap:12px 28px;
  margin:0; padding:0; border:0; width:100%;
}
#body.esb-shelled .esb-target-bar .esb-field{display:flex; flex-direction:column; gap:2px;}
#body.esb-shelled .esb-target-bar .esb-field > label{
  margin:0; font-size:12px; font-weight:400; color:var(--muted);
}
#body.esb-shelled .esb-target-bar .esb-field-controls{
  font-size:14px; font-weight:700; color:var(--ink);
  display:flex; align-items:center; gap:8px;
}

/* 一番見たい合計額は右カラムの先頭に大きく */
#body.esb-shelled .esb-total-kpi{
  background-color:var(--panel) !important;
  border:1px solid var(--line);
  border-left:4px solid var(--accent);
  padding:14px 18px;
}
#body.esb-shelled .esb-total-kpi .esb-field{display:block; border:0; min-height:0;}
#body.esb-shelled .esb-total-kpi .esb-field > label{
  display:block; padding:0; margin:0 0 4px;
  background:none; border:0;
  font-size:12px; font-weight:400; color:var(--muted);
}
#body.esb-shelled .esb-total-kpi .esb-field-controls{
  padding:0;
  font-size:27px; font-weight:700; line-height:1.2; color:var(--ink);
  font-variant-numeric:tabular-nums;
}

/* 全部見せる構成では、セクションナビは「その場所へ送る」目次として使う */
#body.esb-shelled .esb-form-layout ~ .esb-sec-nav,
#body.esb-shelled .esb-sec-nav{flex-wrap:wrap;}

/* iPad横（1024px）までは右カラムを下に回す */
@media (max-width:1279px){
  #body.esb-shelled .esb-form-layout{grid-template-columns:minmax(0,1fr);}
}

/* 明細表で入力欄が1つだけの行は、旧レイアウトの空セルに幅を奪われるため確保する */
#body.esb-shelled .esb-form-section-body table.common td.esb-lone-input input[type="text"]{
  min-width:170px;max-width:220px;
}

/* ログアウト完了画面のボタン（ログイン画面と同じ見た目に揃える） */
body.login_body .esb-logout-back{
  display:flex; align-items:center; justify-content:center;
  width:100%; height:52px; margin-top:8px;
  background-color:var(--navy); color:#fff;
  border:0; border-radius:0;
  font-size:16px; font-weight:700; text-decoration:none;
}
body.login_body .esb-logout-back:hover{background-color:var(--navy-2); color:#fff;}

/* 右カラムの単位（㎡・坪・室 など）は数値と離す */
/* 右カラム：値と単位の間隔（旧レイアウトで別セルだったものを読みやすくする） */
#body.esb-shelled .esb-form-aside .esb-field-controls{gap:0;}
#body.esb-shelled .esb-form-aside .esb-unit{margin:0 0 0 1px;color:var(--muted);}
#body.esb-shelled .esb-form-aside .esb-val + .esb-val{margin-left:4px;}
#body.esb-shelled .esb-form-aside .esb-unit + .esb-val{margin-left:10px;}

/* ==========================================================================
   15. ダッシュボード右カラムのパネル（利用者提示のデザインに合わせる）
       濃紺の見出し帯（右上が斜めに明るくなる）＋ 番号付きの明細 ＋ 合計帯
   ========================================================================== */
#body.esb-shelled .esb-vpanel{
  background-color:var(--panel);
  border:1px solid var(--line);
  margin-bottom:16px;
  overflow:hidden;
}
#body.esb-shelled .esb-vpanel-head{
  position:relative;
  display:flex; align-items:center; gap:12px;
  padding:16px 20px;
  background-color:var(--navy);
  color:#fff;
  overflow:hidden;
}
/* 右上を斜めに切り替える（背景だけの装飾） */
#body.esb-shelled .esb-vpanel-head::after{
  content:""; position:absolute; top:0; right:0; bottom:0; width:52%;
  background-color:var(--navy-3);
  clip-path:polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events:none;
}
#body.esb-shelled .esb-vpanel-head > *{position:relative; z-index:1;}
#body.esb-shelled .esb-vpanel-head h2{
  margin:0; padding-left:12px;
  border-left:4px solid var(--gold);
  font-size:17px; font-weight:700; color:#fff; line-height:1.4;
}
#body.esb-shelled .esb-vpanel-head a{
  margin-left:auto; color:#fff; font-size:12.5px; text-decoration:underline; white-space:nowrap;
}
#body.esb-shelled .esb-vpanel-head a:hover{color:var(--cyan);}

/* 明細（番号付き） */
#body.esb-shelled .esb-vsteps{margin:0; padding:6px 20px; list-style:none;}
#body.esb-shelled .esb-vstep{
  position:relative;
  display:grid; grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center; gap:14px;
  padding:12px 0;
  border-bottom:1px solid var(--line-2);
}
#body.esb-shelled .esb-vstep:last-child{border-bottom:0;}
/* 番号どうしを縦線でつなぐ */
#body.esb-shelled .esb-vstep:not(:last-child)::before{
  content:""; position:absolute; left:16px; top:50%; bottom:-1px;
  border-left:1px solid var(--navy);
}
#body.esb-shelled .esb-vstep-no{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px;
  background-color:var(--navy); color:#fff;
  font-size:12.5px; font-weight:700; letter-spacing:.5px;
  position:relative; z-index:1;
}
#body.esb-shelled .esb-vstep-label{font-size:14px; font-weight:700; color:var(--ink);}
#body.esb-shelled .esb-vstep-value{
  font-size:17px; font-weight:700; color:var(--ink);
  font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap;
}

/* 合計帯 */
#body.esb-shelled .esb-vtotal{
  display:grid; grid-template-columns:56px minmax(0,1fr) auto;
  align-items:center;
  background-color:var(--line-2);
}
#body.esb-shelled .esb-vtotal-ic{
  display:flex; align-items:center; justify-content:center;
  align-self:stretch; background-color:var(--navy); color:#fff;
}
#body.esb-shelled .esb-vtotal-ic svg{width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.6;}
#body.esb-shelled .esb-vtotal-label{
  padding-left:14px; margin-left:14px;
  border-left:3px solid var(--navy);
  font-size:17px; font-weight:700; color:var(--ink);
}
#body.esb-shelled .esb-vtotal-value{
  padding:16px 20px 16px 8px;
  font-size:26px; font-weight:700; color:var(--navy);
  font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap;
}

/* 脚注 */
#body.esb-shelled .esb-vfoot{
  display:flex; align-items:center; gap:14px;
  padding:14px 20px;
  font-size:12.5px; color:var(--muted);
}
#body.esb-shelled .esb-vfoot svg{
  width:26px; height:26px; fill:none; stroke:var(--navy); stroke-width:1.5; flex:0 0 auto;
}
#body.esb-shelled .esb-vfoot-sep{
  align-self:stretch; border-left:1px solid var(--line); margin:0 2px;
}
/* 進捗バー（回収率・達成率） */
#body.esb-shelled .esb-vbar{
  height:10px; background-color:var(--soft); margin:0 20px 14px;
}
#body.esb-shelled .esb-vbar > i{display:block; height:100%; background-color:var(--navy);}

/* 右カラムの新パネルは情報量が多いため、ダッシュボードの右カラムを広げる */
#body.esb-shelled .esb-layout-dashboard{grid-template-columns:minmax(0,1fr) 344px;}
/* 見出し・合計・脚注が折り返さないようにする */
#body.esb-shelled .esb-vpanel-head h2{font-size:16px; white-space:nowrap;}
#body.esb-shelled .esb-vpanel-head a{font-size:12px;}
#body.esb-shelled .esb-vtotal-label{white-space:nowrap;}
#body.esb-shelled .esb-vstep{grid-template-columns:34px minmax(0,1fr) auto; gap:12px;}
#body.esb-shelled .esb-vstep-label{font-size:13.5px; line-height:1.45;}
#body.esb-shelled .esb-vstep-value{font-size:16px;}
#body.esb-shelled .esb-vtotal-value{font-size:23px; padding-left:4px;}
@media (max-width:1279px){
  #body.esb-shelled .esb-layout-dashboard{grid-template-columns:1fr;}
}

/* 合計帯：数字を大きく、注記を小さく添える */
#body.esb-shelled .esb-vtotal{grid-template-columns:56px minmax(0,1fr);}
#body.esb-shelled .esb-vtotal-main{
  display:flex; flex-direction:column; align-items:flex-end;
  padding:14px 20px 14px 14px; margin-left:14px;
  border-left:3px solid var(--navy);
}
#body.esb-shelled .esb-vtotal-main .lb{
  align-self:flex-start; font-size:15px; font-weight:700; color:var(--ink); white-space:nowrap;
}
#body.esb-shelled .esb-vtotal-main .vl{
  font-size:28px; font-weight:700; line-height:1.2; color:var(--navy);
  font-variant-numeric:tabular-nums; white-space:nowrap;
}
#body.esb-shelled .esb-vtotal-main .nt{font-size:12px; color:var(--muted); margin-top:2px;}

/* 月別グラフを外したので、中段は2枚並びにする */
#body.esb-shelled .esb-dash-row-2{grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:1279px){
  #body.esb-shelled .esb-dash-row-2{grid-template-columns:1fr;}
}

/* 金額は「億・万」の読みやすい表記を大きく、正確な額を小さく添える */
#body.esb-shelled .esb-vstep-amount{
  display:flex; flex-direction:column; align-items:flex-end; line-height:1.25;
}
#body.esb-shelled .esb-vstep-sub{
  font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap;
}

/* 物件別 投資回収状況は横スクロールさせない。列幅を決めて本文幅に収める */
#body.esb-shelled .esb-invest-table{
  width:100%; min-width:0; table-layout:fixed;
}
#body.esb-shelled .esb-invest-table th,
#body.esb-shelled .esb-invest-table td{
  padding:9px 8px; font-size:12.5px; white-space:normal; word-break:break-all;
}
#body.esb-shelled .esb-invest-table td.num,
#body.esb-shelled .esb-invest-table th{white-space:nowrap;}
#body.esb-shelled .esb-invest-table col,
#body.esb-shelled .esb-invest-table th:nth-child(1){width:19%;}
#body.esb-shelled .esb-invest-table th:nth-child(2),
#body.esb-shelled .esb-invest-table th:nth-child(3),
#body.esb-shelled .esb-invest-table th:nth-child(4),
#body.esb-shelled .esb-invest-table th:nth-child(5),
#body.esb-shelled .esb-invest-table th:nth-child(6){width:11%;}
#body.esb-shelled .esb-invest-table th:nth-child(7){width:7.5%;}
#body.esb-shelled .esb-invest-table th:nth-child(8){width:10%;}
#body.esb-shelled .esb-invest-table th:nth-child(9){width:8.5%;}
/* 物件名は折り返して良いが、途中で切らない */
#body.esb-shelled .esb-invest-table td.esb-name{word-break:normal; overflow-wrap:anywhere;}
#body.esb-shelled .esb-invest-table .esb-rowlink{white-space:normal; text-align:left;}

/* 中段：年間家賃収入 目標達成状況（左に数値・右に月別グラフ） */
#body.esb-shelled .esb-goal-wide{
  display:grid; grid-template-columns:300px minmax(0,1fr); gap:20px; align-items:start;
}
#body.esb-shelled .esb-goal-nums .esb-summary-list{margin:0;}
#body.esb-shelled .esb-goal-chart .esb-chart{margin:0;}
@media (max-width:1279px){
  #body.esb-shelled .esb-goal-wide{grid-template-columns:1fr;}
}

/* 目標達成状況の折れ線グラフ */
#body.esb-shelled .esb-goal-line{padding:6px 4px 0;}
#body.esb-shelled .esb-goal-line .esb-chart-legend{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  font-size:12px; color:var(--muted); margin-bottom:6px;
}
#body.esb-shelled .esb-lg{display:inline-block; width:16px; height:0; margin-right:2px;}
#body.esb-shelled .esb-lg-act{border-top:2.5px solid var(--navy);}
#body.esb-shelled .esb-lg-goal{border-top:2px dashed var(--muted); margin-left:14px;}
#body.esb-shelled .esb-goal-line svg{display:block; width:100%; height:auto;}

/* 中段パネルの高さを右カラムに合わせる（下の余白をなくす） */
#body.esb-shelled .esb-layout-dashboard{align-items:stretch;}
#body.esb-shelled .esb-dash-main{display:flex; flex-direction:column;}
#body.esb-shelled .esb-goal-block{margin-top:14px; flex:1 1 auto; display:flex;}
#body.esb-shelled .esb-goal-block > .esb-panel{flex:1 1 auto; display:flex; flex-direction:column; min-height:0;}
#body.esb-shelled .esb-goal-block .esb-panel-body{flex:1 1 auto; display:flex;}
#body.esb-shelled .esb-goal-block .esb-goal-wide{flex:1 1 auto; align-items:stretch;}
#body.esb-shelled .esb-goal-block .esb-goal-chart{
  display:flex; flex-direction:column; justify-content:center; min-height:0;
}
#body.esb-shelled .esb-goal-block .esb-goal-nums{display:flex; flex-direction:column; justify-content:center;}

/* 対象バーは場所を取らないよう、項目名と値を横に並べて1行に収める */
#body.esb-shelled .esb-target-bar{
  padding:10px 18px; gap:6px 22px; margin-bottom:14px;
}
#body.esb-shelled .esb-target-bar .esb-field-row{
  width:auto; flex:1 1 auto; gap:6px 22px;
}
#body.esb-shelled .esb-target-bar .esb-field{
  flex-direction:row; align-items:center; gap:8px;
}
#body.esb-shelled .esb-target-bar .esb-field > label{
  font-size:12px; white-space:nowrap;
}
#body.esb-shelled .esb-target-bar .esb-field-controls{font-size:14px;}
/* 前月・次月のボタンは小さめに */
#body.esb-shelled .esb-target-bar button{
  height:34px !important; min-height:34px !important; padding:0 14px !important;
}

/* セクションナビで指したセクションを一瞬だけ強調する（画面は動かさない） */
#body.esb-shelled .esb-sec-flash{
  animation:esbSecFlash 1.2s ease-out 1;
}
@keyframes esbSecFlash{
  0%{ box-shadow:0 0 0 3px var(--accent); }
  100%{ box-shadow:0 0 0 3px rgba(11,97,178,0); }
}

/* 登録フォームの行揃え。
   ラベルの行数が違っても入力欄の位置が揃うように、
   ラベルは上・入力欄は下に寄せて、各項目の高さを合わせる。 */
#body.esb-shelled .esb-property-grid{align-items:stretch;}
#body.esb-shelled .esb-property-grid > .esb-field{
  display:flex; flex-direction:column; min-width:0;
}
#body.esb-shelled .esb-property-grid > .esb-field > label{
  min-height:20px; margin-bottom:6px;
}
#body.esb-shelled .esb-property-grid > .esb-field > .esb-field-controls{
  margin-top:auto;
}
/* 入力欄を持たない表示専用の項目も、高さを入力欄に合わせる */
#body.esb-shelled .esb-property-grid > .esb-field-readonly > .esb-field-controls{
  display:flex; align-items:center; min-height:42px;
}
/* 右カラムは1列のリストなので、この行揃えは適用しない */
#body.esb-shelled .esb-form-aside .esb-property-grid > .esb-field{display:grid;}
#body.esb-shelled .esb-form-aside .esb-property-grid > .esb-field > label{
  min-height:0; margin-bottom:0 !important;
}
#body.esb-shelled .esb-form-aside .esb-property-grid > .esb-field > .esb-field-controls{margin-top:0;}

/* 上部の集計カード（平均利回り・総投資金額など）を太字で目立たせる */
#body.esb-shelled .esb-metric-mini{
  padding:16px 18px;
  font-size:13px; font-weight:700; color:var(--muted);
}
#body.esb-shelled .esb-metric-mini b{
  font-size:27px; font-weight:700; margin-top:6px; color:var(--ink); line-height:1.2;
}
#body.esb-shelled .esb-metric-mini b.esb-green{color:var(--green);}
#body.esb-shelled .esb-metric-mini b.esb-red{color:var(--red);}
#body.esb-shelled .esb-metric-mini b.esb-orange{color:var(--orange);}

/* 一覧上部のKPIカードも太字で目立たせる */
#body.esb-shelled .esb-kpi .label{font-size:13px; font-weight:700; color:var(--muted);}
#body.esb-shelled .esb-kpi .value{font-size:28px; font-weight:700; color:var(--ink); line-height:1.2;}
#body.esb-shelled .esb-kpi .value .unit{font-size:14px; font-weight:700; margin-left:4px;}
#body.esb-shelled .esb-kpi .compare{font-size:12px; color:var(--muted);}
#body.esb-shelled .esb-kpi .pending{font-size:20px; font-weight:700; color:var(--muted);}

/* 一覧の数値は太字にする（右寄せのセル＝金額・件数、中央寄せのID・日付） */
#body.esb-shelled #container table.common td.align_right,
#body.esb-shelled #container table.common td.align_center,
#body.esb-shelled .esb-table-wrap td.num,
#body.esb-shelled .esb-invest-table td.num{
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
/* 表の中の入力欄（金額）も太字に */
#body.esb-shelled .esb-form-section-body table.common input[type="text"].align_right{
  font-weight:700;
}

/* 見出し固定の位置。
   一覧表は横スクロール枠（.esb-list-scroll）の中にあり、この枠が
   位置の基準になる。top をトップバーの高さ(62px)にすると、枠の上端から
   62px 下がった位置に見出しが置かれ、上に空白の帯ができてしまう。
   枠の中では 0 にする。 */
#body.esb-shelled .esb-list-scroll table.common.esb-sticky-head > tbody > tr > th,
#body.esb-shelled .esb-table-wrap table.esb-sticky-head > tbody > tr > th{
  top:0;
}

/* ---- 右カラムのパネル（利用者提示のデザインに合わせた調整）---- */
/* 金額の単位（億・万・円）は数字より小さく */
#body.esb-shelled .esb-vpanel .u{font-size:.68em; font-weight:700; margin:0 1px;}

/* 合計帯は白地。ラベルを上、金額を大きく下に置く */
#body.esb-shelled .esb-vtotal{
  background-color:var(--panel);
  border-top:1px solid var(--line-2);
  align-items:stretch;
}
#body.esb-shelled .esb-vtotal-ic{padding:0 16px;}
#body.esb-shelled .esb-vtotal-ic svg{width:30px; height:30px;}
#body.esb-shelled .esb-vtotal-main{
  align-items:flex-start;
  padding:16px 18px 18px 0; margin-left:16px;
  border-left:0;
}
#body.esb-shelled .esb-vtotal-main .lb{font-size:15px; color:var(--ink);}
#body.esb-shelled .esb-vtotal-main .vl{
  font-size:31px; letter-spacing:-.01em; margin-top:2px; color:var(--navy);
}
#body.esb-shelled .esb-vtotal-main .nt{font-size:12px; margin-top:4px;}

/* 明細の数値も大きめに */
#body.esb-shelled .esb-vstep-value{font-size:21px; color:var(--navy);}
#body.esb-shelled .esb-vstep-label{font-size:14px;}
#body.esb-shelled .esb-vstep{padding:14px 0;}

/* 進捗バーと目盛り */
#body.esb-shelled .esb-vbar{
  height:12px; border-radius:2px; overflow:hidden; margin:2px 20px 4px;
}
#body.esb-shelled .esb-vbar > i{border-radius:2px;}
#body.esb-shelled .esb-vbar-scale{
  display:flex; justify-content:space-between;
  margin:0 20px 14px; font-size:12px; color:var(--muted);
}

/* 合計帯は右寄せ（ラベル・金額・注記とも右端に揃える） */
#body.esb-shelled .esb-vtotal-main{align-items:flex-end; text-align:right; padding-right:20px;}
#body.esb-shelled .esb-vtotal-main .lb{align-self:flex-end;}
#body.esb-shelled .esb-vtotal-main .nt{text-align:right;}

/* 明細行は1行に収める（項目名を折り返さず、余白と文字を詰める） */
#body.esb-shelled .esb-vsteps{padding:6px 16px;}
#body.esb-shelled .esb-vstep{grid-template-columns:32px minmax(0,1fr) auto; gap:10px;}
#body.esb-shelled .esb-vstep-no{width:32px; height:32px;}
#body.esb-shelled .esb-vstep-label{white-space:nowrap; font-size:13px;}
#body.esb-shelled .esb-vstep-value{font-size:18px; white-space:nowrap;}
#body.esb-shelled .esb-vstep:not(:last-child)::before{left:15px;}

/* 目標達成状況の脚注は2段で表示する */
#body.esb-shelled .esb-goal-note{margin-top:6px; line-height:1.5;}
#body.esb-shelled .esb-goal-note + .esb-goal-note{margin-top:2px;}

/* 目標達成状況の脚注を大きく。2段目（先行・遅れ）はさらに目立たせる */
#body.esb-shelled .esb-goal-note{font-size:13px; color:var(--muted); margin-top:10px;}
#body.esb-shelled .esb-goal-note + .esb-goal-note{
  margin-top:4px; font-size:19px; font-weight:700;
}
#body.esb-shelled .esb-goal-note + .esb-goal-note b{font-size:inherit; font-weight:700;}

/* 明細行：項目名と金額が接触しないよう文字を詰める */
#body.esb-shelled .esb-vstep-label{font-size:12.5px;}
#body.esb-shelled .esb-vstep-value{font-size:17px;}

/* 項目名を短くしたので、明細の文字は読みやすい大きさに戻す */
#body.esb-shelled .esb-vstep-label{font-size:13.5px;}
#body.esb-shelled .esb-vstep-value{font-size:19px;}

/* 3つの合計金額は必ず同じ大きさ・同じ右端に揃える。
   桁数が違っても縮んだり折り返したりしないよう固定する。 */
#body.esb-shelled .esb-vtotal-main{min-width:0;}
#body.esb-shelled .esb-vtotal-main .vl{
  font-size:29px !important;
  line-height:1.2;
  white-space:nowrap;
  text-align:right;
  align-self:flex-end;
  font-variant-numeric:tabular-nums;
}
#body.esb-shelled .esb-vtotal-main .lb,
#body.esb-shelled .esb-vtotal-main .nt{align-self:flex-end; text-align:right;}

/* ラベルを外したぶん、合計金額をさらに大きく */
#body.esb-shelled .esb-vtotal-main .vl{font-size:40px !important;}
#body.esb-shelled .esb-vtotal-main{padding-top:18px; padding-bottom:18px;}


/* ==========================================================================
   16. 営繕登録・履歴 — 入力欄のグリッド
   見本画像に合わせて「工事名・工事金額・取引先名」を十分広く取る。
   幅が足りないときは折り返す（サイドバーがあると1段に5項目は入らない）。
   ========================================================================== */
#body.esb-shelled .esb-rf-host{container-type:inline-size; container-name:rfmain;}

#body.esb-shelled .esb-repair-form .esb-rf-r1,
#body.esb-shelled .esb-repair-form .esb-rf-r2{
  display:grid; gap:16px; align-items:start; margin-bottom:16px;
}
#body.esb-shelled .esb-repair-form .esb-rf-r2{margin-bottom:0;}

/* 狭いとき */
#body.esb-shelled .esb-repair-form .esb-rf-r1{
  grid-template-columns:110px repeat(3, minmax(140px, 1fr));
}
#body.esb-shelled .esb-repair-form .esb-rf-supplier-name{grid-column:1 / -1;}
#body.esb-shelled .esb-repair-form .esb-rf-r2{
  grid-template-columns:minmax(320px, 1.3fr) minmax(260px, 1fr);
}
#body.esb-shelled .esb-repair-form .esb-rf-comment{grid-column:1 / -1;}

/* 幅が取れるときは見本画像どおりの1段組み */
@container rfmain (min-width: 1020px){
  #body.esb-shelled .esb-repair-form .esb-rf-r1{
    grid-template-columns:140px minmax(170px,1fr) minmax(170px,1fr) 160px minmax(300px,2fr);
  }
  #body.esb-shelled .esb-repair-form .esb-rf-supplier-name{grid-column:auto;}
  #body.esb-shelled .esb-repair-form .esb-rf-r2{
    grid-template-columns:minmax(320px,1.2fr) minmax(280px,1fr) minmax(420px,1.7fr);
  }
  #body.esb-shelled .esb-repair-form .esb-rf-comment{grid-column:auto;}
}

/* 汎用の「textarea は2列ぶん」を、この画面では効かせない */
#body.esb-shelled .esb-repair-form .esb-field-row .esb-field:has(textarea){grid-column:1 / -1;}
@container rfmain (min-width: 1020px){
  #body.esb-shelled .esb-repair-form .esb-field-row .esb-field:has(textarea){grid-column:auto;}
}

/* 入力欄の高さと余白（見本の指定どおり） */
#body.esb-shelled .esb-repair-form .esb-field > label{margin-bottom:7px; display:block;}
#body.esb-shelled .esb-repair-form input[type="text"],
#body.esb-shelled .esb-repair-form select{height:40px; padding:0 12px;}
#body.esb-shelled .esb-repair-form textarea{min-height:84px; padding:8px 12px;}
#body.esb-shelled .esb-repair-form .esb-field-controls{align-items:flex-start;}

/* 工事金額は数字を読みやすく右寄せのまま、チェックは真下に置く */
#body.esb-shelled .esb-repair-form .esb-rf-repair-construction-amount .esb-field-controls{
  flex-wrap:wrap;
}
#body.esb-shelled .esb-repair-form .esb-rf-exclude{
  flex:1 1 100%; margin:8px 0 0; padding:0; list-style:none; background:none; border:0;
}
#body.esb-shelled .esb-repair-form .esb-rf-exclude label{
  display:inline-flex; align-items:center; gap:6px;
  font-size:13px; color:var(--muted); font-weight:400; margin:0; cursor:pointer;
}

/* 入出金ID：値が無いときの「未登録」を淡い赤のバッジにする */
#body.esb-shelled .esb-repair-form .esb-rf-cash-flow-id .esb-field-controls{
  min-height:40px; display:flex; align-items:center;
}
#body.esb-shelled .esb-repair-form .esb-rf-cash-flow-id em{
  display:inline-block; padding:4px 10px; font-style:normal; font-size:13px; font-weight:700;
  color:var(--danger, var(--red)); background:var(--red-bg); border:1px solid #f2d3d3; border-radius:2px;
}


/* ==========================================================================
   17. 請求書PDF管理（営繕登録・履歴）
   ========================================================================== */
#body.esb-shelled .esb-pdf-section{margin-top:18px;}
#body.esb-shelled .esb-pdf-title{margin-bottom:2px;}
#body.esb-shelled .esb-pdf-lead{
  margin:0 0 14px; font-size:12px; color:var(--muted);
}
#body.esb-shelled .esb-pdf-body{
  display:grid; grid-template-columns:270px minmax(0,1fr); gap:20px; align-items:start;
}

/* --- アップロード領域 --- */
#body.esb-shelled .esb-pdf-drop{
  min-height:160px; padding:16px 14px; text-align:center;
  border:1px dashed var(--line-2); background:#fbfcfe; border-radius:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
}
#body.esb-shelled .esb-pdf-drop.is-over{border-color:var(--navy); background:#f2f6fc;}
#body.esb-shelled .esb-pdf-drop-icon{color:var(--navy); line-height:0; margin-bottom:4px;}
#body.esb-shelled .esb-pdf-drop-title{margin:0; font-size:14px; font-weight:700; color:var(--ink);}
#body.esb-shelled .esb-pdf-drop-note{margin:4px 0 8px; font-size:12px; color:var(--muted); line-height:1.6;}
#body.esb-shelled .esb-pdf-pick{
  height:34px; padding:0 18px; border:0; border-radius:2px; cursor:pointer;
  background:var(--navy); color:#fff; font-size:13px; font-weight:700;
}
#body.esb-shelled .esb-pdf-pick:hover{background:var(--navy-2, #052b59);}
#body.esb-shelled .esb-pdf-input{display:none;}
#body.esb-shelled .esb-pdf-limit{margin:10px 0 0; font-size:11px; color:var(--muted);}
#body.esb-shelled .esb-pdf-msg{margin:8px 0 0; font-size:12px; min-height:1em; line-height:1.5;}
#body.esb-shelled .esb-pdf-msg.is-err{color:var(--red);}
#body.esb-shelled .esb-pdf-msg.is-ok{color:var(--navy);}
#body.esb-shelled .esb-pdf-msg em{font-style:normal; font-weight:700;}

/* --- 一覧 --- */
#body.esb-shelled #container table.common.esb-pdf-table{width:100%; border-collapse:collapse; background:#fff;}
#body.esb-shelled #container table.common.esb-pdf-table > thead > tr > th{
  background:var(--navy) !important; color:#fff !important; font-size:12px; font-weight:700;
  text-align:center; padding:9px 10px; border:1px solid var(--navy); white-space:nowrap;
}
#body.esb-shelled #container table.common.esb-pdf-table > tbody > tr > td{
  height:40px; padding:6px 10px; font-size:13px; color:var(--ink);
  border:1px solid var(--line); background:#fff;
}
#body.esb-shelled #container table.common.esb-pdf-table > tbody > tr:hover > td{background:#f5f8fc;}
#body.esb-shelled .esb-pdf-badge{
  display:inline-block; margin-right:7px; padding:1px 5px; border-radius:2px;
  background:var(--red-bg); color:var(--red); font-size:10px; font-weight:700; vertical-align:1px;
}
#body.esb-shelled .esb-pdf-dir{color:var(--muted); font-size:12px;}
#body.esb-shelled .esb-pdf-empty{
  text-align:center; color:var(--muted); font-size:13px; line-height:1.8; padding:26px 10px;
}
#body.esb-shelled .esb-pdf-ops{text-align:center; white-space:nowrap;}
#body.esb-shelled .esb-pdf-op{
  width:28px; height:28px; padding:0; border:0; background:none; cursor:pointer;
  color:var(--muted); border-radius:2px; vertical-align:middle;
}
#body.esb-shelled .esb-pdf-op:hover{background:#e8eef7; color:var(--navy);}
#body.esb-shelled .esb-pdf-op svg{fill:currentColor;}
#body.esb-shelled .esb-pdf-more-wrap{text-align:center; padding:8px 0 0;}
#body.esb-shelled .esb-pdf-showall{
  border:0; background:none; cursor:pointer; color:var(--navy);
  font-size:12px; font-weight:700; padding:4px 10px;
}
#body.esb-shelled .esb-pdf-showall:hover{text-decoration:underline;}
#body.esb-shelled .esb-pdf-chev{margin-left:6px;}

/* --- 縦3点メニュー --- */
.esb-pdf-menu{
  position:absolute; z-index:9000; min-width:160px; padding:4px 0;
  background:#fff; border:1px solid var(--line-2); box-shadow:0 4px 14px rgba(16,35,63,.14);
}
.esb-pdf-menu button{
  display:block; width:100%; padding:8px 14px; border:0; background:none; cursor:pointer;
  text-align:left; font-size:13px; color:var(--ink);
  font-family:var(--esb-font);
}
.esb-pdf-menu button:hover{background:#f2f6fc;}
.esb-pdf-menu button.is-danger{color:var(--red);}

/* 狭いときは縦に並べる */
@container rfmain (max-width: 900px){
  #body.esb-shelled .esb-pdf-body{grid-template-columns:minmax(0,1fr);}
  #body.esb-shelled .esb-pdf-drop{max-width:none;}
}

/* カードの内側に余白を入れる（他のセクションと揃える） */
#body.esb-shelled .esb-pdf-section{padding:16px 18px;}
#body.esb-shelled .esb-pdf-section > .esb-pdf-title{
  margin:0 0 2px; padding:0; font-size:15px; font-weight:700; color:var(--ink);
}
/* 一覧が枠より広いときだけ、その枠の中で横に送る */
#body.esb-shelled .esb-pdf-list .esb-table-wrap{overflow-x:auto; max-width:100%;}
#body.esb-shelled #container table.common.esb-pdf-table{min-width:600px;}

/* 枠に収まるように詰める（横に送らずに全列を見せる） */
#body.esb-shelled #container table.common.esb-pdf-table{min-width:0; table-layout:fixed;}
#body.esb-shelled #container table.common.esb-pdf-table > thead > tr > th,
#body.esb-shelled #container table.common.esb-pdf-table > tbody > tr > td{padding:6px 8px;}
#body.esb-shelled .esb-pdf-table th:nth-child(1), #body.esb-shelled .esb-pdf-table td:nth-child(1){width:88px;}
#body.esb-shelled .esb-pdf-table th:nth-child(2), #body.esb-shelled .esb-pdf-table td:nth-child(2){width:auto;}
#body.esb-shelled .esb-pdf-table th:nth-child(4), #body.esb-shelled .esb-pdf-table td:nth-child(4){width:76px;}
#body.esb-shelled .esb-pdf-table th:nth-child(5), #body.esb-shelled .esb-pdf-table td:nth-child(5){width:104px;}
#body.esb-shelled .esb-pdf-table th:nth-child(6), #body.esb-shelled .esb-pdf-table td:nth-child(6){width:72px;}
/* 取引先名・請求書名は省略せず折り返す */
#body.esb-shelled .esb-pdf-table td:nth-child(2),
#body.esb-shelled .esb-pdf-table td:nth-child(3){white-space:normal; word-break:break-all;}
#body.esb-shelled .esb-pdf-dir{font-size:11px; white-space:normal; word-break:break-all;}

/* 一覧が空のときの案内 */
#body.esb-shelled .esb-empty-box{text-align:center; padding:26px 16px;}
#body.esb-shelled .esb-empty-icon{color:#c3cddb; line-height:0; margin-bottom:10px;}
#body.esb-shelled .esb-empty-box > p{margin:0; font-size:13px; line-height:1.9;}
#body.esb-shelled .esb-empty-note{color:var(--muted); font-size:12px !important;}

/* 今年の賃料予測値 */
#body.esb-shelled .esb-lg-fc{border-top:2px dashed var(--accent); margin-left:14px;}
#body.esb-shelled .esb-forecast-row > b{color:var(--accent);}
#body.esb-shelled .esb-forecast-diff{margin-top:-2px;}

/* ==========================================================================
   18. 送金のご案内PDFからの読み取り（家賃登録・編集）
   ========================================================================== */
#body.esb-shelled .esb-ocr-section{margin-top:18px; padding:16px 18px;}
#body.esb-shelled .esb-ocr-title{margin:0 0 2px; padding:0; font-size:15px; font-weight:700; color:var(--ink);}
#body.esb-shelled .esb-ocr-lead{margin:0 0 14px; font-size:12px; color:var(--muted); line-height:1.7;}
#body.esb-shelled .esb-ocr-body{display:grid; grid-template-columns:240px minmax(0,1fr); gap:18px; align-items:start;}
@container rfmain (max-width: 900px){
  #body.esb-shelled .esb-ocr-body{grid-template-columns:minmax(0,1fr);}
}

#body.esb-shelled .esb-ocr-drop{
  min-height:150px; padding:16px 14px; text-align:center;
  border:1px dashed var(--line-2); background:#fbfcfe;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
}
#body.esb-shelled .esb-ocr-drop.is-over{border-color:var(--navy); background:#f2f6fc;}
#body.esb-shelled .esb-ocr-drop-title{margin:0; font-size:14px; font-weight:700; color:var(--ink);}
#body.esb-shelled .esb-ocr-drop-note{margin:4px 0 8px; font-size:12px; color:var(--muted); line-height:1.6;}
#body.esb-shelled .esb-ocr-pick{
  height:34px; padding:0 18px; border:0; border-radius:2px; cursor:pointer;
  background:var(--navy); color:#fff; font-size:13px; font-weight:700;
}
#body.esb-shelled .esb-ocr-input{display:none;}
#body.esb-shelled .esb-ocr-limit{margin:10px 0 0; font-size:11px; color:var(--muted);}

#body.esb-shelled .esb-ocr-panel{
  border:1px solid var(--line); background:#fff; padding:14px; min-height:150px;
}
#body.esb-shelled .esb-ocr-idle{margin:0; font-size:13px; color:var(--muted);}
#body.esb-shelled .esb-ocr-pager{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px;}
#body.esb-shelled .esb-ocr-nav{
  height:32px; padding:0 12px; border:1px solid var(--navy); background:#fff;
  color:var(--navy); font-size:12px; cursor:pointer; border-radius:2px;
}
#body.esb-shelled .esb-ocr-nav:hover{background:#f2f6fc;}
#body.esb-shelled .esb-ocr-pageno{font-size:12px; color:var(--muted);}
#body.esb-shelled .esb-ocr-pageno b{color:var(--ink); font-size:14px;}
#body.esb-shelled .esb-ocr-jump{width:70px !important; height:32px !important; text-align:center;}
#body.esb-shelled .esb-ocr-read{
  height:32px; padding:0 16px; border:0; background:var(--navy); color:#fff;
  font-size:12px; font-weight:700; cursor:pointer; border-radius:2px; margin-left:auto;
}
#body.esb-shelled .esb-ocr-read:disabled{background:var(--muted); cursor:default;}
#body.esb-shelled .esb-ocr-preview{background:#f5f7fa; padding:8px; text-align:center; overflow:auto; max-height:420px;}
#body.esb-shelled .esb-ocr-canvas{max-width:100%; height:auto; border:1px solid var(--line-2); background:#fff;}
#body.esb-shelled .esb-ocr-loading{font-size:12px; color:var(--muted);}

#body.esb-shelled .esb-ocr-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px;}
#body.esb-shelled .esb-ocr-badge{
  background:var(--navy); color:#fff; font-size:11px; font-weight:700; padding:3px 8px; border-radius:2px;
}
#body.esb-shelled .esb-ocr-head b{font-size:15px; color:var(--ink);}
#body.esb-shelled .esb-ocr-unknown{color:var(--muted) !important; font-weight:400 !important;}
#body.esb-shelled .esb-ocr-sub{font-size:12px; color:var(--muted);}

#body.esb-shelled .esb-ocr-sec{margin-bottom:14px;}
#body.esb-shelled .esb-ocr-sec-head{
  font-size:13px; font-weight:700; color:var(--ink); margin-bottom:6px;
  display:flex; align-items:center; gap:8px;
}
#body.esb-shelled .esb-ocr-ok{font-size:11px; font-weight:700; color:var(--green); background:var(--green-bg); padding:2px 8px; border-radius:2px;}
#body.esb-shelled .esb-ocr-ng{font-size:11px; font-weight:700; color:var(--red); background:var(--red-bg); padding:2px 8px; border-radius:2px;}
#body.esb-shelled table.esb-ocr-table{width:100%; border-collapse:collapse; background:#fff;}
#body.esb-shelled table.esb-ocr-table th,
#body.esb-shelled table.esb-ocr-table td{
  border:1px solid var(--line); padding:6px 10px; font-size:13px; height:34px;
}
#body.esb-shelled table.esb-ocr-table thead th{background:var(--table-head); font-size:12px;}
#body.esb-shelled table.esb-ocr-table tbody th{background:#fafbfd; text-align:left; font-weight:400; width:40%;}
#body.esb-shelled table.esb-ocr-table td{text-align:right; font-variant-numeric:tabular-nums; font-weight:700;}
#body.esb-shelled table.esb-ocr-table td.esb-ocr-to{text-align:left; font-weight:400; color:var(--muted); font-size:12px;}
#body.esb-shelled .esb-ocr-none,
#body.esb-shelled .esb-ocr-cand{margin:4px 0 0; font-size:12px; color:var(--muted);}

#body.esb-shelled .esb-ocr-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px;}
#body.esb-shelled .esb-ocr-apply{
  height:38px; padding:0 20px; border:0; background:var(--navy); color:#fff;
  font-size:13px; font-weight:700; cursor:pointer; border-radius:2px;
}
#body.esb-shelled .esb-ocr-apply:disabled{background:var(--muted); cursor:default;}
#body.esb-shelled .esb-ocr-warn{font-size:12px; color:var(--red);}
#body.esb-shelled .esb-ocr-msg{margin:10px 0 0; font-size:12px; min-height:1em; line-height:1.6;}
#body.esb-shelled .esb-ocr-msg.is-err{color:var(--red);}
#body.esb-shelled .esb-ocr-msg.is-ok{color:var(--navy);}
#body.esb-shelled .esb-ocr-msg em{font-style:normal; font-weight:700;}

/* 読み取りで入った欄は色を付けて分かるようにする */
#body.esb-shelled #container input.esb-ocr-filled{background:#fffbe6 !important; border-color:#e0c86a !important;}
/* 小計との差額から算出した値の印 */
#body.esb-shelled .esb-ocr-derived{
  display:inline-block; margin-left:6px; padding:1px 6px; border-radius:2px;
  background:#fff4d6; color:#8a6a12; font-size:10px; font-weight:700; vertical-align:1px;
}
/* 確認画面で項目名を直せるようにする */
#body.esb-shelled #container input.esb-ocr-name{
  width:100% !important; height:30px !important; font-size:13px; padding:0 8px !important;
  background:#fff !important; border:1px solid var(--line-2) !important;
}
#body.esb-shelled #container input.esb-ocr-name:placeholder-shown{background:#fffbe6 !important;}
/* 明細の件数を指定する欄 */
#body.esb-shelled .esb-ocr-count{
  margin-left:auto; display:inline-flex; align-items:center; gap:6px;
  font-size:11px; font-weight:400; color:var(--muted);
}
#body.esb-shelled #container select.esb-ocr-n{
  height:28px !important; width:auto !important; min-width:66px; font-size:12px; padding:0 6px !important;
}
#body.esb-shelled .esb-ocr-hint{font-style:normal; color:var(--muted); font-size:11px;}

/* ==========================================================================
   19. 部屋・区画一覧（入居状況）
   ========================================================================== */
#body.esb-shelled .esb-room-kpi{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:10px; margin:14px 0 16px;
}
/* 旧いKPIカードの定義は、完成見本に合わせた定義（下方）へ一本化した */
#body.esb-shelled .esb-room-kpi-item.is-warn{border-left-color:var(--red);}
#body.esb-shelled .esb-room-kpi-item .lb{font-size:11px; color:var(--muted);}
#body.esb-shelled .esb-room-kpi-item .vl{
  font-size:18px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums;
}
#body.esb-shelled .esb-room-kpi-item.is-warn .vl{color:var(--red);}

#body.esb-shelled #container table.common.esb-room-table{width:100%; border-collapse:collapse; background:#fff;}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th{
  background:var(--navy) !important; color:#fff !important;
  font-size:12px; font-weight:700; text-align:center; padding:8px 6px; white-space:nowrap;
}
#body.esb-shelled #container table.common.esb-room-table > tbody > tr > td{
  border:1px solid var(--line); padding:4px 6px; background:#fff;
}
#body.esb-shelled #container table.common.esb-room-table input[type="text"],
#body.esb-shelled #container table.common.esb-room-table select{
  width:100% !important; height:32px !important; font-size:13px; padding:0 6px !important;
}
#body.esb-shelled .esb-room-empty{
  text-align:center; color:var(--muted); font-size:13px; line-height:1.9; padding:26px 10px;
}
#body.esb-shelled .esb-room-del{
  height:28px; padding:0 10px; border:1px solid var(--line-2); background:#fff;
  color:var(--red); font-size:12px; cursor:pointer; border-radius:2px;
}
#body.esb-shelled .esb-room-del:hover{background:var(--red-bg);}

/* 部屋・区画一覧のPDF読み取り */
#body.esb-shelled .esb-room-msg{margin:12px 0; font-size:13px; line-height:1.7;}
#body.esb-shelled .esb-room-msg.is-err{color:var(--red);}
#body.esb-shelled .esb-room-msg.is-ok{color:var(--navy);}
#body.esb-shelled .esb-room-pdf{
  border:1px solid var(--line); background:#fff; padding:14px 16px; margin:12px 0 16px;
}
#body.esb-shelled .esb-room-pdf-head{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  font-size:14px; font-weight:700; color:var(--ink); margin-bottom:10px;
}
#body.esb-shelled .esb-room-hint{font-size:11px; font-weight:400; color:var(--muted);}
#body.esb-shelled .esb-room-vac{
  display:inline-block; padding:2px 8px; border-radius:2px;
  background:var(--red-bg); color:var(--red); font-size:11px; font-weight:700;
}
#body.esb-shelled .esb-room-pdf-act{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px;
}
#body.esb-shelled #container .esb-room-pdf input.pd{
  width:100% !important; height:30px !important; font-size:13px; padding:0 8px !important;
}

/* 部屋・区画一覧 — 月別表示の備考欄。
   解約予定・新規契約などの短い注記が入る。折り返して読めるようにする。 */
#body.esb-shelled .esb-room-table .esb-room-note{
  font-size:12px; color:var(--muted); white-space:normal; line-height:1.5; max-width:280px;
}
#body.esb-shelled .esb-room-table tfoot td{
  font-weight:700; background:var(--surface-2, #f4f7fa); border-top:2px solid var(--line);
}

/* 部屋・区画一覧 — 年月の前後送り。
   選択肢は新しい月から並ぶため、‹ が前の月、› が次の月。 */
/* 高さは決め打ちにせず、隣のセレクトに合わせて伸ばす。
   決め打ちにすると、文字の大きさや画面幅が変わったときに揃わなくなる。
   なお、この td は proto_ui.js が .esb-field-controls へ組み替えるため、
   そちらにも同じ指定を当てる。 */
#body.esb-shelled .esb-ym-cell{ display:flex; align-items:stretch; gap:4px; }
#body.esb-shelled .esb-ym-cell select{ align-self:stretch; }
/* 抽出条件の中のボタンは 36px に決められている（.esb-filter-grid ... button）。
   年月の送りボタンは隣のセレクトと高さを揃えたいので、指定を強めて上書きする。 */
#body.esb-shelled .esb-ym-cell .esb-ym-btn,
#body.esb-shelled .esb-filter-grid .esb-field-controls .esb-ym-btn,
#body.esb-shelled .esb-field-controls .esb-ym-btn{
  width:32px; flex:0 0 32px; padding:0;
  align-self:stretch; height:auto; min-height:0;
  border:1px solid var(--line); border-radius:2px; background:#fff;
  color:var(--ink); font-size:17px; line-height:1; cursor:pointer;
}
#body.esb-shelled .esb-ym-btn:hover:not(:disabled){ background:var(--surface-2, #f4f7fa); }
#body.esb-shelled .esb-ym-btn:disabled{ opacity:.35; cursor:default; }

/* ============================================================
   部屋・区画一覧 — 完成見本に合わせた見た目
   （配置・寸法・色は利用者から提示された見本に合わせている）
   ============================================================ */
#body.esb-shelled{
  --rm-navy-900:#052F61; --rm-navy-800:#063B73; --rm-navy-700:#0B4B8F;
  --rm-border:#DCE3EC; --rm-text:#17385F; --rm-sub:#687789;
  --rm-ok:#1E9B5A; --rm-ok-bg:#DDF5E7; --rm-ok-line:#BDEACF;
  --rm-ng:#E44842; --rm-ng-bg:#FDE8E6; --rm-ng-line:#F7C9C5;
}

/* ---- KPIカード（7枚を1列） ---- */
#body.esb-shelled .esb-room-kpi{
  display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:16px; margin:16px 0 18px;
}
#body.esb-shelled .esb-room-kpi-item{
  display:flex; align-items:center; gap:12px;
  min-height:80px; height:80px; padding:0 16px;
  background:#fff; border:1px solid var(--rm-border); border-left:4px solid var(--rm-navy-700);
  border-radius:2px; box-shadow:0 2px 8px rgba(17,50,88,.05);
}
#body.esb-shelled .esb-room-kpi-item .ic{ flex:0 0 26px; color:var(--rm-navy-700); }
#body.esb-shelled .esb-room-kpi-item .ic svg{ width:26px; height:26px; display:block; }
#body.esb-shelled .esb-room-kpi-item .tx{ display:flex; flex-direction:column; gap:2px; min-width:0; }
#body.esb-shelled .esb-room-kpi-item .lb{ font-size:12px; color:var(--rm-sub); line-height:1.3; }
#body.esb-shelled .esb-room-kpi-item .vl{
  font-size:21px; font-weight:700; color:#062E60; line-height:1.2; white-space:nowrap;
}
/* 空室だけ赤 */
#body.esb-shelled .esb-room-kpi-item.is-warn{ border-left-color:var(--rm-ng); }
#body.esb-shelled .esb-room-kpi-item.is-warn .ic{ color:var(--rm-ng); }
#body.esb-shelled .esb-room-kpi-item.is-warn .vl{ color:var(--rm-ng); }

/* ---- 一覧テーブル ---- */
#body.esb-shelled #container table.common.esb-room-table{
  width:100%; border-collapse:collapse; background:#fff;
  border:1px solid var(--rm-border); border-radius:2px; overflow:hidden;
  font-size:13.5px; color:var(--rm-text);
}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th{
  /* 旧定義が !important で色を決めているため、こちらも同じ強さで上書きする */
  height:46px; padding:0 12px; background:var(--rm-navy-800) !important; color:#fff !important;
  font-weight:700; font-size:13.5px; text-align:left; border:0; white-space:nowrap;
}
#body.esb-shelled #container table.common.esb-room-table > tbody > tr > td{
  height:50px; padding:0 12px; border-top:1px solid #DFE5ED; color:var(--rm-text);
}
#body.esb-shelled #container table.common.esb-room-table > tfoot > tr > td{ height:46px; padding:0 12px; }
/* 列幅（見本の目安） */
#body.esb-shelled .esb-room-table col.c-no{width:8%}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(1){width:8%}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(2){width:8%}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(3){width:15%}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(4){width:8%; text-align:center}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(5),
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(6),
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(7){width:11%; text-align:right}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(8),
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(9){width:12%; text-align:center}
#body.esb-shelled #container table.common.esb-room-table > thead > tr > th:nth-child(10){width:6%; text-align:center}

/* ---- 表の中の入力欄は、枠を消して一覧に見せる ---- */
#body.esb-shelled #container table.common.esb-room-table input[type="text"]{
  width:100%; height:34px; padding:0 8px; background:#fff;
  border:1px solid transparent; border-radius:2px; box-shadow:none;
  color:var(--rm-text); font-size:13.5px;
}
#body.esb-shelled #container table.common.esb-room-table input[type="text"]:hover{ border-color:#E7ECF3; }
#body.esb-shelled #container table.common.esb-room-table input[type="text"]:focus{
  border-color:var(--rm-navy-700); outline:none;
}
#body.esb-shelled #container table.common.esb-room-table input.align_right{ text-align:right; }
#body.esb-shelled #container table.common.esb-room-table input.align_center{ text-align:center; }
#body.esb-shelled #container table.common.esb-room-table select.rm{
  height:34px; border:1px solid transparent; background:#fff; color:var(--rm-text); font-size:13.5px;
}
#body.esb-shelled #container table.common.esb-room-table select.rm:focus{ border-color:var(--rm-navy-700); }

/* ---- 状態（入居中／空室）はラベルに見せる。実体はセレクトのまま ---- */
#body.esb-shelled .esb-td-state{ text-align:center; }
#body.esb-shelled #container table.common.esb-room-table select.esb-state-sel{
  display:inline-block; width:auto; min-width:74px; height:26px; padding:0 22px 0 10px;
  border-radius:2px; font-size:12.5px; font-weight:700; text-align:center;
  -webkit-appearance:none; appearance:none; cursor:pointer;
  background-repeat:no-repeat; background-position:right 6px center; background-size:9px;
}
#body.esb-shelled #container table.common.esb-room-table select.esb-state-sel.is-in{
  background-color:var(--rm-ok-bg); border:1px solid var(--rm-ok-line); color:var(--rm-ok);
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E9B5A' stroke-width='1.8'/%3E%3C/svg%3E");
}
#body.esb-shelled #container table.common.esb-room-table select.esb-state-sel.is-vac{
  background-color:var(--rm-ng-bg); border:1px solid var(--rm-ng-line); color:var(--rm-ng);
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23E44842' stroke-width='1.8'/%3E%3C/svg%3E");
}

/* ---- 削除ボタン ---- */
#body.esb-shelled .esb-room-del{
  height:30px; padding:0 14px; background:#fff;
  border:1px solid #F08B85; border-radius:2px; color:#E24A44;
  font-size:12.5px; font-weight:700; cursor:pointer;
}
#body.esb-shelled .esb-room-del:hover{ background:var(--rm-ng-bg); }

/* ---- iPad横向き（1024px前後） ---- */
@media (max-width: 1280px){
  #body.esb-shelled .esb-room-kpi{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  #body.esb-shelled .esb-room-kpi{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
/* 表は横スクロールで逃がす（文字を小さくしない） */
#body.esb-shelled .esb-table-wrap{ overflow-x:auto; }
#body.esb-shelled .esb-table-wrap > table.esb-room-table{ min-width:980px; }

/* ------------------------------------------------------------
   見出し行の並び（見本に合わせる）
   タイトル ／ 抽出条件パネル ／ 操作ボタン を1行に置き、高さを揃える。
   これまでは折り返して2段になり、パネルとボタンの高さも合っていなかった。
   ------------------------------------------------------------ */
#body.esb-shelled .esb-pagehead.esb-pagehead-inline{
  display:flex; flex-wrap:nowrap; align-items:center; gap:20px;
}
#body.esb-shelled .esb-pagehead-inline .esb-filter-inhead{
  flex:1 1 auto; min-width:0; margin:0;
}
/* 3つの選択欄は必ず1行に並べる */
#body.esb-shelled .esb-pagehead-inline .esb-filter-inhead .esb-filter-grid{
  flex-wrap:nowrap; align-items:end; gap:16px;
}
#body.esb-shelled .esb-pagehead-inline .esb-filter-inhead .esb-filter-grid > .esb-field{
  flex:1 1 0; min-width:0;
}
/* 操作ボタンは折り返さず、入力欄と同じ高さに */
#body.esb-shelled .esb-pagehead-inline .esb-head-actions{
  flex:0 0 auto; display:flex; align-items:center; gap:12px; margin:0;
}
#body.esb-shelled .esb-pagehead-inline .esb-head-actions button{
  /* 既存の height/min-height/padding が !important のため、同じ強さで上書きする */
  height:42px !important; min-height:42px !important;
  padding:0 18px !important; border-radius:2px; white-space:nowrap;
}

/* 幅が足りなくなったら段を分ける（詰め込んで潰さない） */
@media (max-width: 1400px){
  #body.esb-shelled .esb-pagehead.esb-pagehead-inline{ flex-wrap:wrap; align-items:flex-start; }
  #body.esb-shelled .esb-pagehead-inline .esb-filter-inhead{ flex:1 1 100%; order:2; }
  #body.esb-shelled .esb-pagehead-inline .esb-head-actions{ order:3; }
}

/* ------------------------------------------------------------
   ダッシュボード「年間家賃収入 目標達成状況」の注記
   見本では、目標に届かない見込みの行だけ薄い赤の枠で囲まれている。
   ------------------------------------------------------------ */
#body.esb-shelled .esb-goal-nums .esb-forecast-diff{
  margin-top:8px; padding:10px 14px; border-radius:2px;
  background:#FDECEA; border:1px solid #F6C9C5;
  font-size:16px; line-height:1.4;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff b{
  font-size:16px; font-weight:700; white-space:nowrap;
}
/* 目標を上回るときは緑の枠にする（意味に合わせて色を変える） */
#body.esb-shelled .esb-goal-nums .esb-forecast-diff.is-good,
#body.esb-shelled .esb-goal-nums .esb-forecast-diff:has(b[style*="green"]){
  background:#E9F7EF; border-color:#BFE6CF;
}

/* サイドバー下部の会社名・利用者名（見本に合わせる） */
#body.esb-shelled .esb-nav-owner{
  padding:14px 18px 6px; color:#fff; line-height:1.5;
}
#body.esb-shelled .esb-nav-owner-co{ font-size:13px; font-weight:700; }
#body.esb-shelled .esb-nav-owner-nm{ font-size:12px; opacity:.85; margin-top:2px; }

/* 月別が空のときに出す「部屋マスタから作成」 */
#body.esb-shelled .esb-room-gen{
  display:inline-block; margin:10px 0 6px; height:38px; padding:0 18px;
  background:var(--navy); border:1px solid var(--navy); border-radius:2px;
  color:#fff; font-size:13.5px; font-weight:700; cursor:pointer;
}
#body.esb-shelled .esb-room-gen:hover:not(:disabled){ background:var(--navy-2); }
#body.esb-shelled .esb-room-gen:disabled{ opacity:.5; cursor:default; }
#body.esb-shelled .esb-room-gen-note{
  display:block; font-size:12px; color:var(--rm-sub, #687789); line-height:1.6;
}

/* ===== 部屋・区画一覧：経過日数と合計行 ===== */
/* 入居してからの日数／空室になってからの日数。
   上段に「入居／空室」、下段に日数を出す。行の高さ(50px)は変えない。 */
#body.esb-shelled .esb-room-table td.esb-elapsed{
  padding:4px 8px; line-height:1.25; white-space:nowrap;
}
#body.esb-shelled .esb-room-table td.esb-elapsed .lb{
  display:block; font-size:10px; font-weight:700; letter-spacing:.04em;
}
#body.esb-shelled .esb-room-table td.esb-elapsed .vl{
  display:block; font-size:11px; color:var(--rm-ink-600,#4b5563);
}
#body.esb-shelled .esb-room-table td.esb-elapsed.is-in  .lb{ color:var(--green); }
#body.esb-shelled .esb-room-table td.esb-elapsed.is-vac .lb{ color:#b45309; }
#body.esb-shelled .esb-room-table td.esb-elapsed.is-none{ color:#9ca3af; }

/* 合計行。表の下端に固定の帯として出す */
#body.esb-shelled .esb-room-table tfoot td{
  background:#eef3f9; border-top:2px solid var(--rm-navy-800,#063B73);
  font-weight:700; color:var(--rm-navy-800,#063B73);
  height:44px; padding:0 10px; font-size:13px;
}
#body.esb-shelled .esb-room-table tfoot .esb-foot-sub{
  font-weight:500; font-size:11px; color:var(--rm-ink-600,#4b5563); margin-left:6px;
}

/* ===== 支出管理 ===== */
/* KPIは5枚。部屋・区画一覧の7枚と同じ見た目のまま、幅だけ広く取る */
#body.esb-shelled .esb-room-kpi.esb-exp-kpi{
  grid-template-columns:repeat(5, minmax(120px, 1fr));
}
/* 摘要・支払先・備考は文字が多いので幅を確保する */
#body.esb-shelled .esb-exp-table{ min-width:1180px; }
#body.esb-shelled .esb-exp-table td input[type=text],
#body.esb-shelled .esb-exp-table td select{ width:100%; min-width:0; }
#body.esb-shelled .esb-exp-table th:nth-child(1),
#body.esb-shelled .esb-exp-table td:nth-child(1){ width:110px; }
#body.esb-shelled .esb-exp-table th:nth-child(6),
#body.esb-shelled .esb-exp-table td:nth-child(6),
#body.esb-shelled .esb-exp-table th:nth-child(7),
#body.esb-shelled .esb-exp-table td:nth-child(7){ width:108px; }
#body.esb-shelled .esb-exp-table th:nth-child(10),
#body.esb-shelled .esb-exp-table td:nth-child(10){ width:70px; }

/* 科目別の集計。確定申告の決算書へ写すための表 */
#body.esb-shelled .esb-exp-sum-title{
  margin:22px 0 8px; font-size:15px; font-weight:700;
  color:var(--rm-navy-800,#063B73); display:flex; align-items:baseline; gap:10px;
}
#body.esb-shelled .esb-exp-sum-sub{
  font-size:12px; font-weight:500; color:var(--rm-ink-600,#4b5563);
}
#body.esb-shelled .esb-exp-sum-empty{ color:#6b7280; font-size:13px; margin:0 0 20px; }
#body.esb-shelled .esb-exp-sum{ min-width:640px; }
#body.esb-shelled .esb-exp-sum td{ height:38px; }
/* 構成比は数字と帯を重ねて出す。帯は下地なので数字より後ろに置く */
#body.esb-shelled .esb-exp-sum td:last-child{ position:relative; padding-right:12px; }
#body.esb-shelled .esb-exp-bar{
  position:absolute; left:0; top:50%; transform:translateY(-50%);
  height:18px; background:rgba(6,59,115,.12); border-radius:2px; max-width:100%;
}
#body.esb-shelled .esb-exp-pct{ position:relative; font-variant-numeric:tabular-nums; }

@media (max-width:1280px){
  #body.esb-shelled .esb-room-kpi.esb-exp-kpi{
    grid-template-columns:repeat(3, minmax(110px, 1fr));
  }
}
@media (max-width:900px){
  #body.esb-shelled .esb-room-kpi.esb-exp-kpi{
    grid-template-columns:repeat(2, minmax(100px, 1fr));
  }
}

/* ===== 修繕履歴リスト（提出用） ===== */
#body.esb-shelled .esb-rh{ margin:26px 0 8px; }
#body.esb-shelled .esb-rh-title{ margin:0 0 4px; }
#body.esb-shelled .esb-rh-lead{ margin:0 0 10px; font-size:12px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-rh-bar{
  display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 10px;
}
#body.esb-shelled .esb-rh-bar label{
  display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600;
  color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-rh-sel{ height:34px; min-width:150px; }
#body.esb-shelled .esb-rh-btn{
  height:34px; padding:0 16px; border:1px solid var(--rm-navy-800,#063B73); border-radius:2px;
  background:#fff; color:var(--rm-navy-800,#063B73); font-size:12px; font-weight:700; cursor:pointer;
}
#body.esb-shelled .esb-rh-btn:hover{ background:var(--rm-navy-800,#063B73); color:#fff; }
#body.esb-shelled .esb-rh-kpi{
  display:grid; grid-template-columns:repeat(4, minmax(120px, 1fr)); gap:10px; margin:0 0 12px;
}
#body.esb-shelled .esb-rh-kpi > div{
  border:1px solid #d6dee8; border-radius:2px; padding:8px 12px; background:#f8fafc;
}
#body.esb-shelled .esb-rh-kpi span{ display:block; font-size:11px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-rh-kpi b{ display:block; font-size:15px; color:var(--rm-navy-800,#063B73); }
#body.esb-shelled .esb-rh-table{ min-width:1080px; }
#body.esb-shelled .esb-rh-note{ max-width:220px; font-size:11px; }
#body.esb-shelled .esb-rh-ex{ color:#b45309; font-weight:700; font-size:11px; }
#body.esb-shelled .esb-rh-pdf{ color:#0b5cab; font-weight:700; text-decoration:underline; }
@media (max-width:1280px){
  #body.esb-shelled .esb-rh-kpi{ grid-template-columns:repeat(2, minmax(110px, 1fr)); }
}

/* ===== 家賃登録・編集の部屋ごと明細 ===== */
#body.esb-shelled .esb-rd{ margin:18px 0; }
#body.esb-shelled .esb-rd-head{ display:flex; align-items:center; gap:12px; margin:0 0 8px; }
#body.esb-shelled .esb-rd-title{
  margin:0; font-size:15px; font-weight:700; color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-rd-sub{ font-size:12px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-rd-btn{
  margin-left:auto; height:32px; padding:0 14px; border-radius:2px; cursor:pointer;
  border:1px solid var(--rm-navy-800,#063B73); background:#fff;
  color:var(--rm-navy-800,#063B73); font-size:12px; font-weight:700;
}
#body.esb-shelled .esb-rd-btn:hover{ background:var(--rm-navy-800,#063B73); color:#fff; }
#body.esb-shelled .esb-rd-h{
  margin:14px 0 6px; font-size:13px; font-weight:700; color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-rd-empty{ font-size:12px; color:#6b7280; margin:0 0 8px; }
#body.esb-shelled .esb-rd-table{ min-width:820px; }
#body.esb-shelled .esb-rd-out{ min-width:420px; }
#body.esb-shelled .esb-rd-warn{
  margin:6px 0 0; padding:8px 12px; border-radius:2px; font-size:12px; font-weight:600;
  background:var(--red-bg); border:1px solid #f3c2c2; color:var(--red);
}
#body.esb-shelled .esb-rd-note{ margin:8px 0 0; font-size:12px; }

/* ===== 一括PDF取り込み ===== */
#body.esb-shelled .esb-bp{ margin:0 0 22px; }
#body.esb-shelled .esb-bp-title{ margin:0 0 4px; }
#body.esb-shelled .esb-bp-lead{ margin:0 0 10px; font-size:12px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-bp-drop{ max-width:none; }
#body.esb-shelled .esb-bp-h{
  margin:16px 0 6px; font-size:13px; font-weight:700; color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-bp-h.esb-bp-ng{ color:var(--red); }
#body.esb-shelled .esb-bp-note{ margin:0 0 8px; font-size:12px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-bp-table{ min-width:980px; }
#body.esb-shelled .esb-bp-src{ font-size:11px; color:#6b7280; }
#body.esb-shelled .esb-bp-replace{
  display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--rm-ink-600,#4b5563);
}
#body.esb-shelled .esb-pdf-auto{
  display:flex; align-items:center; gap:6px; margin:8px 0 0;
  font-size:12px; color:var(--rm-ink-600,#4b5563);
}

/* ===== 固定資産税の書類PDF ===== */
#body.esb-shelled .esb-taxpdf{ margin:0 0 22px; }
#body.esb-shelled .esb-taxpdf-view{ margin-top:22px; }
#body.esb-shelled .esb-taxpdf-table{ min-width:820px; }
#body.esb-shelled .esb-taxpdf-open{ color:#0b5cab; text-decoration:underline; }
#body.esb-shelled .esb-pdf-none{ font-size:12px; color:#6b7280; margin:8px 0; }
#body.esb-shelled .esb-taxread{
  margin:12px 0; padding:14px 16px; border:1px solid #d6dee8; border-radius:2px; background:#f8fafc;
}
#body.esb-shelled .esb-taxread-h{
  margin:0 0 6px; font-size:13px; font-weight:700; color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-taxread-note{ margin:0 0 10px; font-size:12px; color:var(--rm-ink-600,#4b5563); }
#body.esb-shelled .esb-taxread-grid{
  display:grid; grid-template-columns:repeat(4, minmax(140px, 1fr)); gap:10px; margin:0 0 10px;
}
#body.esb-shelled .esb-taxread-grid label{
  display:flex; flex-direction:column; gap:4px; font-size:11px; font-weight:600;
  color:var(--rm-navy-800,#063B73);
}
#body.esb-shelled .esb-taxread-grid input{ height:32px; }
#body.esb-shelled .esb-taxread-cands{ margin:0 0 10px; font-size:12px; line-height:2; }
#body.esb-shelled .esb-taxread-c{
  height:26px; padding:0 10px; margin:0 2px; border:1px solid var(--navy); border-radius:2px;
  background:#fff; color:var(--navy); font-size:12px; cursor:pointer;
}
#body.esb-shelled .esb-taxread-c:hover{ background:var(--rm-navy-800,#063B73); color:#fff; }
@media (max-width:900px){
  #body.esb-shelled .esb-taxread-grid{ grid-template-columns:repeat(2, minmax(120px, 1fr)); }
}

/* ============================================================
   2026-08-10 追い修正（v1復元時）: 目標達成状況の高さを詰める（利用者指示）
   行の余白・脚注の文字・見込み帯の余白を一回り小さくする。
   ============================================================ */
#body.esb-shelled .esb-goal-nums .esb-summary-row{padding-bottom:6px;}
#body.esb-shelled .esb-goal-nums .esb-progress{margin-bottom:6px;}
#body.esb-shelled .esb-goal-nums .esb-goal-note{margin-top:6px; font-size:12px;}
#body.esb-shelled .esb-goal-nums .esb-goal-note + .esb-goal-note{
  margin-top:3px; font-size:15px;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff{
  margin-top:6px; padding:8px 12px; font-size:14px;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff b{font-size:14px;}

/* ============================================================
   2026-08-10 追い修正（v1復元時）: KPIの数字を太く目立たせる（利用者指示）
   Yu Gothic は 700 までしか太くならないため、数字だけ Segoe UI（可変太さ）を
   先に当てて 800 で描く。単位（物件・戸など）は従来のまま。
   ============================================================ */
#body.esb-shelled .esb-kpi .value{
  font-family:var(--esb-font);
  font-weight:800;
  font-size:30px;
  color:var(--navy);
  letter-spacing:-.3px;
}
#body.esb-shelled .esb-kpi .value .unit{
  font-family:var(--esb-font); font-weight:700; color:var(--ink);
}

/* ============================================================
   2026-08-10 追い修正（その2）: 目標達成状況をさらに詰める（利用者指示「もっと」）
   行・帯・見出し・本文余白を最小限にし、グラフの高さにも上限を設ける。
   ============================================================ */
#body.esb-shelled .esb-goal-block .esb-panel-head{padding:10px 20px;}
#body.esb-shelled .esb-goal-block .esb-panel-body{padding:12px 18px 12px 20px;}
#body.esb-shelled .esb-goal-nums .esb-summary-row{padding-bottom:4px; font-size:14px;}
#body.esb-shelled .esb-goal-nums .esb-summary-row b{font-size:14px;}
#body.esb-shelled .esb-goal-nums .esb-progress{height:10px; margin-bottom:4px;}
#body.esb-shelled .esb-goal-nums .esb-goal-note{margin-top:4px; font-size:11.5px;}
#body.esb-shelled .esb-goal-nums .esb-goal-note + .esb-goal-note{
  margin-top:2px; font-size:14px;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff{
  margin-top:4px; padding:6px 10px; font-size:13px;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff b{font-size:13px;}
/* グラフは横幅に比例して伸びる。高さに上限を置いてパネル全体を低く保つ */
#body.esb-shelled .esb-goal-line svg{max-height:280px;}

/* 2026-08-10 追い修正（その3）: 目標達成状況をあと少し詰める（利用者指示） */
#body.esb-shelled .esb-goal-block .esb-panel-head{padding:8px 20px;}
#body.esb-shelled .esb-goal-block .esb-panel-body{padding:10px 18px 10px 20px;}
#body.esb-shelled .esb-goal-nums .esb-summary-row{padding-bottom:3px;}
#body.esb-shelled .esb-goal-line{padding:0 4px;}
#body.esb-shelled .esb-goal-line svg{max-height:240px;}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff{padding:5px 10px;}

/* 2026-08-10 追い修正（その4）: 数値リストの行間ギャップが高さの主因だった
   （grid の row-gap 12px × 9 = 108px）。6px に縮める。 */
#body.esb-shelled .esb-goal-nums .esb-summary-list{row-gap:6px;}

/* 2026-08-10 追い修正（その5）: パネルを右カラムの高さまで引き伸ばす規則を止める。
   （中身を詰めても flex:1 1 auto が伸ばし戻していた） */
#body.esb-shelled .esb-goal-block{flex:0 0 auto;}
#body.esb-shelled .esb-goal-block > .esb-panel{flex:0 0 auto;}
#body.esb-shelled .esb-goal-block .esb-goal-wide{align-items:start;}

/* 2026-08-10 追い修正（その6）: グラフは高さ230px基準で描き、幅は比率なり。
   （引き伸ばし停止後に幅が過小に計算されるのを防ぐ） */
#body.esb-shelled .esb-goal-line svg{height:230px; width:auto; max-width:100%; max-height:none; margin:0 auto;}

/* 2026-08-10 追い修正（その7）: その5・6の整理。
   縦の引き伸ばしだけ止め、横はパネルいっぱいに戻す。
   グラフの大きさは描画側の縦横比（es_top__index.js の H=190）に任せる。 */
#body.esb-shelled .esb-goal-block > .esb-panel{flex:1 1 auto;}
#body.esb-shelled .esb-goal-line svg{
  width:100%; height:auto; max-width:none; max-height:none; margin:0;
}

/* 2026-08-10 追い修正（その8）: 「その5」を撤回。
   パネルの下端は右カラム（残り回収額）の下端に揃える＝v1本来の伸ばし方に戻す。
   詰めた行間・文字・平たいグラフはそのまま（中身は上下中央に置かれる）。 */
#body.esb-shelled .esb-goal-block{flex:1 1 auto;}
#body.esb-shelled .esb-goal-block .esb-goal-wide{align-items:stretch;}

/* ============================================================
   2026-08-10 追い修正（その9）: 左右の下罫線を「枠線同士」で必ず揃える。
   右カラムの入れ物が最終カードより16px長く、左パネルだけ下へ出ていた。
   右カラムを縦flexにし、最後のカード（残り回収額）が余りを埋めて
   合計帯（金額）を下端に貼り付ける。左右どちらが長くても罫線が一致する。
   右カラムが下段へ回る狭い幅（1280px未満）には適用しない。
   ============================================================ */
@media(min-width:1280px){
  #body.esb-shelled .esb-dash-side{
    display:flex; flex-direction:column; gap:16px;
  }
  #body.esb-shelled .esb-dash-side .esb-vpanel{margin:0;}
  #body.esb-shelled .esb-dash-side .esb-vpanel:last-child{
    flex:1 1 auto; display:flex; flex-direction:column;
  }
  #body.esb-shelled .esb-dash-side .esb-vpanel:last-child .esb-vtotal{margin-top:auto;}
}

/* ============================================================
   2026-08-10 追い修正（その10）: 目標達成状況の脚注デザインの見直し（利用者指示）
   4つの情報の役割をそろえる:
     算出根拠（小さく・薄く）→ 見込み（枠つき・最重要）
     → 経過（普通の文字）→ 遅れ/先行（丸い札で強調）
   ============================================================ */
#body.esb-shelled .esb-goal-nums .esb-goal-note{
  text-align:center; font-size:12px; color:var(--muted);
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff ~ .esb-goal-note{
  margin-top:10px; font-size:13px; font-weight:700; color:var(--ink); text-align:center;
}
#body.esb-shelled .esb-goal-nums .esb-forecast-diff ~ .esb-goal-note + .esb-goal-note{
  margin-top:4px; font-size:15px; font-weight:700;
  width:fit-content; justify-self:center;
  padding:4px 16px; border-radius:2px; background:#FDECEA;
}
/* 先行（緑）のときは札も緑にする */
#body.esb-shelled .esb-goal-nums .esb-forecast-diff ~ .esb-goal-note + .esb-goal-note:has(b[style*="green"]){
  background:#E9F7EF;
}

/* ============================================================
   2026-08-10 追い修正（その11）: 固定レイアウト化（利用者指示）
   「窓の幅で並びや高さが変わるのは駄目。常に同じ形」
   本文を設計幅 1392px（サイドバー除く）に固定し、
   窓が狭いときは JS が .main_frame に zoom を掛けて相似縮小する。
   これまでの幅ごとの列切り替え（メディアクエリ）は、
   ここで最終形を無条件に宣言して打ち消す（後勝ち）。
   ============================================================ */
#body.esb-shelled main .main_frame{
  width:1392px; min-width:1392px; max-width:1392px;
  margin:0 auto;
}
/* 常に: 上段5列・下段4列 */
#body.esb-shelled .esb-kpi-5{grid-template-columns:repeat(5,minmax(0,1fr)) !important;}
#body.esb-shelled .esb-kpi-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
/* 金額2枚は固定幅カード（247px）に収まる大きさへ */
#body.esb-shelled .esb-kpi-4 > :nth-child(3) .value,
#body.esb-shelled .esb-kpi-4 > :nth-child(4) .value{font-size:25px !important;}
/* 常に: 右カラム併走・目標達成状況は左右2カラム */
#body.esb-shelled .esb-layout-dashboard{
  display:grid !important; grid-template-columns:minmax(0,1fr) 344px !important; gap:16px;
}
#body.esb-shelled .esb-dash-side{display:flex !important; flex-direction:column; gap:16px;}
#body.esb-shelled .esb-dash-side .esb-vpanel{margin:0;}
#body.esb-shelled .esb-dash-side .esb-vpanel:last-child{
  flex:1 1 auto; display:flex; flex-direction:column;
}
#body.esb-shelled .esb-dash-side .esb-vpanel:last-child .esb-vtotal{margin-top:auto;}
#body.esb-shelled .esb-goal-wide{grid-template-columns:318px minmax(0,1fr) !important;}

/* ============================================================
   固定レイアウト（2026-08-10 利用者指示・全画面共通）
   窓の幅で並びや寸法を変えない。本文は設計幅 1500px で組み、
   狭い窓では bridge.js の fitFixedLayout() が zoom で相似縮小する。
   1500px は全画面の必要幅の実測値（いちばん広い表に合わせた値）。
   estate_ui.css の width:auto !important を打ち消すため !important を付ける。
   ログイン画面は本文の作りが違うので対象外。
   ============================================================ */
body.esb-shelled:not(.login_body) #container,
body.esb-shelled:not(.login_body) .main_frame{
  width:1500px !important;
  min-width:1500px !important;
  max-width:1500px !important;
  margin:0 auto !important;
}

/* 目標額が未設定のとき（2026-08-24 利用者指示）。
   金額の代わりに「目標未設定」と出す。金額と取り違えないよう、控えめな色にする。 */
#body.esb-shelled .esb-goal-unset{ color:var(--muted); font-weight:600; font-size:14px; }

/* ============================================================
   2026-10-25 書体を見積システム（mitsumori.ziobit.jp）と同じにする（利用者指示）。画面だけ
   ・日本語は Noto Sans JP、数字は Inter（変数は tokens の末尾。読み込みは各画面の <link media="screen">）
   ・数字の場所では、書体の変数そのものを数字用に差し替える。estate_ui.css に
     「全要素の書体を var(--esb-font) にする」強い指定（!important）があり、font-family を直接書くと負ける。
     変数を差し替えれば、その強い指定のまま Inter になる（日本語の字は Noto Sans JP に落ちる）
   ・太さは 400 本文・表の中身・入力した文字／500 項目名・ボタン・メニュー・表の見出し／
     600 画面の題名・大きな数字／700 総額（表の合計などは今の 700 のまま）。800・900 は使わない。
     既存の 700 !important（一覧の表の見出し・ボタンなど。詳細度が高い）に勝つため #body を3つ重ねて書く
   ・印刷には効かない（@media screen の中だけ）。印刷用の別窓（レントロール・空き物件リスト・修繕履歴）も今の書体のまま
   ============================================================ */
@media screen{
  /* 数字（金額・数量・日付・番号・件数） */
  #body.esb-shelled :is(td.align_right, th.align_right, td.esc-numeric, th.esc-numeric, td.num, td.lv-num, input.num_format, input.num_format_float2, input.align_right, .num, .esc-numeric, .esb-kpi .value, .esb-kpi-value, .esb-metric-mini b, .esb-perf-card b, .esb-vstep-amount, .esb-vstep-value, .esb-vtotal-value, .esb-vtotal-main .vl, b.vl, .esb-room-kpi-item .vl, .esb-rh-kpi b, .esb-cf-card-v, .esb-cf-dl dd, .esb-cf-diff strong, .esb-year-view, .esb-sec-no, .esb-sec-nav-item em, .esb-vstep-no, td.esb-ov-m, td.esb-ov, .esb-fi-tax, .esb-fi-sum, #cash_flow_id_view, .esb-pk-table td.n, td.esb-rs-cell, td.esb-rs-total, td.esb-rs-grand, .esb-exp-pct, .esb-rc-count, .page-link, .esb-ctl-note){
    --esb-font:var(--esb-font-num);
    font-variant-numeric:lining-nums tabular-nums;
  }
  /* 項目名・ボタン・メニュー・表の見出し … 500 */
  #body#body#body.esb-shelled :is(th, th *, button, button *, .btn, input[type="button"], input[type="submit"], .esb-nav-item, .esb-nav-item *, .esb-nav-space, .esb-sec-nav-item, .esb-field > label, .esb-rh-bar > label, .esb-rps > label, .esb-tax-pick, .esb-allprop-sort, a.date_change, .esb-list-foot-label, .esb-summary-row > span, .esb-vstep-label, .esb-kpi .label, div.label){ font-weight:500 !important; }
  /* 画面の題名・大きな数字 … 600 */
  #body#body#body.esb-shelled :is(.esb-page-title h1, .esb-sec-title, h3.title, .esb-vpanel-head h2, .esb-panel-head > span, .esb-rd-title, .esb-rd-h, .esb-kpi .value, b.vl, .esb-vtotal-main .vl, .esb-vstep-value, .esb-rh-kpi b, .esb-room-kpi-item .vl, .esb-cf-card-v){ font-weight:600 !important; }
  /* 30px 以上の数字は、字の間を少し詰める */
  #body.esb-shelled :is(.esb-kpi .value, .esb-vtotal-main .vl){ letter-spacing:-.025em; }
}
/* スマホ: 入力欄の文字は 16px 以上（iPhone で入力時に画面が勝手に拡大されるのを防ぐ）。
   幅の切り替えは今ある 760px の1本と同じ（新しい切り替え幅は足していない） */
@media screen and (max-width:760px){
  /* 物件登録のテナント数など4欄は、ID を3つ重ねた強い指定で 13px にしているので、それより強く書く */
  #body#body#body#body.esb-shelled :is(input, select, textarea){ font-size:16px !important; }
}


/* ★2026-11-10 ボタンを押した瞬間に一段濃くする（押せたことが分かるように。共通で1か所） */
#body.esb-shelled button:active:not(:disabled),
#body.esb-shelled [role="button"]:active{ filter:brightness(.9); }
