/* スタッフ管理画面のスタイル */
.staff-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 60px; /* 下部に大きめの余白を追加 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.staff-page__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #989bc6;
  width: 100%;
  gap: 16px;
}

.staff-page__header .staff-page__btn {
  margin-left: auto;
}

.staff-page__title {
  color: #333;
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.staff-page__btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.staff-page__btn--primary {
  background-color: #989bc6;
  color: white;
}

.staff-page__btn--primary:hover {
  background-color: #7d81a3;
  transform: translateY(-1px);
}

.staff-page__btn--secondary {
  background-color: #e9ecef;
  color: #495057;
}

.staff-page__btn--secondary:hover {
  background-color: #dee2e6;
  transform: translateY(-1px);
}

.staff-page__btn--danger {
  background-color: #dc3545;
  color: white;
}

.staff-page__btn--danger:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.staff-page__btn--info {
  background-color: #17a2b8;
  color: white;
}

.staff-page__btn--info:hover {
  background-color: #138496;
  transform: translateY(-1px);
}

.staff-page__sub-navigation {
  margin-bottom: 20px;
}

.staff-search {
  margin-bottom: 20px;
}

.staff-search__form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-search__field {
  display: grid;
  gap: 5px;
}

.staff-search__field label {
  color: #596275;
  font-size: 13px;
  font-weight: 700;
}

.staff-search__input {
  min-width: 220px;
  padding: 9px 10px;
  border: 1px solid #cbd1df;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}

.staff-search__input:focus {
  outline: 2px solid rgba(152, 155, 198, 0.35);
  outline-offset: 1px;
  border-color: #989bc6;
}

.staff-search__button {
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: #4f5d95;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.staff-search__button:hover {
  background: #404d80;
}

.staff-search__clear-link {
  padding: 9px 2px;
  color: #687386;
}

/* スタッフ向け: 当日以降の出勤一覧 */
.staff-upcoming {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.staff-upcoming__header {
  max-width: 760px;
  margin: 0 auto 16px;
}

.staff-upcoming__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  text-align: left;
}

.staff-upcoming__table-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  overflow: hidden;
}

