/* ===== Base ===== */
:root {
  --bs-body-color: #374151;
  --bs-heading-color: #374151;
}

html {
  height: 100%;
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background-color: #f5f6fa;
  font-family: 'Noto Sans JP', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  color: #374151;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #374151;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background-color: #1e2a38;
  color: #cdd5e0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-brand:hover {
  color: #90cdf4;
  text-decoration: none;
}

.sidebar-close {
  background: none;
  border: none;
  color: #cdd5e0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.sidebar-close:hover {
  color: #fff;
}

.sidebar-nav {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
  flex: 1;
}

.sidebar-nav li a {
  display: block;
  padding: 0.7rem 1.25rem;
  color: #a0aec0;
  text-decoration: none;
  font-size: 1.05rem;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

/* ===== Overlay (mobile) ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

/* ===== Main content ===== */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - 240px);
}

.main-body {
  padding: 1.5rem 2rem;
  flex: 1;
}

/* ===== Topbar (mobile only) ===== */
.topbar {
  padding: 0.6rem 1rem;
  background: #1e2a38;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.sidebar-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .main-body {
    padding: 1rem;
  }
}

/* ===== Form helpers ===== */
.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* ===== Login page ===== */
body.login-page {
  display: block;
  min-height: 100vh;
  background-color: #060f1e;
  background-image:
    /* ネットワークノード風ドットグリッド */
    radial-gradient(rgba(64, 180, 200, 0.18) 1px, transparent 1px),
    /* 左下から右上への光源 */
    radial-gradient(ellipse at 20% 70%, rgba(0, 100, 160, 0.55) 0%, transparent 55%),
    /* 右上光源 */
    radial-gradient(ellipse at 80% 20%, rgba(0, 60, 120, 0.45) 0%, transparent 50%),
    /* ベースグラデーション */
    linear-gradient(145deg, #071828 0%, #0a2540 40%, #0d3350 70%, #071828 100%);
  background-size: 36px 36px, 100% 100%, 100% 100%, 100% 100%;
}

/* ネットワーク線のオーバーレイ（疑似要素） */
body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(64, 180, 200, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 180, 200, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  z-index: 0;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2.75rem 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5), 0 0 80px rgba(0, 100, 180, 0.15);
}

.login-card .form-label {
  color: rgba(255, 255, 255, 0.8);
}

.login-card .form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 8px;
}

.login-card .form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(64, 180, 200, 0.6);
  box-shadow: 0 0 0 3px rgba(64, 180, 200, 0.15);
  color: #fff;
}

.login-card .form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-card .btn-primary {
  background: linear-gradient(135deg, #1a6fa8, #0d9aa8);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.65rem;
  transition: opacity 0.2s;
}

.login-card .btn-primary:hover {
  opacity: 0.88;
}

.login-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px rgba(64, 180, 200, 0.4);
}

