:root {
  /* カラー変数 */
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --border-color: #dee2e6;
  --bg-light: #f8f9fa;
  --text-dark: #333;
  /* フォントサイズ */
  --font-size-tiny: 12px;
  --font-size-small: 13px;
  --font-size-base: 14px;
  --font-size-large: 16px;
  --font-size-xl: 18px;
  --font-size-h3: 20px;
  --font-size-h2: 24px;
  --font-size-h1: 28px;
  --font-size-icon-large: 3rem;
  /* スペーシング */
  --spacing-tiny: 2px;
  --spacing-small: 5px;
  --spacing-medium: 8px;
  --spacing-base: 10px;
  --spacing-large: 15px;
  --spacing-xl: 20px;
  --spacing-2xl: 25px;
  /* その他 */
  --radius-base: 0.25rem;
  --shadow-card: 0 5px 15px rgba(0, 0, 0, 0.1);
  --height-header: 56px;
  --height-submenu: 50px;
  --admin-width-fixed: 1200px;
  /* エイリアス（後方互換性） */
  --card-shadow: var(--shadow-card);
  --card-border-radius: var(--radius-base);
  --header-height: var(--height-header);
  --submenu-height: var(--height-submenu);
  --side-margin: var(--spacing-base);
}

html,
body {
  overscroll-behavior: none;
  touch-action: pan-y pinch-zoom;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #f0f2f5;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
}

.main-content {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: var(--side-margin);
  padding-right: var(--side-margin);
}

/* ========================================
   1段目ヘッダー（ナビゲーションバー）
   ======================================== */

/* ナビゲーションバー基本スタイル */
.navbar,
header.navbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

/* フロントエンドのヘッダ最大幅設定（レスポンシブは維持） */
body:not(.admin-page) .navbar .container-fluid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* iOS safe-area対応 */
header.fixed-top,
.navbar.fixed-top {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  z-index: 1020;
}

header.fixed-top .container-fluid,
.navbar.fixed-top .container-fluid {
  height: var(--header-height);
  display: flex;
  align-items: center;
}

