/* =============================================================
 * layout.css — 공통 레이아웃 셀 (#header / #sidebar / #main / #footer 관련만)
 * style.css + overwrite.css 에서 레이아웃 셀 규칙만 추출 (2026-06-22)
 * 로드 순서: style → overwrite → (이 파일) → common — cascade 동일
 * ============================================================= */

/* ===== [style.css] Main ===== */
#main {
  margin-top: 70px;
  transition: all 0.3s;
  min-height: calc(100vh - 159px);
}

@media (max-width: 1399px) {
  #main {
    padding: 0px;
  }
}

/* ===== [style.css] Header / Header Nav / Sidebar ===== */
.logo {
  line-height: 1;
}

@media (min-width: 1400px) {
  .logo {
    width: 280px;
  }
}

.logo img {
  max-height: 26px;
  margin-right: 6px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  color: #012970;
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* 로그인 페이지 카드 상단과 동일한 앱 아이덴티티 (app/Views/pages/login/index 인라인 스타일과 동일) */
.login-page__identity {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  text-align: left;
}

#header .login-page__identity {
  margin-bottom: 0;
}

.login-page__identity-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--bs-radius-sm, 10px);
  background: var(--bs-card, #fff);
  /*
  border: 1px solid var(--bs-border-primary, #7dd3fc);
  box-shadow: var(--bs-shadow, 0 2px 16px rgba(2, 132, 199, 0.08));
  color: var(--bs-primary, #0284c7);
  */
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* 회사 로고(화이트라벨) — 기본 아이콘과 같은 46px 자리에 종횡비 유지로 들어간다.
   로고가 없는 회사는 이 요소 자체가 렌더되지 않고 기존 SVG 아이콘이 그대로 보인다. */
.login-page__identity-logo {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  display: block;
}

.login-page__identity-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page__identity-title {
  font-weight: 800;
  font-size: var(--font-extra-large);
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--bs-text, #0f172a);
}

.login-page__identity-host {
  margin: 0;
  text-transform: uppercase;
  color: var(--bs-muted);
  font-weight: 600;
  font-size: var(--font-small);
  margin-top: 5px;
}

.header {
  transition: all 0.5s;
  z-index: 997;
  height: 70px;
  background-color: #ffffff;
  border-bottom: solid 1px var(--bs-border-muted);
}

.header .toggle-sidebar-btn {
  cursor: pointer;
  color: var(--bs-text);
}

/* ===== 헤더 현재시각 2종 (표시 타임존 / UTC) — 2026-08-21 사이드바에서 이관 =====
 * 사이드바에 있던 모양 그대로: 아이콘 열 + [큰 시각 / 작은 메타] 2줄.
 * 카드가 아니라 헤더와 같은 언어로 — 배경/테두리 없이, 두 블록 사이만 세로 구분선.
 * 구분선이 1px 이 아니라 2px 인 이유: 1px 실선은 안티앨리어싱으로 뭉갠다.
 * 폭 고정(--hdr-clock-w)은 초가 넘어갈 때 글자폭이 흔들려 옆 블록이 밀리는 것을 막는다
 * (tabular-nums 로도 'Asia/Seoul' ↔ 'UTC' 같은 메타 길이 차이는 못 막는다). */
.header-clocks {
  --hdr-clock-w: 190px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 24px;
  min-width: 0;
}

.header-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  line-height: 1.45;
}

.header-clock + .header-clock {
  padding-left: 16px;
  border-left: 2px solid var(--bs-border-light);
}

.header-clock-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-muted);
}

.header-clock-icon i {
  /* 아이콘 글리프 크기 — 본문 텍스트가 아니라서 --font-* 토큰 대상이 아니다. */
  font-size: 18px;
  line-height: 1;
}

.header-clock-body {
  min-width: 0;
  width: var(--hdr-clock-w);
}

