/* ==========================================================================
   shell.css — IITMS 페이지 셸 (네브바 · 로그인 화면 · 히어로 · 푸터 · 페이지 타이틀)
   --------------------------------------------------------------------------
   navbar.css(1137줄) + main.css 의 셸/크롬 부분을 계승. tokens.css 이후 로드.
   ========================================================================== */

/* ==========================================================================
   1. 네브바 (다크 유지, 포인트색 계열로 재도색)
   ========================================================================== */
:root {
    --navbar-height: 30px;
}
body.index-with-navbar .hero-section {
    padding-top: calc(var(--navbar-height, 30px) + max(2rem, env(safe-area-inset-top)));
}

/* 네브바 배경 = 히어로와 동일한 불투명 그라데이션 위에 포인트색 틴트를 합성.
   불투명 그라데이션이 바닥을 채우므로 페이지 본문 배경이 반투명 사이로 비쳐
   색이 달라 보이는 문제가 없다 → 어느 페이지에서도 네브바 색이 동일. */
.navbar {
    background:
        linear-gradient(var(--ui-nav-tint), var(--ui-nav-tint)),
        linear-gradient(135deg, var(--ui-nav-grad-a) 0%, var(--ui-nav-grad-b) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 2000;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, box-shadow 0.2s ease;
    transform-origin: top;
}

/* navbar 내부 글자/아이콘은 흰색으로 강제 통일(모든 상태) — 배경색이 활성·호버를 담당 */
.navbar,
.navbar *,
.navbar a,
.navbar a:link,
.navbar a:visited,
.navbar a:hover,
.navbar a:focus,
.navbar a:active,
.navbar i,
.navbar button,
.navbar span {
    color: var(--ui-surface) !important;
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: visible;
}
@media (min-width: 75rem) {
    .navbar-container {
        max-width: min(120rem, calc(100vw - 1.5rem));
    }
}

/* 데스크톱: 2행 레이아웃 — 1행(햄버거·로고|도메인토글|글로벌필터|계정) 2행(메뉴, 전폭 줄바꿈) */
@media (min-width: 901px) {
    .navbar-row.primary {
        height: auto;
        min-height: 30px;
    }
    .navbar-container {
        flex-wrap: wrap;
        column-gap: 12px;
        row-gap: 0;
        align-content: center;
        padding-top: 1px;
        padding-bottom: 0;
    }
    .navbar-container > .navbar-left-group { order: 1; }
    .navbar-container > .navbar-domain-toggle { order: 2; }
    .navbar-container > .navbar-global-filter-form { order: 3; min-width: 0; flex: 0 1 360px; }
    .navbar-container > .navbar-right { order: 4; margin-left: auto; }
    .navbar-container > .auth-links { order: 4; margin-left: auto; }
    .navbar-global-filter-form .filter-item { min-width: 0; flex: 1 1 0; }
    .navbar-container > .navbar-menu {
        order: 5;
        flex: 0 0 100%;
        width: 100%;
        margin: 1px 0 0;
        padding: 1px 0 2px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar-menu > .navbar-menu-mobile-panel-head,
    .navbar-menu > .navbar-menu-mobile-home-item {
        display: none !important;
    }
}

.navbar-row.primary {
    min-height: 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: visible;
    position: relative;
}

.navbar-logo {
    color: white !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.navbar-logo i {
    color: var(--ui-surface) !important;
    font-size: 0.9rem;
}

.navbar-left-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.navbar-global-filter-form {
    display: flex;
    gap: 16px;
    align-items: center;
}
.navbar-global-filter-form .filter-item select {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    height: 24px;
}
.navbar-global-filter-form .filter-item select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(147, 197, 253, 0.5);
}
/* 지역/학교 드롭다운: 닫힌 select(선택값)와 열린 option 목록 모두 글자 흰색 강제.
   -webkit-text-fill-color 가 color 보다 우선하므로 같이 흰색으로 덮어써야 한다.
   color-scheme:only light 때문에 OS 네이티브 팝업이 라이트로 렌더되어 옵션 글자가
   검게 보이므로, 이 select 한정 color-scheme:dark 로 전환한다. */
.navbar-global-filter-form .filter-item select,
.navbar-global-filter-form .filter-item select option {
    color: var(--ui-surface) !important;
    -webkit-text-fill-color: var(--ui-surface) !important;
}
.navbar-global-filter-form .filter-item select {
    color-scheme: dark;
}
.navbar-global-filter-form .filter-item select option {
    background-color: var(--ui-primary) !important;
}
.navbar-global-filter-form .filter-item select option:checked,
.navbar-global-filter-form .filter-item select option[selected] {
    color: var(--ui-surface) !important;
    -webkit-text-fill-color: var(--ui-surface) !important;
    background-color: var(--ui-primary) !important;
}
@media (min-width: 1200px) {
    .navbar-container > .navbar-global-filter-form { flex: 0 1 480px; }
}

/* 정보화장비 / 네트워크 도메인 전환 토글 */
.navbar-domain-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
    height: 24px;
    box-sizing: border-box;
}
.navbar-domain-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 18px;
    border-radius: 999px;
    color: var(--ui-surface) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}
.navbar-domain-toggle__btn:hover {
    color: var(--ui-surface) !important;
    background: rgba(255, 255, 255, 0.08);
}
.navbar-domain-toggle__btn.is-active {
    background: rgba(147, 197, 253, 0.45);
    color: var(--ui-surface) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.navbar-domain-toggle__btn.is-active:hover {
    background: rgba(147, 197, 253, 0.55);
}
.navbar-domain-toggle__btn i {
    font-size: 0.82rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0 20px;
    padding: 0;
    padding-inline-start: 0;
    gap: 5px;
}
.navbar-menu > li { list-style: none; }
.navbar-menu > li::marker { content: none; }
.navbar-menu li a {
    color: var(--ui-surface) !important;
    text-decoration: none !important;
    padding: 2px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.navbar-menu li a:hover, .navbar-menu li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.navbar-row.secondary {
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}
@media (min-width: 901px) {
    .navbar-row.secondary { height: 60px; opacity: 1; }
}
@media (max-width: 900px) {
    .navbar-row.secondary, .navbar-row.tertiary {
        height: 0; opacity: 0; visibility: hidden;
    }
    .navbar-row.secondary.active, .navbar-row.tertiary.active {
        height: auto; opacity: 1; visibility: visible; padding: 10px 0;
    }
}
.navbar-filter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}
.filter-item select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 1.05rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
}
.filter-item select:hover { background: rgba(255, 255, 255, 0.2); }
.filter-item select option { background: var(--ui-primary); color: white; }

