:root {
  /* カラーパレット */
  --background: #fceede; /* ページ背景 */
  --headline: #333333; /* 見出しテキスト */
  --paragraph: #555555; /* 本文テキスト */
  --button: #ff8e3c; /* ボタン背景 */
  --button-text: #ffffff; /* ボタンテキスト */
  --button-hover: #e68036; /* ボタンホバー時 */
  --button-active: #e0762c; /* ボタン押下時 */
  --secondary: #fffffe; /* 補助背景 */
  --highlight: #ff8e3c; /* 強調色 */
  --clr-border: #ffe5ca;
  --clr-accent: #ff9933;
  --error-bg: #f2dede; /* エラーメッセージ背景色 */
  --error-text: #a94442; /* エラーメッセージテキスト色 */
  --info-bg: #d9edf7; /* インフォメッセージ背景色 */
  --info-text: #31708f; /* インフォメッセージテキスト色 */
  --warning-bg: #fcf8e3; /* 警告メッセージ背景色 */
  --warning-text: #8a6d3b; /* 警告メッセージテキスト色 */
  --success-bg: #dff0d8; /* 成功メッセージ背景色 */
  --success-text: #3c763d; /* 成功メッセージテキスト色 */
}

/* 共通フォント・背景 */
body {
  font-family: "Noto Sans JP", sans-serif;
  background-color: var(--background);
  color: var(--paragraph);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.navbar {
  background-color: #ffffff;
  box-shadow: 0 4px 18px 0 #ff980008, 0 2px 0 #f5e2bc;
  border-bottom: 2.5px solid #ffa726;
  padding: 0.9em 1.5em;
  border-radius: 22px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--button);
}
.navbar-brand:hover,
.navbar-brand:focus {
  color: #ef6c00;
}

.navbar-nav {
  margin-left: 2rem;
}

.navbar-nav .nav-link {
  color: var(--button);
  font-weight: 700;
  margin-right: 1rem;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #ef6c00;
  border-bottom: 2px solid #ffd180;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
  color: #ef6c00;
  border-bottom: 2px solid #ef6c00;
}

/* ハンバーガーメニュー */
.navbar-toggler {
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--headline);
}

.navbar-toggler i {
  font-size: 1.5em;
}

/* PC用 ユーザー情報 */
.user-area {
  display: flex;
  align-items: center;
  gap: 20px;
}
.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 12px;
}
.user-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--button);
}
.user-email {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.8;
  color: var(--button);
}

/* Offcanvas（スマホ用）のスタイル */
.offcanvas {
  background-color: var(--secondary);
  color: var(--paragraph);
}

.offcanvas .offcanvas-title {
  color: var(--headline);
}

.offcanvas .nav-link {
  color: var(--paragraph) !important;
  transition: color 0.3s, background-color 0.3s;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--paragraph) !important;
}

.offcanvas-user {
  margin-top: 1rem;
  padding-top: 1.25rem;
  position: fixed;
  left: 0;
  bottom: 20px;
  width: var(--bs-offcanvas-width);
}

.offcanvas-user span {
  display: block;
  font-size: 0.9rem;
  margin-left: 30px;
}

/* メイン領域 */
.main-content {
  padding: 1.5rem;
  padding-bottom: 2rem;
}

/* サイドバー（月選択：PC用） */
.month-sidebar {
  background-color: var(--secondary);
  border-right: 1px solid #dee2e6;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.month-sidebar h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--headline);
}

.list-group {
  overflow: auto;
  height: 50vh;
}

.list-group-item {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  margin-bottom: 0.5rem;
}

.list-group-item:hover {
  background-color: #ffe6d8;
}

.list-group-item.active {
  background-color: var(--highlight);
  border-color: var(--highlight);
  color: var(--secondary);
}

/* カード */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background-color: var(--secondary);
}

.card-header {
  background-color: var(--secondary);
  border-bottom: 2px solid #fde0b0;
  padding: 1rem;
}

