/* ===== 마이페이지 전체 레이아웃 ===== */
.mypage-container {
  display: flex;
  min-height: calc(100vh - 100px);
  padding-top: 100px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
}

/* ===== 사이드바 ===== */
.mypage-sidebar {
  width: 300px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-right: 1px solid #333;
  padding: 30px 20px;
  overflow-y: auto;
}

.user-profile-card {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 프로필 아바타 */
.profile-avatar {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 15px;
  background: linear-gradient(135deg, #ff6b35, #e85a2a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  overflow: hidden;
}

.avatar-name {
  padding: 0 6px;
  word-break: keep-all;
  white-space: nowrap;
  text-align: center;
}

.profile-info h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
}

.profile-info p {
  margin: 0 0 10px;
  color: #ccc;
  font-size: 14px;
}

.role-badge {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== 사이드 메뉴 ===== */
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #ccc;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 107, 53, 0.2);
  color: #ff6b35;
  border-left: 3px solid #ff6b35;
}

.nav-icon {
  margin-right: 12px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* ===== 메인 콘텐츠 ===== */
.mypage-content {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.section-header h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #ff6b35; /* 기본 단색 */
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .section-header h2 {
    background: linear-gradient(135deg, #ff6b35, #ff9b62);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

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

/* ===== 통계 카드 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

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

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

.stat-icon {
  font-size: 40px;
  margin-right: 20px;
  opacity: 0.8;
}

.stat-info h3 {
  margin: 0 0 5px;
  font-size: 32px;
  font-weight: 700;
  color: #ff6b35;
}

.stat-info p {
  margin: 0;
  color: #ccc;
  font-size: 14px;
}

/* ===== 대시보드 섹션 ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  position: relative;
  z-index: 1;
}

.dashboard-card h3 {
  margin: 0 0 20px;
  font-size: 20px;
  color: #ff6b35;
}

/* ===== 최근 사고 현황 카드 ===== */
.incident-summary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;

}

.incident-summary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 107, 53, 0.15);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.summary-header h4 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.summary-meta {
  color: #ccc;
  font-size: 14px;
  margin: 2px 0;
}

/* ===== 상태 배지 색상 ===== */
.status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.status-open {
  background: rgba(255, 0, 0, 0.2);
  color: #ff5c5c;
}

.status-report_generated {
  background: rgba(255, 180, 0, 0.2);
  color: #ffc107;
}

.status-closed {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

/* ===== 전체 보기 버튼 ===== */
.btn-view-all {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: #ff6b35;
  border-radius: 10px;
  margin-top: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view-all:hover {
  background: rgba(255, 107, 53, 0.3);
  color: #fff;
}

/* ===== 빠른 작업 버튼 ===== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.quick-action-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: #ff6b35;
}

.action-icon {
  font-size: 20px;
}
/* ===== 프로필 폼 ===== */
.profile-form {
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #ff6b35;
}

.form-group input {
  width: 100%;
  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: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.form-group input[readonly] {
  background: rgba(255, 255, 255, 0.05);
  color: #999;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* ===== 버튼 공통 ===== */


.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b35, #e85a2a);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ===== 메시지 영역 ===== */
.message-area {
  position: fixed;
  top: 120px;
  right: 30px;
  z-index: 1000;
  max-width: 400px;
}

.message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

.message.success {
  background: #ff6b35;
  color: #fff;
}

.message.error {
  background: #dc3545;
  color: #fff;
}

.message.info {
  background: #17a2b8;
  color: #fff;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mypage-container {
    flex-direction: column;
  }

  .mypage-sidebar {
    width: 100%;
    padding: 20px;
  }

  .mypage-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