.navbar-row.tertiary {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 50px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
@media (min-width: 901px) {
    .navbar-row.tertiary { height: auto; padding: 8px 0; }
}
.tertiary-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 30px;
}
.navbar-actions-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* 네브바 전용 버튼(반투명·흰글자) — .navbar 스코프 필수, 본문 툴박스는 app-ui 의미색 적용 */
.navbar .navbar-actions-group .btn {
    padding: 0 16px;
    height: 38px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    transition: all 0.3s;
    box-shadow: none;
    text-decoration: none !important;
}
.navbar .navbar-actions-group .btn i { font-size: 1.1rem; margin: 0; }
.navbar .navbar-actions-group .btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(147, 197, 253, 0.7) !important;
    transform: translateY(-2px);
}
.navbar .navbar-actions-group .btn span {
    display: inline !important;
    font-size: 0.8rem;
    margin-left: 6px;
    font-weight: 600;
}

.navbar-search-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2px 2px 2px 15px;
    width: 320px;
    transition: all 0.3s;
}
.navbar-search-pill:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(147, 197, 253, 0.8);
    box-shadow: 0 0 10px rgba(51, 65, 85, 0.3);
}
.navbar-search-pill input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
}
/* 본문 타이틀 영역 내 검색창(밝은 배경용) */
.card-container .navbar-search-pill {
    background: var(--ui-surface) !important;
    border: 2px solid var(--ui-primary) !important;
    width: 100% !important;
    max-width: 450px !important;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.12) !important;
}
.card-container .navbar-search-pill input { color: var(--ui-ink) !important; }
.card-container .navbar-search-pill input::placeholder { color: var(--ui-slate-400) !important; }
.card-container .navbar-search-pill .btn-search,
.card-container .navbar-search-pill .btn-camera {
    color: var(--ui-slate-600) !important;
}
.card-container .navbar-search-pill .btn-search:hover,
.card-container .navbar-search-pill .btn-camera:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: var(--ui-ink) !important;
}
.card-container .navbar-search-pill:focus-within {
    border-color: var(--ui-primary-hover) !important;
    box-shadow: 0 0 15px rgba(51, 65, 85, 0.22) !important;
}
.navbar-search-pill input::placeholder { color: rgba(255, 255, 255, 0.5); }
.navbar-search-pill .btn-search, .navbar-search-pill .btn-camera {
    background: transparent;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.navbar-search-pill .btn-camera { color: var(--ui-surface) !important; }
.navbar-search-pill .btn-search:hover, .navbar-search-pill .btn-camera:hover {
    background: rgba(255, 255, 255, 0.15);
}

.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-user-info { color: var(--ui-surface); font-size: 0.78rem; display: flex; align-items: center; gap: 8px; }
.navbar-filter-toggle, .navbar-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ui-surface) !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}
.navbar-user-info i { color: var(--ui-surface) !important; font-size: 0.95rem; }
a.navbar-logout-desktop { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* 계정 호버 메뉴(○○님 ▸ 마이페이지 / 로그아웃)의 규칙은 **여기 두지 않는다.**
   🔴 2026-08-03 사고: 여기에 뒀더니 일부 화면(`floor_plan_view.php` 등 shell.css 를 **캐시버스터 없이**
      링크하는 페이지)에서 옛 CSS 가 캐시돼 패널이 접히지 않고 상단바에 그대로 펼쳐졌다.
   → 전부 `inet_topbar.css` 로 옮겼다. 그 파일은 navbar.php 가 `?v=filemtime` 을 붙여 직접 링크하므로
      네브바가 뜨는 모든 화면에 항상 최신본이 온다. 규칙을 고칠 땐 그 파일에서. */

.navbar-account-mobile { display: none; position: relative; }
.navbar-account-mobile__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    color: var(--ui-surface) !important;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}
.navbar-account-mobile__btn:hover,
.navbar-account-mobile__btn:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(147, 197, 253, 0.5);
    outline: none;
}
.navbar-account-mobile__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    max-width: min(92vw, 280px);
    max-height: min(70dvh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: 3500;
}
.navbar-account-mobile__panel[hidden] { display: none !important; }
.navbar-account-mobile__user {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ui-surface) !important;
    padding: 6px 4px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
    word-break: break-all;
}
.navbar-account-mobile__logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ui-surface) !important;
    text-decoration: none !important;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
    transition: background 0.2s;
}
.navbar-account-mobile__logout:hover { background: rgba(248, 113, 113, 0.22); color: var(--ui-surface) !important; }
@media (min-width: 901px) {
    .navbar-account-mobile { display: none !important; }
    .navbar-user-info--desktop { display: flex; }
    a.navbar-logout-desktop { display: inline-flex; }
}
.logout-link i { color: var(--ui-surface) !important; font-size: 0.95rem; }