.card-header h5 {
  margin: 0;
  font-weight: 700;
  color: var(--headline);
}

/* ボタン（全般） */
.btn {
  border-radius: 4px;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* モーダル */
.modal-content {
  border-radius: 8px;
  background-color: var(--secondary);
}

/* スマホ用 新規追加ボタン（右下固定） */
.mobile-new-entry {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1050;
}

/* ログインカード */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  max-width: 380px;
  width: 100%;
  padding: 2rem 2rem 1.5rem;
  border-radius: 1.7rem;
  box-shadow: 0 12px 36px 0 rgba(247, 128, 36, 0.12), 0 1.5px 2.5px 0 rgba(0, 0, 0, 0.03);
  background: #fff;
  text-align: center;
  animation: login-fadeIn 1s;
  position: relative;
  z-index: 2;
  border: 1.5px solid #fff9f3;
}
@keyframes login-fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.login-card .form-control:focus {
  border-color: #fcb132;
  box-shadow: 0 0 0 2px rgba(252, 177, 50, 0.08);
}
.login-icon {
  font-size: 3rem;
  color: #ff9600;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff7e6 60%, #ffecd2 100%);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 9px rgba(251, 174, 83, 0.07);
}
.login-link {
  color: var(--button);
  text-decoration: none;
}
.login-link:hover {
  text-decoration: underline;
  color: #ff7000;
}
.login-title {
  color: var(--button);
  font-weight: bold;
}

/* データが存在しない場合のメッセージ */
.no-data {
  border: 2px dashed var(--accent-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background-color: var(--background);
  margin: 1.5rem 0;
}

.no-data h3 {
  margin: 0 0 0.5rem;
  color: var(--headline);
  font-size: 1.4rem;
}

.no-data p {
  margin: 0;
  color: var(--paragraph);
  font-size: 1.1rem;
}

.message {
  border-radius: 7px;
  padding: 0.8em 1.1em;
  margin: 1.1em 0.5em 0.7em 0.5em;
  font-size: 1rem;
  border-left: 6px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.message.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: var(--error-text);
}
.message.info {
  background: var(--info-bg);
  color: var(--info-text);
  border-color: var(--info-text);
}
.message.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning-text);
}
.message.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-text);
}

.alert-info {
  display: none;
  background-color: #d1ecf1;
  color: #0c5460; /* 情報メッセージのテキスト色 */
  border-color: #bee5eb; /* 情報メッセージのボーダー色 */
}

.hero {
  background-color: var(--secondary);
  padding: 2rem 1rem;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  position: relative;
}

.btn-attendance {
  font-size: 2rem;
  padding: 1.5rem 3rem;
  background-color: var(--button);
  border: none;
  border-radius: 30px;
  color: var(--button-text);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s, transform 0.2s;
}

.btn-attendance:hover {
  background-color: var(--button-hover);
  transform: translateY(-2px);
}

.btn-attendance:active {
  background-color: var(--button-active);
  transform: translateY(0);
}

.info-section {
  background: var(--secondary);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  height: 100%;
}

.info-section:hover {
  transform: translateY(-5px);
}

.info-section h5 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--headline);
}

.main-content {
  padding: 1.5rem;
  padding-bottom: 2rem;
  animation: fadeIn 0.8s ease-in-out;
}

.total-row td {
  border-top: 2px solid #000;
}

.notification-list {
  list-style-type: none;
  padding: 0;
}

.notification-list li {
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
  transition: background-color 0.3s ease; /* ホバーエフェクトの追加 */
}

.notification-list li:hover {
  background-color: #f1f1f1; /* ホバー時の背景色 */
}

.notification-list li:last-child {
  border-bottom: none; /* 最後の項目の下のボーダーを消す */
}

.notification-date {
  font-size: 14px;
  color: var(--headline);
  margin-right: 10px;
  display: inline-block; /* 日付の間隔調整 */
}

