/* ==========================================================
   OASIS | 마이페이지 스타일 정리본
   ----------------------------------------------------------
   - 중복/불필요 선언 제거
   - hover 효과 단순화
   - 레이아웃 / 반응형 / 아이콘 정리
   ========================================================== */


/* =======================
   전체 레이아웃
   ======================= */
   .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: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 30px;
  }
  
  .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;
    overflow: hidden;
  }
  
  .avatar-name {
    padding: 0 6px;
    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;
    border-radius: 10px;
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
  }
  
  .nav-item:hover,
  .nav-item.active {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
  }
  
  /* --- PNG 아이콘 --- */
  .nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: background-image 0.2s ease;
    flex-shrink: 0;
  }
  
  /* 기본 (흰색) */
  .nav-icon.dashboard { background-image: url('../images/icons/dash_w.png'); }
  .nav-icon.profile   { background-image: url('../images/icons/profile_w.png'); }
  .nav-icon.report    { background-image: url('../images/icons/report_w2.png'); }
  
  /* hover / active 시 주황색 */
  .nav-item:hover .nav-icon.dashboard,
  .nav-item.active .nav-icon.dashboard { background-image: url('../images/icons/dash_o.png'); }
  
  .nav-item:hover .nav-icon.profile,
  .nav-item.active .nav-icon.profile   { background-image: url('../images/icons/profile_o.png'); }
  
  .nav-item:hover .nav-icon.report,
  .nav-item.active .nav-icon.report    { background-image: url('../images/icons/report_o2.png'); }
  
  
  
  /* =======================
     메인 콘텐츠 공통
     ======================= */
  .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(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .stat-card {
    display: flex;
    align-items: center;
    padding: 25px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }
  
  /* hover 효과 제거 */
  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* --- 아이콘 --- */
  .stat-icon {
    width: 46px;
    height: 46px;
    margin-right: 20px;
    flex: 0 0 46px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 6px;
    transition: background-image 0.12s linear;
  }
  
  /* 기본(흰색) → hover(주황) */
  .stat-icon.accident { background-image: url('../images/icons/accident_w.png'); }
  .stat-icon.check    { background-image: url('../images/icons/check_W.png'); }
  .stat-icon.report   { background-image: url('../images/icons/report_w.png'); }
  
  .stat-card:hover .stat-icon.accident { background-image: url('../images/icons/accident_o.png'); }
  .stat-card:hover .stat-icon.check    { background-image: url('../images/icons/check_o.png'); }
  .stat-card:hover .stat-icon.report   { background-image: url('../images/icons/report_o.png'); }
  
  .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: repeat(3, 1fr);
    gap: 20px;
  }
  
  /* 배치 조정 */
  .dashboard-grid .dashboard-card:first-child { grid-column: 1 / span 2; }
  .dashboard-grid .dashboard-card:last-child  { grid-column: 3 / span 1; }
  
  .dashboard-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
  }
  
  .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;
  }
  
  
  /* --- 상태 배지 --- */
  .status-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .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;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .btn-view-all:hover {
    background: rgba(255, 107, 53, 0.3);
    color: #fff;
  }
  
  
  
  /* =======================
     빠른 작업
     ======================= */
  .quick-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  
  .quick-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
  
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
  
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
  
    font-size: 16px;
    font-weight: 600;
  
    transition: all 0.2s ease;
    cursor: pointer;
  }
  
  .quick-action-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
  }
  
  /* --- 아이콘 --- */
  .action-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    flex-shrink: 0;
    transition: background-image 0.25s ease;
  }
  
  /* 기본(흰색) → hover(주황) */
  .action-icon.new      { background-image: url('../images/icons/plus.png'); }
  .action-icon.analysis { background-image: url('../images/icons/search.png'); }
  .action-icon.report   { background-image: url('../images/icons/report_w.png'); }
  
  
  /* =======================
     프로필 폼
     ======================= */
  .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;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .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; }
  }
  
  
  
  /* =======================
     반응형 레이아웃
     ======================= */
  
  /* --- 1050px 이하: 바로 1열 전환 --- */
  @media (max-width: 1050px) {
    .stats-grid,
    .dashboard-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }
  
    .dashboard-grid .dashboard-card:first-child,
    .dashboard-grid .dashboard-card:last-child {
      grid-column: auto;
    }
  
    .quick-actions { align-items: stretch; }
    .quick-action-btn { width: 100%; }
  }
  
  /* --- 768px 이하: 전체 세로 스택 --- */
  @media (max-width: 768px) {
    .mypage-container {
      flex-direction: column;
    }
  
    .mypage-sidebar {
      width: 100%;
      padding: 20px;
    }
  
    .mypage-content {
      padding: 20px;
    }
  }
  