/* ============================================================================
   estate_ui.css — Estate System Cloud 全23画面 共通デザイン基盤
   ----------------------------------------------------------------------------
   デザイン基準：添付HTMLプロトタイプ（estate_system_design_complete/styles.css）
   　・色／余白／角丸／部品寸法はプロトタイプの値をそのまま採用する
   　・独自解釈による別デザインへの変更は行わない
   　・既存HTML構造・JS・Ajax・DB処理には一切干渉しない（見た目のみ）

   構成
     1  デザイントークン（プロトタイプ準拠）
     2  シェル土台（旧chromeの無効化）
     3  サイドバー / 4 ヘッダー / 5 パンくず＋ページ見出し
     6  ダッシュボード部品（KPI・パネル・グラフ）
     7  下層ページ共通化（旧DOM → プロトタイプ部品への写像）
     8  ログイン画面
     9  レスポンシブ

   重要:
   旧CSSは #body.green / #body.blue … のように「id + class」で色を指定するため、
   打ち消すには同等以上の詳細度が必要。本ファイルは #body.esb-shelled を接頭辞に
   することで（id+class）で並び、後読み込みのため確実に上書きされる。
   読み込み順: bootstrap → style.css/layout_*.css → 本ファイル（最後）
   ============================================================================ */

/* ============================================================
   1. デザイントークン（プロトタイプ styles.css :root と同値）
   ============================================================ */
/* デザイントークンは design-tokens.css に集約（この行より前で読み込む）*/


/* ------------------------------------------------------------
   2-0. 初回描画から旧デザインを出さない（画面切替時のちらつき対策）
   本CSSは各HTMLの<head>で読み込むため、JSが .esb-shelled を付ける前でも
   旧ヘッダー・旧フッター・余白ボックスが一瞬表示されることはない。
   ------------------------------------------------------------ */
#wrapper > header,
#wrapper > nav,
#wrapper > aside,
#wrapper > footer,
.space_left,
.space_right{ display:none !important; }
body#body{
  margin:0;
  background:#f4f7fb;
  font-family:var(--esb-font);
  color:#0b2b5b;
}
/* シェルが載るまでは本文を出さない（旧レイアウトのままの本文を見せない）。
   JSが動かない環境で真っ白にならないよう、1.2秒後には必ず表示する。 */
#body:not(.esb-shelled) #container{ opacity:0; }
#body.esb-shelled #container{ opacity:1; transition:opacity .12s ease; }
@keyframes esb-failsafe{ to{ opacity:1; } }
#body:not(.esb-shelled) #container{ animation:esb-failsafe 0s linear 1.2s forwards; }

/* ============================================================
   2. シェル土台（旧chromeの無効化）
   ============================================================ */
body.esb-shelled{
  margin:0 !important; min-width:0 !important; width:auto !important;
  background:var(--bg) !important;
  font-family:var(--esb-font) !important;
  color:var(--ink);
  font-size:14px;
  padding:var(--topbar) 0 0 var(--sidebar) !important;
  -webkit-font-smoothing:antialiased;
}
body.esb-shelled #wrapper{
  width:auto !important; min-width:0 !important; max-width:none !important;
  margin:0 !important; padding:0 !important; background:transparent !important;
  box-shadow:none !important; float:none !important; display:block !important;
}
/* 旧ヘッダー／旧左メニュー／旧右カラム／旧フッター／余白ボックスは使用しない */
body.esb-shelled > #wrapper > header,
body.esb-shelled > #wrapper > nav,
body.esb-shelled > #wrapper > aside,
body.esb-shelled > #wrapper > footer,
body.esb-shelled .space_left,
body.esb-shelled .space_right{ display:none !important; }

/* 本文領域＝プロトタイプの .content > .page */
body.esb-shelled main,
body.esb-shelled main.base_page,
body.esb-shelled main.top_page{
  width:auto !important; min-width:0 !important; max-width:none !important;
  margin:0 !important; padding:24px 26px 36px !important;
  float:none !important; display:block !important; background:transparent !important;
  min-height:calc(100vh - var(--topbar));
}
body.esb-shelled #container,
body.esb-shelled .main_frame{
  /* 旧 layout_base.css の inline-block / min-width:1330px / 余白指定を打ち消す */
  display:block !important; width:auto !important; min-width:0 !important;
  max-width:1500px !important; margin:0 auto !important; float:none !important;
  padding:0 !important; grid-area:auto !important;
}
/* 旧 layout_top.css の main.top_page .main_frame{height:525px} を戻す。
   旧デザインの飾り枠のための固定高さで、新しいシェルでは中身がその下へ
   はみ出したままになる（下地も枠も無いので見た目には出ないが、
   入れ物の高さが中身と合わない状態は残さない）。
   v3 は css/v3/base.css で同じことをしている。ダッシュボードだけ v1 を
   読むため、こちらに無いと1画面だけ取り残されていた（2026-08-13 実測）。 */
body.esb-shelled main.top_page .main_frame,
body.esb-shelled .main_frame{ height:auto !important; }
body.esb-shelled #container > *:first-child{margin-top:0 !important;}
svg.esb-ico{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;}

/* ------------------------------------------------------------
   2-2. 新シェルを旧CSSから保護する（重要）
   新ヘッダーは <header>、サイドバーは <aside> という「要素名」で作っているため、
   旧CSSの #body.red header{background:linear-gradient(...)} 等（詳細度1,1,1）に
   負けてしまう。要素名＋クラスで確実に打ち消す。
   ------------------------------------------------------------ */
