/* POSベースのブラウン基調デザイン - カラーパレット */
:root {
  /* メインカラー */
  --color-primary: #41210f;           /* メインブラウン */
  --color-primary-light: rgba(65, 33, 15, 0.12);  /* 薄いブラウン背景（#41210f1f） */
  --color-primary-hover: #704326;     /* ホバー時の明るいブラウン */
  
  /* 背景色 */
  --color-bg-main: #fffaf5;           /* カフェ風オフホワイト */
  --color-bg-card: #ffffff;           /* ピュアホワイト */
  
  /* テキストカラー */
  --color-text-primary: #2a160b;      /* 濃いブラウン（基本テキスト） */
  --color-text-secondary: rgba(65, 33, 15, 0.58);    /* 薄めのブラウン（補足情報） */
  
  /* ボーダー */
  --color-border: rgba(65, 33, 15, 0.12); /* 非常に薄いブラウン */
  
  /* シャドウ */
  --shadow-soft: 0 4px 20px rgba(65, 33, 15, 0.05);  /* ソフトシャドウ */
  --shadow-hover: 0 8px 30px rgba(65, 33, 15, 0.08); /* ホバー時のシャドウ */
  
  /* 角丸 */
  --radius-default: 14px;
  --radius-large: 16px;
}

/* ベーススタイル */
body {
  background-color: var(--color-bg-main) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Yu Gothic', '游ゴシック', 'YuGothic', sans-serif !important;
  color: var(--color-text-primary);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

input[type="date"] {
  text-align: left !important;
  direction: ltr;
}
.highlight-red {
  background-color: #ffdddd;
  /* 薄い赤色 */
  color: #d32f2f;
  /* 濃い赤色の文字 */
  font-weight: bold;
}
.dropdown-menu li{
  line-height:2;
}
.loginbox{
  top:-100px !important;
  position:relative;
}

.la, .las{
  font-size:21px;
}
.btn{
  border:none !important;
}
.kakutei {
  padding: 10px 24px;
  border-radius: var(--radius-default);
  font-weight: 600;
  font-size: 16px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  position: relative;
  bottom: 5px;
  white-space: nowrap;
  border: none;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.kakutei:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-hover);
}
.kakutei_prev {
  padding: 10px 24px;
  border-radius: var(--radius-default);
  font-weight: 600;
  font-size: 16px;
  background-color: rgba(251, 191, 36, 0.15);
  color: #92400E;
  position: relative;
  bottom: 5px;
  white-space: nowrap;
  border: 1px solid rgba(251, 191, 36, 0.3);
  transition: all 0.2s ease;
}

.kakutei_prev:hover {
  background-color: rgba(251, 191, 36, 0.25);
}
@media (max-width: 992px) {
  /* ハンバーガーメニューを強制的に表示（スマホ/タブレットのみ） */
  .navbar-toggler {
    display: block !important;
  }
}
/* フォームスタイル - 水色基調 */
.form-select, .form-control {
  border-radius: var(--radius-default) !important;
  border: 1px solid var(--color-border) !important;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  transition: all 0.2s ease;
  background-color: var(--color-bg-card);
}

.form-select:focus, .form-control:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px var(--color-primary-light) !important;
  outline: none;
}

.form-label {
  font-size: 0.875rem;
  color: var(--color-text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.mw600{
  max-width:600px !important;
}
.yoko{
  display:flex;
}
.yoko50{
  width:50%;
}
.systitle{
  margin-bottom:20px;
}
.navbar-text{
  color:#FFF;
}
.logo{
  width:220px;
}

@media (max-width: 576px) {
  .logo{
    width: 160px;
    height: auto;
  }
}
.nav-item{
  margin-right:10px;
}
/* カードスタイル - 清涼感のあるデザイン */
.card {
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-large) !important;
  box-shadow: var(--shadow-soft) !important;
  background-color: var(--color-bg-card);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover) !important;
}

