body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color:#ffffff;
}

.item-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #f4f6f9;
}
/* サムネイル */
.item-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  background-color: #f4f6f9;
}

/* ラッパー */
.item-thumb-wrap {
  position: relative;
}

/* 拡大プレビュー（初期は非表示） */
.item-preview {
  position: absolute;
  top: 50%;
  left: 44px;
  transform: translateY(-50%);
  z-index: 1050;
  display: none;
  padding: 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* 拡大画像 */
.item-preview img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

/* ホバー時に表示 */
.item-thumb-wrap:hover .item-preview {
  display: block;
}

/* ===== 枠色切り替え ===== */

/* 医薬品（ブルー） */
.item-drug .item-thumb {
  border: 2px solid #3c8dbc; /* AdminLTE blue */
}

.item-drug .item-preview {
  border-color: #3c8dbc;
}

/* 医療材料（グリーン） */
.item-supply .item-thumb {
  border: 2px solid #00a65a; /* AdminLTE green */
}

.item-supply .item-preview {
  border-color: #00a65a;
}

/* ===== 凡例 ===== */

.stock-legend {
  font-size: 0.85rem;
  color: #555;
}

.legend-item {
  display: flex;
  align-items: center;
}

.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
}

/* 医薬品 */
.legend-drug {
  border: 2px solid #3c8dbc;
}

/* 医療材料 */
.legend-supply {
  border: 2px solid #00a65a;
}

/* ===== DataTables 凡例フィルタ ===== */

.dt-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.dt-legend .legend-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: #555;
}

.dt-legend .legend-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
}

.legend-drug { border: 2px solid #3c8dbc; }
.legend-supply { border: 2px solid #00a65a; }

.legend-btn.active {
  font-weight: 600;
}

.legend-reset {
  cursor: pointer;
  color: #888;
}

/* ===== 追加凡例 ===== */

/* 在庫不足（オレンジ） */
.legend-low {
  border: 2px solid #f39c12;
}

/* 期限注意（赤） */
.legend-expire {
  border: 2px solid #dd4b39;
}

/* ===== 棚情報 ===== */

.shelf-wrap {
  gap: 6px;
}

.shelf-text {
  font-size: 0.85rem;
  white-space: nowrap;
}

.shelf-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
  background-color: #f4f6f9;
}

.shelf-detail {
  margin-top: 10px;
}

.shelf-location {
  font-size: 1.1rem;
  font-weight: 600;
}

.shelf-image {
  max-height: 280px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background-color: #f4f6f9;
}

/* フルスクリーン表示向け */
#shelfFullscreenModal .modal-dialog {
  margin: 1.75rem auto;
}

/* スマホのみフルスクリーン化 */
@media (max-width: 768px) {
  #shelfFullscreenModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }
}


/* ===== 棚写真 メタ情報 ===== */

.shelf-meta-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ===== 詳細画面：棚写真メタ情報 ===== */

.shelf-image-wrapper {
  margin-top: 6px;
}

.shelf-meta-inline {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #666;
}

.item-detail-name .item-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
  background-color: #f4f6f9;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

@media (max-width: 768px) {
  .shelf-meta-inline {
    font-size: 0.8rem;
  }
}


@media (max-width: 768px) {
  .shelf-meta-overlay {
    font-size: 0.8rem;
    bottom: 8px;
    left: 8px;
  }
}

@media (max-width: 768px) {
  .item-preview {
    display: none !important;
  }
}

.stock-updated {
  background-color: #fff3cd;
  transition: background-color 1s ease;
}

/* CakePHPのバリデーションエラーメッセージ */
.error-message {
    color: #dc3545;       /* AdminLTE/Bootstrap標準の赤色 */
    font-size: 0.875rem;  /* 少し小さめの文字サイズ */
    margin-top: 0.25rem;  /* 入力欄との隙間 */
    font-weight: 600;     /* 少し太字にして目立たせる */
}

/* (オプション) エラー時の入力欄の枠線も赤くする */
input.form-error, 
select.form-error, 
textarea.form-error {
    border-color: #dc3545;
}