.notification-message a {
  color: var(--headline); /* カスタムプロパティの使用 */
  text-decoration: none; /* 下線の削除 */
}

.notification-message a:hover {
  text-decoration: none; /* ホバー時に下線を表示しない */
}
.mob-bottom-navbar {
  display: none;
}
.attendance-status-area {
  text-align: center;
  margin-bottom: 20px;
}

#attendance-status {
  display: inline-flex;
  align-items: center;
  font-size: 1.16rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  border-radius: 24px;
  padding: 6px 18px;
  background: #fff;
  box-shadow: 0 2px 8px #eee;
  transition: background 0.2s;
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
  transition: background 0.2s;
}

/* 出勤中（緑） */
.status-present .status-dot {
  background: #47d147;
  box-shadow: 0 0 8px #47d14788;
}

/* 退勤中（グレー） */
.status-absent .status-dot {
  background: #bbb;
  box-shadow: 0 0 8px #bbb8;
}

.status-text {
  vertical-align: middle;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #333;
}
.reload-btn {
  display: inline-block;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--button, #ff8e3c);
  color: var(--button-text, #fff);
  text-decoration: none;
  padding: 0.85em 2em;
  border-radius: 32px;
  box-shadow: 0 2px 10px #ff8e3c33;
  cursor: pointer;
  transition: background 0.16s, box-shadow 0.18s, transform 0.12s;
  outline: none;
}
.reload-btn:hover {
  background: var(--button-hover, #e68036);
  color: var(--button-text, #fff);
  box-shadow: 0 4px 18px #ff8e3c44;
  transform: scale(1.04);
}
.reload-btn:active {
  background: var(--button-active, #e0762c);
  transform: scale(0.97);
}
.edit-card-header {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 60px;
}
.edit-card-header h3 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}
.edit-card-header button {
  margin-left: auto;
  margin-bottom: 0;
}
.delete-btn {
  border-radius: 1em;
  padding: 0.55em 1em;
  background: #fff;
  color: #ffa000;
  border: 2px solid #ffa726;
  font-weight: bold;
  box-shadow: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.delete-btn:hover,
.delete-btn:focus {
  background: #fff8e1;
  border: 2px solid #ffb347;
  color: #ff9800;
}

/* ---- 更新ボタン（二重ボーダー/オレンジ系） ---- */
.update-btn {
  border-radius: 1em;
  padding: 0.55em 1.1em;
  background: var(--secondary); /* 明るい背景 */
  color: var(--button); /* メインオレンジ文字 */
  border: 2px solid var(--button); /* メインオレンジ枠 */
  font-weight: bold;
  transition: all 0.2s;
}
.update-btn:hover,
.update-btn:focus {
  background: #fff8e1; /* Orange 50 */
  color: #ef6c00; /* Orange 800 */
  border-color: #ffb300; /* Orange 600 */
  outline-color: #ffe0b2; /* Orange 100 */
}

/* キャンセルボタン（二重ボーダー/グレー系） */
.cancel-btn {
  border-radius: 1em;
  padding: 0.55em 1.1em;
  background: #fff;
  color: #616161; /* Grey 700 */
  border: 2px solid #bdbdbd; /* Grey 400 */
  outline: 2px double #fafafa; /* Grey 50 */
  font-weight: bold;
  transition: all 0.2s;
}
.cancel-btn:hover,
.cancel-btn:focus {
  background: #fafafa00; /* Grey 50 */
  color: #424242; /* Grey 800 */
  border-color: #757575; /* Grey 600 */
  outline-color: #eeeeee; /* Grey 100 */
}
/* ======= DELETE MODAL ONLY ここから ======= */
#confirmDeleteModal .modal-dialog {
  max-width: 420px;
  margin: 2.7rem auto 1.5rem auto;
}
#confirmDeleteModal .modal-dialog-centered {
  align-items: flex-start !important;
}
#confirmDeleteModal .modal-content {
  border-radius: 1.6em;
  box-shadow: 0 10px 48px 0 rgba(255, 152, 0, 0.17);
  background: #fffef8;
  border: none;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  position: relative;
  padding-bottom: 0;
}
#confirmDeleteModal .modal-header {
  border-bottom: none;
  padding-bottom: 0;
  background: linear-gradient(100deg, #fff3e0 60%, #fffef8 100%);
  justify-content: flex-end;
}
#confirmDeleteModal .modal-body {
  padding: 0;
}
#confirmDeleteModal .outer-icon-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(145deg, #ffa726 20%, #ffd180 100%);
  border-radius: 50%;
  box-shadow: 0 4px 22px 6px #ff980030;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  margin-top: -32px;
  box-sizing: border-box;
  border: 6px solid #fff;
  z-index: 2;
  position: relative;
  animation: popIn 0.7s cubic-bezier(0.66, -0.11, 0.62, 1.12);
}