header.esb-topbar{
  background:#fff !important;
  background-color:#fff !important;
  background-image:none !important;
  border-bottom:1px solid var(--line) !important;
  box-shadow:none !important;
  height:var(--topbar) !important;
  min-height:0 !important;
  color:var(--ink) !important;
  width:auto !important;
}
header.esb-topbar *{color:var(--ink);}
header.esb-topbar svg{stroke:var(--ink) !important;fill:none !important;}
aside.esb-sidebar{
  /* 濃紺のべた塗りを敷いてから、その上にグラデーションを重ねる。
     見た目は同じ（グラデーションが全面を覆う）が、下地の色が
     「無い」状態ではなくなる。グラデーションだけだと背景色は透明のままで、
     白い文字の後ろの色が body の明るい色として拾われる（2026-08-13 実測）。 */
  background-color:#072f64 !important;
  background-image:linear-gradient(180deg,#072f64 0%,#052858 100%) !important;
  width:var(--sidebar) !important;
  min-width:0 !important;
  position:fixed !important;
  float:none !important;
  margin:0 !important;
  padding:0 !important;
  color:#fff !important;
}
/* 旧CSSの body{text-align:center} をシェルが拾わないようにする */
aside.esb-sidebar,
aside.esb-sidebar *,
header.esb-topbar,
header.esb-topbar *{text-align:left;}
aside.esb-sidebar a{text-decoration:none !important;}
aside.esb-sidebar .esb-nav-item{color:#fff !important;}
aside.esb-sidebar .esb-nav-sub a{color:#dce8f7 !important;}
aside.esb-sidebar .esb-nav-sub a:hover,
aside.esb-sidebar .esb-nav-sub a.esb-subactive{color:#fff !important;}
aside.esb-sidebar svg{stroke:currentColor !important;fill:none !important;}

/* ============================================================
   3. サイドバー（プロトタイプ .sidebar）
   ============================================================ */
.esb-sidebar{
  position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);z-index:20;
  background:linear-gradient(180deg,#072f64 0%,#052858 100%);
  color:#fff;border-right:1px solid #173e70;overflow-y:auto;
}
.esb-brand{
  height:62px;display:flex;align-items:center;gap:12px;padding:0 18px;
  border-bottom:1px solid rgba(255,255,255,.22);
  font-size:18px;font-weight:700;letter-spacing:.2px;color:#fff;text-decoration:none;
  white-space:nowrap;overflow:hidden;
}
.esb-brand svg{width:28px;height:28px;flex:0 0 auto;}
.esb-nav-group{padding:14px 0 5px;}
.esb-nav-label{padding:7px 24px;color:#89a5c9;font-size:11px;letter-spacing:.1em;}
.esb-nav-item{
  position:relative;display:flex;align-items:center;gap:14px;min-height:54px;
  padding:10px 20px;color:#fff;text-decoration:none;font-weight:700;
  border-left:5px solid transparent;
}
.esb-nav-item svg{width:23px;height:23px;flex:0 0 auto;}
.esb-nav-item:hover{background:rgba(255,255,255,.06);}
.esb-nav-item.esb-active{background:linear-gradient(90deg,#0a4f9f,#0a3e82);border-left-color:#29d1d4;}
.esb-nav-sub{display:none;background:rgba(0,0,0,.12);padding:4px 0 10px;}
.esb-nav-section.esb-open .esb-nav-sub{display:block;}
.esb-nav-sub a{
  display:block;padding:9px 14px 9px 58px;color:#dce8f7;text-decoration:none;
  font-size:12px;border-left:5px solid transparent;text-align:left;
}
.esb-nav-sub a:hover,.esb-nav-sub a.esb-subactive{color:#fff;background:rgba(255,255,255,.07);}
.esb-nav-divider{height:1px;background:rgba(255,255,255,.22);margin:12px 20px;}

/* ============================================================
   4. ヘッダー（プロトタイプ .topbar）
   ============================================================ */
.esb-topbar{
  position:fixed;left:var(--sidebar);right:0;top:0;height:var(--topbar);
  background:#fff;border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 26px;z-index:15;
}
/* パンくず（上部バーの左） */
.esb-topbar-crumb{
  flex:1 1 auto;min-width:0;font-size:12px;color:#74849d;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.esb-topbar-crumb a{color:#74849d;text-decoration:none;}
.esb-topbar-crumb a:hover{color:var(--accent);text-decoration:underline;}
.esb-topbar-inner{flex:0 0 auto;}
.esb-topbar-inner{display:flex;align-items:center;gap:22px;}
.esb-topbar-meta{display:flex;align-items:center;gap:8px;padding-left:20px;border-left:1px solid var(--line);}
.esb-topbar-meta:first-child{padding-left:0;border-left:0;}
.esb-topbar svg{width:20px;height:20px;}
.esb-topbar-logout{
  height:36px;padding:0 18px;border:1px solid #8aa2c2;background:#fff;color:var(--ink);
  font-weight:700;border-radius:2px;display:inline-flex;align-items:center;gap:8px;cursor:pointer;
  font-family:var(--esb-font);font-size:14px;
}
.esb-topbar-logout:hover{background:#f5f8fc;}
.esb-navtoggle{display:none;width:38px;height:38px;border:1px solid var(--line);background:#fff;
  border-radius:2px;align-items:center;justify-content:center;cursor:pointer;margin-right:auto;}
.esb-scrim{display:none;position:fixed;inset:0;background:rgba(6,29,57,.45);z-index:18;}
body.esb-nav-open .esb-scrim{display:block;}

/* ============================================================
   5. パンくず＋ページ見出し（プロトタイプ .breadcrumb / .page-head）
   ============================================================ */
.esb-breadcrumb{color:#74849d;font-size:12px;margin-bottom:10px;}
.esb-breadcrumb a{color:#74849d;text-decoration:none;}
.esb-breadcrumb a:hover{text-decoration:underline;}
.esb-pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px;}
.esb-page-title{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;min-width:0;}
.esb-page-title h1{margin:0;font-size:27px;letter-spacing:.02em;color:var(--ink);font-weight:700;line-height:1.25;}
.esb-page-title p{margin:0;color:var(--muted);font-size:13px;}
.esb-head-actions{display:flex;gap:10px;align-items:center;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;}
/* 見出し行に抽出条件を並べる（2段使わない）*/
#body.esb-shelled .esb-pagehead-inline{align-items:center;flex-wrap:wrap;gap:14px 20px;margin-bottom:12px;}
#body.esb-shelled .esb-pagehead-inline .esb-page-title{flex:0 0 auto;}
#body.esb-shelled .esb-filter-panel.esb-filter-inhead{
  flex:1 1 420px;min-width:0;margin:0 !important;
  background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important;
}
#body.esb-shelled .esb-filter-inhead .esb-panel-body{padding:0 !important;background:transparent !important;}
#body.esb-shelled .esb-filter-inhead .esb-panel-head{display:none !important;}
#body.esb-shelled .esb-filter-inhead .esb-filter-grid{
  display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 18px;
  padding:10px 16px;background:#fff;border:1px solid var(--line);
}
#body.esb-shelled .esb-filter-inhead .esb-filter-grid > .esb-field{min-width:0;}
#body.esb-shelled .esb-filter-inhead .esb-field > label{font-size:11.5px;margin-bottom:4px;}
#body.esb-shelled .esb-filter-inhead .esb-year-view{font-size:19px;}

/* 見出し行へ移設した既存の操作ボタン（新規作成・保存など）＝プロトタイプ .btn */
#body.esb-shelled .esb-head-actions button{
  display:inline-flex !important;align-items:center;justify-content:center;gap:8px;
  height:40px !important;min-height:40px;width:auto !important;
  padding:0 22px !important;
  border:1px solid #8aa2c2 !important;border-radius:2px !important;
  background:#fff !important;color:var(--ink) !important;
  font-family:var(--esb-font) !important;font-size:14px !important;font-weight:700;
  white-space:nowrap;cursor:pointer;
}
#body.esb-shelled .esb-head-actions button:hover{background:#f5f8fc !important;}
#body.esb-shelled .esb-head-actions button span{color:inherit !important;visibility:visible !important;}
#body.esb-shelled .esb-head-actions button svg{display:none !important;}
/* 主要操作（保存・登録）は濃紺の塗りつぶし */
#body.esb-shelled .esb-head-actions button#data_save,
#body.esb-shelled .esb-head-actions button#data_save_child,
#body.esb-shelled .esb-head-actions button.esb-btn-primary{
  background:var(--navy) !important;border-color:var(--navy) !important;color:#fff !important;
}
#body.esb-shelled .esb-head-actions button#data_save:hover,
#body.esb-shelled .esb-head-actions button#data_save_child:hover,
#body.esb-shelled .esb-head-actions button.esb-btn-primary:hover{background:#0b4387 !important;}
#body.esb-shelled .esb-head-actions button#data_save span,
#body.esb-shelled .esb-head-actions button#data_save_child span{color:#fff !important;}

/* 画面下の固定操作部（プロトタイプ .form-actions）
   右上の操作ボタンと同じ操作を、画面下でも実行できるようにする。 */
.esb-form-actions{
  position:sticky;bottom:0;background:rgba(255,255,255,.96);
  border-top:1px solid var(--line);padding:12px 0;margin-top:14px;
  display:flex;justify-content:flex-end;gap:10px;z-index:5;
}
#body.esb-shelled .esb-form-actions button{
  /* iPad・Apple Pencilでも押しやすい高さを確保する */
  height:44px;min-height:44px;padding:0 24px;
  border:1px solid #8aa2c2;border-radius:2px;background:#fff;color:var(--ink);
  font-family:var(--esb-font);font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer;
}
#body.esb-shelled .esb-form-actions button:hover{background:#f5f8fc;}
#body.esb-shelled .esb-form-actions button.esb-primary{
  background:var(--navy);border-color:var(--navy);color:#fff;
}
#body.esb-shelled .esb-form-actions button.esb-primary:hover{background:#0b4387;}
/* 「戻る」は主要操作ではないので控えめに、左端へ寄せる */
#body.esb-shelled .esb-form-actions button.esb-ghost{
  margin-right:auto;color:var(--muted) !important;border-color:var(--line) !important;
}
#body.esb-shelled .esb-form-actions button.esb-ghost:hover{color:var(--navy) !important;}

/* ============================================================
   6. ダッシュボード部品（プロトタイプ #dashboard）
   ============================================================ */
.esb-grid{display:grid;gap:14px;}
.esb-kpi-5{display:grid;gap:14px;grid-template-columns:repeat(5,minmax(0,1fr));}
.esb-kpi-4{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));}
.esb-cols-3{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));}
.esb-cols-2{display:grid;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr));}
/* 旧CSSは header/nav/aside/main に grid-area を割り当てている（旧トップのグリッド）。
   新しい部品がその指定を拾うとレイアウトが崩れるため、明示的に打ち消す。 */
#body.esb-shelled main aside,
#body.esb-shelled main section,
#body.esb-shelled main header,
#body.esb-shelled main nav,
.esb-layout-dashboard > *,
.esb-cols-2 > *, .esb-cols-3 > *, .esb-kpi-4 > *, .esb-kpi-5 > *{
  grid-area:auto !important;grid-column:auto !important;grid-row:auto !important;
  float:none !important;
}
#body.esb-shelled main aside{width:auto !important;min-width:0 !important;}

.esb-kpi{
  background:#fff;border:1px solid var(--line);min-height:120px;padding:18px 20px;
  display:grid;grid-template-columns:1fr 52px;align-items:center;border-radius:2px;
}
.esb-kpi .label{font-size:12px;font-weight:700;color:var(--ink);}
.esb-kpi .value{font-size:27px;font-weight:700;letter-spacing:.02em;margin:8px 0;
  font-variant-numeric:tabular-nums;line-height:1.15;}
.esb-kpi .value .unit{font-size:14px;font-weight:700;margin-left:4px;}
.esb-kpi .compare{font-size:12px;color:var(--muted);}
.esb-kpi .iconbox{width:48px;height:48px;display:grid;place-items:center;}
.esb-kpi .iconbox svg{width:42px;height:42px;stroke-width:1.5;stroke:var(--navy);fill:none;
  stroke-linecap:round;stroke-linejoin:round;}
.esb-kpi .pending{font-size:18px;font-weight:700;color:var(--muted);margin:8px 0;}
/* クリックできるKPIカード（対応する一覧画面へ移動する） */
#body.esb-shelled a.esb-kpi-link{
  text-decoration:none !important;color:var(--ink) !important;
  transition:border-color .12s, box-shadow .12s;
}
#body.esb-shelled a.esb-kpi-link:hover{
  border-color:var(--accent);box-shadow:0 2px 8px rgba(11,97,178,.12);
}
#body.esb-shelled a.esb-kpi-link:hover .iconbox svg{stroke:var(--accent);}
/* 「クリックできる」目印はカード右上に小さく置く（見出しの折り返しに影響させない） */
#body.esb-shelled a.esb-kpi-link{position:relative;}
#body.esb-shelled a.esb-kpi-link::after{
  content:"›";position:absolute;top:6px;right:10px;
  color:var(--muted);font-size:16px;font-weight:700;line-height:1;
}
#body.esb-shelled a.esb-kpi-link:hover::after{color:var(--accent);}

.esb-layout-dashboard{display:grid;grid-template-columns:minmax(0,1fr) 288px;gap:16px;}
.esb-dash-main{min-width:0;}
.esb-dash-side{display:flex;flex-direction:column;gap:14px;}
.esb-dash-row{display:grid;grid-template-columns:1.35fr 1.05fr .9fr;gap:14px;margin-top:14px;}