/* メインボタン - 水色フラットデザイン */
.btn-custom {
  padding: 0.6rem 1.2rem !important;
  margin: 0.25rem;
  vertical-align: middle;
  background-color: var(--color-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: var(--radius-default);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.btn-custom:hover {
  background-color: var(--color-primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: white !important;
}

.btn-custom:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.attendance-summary {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    width: 316px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .attendance-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }

/* Navbar - 水色フラットデザイン */
.navbar {
  background-color: var(--color-primary) !important;
  box-shadow: var(--shadow-soft);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-default);
  transition: all 0.2s ease;
}

.navbar .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

.navbar .nav-link.active {
  background-color: var(--color-primary-light);
  color: white;
}

.navbar-text {
  color: white;
  font-weight: 500;
}

.navbar-items {
  display: flex;
  align-items: center;
  gap: 8px; /* 要素間の余白 */
  flex-wrap: wrap; /* 狭くなったら折り返す */
}

.navbar-text {
  white-space: normal; /* 折り返しを許可 */
}

.logout {
  white-space: nowrap; /* ボタン内の文字は折り返さない */
}

/* テーブル - シンプルで見やすいデザイン */
.table {
  --bs-table-striped-bg: none !important;
  --bs-table-bg: var(--color-bg-card) !important;
  border-radius: var(--radius-large);
  overflow: hidden;
}

.table th {
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 1.25rem 1rem;
  border: none;
  border-bottom: 2px solid var(--color-border);
}

.table td {
  vertical-align: middle;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
  border-left: none;
  border-right: none;
  background-color: var(--color-bg-card);
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: var(--color-primary-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}
.nav-link i {
  margin-right: 5px; /* アイコンとテキストの間にスペースを追加 */
  color: inherit; /* 親要素の色を継承 */
}

.nav-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--color-primary-hover);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

/* Footer - 水色フラットデザイン */
footer {
  background-color: var(--color-primary);
  color: #FFF;
  padding: 2rem 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

/* 給与一覧テーブル - 水色基調 */
.salary-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--radius-large);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-card);
  box-shadow: var(--shadow-soft);
}

.salary-table thead th {
  background-color: var(--color-bg-card);
  padding: 1.25rem 1rem;
  text-align: left;
  color: var(--color-text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}

.salary-table tbody td {
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
}

.salary-table tbody tr:hover {
  background-color: var(--color-primary-light);
}

.salary-table tbody tr:last-child td {
  border-bottom: none;
}

.salary-table thead th:first-child {
  border-top-left-radius: var(--radius-large);
}

.salary-table thead th:last-child {
  border-top-right-radius: var(--radius-large);
}

.salary-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-large);
}

.salary-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-large);
}

/* 勤怠記録テーブル - 水色基調 */
.attendance-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--radius-large);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
  --bs-table-bg: var(--color-bg-card);
  --bs-table-striped-bg: none;
  background-color: var(--color-bg-card);
  box-shadow: var(--shadow-soft);
}

.attendance-table thead th {
  background-color: var(--color-bg-card);
  border: none !important;
  border-bottom: 2px solid var(--color-border) !important;
  padding: 1.25rem 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.attendance-table tbody td {
  border: none !important;
  border-bottom: 1px solid var(--color-border) !important;
  padding: 1rem;
  vertical-align: middle;
  background-color: var(--color-bg-card);
}

.attendance-table tbody tr:hover {
  background-color: var(--color-primary-light);
}

.attendance-table tbody tr:hover td {
  background-color: transparent;
}

.attendance-table tbody tr:last-child td {
  border-bottom: none !important;
}

.attendance-table thead th:first-child {
  border-top-left-radius: var(--radius-large);
}

.attendance-table thead th:last-child {
  border-top-right-radius: var(--radius-large);
}

.attendance-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-large);
}

.attendance-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-large);
}

/* ボタンセル改行防止（追加対策） */
.attendance-table td.action-cell {
  white-space: nowrap;
  min-width: 120px;
}

/* 利用者名と受給者証番号のスタイル */
.user-name {
  position: relative;
}

.recipient-number {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

/* 記録ボタン - 水色基調 */
.btn-kiroku {
  display: inline-block;
  height: 40px !important;
  border-radius: var(--radius-default) !important;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 120px !important;
  border: 1px solid var(--color-border) !important;
  margin: 0 5px 0 0;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-weight: 500;
}

.btn-kiroku:hover {
  background-color: var(--color-primary-light);
  text-decoration: none;
  color: var(--color-text-primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn-kiroku.active {
  background-color: var(--color-primary);
  color: white !important;
  border-color: var(--color-primary) !important;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
/* 右上固定のビックリ・バッジ */
.btn-with-badge {
  position: relative;
}

.btn-with-badge .badge-corner {
  position: absolute;
  top: -6px;       /* 位置はボタンサイズに合わせて微調整 */
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;         /* アイコン白抜き */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;     /* アイコンの大きさ */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none; /* クリックの邪魔をしない */
}
/* 期限間近用（オレンジ） */
.btn-with-badge .badge-corner.badge-orange { background: #fd7e14; }
/* 期限切れ用（赤） */
.btn-with-badge .badge-corner.badge-red { background: #dc3545; }