
/* Ultra UI Pack v1 */
:root {
  --ui-shell-max: 1600px;
  --ui-radius-xl: 28px;
  --ui-radius-lg: 20px;
  --ui-radius-md: 14px;
  --ui-shadow-soft: 0 20px 60px rgba(15,23,42,.10);
  --ui-shadow-card: 0 12px 30px rgba(15,23,42,.08);
}
html { scroll-behavior: smooth; }
body.app-shell {
  background:
    radial-gradient(circle at top left, rgba(79,124,255,.10), transparent 30%),
    radial-gradient(circle at top right, rgba(34,197,94,.08), transparent 22%),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%) !important;
}
body.app-shell::after {
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image: linear-gradient(rgba(88,110,156,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(88,110,156,.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,.75), transparent 92%);
  z-index:0;
}
body.app-shell > * { position: relative; z-index: 1; }
body.app-shell .sidebar,
body.app-shell .top-header,
body.app-shell .page-shell,
body.app-shell .card,
body.app-shell .modal-content,
body.app-shell .quota-box,
body.app-shell .theme-modal-content,
body.app-shell .item-card,
body.app-shell .path-bar,
body.app-shell .toolbar,
body.app-shell .hero-panel,
body.app-shell .mini-panel,
body.app-shell .stat-card,
body.app-shell .stats-card,
body.app-shell .dashboard-card,
body.app-shell .widget,
body.app-shell .panel,
body.app-shell .table-wrap,
body.app-shell #transferManager,
body.app-shell .custom-modal-content,
body.app-shell .auth-container,
body.app-shell .auth-side-panel {
  box-shadow: var(--ui-shadow-soft) !important;
}
body.app-shell .sidebar,
body.app-shell .top-header,
body.app-shell .page-shell,
body.app-shell .card,
body.app-shell .modal-content,
body.app-shell .quota-box,
body.app-shell .dashboard-card,
body.app-shell .stats-card,
body.app-shell .widget,
body.app-shell .panel,
body.app-shell .table-wrap {
  border-radius: var(--ui-radius-lg) !important;
}
body.app-shell .top-header {
  position: sticky;
  top: 0;
  z-index: 30;
}
body.app-shell .content-area {
  padding: 26px !important;
}
body.app-shell .page-shell {
  background: rgba(255,255,255,.86) !important;
  border: 1px solid rgba(130,150,190,.15) !important;
  backdrop-filter: blur(16px);
}
body.app-shell .card {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(249,251,255,.92)) !important;
  border: 1px solid rgba(209,223,243,.9) !important;
  box-shadow: var(--ui-shadow-card) !important;
}
body.app-shell .btn,
body.app-shell .btn-cyber,
body.app-shell button,
body.app-shell .overlay-btn {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
body.app-shell .btn:hover,
body.app-shell .btn-cyber:hover,
body.app-shell button:hover,
body.app-shell .overlay-btn:hover {
  transform: translateY(-1px);
}
body.app-shell .shell-menu-toggle {
  width: 42px; height: 42px; border: 1px solid rgba(79,124,255,.18); border-radius: 14px; background: rgba(255,255,255,.86); color: #3451a3;
  display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 25px rgba(79,124,255,.10);
}
body.app-shell .shell-menu-toggle:hover { background: #4f7cff; color: #fff; }
body.app-shell .shell-header-left,
body.app-shell .shell-header-right { display:flex; align-items:center; gap:14px; }
body.app-shell .shell-page-kicker { color:#4f7cff; font-size:11px; letter-spacing:.16em; text-transform:uppercase; font-weight:900; }
body.app-shell .shell-page-title { font-size: 20px; font-weight: 900; letter-spacing: -.02em; color:#142033; }
body.app-shell .shell-page-sub { font-size: 12px; color:#667892; margin-top:4px; }
body.app-shell .shell-user-chip {
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px; background: rgba(255,255,255,.92); border:1px solid rgba(79,124,255,.14); font-weight:800; color:#30435e;
}
body.app-shell .shell-user-chip i { color:#4f7cff; }
body.app-shell .sidebar { position: relative; }
body.app-shell .sidebar::after {
  content:''; position:absolute; inset:0 0 auto 0; height: 120px; pointer-events:none;
  background: linear-gradient(180deg, rgba(79,124,255,.10), transparent);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
}
body.app-shell .menu-list { padding-top: 14px !important; }
body.app-shell .menu-item {
  border-radius: 14px !important;
}
body.app-shell .menu-item.active,
body.app-shell .menu-item:hover {
  box-shadow: 0 10px 24px rgba(79,124,255,.10) !important;
}
body.app-shell .table-wrap, body.app-shell table { width: 100%; }
body.app-shell table { border-collapse: separate; border-spacing: 0; }
body.app-shell th, body.app-shell td { border-color: rgba(215,225,240,.9) !important; }
body.app-shell tr:hover td { background: rgba(79,124,255,.03); }
body.app-shell .file-manager-header {
  position: sticky; top: 82px; z-index: 20;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(245,249,255,.88)) !important;
  border: 1px solid rgba(79,124,255,.12) !important;
}
body.app-shell .search-box {
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(79,124,255,.18) !important;
  box-shadow: inset 0 1px 2px rgba(20,32,51,.03);
}
body.app-shell .search-box input { color:#142033 !important; }
body.app-shell .search-box button { color:#4f7cff !important; }
body.app-shell .fm-summary {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:14px; margin: 16px 0 22px;
}
body.app-shell .fm-chip {
  padding: 16px 18px; border-radius: 18px; border:1px solid rgba(79,124,255,.12); background: rgba(255,255,255,.84); display:flex; gap:14px; align-items:center;
}
body.app-shell .fm-chip .icon {
  width: 46px; height: 46px; border-radius: 14px; display:flex; align-items:center; justify-content:center; background: linear-gradient(135deg, rgba(79,124,255,.14), rgba(123,97,255,.10)); color:#4f7cff;
}
body.app-shell .fm-chip strong { display:block; font-size: 18px; color:#142033; }
body.app-shell .fm-chip span { display:block; font-size: 12px; color:#6a7d97; font-weight:700; }
body.app-shell .grid-container {
  gap: 20px !important;
}
body.app-shell .item-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.94)) !important;
  border: 1px solid rgba(217,228,243,.95) !important;
  min-height: 232px !important;
}
body.app-shell .item-card::before {
  content:''; position:absolute; inset:0; pointer-events:none; background: linear-gradient(180deg, rgba(79,124,255,.05), transparent 40%);
}
body.app-shell .item-card:hover {
  border-color: rgba(79,124,255,.26) !important;
  box-shadow: 0 20px 40px rgba(79,124,255,.10) !important;
}
body.app-shell .icon-wrapper {
  border: 1px solid rgba(79,124,255,.10) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(242,247,255,.94)) !important;
}
body.app-shell .item-name { color:#142033 !important; text-shadow:none !important; }
body.app-shell .item-meta {
  background: rgba(79,124,255,.06) !important; color:#4f7cff !important; border-color: rgba(79,124,255,.12) !important;
}
body.app-shell .item-overlay {
  background: rgba(255,255,255,.92) !important;
}
body.app-shell .overlay-btn {
  background: rgba(248,250,255,.94) !important;
  color: #30435e !important;
  border-color: rgba(79,124,255,.14) !important;
}
body.app-shell .overlay-btn:hover {
  background: rgba(79,124,255,.08) !important;
  color: #18335f !important;
}
body.app-shell .overlay-btn.btn-danger-overlay,
body.app-shell .overlay-btn.btn-danger {
  color: #d14564 !important;
  border-color: rgba(209,69,100,.18) !important;
}
body.app-shell .file-thumb,
body.app-shell .thumb-image {
  width:100%; height:100%; object-fit:cover; display:block;
}
body.app-shell .empty-state-panel {
  grid-column: 1 / -1; min-height: 280px; padding: 26px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,249,255,.90)); border: 1px dashed rgba(79,124,255,.18); border-radius: 26px;
}
body.app-shell .empty-state-panel .icon {
  width: 86px; height: 86px; border-radius: 28px; display:flex; align-items:center; justify-content:center; background: linear-gradient(135deg, rgba(79,124,255,.14), rgba(123,97,255,.14)); color:#4f7cff; font-size:34px; margin-bottom:16px;
}
body.app-shell #transferManager {
  border-radius: 24px !important; border: 1px solid rgba(79,124,255,.20) !important; background: rgba(255,255,255,.88) !important; color:#142033 !important; backdrop-filter: blur(18px);
}
body.app-shell .tm-header,
body.app-shell .tm-global-stats,
body.app-shell .tm-toolbar { background: transparent !important; color:#142033 !important; text-shadow:none !important; }
body.app-shell .tm-item { background: rgba(247,250,255,.94) !important; border-color: rgba(79,124,255,.12) !important; }
body.app-shell .tm-item-name { color:#142033 !important; }
body.app-shell .tm-item-meta { color:#667892 !important; }
body.app-shell .tm-global-progress-bg,
body.app-shell .tm-progress-bg { background: rgba(79,124,255,.08) !important; border-color: transparent !important; }
body.app-shell .tm-global-progress-fill,
body.app-shell .tm-progress-fill { background: linear-gradient(90deg, #4f7cff, #7b61ff) !important; box-shadow:none !important; }
body.app-shell .custom-modal,
body.app-shell .modal-overlay { backdrop-filter: blur(8px); }
body.app-shell .custom-modal-content,
body.app-shell .modal-content { background: rgba(255,255,255,.94) !important; border:1px solid rgba(79,124,255,.14) !important; }
body.app-shell .cyber-toast {
  background: rgba(255,255,255,.94) !important; color:#142033 !important; border-color: rgba(79,124,255,.16) !important;
}
body.auth-shell {
  min-height: 100vh;
}
body.auth-shell .auth-shell-wrap {
  width: min(1180px, 100%); display:grid; grid-template-columns: minmax(300px, 380px) minmax(340px, 460px); justify-content:center; gap:24px; align-items: stretch;
}
body.auth-shell .auth-side-panel {
  display:flex; flex-direction:column; justify-content:space-between; padding: 30px; border-radius: 28px; background: rgba(255,255,255,.72); border:1px solid rgba(255,255,255,.82); backdrop-filter: blur(18px);
}
body.auth-shell .auth-side-panel .eyebrow { font-size: 12px; font-weight:900; letter-spacing:.16em; text-transform:uppercase; color:#4f7cff; }
body.auth-shell .auth-side-panel h2 { margin: 10px 0 12px; text-align:left; font-size: 30px; line-height: 1.15; }
body.auth-shell .auth-side-panel p { color:#5f7088; line-height:1.7; margin:0; }
body.auth-shell .auth-feature-list { display:grid; gap:12px; margin-top:20px; }
body.auth-shell .auth-feature {
  display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:18px; background: rgba(255,255,255,.82); border:1px solid rgba(79,124,255,.10);
}
body.auth-shell .auth-feature i { margin-top: 2px; color:#4f7cff; }
body.auth-shell .auth-feature strong { display:block; font-size: 14px; margin-bottom: 4px; }
body.auth-shell .auth-mini-stats { display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; margin-top:20px; }
body.auth-shell .auth-mini-stat { background: rgba(255,255,255,.82); border:1px solid rgba(79,124,255,.10); border-radius: 18px; padding:16px; }
body.auth-shell .auth-mini-stat strong { display:block; font-size: 20px; }
body.auth-shell .auth-mini-stat span { color:#6a7d97; font-size: 12px; font-weight:700; }
body.auth-shell .auth-container { margin: 0 auto; }
body.auth-shell .auth-brand-footnote { margin-top: 26px; font-size: 12px; color:#70819a; }
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
  body.auth-shell .auth-shell-wrap { grid-template-columns: 1fr; }
  body.auth-shell .auth-side-panel { order: 2; }
}
@media (max-width: 860px) {
  body.app-shell .shell-menu-toggle { display:flex; }
  body.app-shell .sidebar {
    position: fixed !important; left: 0; top: 0; bottom:0; width: min(88vw, 320px) !important; transform: translateX(-105%); transition: transform .25s ease; z-index: 200;
    max-height: none !important; height: auto !important;
  }
  body.app-shell.sidebar-open .sidebar { transform: translateX(0); }
  body.app-shell .app-shell-backdrop {
    position: fixed; inset: 0; background: rgba(20,32,51,.28); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .2s ease; z-index: 150;
  }
  body.app-shell.sidebar-open .app-shell-backdrop { opacity:1; visibility: visible; }
  body.app-shell .top-header { padding: 16px 18px !important; min-height: 78px; }
  body.app-shell .content-area { padding: 16px !important; }
  body.app-shell .shell-page-title { font-size: 18px; }
  body.app-shell .shell-page-sub, body.app-shell .shell-user-chip .label-text, body.app-shell .header-sub, body.app-shell .header-chip:not(:first-child) { display: none !important; }
  body.app-shell .header-actions, body.app-shell .shell-header-right { gap: 8px !important; }
  body.app-shell .file-manager-header { top: 88px; }
  body.app-shell .file-manager-header { padding: 18px !important; }
  body.app-shell .fm-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.app-shell #transferManager { left: 12px !important; right: 12px !important; width: auto !important; bottom: max(12px, env(safe-area-inset-bottom)) !important; }
}


/* 기능창/모달 최상단 표시 보정 */
body.app-shell .custom-modal,
body.app-shell .modal-overlay {
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: max(22px, env(safe-area-inset-top)) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  z-index: 2147483000 !important;
}
body.app-shell .custom-modal-content,
body.app-shell .modal-content {
  position: relative !important;
  z-index: 2147483001 !important;
  margin-top: 0 !important;
  max-height: calc(100vh - 56px) !important;
  overflow-y: auto !important;
}


/* 파일 카드 위치 기준 모달 표시: 화면 밖으로 잘리지 않고 스크롤 시 클릭한 파일을 따라다님 */
body.app-shell .custom-modal.modal-anchored,
body.app-shell .modal-overlay.modal-anchored {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.app-shell .custom-modal.modal-anchored .custom-modal-content,
body.app-shell .modal-overlay.modal-anchored .modal-content {
  position: fixed !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  width: min(var(--anchored-modal-width, 480px), calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}
body.app-shell #videoModal.modal-anchored .custom-modal-content { --anchored-modal-width: 1080px; }
body.app-shell #imageModal.modal-anchored .custom-modal-content { --anchored-modal-width: 800px; }

/* JH modal portal hard-fix: feature windows must stay inside the visible browser viewport */
body.app-shell .custom-modal.jjh-modal-portal,
body.app-shell .modal-overlay.jjh-modal-portal {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  z-index: 2147483000 !important;
}
body.app-shell .custom-modal.jjh-modal-portal .custom-modal-content,
body.app-shell .modal-overlay.jjh-modal-portal .modal-content {
  position: fixed !important;
  left: var(--jjh-modal-left, 12px) !important;
  top: var(--jjh-modal-top, 12px) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--jjh-modal-width, 480px) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  margin: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  pointer-events: auto !important;
  transform: none !important;
  z-index: 2147483001 !important;
}
body.app-shell #videoModal.jjh-modal-portal .custom-modal-content { width: var(--jjh-modal-width, min(920px, calc(100vw - 24px))) !important; }


/* 모바일 햄버거 메뉴 긴급 보정: 버튼 클릭 시 메뉴가 즉시 닫히거나 부모 레이아웃에 가려지는 문제 방지 */
@media (max-width: 860px) {
  body.app-shell .shell-menu-toggle {
    display: inline-flex !important;
    position: relative !important;
    z-index: 2147482500 !important;
    pointer-events: auto !important;
  }
  body.app-shell .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: auto !important;
    width: min(88vw, 320px) !important;
    max-width: 320px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translate3d(-105%, 0, 0) !important;
    transition: transform .24s ease !important;
    z-index: 2147482400 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-right: 1px solid rgba(79,124,255,0.18) !important;
    border-bottom: 0 !important;
    padding: 0 !important;
  }
  body.app-shell.sidebar-open .sidebar {
    transform: translate3d(0, 0, 0) !important;
  }
  body.app-shell .sidebar .logo-area {
    flex: 0 0 auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(79,124,255,0.12) !important;
  }
  body.app-shell .sidebar .menu-list {
    display: block !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 12px !important;
  }
  body.app-shell .sidebar .menu-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    border-left: 3px solid transparent !important;
    border-bottom: 0 !important;
  }
  body.app-shell .sidebar .quota-box,
  body.app-shell.sidebar-open .sidebar .quota-box {
    display: block !important;
    flex: 0 0 auto !important;
  }
  body.app-shell .app-shell-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147482300 !important;
    pointer-events: none !important;
  }
  body.app-shell.sidebar-open .app-shell-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* 파일전송관리자 닫기 버튼 */
body.app-shell #transferManager.tm-hidden,
#transferManager.tm-hidden {
  display: none !important;
}
body.app-shell #transferManager .tm-close-host,
#transferManager .tm-close-host {
  position: relative !important;
  padding-right: 54px !important;
}
body.app-shell #transferManager .tm-close-btn,
#transferManager .tm-close-btn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(209,69,100,.22) !important;
  background: rgba(255,255,255,.82) !important;
  color: #d14564 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  z-index: 20 !important;
  box-shadow: 0 8px 20px rgba(209,69,100,.12) !important;
  transform: none !important;
}
body.app-shell #transferManager .tm-close-btn:hover,
#transferManager .tm-close-btn:hover {
  background: #d14564 !important;
  color: #fff !important;
  border-color: #d14564 !important;
  transform: translateY(-1px) !important;
}
body.app-shell #transferManager .tm-close-btn span,
#transferManager .tm-close-btn span {
  display: block !important;
  line-height: 1 !important;
  margin-top: -2px !important;
}
@media (max-width: 860px) {
  body.app-shell #transferManager .tm-close-host,
  #transferManager .tm-close-host {
    padding-right: 48px !important;
  }
  body.app-shell #transferManager .tm-close-btn,
  #transferManager .tm-close-btn {
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }
}



/* 2026-05-11: 전송매니저 하단 고정 보정 */
html body.app-shell #transferManager,
html body #transferManager {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  width: min(680px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 48px) !important;
  margin: 0 !important;
  z-index: 2147482500 !important;
  transform: translateX(-50%) translateY(0) !important;
}
html body.app-shell #transferManager.minimized,
html body #transferManager.minimized {
  transform: translateX(-50%) translateY(calc(100% - 64px)) !important;
}
@media (max-width: 780px) {
  html body.app-shell #transferManager,
  html body #transferManager {
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: calc(100vh - 24px) !important;
    transform: translateY(0) !important;
  }
  html body.app-shell #transferManager.minimized,
  html body #transferManager.minimized {
    transform: translateY(calc(100% - 64px)) !important;
  }
}
