body,
.content-wrapper,
.main-header,
.main-sidebar {
  font-family: 'M PLUS 1p', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'M PLUS 1p', sans-serif;
}

/* Sidebar */
.sidebar-dark-primary {
  background-color: #f5f5f5 !important;
}

.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,
.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active {
  background-color: #b7dbff !important;
}

.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link:hover {
  background-color: #ffe2c6 !important;
}

.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link {
  color: #404040 !important;
}

/* アコーディオン（サブメニュー）内のテキスト色変更 */
.nav-sidebar .nav-treeview>.nav-item>.nav-link {
  color: #404040;
}

/* ホバー時のテキスト色変更 */
.nav-sidebar .nav-treeview>.nav-item>.nav-link:hover {
  color: #6495ed;
  /* 例: #17a2b8 */
}

/* アクティブなサブメニュー項目のテキスト色変更 */
.nav-sidebar .nav-treeview>.nav-item>.nav-link.active {
  color: #0000cd;
  /* 例: #ffd700 */
}

/* オプション: アイコンの色も変更したい場合 */
.nav-sidebar .nav-treeview>.nav-item>.nav-link i {
  color: #a0a0a0;
  /* 例: #28a745 */
}

/* Navbar */
.brand-link .brand-text {
  color: #606060 !important;
}

.dark-mode .brand-link .brand-text {
  color: #e3f2fd !important;
}

.brand-link:hover .brand-text {
  color: #404040 !important;
}

/* nav-header の色を調整 */
.nav-sidebar .nav-header {
  color: #606060 !important;
  font-weight: bold;
}

/* logo調整 */
.brand-link {
  padding: 10px 15px;
  text-align: center;
}

.brand-link .brand-image {
  float: none;
  max-height: 40px;
  width: auto;
  margin: 0;
}

/* ホバー時のエフェクト */
.brand-link:hover {
  opacity: 0.8;
}

/*  ロゴを非表示にする */
.sidebar-mini.sidebar-collapse .brand-link {
  visibility: hidden;
  height: 0;
  padding: 0;
}

.btn-blue {
  background-color: #7fbfff !important;
  border-color: #7fbfff !important;
  color: #404040 !important;
}

.btn-blue:hover {
  background-color: #1e90ff !important;
  border-color: #1e90ff !important;
  color: #ffffff !important;
}

/* ボタンのサイズや余白を調整する場合 */
.auth-btn {
  padding: 10px 20px;
  font-size: 16px;
  /* その他のスタイル */
}

/* ボタンカラー */
.btn-pastel-blue {
  background-color: #7fbfff;
  color: #ffffff;
}

.btn-pastel-red {
  background-color: #ff7f7f;
  color: #ffffff;
}

.btn-pastel-orange {
  background-color: #ffffff;
  /* 背景は白 */
  color: #ff8228;
  /* 文字をオレンジに */
  border: 2px solid #ff8228;
  /* 枠もオレンジに */
  white-space: nowrap;
}

.btn-pastel-orange:hover {
  background-color: #ff8228;
  color: #ffffff;
}

.btn-pastel-green {
  background-color: #ffffff;
  /* 背景は白 */
  color: #008f43;
  /* 文字をグリーンに */
  border: 2px solid #008f43;

  white-space: nowrap;
}

.btn-pastel-green:hover {
  background-color: #008f43;
  color: #ffffff;
}

.btn-pastel-gray {
  background-color: #a0a0a0;
  color: #ffffff;
}

.btn-size-100 {
  width: 100px;
}

.btn-size-120 {
  width: 120px;
}

.btn-size-150 {
  width: 150px;
}

/* テーブル 縦スクロール固定 */
.sticky_table thead tr th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sticky_table_wrapper {
  overflow: scroll;
  height: 80vh;
}

/* ページネーション　*/
.pagination a {
  color: #7fbfff;
}

/* アクティブなページネーションリンクのスタイル */
.pagination .active .page-link {
  background-color: #7fbfff;
  color: #ffffff;
}

/* ページネーションリンクのホバー時のスタイル */
.pagination a:hover {
  background-color: #e0e0e0;
}

/* エラーテキスト　メッセージ */
.error-text {
  color: red;
  min-height: 1.2em;
  /* メッセージの高さを確保 */
  display: block;
  /* インライン要素の高さを確保 */
}

/* 未入力の入力欄の背景色を変える処理 20250617沖が追加*/
.input-error {
  border-color: #dc3545;
  /* Bootstrapの赤色（danger） */
  background-color: #f8d7da;
  /* 薄い赤背景 */
}

/* 明細の列を非表示にする処理 20250812沖が追加*/
.hide-column {
  display: none !important;
}

/* ログイン画面の余白調整 */
.login-box {
  margin-bottom: 30vh;
}

/* ローディングアニメーション */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ログイン画面の調整 */
.login-box {
  margin-bottom: 200px;
}

@media (max-height: 600px) {
  .login-box {
    margin-bottom: 50px;
  }
}

/* 追加 */
/* フォントサイズ */
.font-small {
  font-size: 13px;
}

.font-small input.form-control,
.font-small select.form-control,
.font-small textarea.form-control {
  font-size: 13px;
}

.font-medium {
  font-size: 15px;
}

.font-medium input.form-control,
.font-medium select.form-control,
.font-medium textarea.form-control {
  font-size: 15px;
}

