/* 全体のリセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* ページ全体 */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f3f3f3;
  margin: 0;
  padding: 0;
}

/* ログインコンテナ */
.login-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 300px;
}

/* タイトル */
h2 {
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 15px;
  background-color: #4A90E2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

img {
  border-radius: 5px;
}

h2, h3 {
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 10px;
}


/* 入力フィールド */
.input-group {
  margin-bottom: 15px;
  text-align: left;
}

.input-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.input-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* エラーメッセージ */
.error {
  color: red;
  font-size: 14px;
  margin-bottom: 10px;
}

/* ボタン */
.btn_submit {
  width: 100%;
  padding: 10px;
  background-color: #4A90E2;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.btn:hover {
  background-color: #357ABD;
}


/* タイトル */
.container h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: #333;
}

/* ユーザー名の挨拶 */
.container p {
  font-size: 16px;
  margin-bottom: 30px;
  color: #555;
}

/* メニューボタンエリア */
.menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 共通ボタン */
.btn {
  display: block;
  padding: 12px 20px;
  background-color: #007BFF;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}

/* ログアウトボタン */
.btn-logout {
  background-color: #dc3545;
}

.btn-logout:hover {
  background-color: #c82333;
}

/* 商品管理コンテナ */
.container {
  width: 90%;
  margin: auto;
  padding: 20px;
  text-align: center;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* タイトル部分 */
.container h2 {
  font-size: 26px;
  color: #333;
  margin-bottom: 20px;
}

/* 戻るボタン */
.container .btn {
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 15px;
  transition: background-color 0.3s;
}

.container .btn:hover {
  background-color: #0056b3;
}

/* カテゴリ選択フォーム */
.category-form {
  background-color: #f1f1f1;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.category-form label {
  font-weight: bold;
  font-size: 16px;
}

.category-form select {
  padding: 8px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* 商品追加フォームのデザイン（2列レイアウト） */
.add-item-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    width: 600px; /* 横幅を広げる */
    margin: auto;
    text-align: center;
}

.add-item-container h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
}

.add-item-form {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2列レイアウト */
    gap: 15px; /* 間隔を調整 */
    align-items: center;
    text-align: left;
}

.add-item-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.add-item-form textarea {
  width: 100%;
  padding: 10px;
  height: 100px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  resize: vertical; /* ユーザーが高さを調整可能に */
}

.add-item-form input,
.add-item-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* フォームを横並びにしない要素（カテゴリ選択、ボタン） */
.add-item-form .full-width {
    grid-column: span 2;
}

.add-item-container .btn {
    background-color: #007BFF;
    color: white;
    font-size: 18px;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

.add-item-container .btn:hover {
  background-color: #0056b3;
}

/* 商品一覧のタイトル */

.product-list-container {
  margin-top: 20px;
}

.product-list-container h3 {
  font-size: 22px;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
}

/* テーブル全体のデザイン */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background-color: #fff;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

/* テーブルのヘッダー */
.product-table th {
  background-color: #007BFF;
  color: white;
  font-weight: bold;
  padding: 12px;
  text-align: center;
}

/* テーブルのボディ */
.product-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

/* 商品名のセル */
.product-table td:nth-child(2) { /* 2列目（商品名）を対象 */
  white-space: nowrap; /* テキストの折り返しを防ぐ */
  overflow: hidden;
  text-overflow: ellipsis; /* 文字が長すぎる場合は「…」にする */
  max-width: 200px; /* 最大幅を設定 */
}

/* 奇数行と偶数行の色を変更（ストライプ模様） */
.product-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* 画像のスタイル */
.product-table img {
  border-radius: 5px;
}

/* 操作ボタン（編集・削除） */
.product-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ボタンを横並びにする */
.product-actions {
  display: flex;
  align-items: center;
  gap: 10px; /* ボタン間の余白 */
  justify-content: center;
}

/* 編集ボタン */
.btn-edit {
  white-space: nowrap;
  background-color: #ff9800;
  color: white;
  padding: 5px 12px;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.btn-edit:hover {
  background-color: #e68900;
}

/* 削除ボタン */
.btn-delete {
  white-space: nowrap;
  background-color: red;
  color: white;
  border: none; /* 立体感をなくす */
  outline: none;
  padding: 6px 14px; /* サイズを調整 */
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

/* 削除ボタンのhover時 */
.btn-delete:hover {
  background-color: darkred;
}

/* 削除ボタンのフォームをインラインに */
.product-actions form {
  display: inline;
}

/* 売り上げ集計t */

.sales-container {
  width: 100%;
  margin: auto;
  padding: 30px;
}

/* csvボタン */
.csv_btn {
  margin: 40px auto;
  margin-bottom: 40px;
  cursor: pointer;
  display: block;
  padding: 12px 20px;
  background-color: #007BFF;
  border: none;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.csv_btn:hover {
  background-color: #0056b3;
}

/* 集計ボタン */
.period_btn {
  margin: 40px auto;
  cursor: pointer;
  display: block;
  padding: 12px 20px;
  background-color: #4CAF50;
  border: none;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.period_btn:hover {
  background-color: #45a049;
}


/* 商品編集画面用コンテナ */
.edit-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* タイトル */
.edit-container h2 {
  text-align: center;
  font-size: 24px;
  color: #333;
  margin-bottom: 25px;
}

/* フォームのラベルとフィールド */
.edit-container label {
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 15px;
}

.edit-container input[type="text"],
.edit-container input[type="number"],
.edit-container select {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-top: 5px;
  box-sizing: border-box;
}

/* ボタン類 */
.edit-container .btn {
  display: inline-block;
  margin-top: 20px;
  margin-right: 10px;
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.edit-container .btn:hover {
  background-color: #0056b3;
}

/* 言語切り替え */
.lang-switch {
  position: absolute;
  top: 20px;
  right: 30px;
}

.lang-switch a {
  background-color: #007BFF;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.3s;
}

.lang-switch a:hover {
  background-color: #0056b3;
}

/* 小さめの詳細ボタン */
.btn-small {
  display: inline-block;
  padding: 6px 12px;
  background-color: #4A90E2;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-small:hover {
  background-color: #357ABD;
}

/* テーブルタイトルの余白調整 */
.sales-title {
  text-align: center;
  margin: 20px 0;
}

/* 一覧テーブルコンテナ */
.sales-container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}
