body {
  background-color: #1e1e1e;
  color: #ffffff;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 90%;
  margin: 30px auto;
  padding: 20px;
  background-color: #2b2b2b;
  border-radius: 10px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 8px;
  background-color: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
}

button {
  cursor: pointer;
  background-color: #007acc;
  color: #fff;
  border: none;
  padding: 4px 8px;
  font-size: 0.9em;
  border-radius: 5px;
  width: 100%;
}

select {
  width: 100%;
  padding: 8px;
  background-color: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #444;
  text-align: center;
}

th {
  cursor: pointer;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #2b2b2b;
  padding: 20px;
  border-radius: 10px;
  width: 95%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

/* 削除ボタンの赤スタイル */
#deleteBtn {
  background-color: #a00;
  color: white;
  width: auto; /* 幅をコンテンツのサイズに合わせる */
  padding: 4px 10px; /* 適切なパディングを設定 */
  font-size: 0.8em; /* フォントサイズを少し小さくする */
}

/* モーダル内のボタン配置を調整するためのスタイル (もし必要なら) */
.modal-buttons {
    display: flex;
    justify-content: flex-end; /* ボタンを右寄せにする */
    gap: 10px; /* ボタン間のスペース */
    margin-top: 20px;
}

/* 月の記録グリッド表示 */
#historyContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.history-entry {
  background: #3a3a3a;
  padding: 8px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  font-size: 0.85em;
}


.history-entry {
  background: #3a3a3a;
  padding: 8px;
  border-radius: 5px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
}

.history-entry label {
  font-weight: bold;
  margin-bottom: 4px;
}

.history-entry input {
  margin-bottom: 4px;
}


.modal-content h2 {
  text-align: center;
}

.form-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

/* ソートインジケーターのスタイル */
th.asc::after {
    content: ' ↑'; /* 昇順アイコン */
    color: lightcoral; /* 昇順は赤色 */
}

th.desc::after {
    content: ' ↓'; /* 降順アイコン */
    color: lightblue; /* 降順は青色 */
}

.top-button-wrapper {
  margin-bottom: -5px; /* h1との間隔を10pxに */
  padding-left: 20px;   /* 検索窓と左揃え */
}

.top-button {
  background-color: #007722;
  color: #fff;
  padding: 8px 12px;
  font-size: 0.9em;
  border: none;
  border-radius: 5px;
  width: auto;
}
