html {
  font-size: 16px;
}

body {
  background-color: #eff1f4 !important;
}

/* ヘッダー */
#header-content {
  background-color: white;
  margin-left: 136px;
  height: 32px;
  line-height: 32px;
  width: auto;
  border-bottom: 1px solid #e6e6e6;
}

#header-content.sidebar-collapsed {
  margin-left: 40px;
}

#header-content .header-title {
  color: #3d454d;
  font-size: 0.8125rem;
}

#header-content .dropdown .dropdown-menu {
  font-size: 0.8125rem;
  padding: 0;
  min-width: 6rem;
}

#header-content .dropdown .dropdown-menu .dropdown-item {
  padding: 0 1rem;
  height: 30px;
}

/* サイドバー */
#sidebar {
  background-color: #4772b3;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  font-size: 0.8125rem;
  /* メニュー数が画面高を超えても下部まで辿れるように縦スクロールさせる */
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-collapsed {
  width: 40px;
}

.sidebar-collapsed #sidebar {
  width: 40px;
}

.sidebar-collapsed .sidebar-link {
  display: none;
}

.nav-item.sidebar-link:first-child {
  border-top: 1px solid #334691;
  border-bottom: 1px solid #334691;
}

.nav-item.sidebar-link {
  border-bottom: 1px solid #334691;
}

/* ボタン */

.btn.sidebar-btn {
  border-radius: 50%;
  text-align: center;
  font-size: 12px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: #4772b3;
  border-color: #fff;
  margin-left: 0.45rem;
}

.btn.sidebar-btn:hover {
  background-color: #375d96;
  border-color: #fff;
}

.btn.sidebar-btn:focus {
  background-color: #4772b3;
  border-color: #fff;
}

.btn.sidebar-btn:focus:hover {
  background-color: #375d96;
}

.btn.btn-small {
  font-size: 0.8125rem;
}

.button:disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

#sidebar-toggle:focus {
  box-shadow: none;
}

.sidebar-btn {
  width: 24px;
  height: 24px;
}

/* サイドバーとサブメニュー共通のリンクスタイル */
#sidebar .nav-link {
  color: #fff;
}

#sidebar .nav-link:hover {
  background-color: #a6a6a6;
}

#sidebar a.active {
  opacity: 1;
  font-weight: bold;
  background-color: #444c5b;
}

/* forecast 用の参照マスタ (販売情報マスタ / 営業担当者マスタ) を視覚的に区別する */
#sidebar .nav-link.nav-link-readonly {
  color: #ffd43b;
}

#sidebar .nav-link.nav-link-readonly::after {
  content: " #F";
  font-size: 0.85em;
  font-weight: bold;
  opacity: 0.9;
}

main {
  margin-left: auto;
  width: calc(100% - 136px) !important;
}

main.sidebar-collapsed {
  flex: 1 1 auto;
  margin-left: 40px;
}

.search-content {
  font-size: 0.75rem;
  max-width: 770px;
}

.small-input {
  height: 1.5rem;
  padding: 0.25rem;
}
.form-control.small-input {
  font-size: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 0.275rem 0.75rem;
}

.small-input-size {
  height: 1.5rem;
  padding: 0.25rem;
}
.form-control.small-input-size {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  margin-bottom: 0.1rem;
  padding: 0.1rem 0.75rem;
}

.col-form-label-size {
  font-size: 0.75rem;
  display: inline-block;
  line-height: 3.0;
}

.custom-col {
  max-width: 110px !important;
}

/* フラッシュメッセージ */
.alert.visible {
  visibility: visible;
}


/* 検索欄 */
.row.search-container {
  font-size: 0.8125rem;
  margin: 0;
  padding: 12px;
  background-color: white;
  border-radius: 4px;
}