.esb-panel{background:#fff;border:1px solid var(--line);border-radius:2px;}
.esb-panel + .esb-panel{margin-top:14px;}
.esb-panel-head{height:45px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--line-2);font-weight:700;background:#fbfcfe;font-size:14px;color:var(--ink);}
.esb-panel-head h3{margin:0;font-size:14px;font-weight:700;}
.esb-panel-body{padding:16px;}
.esb-panel-empty{padding:35px;text-align:center;color:var(--muted);}

.esb-chart{height:200px;position:relative;padding:15px;}
.esb-chart svg{width:100%;height:100%;overflow:visible;}
.esb-chart-legend{font-size:11px;color:var(--muted);display:flex;gap:18px;margin-bottom:6px;}
.esb-bars{height:155px;display:flex;align-items:flex-end;gap:9px;border-bottom:1px solid #bdc9d8;padding:0 8px;}
.esb-bars > div{flex:1;background:#073b7a;min-width:10px;position:relative;}
.esb-bars > div > span{position:absolute;top:100%;left:0;right:0;font-size:11px;text-align:center;color:var(--muted);}

.esb-summary-list{display:grid;gap:12px;}
.esb-summary-row{display:flex;justify-content:space-between;padding-bottom:10px;
  border-bottom:1px solid var(--line-2);font-weight:700;}
.esb-summary-row .red{color:var(--red);}
.esb-progress{height:12px;background:#dfe5ec;overflow:hidden;}
.esb-progress > i{display:block;height:100%;background:var(--navy);}

.esb-notice-list{display:grid;}
.esb-notice-item{padding:12px 14px;border-bottom:1px solid var(--line-2);
  display:grid;grid-template-columns:1fr auto;gap:8px;font-size:12px;align-items:center;}
.esb-notice-item:last-child{border-bottom:0;}
.esb-notice-item strong{color:var(--red);}

.esb-metric-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px;}
.esb-metric-mini{background:#fff;border:1px solid var(--line);padding:14px;font-size:12px;color:var(--ink);}
.esb-metric-mini b{font-size:22px;display:block;margin-top:5px;font-variant-numeric:tabular-nums;}
.esb-green{color:var(--green);} .esb-red{color:var(--red);} .esb-orange{color:var(--orange);}
.esb-inline-note{font-size:12px;color:var(--muted);}

/* ステータスラベル（緑・橙・赤の小型ラベル） */
.esb-status{display:inline-block;min-width:62px;text-align:center;padding:4px 9px;
  font-weight:700;border-radius:12px;font-size:12px;}
.esb-status.ok{color:var(--green);background:var(--green-bg);}
.esb-status.warn{color:var(--orange);background:var(--orange-bg);}
.esb-status.ng{color:var(--red);background:var(--red-bg);}

/* ダッシュボードの一覧表（プロトタイプ .table-wrap） */
.esb-table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);}
.esb-table-wrap table{width:100%;border-collapse:collapse;}
.esb-table-wrap th,.esb-table-wrap td{border-right:1px solid var(--line-2);border-bottom:1px solid var(--line-2);
  padding:10px 12px;white-space:nowrap;}
.esb-table-wrap th:last-child,.esb-table-wrap td:last-child{border-right:0;}
.esb-table-wrap thead th{background:#f7f9fc;text-align:center;font-size:12px;font-weight:700;color:var(--ink);}
.esb-table-wrap tbody td{font-size:12px;}
.esb-table-wrap tbody tr:hover{background:#f8fbff;}
.esb-table-wrap .num{text-align:right;font-variant-numeric:tabular-nums;}
.esb-table-wrap .esb-name{text-align:left;}
/* 一覧の物件名は、クリックで編集画面を開けるようにする */
#body.esb-shelled .esb-table-wrap button.esb-rowlink{
  background:none !important;border:0 !important;padding:0 !important;margin:0;
  font-family:var(--esb-font);font-size:12px;font-weight:700;
  color:var(--accent) !important;text-align:left;cursor:pointer;
  text-decoration:none;line-height:1.5;
}
#body.esb-shelled .esb-table-wrap button.esb-rowlink:hover{
  text-decoration:underline;color:var(--navy) !important;
}
#body.esb-shelled .esb-table-wrap button.esb-rowlink:disabled{opacity:.55;cursor:default;}
.esb-table-wrap .center{text-align:center;}

/* ============================================================================
   7. 下層ページ共通化（旧DOM → プロトタイプ部品への写像）
   既存HTML構造は変えずに、見た目だけをプロトタイプへ合わせる。
   ============================================================================ */

/* 7-1. モジュール別カラー（green/blue/brown/red/gray）の無効化 --------------- */
#body.esb-shelled table.common,
#body.esb-shelled.green table.common,
#body.esb-shelled.blue table.common,
#body.esb-shelled.brown table.common,
#body.esb-shelled.red table.common,
#body.esb-shelled.gray table.common{
  background-color:transparent;
  border-color:var(--line-2);
  border-collapse:collapse;
  border-spacing:0;
  font-size:12px;
  margin:0 0 14px;
  width:100%;
  color:var(--ink);
}

/* 7-2. 一覧・フォーム共通テーブル ------------------------------------------- */
#body.esb-shelled table.common th{
  background-color:#f7f9fc;
  color:var(--ink);
  font-weight:700;
  font-size:12px;
  border:1px solid var(--line-2);
  padding:10px 12px;
  text-align:center;
  line-height:1.4;
  vertical-align:middle;
}
#body.esb-shelled table.common td{
  background-color:#fff;
  color:var(--ink);
  border:1px solid var(--line-2);
  padding:10px 12px;
  font-size:12px;
  line-height:1.5;
  vertical-align:middle;
}
/* 項目名セル（th相当のtd） */
#body.esb-shelled table.common td.bg_border_color,
#body.esb-shelled table.common th.bg_border_color{
  background-color:#f7f9fc;color:var(--ink);font-weight:700;
}
/* グループ区切りの線 */
#body.esb-shelled table.common .left_line{border-left:1px solid var(--line);}
#body.esb-shelled table.common .top_line{border-top:1px solid var(--line);}
/* 交互色・ホバー */
#body.esb-shelled table.common.alternate tbody tr:nth-child(even) td,
#body.esb-shelled table.common.alternate_even tbody tr:nth-child(even) td{background-color:#fbfcfe;}
#body.esb-shelled table.common.active_sell tbody tr.hv td,
#body.esb-shelled table.common.active_sell tbody tr:hover td{background-color:#f8fbff;}
/* 揃え（仕様書：金額右／文字左／日付中央） */
#body.esb-shelled table.common td.align_right{text-align:right;font-variant-numeric:tabular-nums;}
#body.esb-shelled table.common td.align_center,
#body.esb-shelled table.common th.align_center{text-align:center;}
#body.esb-shelled table.common td.align_left{text-align:left;}
#body.esb-shelled table.common td.light_color{color:var(--muted);}
#body.esb-shelled table.common td.no_padding,
#body.esb-shelled table.common th.no_padding{padding:0;}

/* 7-3. ページ上部の旧操作バー（#sub_menu）------------------------------------
   プロトタイプに濃紺の操作バーは存在しない。操作ボタンは bridge.js が
   ページ見出し右（.esb-head-actions）へ移設するため、バー本体は表示しない。 */
#body.esb-shelled #sub_menu{display:none !important;}

/* 7-4. 見出し（h3.title / h4.table_top）→ プロトタイプ .form-section h2 相当 -- */
#body.esb-shelled h3.title, #body.esb-shelled h4.title,
#body.esb-shelled.green h3.title, #body.esb-shelled.blue h3.title,
#body.esb-shelled.brown h3.title, #body.esb-shelled.red h3.title, #body.esb-shelled.gray h3.title{
  position:static;
  padding:0 0 8px;
  margin:0 0 12px;
  height:auto;
  font-size:16px;
  font-weight:700;
  color:var(--ink);
  border:none;
  border-bottom:1px solid var(--line-2);
  border-radius:0;
  line-height:1.35;
}
#body.esb-shelled h3.table_top, #body.esb-shelled h4.table_top,
#body.esb-shelled.green h4.table_top, #body.esb-shelled.blue h4.table_top,
#body.esb-shelled.brown h4.table_top, #body.esb-shelled.red h4.table_top,
#body.esb-shelled.gray h4.table_top{
  position:static;
  padding:0 0 0 10px;
  margin:0 0 8px;
  height:auto;
  font-size:13px;
  font-weight:700;
  color:var(--ink);
  border:none;
  border-left:3px solid var(--navy);
  border-radius:0;
  line-height:1.35;
  clear:both;
}
#body.esb-shelled h3.title::before, #body.esb-shelled h4.title::before,
#body.esb-shelled h3.table_top::before, #body.esb-shelled h4.table_top::before{
  display:none !important;content:none !important;
}

/* 7-4b. 追加ブロック（KPI・集計ストリップ・グラフ）------------------------- */
.esb-metrics{margin-bottom:14px;}
.esb-charts{margin-bottom:16px;}
.esb-charts .esb-cols-2{margin-bottom:0;}

/* 7-4c. 検索条件（プロトタイプ .filter-panel > .filter-grid）----------------- */
#body.esb-shelled .esb-filter-panel{padding:16px;margin-bottom:16px;}
#body.esb-shelled .esb-filter-grid{
  display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;align-items:end;
}
#body.esb-shelled .esb-filter-grid .esb-field label,
#body.esb-shelled .esb-field > label{
  display:block;font-size:12px;font-weight:700;margin-bottom:7px;color:var(--ink);white-space:nowrap;
}
#body.esb-shelled .esb-field-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
#body.esb-shelled .esb-field-controls > select,
#body.esb-shelled .esb-field-controls > input[type="text"]{flex:1 1 0;min-width:0;width:auto;}
#body.esb-shelled .esb-filter-actions{
  grid-column:1 / -1;display:flex;gap:10px;align-items:center;flex-wrap:wrap;
}
#body.esb-shelled .esb-filter-actions button{
  height:40px;min-height:40px;padding:0 22px;border:1px solid #8aa2c2;border-radius:2px;
  background:#fff;color:var(--ink);font-family:var(--esb-font);font-size:14px;font-weight:700;cursor:pointer;
}
#body.esb-shelled .esb-filter-actions button:hover{background:#f5f8fc;}
/* 条件欄の中の操作（今月・前年・次月など）はテキストリンクではなくボタン表示にする */
#body.esb-shelled .esb-filter-grid .esb-field-controls button{
  height:36px;min-height:36px;padding:0 14px;
  border:1px solid #8aa2c2 !important;border-radius:2px;background:#fff !important;
  color:var(--ink) !important;font-family:var(--esb-font);font-size:12px;font-weight:700;cursor:pointer;
}
#body.esb-shelled .esb-filter-grid .esb-field-controls button:hover{background:#f5f8fc !important;text-decoration:none;}
#body.esb-shelled .esb-filter-grid .esb-field-controls a,
#body.esb-shelled .esb-filter-grid .esb-field-controls a.date_change{
  display:inline-flex;align-items:center;justify-content:center;
  height:36px;padding:0 14px;
  border:1px solid #8aa2c2;border-radius:2px;background:#fff;
  color:var(--ink) !important;font-size:12px;font-weight:700;
  text-decoration:none !important;cursor:pointer;white-space:nowrap;
}
#body.esb-shelled .esb-filter-grid .esb-field-controls a:hover{background:#f5f8fc;}
#body.esb-shelled .esb-filter-grid .esb-field-controls{gap:8px;}

