/* ══════════════════════════════════════════════════════════════
   운송관리시스템 - 메인 스타일 (React UI와 통일)
   ══════════════════════════════════════════════════════════════ */

/* ── 기본 리셋 & 폰트 ── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 15px;
  color: #0a0a0a;
  background: #f9fafb;
}

/* ── 앱 루트: 풀 화면 flex 레이아웃 (헤더 + 컨텐츠 + 푸터) ── */
.app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════
   네비게이션 헤더 (React Header와 동일)
   ══════════════════════════════════════════════════════════════ */
.main-nav {
  background-color: #333;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  min-height: 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.15s;
}
.nav-logo:hover {
  background-color: rgba(255,255,255,0.1);
}

.nav-link {
  padding: 12px 20px;
  font-size: 18px;
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 네비 드롭다운 */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-btn {
  padding: 12px 20px;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-radius: 2px;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: #374151;
  text-decoration: none;
  transition: all 0.15s;
}
.nav-dropdown-menu a:hover {
  background-color: #eff6ff;
  color: #1d4ed8;
}

/* 오른쪽 유틸 메뉴 */
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-logout-btn {
  color: #fde68a;
}

/* ══════════════════════════════════════════════════════════════
   푸터 (React Footer와 동일)
   ══════════════════════════════════════════════════════════════ */
.main-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 50;
  background-color: #e5e7eb;
  border-top: 1px solid #d1d5db;
  padding: 8px 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

/* ══════════════════════════════════════════════════════════════
   로그인 페이지
   ══════════════════════════════════════════════════════════════ */
.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

/* 로고 영역 */
.login-header {
  background: #333;
  padding: 32px 32px 24px;
  text-align: center;
}
.login-title {
  margin: 12px 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.login-subtitle {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* 로그인 폼 */
.login-form {
  padding: 32px;
}

.login-welcome {
  display: none;
  margin: 0 0 20px;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.input-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  background: #fff;
}
.input-group input::placeholder {
  color: #9ca3af;
}

/* 로그인 에러 메시지 */
.login-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: shakeError 0.4s ease-in-out;
}
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* 로그인 버튼 (button 태그 리셋 포함) */
.login-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 2px;
  -webkit-appearance: none;
  appearance: none;
}
.login-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.login-btn:active {
  transform: translateY(0);
}

/* 하단 액션 (바로가기) */
.login-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}
.shortcut-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  margin: 0;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.5px;
}
.shortcut-btn:hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-color: #9ca3af;
  color: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.shortcut-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ══════════════════════════════════════════════════════════════
   기존 호환용 스타일 (다른 EJS 페이지에서 사용)
   ══════════════════════════════════════════════════════════════ */

/* 패널 편집 시 비활성화된 버튼 스타일 */
.disabled-btn {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* BL 정보 팝업 스타일 */
.bl-info-popup {
  max-height: 400px;
  overflow-y: auto;
}
.bl-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bl-info-table th,
.bl-info-table td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: left;
}
.bl-info-table th {
  background-color: #f5f5f5;
  font-weight: 600;
  width: 120px;
  color: #333;
}
.bl-info-table td {
  background-color: #fff;
  color: #555;
}
.bl-info-table tr:hover td {
  background-color: #f9f9f9;
}
.bl-info-swal-popup {
  font-family: 'Pretendard', 'Malgun Gothic', '맑은 고딕', sans-serif;
}

/* 스크롤바 스타일 (React와 동일) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