@keyframes popIn {
  0% {
    transform: scale(0.6);
  }
  80% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
#confirmDeleteModal .outer-icon-circle i {
  font-size: 2.95em;
  color: #fff;
  text-shadow: 0 6px 30px #ffd180a3;
}
#confirmDeleteModal .attention-text {
  font-size: 1.5em;
  font-weight: 900;
  color: #ff9800;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 0 auto 12px auto;
  text-shadow: 0 2px 12px #ffcc805a;
}
#confirmDeleteModal .modal-footer {
  border-top: none;
  justify-content: center;
  padding-bottom: 2em;
  padding-top: 1.2em;
  background: transparent;
}
#confirmDeleteModal .btn-cancel-style {
  border-radius: 2em;
  padding: 0.55em 2em;
  background: #fff;
  color: #ffa000;
  border: 2px solid #ffa726;
  font-weight: bold;
  box-shadow: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

#confirmDeleteModal .btn-cancel-style:hover,
#confirmDeleteModal .btn-cancel-style:focus {
  background: #fff8e1;
  border: 2px solid #ffb347;
  color: #ff9800;
  transform: scale(1.07);
}
#confirmDeleteModal .btn-danger-style {
  background: linear-gradient(90deg, #ff9800 0%, #ffb347 100%);
  color: #fff;
  border-radius: 2em;
  border: none;
  padding: 0.55em 2em;
  font-weight: bold;
  font-size: 1.06em;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px 0 rgba(255, 152, 0, 0.13);
  transition: all 0.22s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
#confirmDeleteModal .btn-danger-style:hover,
#confirmDeleteModal .btn-danger-style:focus {
  background: linear-gradient(90deg, #ff9800 0%, #ffd180 100%);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 5px 24px 0 rgba(255, 152, 0, 0.22);
}

.tbl-data {
  width: 97%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 7px rgba(255, 229, 202, 0.33);
  background: #fff;
}
.tbl-data th,
.tbl-data td {
  padding: 11px 7px;
  text-align: center;
  width: 135px;
  border: none;
}
.tbl-data thead {
  background: var(--clr-accent);
  color: #fff;
}
.tbl-data thead tr {
  border-bottom: 2.5px solid #ffba5c;
}
.tbl-col,
.tbl-data td:nth-child(2) {
  width: 120px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.tbl-data tr:not(:last-child) {
  border-bottom: 2px solid var(--clr-border);
}
.tbl-data tr:nth-child(even) td {
  background: #fff5ea;
}
.tbl-data thead tr th:first-child {
  border-top-left-radius: 14px;
}
.tbl-data thead tr th:last-child {
  border-top-right-radius: 14px;
}
.tbl-data tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}
.tbl-data tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}
.tbl-data tbody tr:hover td {
  background: #ffe5ca;
  transition: background 0.2s;
}