/* 7-4c-2. 登録フォーム（プロトタイプ .form-section / .field-row / .field）------ */
#body.esb-shelled .esb-form-section{
  background:#fff;border:1px solid var(--line);border-radius:2px;margin-bottom:14px;
}
#body.esb-shelled .esb-form-section > h2{
  font-size:16px;margin:0;padding:12px 16px;border-bottom:1px solid var(--line-2);
  font-weight:700;color:var(--ink);
}
#body.esb-shelled .esb-form-section-body{padding:16px;}
#body.esb-shelled .esb-field-row{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;
  align-items:end;margin-bottom:14px;
}
#body.esb-shelled .esb-field-row:last-child{margin-bottom:0;}
#body.esb-shelled .esb-field-full{grid-column:1 / -1;}
#body.esb-shelled .esb-field-note{color:var(--muted);font-size:12px;}
#body.esb-shelled .esb-field-note .esb-field-controls{display:block;}
#body.esb-shelled .esb-field-row .esb-field-controls > input[type="text"],
#body.esb-shelled .esb-field-row .esb-field-controls > input[type="password"],
#body.esb-shelled .esb-field-row .esb-field-controls > select,
#body.esb-shelled .esb-field-row .esb-field-controls > textarea{
  flex:1 1 0;min-width:0;width:auto;
}
#body.esb-shelled .esb-field-row .esb-field-controls > textarea{flex-basis:100%;width:100%;}
/* 複数行入力は2列ぶんの幅を使い、行内で浮かないようにする */
#body.esb-shelled .esb-field-row .esb-field:has(textarea){grid-column:span 2;}
/* 見出しを持たない複数行入力は、直前の項目の下に全幅で置く */
#body.esb-shelled .esb-field-row .esb-field:has(textarea):not(:has(label)){grid-column:1 / -1;}
/* 計算結果など入力欄を持たない表示項目は、値だとわかる箱にする */
#body.esb-shelled .esb-field-readonly .esb-field-controls{
  min-height:40px;display:flex;align-items:center;gap:6px;
  padding:8px 12px;background:#f5f7fa;border:1px solid var(--line-2);border-radius:2px;
  font-weight:700;font-variant-numeric:tabular-nums;color:var(--ink);
}
/* 単位（％・台・室・円 など）は入力欄の右に小さく添える */
#body.esb-shelled .esb-field-controls{align-items:center;}
#body.esb-shelled .esb-unit{
  flex:0 0 auto;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap;
}

/* 入力欄の右に置かれていた補足文は、下の行へ回して入力幅を確保する */
#body.esb-shelled .esb-ctl-note{
  flex:1 1 100%;color:var(--muted);font-size:11px;line-height:1.5;margin-top:2px;
}

/* 7-4c-1a. 一覧パネル（抽出結果／表／下端バー）--------------------------- */
#body.esb-shelled .esb-list-panel{
  background:#fff;border:1px solid var(--line);margin-bottom:14px;
}
#body.esb-shelled .esb-list-caption{
  padding:11px 16px;border-bottom:1px solid var(--line);
  font-size:13px;font-weight:700;color:var(--navy);
}
#body.esb-shelled .esb-list-caption em{
  font-style:normal;color:var(--red);font-weight:700;
}
#body.esb-shelled .esb-list-scroll{overflow-x:auto;}
#body.esb-shelled .esb-list-scroll > table.common{
  width:100% !important;min-width:max-content;margin:0 !important;border:0 !important;
}
/* 旧CSSの widthNN 固定幅を解いて、枠内に収める */
#body.esb-shelled .esb-list-scroll table.common th[class*="width"],
#body.esb-shelled .esb-list-scroll table.common td[class*="width"]{width:auto !important;}
/* 下端バー：件数／ページ送り／表示件数 */
#body.esb-shelled .esb-list-foot{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  padding:10px 16px;border-top:1px solid var(--line);background:#fbfcfe;
}
#body.esb-shelled .esb-list-foot-info{
  flex:1 1 auto;font-size:12.5px;color:var(--muted);min-width:0;
}
#body.esb-shelled .esb-list-foot-info em{font-style:normal;color:var(--red);font-weight:700;}
#body.esb-shelled .esb-list-foot-pager{flex:0 0 auto;}
#body.esb-shelled .esb-list-foot-pager .pagination{margin:0 !important;}
#body.esb-shelled .esb-list-foot-rows{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;
}
#body.esb-shelled .esb-list-foot-label{font-size:12px;font-weight:700;color:var(--muted);}
#body.esb-shelled .esb-list-foot-rows select{min-height:34px;height:34px;font-size:13px;}

/* 一覧の行と操作ボタン */
#body.esb-shelled .esb-list-scroll table.common > tbody > tr > td{
  height:42px;font-size:12.5px;padding:6px 9px;
}
#body.esb-shelled .esb-list-scroll table.common > tbody > tr > th{padding:7px 9px;}
#body.esb-shelled .esb-list-scroll table.common td.nowrap{max-width:220px;overflow:hidden;text-overflow:ellipsis;}
#body.esb-shelled .esb-list-scroll table.common > tbody > tr > th{font-size:13px;}
#body.esb-shelled .esb-list-scroll table.common > tbody > tr:hover > td{background:#f5f9ff;}
#body.esb-shelled .esb-list-panel button.click_event{
  height:34px;min-height:34px;min-width:62px;padding:0 12px;
  background:#fff !important;border:1px solid #1b4f9c !important;border-radius:0 !important;
  color:#1b4f9c !important;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;
}
#body.esb-shelled .esb-list-panel button.click_event:hover{background:#eef4fb !important;}
/* 削除・除外は赤（誤操作を避けるため通常操作と色を分ける）*/
#body.esb-shelled .esb-list-panel button.state_change_or_delete{
  border-color:#d14343 !important;color:#d14343 !important;
}
#body.esb-shelled .esb-list-panel button.state_change_or_delete:hover{background:#fdf0f0 !important;}

/* 7-4c-1b. 集計パネル（年間月別集計の物件別／月別／前年対比）----------------- */
#body.esb-shelled .esb-perf-cards{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px;
}
#body.esb-shelled .esb-perf-card{
  background:#fff;border:1px solid var(--line);border-left:4px solid var(--accent);
  padding:12px 16px;display:flex;align-items:center;gap:14px;min-height:80px;
}
#body.esb-shelled .esb-perf-ico{
  flex:0 0 auto;width:40px;height:40px;display:grid;place-items:center;
  background:#eef4fb;color:var(--accent);
}
#body.esb-shelled .esb-perf-ico svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;}
#body.esb-shelled .esb-perf-body{min-width:0;display:flex;flex-direction:column;gap:4px;}
#body.esb-shelled .esb-perf-card span{
  font-size:12.5px;color:var(--muted);font-weight:700;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
#body.esb-shelled .esb-perf-card span i{font-style:normal;font-weight:400;opacity:.85;margin-left:5px;}
#body.esb-shelled .esb-perf-card b{
  font-size:25px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;
  line-height:1.15;white-space:nowrap;
}
#body.esb-shelled .esb-perf-card b i{font-style:normal;font-size:13px;font-weight:700;margin-left:3px;}
#body.esb-shelled .esb-perf-block{margin-bottom:14px;}
#body.esb-shelled .esb-perf-block > h3{
  font-size:15px;font-weight:700;color:var(--navy);margin:0 0 8px;padding:0;
  border:0;background:none;text-align:left;
}
#body.esb-shelled .esb-perf-block > h3 small{
  font-size:12px;font-weight:400;color:var(--muted);margin-left:4px;
}
/* 物件別（広め）と月別（狭め）を横に並べる */
#body.esb-shelled .esb-perf-2col{
  display:grid;grid-template-columns:minmax(0,60fr) minmax(0,40fr);gap:12px;align-items:start;
}
#body.esb-shelled .esb-perf-2col .esb-table-wrap table{min-width:0;}
#body.esb-shelled .esb-perf-2col th,
#body.esb-shelled .esb-perf-2col td{padding:6px 7px;font-size:11px;}
/* 物件名は詰まらない範囲で省略表示にする */
#body.esb-shelled .esb-perf-2col td.esb-name{max-width:170px;overflow:hidden;text-overflow:ellipsis;}
#body.esb-shelled .esb-perf-2col tbody tr{height:28px;}
#body.esb-shelled .esb-up{color:var(--green) !important;font-weight:700;}
#body.esb-shelled .esb-down{color:var(--red) !important;font-weight:700;}
#body.esb-shelled .esb-dim{color:var(--muted) !important;}
#body.esb-shelled .esb-flat{color:var(--ink) !important;}
/* 入出金・費用内訳サマリー（収入／支出／収支の3行）*/
#body.esb-shelled .esb-breakdown-table{width:100%;}
#body.esb-shelled .esb-breakdown-table th,
#body.esb-shelled .esb-breakdown-table td{padding:7px 6px;font-size:11px;white-space:nowrap;}
#body.esb-shelled .esb-breakdown .esb-table-wrap{overflow-x:auto;}
#body.esb-shelled .esb-breakdown-table thead th{
  background:#f2f6fb;color:var(--navy);font-weight:700;text-align:center;
}
#body.esb-shelled .esb-breakdown-table th.esb-grp{
  background:#e8f0f9;border-left:2px solid var(--line);font-size:12.5px;
}
#body.esb-shelled .esb-breakdown-table th.esb-rowlabel{
  background:#f2f6fb;color:var(--navy);font-weight:700;text-align:center;
  position:sticky;left:0;z-index:2;min-width:76px;
}
#body.esb-shelled .esb-breakdown-table tbody th.esb-rowlabel{background:#f7f9fc;}
#body.esb-shelled .esb-breakdown-table .esb-grand{
  border-left:2px solid var(--navy);background:#f7f9fc;font-weight:700;
}
#body.esb-shelled .esb-breakdown-table thead .esb-grand{background:#e8f0f9;}
#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);font-weight:700;
}
#body.esb-shelled .esb-breakdown-table td.esb-out{color:var(--red);}
#body.esb-shelled .esb-breakdown-table tbody tr:hover > td{background:#f8fbff;}
/* 表示年（期間ナビ）*/
#body.esb-shelled .esb-year-view{
  font-size:22px;font-weight:700;color:var(--accent);
  font-variant-numeric:tabular-nums;line-height:1.2;white-space:nowrap;
}
#body.esb-shelled .esb-field-year .esb-field-controls{min-height:40px;align-items:center;}
/* 未使用列の省略 */
#body.esb-shelled .esb-col-hidden{display:none !important;}
#body.esb-shelled .esb-col-toggle{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  font-size:12px;color:var(--muted);margin:0 0 8px;
}
#body.esb-shelled .esb-col-toggle button{
  height:34px;min-height:34px;padding:0 12px;font-size:12px;font-weight:700;
  background:#fff !important;border:1px solid var(--line) !important;border-radius:2px !important;
  color:var(--accent) !important;cursor:pointer;
}
#body.esb-shelled .esb-col-toggle button:hover{background:#eef3f8 !important;}
/* 集計表の縦合計行 */
#body.esb-shelled .esb-table-wrap tfoot tr.esb-total > td{
  background:#eef3f8;border-top:2px solid var(--navy);
  font-weight:700;color:var(--navy);font-size:12.5px;
}
#body.esb-shelled .esb-table-wrap tfoot tr.esb-total-sub > td{
  background:#f7f9fc;color:var(--muted);font-size:12px;
}
#body.esb-shelled .esb-table-wrap tfoot tr:hover > td{background:#eef3f8;}
#body.esb-shelled .esb-table-wrap td.align_right{text-align:right;font-variant-numeric:tabular-nums;}
#body.esb-shelled .esb-table-wrap td.align_center{text-align:center;}

