/* ===== [공통] ===== */
body {
  background: #f8f9fa;
  margin: 0;
  padding: 0;
}

h2 {
  font-weight: 700;
}

.navbar {
  margin-bottom: 2rem;
}

/* ===== [로그인 페이지 전용] ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-wrapper {
  background: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 400px;
}

.login-wrapper h2 {
  margin-bottom: 2rem;
  font-weight: 700;
  text-align: center;
}

.form-control {
  border-radius: 0.5rem;
}

.btn-primary {
  width: 100%;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-weight: 600;
}

.text-muted {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}


/* ===== [리스트 페이지 전용] ===== */
.table {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
}

.table th {
  background: #343a40;
  vertical-align: middle;
  color: #fff;
}

.table td, .table th {
  vertical-align: middle;
  font-size:10pt;
}

.pagination {
  margin-top: 2rem;
}

/* 회원페이지 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: auto; /* hidden에서 auto로 변경 */
}

.main-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px); /* 약간 더 여유롭게 조정 */
    margin: 15px; /* 여백 추가 */
    overflow: visible; /* hidden에서 visible로 변경 */
}

.header-section {
    flex-shrink: 0; /* 헤더 크기 고정 */
    width: 100%; /* 전체 너비 사용 */
    z-index: 100; /* 헤더가 다른 요소 위에 표시되도록 함 */
    margin-bottom: 0; /* 하단 여백 제거 */
    display: block; /* block으로 변경하여 확실히 표시되도록 함 */
}

.header-section {
    flex-shrink: 0; /* 헤더 크기 고정 */
    width: 100%; /* 전체 너비 사용 */
    z-index: 100; /* 헤더가 다른 요소 위에 표시되도록 함 */
    margin-bottom: 0; /* 하단 여백 제거 */
    display: block; /* block으로 변경하여 확실히 표시되도록 함 */
}

.excel-header {
    background-color: #f0f0f0;
    padding: 15px;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box; /* 패딩과 보더를 너비에 포함 */
    position: relative; /* 위치 지정 */
}

.excel-tools {
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box; /* 패딩과 보더를 너비에 포함 */
    position: relative; /* 위치 지정 */
}

.grid-section {
    flex: 1; /* 남은 공간 모두 차지 */
    display: flex;
    flex-direction: column;
    min-height: 0; /* 중요: Firefox 에서 스크롤 작동하게 함 */
    position: relative;
    overflow: visible; /* hidden에서 visible로 변경 */
    margin-top: 0; /* 상단 여백 제거 */
}

.excel-container {
    flex: 1;
    overflow: auto;
    border: 1px solid #c0c0c0;
    border-top: none;
    position: relative;
}

.paging-container {
    height: 50px;
    flex-shrink: 0; /* 페이징 높이 고정 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c0c0c0;
    border-top: none;
    background-color: #f8f9fa;
}

/* 테이블 스타일 */
.excel-grid {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    table-layout: fixed;
}

.excel-grid th {
    background-color: #f0f0f0;
    border: 1px solid #c0c0c0;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    padding: 6px 4px;
    text-align: center;
    white-space: nowrap;
    color: #000;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1);
}

.excel-grid td {
    border: 1px solid #c0c0c0;
    padding: 4px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.excel-grid tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.excel-grid tbody tr:hover {
    background-color: #e9f3ff;
}

/* 헤더 및 툴바 스타일 */
.excel-tools {
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.excel-header {
    background-color: #f0f0f0;
    padding: 15px;
    border: 1px solid #c0c0c0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 상태 관련 스타일 */
.status-cell {
    text-align: center;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  font-size: 0.95em;
}

/* 정보 또는 요청 */
.status-예약,
.status-요청 {
  background-color: #e0f0ff; /* 맑은 하늘색 */
  color: #0066cc;            /* 선명한 블루 */
}

/* 처리 중 */
.status-접수,
.status-기사배정 {
  background-color: #fff8e1; /* 연한 베이지/노랑 */
  color: #b37400;            /* 브라운 톤 */
}

/* 성공 */
.status-완료 {
  background-color: #d8f5d4; /* 밝은 연두색 */
  color: #2e7d32;            /* 신뢰감 있는 녹색 */
}

/* 실패 또는 취소 */
.status-취소 {
  background-color: #ffe0e0; /* 연한 핑크 레드 */
  color: #cc0000;            /* 강한 빨강 */
}

/* 대기 또는 미정 */
.status-대기 {
  background-color: #eeeeee; /* 밝은 회색 */
  color: #666666;            /* 중간 회색 */
}


/* 슬라이드 패널 스타일 */
.order-slide-panel {
    position: fixed;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    padding: 20px;
}

.order-slide-panel.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1049;
    display: none;
}

.overlay.open {
    display: block;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
}

.close-btn:hover {
    color: #343a40;
}

/* 기타 유틸리티 스타일 */
.clickable-row {
    cursor: pointer;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

#loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.excel-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-panel {
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 20px;
}

.grid-button {
    padding: 2px 6px;
    font-size: 12px;
}

.btn-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* 페이징 스타일 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #495057;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
}

/* 스크롤바 스타일 커스터마이징 */
.excel-container::-webkit-scrollbar {
    width: 34px;              /* 세로 스크롤바 너비 */
    height: 14px;             /* 가로 스크롤바 높이 */
}

.excel-container::-webkit-scrollbar-track {
    background: #f1f1f1;      /* 스크롤바 트랙 배경색 */
    border-radius: 7px;       /* 둥근 모서리 */
}

.excel-container::-webkit-scrollbar-thumb {
    background: #888;         /* 스크롤바 썸(이동 부분) 색상 */
    border-radius: 7px;       /* 둥근 모서리 */
    border: 3px solid #f1f1f1; /* 트랙 배경과의 간격 */
}

.excel-container::-webkit-scrollbar-thumb:hover {
    background: #555;         /* 마우스 오버시 썸 색상 */
}

/* Firefox에서 스크롤바 스타일 (옵션) */
.excel-container {
    scrollbar-width: thick;   /* Firefox에서 스크롤바 두께: thin, auto, 또는 thick */
    scrollbar-color: #888 #f1f1f1; /* 썸 색상과 트랙 색상 */
}

textarea.form-control {
    white-space: pre-wrap; /* 줄바꿈 유지 */
    resize: vertical;      /* 세로 리사이즈만 허용 */
}

.editable-cell {
    border-left: 3px solid #e0e0e0;
    background-color: #fdfdfd;
    position: relative;
}
.editable-cell:hover {
    border-left-color: #007bff;
    background-color: #f4faff;
}
.editable-cell .field-display::before {
    content: '✎';
    font-size: 7px;
    color: #ff00cc;
    margin-right: 5px;
}
