body {
  font-family: 'Roboto', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  margin: 0;
  padding: 0;
  color: #333;
  height: calc(100dvh - 120px);
}

.calculator-container {
  max-width: 100%;
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
}

.calculator-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.calculator-header {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-size: 2rem;
  font-weight: bold;
}

#calculator {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 120px);
}

.calculation-display {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  font-size: 1.2rem;
}

.calc-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0;
}
.calc-row.unit-price {
  font-size: 1.5rem;
}

.calc-label {
  flex: 0 0 4em;
  text-align: right;
  font-weight: bold;
  color: #2c3e50;
}

.calc-value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-value input {
  flex: 1;
  padding: 0.1rem 0.8rem;
  font-size: 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  max-width: 200px;
  text-align: right;
}

.calc-value input:focus {
  outline: none;
  border-color: #3498db;
}

.unit {
  color: #666;
  font-size: 1rem;
}

#unit-price {
  font-size: 1.5rem;
  color: #2c3e50;
  font-weight: bold;
  padding: 0.1rem 0.8rem;
  background: #f8f9fa;
  border-radius: 8px;
  min-width: 200px;
  display: inline-block;
  text-align: right;
}

#display {
  margin-bottom: 0.5rem;
}

#input-area {
  width: 100%;
  padding: 0.1rem 0.8rem;
  font-size: 1.5rem;
  text-align: right;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f9fa;
  transition: border-color 0.3s ease;
}

#input-area:focus {
  outline: none;
  border-color: #3498db;
}

.price-quantity-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.display-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.display-item label {
  font-weight: bold;
  color: #2c3e50;
  font-size: 0.9rem;
}

.display-item input {
  padding: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

.unit-price-display {
  text-align: center;
  padding: 1rem 0;
}

.unit-price-display h2 {
  margin: 0;
  font-size: 1rem;
  color: #666;
}

.calculation-formula {
  position: relative;
  padding: 1rem 0;
}

.formula-divider {
  width: 100%;
  height: 2px;
  background-color: #3498db;
  position: relative;
}

.formula-divider::before {
  content: "÷";
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #3498db;
  font-size: 1.2rem;
  font-weight: bold;
}

.bottom-container {
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-shrink: 0;
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 80px;
}

.calculator-flex-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

#buttons {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 0.5rem;
  flex: 1;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

#buttons button {
  width: 100%;
  min-height: 1rem;
  padding: 0.1rem;
  height: clamp(2rem, 5vh, 2.5rem);
  font-size: clamp(1rem, 5vh, 1.2rem);
  border: none;
  border-radius: 8px;
  background: #e8f4fc;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #bde0f7;
  font-weight: bold;
}

#buttons button:hover {
  background: #d1e9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

#buttons button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background: #bde0f7;
}

/* 機能ボタン（CとBS）用のスタイル */
#buttons button:first-child,
#buttons button:last-child {
  background: #e8f4fc;
  border-color: #bde0f7;
  color: #2c3e50;
}

#buttons button:first-child:hover,
#buttons button:last-child:hover {
  background: #d1e9fa;
  border-color: #3498db;
}

#buttons button:first-child:active,
#buttons button:last-child:active {
  background: #bde0f7;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0;
}

.action-buttons button {
  padding: 0.1rem;
  height: clamp(2.2rem, 5vh, 2.7rem);
  font-size: clamp(1.2rem, 5vh, 1.5rem);
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.action-buttons button:hover {
  background: linear-gradient(135deg, #2980b9, #2472a4);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(52, 152, 219, 0.3);
}

.action-buttons button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
  background: linear-gradient(135deg, #2472a4, #2980b9);
}

#history {
  height: auto;
  flex: 0 0 auto;
  display: flex;
  overflow-x: auto;
  gap: 0.25rem;
  padding: 0.5rem;
  margin: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #3498db #f8f9fa;
  flex-shrink: 0;
}

#history::-webkit-scrollbar {
  height: 6px;
}

#history::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

#history::-webkit-scrollbar-thumb {
  background-color: #3498db;
  border-radius: 3px;
}

.history-item {
  flex: 0 0 auto;
  padding: 0.5rem;
  padding-bottom: 1.5rem;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 30px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

.history-item:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.history-item::after {
  content: "タップして保存";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(52, 152, 219, 0.9);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem;
  text-align: center;
  /*transform: translateY(100%);*/
  /*transition: transform 0.3s ease;*/
}

.history-item:hover::after {
  transform: translateY(0);
}

.history-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.history-label {
  flex: 0 0 3em;
  text-align: right;
  font-weight: bold;
  color: #2c3e50;
  font-size: 0.8rem;
}

.history-value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  color: #2c3e50;
  min-width: 80px;
  justify-content: flex-end;
}