/* 7-4c-2b. 12列グリッド（物件登録など入力量の多いフォーム）------------------
   1行に詰め込みすぎないよう、項目ごとに占有列数を指定する。 */
#body.esb-shelled .esb-property-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:20px 20px;
  align-items:start;
}
#body.esb-shelled .esb-property-grid > .esb-field{min-width:0;}
#body.esb-shelled .esb-span-2{grid-column:span 2;}
#body.esb-shelled .esb-span-3{grid-column:span 3;}
#body.esb-shelled .esb-span-4{grid-column:span 4;}
#body.esb-shelled .esb-span-5{grid-column:span 5;}
#body.esb-shelled .esb-span-6{grid-column:span 6;}
#body.esb-shelled .esb-span-8{grid-column:span 8;}
#body.esb-shelled .esb-span-12{grid-column:span 12;}
/* グリッド内では旧ルール（textareaを2列固定）を効かせない */
#body.esb-shelled .esb-property-grid > .esb-field:has(textarea){grid-column:span 8;}
#body.esb-shelled .esb-property-grid > .esb-field.esb-span-12:has(textarea){grid-column:span 12;}
#body.esb-shelled .esb-property-grid > .esb-field textarea{min-height:96px;width:100%;}

/* 入力欄・文字サイズ（業務画面としての可読性／iPadでの操作性）--------------- */
#body.esb-shelled .esb-property-grid .esb-field > label{
  display:block;font-size:13px;font-weight:700;color:var(--ink);margin-bottom:6px;
}
#body.esb-shelled .esb-property-grid input[type="text"],
#body.esb-shelled .esb-property-grid input[type="password"],
#body.esb-shelled .esb-property-grid select,
#body.esb-shelled .esb-property-grid textarea{
  height:42px;min-height:42px;font-size:14px;
}
#body.esb-shelled .esb-property-grid textarea{height:auto;}
#body.esb-shelled .esb-property-grid .esb-field-readonly .esb-field-controls{
  min-height:42px;font-size:14px;
}
#body.esb-shelled .esb-property-grid .esb-unit{font-size:13px;}

/* 7-4c-2c. セクション内の明細表（登記費用・固定収入 など）------------------
   旧画面は tabbox に固定幅、入力欄に width200 等の固定幅が付いており、
   表がコンテンツ幅を使い切れず右側に大きな余白ができていた。 */
#body.esb-shelled .esb-form-section .tabbox{width:auto !important;}
#body.esb-shelled .esb-form-section .tab{min-height:0 !important;}
#body.esb-shelled .esb-form-section-body table.common{
  width:100% !important;margin-right:0 !important;
}
/* 明細表の入力欄は、旧CSSの固定幅を打ち消して列いっぱいに広げる */
#body.esb-shelled .esb-form-section-body table.common input[type="text"]{
  width:100% !important;min-width:0;height:42px;min-height:42px;font-size:14px;
}
#body.esb-shelled .esb-form-section-body table.common td,
#body.esb-shelled .esb-form-section-body table.common th{
  padding:7px 10px;vertical-align:middle;
}
/* 縦書きだった区分見出しを、横書きの行見出しにする */
#body.esb-shelled .esb-rowhead{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  white-space:normal !important;
  line-height:1.5 !important;
  width:120px;font-size:12.5px;font-weight:700;color:var(--navy);
  background:#f2f6fb !important;text-align:left !important;vertical-align:middle;
}
/* 登記費用の列幅（区分／項目名／件数／報酬／登録免許税・印紙税等）*/
#body.esb-shelled #tab1_box1 > table.common{table-layout:fixed;}
#body.esb-shelled #tab1_box1 > table.common tr:first-child > th:nth-child(1){width:120px;}
#body.esb-shelled #tab1_box1 > table.common tr:first-child > th:nth-child(3){width:100px;}
#body.esb-shelled #tab1_box1 > table.common tr:first-child > th:nth-child(4){width:190px;}
#body.esb-shelled #tab1_box1 > table.common tr:first-child > th:nth-child(5){width:230px;}
/* タブ（登記費用／フリー項目）を見やすくする */
#body.esb-shelled .esb-form-section .tabs{display:flex;gap:0;margin:0 0 -1px;padding:0;list-style:none;}
#body.esb-shelled .esb-form-section .tabs button{
  min-height:42px;padding:0 22px;font-size:14px;font-weight:700;
  background:#eef3f8 !important;color:var(--muted) !important;
  border:1px solid var(--line) !important;border-radius:0 !important;cursor:pointer;
}
#body.esb-shelled .esb-form-section .tabs button.menu_active{
  background:#fff !important;color:var(--navy) !important;border-bottom-color:#fff !important;
}

/* 7-4c-3. セクション見出し（番号・説明・必須数・開閉）------------------------
   物件登録・編集のように入力量が多い画面で、現在位置と入力範囲を分かりやすくする。
   既存のDOM・id・name・イベントには手を加えず、見出し部分のみを組み替える。 */
#body.esb-shelled .esb-form-section{border-left:4px solid var(--accent);}
#body.esb-shelled .esb-form-section > h2.esb-sec-head{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:14px 18px;background:#f2f6fb;border-bottom:1px solid var(--line);
}
#body.esb-shelled .esb-sec-no{
  font-size:22px;font-weight:700;color:var(--accent);font-variant-numeric:tabular-nums;
  letter-spacing:.02em;line-height:1;
}
#body.esb-shelled .esb-sec-title{font-size:17px;font-weight:700;color:var(--navy);}
#body.esb-shelled .esb-sec-desc{
  font-size:12.5px;font-weight:400;color:var(--muted);flex:1 1 240px;min-width:0;
}
#body.esb-shelled .esb-sec-req{
  font-size:11.5px;font-weight:700;color:var(--red);background:var(--red-bg);
  border:1px solid #f3c9c7;border-radius:2px;padding:3px 9px;flex:0 0 auto;
}
#body.esb-shelled .esb-sec-toggle{
  margin-left:auto;flex:0 0 auto;width:38px;height:38px;padding:0;
  display:inline-flex;align-items:center;justify-content:center;
  background:#fff !important;border:1px solid var(--line) !important;border-radius:2px !important;
  color:var(--muted) !important;cursor:pointer;box-shadow:none !important;
}
#body.esb-shelled .esb-sec-toggle:hover{background:#e8f0f9 !important;color:var(--navy) !important;}
#body.esb-shelled .esb-sec-toggle svg{transition:transform .15s ease;stroke:currentColor;fill:none;}
#body.esb-shelled .esb-form-section.esb-sec-closed .esb-sec-toggle svg{transform:rotate(180deg);}
#body.esb-shelled .esb-form-section.esb-sec-closed > .esb-form-section-body{display:none;}
/* タブで選ばれていないセクションは表示しない（画面切替）*/
#body.esb-shelled .esb-form-section.esb-sec-hidden{display:none;}
#body.esb-shelled .esb-form-section-body{padding:22px 18px;}

/* 7-4c-4. セクションナビ ---------------------------------------------------- */
#body.esb-shelled .esb-sec-nav{
  position:sticky;top:0;z-index:6;display:flex;gap:0;overflow-x:auto;
  background:#fff;border:1px solid var(--line);border-bottom:3px solid var(--navy);
  margin:0 0 18px;scrollbar-width:thin;
}
#body.esb-shelled .esb-sec-nav-item{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;
  min-height:46px;padding:0 20px;font-size:14px;font-weight:700;
  color:var(--navy);background:#fff;
  text-decoration:none !important;white-space:nowrap;
  border-right:1px solid var(--line-2);
}
#body.esb-shelled .esb-sec-nav-item em{
  font-style:normal;font-size:13px;font-weight:700;color:var(--accent);
  font-variant-numeric:tabular-nums;
}
#body.esb-shelled .esb-sec-nav-item:hover{background:#e8f0f9;}
#body.esb-shelled .esb-sec-nav-item.esb-active{
  background:var(--accent);color:#fff;
}
#body.esb-shelled .esb-sec-nav-item.esb-active em{color:#fff;}