@media (max-width: 900px) {
    .navbar { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .navbar-row.primary { min-width: 0; width: 100%; height: auto; min-height: 38px; align-items: center; }
    .navbar-container { min-width: 0; max-width: 100% !important; flex-wrap: nowrap; align-items: center; gap: 6px; }
    .navbar-container > .navbar-left-group { order: 0; flex: 0 0 auto; }
    .navbar-container > .navbar-domain-toggle { order: 1; flex: 0 0 auto; }
    .navbar-container > .navbar-global-filter-form {
        order: 2; flex: 1 1 0; min-width: 0; width: auto; max-width: none;
        padding: 4px 0; margin: 0; box-sizing: border-box; gap: 6px; border-bottom: none;
    }
    .navbar-domain-toggle { height: 30px; padding: 2px; }
    .navbar-domain-toggle__btn { padding: 0 8px; height: 24px; }
    .navbar-domain-toggle__btn span { display: none; }
    .navbar-domain-toggle__btn i { font-size: 0.95rem; }
    .navbar-container > .navbar-right { display: none !important; }
    .navbar-container > .auth-links { order: 2; flex: 0 0 auto; }
    .navbar-left-group { flex: 0 0 auto; min-width: 0; gap: 0; align-items: center; }
    .navbar-logo { display: none !important; }
    .navbar-global-filter-form { display: flex; flex-direction: row; align-items: center; }
    .navbar-global-filter-form .filter-item { min-width: 0; flex: 1 1 0; }
    .navbar-global-filter-form .filter-item select { min-width: 0 !important; max-width: 100%; width: 100%; }
    .navbar-user-info--desktop, a.navbar-logout-desktop { display: none !important; }
    .navbar-account-mobile { display: none !important; }
    .navbar-filter-toggle, .navbar-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .navbar-menu {
        position: absolute; top: 100%; left: 0; width: 100%; z-index: 4000;
        background: rgba(30, 41, 59, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column; gap: 0; margin: 0; height: 0; max-height: 0;
        opacity: 0; visibility: hidden; overflow: hidden;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s, max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    .navbar-menu.active {
        height: auto;
        max-height: min(calc(100dvh - var(--navbar-height, 80px) - 8px), 85dvh);
        opacity: 1; visibility: visible; padding: 10px 0;
        overflow-y: auto; overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
    .navbar-menu li { width: 100%; list-style: none; }
    .navbar-menu li::marker { content: none; }
    .navbar-menu li a { padding: 12px 25px; border-radius: 0; width: 100%; font-size: 1rem; }
    .navbar-menu > .navbar-menu-mobile-panel-head { border-bottom: 1px solid rgba(255, 255, 255, 0.12); margin: 0 0 2px 0; }
    .navbar-menu-mobile-panel-user {
        display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
        gap: 8px 12px; padding: 12px 20px 12px 25px;
    }
    .navbar-menu-mobile-panel-name { font-size: 0.95rem; font-weight: 700; color: var(--ui-surface) !important; word-break: break-all; }
    .navbar-menu-mobile-panel-logout {
        flex-shrink: 0; display: inline-flex; align-items: center; padding: 6px 12px;
        border-radius: 8px; font-size: 0.88rem; font-weight: 600; color: var(--ui-surface) !important;
        text-decoration: none !important; background: rgba(248, 113, 113, 0.15); border: 1px solid rgba(248, 113, 113, 0.35);
    }
    .navbar-menu-mobile-panel-logout:hover, .navbar-menu-mobile-panel-logout:focus-visible {
        background: rgba(248, 113, 113, 0.28); color: var(--ui-surface) !important;
    }
    .navbar-menu-mobile-home-item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
    .navbar-menu-mobile-home-link { display: flex; align-items: center; gap: 10px; }
    .navbar-menu-mobile-home-link i { width: 1.1rem; text-align: center; color: var(--ui-surface) !important; }
    .navbar-menu > .navbar-menu-mobile-home-item.active > .navbar-menu-mobile-home-link { background: rgba(255, 255, 255, 0.12); }
    .navbar-menu li.has-dropdown .dropdown-menu {
        position: static; display: none; width: 100%;
        background: rgba(255, 255, 255, 0.05); border: none; box-shadow: none; padding-left: 20px;
        max-height: min(55dvh, 420px); overflow-y: auto;
        -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
    }
    .navbar-menu li.has-dropdown.is-open > .dropdown-menu { display: block; }
    .navbar-menu li.has-dropdown > a .fa-caret-down { transition: transform 0.2s ease; }
    .navbar-menu li.has-dropdown.is-open > a .fa-caret-down { transform: rotate(180deg); }
    .navbar-menu li.has-dropdown .dropdown-menu li.has-dropdown > .dropdown-menu {
        padding-left: 20px; background: rgba(255, 255, 255, 0.04);
    }
    .navbar-menu li.has-dropdown > a .fa-caret-right { transition: transform 0.2s ease; }
    .navbar-menu li.has-dropdown.is-open > a .fa-caret-right { transform: rotate(90deg); }
    .navbar-filter-form { display: grid; grid-template-columns: 1fr 1fr; }
    .tertiary-container { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    .navbar-search-pill { width: 100%; }
    .navbar-actions-group { justify-content: center; }
}

.logout-link { color: var(--ui-surface) !important; font-size: 0.95rem; text-decoration: none; }
.dropdown-menu a.navbar-dropdown-logout { color: var(--ui-surface) !important; font-size: 0.85rem; }
.dropdown-menu a.navbar-dropdown-logout:hover { color: var(--ui-surface) !important; background: rgba(248, 113, 113, 0.15) !important; }
.dropdown-menu a.navbar-dropdown-logout i { color: inherit !important; font-size: 0.85rem; }

.has-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ui-primary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 180px;
    margin: 0;
    padding: 8px 0;
    padding-inline-start: 0;
    list-style: none;
    z-index: 3000;
}
.dropdown-menu > li { list-style: none; }
.dropdown-menu > li::marker { content: none; }
@media (min-width: 901px) {
    .has-dropdown:hover > .dropdown-menu { display: block; }
    .dropdown-menu .has-dropdown > .dropdown-menu { top: 0; left: 100%; margin: 0; }
}
.dropdown-menu li.divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 5px 0; }
.dropdown-menu li a { border-radius: 0; font-size: 0.85rem; }

/* 정렬 아이콘 시인성(노란색 유지 — 표 위 강조 목적, 포인트색과 무관) */
.device-table th i.fa-sort-up,
.device-table th i.fa-sort-down { color: #fcd34d !important; opacity: 1 !important; }
.device-table th i.fa-sort { color: rgba(255, 255, 255, 0.4); }

.navbar-row.secondary.table-mode-filter { display: none; }
@media (min-width: 901px) {
    .navbar-row.secondary.table-mode-filter.show-manual { display: flex !important; height: 50px !important; opacity: 1 !important; }
}

/* 세션 유휴 타이머 + 연장 버튼 */
.navbar-session-timer {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.15rem 0.5rem; margin-right: 0.4rem;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px; font-size: 0.74rem; color: var(--ui-surface);
    font-variant-numeric: tabular-nums; line-height: 1;
}
.navbar-session-timer i { font-size: 0.78rem; opacity: 0.9; }
.navbar-session-timer__value { font-weight: 700; min-width: 44px; text-align: center; }
.navbar-session-timer__extend {
    background: rgba(255, 255, 255, 0.18); color: var(--ui-surface); border: none;
    padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.68rem; cursor: pointer;
    font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem; line-height: 1;
}
.navbar-session-timer__extend:hover { background: rgba(255, 255, 255, 0.32); }
.navbar-session-timer__extend:disabled { opacity: 0.55; cursor: default; }
.navbar-session-timer.warn {
    background: rgba(220, 38, 38, 0.35); border-color: rgba(252, 165, 165, 0.7);
    color: var(--ui-slate-100); animation: navbar-session-timer-pulse 1s ease-in-out infinite;
}
.navbar-session-timer.warn .navbar-session-timer__extend { background: rgba(255, 255, 255, 0.28); }
@keyframes navbar-session-timer-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(252, 165, 165, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(252, 165, 165, 0); }
}
@media (max-width: 900px) {
    .navbar-session-timer { padding: 0.22rem 0.45rem; font-size: 0.74rem; gap: 0.3rem; }
    .navbar-session-timer__value { min-width: 38px; }
    .navbar-session-timer__extend { padding: 0.18rem 0.5rem; font-size: 0.68rem; }
}

/* 세션 만료 임박 안내 모달 */
.navbar-session-warn-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    animation: navbar-session-warn-fade 0.18s ease-out;
}
.navbar-session-warn-modal[hidden] { display: none; }
.navbar-session-warn-modal__box {
    background: var(--ui-surface); color: var(--ui-primary); border-radius: 10px; width: 100%; max-width: 420px;
    padding: 1.25rem 1.4rem 1.1rem; box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
    animation: navbar-session-warn-pop 0.22s ease-out;
}
.navbar-session-warn-modal__title {
    margin: 0 0 0.7rem; font-size: 1.08rem; font-weight: 700; color: var(--ui-danger-ink);
    display: flex; align-items: center; gap: 0.45rem;
}
.navbar-session-warn-modal__title i { font-size: 1rem; }
.navbar-session-warn-modal__body { margin: 0 0 0.55rem; font-size: 0.95rem; line-height: 1.55; color: var(--ui-primary); }
.navbar-session-warn-modal__body strong { color: var(--ui-danger-ink); font-weight: 700; }
.navbar-session-warn-modal__hint { margin: 0 0 1.1rem; font-size: 0.82rem; color: var(--ui-muted); }
.navbar-session-warn-modal__actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.navbar-session-warn-modal__btn {
    border: 1px solid transparent; border-radius: 6px; padding: 0.5rem 1rem;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.35rem; line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.navbar-session-warn-modal__btn:disabled { opacity: 0.55; cursor: default; }
.navbar-session-warn-modal__btn--primary { background: var(--ui-primary); color: var(--ui-surface); }
.navbar-session-warn-modal__btn--primary:hover:not(:disabled) { background: var(--ui-primary-hover); }
.navbar-session-warn-modal__btn--secondary { background: var(--ui-surface); color: var(--ui-slate-700); border-color: var(--ui-border); }
.navbar-session-warn-modal__btn--secondary:hover:not(:disabled) { background: var(--ui-slate-100); border-color: var(--ui-border-strong); }
@keyframes navbar-session-warn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes navbar-session-warn-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 900px) {
    .navbar-session-warn-modal__box { padding: 1.05rem 1.1rem 0.95rem; }
    .navbar-session-warn-modal__title { font-size: 1rem; }
    .navbar-session-warn-modal__body { font-size: 0.9rem; }
    .navbar-session-warn-modal__hint { font-size: 0.78rem; }
    .navbar-session-warn-modal__btn { padding: 0.45rem 0.85rem; font-size: 0.86rem; }
}

/* ==========================================================================
   2. 페이지 타이틀 (목록·관리 페이지 공통 — 디자인 토큰 기반 표준 규격 통일)
   ========================================================================== */
.title {
    text-align: left;
    margin-bottom: 20px;
    padding-left: 4px;
}
.title .subject,
h1.subject,
.subject,
.device-list-page .title .subject,
.device-inspection-page .title .subject {
    font-size: var(--ui-page-title-size);
    font-weight: 800;
    color: var(--ui-ink);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
/* 전 페이지 제목 내 아이콘 완전 차단 */
.title .subject i,
h1.subject i,
.subject i,
.device-list-page .title .subject i,
.device-inspection-page .title .subject i,
.ui-page-title i,
.page-title h1 i,
.equip-transfer-page h1 i,
.section-header-modern i,
h1 > i,
h2 > i {
    display: none !important;
}

.title .subtitle,
.subtitle {
    font-size: var(--ui-page-subtitle-size);
    color: var(--ui-slate-500);
    font-weight: 500;
}
/* 컴팩트 변형(툴바 내부 얹히는 타이틀 등) */
.subject--compact,
.pp-toolbar .subject {
    font-size: 1.25rem;
    margin: 0;
}

/* 대시보드 및 일반 메인 페이지 타이틀 통일 */
.page-title {
    text-align: center;
    margin-bottom: 2.2rem;
    padding: 1.5rem 0 0.5rem;
}
.page-title h1 {
    font-size: var(--ui-page-title-size);
    font-weight: 800;
    color: var(--ui-ink);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.page-title p {
    font-size: var(--ui-page-subtitle-size);
    color: var(--ui-slate-500);
    font-weight: 500;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.card-grid-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.card {
    background-color: var(--ui-surface);
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    box-shadow: var(--ui-shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--ui-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    min-height: 180px;
    border: 1px solid var(--ui-border);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ui-shadow-md);
    border-color: var(--ui-primary);
}
.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--ui-primary);
    transition: transform 0.3s ease;
}
.card:hover .card-icon { transform: scale(1.1); }
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ui-primary);
}
.card-description {
    color: var(--ui-text-sub);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}
.disabled { opacity: 0.6; cursor: not-allowed; }
.disabled:hover { transform: none; box-shadow: var(--ui-shadow-sm); border-color: var(--ui-border); }
.disabled .card-icon { transform: none !important; }
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
    .card-grid-bottom { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
    .card { min-height: 160px; padding: 1.5rem 1rem; }
    .card-icon { font-size: 2rem; }
    .card-title { font-size: 1.2rem; }
    .card-description { font-size: 0.85rem; }
}
@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; gap: 1rem; }
    .card-grid-bottom { grid-template-columns: 1fr; gap: 1rem; }
    .card { min-height: 140px; padding: 1.5rem 1rem; }
    .card-icon { font-size: 1.8rem; margin-bottom: 0.8rem; }
    .card-title { font-size: 1.1rem; margin-bottom: 0.4rem; }
    .card-description { font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .card { min-height: 120px; padding: 1.2rem 0.8rem; }
    .card-icon { font-size: 1.5rem; }
    .card-title { font-size: 1rem; }
    .card-description { font-size: 0.75rem; }
}