.history-value .unit {
  font-size: 0.6rem;
  color: #666;
}

.history-row.unit-price .history-value {
  font-size: 1.2rem;
  padding-left: 1rem;
}

.save-button {
  padding: 0.5rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.save-button:hover {
  background: #2980b9;
}

.save-button:active {
  transform: translateY(1px);
}

h2 {
  color: #2c3e50;
  margin: 1.5rem 0 1rem;
  font-size: 1.5rem;
}

/* モーダル関連のスタイル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem auto;
  max-width: 360px;
  pointer-events: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 0.5rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.4rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.3rem - 1px);
  border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

.modal-backdrop.show {
  display: block;
}

/* フォーム要素のスタイル */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-label {
  margin-bottom: 0.2rem;
  display: inline-block;
  font-weight: 500;
  font-size: 0.85rem;
}

/* ボタンのスタイル */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  color: #fff;
  background-color: #5c636a;
  border-color: #565e64;
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
  transition: opacity 0.15s ease-in-out;
}

.btn-close:hover {
  opacity: 0.75;
}

.preview-data {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-item .label {
  color: #2c3e50;
  font-weight: bold;
}

.preview-item .value {
  color: #3498db;
  font-size: 1.1rem;
  font-weight: bold;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #3498db;
}
.delete-checkbox-column {
  width: 40px;
  padding: 0;
  text-align: center;
}

/* チェックボックスのアニメーション */
.product-checkbox,
.record-checkbox-container {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.product-checkbox.show,
.record-checkbox-container.show {
  opacity: 1;
  transform: translateX(0);
}

/* 商品グループ */
.product-group {
  cursor: pointer;
}

/* レコードアイテム */
.record-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  position: relative;
}

.record-item:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 削除モード時のスタイル */
.record-item.deletable {
  border: 1px dashed #dc3545;
  background-color: #fff;
}

.record-item.deletable:hover {
  /*background-color: #fff8f8;*/
  border: 1px solid #dc3545;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.record-item.selected {
  background-color: #dc8585;
  border-color: #dc3545;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.record-item.selected .record-date-store,
.record-item.selected .record-price-quantity {
  color: rgba(255, 255, 255, 0.8);
}

.record-item.selected .record-unit-price {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.record-item.selected .record-date-store::after {
  background: rgba(255, 255, 255, 0.2);
}

/* レコード内部のスタイル */
.record-date-store {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 4px;
}

.record-price-info {
  font-size: 0.9rem;
}

.record-unit-price {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 2px;
}

.record-price-quantity {
  color: #555;
  font-size: 0.8rem;
}

.record-detail {
  margin-top: 4px;
  color: #555;
  font-style: italic;
}

/* 編集モーダル内の単価表示スタイル */
#edit_modal_unit_price {
  font-weight: bold;
  color: #2c3e50;
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.record-checkbox-container {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.record-item:hover .record-checkbox-container {
  opacity: 1;
}

/* ユニットグループ */
.unit-group {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.unit-group h3 {
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

/* カード共通スタイル */
.card {
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

.card-header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.card-header h2 {
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  font-size: 1.1rem;
}

.card-body {
  background-color: #fff;
}

/* 削除モード切り替えコントロール */
#deleteModeControls,
#normalModeControls {
  position: static;
  width: auto;
  opacity: 1;
  transform: none;
}

#deleteModeControls.show,
#normalModeControls.hide {
  position: static;
  transform: none;
}

/* 商品グループ内の削除コントロール */
.product-records-delete-controls,
.toggle-product-delete {
  transition: none;
  display: none;
}

.product-records-delete-controls.show,
.toggle-product-delete.show {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* 商品グループ削除モード時のスタイル */
.product-group.deletable .toggle-product-delete {
  display: none;
}

.product-group.deletable .product-records-delete-controls {
  display: flex !important;
  gap: 0.5rem;
}

/* 商品グループ内の記録削除モード時のスタイル */
.product-group.records-deletable .toggle-product-delete {
  display: none;
}

.product-group.records-deletable .product-records-delete-controls {
  display: flex !important;
  gap: 0.5rem;
}

.product-group.deletable {
  border: 1px dashed #dc3545;
  background-color: #fff;
  transition: all 0.2s ease;
}

.product-group.deletable:hover {
  /*background-color: #fff8f8;*/
  border: 1px solid #dc3545;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.product-group.deletable .card-body {
  display: none;
}

.product-group.deletable .card-header button {
    display: none;
  }

.product-group.selected {
  background-color: #dc8585;
  border: 1px solid #dc3545;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.product-group.selected .card-header
{
    background-color: rgba(220, 133, 133, 0.5);
}
.product-group.selected .card-body {
    background-color: #dc8585;
}

/*
.product-group.selected .card-header {
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.product-group.selected h2,
.product-group.selected h3 {
  color: #fff;
}

.product-group.selected .unit-group {
  background: rgba(255, 255, 255, 0.1);
}

.product-group.selected .unit-group h3 {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.product-group.selected .record-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.product-group.selected .record-date-store,
.product-group.selected .record-price-quantity {
  color: rgba(255, 255, 255, 0.8);
}

.product-group.selected .record-unit-price {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
*/

/* 商品グループのチェックボックス */
.product-checkbox {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.product-group:hover .product-checkbox {
  opacity: 1;
}

/* 固定フッター */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  background-color: #fff;
  padding: 1rem;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
  margin-top: 1rem;
  margin-bottom: 80px;
  width: 100%;
  height: 90px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  margin-right: 1rem;
  min-width: 0;
}

.filter-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}

.filter-form select {
  width: 200px;
  padding: 0.1rem 2rem 0.1rem 0.25rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.5rem center/16px 12px;
  cursor: pointer;
  font-size: 0.8rem;
}

.filter-form select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.active-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ced4da transparent;
  -webkit-overflow-scrolling: touch;
}

.active-filters::-webkit-scrollbar {
  height: 4px;
}

.active-filters::-webkit-scrollbar-track {
  background: transparent;
}

.active-filters::-webkit-scrollbar-thumb {
  background-color: #ced4da;
  border-radius: 2px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.25rem;
  background-color: #e9ecef;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid #dee2e6;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tag button {
  padding: 0;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.filter-tag button:hover {
  color: #dc3545;
}

#addFilter {
  display: none;
}

.control-buttons {
  display: flex;
  gap: 0.5rem;
}

/* メインコンテンツ */
.main-content {
  padding-bottom: 170px; /* フッターの高さ + 余白 */
}

/* サジェスト機能のスタイル */
.suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1050;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.suggestion-item:hover {
  background-color: #f5f5f5;
}

.form-group {
  position: relative;
  margin-bottom: 0;
}

/* フィルターのスタイル */
.filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #f0f0f0;
  border-radius: 15px;
  padding: 4px 12px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.filter-tag button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.filter-tag button:hover {
  color: #dc3545;
}
.settings-container {
  max-width: 100%;
  margin: 0 auto;
}

.settings-container .card {
  border: none;
  padding-top: 0.4rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-container .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem;
}

.settings-container .card-body {
  padding: 0.1rem 0.8rem;
}

.settings-container .form-group {
  margin-bottom: 0.2rem;
}

.settings-container .form-control-plaintext {
  padding: 0.375rem;
  color: #495057;
  font-size: 1rem;
}

.settings-container .btn {
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.settings-container .btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.settings-container .btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.settings-container .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.settings-container .btn-danger:hover {
  background-color: #bb2d3b;
  border-color: #b02a37;
}

.settings-container .invalid-feedback {
  font-size: 0.875rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

.settings-container .was-validated .form-control:invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.settings-container .was-validated .form-control:valid {
  border-color: #198754;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.account-info, .password-change, .logout {
  background-color: #fff;
  border-radius: 8px;
  padding: 0.1rem 1.2rem 0.8rem 1.2rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  margin-bottom: 0.8rem;
  text-align: center;
}

.header {
  margin-bottom: 0.4rem;
  font-size: 1.5rem;
  text-align: center;
  color: #333;
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.field input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.actions {
  margin-top: 20px;
}

.actions input[type="submit"] {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.actions input[type="submit"]:hover {
  background-color: #45a049;
}

.logout-button {
  background-color: #f44336;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.logout-button:hover {
  background-color: #d32f2f;
} 
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is suggested that you use this file to handle application-wide styles, such as layout and
 * navigation.
 *


 */

/* メインコンテンツの余白調整 */
.container {
  margin-bottom: 100px; /* ナビゲーションバーの高さ + パディング */
}

/* ログイン画面ではナビゲーションバーを非表示にする */
body.sessions-new .navbar.fixed-bottom,
body.registrations-new .navbar.fixed-bottom,
body.registrations-edit .navbar.fixed-bottom,
body.registrations-create .navbar.fixed-bottom {
  display: none;
}

body.sessions-new .container,
body.registrations-new .container,
body.registrations-edit .container,
body.registrations-create .container {
  margin-bottom: 0;
}

/* タブメニューのスタイル */
.navbar.fixed-bottom {
  padding: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  height: 80px;
}

.navbar .nav-link {
  color: #6c757d;
  padding: 4px 0.5rem !important;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  height: 100%;
}

.navbar .nav-link i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.navbar .nav-link.active {
  color: #0d6efd;
}