/* 7-4c-6. 登録状態（新規登録／編集中）------------------------------------- */
#body.esb-shelled .esb-page-title h1 .esb-form-state{
  display:inline-block;margin-left:14px;vertical-align:5px;
  font-size:12.5px;font-weight:700;line-height:1.6;padding:3px 11px;border-radius:2px;
}
#body.esb-shelled .esb-page-title h1 .esb-form-state.is-new{
  color:var(--accent);background:#e8f1fb;border:1px solid #b9d4ef;
}
#body.esb-shelled .esb-page-title h1 .esb-form-state.is-edit{
  color:var(--green);background:var(--green-bg);border:1px solid #b7e0c4;
}

/* 7-4c-5. 必須バッジ -------------------------------------------------------- */
#body.esb-shelled .esb-field > label .esb-req{
  display:inline-block;margin-left:6px;font-style:normal;
  font-size:10px;font-weight:700;line-height:1.5;color:var(--red);
  background:var(--red-bg);border:1px solid #f0bfbd;border-radius:2px;padding:0 5px;
  vertical-align:1px;
}

/* 登録フォームの旧レイアウト（block_half による固定幅の多段組）は解除し、
   プロトタイプと同じく1カラムの .form-section を縦に並べる。
   項目は .field-row（自動折り返しのグリッド）で横に並ぶ。 */
#body.esb-shelled form table.block_half,
#body.esb-shelled form table.block_half > tbody,
#body.esb-shelled form table.block_half > tbody > tr,
#body.esb-shelled form table.block_half > tbody > tr > td{
  display:block;width:100% !important;max-width:none !important;
  padding:0 !important;margin:0 !important;border:none !important;background:transparent !important;
}

/* タブ（登記費用／フリー項目）をプロトタイプの .tabs / .tab に合わせる */
#body.esb-shelled .tabbox{width:auto !important;max-width:none !important;}
#body.esb-shelled ul.tabs{
  display:flex;align-items:flex-end;gap:10px;margin:0 0 -1px;padding:0;list-style:none;
  border-bottom:1px solid var(--line);
}
#body.esb-shelled ul.tabs li{list-style:none;margin:0;padding:0;}
#body.esb-shelled button.tab_action{
  border:0 !important;background:transparent !important;border-radius:0 !important;
  padding:12px 20px !important;height:auto !important;width:auto !important;
  color:#64728b !important;font-weight:700;font-size:13px;
  border-bottom:3px solid transparent !important;cursor:pointer;
}
#body.esb-shelled button.tab_action.menu_active{
  color:var(--ink) !important;border-bottom-color:#0b4d9d !important;
}
#body.esb-shelled div.tab{
  border:1px solid var(--line) !important;border-radius:0 !important;
  background:#fff !important;padding:16px !important;min-height:0 !important;
  box-shadow:none !important;
}

/* 7-4d. 件数表示（プロトタイプ .table-meta）--------------------------------- */
#body.esb-shelled .esb-table-meta{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:14px 0 8px;font-size:12px;color:var(--ink);
}
#body.esb-shelled .esb-table-meta b{font-weight:700;}
#body.esb-shelled .esb-table-meta em{color:var(--accent);font-weight:700;}

/* 7-5. 検索条件パネル（一覧上部の block_half）→ プロトタイプ .filter-panel ---- */
#body.esb-shelled table.block_half{
  background:#fff;
  border:1px solid var(--line);
  border-radius:2px;
  padding:0;
  margin:0 0 16px;
  width:100%;
}
/* 一覧表は検索エリアのセル内に入れ子で置かれるため、子セレクタで限定する */
#body.esb-shelled table.block_half > tbody > tr > td,
#body.esb-shelled table.block_half > tbody > tr > th,
#body.esb-shelled table.block_half > tr > td,
#body.esb-shelled table.block_half > tr > th{
  background:transparent;
  border:none;
  padding:10px 12px;
  font-size:12px;
  vertical-align:middle;
}
#body.esb-shelled table.block_half > tbody > tr > th,
#body.esb-shelled table.block_half > tr > th{color:var(--ink);font-weight:700;text-align:left;}
#body.esb-shelled table.block_half > tbody > tr > td{padding:6px 8px !important;vertical-align:middle;}
#body.esb-shelled table.block_half > tbody > tr > td > table.common{margin:0 !important;width:auto !important;}
#body.esb-shelled table.block_half table.common > tbody > tr > th,
#body.esb-shelled table.block_half table.common > tbody > tr > td{
  padding:8px 12px !important;white-space:nowrap;border:none !important;background:transparent !important;
}
#body.esb-shelled table.block_half table.common > tbody > tr > th{
  color:var(--ink) !important;font-weight:700;font-size:12px;text-align:left;
}
#body.esb-shelled table.block_half > tbody > tr > td > *:first-child{margin-top:0 !important;}

/* 一覧表そのものを内包するセルは枠・余白を出さない（旧レイアウトの入れ子対策） */
#body.esb-shelled table.block_half > tbody > tr > td:has(> div[id$="_list_box"]),
#body.esb-shelled table.block_half > tbody > tr > td:has(> div[id$="_list_view"]){
  padding:0 !important;
}
/* 検索条件は .esb-filter-panel へ再構成済みのため、
   残っている block_half（一覧や総合計を内包するレイアウト用）は枠を出さない。 */
#body.esb-shelled table.block_half{
  background:transparent;border:none;border-radius:0;margin:0 0 14px;
}
/* 2カラムのレイアウト枠は、左右の高さが違っても上端で揃える
   （旧CSSの上下中央寄せのままだと、背の高い表の横で内容が中央に浮いてしまう） */
#body.esb-shelled table.block_half > tbody > tr > td,
#body.esb-shelled table.block_half > tr > td{vertical-align:top;}

/* セクションに属さない単独の項目行（家賃登録の期間指定など）はパネルとして見せる */
#body.esb-shelled .esb-field-row.esb-standalone{
  background:#fff;border:1px solid var(--line);border-radius:2px;
  padding:16px;margin-bottom:14px;
}
/* 日付移動リンク（今月・前月・次月など）はどこにあってもボタン表示にする */
#body.esb-shelled a.date_change,
#body.esb-shelled a.id_post,
#body.esb-shelled a.click_event{
  display:inline-flex;align-items:center;justify-content:center;
  height:36px;padding:0 14px;
  border:1px solid #8aa2c2;border-radius:2px;background:#fff;
  color:var(--ink) !important;font-size:12px;font-weight:700;
  text-decoration:none !important;cursor:pointer;white-space:nowrap;
}
#body.esb-shelled a.date_change:hover,
#body.esb-shelled a.id_post:hover,
#body.esb-shelled a.click_event:hover{background:#f5f8fc;}

/* 7-6. 入力欄（プロトタイプ .field input/select/textarea）-------------------- */
#body.esb-shelled input[type="text"],
#body.esb-shelled input[type="password"],
#body.esb-shelled input[type="number"],
#body.esb-shelled input[type="date"],
#body.esb-shelled input[type="email"],
#body.esb-shelled input[type="tel"],
#body.esb-shelled select,
#body.esb-shelled textarea{
  font-family:var(--esb-font);
  /* 入力値は読み取りやすさを優先して本文より少し大きく・濃く */
  font-size:14px;
  font-weight:500;
  color:#0b2b5b;
  background:#fff;
  border:1px solid #bdc9d8;
  border-radius:2px;
  padding:8px 12px;
  min-height:40px;
  box-sizing:border-box;
  max-width:100%;
  outline:none;
  -webkit-font-smoothing:antialiased;
}
/* 未入力時のガイド文字は薄く（入力値と区別できるように） */
#body.esb-shelled input::placeholder,
#body.esb-shelled textarea::placeholder{color:#9aa8bd;font-weight:400;}
/* 金額・数値は等幅数字で桁を揃える */
#body.esb-shelled input.num_format,
#body.esb-shelled input.num_format_float2,
#body.esb-shelled input.align_right{font-variant-numeric:tabular-nums;letter-spacing:.02em;}
#body.esb-shelled textarea{min-height:96px;line-height:1.5;resize:vertical;}
#body.esb-shelled input:focus,
#body.esb-shelled select:focus,
#body.esb-shelled textarea:focus{
  border-color:#2772be;
  box-shadow:0 0 0 2px rgba(39,114,190,.12);
}
#body.esb-shelled input[readonly]{background:#f5f7fa;color:var(--muted);}
#body.esb-shelled input.num_format,
#body.esb-shelled input.num_format_float2{text-align:right;font-variant-numeric:tabular-nums;}
/* 必須ラベル（プロトタイプ .required） */
#body.esb-shelled .must, #body.esb-shelled .required{
  display:inline-block;color:var(--red);background:transparent;
  border:1px solid #ef6b68;border-radius:0;
  font-size:10px;font-weight:700;padding:1px 4px;margin-left:5px;line-height:1.5;
}
/* 入力欄の高さはプロトタイプの .field（min-height:40px）で全画面統一する。
   検索条件・登録フォームで高さを変えない。 */

/* 7-7. ボタン（プロトタイプ .btn / .btn.small / .btn.danger）----------------- */
#body.esb-shelled button.cell_inner,
#body.esb-shelled button.cell_inner_icon{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  background:#fff;
  border:1px solid #8aa2c2;
  border-radius:2px;
  color:var(--ink);
  font-family:var(--esb-font);
  font-size:12px;
  font-weight:700;
  padding:0 14px;
  height:30px;min-height:30px;
  line-height:1.2;
  cursor:pointer;
  white-space:nowrap;
}
#body.esb-shelled button.cell_inner:hover,
#body.esb-shelled button.cell_inner_icon:hover{background:#f5f8fc;}
#body.esb-shelled button.cell_inner svg,
#body.esb-shelled button.cell_inner_icon svg{width:14px;height:14px;fill:currentColor;color:inherit;
  position:static !important;margin:0 !important;flex:none;}