.header-clock-time {
  display: block;
  font-size: var(--font-large);
  font-weight: 600;
  color: var(--bs-text);
  font-variant-numeric: tabular-nums;
}

.header-clock-meta {
  display: block;
  margin-top: 2px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--bs-muted);
  font-variant-numeric: tabular-nums;
}

/* 날짜와 타임존 사이 가운뎃점 — 좁은 폭에서 날짜만 감출 수 있게 텍스트가 아니라 CSS 로 둔다 */
.header-clock-zone::before {
  content: "\00b7";
  margin: 0 4px;
}

.header .search-bar {
  min-width: 360px;
  padding: 0 20px;
}

@media (max-width: 1399px) {
  .header .search-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: 0px 0px 15px 0px rgba(1, 41, 112, 0.1);
    background: white;
    z-index: 9999;
    transition: 0.3s;
    visibility: hidden;
    opacity: 0;
  }

  .header .search-bar-show {
    top: 60px;
    visibility: visible;
    opacity: 1;
  }
}

.header .search-form {
  width: 100%;
}

.header .search-form input {
  border: 0;
  font-size: var(--font-large);
  color: #012970;
  border: 1px solid rgba(1, 41, 112, 0.2);
  padding: 7px 38px 7px 8px;
  border-radius: 3px;
  transition: 0.3s;
  width: 100%;
}

.header .search-form input:focus,
.header .search-form input:hover {
  outline: none;
  box-shadow: 0 0 10px 0 rgba(1, 41, 112, 0.15);
  border: 1px solid rgba(1, 41, 112, 0.3);
}

.header .search-form button {
  border: 0;
  padding: 0;
  margin-left: -30px;
  background: none;
}

.header .search-form button i {
  color: #012970;
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
  list-style: none;
}

.header-nav>ul {
  margin: 0;
  padding: 0;
  gap: 20px;
  justify-content: center;
}

.header-nav {
  position: relative;
}

.header-nav .nav-icon {
  font-size: 22px;
  color: #012970;
  position: relative;
}

.header-nav .nav-profile {
  color: #012970;
}

.header-nav .nav-profile img {
  max-height: 36px;
}

.header-nav .badge-number {
  position: absolute;
  inset: -2px -5px auto auto;
  font-weight: normal;
  font-size: var(--font-normal);
  padding: 3px 6px;
}

/* 헤더 알림 벨 */
.ims-noti-dd {
  position: static;
}
.ims-noti-dd .ims-noti-trigger {
  position: relative;
}
.ims-noti-badge {
  position: absolute;
  top: -4px;
  right: -15px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bs-primary);
  color: #fff;
  font-size: var(--font-small);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
}
.ims-noti-panel {
  min-width: 360px;
  max-width: min(400px, calc(100vw - 1.5rem));
  padding: 0;
  margin: 0 !important;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}