.tbl-sum-container {
  text-align: right;
  width: 97%;
  margin: 0 auto;
}
.tbl-sum {
  padding: 9px 26px;
  display: inline-flex;
  gap: 22px;
  background: #fffbe9;
  border: 1.2px solid var(--clr-border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(255, 227, 187, 0.2);
  color: #c77523;
  font-weight: 500;
  margin-top: 14px;
}
.tbl-sum-itm {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 600;
}
.tbl-sum-val {
  color: #e87d36;
  font-weight: bold;
}
.tbl-sum-div {
  margin: 0 10px;
  color: #efb75c;
  font-weight: bold;
}
.total-row td {
  border-top: 2px solid #000;
  font-weight: 700;
}
@media (max-width: 1323px) {
  .navbar-nav {
    margin-left: 0.3rem;
  }
  .navbar-nav .nav-link {
    margin-right: 0;
  }
}
@media (max-width: 600px) {
  #confirmDeleteModal .modal-dialog {
    max-width: 98vw;
    margin: 1.2rem auto 0.7rem auto;
  }
  #confirmDeleteModal .modal-content {
    border-radius: 1em;
    max-height: calc(100vh - 1rem) !important;
  }
  #confirmDeleteModal .outer-icon-circle {
    width: 65px;
    height: 65px;
    font-size: 2em;
    margin-top: -21px;
  }
  #confirmDeleteModal .outer-icon-circle i {
    font-size: 2em;
  }
  #confirmDeleteModal .attention-text {
    font-size: 1.1em;
  }
  #confirmDeleteModal .modal-footer {
    padding-bottom: 1em;
    padding-top: 1em;
  }
  .edit-card-header h3 {
    position: static;
    left: auto;
    transform: none;
  }
  .content-wrapper {
    padding-bottom: 3rem;
  }
}
@media (max-width: 768px) {
  .mob-bottom-navbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    height: 76px;
    max-width: 100vw;
    background: #fff;
    box-shadow: 0 -2px 13px rgba(235, 135, 33, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
  }
  .mob-nav-item {
    flex: 1 1 0;
    color: #b6997b;
    text-decoration: none;
    text-align: center;
    font-size: 0.84rem;
    padding: 6px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.2s;
    z-index: 1;
    background: none;
    border: none;
    min-width: 0;
  }
  .mob-nav-item.mob-active,
  .mob-nav-item:active {
    color: #eb8721;
    font-weight: bold;
  }
  .mob-nav-item.mob-active {
    background: #fff4e6;
    border-radius: 11px;
    box-shadow: 0 1px 7px rgba(235, 135, 33, 0.03);
  }
  .mob-bottom-navbar i {
    font-size: 1.37rem;
    margin-bottom: 2px;
    display: block;
  }
  .mob-fab-add {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    background: linear-gradient(153deg, #ffd485 10%, #eb8721 90%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(235, 135, 33, 0.15), 0 1.5px 5px rgba(80, 40, 10, 0.09);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 14px;
    z-index: 20;
    cursor: pointer;
    transition: box-shadow 0.18s, transform 0.11s, background 0.11s;
    outline: none;
    font-size: 0;
    position: static;
    flex-shrink: 0;
    flex-grow: 0;
    text-decoration: none;
  }
  .mob-fab-add:active {
    box-shadow: 0 2px 9px rgba(235, 135, 33, 0.19);
    transform: scale(0.97);
    background: linear-gradient(138deg, #ffe2a2 10%, #d77d13 100%);
  }
  .mob-fab-icon {
    font-size: 2.6rem;
    transition: font-size 0.13s;
    line-height: 1;
  }
  .mob-fab-add:hover .mob-fab-icon,
  .mob-fab-add:active .mob-fab-icon {
    font-size: 2.75rem;
  }
  .mob-bottom-navbar .mob-nav-item:nth-child(2) {
    margin-right: 8px;
  }
  .mob-bottom-navbar .mob-nav-item:nth-child(4) {
    margin-left: 8px;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