.staff-upcoming__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.staff-upcoming__th {
  text-align: left;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.staff-upcoming__th--timetable {
  width: 92px;
  text-align: center;
}

.staff-upcoming__row + .staff-upcoming__row .staff-upcoming__td {
  border-top: 1px solid #eef2f7;
}

.staff-upcoming__td {
  padding: 16px;
  color: #0f172a;
}

.staff-upcoming__td--date {
  width: 72%;
  font-size: 14px;
  font-weight: 600;
}

.staff-upcoming__td--time {
  width: 28%;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.staff-upcoming__td--timetable {
  width: 92px;
  text-align: center;
  vertical-align: middle;
}

.staff-upcoming__timetable-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.staff-upcoming__times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-upcoming__time-badge {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.staff-upcoming__timetable-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.staff-upcoming__timetable-link:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.staff-upcoming__timetable-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.staff-upcoming__empty {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 24px 16px;
}

.staff-upcoming__empty-text {
  margin: 0;
  font-size: 18px;
  color: #475569;
  text-align: center;
}

@media (max-width: 768px) {
  .staff-upcoming {
    max-width: none;
    padding: 10px 8px 16px;
  }

  .staff-upcoming__title {
    font-size: 24px;
  }

  .staff-upcoming__header {
    max-width: none;
  }

  .staff-upcoming__table-wrap {
    max-width: none;
    border-radius: 10px;
  }

  .staff-upcoming__th {
    padding: 10px 12px;
    font-size: 12px;
  }

  .staff-upcoming__td {
    padding: 14px 12px;
  }

  .staff-upcoming__td--date {
    font-size: 14px;
  }

  .staff-upcoming__td--time {
    font-size: 14px;
  }

  .staff-upcoming__th--timetable,
  .staff-upcoming__td--timetable {
    width: 72px;
  }

  .staff-upcoming__times {
    gap: 6px;
  }

  .staff-upcoming__time-badge {
    font-size: 14px;
  }

  .staff-upcoming__timetable-link {
    padding: 0;
  }

  .staff-upcoming__timetable-icon {
    width: 30px;
    height: 30px;
  }
}

.staff-page__alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.staff-page__alert--success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.staff-page__alert--error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.staff-page__alert-list {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.staff-page__alert-item {
  margin-bottom: 5px;
}

.staff-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.staff-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(152, 155, 198, 0.2);
}

.staff-card__title {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px 0;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.staff-card__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.staff-card__btn {
  padding: 8px 16px;
  font-size: 12px;
  display: inline-block;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.staff-card__btn--secondary {
  background-color: #e9ecef;
  color: #495057;
}

.staff-card__btn--secondary:hover {
  background-color: #dee2e6;
  transform: translateY(-1px);
}

.staff-card__btn--danger {
  background-color: #dc3545;
  color: white;
}

.staff-card__btn--danger:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.staff-card__btn--primary {
  background-color: #989bc6;
  color: white;
}

.staff-card__btn--primary:hover {
  background-color: #7d81a3;
  transform: translateY(-1px);
}

.staff-card__btn--info {
  background-color: #17a2b8;
  color: white;
}

.staff-card__btn--info:hover {
  background-color: #138496;
  transform: translateY(-1px);
}

.staff-card__btn--disabled {
  background-color: #d6d8db;
  color: #868e96;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.staff-page__empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  border: 2px dashed #989bc6;
}

.staff-page__empty-text {
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
}

/* スタッフテーブルのスタイル */
.staff-table-container {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 40px; /* テーブルコンテナ下部に余白追加 */
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.staff-table__header {
  background-color: #989bc6;
  color: white;
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border: none;
}

.staff-table__header-text {
  display: inline-block;
}

.staff-table__sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px -10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.staff-table__sort-link:hover,
.staff-table__sort-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.18);
}

.staff-table__sort-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.staff-table__sort-link--active {
  background-color: rgba(255, 255, 255, 0.14);
}

.staff-table__sort-indicator {
  font-size: 10px;
  line-height: 1;
}

.staff-inactive-section {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.staff-inactive-section__title {
  font-size: 18px;
  font-weight: 600;
  color: #4b5563;
  margin: 0;
}

.staff-table-container--inactive {
  border: 2px dashed #cdd3f5;
}

.staff-table__row--inactive {
  background-color: #f9fafc;
}

.staff-table__header--actions {
  text-align: right;
  width: 320px;
}

.staff-table__header--department {
  width: 160px;
}

.staff-table__row {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.staff-table__row:hover {
  background-color: #f8f9fa;
}

.staff-table__row:last-child {
  border-bottom: none;
}

.staff-table__cell {
  padding: 16px 20px;
  vertical-align: middle;
  font-size: 14px;
}

.staff-table__cell--name {
  font-weight: 600;
  color: #333;
}

.staff-table__cell--role {
  color: #666;
}

.staff-table__cell--employment {
  color: #666;
}

.staff-table__cell--department {
  color: #666;
}

.staff-table__cell--status {
}

.staff-table__cell--skills {
  color: #666;
  font-size: 13px;
  max-width: 200px;
}

.staff-table__cell--actions {
  text-align: right;
}

/* スタッフ状態のスタイル */
.staff-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  min-width: 60px;
}

.status--clocked-in {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status--clocked-out {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status--on-break {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status--not-clocked {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

.status--unknown {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.staff-table__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.staff-table__btn {
  display: inline-block;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.staff-table__btn--primary {
  background-color: #989bc6;
  color: white;
}

.staff-table__btn--primary:hover {
  background-color: #7d81a3;
  transform: translateY(-1px);
}

.staff-table__btn--secondary {
  background-color: #e9ecef;
  color: #495057;
}

.staff-table__btn--secondary:hover {
  background-color: #dee2e6;
  transform: translateY(-1px);
}

.staff-table__btn--danger {
  background-color: #dc3545;
  color: white;
}

.staff-table__btn--danger:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.staff-table__btn--info {
  background-color: #17a2b8;
  color: white;
}

.staff-table__btn--info:hover {
  background-color: #138496;
  transform: translateY(-1px);
}

.staff-table__btn--disabled {
  background-color: #d6d8db;
  color: #868e96;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.staff-form {
  width: 100%;
  box-sizing: border-box;
}

.staff-form__section:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.staff-form__group {
  margin-bottom: 25px;
}

.staff-form__label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.staff-form__label--step {
  font-size: 16px;
  font-weight: 600;
}

.staff-form__input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out;
  box-sizing: border-box;
  background-color: #fff;
}

.staff-form__input:focus {
  outline: none;
  border-color: #989bc6;
  box-shadow: 0 0 0 3px rgba(152, 155, 198, 0.1);
}

.staff-form__email-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.staff-form__email-row .staff-form__input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.staff-form__email-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #dc3545;
  border-radius: 4px;
  color: #dc3545;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.staff-form__email-delete:hover {
  color: #fff;
  background: #dc3545;
}

select.staff-form__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23495057'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 35px;
}

.staff-form__actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  margin-top: 30px;
}

.staff-form__code-verification {
  margin-top: 30px;
}

.staff-email-change__current {
  margin: 0 0 24px;
  color: #555;
}

.staff-email-change__sent {
  padding: 18px 20px;
  border: 1px solid #d9dbea;
  border-radius: 8px;
  background: #f7f7fb;
}

.staff-email-change__sent-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #989bc6;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.staff-email-change__sent-message,
.staff-email-change__sent-guide {
  margin: 0;
}

.staff-email-change__sent-guide {
  margin-top: 6px;
  color: #555;
  font-size: 14px;
}

.staff-email-change__edit-link,
.staff-email-change__back-link {
  display: inline-block;
  margin-top: 14px;
  color: #6b6f8a;
  font-size: 13px;
  text-decoration: underline;
}

.staff-email-change__edit-link:hover,
.staff-email-change__back-link:hover {
  color: #4e5270;
}

.staff-email-change__resend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #777;
  font-size: 13px;
}

.staff-email-change__resend form {
  margin: 0;
}

.staff-email-change__resend-btn {
  width: auto;
  padding: 6px 14px;
  border: 1px solid #d5d7e3;
  border-radius: 999px;
  background: transparent;
  color: #6b6f8a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.staff-email-change__resend-btn:hover {
  background: #f3f4f8;
  color: #4e5270;
}

.staff-form__section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.staff-form__section:last-of-type {
  border-bottom: none;
}

.staff-form__section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.staff-form__section-subtitle {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  margin-left: 0;
}

.staff-form__skills {
  margin-top: 15px;
}

.staff-form__skills-row {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
}

.staff-form__skill-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background-color: #f8f9fa;
  border-radius: 6px;
  min-width: 0;
}

.staff-form__skill-item--red {
  background-color: #fdecea;
  border: 1px solid #f8c8c4;
}

.staff-form__skill-item--green {
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.staff-form__skill-item--blue {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
}

.staff-form__skill-item--dummy {
  visibility: hidden;
}

.staff-form__skill-label {
  font-size: 12px;
  color: #333;
  font-weight: 500;
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.staff-form__skill-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background-color: white;
  margin: 0;
}

.staff-form__skill-input:focus {
  outline: none;
  border-color: #989bc6;
  box-shadow: 0 0 0 2px rgba(152, 155, 198, 0.1);
}

/* レスポンシブ */
@media (max-width: 768px) {
  body:has(.staff-page) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }

  body:has(.staff-page) .main-navigation {
    flex: 0 0 auto;
  }

  body:has(.staff-page) .main-content {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .staff-page {
    padding: 15px;
    padding-bottom: 50px; /* モバイル時の下部余白 */
  }
  
  .staff-page__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .staff-page__header .staff-page__btn {
    margin-left: 0;
  }
  
  .staff-page__title {
    font-size: 24px;
  }
  
  .staff-page__grid {
    grid-template-columns: 1fr;
  }
  
  .staff-card__actions {
    justify-content: center;
  }
  
  .staff-form__actions {
    flex-direction: column;
  }

  .staff-form__email-row {
    flex-direction: column;
  }

  .staff-form__email-delete {
    min-height: 42px;
  }
  
  .staff-page__btn,
  .staff-card__btn {
    text-align: center;
  }
  
  .staff-form__skills-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .staff-form__skill-item {
    flex-basis: calc(50% - 4px);
    margin-bottom: 6px;
  }
  
/* テーブルのモバイル対応 */
.staff-table-container {
  overflow-x: auto;
}
  
  .staff-table__header--actions {
    width: auto;
  }

  .staff-table__actions {
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
  }
  
  .staff-table__btn {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .staff-table__cell {
    padding: 12px 8px;
  }
  
  .staff-table__cell--actions {
    white-space: nowrap;
  }
  
  .staff-table__cell--skills {
    max-width: 150px;
    font-size: 11px;
  }
  
  .staff-status {
    font-size: 10px;
    padding: 2px 6px;
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .staff-page {
    padding-bottom: 40px; /* 小画面時の下部余白 */
  }
}
.staff-kiosk-section {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid #d7e0e3;
  border-radius: 12px;
  background: #f7fafb;
}

.staff-kiosk-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.staff-kiosk-section__title { margin: 0; }

.staff-kiosk-section__add {
  color: #315f70;
  font-weight: 700;
}

.staff-kiosk-list {
  display: grid;
  gap: 12px;
}

.staff-kiosk-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #cad6da;
  border-radius: 10px;
  background: #fff;
}

.staff-kiosk-card__details {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.staff-kiosk-card__name { font-size: 20px; }
.staff-kiosk-card__login-id { color: #53676f; }

.staff-kiosk-card__status {
  padding: 3px 9px;
  border-radius: 999px;
  background: #dff3e9;
  color: #176541;
  font-size: 13px;
  font-weight: 700;
}

.staff-kiosk-card__actions { display: flex; gap: 8px; }
.staff-kiosk-empty { padding: 16px 0 4px; text-align: center; }

.staff-form__label-with-help {
  display: flex;
  align-items: center;
  gap: 4px;
}

.staff-table__cell--pattern {
  min-width: 145px;
}

@media (max-width: 700px) {
  .staff-kiosk-card { align-items: flex-start; flex-direction: column; }
}
