/* 作業管理システム 共通スタイル */

/* フォーム要素 */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}
.form-label.required::after {
  content: ' *';
  color: #ef4444;
}
.form-input {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.938rem;
  color: #1f2937;
  background: white;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-group {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f3f4f6;
}

/* ボタン選択UI */
.select-btn {
  padding: 0.625rem 0.25rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  font-weight: 500;
}
.select-btn:hover {
  border-color: #93c5fd;
  color: #3b82f6;
  background: #eff6ff;
}
.select-btn.active {
  border-color: #3b82f6;
  background: #3b82f6;
  color: white;
}

/* タブ */
.tab-btn.active {
  color: white;
  border-bottom: 3px solid white;
}
.admin-tab-btn.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

/* カード */
.record-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid #f3f4f6;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.record-card:active {
  box-shadow: 0 0 0 2px #93c5fd;
}

/* 支払いバッジ */
.badge-collected { background: #d1fae5; color: #065f46; }
.badge-processing { background: #fef3c7; color: #92400e; }
.badge-insurance  { background: #dbeafe; color: #1e40af; }
.badge-pending    { background: #f3f4f6; color: #6b7280; }

/* モーダル */
#detail-modal, #admin-modal {
  transition: opacity 0.2s;
}

/* ローディングスピナー */
.spinner {
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 0.6s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* トースト */
#toast, #admin-toast {
  transition: opacity 0.3s;
}

/* 写真プレビュー */
.photo-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
}
.photo-wrapper {
  position: relative;
}
.photo-delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

/* テーブル */
table tbody tr:hover {
  background: #f8fafc;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .form-input { font-size: 16px; } /* iOS zoom防止 */
}
