/* ==========================================
   보고서 페이지 전용 스타일
========================================== */

.reports-container {
  padding-top: 130px;
  min-height: calc(100vh - 100px);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 30px 40px;
  margin-top: 100px;
}

.reports-header {
  margin-bottom: 40px;
}

.reports-header h1 {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35, #ff6b35);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.reports-header p {
  margin: 0 0 25px;
  color: #ccc;
  font-size: 16px;
}

.header-actions {
  display: flex;
  gap: 15px;
}

/* ============================
   필터 섹션
============================ */
.filter-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
}

.filter-bar {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  min-width: 150px;
}

.search-input {
  flex: 1;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* ============================
   필터 select (유형 필터)
============================ */
.filter-select {
  padding: 12px 15px;
  background: rgba(54, 54, 54, 0.4); /* ✅ 어두운 반투명 배경 */
  border: 1px solid rgba(145, 143, 143, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  min-width: 150px;
  transition: all 0.2s ease;
}

.filter-select:hover {
  background: rgba(66, 65, 65, 0.6);
  border-color: rgba(0, 123, 255, 0.6);
}

.filter-select:focus {
  outline: none;
  background: #404040;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* ============================
   보고서 통계
============================ */
.reports-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: #ff6b35;
  margin-bottom: 8px;
}

.stat-label {
  color: #ccc;
  font-size: 14px;
}

/* ============================
   보고서 목록
============================ */
.reports-list-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 25px;
  transition: all 0.3s ease;
}

.report-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

/* ============================
   보고서 행 (3분할)
============================ */
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.report-left {
  flex: 1.5;
  min-width: 200px;
}

.report-left h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #fff;
}

.report-type {
  color: #bbb;
  font-size: 15px;
  margin: 0;
}

/* ✅ 중앙 생성일 부분 수정 */
.report-center {
  flex: 6;
  text-align: left;
  padding-left: 40px;
}

.report-date {
  color: #ccc;
  font-size: 13.5px;
}

.report-date::before {
  content: "생성일: ";
  color: #aaa;
  font-weight: 500;
}

/* 오른쪽 버튼 */
.report-right {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex: 1;
  min-width: 150px;
}

.btn-small {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #4580c9;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s;
}

.btn-small:hover {
  background: #009bff;
}

.btn-small.danger {
  background: #cc3544;
}

.btn-small.danger:hover {
  background: #ff4b5c;
}

/* ============================
   기타
============================ */
.no-data {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
}

/* ============================
   토스트 메시지
============================ */
.toast-container {
  position: fixed !important;   /* ✅ 상위 스타일 덮어쓰기 */
  bottom: 25px !important;      /* ✅ 하단 고정 */
  right: 25px !important;       /* ✅ 오른쪽 고정 */
  left: auto !important;        /* 혹시 left 값이 남아있다면 무효화 */
  top: auto !important;
  z-index: 999999;              /* ✅ 모달보다 위에 표시되도록 */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(0, 123, 255, 0.92);
  color: #fff;
  padding: 14px 20px;        /* ✅ 크기 키움 */
  border-radius: 10px;
  font-size: 15px;           /* ✅ 글자 크기 증가 */
  font-weight: 500;          /* ✅ 약간 두껍게 */
  min-width: 200px;          /* ✅ 더 넓게 */
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: rgba(40,167,69,0.95);
}
.toast.error {
  background: rgba(220,53,69,0.95);
}
.toast.info {
  background: rgba(42, 129, 58, 0.95);  
}
.toast.warning {
  background: rgba(255,193,7,0.95);
  color: #000;
}

/* ============================
   모달
============================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  color: #ff6b35;
  font-size: 24px;
}

.modal-close {
  background: none;
  border: none;
  color: #ccc;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 30px;
}

.modal-body .form-group {
  margin-bottom: 25px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #007bff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 25px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================
   사고 선택 테이블 (신규 추가)
============================ */
.incident-table-wrapper {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  margin-top: 0px;
}

.incident-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  font-size: 14.5px;
}

.incident-table thead {
  background: rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(3px);
}

.incident-table th, 
.incident-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.incident-table tr:hover {
  background: rgba(0, 123, 255, 0.2);
  cursor: pointer;
}

.incident-table tr.selected {
  background: rgba(0, 123, 255, 0.35);
  transition: background 0.2s ease;
}

/* ============================
   반응형
============================ */
@media (max-width: 768px) {
  .reports-container {
    padding: 20px;
  }

  .report-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .report-center {
    text-align: left;
    padding-left: 0;
  }

  .report-right {
    justify-content: flex-start;
  }
}