/* ===== Sidebar logout ===== */
.sidebar-footer {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer form {
  margin: 0;
}

.sidebar-settings-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #a0aec0;
  font-size: 1.05rem;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-settings-btn:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

.sidebar-logout-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #a0aec0;
  font-size: 1.05rem;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

/* ===== サイドバー 未対応バッジ ===== */
@keyframes blink-overdue {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

.sidebar-overdue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #ef4444;
  color: #fff;
  animation: blink-overdue 2s ease-in-out infinite;
}



/* ===== Account management ===== */
.contract-badge {
  display: inline-block;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-before {
  background: #e9ecef;
  color: #495057;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-paused {
  background: #fef3c7;
  color: #92400e;
}

.status-ended {
  background: #fee2e2;
  color: #991b1b;
}

.svc-badge {
  display: inline-block;
  width: 6rem;
  padding: 0.22em 0.4em;
  border-radius: 4px;
  border: 2px solid;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.25rem;
  white-space: nowrap;
  text-align: center;
}

.svc-badge.autologin-badge {
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.svc-badge.autologin-badge:hover {
  filter: brightness(1.15) saturate(1.2);
  transform: scale(1.06);
}

.gender-badge {
  display: inline-block;
  padding: 0.18em 0.55em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.gender-badge-male {
  background: #dbeafe;
  color: #1d4ed8;
}

.gender-badge-female {
  background: #ffe4e6;
  color: #be123c;
}

.gender-badge-other {
  background: #f3f4f6;
  color: #6b7280;
}

/* 職種名クリックリンク */
.job-edit-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.job-edit-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 追加ボタン（丸い緑時計） */
.btn-add-round {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #16a34a;
  border-color: #16a34a;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-add-round:hover {
  background-color: #15803d;
  border-color: #15803d;
  color: #fff;
}

.btn-memo-round {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-memo-round:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.svc-indeed {
  background: #FFFFFF;
  color: #2557A7;
  border-color: #2557A7;
}

.svc-kyuujin {
  background: #037ACC;
  color: #FFFFFF;
  border-color: #64D1EA;
}

.svc-engage {
  background: #4DCCD4;
  color: #FFFFFF;
  border-color: #4DCCD4;
}

.svc-section-header {
  display: flex;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

/* ===== Account list table (sticky header) ===== */
.account-list-wrap {
  overflow-y: auto;
}

/*
 * sticky + border-collapse:collapse でスクロール時にボーダーが消えるブラウザバグの回避。
 * テーブルを border-separate にして、ヘッダー下線を box-shadow で代替する。
 */
.account-list-table {
  border-collapse: separate;
  border-spacing: 0;
  --bs-table-hover-bg: transparent;
  --bs-table-color: #374151;
  color: #374151;
}

.account-list-table thead th {
  position: sticky;
  background-color: #7a8faf;
  color: #ffffff;
  z-index: 1;
  white-space: nowrap;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  /* ヘッダー下部のボーダーを box-shadow で描く（sticky でも消えない） */
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* rowspan=2 セルを垂直中央揃え */
.account-list-table thead th.al-rowspan {
  vertical-align: middle;
}

.account-list-table thead tr:first-child th {
  top: 0;
}

.account-list-table thead tr:nth-child(2) th {
  /* top は JS で動的にセット */
  box-shadow: inset 0 -2px 0 #5d7096;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* 偶数行ゼブラ */
.account-list-table tbody tr:nth-child(even)>td {
  background: #F8FAFC;
}

/* ホバー */
.account-list-table tbody tr:hover>td {
  background: #e8f4fd;
}

/* 行選択 */
.account-list-table tbody tr.table-active>td {
  background: #b3d9f7 !important;
}

/* グループ区切りボーダー（ヘッダー・ボディ共通） */
.account-list-table .al-group-sep {
  border-left: 1px solid #ced4da !important;
}

/* 媒体グループヘッダーを均等幅に（求人ボックスに合わせる） */
.account-list-table thead tr:first-child th.al-group-sep {
  min-width: 8rem;
}

/* 自動化ステータスバッジ */
.auto-badge {
  display: inline-block;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.auto-badge.is-auto {
  background: #d1fae5;
  color: #065f46;
}

.auto-badge.is-manual {
  background: #fef3c7;
  color: #92400e;
}

/* 企業名は残余スペースを全て占有、ステータスはバッジ幅に収める */
.account-list-table .al-col-name {
  width: 100%;
}

.account-list-table .al-col-status {
  width: 7rem;
  white-space: nowrap;
}

/* 企業名セルを折り返さない */
.account-list-table tbody td:first-child {
  white-space: nowrap;
}

/* 自動化ステータス列（3列目以降）を中央揃え・最小幅に収める */
.account-list-table thead tr:nth-child(2) th,
.account-list-table tbody td:nth-child(n+3):not(:last-child) {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}

/* ===== Memo ===== */
.memo-card {
  border-left: 3px solid #22c55e !important;
}

.memo-date-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
}

.memo-date-divider::before,
.memo-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.memo-date-divider:first-child {
  margin-top: 0;
}

.memo-completed {
  border-left-color: #d1d5db !important;
  opacity: 0.75;
}

/* ピン止め sticky ラッパー */
.memo-pinned-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f5f6fa;
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

/* ピン止めヘッダー区切り */
.memo-pin-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  color: #d97706;
  font-size: 0.8rem;
  font-weight: 600;
}

.memo-pin-divider::before,
.memo-pin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #fde68a;
}

/* ピン止めカード */
.memo-card.memo-pinned {
  border-left-color: #f59e0b !important;
}

.memo-author {
  font-size: 1.25rem;
  line-height: 1;
}

.comment-author {
  font-size: 1.1rem;
  line-height: 1;
  margin-right: 0.25rem;
}

.comment-edit-btn {
  background: none;
  border: none;
  padding: 0 0.2rem;
  color: #9ca3af;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.comment-item:hover .comment-edit-btn {
  opacity: 1;
}

.comment-edit-btn:hover {
  color: #374151;
}

.memo-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  overflow: hidden;
  max-height: calc(0.95rem * 1.6 * 3);
  transition: max-height 0.2s ease;
}

.memo-text.expanded {
  max-height: none;
}

.memo-text-toggle {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #6b7280;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.memo-text-toggle:hover {
  color: #374151;
}

.comment-body {
  font-size: 0.88rem;
  color: #4b5563;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ステータスドット */
.memo-status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.memo-dot-active {
  background: #22c55e;
  box-shadow: 0 0 0 2px #bbf7d0;
}

.memo-dot-done {
  background: #d1d5db;
}

.remind-badge {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* バッジ自体をクリッカブルにするボタン版 */
.remind-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  line-height: 1.4;
  transition: filter 0.15s;
}

.remind-badge-btn:hover {
  filter: brightness(0.88);
}

/* リマインド未設定時のゴーストベル */
.remind-badge-empty {
  background: none;
  color: #adb5bd;
  padding: 0.1em 0.3em;
}

.remind-badge-empty:hover {
  color: #6c757d;
  filter: none;
}

.remind-upcoming {
  background: #fef9c3;
  color: #854d0e;
}

.remind-overdue {
  background: #fee2e2;
  color: #991b1b;
}

.btn-xs {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* コメントスレッド */
.comment-thread {
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
  max-height: 160px;
  overflow-y: auto;
}

.comment-item+.comment-item {
  margin-top: 0.6rem;
}

.comment-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.1rem;
}

/* ===== Account edit table ===== */
.account-edit-table {
  border-collapse: collapse;
  width: 100%;
}

.account-edit-table thead th {
  background: #1e2a38;
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.account-edit-table tbody td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.account-edit-table tbody tr:last-child td {
  border-bottom: none;
}

/* ID・パスワード列は伸びる */
.account-edit-table td.col-id,
.account-edit-table td.col-pass {
  width: 28%;
}

/* 自動化セレクトは内容幅だけ */
.account-edit-table td.col-auto {
  width: 1%;
  white-space: nowrap;
}

.account-edit-table .form-select-auto {
  width: auto;
  min-width: 6rem;
}

.account-edit-table .input-group {
  min-width: 160px;
}

/* ===== 自動ログインボタン ===== */
.autologin-btn {
  font-size: 0.75rem;
  font-weight: 600;
  border-width: 2px;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.1s;
}

.autologin-btn:not(:disabled):hover {
  filter: brightness(1.15) saturate(1.2);
  transform: scale(1.06);
}

.autologin-indeed {
  background: #FFFFFF;
  color: #2557A7;
  border-color: #2557A7;
}

.autologin-indeed:hover,
.autologin-indeed:focus {
  background: #FFFFFF;
  color: #2557A7;
  border-color: #2557A7;
}

.autologin-kyuujin {
  background: #037ACC;
  color: #FFFFFF;
  border-color: #64D1EA;
}

.autologin-kyuujin:hover,
.autologin-kyuujin:focus {
  background: #037ACC;
  color: #FFFFFF;
  border-color: #64D1EA;
}

.autologin-engage {
  background: #4DCCD4;
  color: #FFFFFF;
  border-color: #4DCCD4;
}

.autologin-engage:hover,
.autologin-engage:focus {
  background: #4DCCD4;
  color: #FFFFFF;
  border-color: #4DCCD4;
}

/* ===== Remind Picker Dropdown ===== */
.remind-picker-wrap .remind-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, .12);
  min-width: 130px;
  display: none;
  padding: 0.25rem 0;
}

.remind-picker-wrap .remind-dropdown.show {
  display: block;
}

.remind-option {
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
  user-select: none;
}

.remind-option:hover {
  background: #f0f7ff;
}

.remind-option.remind-custom {
  border-top: 1px solid rgba(0, 0, 0, .1);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  color: #0d6efd;
}

.remind-option.remind-clear-opt {
  border-top: 1px solid rgba(0, 0, 0, .1);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  color: #dc3545;
}

.remind-option.remind-clear-opt:hover {
  background: #fff5f5;
}

/* ---- ホーム ダッシュボードパネル ---- */
.dashboard-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
  overflow: hidden;
}

.dashboard-panel-body {
  padding: 0.5rem 0.75rem;
  height: calc(10 * 2.4rem);
  /* 約10行分 */
  overflow-y: auto;
}

.no-applicant-body {
  height: calc(10 * 2.4rem);
  overflow-y: auto;
  padding: 0;
}

.dashboard-empty {
  text-align: center;
  color: #adb5bd;
  font-size: 0.83rem;
  padding: 1.5rem 0;
}

/* ---- タブバー ---- */
.remind-tab-bar {
  display: flex;
  border-bottom: 1px solid #e9ecef;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.remind-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 0.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

/* 非選択時：文字は各色（やや薄め）、ボーダーはグレー */
.remind-tab[data-tab="overdue"] {
  color: #f87171;
  border-bottom-color: #d1d5db;
}

.remind-tab[data-tab="today"] {
  color: #4ade80;
  border-bottom-color: #d1d5db;
}

.remind-tab[data-tab="upcoming"] {
  color: #60a5fa;
  border-bottom-color: #d1d5db;
}

.remind-tab:hover {
  background: #f1f5f9;
}

/* 選択時は濃い色 + 白背景 */
.remind-tab.active[data-tab="overdue"] {
  color: #dc2626;
  border-bottom-color: #ef4444;
  background: #fff;
}

.remind-tab.active[data-tab="today"] {
  color: #16a34a;
  border-bottom-color: #22c55e;
  background: #fff;
}

.remind-tab.active[data-tab="upcoming"] {
  color: #1d4ed8;
  border-bottom-color: #3b82f6;
  background: #fff;
}

.remind-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
}

.remind-tab.active[data-tab="overdue"] .remind-tab-count {
  background: #ef4444;
  color: #fff;
}

.remind-tab.active[data-tab="today"] .remind-tab-count {
  background: #22c55e;
  color: #fff;
}

.remind-tab.active[data-tab="upcoming"] .remind-tab-count {
  background: #3b82f6;
  color: #fff;
}

/* ---- ページング ---- */
.remind-pager {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid #f1f3f5;
}

.remind-pager:empty {
  display: none;
}

.remind-pager-count {
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.4rem;
}


/* ---- ホーム リマインドリスト ---- */
.remind-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.remind-list li {
  border-bottom: 1px solid #e9ecef;
}

.remind-list li:last-child {
  border-bottom: none;
}

.remind-list li:nth-child(even) .remind-list-row {
  background: #f8fafc;
}

.remind-list-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: #374151;
  transition: background 0.1s;
}

.remind-list-row:hover {
  background: #e8f4fd;
  color: #374151;
}

/* ---- テーブルをremind-listと同じ見た目にするクラス ---- */
.tbl-remind tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.tbl-remind tbody tr:last-child {
  border-bottom: none;
}

.tbl-remind tbody tr:nth-child(even)>td {
  background: #F8FAFC;
}

.tbl-remind tbody tr:hover>td {
  background: #e8f4fd !important;
}

/* ===== 実績管理画面 テーブル固定 ===== */
.achievement-filter-card {
  position: sticky;
  top: 0;
  z-index: 200;
}

.achievement-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

#achievement-table th, #achievement-table td {
  border-right: 1px solid #dee2e6 !important;
}
#achievement-table th:last-child, #achievement-table td:last-child {
  border-right: none !important;
}
#achievement-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* 実績管理テーブルはホバー背景なし */
#achievement-table tbody tr:hover>td {
  background: transparent !important;
}
#achievement-table tbody tr.ach-even:hover>td {
  background: #F8FAFC !important;
}
#achievement-table tbody tr.row-unregistered:hover>td {
  background: rgba(220, 53, 69, 0.10) !important;
}