.font-large {
  font-size: 18px;
}

.font-large input.form-control,
.font-large select.form-control,
.font-large textarea.form-control {
  font-size: 18px;
}

.font-xlarge {
  font-size: 20px;
}

.font-xlarge input.form-control,
.font-xlarge select.form-control,
.font-xlarge textarea.form-control {
  font-size: 20px;
}

/* 他のスタイルを追加することも可能 */
.text-center {
  text-align: center;
}

.text-bold {
  font-weight: bold;
}

/* 入力ボックスの幅と高さを変更 */
.input-box {
  height: 28px;
  font-size: 13px;
  padding: 5px;
  border-radius: 4px;
  /* 角を丸くする */
}

.select-box {
  height: 28px;
  /* .input-box と同じ高さ */
  font-size: 13px;
  padding: 0 5px;
  /* 上下は0、左右だけ余白 */
  border-radius: 4px;
  box-sizing: border-box;
  /* padding を含めても高さが崩れないように */

  text-align: left;
  /* 左寄せ（デフォルトだが明示しておく） */
  line-height: 28px;
  /* 縦方向の見た目を中央に */
}

/* モーダルの行高さ　*/
.row-custom-height {
  height: 45px;
  /* 高さを固定、80pxに設定 */

  /* 新規登録・詳細のモーダル*/
  .modal-custom-size-extra .row.d-flex.flex-wrap {
    justify-content: space-between;
    gap: 10px;
    /* 間隔を少し開ける */
  }
}

.modal-custom-size-extra .col-6 {
  background-color: white;
  padding: 10px;
  /* 内側の余白 */
}

/* 製造日のdate入力幅を狭くする */
.production-date {
  width: 70px;
  /* 任意の幅 */
  font-size: 0.9em;
  /* 文字サイズも少し調整可能 */
}

/* パスワードリセット画面 */
.password-reset-page {
  font-family: sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 40px;
}

.password-reset-container {
  max-width: 400px;
  width: 90%;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.password-reset-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.password-reset-error-box {
  background: #fdd;
  color: #c00;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.password-reset-error-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.password-reset-error-box li {
  margin-bottom: 0.25rem;
}

.password-reset-form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.password-reset-form-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.password-reset-form-group input[type="password"],
.password-reset-submit {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box;
  border-radius: 6px;
}

.password-reset-submit {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 6px;
}

.password-reset-submit:hover {
  background-color: #0056b3;
}

/* ラッパーの基準位置を確保 */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-items {
  position: absolute;
  /* 絶対配置で「重ねて表示」 */
  top: calc(100% + 2px);
  /* 入力欄のすぐ下、少し余白 */
  left: 0;
  min-width: 100px;
  /* 最小幅を指定 */
  max-width: 90vw;
  /* 画面をはみ出さないように調整 */

  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-height: 200px;
  overflow-y: auto;

  z-index: 9999;
  /* モーダル上に出す */

  text-align: left;
}

/* サジェスト内で選択されているアイテム */
.autocomplete-item.selected {
  background-color: #3399ff;
  color: #fff;
}

/* 未入力のときは非表示にする（影や枠線の予兆を消す） */
.autocomplete-items:empty {
  display: none;
}

/* 各候補のスタイル */
.autocomplete-items>div {
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-items>div:hover {
  background-color: #f1f1f1;
}

/* モーダル内で隠れないようにする  card-bodyのみに適用するようにした*/
.modal-dialog-scrollable .card-body {
  max-height: 70vh;
  overflow-y: auto !important;
}


/* 明細行のフォントサイズを指定 */
.custom-table input.form-control,
.custom-table select.form-control {
  font-size: 0.9em;
}

.w-200 {
  width: 200px !important;
}

/* Excelライクなテーブルスタイル */
table {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}

/* 交互の行色 */
.odd-row {
  background-color: #ffffff;
}

.even-row {
  background-color: #f8f9fa;
}

/* ホバー効果 */
tr:hover {
  background-color: #e8f4f8 !important;
}

/* セルのスタイル */
td {
  border: 1px solid #d0d7de;
  padding: 0;
  height: 28px;
  position: relative;
}

/* 読み取り専用セル */
.cell-readonly {
  background-color: #f6f8fa;
  padding: 4px 8px;
  color: #24292f;
}

/* 編集可能セル */
.cell-editable {
  padding: 0;
  background-color: #ffffff;
}

/* Excelライクな入力フィールド */
.excel-input {
  width: 100%;
  height: 100%;
  border: none;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  background: transparent;
  outline: none;
  box-sizing: border-box;
}

/* フォーカス時のスタイル */
.excel-input:focus {
  background-color: #ffffff;
  box-shadow: inset 0 0 0 2px #0969da;
  z-index: 1;
  position: relative;
}

/* 差分セル（読み取り専用） */
.diff-cell {
  background-color: #f6f8fa;
  color: #6e7781;
  cursor: not-allowed;
}

/* ヘッダー行のスタイル */
thead th {
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  padding: 6px 8px;
  font-weight: 600;
  color: #24292f;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* 選択されたセルの強調表示 */
.excel-input:focus::selection {
  background-color: #0969da;
  color: white;
}

/* 数値入力フィールドのスピンボタンを非表示 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* テーブルコンテナ（スクロール対応） */
.table-container {
  overflow: auto;
  max-height: 600px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}