.header-nav .ims-noti-dd .ims-noti-panel {
  position: fixed !important;
  top: 70px !important;
  right: 1rem !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
}
.ims-noti-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef0f3;
  background: #fafbfc;
}
.ims-noti-panel-title {
  font-size: var(--font-normal);
  font-weight: 600;
  color: var(--bs-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ims-noti-list {
  max-height: 380px;
  overflow-y: auto;
}
.ims-noti-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: var(--font-small);
  color: var(--bs-muted);
  text-transform: uppercase;
  font-weight: 500;
}
.ims-noti-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}
.ims-noti-item:last-child {
  border-bottom: 0;
}
.ims-noti-item:hover {
  background: #f8fafc;
}
.ims-noti-item--unread {
  background: #f8fbff;
}
.ims-noti-item--unread:hover {
  background: #f1f7ff;
}
.ims-noti-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: var(--font-extra-large);
}
.ims-noti-icon--success {
  background: var(--bs-success-light);
  color: var(--bs-success);
}
.ims-noti-icon--danger {
  background: var(--bs-danger-light);
  color: var(--bs-danger);
}
.ims-noti-icon--primary {
  background: var(--bs-bg-primary);
  color: var(--bs-primary);
}
.ims-noti-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ims-noti-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ims-noti-title {
  font-size: var(--font-normal);
  font-weight: 600;
  color: var(--bs-text);
  line-height: 1.3;
  text-transform: uppercase;
}
.ims-noti-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bs-primary);
}
.ims-noti-desc {
  font-size: var(--font-normal);
  color: var(--bs-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ims-noti-time {
  font-size: var(--font-small);
  color: #94a3b8;
  margin-top: 0.1rem;
}

.header-nav .profile {
  min-width: 240px;
  padding-bottom: 0;
  top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: var(--font-display);
  margin-bottom: 0;
  font-weight: 600;
  color: #444444;
}

.header-nav .profile .dropdown-header span {
  font-size: var(--font-large);
}

.header-nav .profile .dropdown-item {
  font-size: var(--font-large);
  padding: 10px 15px;
  transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
  margin-right: 10px;
  font-size: var(--font-display);
  line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
  background-color: #f6f9ff;
}

/* ===== Sidebar 토글에 따른 Main/Footer 오프셋 (#sidebar 본체는 sidebar.css) ===== */
@media (min-width: 1400px) {

  #main,
  #footer {
    margin-left: 300px;
  }
}

@media (min-width: 1400px) {

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0;
  }

}

/* ===== [style.css] Footer ===== */
.footer {
  padding: 20px 0;
  font-size: var(--font-large);
  transition: all 0.3s;
  border-top: 1px solid var(--bs-border-muted);
  background: #ffffff;
  margin-top: 30px;
}

.footer .copyright {
  color: var(--bs-text);
  font-family: 'Plus Jakarta Sans';
  font-size: var(--font-normal);
  text-align: center;
}

/* ===== [style.css] Back to top 버튼 (footer.php .back-to-top) ===== */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--bs-primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
  border-radius: var(--bs-radius);
}

.back-to-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: var(--bs-primary-dark);
  color: #fff;
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* ===== [overwrite.css] Header (modal-open) ===== */
body.modal-open #header {
    padding-right: 0 !important;
}

/* 우측 상단 로그인 프로필 */
.profile-menu-dd .profile-menu-trigger.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 999px;
    transition: background-color 0.15s ease;
    max-width: min(280px, 100%);
    box-sizing: border-box;
    overflow: hidden;
}
.profile-menu-dd .profile-menu-trigger:hover,
.profile-menu-dd .profile-menu-trigger:focus {
    background: rgba(15, 23, 42, 0.05);
}
.profile-menu-dd .profile-menu-trigger::after {
    display: none;
}
.profile-menu-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    font-size: var(--font-normal);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.profile-menu-avatar--lg {
    width: 52px;
    height: 52px;
    font-size: var(--font-extra-large);
}
.profile-menu-status {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border: 2px solid #fff;
    border-radius: 50%;
}
.profile-menu-trigger-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.profile-menu-trigger-name {
    font-size: var(--font-large);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-menu-trigger-role {
    font-size: var(--font-small);
    font-weight: 600;
    /* color: #ea580c; */
    color: var(--bs-primary);
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
    margin-top: 4px;
}
.profile-menu-panel * { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.profile-menu-panel {
    min-width: 280px;
    padding: 0;
    margin-top: 0.5rem !important;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}
.profile-menu-rule {
    margin: 0;
    border-color: #eef0f3;
    opacity: 1;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: var(--font-normal);
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: background 0.12s ease;
}
.profile-menu-item:hover {
    background: #f8fafc;
    color: #0f172a;
}
.profile-menu-item i {
    font-size: var(--font-display);
    color: #64748b;
    width: 1.35rem;
    text-align: center;
    flex-shrink: 0;
}
.profile-menu-item--signout i {
    color: #64748b;
}

