/*
 * 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 generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  font-family: "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif !important;
  margin: 0 !important;
}

nav.navbar.navbar-expand.navbar-dark {
  background-color: #007bff !important;
  padding: 0.2rem 1rem !important;
  min-height: 40px !important;
  line-height: 1 !important;
}

.navbar-brand {
  font-size: 0.9rem !important;
  padding: 0 !important;
  margin: 0 !important;
}

.navbar-text {
  font-size: 0.8rem !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  padding: 0 !important;
  margin: 0 !important;
}

.nav-item .btn-sm {
  padding: 0.15rem 0.3rem !important;
  font-size: 0.7rem !important;
  white-space: nowrap !important;
}

.navbar-nav {
  flex-direction: row !important;
  align-items: center !important;
}

.navbar-nav .nav-item {
  font-size: 0.7rem !important;
}

div.container-fluid.d-flex {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  min-height: calc(100vh - 40px) !important;
  width: 100% !important;
}

div.sidebar {
  background-color: #f8f9fa !important;
  min-width: 250px !important;
  max-width: 250px !important;
  padding: 15px !important;
  border-right: 1px solid #dee2e6 !important;
  flex-shrink: 0 !important;
}

div.main-content.flex-grow-1 {
  flex-grow: 1 !important;
  padding: 20px !important;
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 0.85rem !important;
  }
  .navbar-text {
    font-size: 0.7rem !important;
  }
  .nav-item .btn-sm {
    font-size: 0.65rem !important;
    padding: 0.1rem 0.2rem !important;
  }
}

.navbar, .sidebar, .main-content, .alert, .btn, .form-label, .form-control, .nav-link {
  font-family: "Meiryo", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif !important;
}

div.sidebar ul.nav.flex-column li.nav-item a.nav-link.btn {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  transition: background-color 0.3s !important;
  text-align: left !important;
  width: 100% !important;
  background-color: #bcffff !important;
  color: #000 !important;
  border: none !important;
}

div.sidebar ul.nav.flex-column li.nav-item a.nav-link.btn:hover {
  background-color: #a4ffba !important;
}

div.sidebar ul.nav.flex-column li.nav-item a.nav-link.btn.active {
  background-color: #007bff !important;
  color: #fff !important;
}

/* ログイン・ログアウトボタンのホバー時の背景色を変更 */
.navbar .btn-outline-light:hover {
  background-color: #e3f2fd !important;
  color: #212529 !important;
}

/* カードデザイン */
.card {
  border: 1px solid #dee2e6 !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  margin-bottom: 1rem !important;
}

.card-title {
  font-size: 1.25rem !important;
  font-weight: bold !important;
}

.card-text {
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

/* ログインボタンの調整 */
.login-button-container {
  margin-bottom: 1rem !important;
}

.login-button-container .btn {
  font-size: 0.9rem !important;
}

/* タイトル */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold !important;
}

h2 {
  font-size: 1.75rem !important;
  font-weight: bold !important;
}

/* フラッシュメッセージ用アニメーション */
.alert-success.animate-highlight {
  animation: highlight 0.2s ease-out;
}

@keyframes highlight {
  0% {
    background-color: #b1ebbe;
  }
  100% {
    background-color: #d4edda;
  }
}

/* テーブルスタイル */
.table {
  margin-bottom: 1rem !important;
}

.table th,
.table td {
  padding: 0.75rem !important;
  vertical-align: top !important;
  border-top: 1px solid #dee2e6 !important;
}

.table thead th {
  vertical-align: bottom !important;
  border-bottom: 2px solid #dee2e6 !important;
  background-color: #f8f9fa !important;
  font-weight: 600 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* ボタンスタイル */
.btn {
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  display: inline-block !important;
  font-weight: 400 !important;
  text-align: center !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.2s ease-in-out !important;
}

.btn-primary {
  background-color: #007bff !important;
  border-color: #007bff !important;
  color: #fff !important;
}

.btn-primary:hover {
  background-color: #0056b3 !important;
  border-color: #004085 !important;
  color: #fff !important;
}

.btn-sm {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem !important;
  border-radius: 0.25rem !important;
}

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

.form-control:focus {
  color: #212529 !important;
  background-color: #fff !important;
  border-color: #86b7fe !important;
  outline: 0 !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.form-label {
  margin-bottom: 0.5rem !important;
  font-weight: 500 !important;
}

/* ユーティリティクラス */
.mb-3 {
  margin-bottom: 1rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.d-grid {
  display: grid !important;
}

.justify-content-center {
  justify-content: center !important;
}

.text-center {
  text-align: center !important;
}

.text-muted {
  color: #6c757d !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.me-3 {
  margin-right: 1rem !important;
}

.ms-auto {
  margin-left: auto !important;
}

.list-unstyled {
  padding-left: 0 !important;
  list-style: none !important;
}