@charset "UTF-8";

/* ===== リセット・基本 (旧 default.css ベース) ===== */
* { padding: 0; margin: 0; box-sizing: border-box; }

body, table th, table td {
  font-size: 12px;
  font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
}

body { padding-top: 108px; }

a { color: #0024FF; text-decoration: underline; cursor: pointer; }
a.nolink { color: #222; text-decoration: none; cursor: default; }

img { border: 0; vertical-align: bottom; }

input, select, textarea, button { font-size: 12px; font-family: inherit; }

table { border-collapse: collapse; border-spacing: 0; }
th { text-align: center; white-space: nowrap; }
ul, ol { list-style-type: none; }

/* ===== ユーティリティクラス ===== */
.align_c { text-align: center; }
.align_l { text-align: left; }
.align_r { text-align: right; }
.valign_t { vertical-align: top; }
.valign_b { vertical-align: bottom; }
.text_b { font-weight: bold; }
.text_red { color: #FF0000; }
.red { color: #FF0000; }
.readonly { background-color: #eeeeee; border: none; padding: 2px 5px 2px 0; text-align: right; }
.no-wrap { white-space: nowrap; }
.float_r { float: right; }
.float_l { float: left; }

/* ===== ヘッダー固定ナビゲーション (旧 common.css ベース) ===== */
#top_navi {
  background: url(/static/img/head_back.gif) 0 0 repeat-x;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 108px;
  z-index: 1000;
}
#top_navi_inner {
  background: url(/static/img/head_line_i.gif) left top no-repeat;
  padding-top: 6px;
  min-width: 960px;
}
#logo { width: 490px; float: left; }
#logo img { margin-left: 35px; }
#sub_area {
  width: 420px;
  margin-top: 5px;
  margin-left: 30px;
  float: left;
}
#sub_area > * { float: left; }
#sub_area #master a {
  height: 22px; width: 118px;
  overflow: hidden; display: block;
  background: url(/static/img/b_i_masta.gif) no-repeat;
}
#sub_area #master a:hover { background-position: 0 -22px; }
#sub_area #username {
  width: 140px;
  margin-left: 10px;
  padding-left: 20px;
  margin-top: 4px;
  background: url(/static/img/ico_id.gif) no-repeat;
}
#sub_area #pw_change {
  margin-left: 8px; margin-top: 4px;
  font-size: 11px; color: #33475b;
  text-decoration: none; white-space: nowrap;
  float: left;
}
#sub_area #pw_change:hover { text-decoration: underline; }
#sub_area #logout {
  width: 70px; margin-top: 4px;
  margin-left: 8px;
  cursor: pointer; color: #33475b;
  font-size: 11px;
  float: left;
}
#sub_area #logout:hover { text-decoration: underline; }

/* ナビスプライト共通 */
#top_navi ul {
  clear: both;
  width: 914px;
  height: 70px;
  font-size: 1px;
  line-height: 0;
  position: relative;
  margin-left: 30px;
  padding: 0;
}
#top_navi ul li, #master a { text-indent: -9998px; line-height: 0%; }
#top_navi ul li a {
  width: 57px; height: 70px;
  overflow: hidden; display: block;
  background: url(/static/img/navi_import2.gif) left top no-repeat;
  position: absolute; left: 0;
}

/* 各メニュー位置（通常状態） */
#top_navi ul li.m1  a { width: 58px; }
#top_navi ul li.m2  a { left: 58px;  background-position:  -58px 0; }
#top_navi ul li.m3  a { left: 115px; background-position: -115px 0; }
#top_navi ul li.m4  a { left: 172px; background-position: -172px 0; }
#top_navi ul li.m5  a { left: 229px; background-position: -229px 0; }
#top_navi ul li.m6  a { left: 286px; background-position: -286px 0; }
#top_navi ul li.m7  a { left: 343px; background-position: -343px 0; }
#top_navi ul li.m8  a { left: 400px; background-position: -400px 0; }
#top_navi ul li.m9  a { left: 457px; background-position: -457px 0; }
#top_navi ul li.m10 a { left: 514px; background-position: -514px 0; }
#top_navi ul li.m11 a { left: 571px; background-position: -571px 0; }
#top_navi ul li.m12 a { left: 628px; background-position: -628px 0; }
#top_navi ul li.m13 a { left: 685px; background-position: -685px 0; }
#top_navi ul li.m14 a { left: 742px; background-position: -742px 0; }
#top_navi ul li.m15 a { left: 799px; background-position: -799px 0; }
#top_navi ul li.m16 a { width: 58px; left: 856px; background-position: -856px 0; }