/* フロントエンド用ナビゲーションバーの色 */
.navbar.frontend-navbar {
  background: #1a1a1b !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ロゴエリア */
.navbar-brand {
  font-weight: 700;
  display: flex;
  align-items: center;
  height: 100%;
  flex: 1 1 auto;
  min-width: 40px;
  max-width: 180px;
  margin-right: 0.25rem;
}

.navbar-logo {
  height: 30px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.navbar-admin-label {
  font-size: 0.9rem;
  margin-left: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar .badge {
  flex-shrink: 0;
  white-space: nowrap;
  margin-right: 0.5rem;
}

/* 右側ボタンエリア（検索・ハンバーガーメニュー） */
.navbar .d-flex:last-child {
  flex-shrink: 0;
  margin-left: auto;
  gap: 0;
}

.navbar .nav-link[data-bs-target="#searchModal"] {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.5rem 0.25rem;
  margin-right: 0.5rem;
}

.navbar .nav-link[data-bs-target="#searchModal"] .fas {
  margin-right: 0.25rem;
}

.hamburger-menu {
  flex-shrink: 0;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
  font-weight: 500;
}

/* ハンバーガーメニュー三本線→バツ変化 */
.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  transition: background-image 0.3s ease;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6L24 24M6 24L24 6'/%3e%3c/svg%3e") !important;
}


/* オーバーレイ */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1025;
  /* サブナビゲーションより上 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.menu-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* コンテナ */
.container,
.container-fluid {
  padding-left: var(--side-margin);
  padding-right: var(--side-margin);
}

/* カード内情報エリア */
.comic-info {
  flex-grow: 1;
  padding: 1rem;
}

/* 検索結果情報 */
.search-result-info {
  margin-bottom: 1.5rem;
}

/* コレクション詳細Flexレイアウト */
.collection-details-flex {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.collection-detail-image {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

.collection-thumbnail-container {
  flex-shrink: 0;
}

.collection-detail-thumbnail {
  width: 200px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collection-info-container {
  flex-grow: 1;
  min-width: 0;
}




/* スマートフォン・タブレット対応 */
@media (max-width: 768px) {
  .collection-details-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .collection-thumbnail-container {
    align-self: center;
  }

  .collection-gallery {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
  }

  .collection-gallery-item:hover {
    transform: scale(1.08);
  }

  .collection-detail-thumbnail {
    width: 200px;
    height: 300px;
  }

  .comic-thumbnail-wrapper {
    width: 80px;
    height: 100px;
  }

  .comic-thumbnail-image {
    width: 80px;
    height: 100px;
  }

  .comic-list-card .card-body {
    padding: 0.75rem;
  }

  .side-menu-panel {
    width: 280px;
    right: -280px;
  }
}

/* コレクション説明テキストのスタイル */
.collection-description {
  line-height: 1.2;
  border: 1px solid #e0e0e0;
  border-radius: 1.375rem;
  padding: 0 1rem 1rem 1rem;
  background-color: #f8f9fa;
}

.collection-description p {
  margin: 1em 0;
  padding: 0;
}

.collection-description h1,
.collection-description h2,
.collection-description h3,
.collection-description h4,
.collection-description h5,
.collection-description h6 {
  margin: 0;
  padding: 0;
}

.collection-description ul,
.collection-description ol {
  margin: 0;
  padding-left: 2rem;
}

.collection-description li {
  margin: 0;
  padding: 0;
}

.collection-description img {
  max-width: 100%;
  height: auto;
  margin: 0;
}

.collection-description a {
  color: var(--primary-color);
  text-decoration: none;
}

.collection-description a:hover {
  text-decoration: underline;
}

.collection-description blockquote {
  padding: 0.5rem 1rem;
  margin: 0 0 1rem;
  border-left: 5px solid #eee;
  font-style: italic;
}

/* トースト通知共通スタイル */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  /* 最前面に表示 */
}

/* コレクションカード - フロントエンドとバックエンド共通 */
.collection-cards {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
  gap: 20px;
  align-items: stretch;
}

.collection-cards .card {
  width: 220px;
}

/* コレクションギャラリー表示 - 新しいスタイル */
.collection-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.collection-gallery-item {
  position: relative;
  width: 100%;
  transition: transform 0.3s ease;
}

.collection-gallery-item:hover {
  transform: scale(1.15);
}

.collection-gallery-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.collection-gallery-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.collection-gallery-item:hover .collection-gallery-thumbnail {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.collection-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.collection-gallery-item:hover .collection-gallery-image {
  filter: brightness(0.9);
}

/* R18ラベル */
.collection-r18-label {
  position: absolute;
  top: 6px;
  left: 6px;
  background-color: #dc3545;
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ホバー時の情報表示 */
.collection-gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px;
  border-radius: 0 0 8px 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  text-align: center;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.collection-gallery-item:hover .collection-gallery-info {
  opacity: 1;
  transform: translateY(0);
}

.collection-gallery-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 3px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

.collection-gallery-author {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-gallery-release-date {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* 新規追加ボタン - ギャラリー表示用 */
.collection-gallery-thumbnail.add-new-card-content {
  border: 2px dashed #ccc;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6c757d;
  transition: all 0.3s ease;
}

.collection-gallery-link:hover .collection-gallery-thumbnail.add-new-card-content {
  border-color: #007bff;
  background-color: #e7f3ff;
  color: #007bff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.add-new-card-icon {
  font-size: 36px;
  margin-bottom: 6px;
  display: block;
}

.add-new-card-text {
  font-size: 12px;
  font-weight: bold;
}

/* 漫画一覧カード - 横長レイアウト */
.comics-grid {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  margin-top: 1.5rem;
}

/* ページネーション */
.pagination {
  margin-top: 20px;
  margin-bottom: 20px;
}

.pagination-container {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ボタンスタイル - CSS変数を使用してテーマカスタマイズ対応 */
.btn {
  display: inline-block;
  font-weight: 400;
  color: #212529;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all .15s ease-in-out;
}

.btn:focus,
.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  color: #fff;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-success {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  color: #fff;
  background-color: #218838;
  border-color: #1e7e34;
}

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

.btn-secondary:hover {
  color: #fff;
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-secondary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger:hover {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-warning {
  color: #ffc107;
  border-color: #ffc107;
}

.btn-outline-warning:hover {
  color: #212529;
  background-color: #ffc107;
  border-color: #ffc107;
}

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

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

/* フッター */
.footer {
  margin-top: 2rem;
  padding: 1rem 0;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

/* メインコンテンツコンテナ */
.page-content-container {
  padding-top: calc(var(--submenu-height) + 20px);
  padding-bottom: 20px;
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 30px;
  padding-right: 30px;
  background-color: #fff;
}

/* シェアリンクアクセス時（2段目メニューなし）は2段目メニュー分上に詰める */
.page-content-container.no-submenu {
  padding-top: 20px;
  /* ヘッダー直下 + 隙間20pxのみ */
}

.custom-card-title-truncate {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   2段目ヘッダー（サブナビゲーション）
   ======================================== */

.sub-navbar {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  height: var(--submenu-height);
  padding: 0;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1019;
}

/* フロントエンドのサブナビゲーション最大幅設定 */
body:not(.admin-page) .sub-navbar {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
}

/* レーベルスクロールコンテナ */
.label-scroll-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* レーベルスクロールコンテンツ */
.label-scroll-content {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  height: 100%;
  width: calc(100% - 120px);
  margin-left: 60px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

/* スクロールバーを非表示 */
.label-scroll-content::-webkit-scrollbar {
  display: none;
}

/* スクロール不要時は中央寄せ */
.label-scroll-content.centered {
  margin-left: 0;
  width: 100%;
  justify-content: center;
}

.sub-navbar .navbar-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  height: 100%;
}

.sub-navbar .nav-item {
  margin: 0 0.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sub-navbar .nav-link {
  padding: 0.65rem 0.9rem;
  color: var(--text-dark) !important;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 4px;
  text-align: center;
  display: inline-block;
  line-height: 1.4;
  white-space: nowrap;
}

.sub-navbar .nav-link i {
  margin-right: 0.5rem;
}

.sub-navbar .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sub-navbar .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(13, 110, 253, 0.1);
}

/* スクロールインジケーター（三角形矢印） */
.label-scroll-indicator {
  position: absolute;
  top: 0;
  height: 100%;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: rgba(248, 249, 250, 0.95);
}

.label-scroll-left {
  left: 0;
}

.label-scroll-right {
  right: 0;
}

/* Font Awesomeアイコンを非表示（CSS三角形を使用） */
.label-scroll-indicator i {
  display: none;
}

/* CSS三角形 */
.label-scroll-indicator::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
  animation: pulse 1.5s ease-in-out infinite;
}

.label-scroll-left::before {
  border-width: 10px 14px 10px 0;
  border-color: transparent var(--text-dark) transparent transparent;
}

.label-scroll-right::before {
  border-width: 10px 0 10px 14px;
  border-color: transparent transparent transparent var(--text-dark);
}

/* スクロール可能な時に表示＆クリック可能に */
.label-scroll-indicator.show {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.label-scroll-indicator.show::before {
  pointer-events: auto;
}

/* パルスアニメーション */
@keyframes pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.9;
  }
}

/* ヘッダーメニュー内のボタン要素の調整 */
.sub-navbar .nav-item .btn {
  display: flex;
  align-items: center;
  border-radius: 0.25rem;
  white-space: nowrap;
  line-height: 1.4;
}

.sub-navbar .nav-item:last-child,
.sub-navbar .nav-item:nth-last-child(2) {
  display: flex;
  align-items: center;
}

/* ハンバーガーメニュー */
.hamburger-menu {
  position: relative;
  z-index: 1027;
  /* サイドメニューパネルより上 */
}

.hamburger-button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 1028;
  /* 他の要素より確実に上に */
}

.hamburger-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.hamburger-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* サイドメニューパネル */
.side-menu-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background-color: #343a40;
  z-index: 1026;
  /* オーバーレイより上、ハンバーガーボタンより下 */
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
}

.side-menu-panel.open {
  right: 0;
}

.side-menu-header {
  background-color: #495057;
  padding: 15px 20px;
  border-bottom: 1px solid #6c757d;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-menu-title {
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

.side-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 3px;
  z-index: 1027;
  /* パネル内で最前面 */
  position: relative;
  margin-right: 0;
}

.side-menu-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.side-menu-content {
  padding: 20px;
}

.side-menu-section {
  margin-bottom: 30px;
}

.side-menu-section:last-child {
  margin-bottom: 0;
}

.side-menu-section-title {
  color: #adb5bd;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #495057;
}

.side-menu-item {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  border: 1px solid transparent;
  position: relative;
}

.side-menu-item:hover {
  background-color: #495057;
  color: white;
  text-decoration: none;
}

.side-menu-item i {
  width: 20px;
  margin-right: 10px;
}

/* セーフモードトグル（サイドメニュー内） */
.side-menu-safe-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: transparent;
  transition: background-color 0.3s ease;
  position: relative;
}

.side-menu-safe-mode:hover {
  background-color: #495057;
}

.side-menu-safe-mode span {
  display: flex;
  align-items: center;
}

.side-menu-safe-mode i {
  width: 20px;
  margin-right: 10px;
}

.safe-mode-toggle {
  display: flex;
  align-items: center;
}

.safe-mode-switch {
  position: relative;
  width: 50px;
  height: 24px;
  background-color: #6c757d;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.safe-mode-switch.active {
  background-color: #0d6efd;
}

.safe-mode-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.safe-mode-switch.active .safe-mode-slider {
  transform: translateX(26px);
}

/* ユーザー情報（サイドメニュー内） */
.side-menu-user-info {
  color: white;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.side-menu-user-info .user-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.side-menu-user-info .user-company {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.side-menu-user-info .user-type {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.side-menu-user-info .user-permission-badge {
  margin-top: 8px;
}

.side-menu-user-info .badge {
  font-size: 12px;
  padding: 4px 8px;
}