/* ==========================================================================
   3. 로그인 화면 (login.php 마크업과 연동)
   ========================================================================== */
.login-page-body .login-container {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, var(--ui-bg) 0%, var(--ui-slate-100) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    box-sizing: border-box;
}
.login-page-body .login-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 1rem; }
.login-page-body .login-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-slate-300);
    border-radius: var(--ui-radius-card);
    padding: clamp(2rem, 5vw, 2.75rem);
    box-shadow: var(--ui-shadow-md);
    position: relative;
    overflow: hidden;
}
.login-page-body .login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--ui-accent-blue) 0%, #3b82f6 100%);
}
.login-page-body .login-header { text-align: center; margin-bottom: 1.75rem; }
.login-page-body .login-header h1 {
    color: var(--ui-ink);
    font-size: clamp(1.6rem, 5vw, 2.1rem);
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}
.login-page-body .login-header p { color: var(--ui-slate-500); font-size: 0.92rem; font-weight: 500; }
.login-page-body .login-form .form-group { margin-bottom: 1.25rem; }
.login-page-body .login-form .form-group label {
    display: flex; align-items: center; gap: 5px; color: var(--ui-slate-700); margin-bottom: 0.5rem; font-weight: 600; font-size: 13.5px;
}
.login-page-body .login-form .form-group input {
    width: 100%;
    padding: 12px 14px;
    min-height: 44px;
    border: 1px solid var(--ui-slate-300);
    border-radius: var(--ui-radius-ctl);
    background: var(--ui-surface);
    color: var(--ui-ink);
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.login-page-body .login-form .form-group input:focus {
    border-color: var(--ui-accent-blue);
    box-shadow: var(--ui-shadow-input-focus);
    outline: none;
}
.login-page-body .login-form .form-group input::placeholder { color: var(--ui-muted); }
.login-page-body .login-btn {
    width: 100%;
    padding: 13px;
    min-height: 46px;
    background: var(--ui-primary);
    color: var(--ui-surface);
    border: 1px solid var(--ui-primary);
    border-radius: var(--ui-radius-ctl);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    margin-top: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-page-body .login-btn:hover {
    background: var(--ui-primary-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.25);
}
.login-page-body .signup-btn {
    width: 100%;
    padding: 12px;
    min-height: 44px;
    background: var(--ui-surface);
    color: var(--ui-slate-700);
    border: 1px solid var(--ui-slate-300);
    text-decoration: none;
    border-radius: var(--ui-radius-ctl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.login-page-body .signup-btn:hover {
    background: var(--ui-slate-100);
    color: var(--ui-ink);
    border-color: var(--ui-slate-400);
    transform: translateY(-1px);
}
.login-page-body .alert { padding: 14px 18px; border-radius: var(--ui-radius-ctl); margin-bottom: 1.25rem; font-weight: 600; font-size: 13.5px; }
.login-page-body .alert-error { background: var(--ui-slate-100); border: 1px solid #fecaca; color: var(--ui-danger-ink); }
.login-page-body .alert-success { background: var(--ui-slate-100); border: 1px solid #bbf7d0; color: var(--ui-success-ink); }
.login-page-body .back-home {
    color: var(--ui-slate-600);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    min-height: var(--ui-touch-min);
    padding: 0.25rem 0;
    font-weight: 600;
    transition: color 0.2s ease;
}
.login-page-body .back-home:hover { color: var(--ui-accent-blue); }
.login-page-body .login-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--ui-text-sub);
    font-size: 0.9rem;
}
.login-page-body .login-options a { color: var(--ui-primary); }

/* ==========================================================================
   4. 히어로 섹션 (index.php) — 밝은 톤(사용자 확정: 다크 히어로 → 라이트 전환)
   ========================================================================== */
.hero-section {
    background: linear-gradient(160deg, var(--ui-slate-100) 0%, var(--ui-bg) 45%, var(--ui-bg) 100%);
    color: var(--ui-ink);
    padding: max(2rem, env(safe-area-inset-top)) 0 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(51,65,85,0.06)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}
.hero-container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
    position: relative;
    z-index: 10;
    min-height: 500px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}
body.index-with-navbar .hero-container--index {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2rem;
    min-height: auto;
    width: 100%;
    grid-template-columns: none;
    grid-template-rows: none;
}
body.index-with-navbar .hero-index-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    width: 100%;
    min-width: 0;
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid var(--ui-border);
    box-sizing: border-box;
}
body.index-with-navbar .hero-index-head .hero-title { margin-bottom: 0; text-align: left; }
body.index-with-navbar .hero-index-head .gradient-text { margin-bottom: 0; }
body.index-with-navbar .hero-index-head .hero-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem 2rem;
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}
body.index-with-navbar .hero-index-head .stat-item { text-align: center; min-width: 0; flex: 0 1 auto; }
body.index-with-navbar .hero-index-head .stat-number {
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.9rem);
    line-height: 1.1;
    max-width: min(18rem, 100%);
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.index-with-navbar .hero-index-head .stat-label { font-size: 0.78rem; margin-top: 0.2rem; }
body.index-with-navbar .hero-container--index .hero-index-head .hero-stats .stat-item:last-child { display: block !important; }

.hero-image-container {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; overflow: hidden; z-index: 1;
}
.hero-content {
    display: block;
    max-width: 100%;
    width: auto;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 1rem 0;
    border: none;
    box-shadow: none;
}
.hero-menu-column { display: flex; flex-direction: column; gap: 2rem; width: 100%; }
.hero-nav-domain-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.25rem; }
.hero-nav-domain-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none !important;
    color: var(--ui-text-sub) !important;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--ui-border);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.hero-nav-domain-tab:hover {
    background: var(--ui-surface);
    border-color: var(--ui-slate-300);
    color: var(--ui-ink) !important;
}
.hero-nav-domain-tab.is-active {
    background: var(--ui-primary);
    border-color: var(--ui-primary);
    color: var(--ui-surface) !important;
    box-shadow: 0 4px 14px var(--ui-primary-glow);
}
.hero-menu-section { width: 100%; }
.hero-menu-section h3 {
    color: var(--ui-text-sub);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.hero-menu-section h3 i { color: var(--ui-primary); }
.glass-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: clamp(0.65rem, 2vw, 1rem);
}
.glass-card {
    background: var(--ui-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: var(--ui-ink) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--ui-shadow-card);
}
.glass-card:hover {
    background: var(--ui-surface);
    transform: translateY(-5px);
    border-color: var(--ui-slate-300);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}