.btn-search {
  background-image: linear-gradient(to bottom, #b9b59d, #8f8b77);
}


/* ボタンのスタイル */
.button {
  font-size: 0.8125rem;
  padding: 8px 12px;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.button:hover {
  color: black;
}
.button:active {
  box-shadow: none; /* 影を解除 */
  transform: translateY(2px); /* Y軸方向に少し移動（凹むような表現） */
}


/* ボタンカラー */
.btn-submit {
  background-image: linear-gradient(to bottom, #0D6EFD, #095ac4);
}

.export,
.auto-fill {
  background-image: linear-gradient(to bottom, #b9b59d, #8f8b77);
}

.filter {
  background-image: linear-gradient(to bottom, #b9b59d, #8f8b77);
}

.update {
  background-image: linear-gradient(to bottom, #FFA500, #d19547);
}

.btn-show {
  background-image: linear-gradient(to bottom, #0D6EFD, #095ac4);
}

.btn-toggle {
  background-image: linear-gradient(to bottom, #6c757d, #535d66);
}

.upload-excel-file {
  background-image: linear-gradient(to bottom, #0D6EFD, #095ac4);
}

.btn-sort {
  color: black;
  background-image: linear-gradient(to bottom, #ffc107, #e9b10b);
}
.btn-sort:hover {
  color: white;
}

.btn-export {
  display: inline-block;
  text-decoration: none;
  width: 150px;
  font-size: 0.63rem;
  padding: 8px;
  text-align: center;
}

.small-input {
  margin-top: 4px;
}

/* スピナー */
.hidden-spread {
  visibility: hidden;
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
}

.hidden-spread.visible {
  visibility: visible;
}

.spinner-border {
  visibility: hidden;
}

.spinner-border.visible {
  visibility: visible;
}

.gc-statusbar {
  font-size: 10pt !important;

}

.pointer:hover {
  cursor: pointer;
}

.sidebar-has-submenu { 
  position: relative; 
}
.sidebar-submenu {
  position: absolute;
  top: -1px;
  left: 100%;
  display: none !important;
  background-color: #4772b3;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 220px;
  z-index: 1000;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
}

/* サブメニューのアイテムは通常のサイドバーリンクと同じボーダー */
.sidebar-submenu .nav-item { 
  padding: 0;
  border-bottom: 1px solid #334691;
}
.sidebar-submenu .nav-item:first-child {
  border-top: 1px solid #334691;
}

/* サブメニューのリンクは、サイドバーのスタイルを継承 */
/* 個別のスタイルは不要（#sidebar .nav-link のルールが適用される） */

/* ホバー・フォーカス時にサブメニューを表示 */
.sidebar-has-submenu:hover .sidebar-submenu,
.sidebar-has-submenu:focus-within .sidebar-submenu {
  display: block !important;
}

/* サイドバーが折りたたまれているときは表示しない */
.sidebar-collapsed .sidebar-submenu { 
  display: none !important; 
}

.schedule-container {
    width: 100%;
    overflow-x: auto;
  }
  
  .schedule-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #000;
    background-color: white;
    margin-bottom: 0;
  }
  
  .schedule-table thead th,
  .schedule-table tbody td {
    border: 1px solid #666;
  }
  
  .week-header-row {
    background-color: #e8e8e8;
  }
  
  .week-header-cell {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #666;
    position: relative;
    height: 40px;
  }
  
  .nav-button {
    padding: 6px 18px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-button:first-of-type {
    left: 10px;
  }
  
  .nav-button:last-of-type {
    right: 10px;
  }
  
  .week-nav-btn {
    padding: 4px 14px;
    font-size: 12px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .week-nav-btn#prev-week-btn {
    left: 10px;
  }

  .week-nav-btn#next-week-btn {
    right: 10px;
  }

  .week-title {
    font-size: 13px;
    font-weight: normal;
  }
  
  .title-cell {
    background-color: white;
    text-align: left;
    padding: 8px 10px;
    font-weight: bold;
    font-size: 13px;
    width: 200px;
    min-width: 180px;
    vertical-align: middle;
    border: 1px solid #666;
  }
  
  .day-header {
    background-color: #e8e8e8;
    font-weight: bold;
    padding: 4px 1px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #666;
    white-space: nowrap;
  }
  
  .day-header.saturday {
    background-color: #5858ff;
    color: white;
  }
  
  .day-header.sunday {
    background-color: #ff4444;
    color: white;
  }
  
  .week-number {
    background-color: #f5f5f5;
    font-size: 11px;
    padding: 2px 1px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #666;
  }
  
  .week-number.saturday {
    background-color: #a8a8ff;
    color: white;
  }
  
  .week-number.sunday {
    background-color: #ff9999;
    color: white;
  }
  
  .label-cell {
    width: 200px;
    min-width: 180px;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
    font-weight: normal;
    border: 0;
    white-space: nowrap;
  }
  
  .label-cell input[type="checkbox"] {
    margin-right: 3px;
    vertical-align: middle;
  }
  
  .label-cell .note {
    font-size: 10px;
    color: #666;
    display: block;
    margin-top: 2px;
    line-height: 1.2;
    white-space: normal;
  }

  .label-cell-ai {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: normal;
    border: 0 !important;
  }

  .checkbox-wrapper {
    display: flex;
    align-items: center;
  }

  .checkbox-wrapper input[type="checkbox"] {
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
  }

  .text-wrapper {
    flex: 1;
  }
  
  .value-cell {
    min-width: 20px;
    background-color: #fff;
    padding: 3px 1px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #666;
    overflow: hidden;
  }
  
  .value-cell.saturday {
    background-color: #d0d0ff;
  }
  
  .value-cell.sunday {
    background-color: #ffd0d0;
  }
  
  .merged-cell {
    text-align: center;
    font-size: 13px;
    padding: 6px 4px;
    border: 1px solid #666;
  }
  
  .merged-cell.saturday {
    background-color: #d0d0ff;
  }
  
  .merged-cell.sunday {
    background-color: #ffd0d0;
  }
  
  .input-cell {
    padding: 0;
    border: 1px solid #666;
    vertical-align: middle;
    position: relative;
  }

  .input-cell .data-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fffff0;
    text-align: center;
    font-size: 12px;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
  
  .input-cell.saturday {
    background-color: #d0d0ff;
  }
  
  .input-cell.sunday {
    background-color: #ffd0d0;
  }
  
  .text-cell {
    text-align: left;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #666;
  }
  
  .textarea-cell {
    padding: 4px;
    border: 1px solid #666;
  }
  
  .textarea-input {
    width: 100%;
    border: 1px solid #999;
    padding: 4px 6px;
    font-size: 13px;
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    box-sizing: border-box;
    height: 24px;
  }