/* 削除・除外系＝赤いアウトライン（仕様書20項） */
#body.esb-shelled button.state_change_or_delete,
#body.esb-shelled button.button_style_none.state_change_or_delete{
  color:var(--red);
  border-color:#ef6b68;
  background:#fff;
  font-weight:700;
}
#body.esb-shelled button.state_change_or_delete:hover{background:var(--red-bg);}
/* テキストリンク型ボタン */
#body.esb-shelled button.button_style_none.link{
  color:var(--accent);font-family:var(--esb-font);font-size:12px;font-weight:700;
  background:transparent;border:none;padding:4px 6px;cursor:pointer;
}
#body.esb-shelled button.button_style_none.link:hover{text-decoration:underline;}
/* 画面内の主要操作（保存など） */
#body.esb-shelled button#data_save,
#body.esb-shelled button#data_save_child,
#body.esb-shelled button.esb-btn-primary{
  background:var(--navy);color:#fff;border:1px solid var(--navy);
  border-radius:2px;font-family:var(--esb-font);font-size:14px;font-weight:700;
  padding:0 22px;height:40px;cursor:pointer;
}
#body.esb-shelled button#data_save:hover,
#body.esb-shelled button#data_save_child:hover{background:#0b4387;}
#body.esb-shelled button.button_style_none.square{
  background:#fff;border:1px solid var(--line);border-radius:2px;
  color:var(--ink);padding:14px 10px;font-family:var(--esb-font);font-size:13px;font-weight:700;
}
#body.esb-shelled button.button_style_none.square:hover{background:#f5f8fc;}
/* 操作セルは中央寄せ（プロトタイプ .action-group） */
#body.esb-shelled table.common td.form{text-align:center;}

/* 7-8. ページネーション（プロトタイプ .pagination .page-btn）----------------- */
#body.esb-shelled .pagination{
  display:flex;justify-content:center;gap:7px;margin:14px 0 8px !important;padding:0;list-style:none;
}
#body.esb-shelled .pagination .page-item{list-style:none;}
#body.esb-shelled .pagination .page-link{
  display:flex;align-items:center;justify-content:center;
  width:34px;height:34px;padding:0;
  border:1px solid var(--line);
  border-radius:2px !important;
  background:#fff;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
#body.esb-shelled .pagination .page-item.active .page-link{
  background:var(--navy);border-color:var(--navy);color:#fff;
}
#body.esb-shelled .pagination .page-link:hover{background:#f5f8fc;}
#body.esb-shelled .pagination:has(> .page-item:only-child){display:none !important;}

/* 7-9. 一覧の外枠（プロトタイプ .table-wrap）--------------------------------- */
#body.esb-shelled div[id$="_list_box"],
#body.esb-shelled div[id$="_list_view"],
#body.esb-shelled .min_height500{
  background:transparent;
  border:none;
  border-radius:0;
  padding:0 !important;
  min-height:0 !important;
}
#body.esb-shelled div[id$="_list_box"] > *:first-child,
#body.esb-shelled div[id$="_list_view"] > *:first-child{margin-top:0 !important;}
/* データ一覧テーブル本体を白いカードに見せる */
#body.esb-shelled table.common.alternate,
#body.esb-shelled table.common.active_sell{
  background:#fff;
  border:1px solid var(--line);
}
/* 抽出結果の件数行 */
#body.esb-shelled table.common.active_sell > tbody > tr:first-child > td[colspan]{
  background:#fff !important;border:none !important;border-bottom:1px solid var(--line-2) !important;
  color:var(--muted);font-weight:700;text-align:left;padding:12px 14px !important;
}

/* 7-10. 注意書き・空表示 ---------------------------------------------------- */
/* 旧デザインの装飾枠（ピンクの角丸ボックス）を外し、プロトタイプの補足文（.inline-note）に合わせる */
#body.esb-shelled .cap_box,
#body.esb-shelled.green .cap_box, #body.esb-shelled.blue .cap_box,
#body.esb-shelled.brown .cap_box, #body.esb-shelled.red .cap_box, #body.esb-shelled.gray .cap_box{
  margin:14px 0 0;padding:0;border:none;border-radius:0;
  background:none;background-color:transparent;background-image:none;box-shadow:none;
}
#body.esb-shelled .cap_box::before, #body.esb-shelled .cap_box::after{display:none;content:none;}
#body.esb-shelled .cap_box ul.cap{list-style:none;margin:0;padding:0;background:none;border:none;}
#body.esb-shelled .cap_box ul.cap li{
  font-size:12px;color:var(--muted);line-height:1.7;list-style:none;margin:0;padding:0;
  background:none;border:none;
}
#body.esb-shelled .cap_box ul.cap li em{color:var(--muted);font-weight:700;}
#body.esb-shelled .comment{
  background:#fff;border:1px solid var(--line);border-radius:2px;
  padding:35px;text-align:center;color:var(--muted);
}
#body.esb-shelled .comment p{margin:0;font-size:13px;color:var(--muted);}

/* 7-11. モーダル（全画面共通・ログイン画面も含む）--------------------------- */
body .modal .modal-content,
body .bootbox .modal-content{
  border-radius:2px;border:1px solid var(--line);font-family:var(--esb-font);
}
body .modal .modal-header,
body .bootbox .modal-header{
  background:var(--navy);color:#fff;border-bottom:none;border-radius:0;padding:12px 18px;
}
body .modal .modal-header .modal-title,
body .bootbox .modal-header .modal-title{color:#fff;font-size:15px;font-weight:700;}
body .modal .modal-header .close,
body .bootbox .modal-header .close{color:#fff;opacity:.9;text-shadow:none;}
body .modal .modal-body, body .bootbox .modal-body{font-size:13px;color:var(--ink);padding:18px;}
body .modal .modal-footer, body .bootbox .modal-footer{border-top:1px solid var(--line);padding:12px 18px;}
body .modal .modal-footer .btn, body .bootbox .btn{
  border-radius:2px;font-family:var(--esb-font);font-size:14px;font-weight:700;padding:0 22px;height:40px;
  display:inline-flex;align-items:center;
}
body .modal .modal-footer .btn-primary, body .bootbox .btn-primary{
  background:var(--navy);border-color:var(--navy);
}
#body.esb-shelled .err_message, #body.esb-shelled em{color:var(--red);font-style:normal;font-weight:700;}

/* 7-12. 強制統一（旧CSSの高詳細度テーマ色を確実に打ち消す）------------------- */
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > th,
#body.esb-shelled.esb-shelled table.common.common > thead > tr > th,
#body.esb-shelled.esb-shelled table.common.common > tr > th{
  background-color:#f7f9fc !important;color:var(--ink) !important;
}
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td,
#body.esb-shelled.esb-shelled table.common.common > thead > tr > td,
#body.esb-shelled.esb-shelled table.common.common > tr > td{
  background-color:#fff !important;
}
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > th.bg_border_color,
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td.bg_border_color,
#body.esb-shelled.esb-shelled table.common.common > tr > th.bg_border_color,
#body.esb-shelled.esb-shelled table.common.common > tr > td.bg_border_color{
  background-color:#f7f9fc !important;color:var(--ink) !important;
}
#body.esb-shelled.esb-shelled table.common.common.alternate > tbody > tr:nth-child(even) > td,
#body.esb-shelled.esb-shelled table.common.common.alternate_even > tbody > tr:nth-child(even) > td,
#body.esb-shelled.esb-shelled table.common.common.alternate_odd > tbody > tr:nth-child(odd) > td{
  background-color:#fbfcfe !important;
}
#body.esb-shelled.esb-shelled table.common.common.active_sell > tbody > tr.hv > td,
#body.esb-shelled.esb-shelled table.common.common.active_sell > tbody > tr:hover > td{
  background-color:#f8fbff !important;
}
/* 濃紺バー（.dark）はプロトタイプに存在しないため、白いパネル見出しへ寄せる */
#body.esb-shelled.esb-shelled table.common.common.dark > tbody > tr > th,
#body.esb-shelled.esb-shelled table.common.common.dark > tbody > tr > td,
#body.esb-shelled.esb-shelled table.common.common.dark > tr > th,
#body.esb-shelled.esb-shelled table.common.common.dark > tr > td{
  background-color:#fbfcfe !important;color:var(--ink) !important;
}
/* データ状態の行色（削除＝灰／入出金管理から除外＝橙）。
   プロトタイプのステータス配色（灰・橙）に合わせて統一する。 */
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td.bg_gray_color,
#body.esb-shelled.esb-shelled table.common.common > tr > td.bg_gray_color{
  background-color:#eef1f5 !important;color:var(--muted) !important;
}
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td.bg_border_color.light_color,
#body.esb-shelled.esb-shelled table.common.common > tr > td.bg_border_color.light_color{
  background-color:var(--orange-bg) !important;color:var(--ink) !important;
}

/* 一覧表のヘッダー固定（仕様書17項）。見出しが1行の表のみ対象。 */
#body.esb-shelled table.common.esb-sticky-head > tbody > tr > th{
  position:sticky;top:var(--topbar);z-index:2;
  box-shadow:inset 0 -1px 0 var(--line-2);
}

/* 入れ子レイアウト用セル */
#body.esb-shelled table.common > tbody > tr > td:has(> table),
#body.esb-shelled table.common > tbody > tr > td:has(> div[id$="_list_box"]),
#body.esb-shelled table.common > tbody > tr > td:has(> div[id$="_list_view"]),
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td:has(> table),
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td:has(> div[id$="_list_box"]),
#body.esb-shelled.esb-shelled table.common.common > tbody > tr > td:has(> div[id$="_list_view"]){
  background:transparent !important;border:none !important;padding:0 !important;
}

/* 7-13. 罫線の色を1色に統一 -------------------------------------------------- */
#body.esb-shelled table.common > tbody > tr > th,
#body.esb-shelled table.common > tbody > tr > td,
#body.esb-shelled table.common > tr > th,
#body.esb-shelled table.common > tr > td{
  border-color:var(--line-2) !important;
}
#body.esb-shelled table.common .left_line{border-left-color:var(--line) !important;}
#body.esb-shelled table.common .top_line{border-top-color:var(--line) !important;}

