/* ============================================
   棚卸し画面専用スタイルシート
   名前空間: stocktaking-
   フォント統一: Noto Sans JP
============================================ */

/* 全体のスタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.stocktaking-body {
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* ベースコンテナがない場合の代替 */
body {
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.stocktaking-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  min-height: 100vh;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

/* ヘッダー */
.stocktaking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.stocktaking-header h1 {
  font-size: 24px;
  font-weight: bold;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

/* ボタン共通スタイル */
.stocktaking-button {
  padding: 8px 16px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
  transition: background-color 0.3s;
}

.stocktaking-button:hover {
  background-color: #f0f0f0;
}

/* 後方互換性のためのボタンスタイル */
button {
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

/* フィルターセクション */
.stocktaking-filter-section {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.filter-section {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.stocktaking-filter-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.filter-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.stocktaking-filter-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stocktaking-filter-item label,
.filter-item label {
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
  font-size: 14px;
}

/* 進捗セクション */
.stocktaking-progress-section {
  margin-bottom: 20px;
}

.progress-section {
  margin-bottom: 20px;
}

.stocktaking-progress-item {
  margin-bottom: 10px;
}

.progress-item {
  margin-bottom: 10px;
}

.stocktaking-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-progress-bar {
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.stocktaking-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.stocktaking-progress-fill.red,
.progress-fill.red {
  background-color: #ff4d4d;
}

.stocktaking-progress-fill.green,
.progress-fill.green {
  background-color: #4caf50;
}

/* アクションバー */
.stocktaking-action-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.stocktaking-column-selector {
  position: relative;
}

.column-selector {
  position: relative;
}

.stocktaking-dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  padding: 10px;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  padding: 10px;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.stocktaking-dropdown-content.show,
.dropdown-content.show {
  display: block;
}

.stocktaking-dropdown-item {
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.dropdown-item {
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-action-buttons {
  display: flex;
  gap: 10px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

/* テーブル */
.stocktaking-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid #ddd;
}

.table-container {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid #ddd;
}

.stocktaking-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-table th,
.stocktaking-table td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ddd;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

th,
td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ddd;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-table th {
  background-color: #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
}

th {
  background-color: #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-table th.sortable {
  cursor: pointer;
}

th.sortable {
  cursor: pointer;
}

.stocktaking-table th.sortable:hover {
  background-color: #e0e0e0;
}

th.sortable:hover {
  background-color: #e0e0e0;
}

.stocktaking-table th .filter-icon {
  margin-left: 5px;
  cursor: pointer;
}

th .filter-icon {
  margin-left: 5px;
  cursor: pointer;
}

.stocktaking-filter-popup {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: none;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.filter-popup {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: none;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-filter-popup.show,
.filter-popup.show {
  display: block;
}

.stocktaking-filter-popup input[type="text"],
.filter-popup input[type="text"] {
  width: 100%;
  padding: 5px;
  margin-bottom: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-filter-popup button,
.filter-popup button {
  margin-right: 5px;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

.stocktaking-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

.stocktaking-table tr:hover {
  background-color: #f0f0f0;
}

tr:hover {
  background-color: #f0f0f0;
}

.stocktaking-table td.editable {
  position: relative;
}

td.editable {
  position: relative;
}

.stocktaking-table td.editable:hover {
  background-color: #e8f0fe;
}

td.editable:hover {
  background-color: #e8f0fe;
}

.stocktaking-table td input,
.stocktaking-table td select {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

td input,
td select {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif);
}

/* 下部アクション */
.stocktaking-bottom-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.bottom-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* フォーム要素の統一 */
input, select, textarea, button {
  font-family: 'Noto Sans JP', var(--font-family-base, sans-serif) !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .stocktaking-action-bar,
  .action-bar {
    flex-direction: column;
    gap: 10px;
  }

  .stocktaking-action-buttons,
  .action-buttons {
    justify-content: space-between;
    width: 100%;
  }

  .stocktaking-filter-items,
  .filter-items {
    flex-direction: column;
    gap: 5px;
  }
}