/* ============================================================
 * zepro-shell.css — ZEPRO 공통 셸(상단 topbar + 모바일 하단탭)
 * dashboard-overview.html 의 새 디자인에서 추출한 네비게이션/셸 컴포넌트.
 * 각 사용자 페이지가 zepro-theme.css 와 함께 link 하여 외형을 통일.
 * 색상은 CSS 변수(zepro-theme.css 의 토큰) 사용.
 * ============================================================ */

/* 본문 영역 공통 폭 */
.zshell-main { width: min(var(--content, 1440px), calc(100% - 40px)); margin: 22px auto 40px; }

/* ── 아이콘 ── */
.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.9; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 72px;
  border-bottom: 1px solid rgba(220,228,241,.9);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
  width: min(var(--content, 1440px), calc(100% - 40px));
  height: 100%; margin: 0 auto;
  display: flex; align-items: center; gap: 34px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto;
  font-weight: 900; font-size: 23px; letter-spacing: -.7px; color: #071848;
}
.logo-mark { width: 31px; height: 27px; }
.desktop-nav { display: flex; align-items: stretch; height: 100%; gap: 4px; }
.nav-link {
  position: relative; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; color: #344054; font-weight: 700; font-size: 14px;
  transition: color .2s ease;
}
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: var(--blue); }
.nav-link.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--blue);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 12px; color: #344054; background: transparent;
}
.icon-btn:hover { background: #f2f6fd; color: var(--blue); }
.profile {
  display: flex; align-items: center; gap: 9px; border: 0;
  padding: 4px 6px 4px 4px; border-radius: 14px; background: transparent; color: #1d2939;
}
.profile:hover { background: #f4f7fc; }
.avatar {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: linear-gradient(145deg, #1d66ff, #1739ba);
  font-weight: 900; font-size: 13px; box-shadow: 0 6px 16px rgba(20,89,239,.25);
}
.profile-name { font-size: 14px; font-weight: 800; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-logout {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 6px 8px; border-radius: 9px; cursor: pointer;
}
.profile-logout:hover { background: #f2f6fd; color: var(--red); }

/* ── 페이지 헤더(타이틀) ── */
.zpage-head { margin: 4px 2px 16px; }
.zpage-head h1 { margin: 0; font-size: 22px; letter-spacing: -.5px; color: var(--navy); }
.zpage-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ── Mobile bottom nav (기본 숨김) ── */
.mobile-bottom-nav { display: none; }

/* ── 반응형 ── */
@media (max-width: 1180px) {
  .desktop-nav .nav-link { padding-inline: 12px; }
}
@media (max-width: 900px) {
  .topbar { height: 64px; }
  .topbar-inner, .zshell-main { width: min(100% - 28px, var(--content, 1440px)); }
  .desktop-nav { display: none; }
  .profile-name { display: none; }
}
@media (max-width: 680px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .topbar-inner, .zshell-main { width: calc(100% - 24px); }
  .logo { font-size: 19px; gap: 7px; }
  .logo-mark { width: 27px; height: 24px; }

  .mobile-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(66px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 7px 8px env(safe-area-inset-bottom);
    border-top: 1px solid #e1e7f1;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -8px 24px rgba(22,48,96,.08);
  }
  .mobile-nav-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 0; border-radius: 10px; color: #8b98ad; background: transparent;
    font-size: 9px; font-weight: 800;
  }
  .mobile-nav-btn .icon { width: 21px; height: 21px; }
  .mobile-nav-btn.active { color: var(--blue); }
}

/* ── 임베드(iframe) 시 셸 숨김 ── */
html.zin-embed .topbar,
html.zin-embed .mobile-bottom-nav { display: none !important; }