/* ホバー状態 */
#top_navi ul li.m1  a:hover { background-position:    0 -72px; }
#top_navi ul li.m2  a:hover { background-position:  -58px -72px; }
#top_navi ul li.m3  a:hover { background-position: -115px -72px; }
#top_navi ul li.m4  a:hover { background-position: -172px -72px; }
#top_navi ul li.m5  a:hover { background-position: -229px -72px; }
#top_navi ul li.m6  a:hover { background-position: -286px -72px; }
#top_navi ul li.m7  a:hover { background-position: -343px -72px; }
#top_navi ul li.m8  a:hover { background-position: -400px -72px; }
#top_navi ul li.m9  a:hover { background-position: -457px -72px; }
#top_navi ul li.m10 a:hover { background-position: -514px -72px; }
#top_navi ul li.m11 a:hover { background-position: -571px -72px; }
#top_navi ul li.m12 a:hover { background-position: -628px -72px; }
#top_navi ul li.m13 a:hover { background-position: -685px -72px; }
#top_navi ul li.m14 a:hover { background-position: -742px -72px; }
#top_navi ul li.m15 a:hover { background-position: -799px -72px; }
#top_navi ul li.m16 a:hover { background-position: -856px -72px; }

/* アクティブ状態（body の id で制御） */
#data_list    #top_navi ul li.m2  a { background-position:  -58px -144px; }
#shikinGuri   #top_navi ul li.m3  a { background-position: -115px -144px; }
#seiyaku      #top_navi ul li.m4  a { background-position: -172px -144px; }
#siire        #top_navi ul li.m5  a { background-position: -229px -144px; }
#tax          #top_navi ul li.m6  a { background-position: -286px -144px; }
#syogakari    #top_navi ul li.m7  a { background-position: -343px -144px; }
#uriage1      #top_navi ul li.m8  a { background-position: -400px -144px; }
#uriage2      #top_navi ul li.m9  a { background-position: -457px -144px; }
#uriage3      #top_navi ul li.m10 a { background-position: -514px -144px; }
#uriage4      #top_navi ul li.m11 a { background-position: -571px -144px; }
#commission   #top_navi ul li.m12 a { background-position: -628px -144px; }
#sikiri       #top_navi ul li.m13 a { background-position: -685px -144px; }
#syushi       #top_navi ul li.m14 a { background-position: -742px -144px; }
#furikae      #top_navi ul li.m15 a { background-position: -799px -144px; }
#permit       #top_navi ul li.m16 a { background-position: -856px -144px; }

/* ===== コンテンツエリア ===== */
#content { padding: 12px 30px; }
.title-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

/* ===== テーブル（旧システム list_data スタイル） ===== */
#list_data, #list_data2 { text-align: left; margin-top: 10px; margin-bottom: 10px; }
#list_data th, #list_data2 th {
  background-color: #ffffff;
  padding-top: 3px;
  border: 1px solid #999;
  padding-bottom: 1px;
  background-image: url(/static/img/table_title.gif);
  background-position: left bottom;
  background-repeat: repeat-x;
  height: 45px;
}
#list_data td, #list_data2 td { border: 1px solid #d8e4f3; padding: 2px; }
#list_data th, #list_data td { white-space: nowrap; }