.glass-card .card-icon { font-size: 1.8rem; margin-bottom: 0.8rem; color: var(--ui-primary); transition: transform 0.3s ease; }
.glass-card:hover .card-icon { transform: scale(1.2); color: var(--ui-primary-hover); }
.glass-card .card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ui-ink); }
.glass-card .card-description { color: var(--ui-text-sub); font-size: 0.75rem; line-height: 1.4; }
.hero-title { margin-bottom: 1.5rem; }
.gradient-text {
    font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--ui-ink) 0%, var(--ui-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}
.hero-subtitle { font-size: 1.5rem; font-weight: 400; color: var(--ui-text); display: block; }
.hero-description { font-size: 1.2rem; line-height: 1.8; color: var(--ui-text-sub); margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2rem; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--ui-primary); line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--ui-text-sub); margin-top: 0.5rem; }
.hero-visual { display: none; }
.modern-network {
    width: 100%; height: 100%; position: relative;
    background: linear-gradient(135deg, var(--ui-slate-800) 0%, var(--ui-info-ink) 50%, var(--ui-slate-700) 100%);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hub-core {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, #93c5fd, #60a5fa);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.4);
    position: relative; z-index: 4;
}
.hub-core i { font-size: 2.5rem; color: white; animation: pulse 2s ease-in-out infinite; }
.pulse-ring {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100px; height: 100px;
    border: 2px solid rgba(147, 197, 253, 0.6);
    border-radius: 50%;
    animation: pulseRing 3s ease-out infinite;
}
.floating-icon {
    position: absolute; width: 60px; height: 60px;
    background: rgba(51, 65, 85, 0.9);
    border: 2px solid rgba(147, 197, 253, 0.7);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 2;
}
.floating-icon i { font-size: 1.5rem; color: #93c5fd; }
.floating-icon:hover { background: rgba(51, 65, 85, 1); transform: scale(1.1); box-shadow: 0 8px 25px rgba(147, 197, 253, 0.4); }
.connection-path { fill: none; stroke-width: 2; stroke-dasharray: 5, 5; animation: dash 3s linear infinite; opacity: 0.7; }
.bg-pattern {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(147, 197, 253, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(147, 197, 253, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    animation: float 20s ease-in-out infinite;
}
.central-hub { position: absolute; top: 50%; right: 25%; transform: translate(50%, -50%); z-index: 3; }
.pulse-delay-1 { animation-delay: 1s; }
.pulse-delay-2 { animation-delay: 2s; }
.connection-svg { width: 100%; height: 100%; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(10px, -5px); } 66% { transform: translate(-5px, 10px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-8px, 8px); } 66% { transform: translate(8px, -8px); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(12px, 5px); } 66% { transform: translate(-10px, -5px); } }
@keyframes float4 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-12px, -8px); } 66% { transform: translate(8px, 12px); } }
@keyframes float5 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(8px, -12px); } 66% { transform: translate(-8px, 8px); } }
@keyframes float6 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-10px, 10px); } 66% { transform: translate(10px, -8px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes pulseRing {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}
@keyframes dash { to { stroke-dashoffset: -20; } }
.image-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white; padding: 2rem 1.5rem 1.5rem; z-index: 4;
}
.overlay-content h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.overlay-content p { font-size: 0.9rem; opacity: 0.9; }

@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; min-height: auto; }
    .hero-content { text-align: center; max-width: 100%; }
    .hero-text { text-align: center !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
    .hero-title { text-align: center !important; }
    .hero-stats { justify-content: center !important; align-items: center !important; flex-direction: row !important; gap: 1.5rem !important; }
    .hero-stats .stat-item:last-child { display: none !important; }
    .gradient-text { font-size: 3rem; }
    .hero-subtitle { font-size: 1.3rem; }
}
@media (max-width: 768px) {
    .hero-section { padding: 3rem 0; margin-bottom: 2rem; }
    .gradient-text { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-description { font-size: 1rem; margin-bottom: 2rem; }
    .hero-stats { flex-direction: row !important; gap: 1.5rem; margin-top: 2rem; justify-content: center !important; align-items: center !important; flex-wrap: wrap !important; }
    .stat-item { display: flex; align-items: center; justify-content: center; gap: 1rem; }
    .hero-stats .stat-item:last-child { display: none !important; }
    .stat-number { font-size: 2rem; }
    .hero-visual { margin-top: 2rem; }
    .hero-content {
        display: grid; grid-template-columns: 1fr; gap: 2rem; text-align: center; max-width: 100%;
        background: transparent; backdrop-filter: none; border-radius: 0; padding: 2rem; margin: 1rem;
        border: none; box-shadow: none;
    }
    .hero-image-container { position: absolute !important; top: 0; left: 0; right: 0; bottom: 0; width: 100% !important; height: auto; }
    .hub-core { width: 60px; height: 60px; }
    .hub-core i { font-size: 1.5rem; }
    .pulse-ring { width: 60px; height: 60px; }
    .floating-icon { width: 40px; height: 40px; border-radius: 10px; }
    .floating-icon i { font-size: 1rem; }
    .hero-image-container, .hero-image-container .modern-network, .hero-image-container .bg-pattern,
    .hero-image-container .central-hub, .hero-image-container .floating-icon, .hero-image-container .connection-mesh { display: none !important; }
    .hero-description { display: none !important; }
    .hero-section::before { display: none !important; }
}
@media (max-width: 480px) {
    .hero-section { padding: 2rem 0; }
    .gradient-text { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-description { font-size: 0.9rem; }
    .stat-number { font-size: 1.8rem; }
    .hero-image-container, .hero-image-container .modern-network, .hero-image-container .bg-pattern,
    .hero-image-container .central-hub, .hero-image-container .floating-icon, .hero-image-container .connection-mesh { display: none !important; }
    .hero-description { display: none !important; }
    .hero-section::before { display: none !important; }
    .hero-image-container { position: relative !important; right: auto !important; width: 100% !important; height: 200px; }
    .hub-core { width: 60px; height: 60px; }
    .hub-core i { font-size: 1.5rem; }
    body.index-with-navbar .glass-card { padding: 0.6rem 0.75rem; column-gap: 0.6rem; grid-template-columns: 2.2rem 1fr; }
    body.index-with-navbar .glass-card .card-icon { font-size: 1.25rem; }
    body.index-with-navbar .glass-card .card-title { font-size: 0.88rem; }
    body.index-with-navbar .glass-card .card-description { font-size: 0.68rem; }
}
@media (max-width: 768px) {
    body.index-with-navbar .hero-index-head { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
    body.index-with-navbar .hero-index-head .hero-title { text-align: center; }
    body.index-with-navbar .hero-index-head .hero-stats { justify-content: center; }
    body.index-with-navbar .glass-card-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    body.index-with-navbar .hero-menu-column { gap: 1.4rem; }
    body.index-with-navbar .hero-nav-domain-tabs { flex-direction: column; align-items: stretch; gap: 0.4rem; }
    body.index-with-navbar .hero-nav-domain-tab { justify-content: center; padding: 0.6rem 1rem; }
    body.index-with-navbar .hero-menu-section h3 { font-size: 1.02rem; margin-bottom: 0.65rem; }
    body.index-with-navbar .glass-card {
        display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; row-gap: 0.12rem;
        padding: 0.7rem 0.9rem; align-items: center; text-align: left; border-radius: 12px;
    }
    body.index-with-navbar .glass-card .card-icon { grid-row: 1 / span 2; grid-column: 1; margin-bottom: 0; font-size: 1.35rem; line-height: 1; }
    body.index-with-navbar .glass-card .card-title { grid-column: 2; grid-row: 1; font-size: 0.95rem; margin-bottom: 0; align-self: end; }
    body.index-with-navbar .glass-card .card-description { grid-column: 2; grid-row: 2; font-size: 0.72rem; line-height: 1.35; align-self: start; }
    body.index-with-navbar .glass-card:hover { transform: translateY(-2px); }
    body.index-with-navbar .glass-card:hover .card-icon { transform: scale(1.08); }
}
@media (max-width: 768px) {
    .hero-image-container, .hero-image-container .modern-network, .hero-image-container .bg-pattern,
    .hero-image-container .central-hub, .hero-image-container .floating-icon, .hero-image-container .connection-mesh { display: none !important; }
}

/* ==========================================================================
   5. 메인 기능 섹션 (index.php 카드형 메뉴)
   ========================================================================== */
.main-features { padding: 2rem 0 4rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; color: var(--ui-primary); margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; color: var(--ui-muted); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 4rem; }
.feature-card {
    background: white; border-radius: 12px; padding: 1.5rem; text-decoration: none; color: inherit;
    transition: all 0.3s ease; border: 2px solid transparent; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--card-gradient-start), var(--card-gradient-end));
    transition: all 0.3s ease;
}
.feature-card.primary { --card-gradient-start: var(--ui-info); --card-gradient-end: var(--ui-info-hover); }
.feature-card.secondary { --card-gradient-start: var(--ui-success); --card-gradient-end: var(--ui-success-hover); }
.feature-card.accent { --card-gradient-start: var(--ui-warning); --card-gradient-end: var(--ui-warning-hover); }
.feature-card.info { --card-gradient-start: #8b5cf6; --card-gradient-end: #7c3aed; }
.feature-card.success { --card-gradient-start: var(--ui-success); --card-gradient-end: var(--ui-success-hover); }
.feature-card.warning { --card-gradient-start: var(--ui-warning); --card-gradient-end: var(--ui-warning-hover); }
.feature-card.danger { --card-gradient-start: var(--ui-danger); --card-gradient-end: var(--ui-danger-hover); }
.feature-card.disabled { --card-gradient-start: var(--ui-muted); --card-gradient-end: var(--ui-text-sub); opacity: 0.6; cursor: not-allowed; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); border-color: var(--card-gradient-start); }
.feature-card:hover::before { height: 8px; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.feature-card .card-icon {
    width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));
    color: white; font-size: 1.2rem; transition: transform 0.3s ease;
}
.feature-card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.card-badge { background: linear-gradient(135deg, var(--ui-danger), var(--ui-danger-hover)); color: white; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.card-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--ui-primary); margin-bottom: 0.5rem; }
.card-content p { color: var(--ui-muted); line-height: 1.5; margin-bottom: 1rem; font-size: 0.9rem; }
.card-features { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.feature-tag { background: var(--ui-slate-100); color: var(--ui-muted); padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.75rem; font-weight: 500; }
.card-arrow { align-self: flex-end; margin-top: 1rem; color: var(--card-gradient-start); font-size: 1.2rem; transition: transform 0.3s ease; }
.feature-card:hover .card-arrow { transform: translateX(4px); }
.additional-features { margin-top: 3rem; }
.subsection-title { font-size: 1.8rem; font-weight: 600; color: var(--ui-slate-700); margin-bottom: 2rem; text-align: center; }
.additional-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.additional-card {
    background: white; border-radius: 12px; padding: 1.5rem; text-decoration: none; color: inherit;
    transition: all 0.3s ease; border: 1px solid var(--ui-divider); display: flex; gap: 1rem; align-items: flex-start;
}
.additional-card:hover:not(.disabled) { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); border-color: var(--ui-border); }
.additional-card .card-icon {
    width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: var(--ui-bg); color: var(--ui-muted); font-size: 1.2rem; flex-shrink: 0;
}
.additional-card.success .card-icon { background: var(--ui-row-hover); color: var(--ui-success); }
.additional-card.info .card-icon { background: var(--ui-row-hover); color: var(--ui-info-hover); }
.additional-card.danger .card-icon { background: var(--ui-slate-100); color: var(--ui-danger-hover); }
.additional-card .card-content { flex: 1; }
.additional-card h4 { font-size: 1.1rem; font-weight: 600; color: var(--ui-primary); margin-bottom: 0.5rem; }
.additional-card p { color: var(--ui-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 0.75rem; }
/* 홈 카드용 "coming-soon/active" 뱃지 — device 상태뱃지(device-shared.css)와 이름은 같으나
   페이지가 겹치지 않아 공존 가능(index.php 전용, device 페이지는 device-shared.css 만 로드) */
.status-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-badge.coming-soon { background: #fef3c7; color: var(--ui-warning-hover); }
.status-badge.active { background: var(--ui-row-hover); color: var(--ui-success); }
.additional-card.disabled { opacity: 0.6; cursor: not-allowed; }
.additional-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--ui-divider); }
.icon-1 { top: 10%; right: 15%; animation: float1 6s ease-in-out infinite; }
.icon-2 { top: 30%; right: 5%; animation: float2 7s ease-in-out infinite; }
.icon-3 { bottom: 15%; right: 30%; animation: float3 8s ease-in-out infinite; }
.icon-4 { bottom: 10%; right: 8%; animation: float4 6.5s ease-in-out infinite; }
.icon-5 { top: 55%; right: 35%; animation: float5 7.5s ease-in-out infinite; }
.icon-6 { top: 25%; right: 40%; animation: float6 8.5s ease-in-out infinite; }
.connection-mesh { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }
@media (min-width: 481px) and (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .hero-container {
        display: flex !important; flex-direction: column !important; align-items: stretch !important;
        justify-content: center !important; gap: 2rem; min-height: auto; width: 100%;
    }
    .hero-menu-column { width: 100%; min-width: 0; }
    .hero-content { max-width: 100% !important; width: 100% !important; margin: 0 auto !important; display: flex !important; justify-content: center !important; align-items: center !important; }
    .hero-text { text-align: center !important; display: flex !important; flex-direction: column !important; align-items: center !important; width: 100% !important; }
    .hero-title { text-align: center !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
    .hero-stats { justify-content: center !important; align-items: center !important; display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 2rem !important; }
    .stat-item { text-align: center !important; }
    .hero-stats .stat-item:last-child { display: none !important; }
}
@media (max-width: 768px) {
    .features-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1.5rem; margin-bottom: 3rem; }
    .feature-card { padding: 1.5rem; }
    .additional-grid { grid-template-columns: 1fr; gap: 1rem; }
    .section-header h2 { font-size: 1.8rem; }
    .feature-card .card-description { display: none !important; }
    .feature-card .card-features { display: none !important; }
    .feature-card .card-arrow { display: none !important; }
    .feature-card { padding: 1.5rem 1rem !important; text-align: center !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 1rem !important; }
    .feature-card .card-header { margin-bottom: 0 !important; display: flex !important; justify-content: center !important; align-items: center !important; }
    .feature-card .card-badge { display: none !important; }
    .feature-card .card-content { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 0 !important; flex: 0 !important; }
    .feature-card .card-title { margin-bottom: 0 !important; text-align: center !important; }
}
@media (max-width: 1024px) {
    .section-header h2 { font-size: 2rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (max-width: 480px) {
    .section-header h2 { font-size: 1.5rem; }
    .feature-card { padding: 1.2rem; }
    .feature-card .card-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .card-content h3 { font-size: 1.2rem; }
}

/* ==========================================================================
   6. 푸터
   ========================================================================== */
.footer {
    background-color: var(--ui-bg);
    border-top: 1px solid var(--ui-divider);
    padding: 2rem 0 1rem;
    color: var(--ui-text-sub);
    margin-top: auto;
    font-size: 0.85rem;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.footer-container { max-width: 1600px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 75rem) { .footer-container { max-width: min(120rem, calc(100vw - 1.5rem)); } }
.footer-logo { display: flex; flex-direction: column; margin-bottom: 1rem; }
.footer-logo strong { font-size: 1.1rem; color: var(--ui-primary); margin-bottom: 0.2rem; }
.footer-logo span { color: var(--ui-text-sub); font-size: 0.8rem; }
.footer-content { display: flex; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 2rem; }
.footer-info { flex: 1; min-width: 250px; }
.footer-info p { margin-bottom: 0.5rem; line-height: 1.6; }
.footer-links { flex: 1; min-width: 200px; }
.footer-links h4 { color: var(--ui-primary); margin-bottom: 1rem; font-size: 1rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links li { margin: 0; }
.footer-links a { color: var(--ui-text-sub); text-decoration: none; transition: color 0.3s; padding: 0.2rem 0; }
.footer-links a:hover { color: var(--ui-primary); }
.footer-copyright { border-top: 1px solid var(--ui-divider); padding-top: 1rem; text-align: center; }
.footer-copyright p { color: var(--ui-border-strong); font-size: 0.8rem; }
@media (max-width: 768px) {
    .footer { padding: 1.5rem 0 0.8rem; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-info, .footer-links { margin-bottom: 0; }
    .footer-links h4 { margin-bottom: 0.5rem; }
    .footer-content { flex-direction: column; }
    .footer-links { margin-left: 0; margin-top: 1rem; }
    .footer-links ul { flex-direction: column; }
}
@media (max-width: 480px) {
    .footer { padding: 1rem 0 0.5rem; }
    .footer-container { padding: 0 0.8rem; }
    .footer-logo strong { font-size: 1.1rem; }
    .footer-links h4 { font-size: 0.9rem; }
}
/* device_list.php 등 freeze-pane 페이지에서 하단 회색 푸터 레이어 숨김(device-shared.css 도 동일 규칙 소유) */

/* ==========================================================================
   앱셸(화면스크롤) — 문서 전체 스크롤 대신 "본문 래퍼만" 내부 스크롤.
   효과: 헤더·푸터 항상 고정 + 문서 스크롤바 소멸(콘텐츠 폭 불변) → 페이지 이동 시
         헤더/로고가 좌우로 밀리는 현상까지 차단. 홈과 동일 구조.

   [안전 규칙 1] body 에 overflow:hidden 을 걸면 "스크롤러로 지정된 래퍼"가 반드시 있어야 한다.
   래퍼를 모르는 페이지에 걸면 화면 밖 내용에 접근 불가가 되므로, 아래 목록의 래퍼를
   body 직속으로 가진 페이지에만 :has() 로 선별 적용한다. 목록에 없으면 자동 폴백(문서 스크롤).

   [안전 규칙 2 — 매우 중요] 인쇄 시에는 앱셸을 반드시 해제한다.
   height:100vh + overflow:hidden 이 인쇄에 그대로 적용되면 "첫 화면 1장"만 인쇄되고
   나머지 내용이 통째로 잘린다(보고서·장비목록 인쇄가 깨짐). 아래 @media print 로 원복.

   모달은 position:fixed 라 플렉스 흐름에서 빠져 영향 없음.
   푸터는 고정 대신 플렉스 마지막 자식으로 되돌림. 홈은 shell.css 미로드라 무영향.
   ========================================================================== */
body:has(> .container-fluid, > .container, > .pp-wrap, > .nb-wrap, > .qb-wrap, > .access-log-wrap, > .sec-page-wrap, > .equip-transfer-page, > .placement-page, > .totp-disable-root, > .rb-wrap, > .ui-page, > .topo-shell) {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0 !important;
}
body:has(> .container-fluid, > .container, > .pp-wrap, > .nb-wrap, > .qb-wrap, > .access-log-wrap, > .sec-page-wrap, > .equip-transfer-page, > .placement-page, > .totp-disable-root, > .rb-wrap, > .ui-page, > .topo-shell) > .navbar { flex: 0 0 auto; }
body:has(> .container-fluid, > .container, > .pp-wrap, > .nb-wrap, > .qb-wrap, > .access-log-wrap, > .sec-page-wrap, > .equip-transfer-page, > .placement-page, > .totp-disable-root, > .rb-wrap, > .ui-page, > .topo-shell) > .inet-site-footer {
    position: static !important;
    flex: 0 0 auto;
    box-shadow: none;
}
/* 스크롤러 = 본문 래퍼 자신 */
body > .container-fluid, body > .container, body > .pp-wrap, body > .nb-wrap,
body > .qb-wrap, body > .access-log-wrap, body > .sec-page-wrap,
body > .equip-transfer-page, body > .placement-page, body > .totp-disable-root,
body > .rb-wrap, body > .ui-page, body > .topo-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* [필수] 인쇄 시 앱셸 완전 해제 — 안 하면 첫 화면만 인쇄되고 나머지가 잘린다 */
@media print {
    body:has(> .container-fluid, > .container, > .pp-wrap, > .nb-wrap, > .qb-wrap, > .access-log-wrap, > .sec-page-wrap, > .equip-transfer-page, > .placement-page, > .totp-disable-root, > .rb-wrap, > .ui-page, > .topo-shell) {
        height: auto !important;
        display: block !important;
        overflow: visible !important;
    }
    body > .container-fluid, body > .container, body > .pp-wrap, body > .nb-wrap,
    body > .qb-wrap, body > .access-log-wrap, body > .sec-page-wrap,
    body > .equip-transfer-page, body > .placement-page, body > .totp-disable-root,
    body > .rb-wrap, body > .ui-page, body > .topo-shell {
        flex: none !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }
}
