/* ============================================================
   スタッフ打刻画面 スタイル
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #fff;
  user-select: none;
}

/* ---- ヘッダー ---- */
.header {
  background: rgba(0,0,0,0.4);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header h1 {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #90caf9;
}

.clock-area {
  text-align: right;
}

#today-display {
  font-size: 14px;
  color: #aaa;
}

#clock-display {
  font-size: 36px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: 2px;
}

/* ---- メインコンテンツ ---- */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ---- スタッフ選択 ---- */
.section-card {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
}

.section-title {
  font-size: 16px;
  color: #90caf9;
  margin-bottom: 16px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* スタッフ選択ボタン群 */
#staff-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.staff-select-btn {
  min-width: 140px;
  padding: 20px 28px;
  font-size: 20px;
  font-family: inherit;
  font-weight: bold;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 1px;
}

.staff-select-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: #90caf9;
  transform: translateY(-2px);
}

.staff-select-btn.selected {
  background: #1565c0;
  border-color: #42a5f5;
  box-shadow: 0 0 0 3px rgba(66,165,245,0.4);
  transform: translateY(-2px);
}

/* ---- 選択中スタッフ名 ---- */
.selected-staff-display {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  padding: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-staff-display .staff-icon {
  font-size: 32px;
}

/* ---- 出勤・退勤ボタン ---- */
.clock-buttons {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.clock-btn {
  flex: 1;
  padding: 36px 20px;
  font-size: 28px;
  font-family: inherit;
  font-weight: bold;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 2px;
  min-height: 100px;
}

.clock-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.clock-btn:disabled,
.clock-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

#btn-clock-in {
  background: linear-gradient(135deg, #2e7d32, #43a047);
  color: #fff;
  box-shadow: 0 6px 20px rgba(46,125,50,0.5);
}

#btn-clock-in:hover:not(:disabled) {
  background: linear-gradient(135deg, #388e3c, #4caf50);
  box-shadow: 0 8px 28px rgba(46,125,50,0.7);
  transform: translateY(-3px);
}

#btn-clock-out {
  background: linear-gradient(135deg, #b71c1c, #e53935);
  color: #fff;
  box-shadow: 0 6px 20px rgba(183,28,28,0.5);
}

#btn-clock-out:hover:not(:disabled) {
  background: linear-gradient(135deg, #c62828, #ef5350);
  box-shadow: 0 8px 28px rgba(183,28,28,0.7);
  transform: translateY(-3px);
}

/* ---- 今日の記録 ---- */
.record-row {
  display: flex;
  gap: 30px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.record-row:last-child { border-bottom: none; }

.record-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.record-label {
  font-size: 13px;
  color: #aaa;
}

.record-time {
  font-size: 38px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.clock-in-color  { color: #81c784; }
.clock-out-color { color: #ef9a9a; }

.no-record {
  color: #888;
  font-size: 16px;
  padding: 10px 0;
}

/* ---- メッセージ ---- */
.message-area {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 18px 36px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  white-space: pre-line;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  min-width: 320px;
}

.message-area.success {
  background: #1b5e20;
  border: 2px solid #4caf50;
  color: #fff;
}

.message-area.error {
  background: #7f0000;
  border: 2px solid #f44336;
  color: #fff;
}

/* ---- 確認モーダル ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #1e2a3a;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 36px 40px;
  text-align: center;
  min-width: 340px;
}

.modal-name {
  font-size: 24px;
  font-weight: bold;
  color: #90caf9;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 20px;
  color: #fff;
  margin-bottom: 28px;
}

.modal-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.modal-btn {
  padding: 14px 36px;
  font-size: 18px;
  font-family: inherit;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 1px;
}

.modal-btn.confirm {
  background: #1565c0;
  color: #fff;
}

.modal-btn.cancel {
  background: #444;
  color: #ddd;
}

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ---- レスポンシブ ---- */
@media (max-width: 600px) {
  #clock-display { font-size: 28px; }
  .staff-select-btn { min-width: 100px; font-size: 17px; padding: 16px; }
  .clock-btn { font-size: 22px; padding: 28px; }
  .record-time { font-size: 28px; }
}