/* 新システム一覧テーブル */
table.list { width: 100%; border-collapse: collapse; background: #fff; font-size: 11.5px; }
table.list th {
  background-color: #ffffff;
  border: 1px solid #999;
  padding: 3px 6px;
  text-align: center; font-weight: 700; white-space: nowrap;
  background-image: url(/static/img/table_title.gif);
  background-position: left bottom;
  background-repeat: repeat-x;
  height: 38px;
  /* スティッキーヘッダー：固定ナビ(108px)の下に固定 */
  position: sticky;
  top: 108px;
  z-index: 10;
}
table.list td { border: 1px solid #d8e4f3; padding: 2px 6px; text-align: right; white-space: nowrap; }
table.list td.left { text-align: left; }
table.list td.center { text-align: center; }

/* 行カラー（ピボットテーブル型 交互配色） */
.tr_even { background: #EAF0F7; }
.tr_odd  { background: #ffffff; }
.tr_highlight { background: #ffe2c6; }
table.list tbody tr:nth-child(even) td { background-color: #EAF0F7; }
table.list tbody tr:nth-child(odd)  td { background-color: #ffffff; }
table.list tbody tr:hover td { background-color: #f0f5fa; }

/* ソートボタン */
.sort-btn {
  display: inline-flex;
  flex-direction: column;
  margin-left: 4px;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}
.sort-btn .sb-up,
.sort-btn .sb-dn {
  font-size: 8px;
  color: #333;
  display: block;
  height: 9px;
}
.sort-btn .sb-up.active { color: #cc6600; }
.sort-btn .sb-dn.active { color: #0044cc; }

/* ===== ボタン (旧システム) ===== */
.button {
  display: inline-block;
  padding: 5px 15px 3px;
  margin: 0 2px;
  line-height: 20px;
  height: 26px;
  cursor: pointer;
  border: 1px solid #bbb;
  font: bold 13px arial, helvetica, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  color: #555;
  background-color: #ddd;
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 2px 2px -1px rgba(0,0,0,.5);
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.button:hover { background-color: #eee; color: #555; }
.button:active { background: #e9e9e9; position: relative; top: 1px; }

/* 新システムボタン (.btn) */
.action-bar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid #9aa7b0;
  background: linear-gradient(#fdfdfd, #e2e5e8);
  padding: 3px 10px; font-size: 11.5px; font-weight: 700;
  color: #333; cursor: pointer; border-radius: 2px;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: linear-gradient(#fff, #eef1f3); color: #333; }

/* ===== ページタイトル ===== */
h1.page-title {
  font-size: 18px; font-weight: 800; color: #222;
  margin: 0 0 10px;
  padding: 5px 0 5px 22px;
  background: url(/static/img/back_subtitle.gif) left center no-repeat;
  background-size: 18px 18px;
  border-bottom: 1px solid #e0e0e0;
}
.title-bar h1.page-title { margin: 0; border-bottom: none; }
#title {
  background: url(/static/img/back_subtitle.gif) left bottom no-repeat;
  padding-top: 5px; margin: 0; padding-left: 50px;
  font-weight: bold; font-size: 16px; text-align: left;
}

/* ===== 月次ナビ・合計 ===== */
.month-nav { position: relative; display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.month-nav .mn-arrow { color: #0024FF; text-decoration: none; padding: 0 5px; font-size: 15px; }
.month-nav .mn-arrow:hover { text-decoration: underline; }
.ym-picker { cursor: pointer; font-weight: 700; color: #003399; padding: 3px 10px; border: 1px solid #c0c8d0; border-radius: 3px; background: #f5f8ff; }
.ym-picker:hover { background: #e8eeff; }
.ym-popup { display: none; position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 500; background: #fff; border: 1px solid #aaa; box-shadow: 2px 4px 10px rgba(0,0,0,.2); padding: 10px; min-width: 220px; border-radius: 4px; }
.ym-popup-year { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ym-popup-year span { font-size: 14px; font-weight: 700; }
.ym-popup-year button { border: 1px solid #bbb; background: #f0f0f0; cursor: pointer; padding: 2px 10px; border-radius: 2px; font-size: 13px; }
.ym-popup-year button:hover { background: #e0e0e0; }
.ym-popup-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ym-popup-months a { display: block; text-align: center; padding: 5px 2px; border: 1px solid #dde; border-radius: 3px; font-size: 12px; text-decoration: none; color: #333; background: #f8f8f8; }
.ym-popup-months a:hover { background: #ddeeff; color: #003399; }
.ym-popup-months a.ym-current { background: #2e5fa3; color: #fff; border-color: #1a3e7a; }
.totals { margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.totals span { margin-right: 20px; }

/* ===== ソートボタン ===== */
.sort { cursor: pointer; }
.sort-dl { cursor: pointer; font-size: 9px; color: #0000cc; text-decoration: none; margin-left: 2px; }
.sort-active-dl { color: #cc6600; font-weight: bold; }

/* ===== 検索フォーム ===== */
.search-form {
  background: #f5f8fa; border: 1px solid #dde3e8;
  padding: 8px 12px; margin-bottom: 10px; font-size: 12px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.search-form label { font-weight: 700; }
.search-form select, .search-form input[type=text] {
  border: 1px solid #b9c6d6; padding: 2px 4px; font-size: 12px;
}

/* ===== 客先選択ポップアップ ===== */
.list-masta-popup {
  position: absolute; top: 28px; left: 0; z-index: 200;
  background: #fff; border: 1px solid #aaa;
  width: 260px; box-shadow: 2px 2px 6px rgba(0,0,0,.2);
}
.masta-item { padding: 4px 10px; cursor: pointer; font-size: 12px; }
.masta-item:hover { background: #e6f1f9; }
.icon-search { cursor: pointer; font-size: 14px; margin-left: 4px; vertical-align: middle; }

/* ===== 契約情報フォーム（新規作成・編集）===== */
/*
  将来の5列レイアウト変更時は以下のように切り替え可能：
    #keiyaku-form table.list tr {display: flex; flex-wrap: wrap;}
    #keiyaku-form table.list th, #keiyaku-form table.list td {width: 20%;}
*/
#keiyaku-form table.list {
  width: auto;
}
#keiyaku-form table.list th {
  width: 160px;
  min-width: 160px;
  vertical-align: middle;
  padding: 4px 8px;
}
#keiyaku-form table.list td.left {
  vertical-align: middle;
  padding: 4px 8px;
}
#keiyaku-form table.list td.left input[type=text],
#keiyaku-form table.list td.left input[type=date] {
  width: 360px;
  height: 24px;
  padding: 2px 4px;
}
#keiyaku-form table.list td.left select {
  width: 360px;
  height: 24px;
}
#keiyaku-form table.list td.left input[type=number] {
  width: 200px;
  height: 24px;
  padding: 2px 4px;
}
#keiyaku-form table.list td.left textarea {
  width: 360px;
  min-height: 50px;
  padding: 2px 4px;
}

/* ===== ログイン画面 ===== */
.login-outer { display: flex; justify-content: center; padding-top: 90px; }
table.login-box { border-collapse: collapse; border: 1px solid #c6d3ea; }
table.login-box td { border: 1px solid #c6d3ea; padding: 8px 14px; }
table.login-box td.label { background: #fafbfd; text-align: center; width: 90px; font-weight: 700; }
table.login-box input[type=text], table.login-box input[type=password] {
  width: 160px; padding: 4px 6px; border: 1px solid #b9c6d6; font-size: 13px;
}
.login-btn-wrap { text-align: center; margin-top: 18px; }
.login-btn-wrap button {
  padding: 6px 30px; background: linear-gradient(#fdfdfd, #d8dcdf);
  border: 1px solid #9aa7b0; font-weight: 700; font-size: 13px; cursor: pointer; border-radius: 2px;
}
.login-btn-wrap button:hover { background: linear-gradient(#fff, #eef1f3); }
.login-error { color: #b3261e; font-size: 12.5px; text-align: center; margin-bottom: 10px; }