/* 7-14. フォントの全ページ統一 ------------------------------------------------ */
body.esb-shelled,
body.esb-shelled *:not(svg):not(use):not(path),
body .bootbox, body .bootbox *,
body .modal, body .modal *{
  font-family:var(--esb-font) !important;
}
/* 見出しの旧装飾（丸印）を確実に消す */
#body.esb-shelled .circle,
#body.esb-shelled h3 .circle,
#body.esb-shelled h4 .circle{display:none !important;}
#body.esb-shelled h3, #body.esb-shelled h4{
  border-radius:0 !important;background-image:none !important;
}
#body.esb-shelled h3::before, #body.esb-shelled h4::before{
  display:none !important;content:none !important;
}

/* 7-15. 「除外／復帰」ボタンは一覧側に出さない（物件登録画面で設定できるため） */
#body.esb-shelled button[data-target_data="cash_flow_manage"]{display:none !important;}

/* 7-16. 一覧の横スクロールは表領域内で行う（ページ本体は横に流さない） -------- */
body.esb-shelled #container{overflow-x:auto;padding-bottom:4px;}
#body.esb-shelled .clear{clear:both;}
/* 総合計表は右寄せにすると横に広い一覧では画面外へ出てしまうため、左寄せにする */
#body.esb-shelled table.block_half.float_right,
#body.esb-shelled table.common.float_right,
#body.esb-shelled .float_right{float:none;}
#body.esb-shelled table.common.float_right{width:auto;}

/* ============================================================
   8. ログイン画面（プロトタイプ #login）
   ============================================================ */
body.login_body{
  background:#fff !important;
  background-image:none !important;
  font-family:var(--esb-font) !important;
  margin:0 !important;
  min-width:0 !important;
  min-height:100vh;
  color:var(--ink);
  font-size:14px;
  text-align:left;
}
body.login_body .esb-login-page{
  min-height:100vh;background:#fff;display:grid;grid-template-columns:1.07fr .93fr;
}
body.login_body .esb-login-visual{
  position:relative;padding:100px 90px;border-right:1px solid var(--line);overflow:hidden;
}
body.login_body .esb-login-brand{display:flex;gap:20px;align-items:center;}
body.login_body .esb-login-brand svg{width:82px;height:82px;stroke:var(--navy);fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
body.login_body .esb-login-brand h1{font-size:46px;margin:0 0 8px;color:var(--ink);font-weight:700;line-height:1.1;}
body.login_body .esb-login-brand p{font-size:25px;color:var(--muted);margin:0;}
body.login_body .esb-building-sketch{position:absolute;left:30px;right:20px;bottom:25px;height:55%;opacity:.36;}
body.login_body .esb-login-form{display:flex;align-items:center;justify-content:center;padding:60px;}
body.login_body .esb-login-card{width:min(520px,100%);}
body.login_body .esb-login-card h2{font-size:32px;margin:0 0 12px;color:var(--ink);font-weight:700;}
body.login_body .esb-login-card .esb-lead{color:var(--muted);margin-bottom:38px;}
body.login_body .esb-login-card .esb-field{margin-bottom:22px;}
body.login_body .esb-login-card .esb-field label{display:block;font-size:12px;font-weight:700;margin-bottom:7px;}
body.login_body .esb-login-card .esb-field input[type="text"],
body.login_body .esb-login-card .esb-field input[type="password"]{
  width:100%;border:1px solid #bdc9d8;background:#fff;border-radius:2px;
  min-height:40px;padding:8px 12px;outline:none;font-family:var(--esb-font);font-size:14px;color:var(--ink);
}
body.login_body .esb-login-card .esb-field input:focus{
  border-color:#2772be;box-shadow:0 0 0 2px rgba(39,114,190,.12);
}
body.login_body .esb-login-save{display:flex;gap:10px;align-items:center;margin:4px 0 26px;
  font-size:13px;color:var(--ink);cursor:pointer;font-weight:400;}
body.login_body .esb-login-save input{width:auto;margin:0;}
body.login_body input.login_button,
body.login_body .esb-login-submit{
  width:100%;height:64px;background:var(--navy) !important;background-image:none !important;
  color:#fff !important;border:0 !important;border-radius:0 !important;
  font-size:18px !important;font-weight:700;font-family:var(--esb-font) !important;
  margin:0 !important;padding:0 !important;cursor:pointer;
}
body.login_body input.login_button:hover,
body.login_body .esb-login-submit:hover{background:#0b4387 !important;}
body.login_body .esb-login-help{text-align:center;margin-top:30px;color:#0b4d9d;font-size:13px;}
body.login_body .esb-login-version{text-align:center;color:#74849d;margin-top:120px;font-size:12px;}
body.login_body .warning_comment{color:var(--red);text-align:center;padding:12px;}

/* ============================================================
   9. レスポンシブ（プロトタイプ準拠）
   ============================================================ */
/* @media(max-width:1200px) は外した（2026-08-13 利用者指示）。
   ここでサイドバーを84pxのアイコン帯に切り替え、ダッシュボードの
   上段5列を3列に、右カラムを下段へ回していた。
   固定レイアウト（設計幅1500px・zoom で相似縮小／2026-08-10 利用者確定）と
   ダッシュボードの決めごと（上段5列・右カラム併走／変更禁止）に反するため。 */
@media(max-width:760px){
  :root{--sidebar:0px;}
  .esb-sidebar{transform:translateX(-100%);transition:transform .22s;width:264px;
    box-shadow:0 0 40px rgba(0,0,0,.3);}
  body.esb-nav-open .esb-sidebar{transform:translateX(0);}
  body.esb-nav-open .esb-sidebar .esb-brand span,
  body.esb-nav-open .esb-sidebar .esb-nav-item span,
  body.esb-nav-open .esb-sidebar .esb-nav-label{display:inline;}
  body.esb-nav-open .esb-sidebar .esb-nav-section.esb-open .esb-nav-sub{display:block;}
  body.esb-nav-open .esb-sidebar .esb-brand{justify-content:flex-start;padding:0 20px;}
  body.esb-nav-open .esb-sidebar .esb-nav-item{justify-content:flex-start;padding:10px 20px;}
  .esb-topbar{left:0;padding:0 12px;}
  .esb-navtoggle{display:inline-flex;}
  .esb-topbar-meta.date{display:none;}
  body.esb-shelled main,
  body.esb-shelled main.base_page,
  body.esb-shelled main.top_page{padding:18px 12px 28px !important;}
  .esb-pagehead{display:block;}
  .esb-head-actions{margin-top:12px;flex-wrap:wrap;justify-content:flex-start;}
  .esb-kpi-5,.esb-kpi-4,.esb-metric-strip{grid-template-columns:1fr 1fr;}
  .esb-cols-3,.esb-cols-2{grid-template-columns:1fr;}
  .esb-dash-side{grid-template-columns:1fr;}
  body.login_body .esb-login-page{grid-template-columns:1fr;}
  body.login_body .esb-login-visual{display:none;}
  body.login_body .esb-login-form{padding:28px;}
  /* 検索条件は縦積み */
  #body.esb-shelled table.block_half,
  #body.esb-shelled table.block_half tbody,
  #body.esb-shelled table.block_half tr,
  #body.esb-shelled table.block_half > tbody > tr > td{display:block;width:100% !important;float:none !important;}
}

/* ============================================================
   10. 初期表示のちらつき防止（<head>解析時に旧レイアウトを隠す）
   ============================================================ */
html.esb-boot > body > #wrapper > header,
html.esb-boot > body > #wrapper > nav,
html.esb-boot > body > #wrapper > aside,
html.esb-boot > body > #wrapper > footer,
html.esb-boot > body .space_left,
html.esb-boot > body .space_right{display:none !important;}
html.esb-boot > body:not(.login_body){
  background:var(--bg) !important;
  margin:0 !important;
  padding:var(--topbar) 0 0 var(--sidebar) !important;
  min-width:0 !important;
}
html.esb-boot > body:not(.login_body) > #wrapper{
  width:auto !important;min-width:0 !important;margin:0 !important;background:transparent !important;
}
@media(max-width:760px){
  html.esb-boot > body:not(.login_body){padding-left:0 !important;}
}


/* ============================================================
   2026-08-10 追い修正（v1復元時）
   当時のままだと 1180px 以下で KPI 下段（.esb-kpi-4）が4列のまま残り、
   「今年の家賃収入」のアイコンが右端から 9px はみ出して
   ページが横スクロールしていた。上段（3列化）と同じ帯域で2列にする。
   ============================================================ */
@media(max-width:1180px){
  .esb-kpi-4{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* 2026-08-10 追い修正: 数字を30pxに太らせたぶん、金額カードが
   1181〜1280px の4列帯で右へはみ出す。この帯も2列にする。 */
@media(max-width:1280px){
  .esb-kpi-4{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* ============================================================
   2026-08-10 追い修正: ブラウザ幅を変えたときに枠が崩れる件（利用者報告）
   原因: .esb-kpi の列が 1fr 52px で、数字（¥42,182,103 等）が縮まず
   カード枠を押し広げ、1296〜1696px の帯でアイコンが枠の外へ出ていた。
   対策:
     1. 枠は絶対に壊さない（minmax(0,1fr) ＋ overflow:hidden）
     2. 金額2枚が入り切らない帯（1281〜1699px）は下段を2列にする
     3. 4列に戻る 1700px 以上は金額だけ 27px に一段落とす
   ============================================================ */
.esb-kpi{grid-template-columns:minmax(0,1fr) 52px;overflow:hidden;}
.esb-kpi > *{min-width:0;}
@media(min-width:1281px) and (max-width:1699px){
  .esb-kpi-4{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(min-width:1700px){
  .esb-kpi-4 > :nth-child(3) .value,
  .esb-kpi-4 > :nth-child(4) .value{font-size:27px;}
}

/* 上段5枚も、5列で1枚あたり186pxを割る帯域は3列にする
   （右カラム併走時: main = 画面幅-672。5×186+隙間56 が入るのは 1658px 以上） */
@media(min-width:1181px) and (max-width:1657px){
  .esb-kpi-5{grid-template-columns:repeat(3,minmax(0,1fr));}
}
