/* ==========================================================================
   JMT Webhard Premium Legacy Style System
   - Windows XP & Legacy IE8+ Fully Compatible
   - Modern Web UI Aesthetics Fallback
   ========================================================================== */

body {
  margin: 0;
  padding: 0;
  background: #f1f5f9; /* 부드럽고 세련된 슬레이트 그레이 */
  color: #0f172a; /* 시인성이 높은 짙은 차콜 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", Gulim, Tahoma, Verdana, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 컨테이너 레이아웃 (정적 가로폭 고정으로 구형 브라우저 레이아웃 붕괴 방지) */
.page {
  width: 1200px;
  margin: 0 auto;
  padding: 24px 0 40px;
}

/* 헤더 영역 */
.header {
  margin-bottom: 20px;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 12px;
  overflow: hidden;
}

.header h1 {
  margin: 0;
  font-size: 26px;
  float: left;
}

.header h1 a {
  color: #1e293b;
  font-weight: 800;
}

.header h1 a:hover {
  text-decoration: none;
}

/* 헤더 로그인 사용자 정보 및 로그아웃 (눈에 띄는 프리미엄 강렬한 레드 내비게이터) */
.header-user {
  float: right;
  margin-top: 2px;
  font-size: 13px;
}

.user-badge {
  display: inline-block;
  padding: 5px 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 10px;
  vertical-align: middle;
}

.logout-link {
  display: inline-block;
  padding: 5px 14px;
  background: #ef4444 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
  font-weight: bold;
  border-radius: 4px;
  vertical-align: middle;
  text-decoration: none !important;
}

.logout-link:hover {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* 공통 카드 패널 */
.panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px; /* IE8 이하에선 직각 처리되나 현대 브라우저에선 세련되게 둥글어짐 */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* 알림 메시지 스택 */
.flash-stack {
  margin-bottom: 16px;
}

.flash-message {
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: bold;
}

.flash-message.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.flash-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* 작업 영역 전체 */
.file-workspace {
  display: block;
}

/* 상단 검색 영역 */
.top-search-bar {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: #ffffff;
}

.search-form {
  overflow: hidden;
}

.search-input {
  float: left;
  width: 860px;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
}

.search-input.search-active {
  border-color: #2563eb;
  background: #ffffff;
  outline: none;
}

.search-button {
  float: left;
  margin: 0 0 0 10px;
}

.search-reset {
  float: left;
  margin: 9px 0 0 14px;
  color: #64748b;
  font-weight: bold;
}

.search-reset:hover {
  color: #334155;
}

/* 메인 프레임 (Float 기반으로 IE 최적화) */
.main-frame {
  overflow: hidden;
}

/* 좌측 트리 탐색기 */
.left-explorer {
  float: left;
  width: 240px;
  min-height: 720px;
  padding: 20px;
  box-sizing: border-box;
}

/* 중앙 파일 목록 */
.center-list {
  float: left;
  width: 600px;
  min-height: 720px;
  margin-left: 16px;
  padding: 20px;
  box-sizing: border-box;
}

/* 우측 사이드바 (업로드/상태) */
.right-sidebar {
  float: right;
  width: 328px;
}

.upload-panel,
.manage-panel,
.status-panel {
  padding: 20px;
  box-sizing: border-box;
}

.manage-panel,
.status-panel {
  margin-top: 16px;
}

/* 섹션 타이틀 */
.section-head {
  overflow: hidden;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.section-head h3 {
  float: left;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  vertical-align: middle;
}

/* 프리미엄 브레드크럼 이동기 (가로 줄맞춤 및 가독성 극대화) */
.breadcrumb-container {
  display: inline-block;
  font-size: 12px;
  font-weight: normal;
  color: #475569;
  margin-left: 14px;
  vertical-align: middle;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.breadcrumb-label {
  font-weight: bold;
  color: #64748b;
  margin-right: 4px;
}

.breadcrumb-segment {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb-segment:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.breadcrumb-separator {
  margin: 0 4px;
  color: #94a3b8;
  font-size: 10px;
}

.head-block {
  float: left;
}

.muted {
  float: right;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

/* 폴더 트리 구조 */
.explorer-tree {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 10px;
}

.tree-root,
.tree-link {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  color: #334155;
  font-weight: 500;
}

.tree-root:hover,
.tree-link:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.tree-root.active,
.tree-link.active {
  background: #dbeafe;
  color: #1e40af;
  font-weight: bold;
}

.tree-list {
  margin: 6px 0 0;
  padding: 0 0 0 12px;
  list-style: none;
}

.tree-item {
  margin-bottom: 2px;
}

.tree-item.depth-1 { padding-left: 10px; }
.tree-item.depth-2 { padding-left: 20px; }
.tree-item.depth-3 { padding-left: 30px; }
.tree-item.depth-4 { padding-left: 40px; }
.tree-item.depth-5 { padding-left: 50px; }

.tree-empty {
  color: #94a3b8;
  padding: 8px;
  text-align: center;
}

.breadcrumb-line {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

/* 입력 폼 및 레이블 */
.stack-form {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #475569;
}

.text-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
  margin-bottom: 12px; /* 버튼과의 여유로운 간격 확보 */
}

.text-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  outline: none;
}

/* 버튼 디자인 시스템 */
.primary-button,
.danger-button {
  display: inline-block;
  padding: 8px 16px;
  height: 38px;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font-weight: bold;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
}

.primary-button:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}

.primary-button.secondary-tone {
  background: #059669;
  border-color: #047857;
}

.primary-button.secondary-tone:hover {
  background: #047857;
  border-color: #065f46;
}

.danger-button {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

.danger-button:hover {
  background: #dc2626;
  border-color: #b91c1c;
}

.full-button {
  width: 100%;
}

/* 드래그 앤 드롭 영역 */
.drop-zone {
  margin-top: 12px;
  padding: 24px 16px;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.drop-zone strong {
  display: block;
  margin-bottom: 4px;
  color: #475569;
}

.drop-zone span {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.drop-zone.is-over {
  border-color: #2563eb;
  background: #eff6ff;
}

/* 상태 현황 그리드 (가로 꽉 차게 100% 블럭 카드 디자인) */
.status-grid {
  overflow: hidden;
}

.status-item {
  display: block;
  width: 288px !important;
  min-height: 66px;
  margin: 0 0 10px 0 !important;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #2563eb !important; /* Luna 테마 액센트 */
  border-radius: 6px;
  background: #f8fafc;
  box-sizing: border-box;
  float: none !important;
}

.status-icon {
  float: left;
  font-size: 24px;
  margin-right: 12px;
  line-height: 1.2;
}

.status-content {
  overflow: hidden;
}

.status-item.status-full {
  width: 288px !important;
  margin-right: 0 !important;
}

.status-key {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.status-value {
  display: block;
  color: #1e293b;
  font-size: 15px;
  font-weight: 700;
  word-break: break-all;
}

/* 파일 목록 테이블 */
.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th,
.file-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.file-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  border-top: 1px solid #e2e8f0;
}

.file-table tbody tr:hover td {
  background: #f1f5f9; /* 구형 브라우저에서도 호버 라인 피드백 제공 */
}

.name-cell {
  font-weight: bold;
}

.check-col { width: 5%; text-align: center; }
.name-col { width: 65%; }
.type-col { width: 10%; text-align: center; }
.action-col { width: 20%; }

.check-cell {
  text-align: center;
  vertical-align: middle !important;
}

.type-cell {
  text-align: center;
  font-weight: bold;
  color: #475569;
  vertical-align: middle !important;
}

.entry-link {
  color: #1e3a8a;
  font-weight: bold;
}

.entry-link:hover {
  color: #2563eb;
}

.folder-entry-link {
  display: inline-block;
}

/* 순수 CSS 드로잉 폴더 아이콘 (구형 브라우저 완벽 호환) */
.folder-icon {
  display: inline-block;
  width: 16px;
  height: 12px;
  margin-right: 8px;
  border-radius: 2px;
  background: #f59e0b;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.folder-icon:before {
  content: "";
  position: absolute;
  left: 2px;
  top: -3px;
  width: 6px;
  height: 3px;
  border-radius: 1px 1px 0 0;
  background: #d97706;
}

.tree-folder-icon {
  margin-right: 6px;
}

.file-entry-name {
  display: inline-block;
  padding-left: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E") no-repeat left center;
  background-size: 15px 15px;
  color: #334155;
}

.action-cell {
  white-space: nowrap;
  text-align: left;
  vertical-align: middle !important;
}

/* 작업 영역 1행 가로 일렬 (inline) 정렬 */
.action-aligner {
  display: inline-block;
  vertical-align: middle;
}

.action-aligner > * {
  vertical-align: middle !important;
}

/* 호버 시 고급 관리 도구(이름변경, 이동) 노출 */
.action-aligner .row-tools {
  display: none;
  vertical-align: middle;
}

.file-table tbody tr:hover .row-tools {
  display: inline-block;
}

.ghost-link {
  display: inline-block;
  color: #2563eb;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  vertical-align: middle;
}

.ghost-link:hover {
  background: #dbeafe;
  text-decoration: none;
}

.table-link {
  margin-right: 4px;
}

.inline-delete {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

.inline-delete .danger-button {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: bold;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: 4px;
  vertical-align: middle;
}

.inline-delete .danger-button:hover {
  background: #fca5a5;
}

/* 관리 도구 패널 (가로 일렬 콤팩트화) */
.mini-form {
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}

.mini-input,
.mini-select {
  width: 100px;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 11px;
  vertical-align: middle;
}

.mini-input {
  width: 110px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 11px;
  vertical-align: middle;
}

.mini-button {
  height: 26px;
  margin-left: 4px;
  padding: 0 8px;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  background: #eff6ff;
  color: #1e40af;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  vertical-align: middle;
}

.mini-button:hover {
  background: #dbeafe;
}

.empty-cell {
  text-align: center;
  color: #94a3b8;
  padding: 36px 10px;
  font-size: 13px;
}

/* 로그인 / 히어로 섹션 */
.hero {
  overflow: hidden;
  padding: 40px 0;
}

.hero-copy {
  float: left;
  width: 780px;
  padding-top: 20px;
}

.hero-copy h2 {
  margin: 12px 0 16px;
  font-size: 36px;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: #2563eb;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
}

.hero-text {
  color: #475569;
  font-size: 15px;
  max-width: 680px;
}

.login-card {
  float: right;
  width: 380px;
  padding: 28px;
  box-sizing: border-box;
  background: #ffffff;
}

.login-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 20px;
  color: #1e293b;
  font-weight: 700;
}

.login-card .muted {
  float: none;
  display: block;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 12px;
}

.login-card .field-label {
  font-size: 12px;
}

.login-card .text-input {
  margin-bottom: 16px;
}

.full-width {
  width: 100%;
}

.trash-form {
  margin-top: 8px;
}

.head-action {
  float: right;
  margin-top: 6px;
}

/* 사이드바 로그아웃 스타일 */
.sidebar-logout-box {
  margin-top: 12px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
}

.logout-sidebar-btn {
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
  text-decoration: none !important;
}

.logout-sidebar-btn:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #991b1b !important;
}