.tbl-remind thead th {
  font-weight: 600;
  color: #ffffff;
  background: #7a8faf;
  border-bottom: 2px solid #5d7096;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
}

.page-header h2 {
  color: #6b7280;
  font-weight: 600;
}

.tbl-remind tbody td {
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  border: none;
  color: #374151;
}

.filter-card .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.filter-card .form-control,
.filter-card .form-select {
  font-size: 1rem;
}

.filter-card .btn-sm {
  font-size: 0.82rem;
}

.remind-list-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.remind-dot-today {
  background: #22c55e;
}

.remind-dot-overdue {
  background: #ef4444;
}

.remind-dot-upcoming {
  background: #3b82f6;
}

.remind-list-author {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.remind-list-company {
  font-weight: 600;
  font-size: 0.83rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: 16rem;
}

.remind-list-text {
  font-size: 0.83rem;
  color: #6c757d;
  min-width: 0;
  flex: 1 1 0;
}

.remind-list-date {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  white-space: nowrap;
}

.remind-date-today {
  background: #dcfce7;
  color: #166534;
}

.remind-date-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.remind-date-upcoming {
  background: #dbeafe;
  color: #1e40af;
}

/* ---- 実績テーブル: 企業グループ単位のゼブラ ---- */
#achievement-table tbody tr:nth-child(even)>td {
  background: unset;
}

#achievement-table tbody tr.ach-even>td {
  background: #F8FAFC;
}

#achievement-table tbody tr.row-unregistered>td {
  background: rgba(220, 53, 69, 0.10);
}

.remind-tbl {
  border-collapse: collapse;
  table-layout: fixed;
}

.remind-tbl tbody tr {
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
}

.remind-tbl tbody tr:last-child {
  border-bottom: none;
}

.remind-tbl tbody tr:nth-child(even)>td {
  background: #F8FAFC;
}

.remind-tbl tbody tr:hover>td {
  background: #e8f4fd;
}

.remind-tbl td {
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

.remind-tbl-dot {
  width: 1.2rem;
  padding-right: 0 !important;
}

.remind-tbl-date {
  width: 4.5rem;
}

.remind-tbl-by {
  width: 3.5rem;
  color: #6b7280 !important;
  font-size: 0.8rem !important;
}

.remind-tbl-co {
  width: 18rem;
  font-weight: 600;
}

.remind-tbl-memo {
  color: #6c757d;
}


/* ジャンプ先メモのハイライト */
@keyframes memo-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, .7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(251, 191, 36, .25);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
  }
}

.memo-highlight {
  animation: memo-flash 1.8s ease;
}