/* =========================================================
    HELPDESK LAYOUT CSS - REORGANIZED
    사용대상:
    - /inc/layout.php 기반 전체 HelpDesk 레이아웃
    - company header, sidebar, topbar, content-wrap, popup, layout mode toggle
    정보:
    - 기존 CSS 동작을 유지하면서 사용 그룹별로 재배치
    - @media 규칙은 파일 하단 RESPONSIVE / MEDIA QUERY GROUP으로 통합
    - JS / SQL / PHP 구조 변경 없음
========================================================= */

/* =========================================================
    01. ROOT VARIABLES / RESET
    사용대상:
    - 전체 레이아웃 공통 변수
    - body, a, box-sizing 기본값
    정보:
    - sidebar/header/card 크기 기준값
========================================================= */

:root {
            --sidebar-width: 280px;
            --header-height: 100px;
            --main-bg: #f4f7fb;
            --nav-point: #5b8cff;
            --nav-point-2: #7c3aed;
            --nav-text: #dbeafe;
            --nav-muted: #9ca3af;
            --card-radius: 22px;
        }

        * { box-sizing: border-box; }

        body {
            min-height: 100vh;
            margin: 0;
            font-family: Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background:
                radial-gradient(circle at top left, rgba(91, 140, 255, .18), transparent 34%),
                radial-gradient(circle at bottom right, rgba(124, 58, 237, .16), transparent 34%),
                var(--main-bg);
            color: #111827;
            overflow-x: hidden;
        }

        a { text-decoration: none; }

        /* =========================
        Company Header
        ========================= */
        /* =========================================================
        02. COMPANY HEADER / BRAND AREA
        사용대상:
        - 상단 회사 로고 영역
        - 운영시간 / 대표전화 정보 박스
        정보:
        - PC 상단 고정 header 영역
    ========================================================= */

.company-head {
            position: sticky;
            top: 0;
            z-index: 1040;
            box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
        }
        .brand-head {
            height: var(--header-height);
            min-height: var(--header-height);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 12px 52px;
            color: #ffffff;
            background:
                radial-gradient(circle at 20% 10%, rgba(49, 233, 129, .16), transparent 26%),
                linear-gradient(135deg, #31485a, #243849);
            overflow: hidden;
            position: relative;
        }

        .brand-head::after {
            content: "";
            position: absolute;
            width: 330px;
            height: 330px;
            right: 20%;
            top: -220px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .06);
        }

        .company-logo-wrap,
        .head-info {
            position: relative;
            z-index: 1;
        }

        .company-logo-wrap {
            display: flex;
            align-items: center;
            gap: 16px;
            min-width: 280px;
        }
        .company-logo-card {
            display: flex;
            align-items: center;
            min-width: 220px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            backdrop-filter: none;
        }

        .company-logo-img {
            max-height: 58px;
            width: auto;
            display: block;
        }

        .head-info {
            display: grid;
            grid-template-columns: repeat(2, minmax(180px, 1fr));
            align-items: stretch;
            justify-content: flex-end;
            gap: 16px;
        }

        .head-info-item {
            min-width: 0;
            height: 76px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 13px 16px;
            border-radius: 20px;
            background: rgba(255, 255, 255, .08);
            border: 1px solid rgba(255, 255, 255, .14);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, .12),
                0 12px 26px rgba(0, 0, 0, .1);
            backdrop-filter: blur(12px);
        }

        .head-info-item i {
            margin-top: 2px;
            font-size: 1.05rem;
            color: #ffffff;
        }

        .head-info-item strong {
            display: block;
            font-size: .95rem;
            font-weight: 900;
            line-height: 1.1;
        }

        .head-info-item span {
            display: block;
            margin-top: 6px;
            font-size: 1.12rem;
            font-weight: 950;
            letter-spacing: .02em;
        }

        /* =========================
            Layout
        ========================= */
        /* =========================================================
    03. APP LAYOUT STRUCTURE
    사용대상:
    - .app-shell, .main-area, .content-wrap
    - 사이드바와 본문 영역 기본 배치
========================================================= */

.app-shell {
            display: flex;
            min-height: 0;
        }

        /* =========================================================
    04. SIDEBAR NAVIGATION
    사용대상:
    - 좌측 메뉴, 메뉴 그룹, 서브메뉴, 사용자 드롭다운
    정보:
    - PC에서는 sticky sidebar
    - 모바일에서는 @media 그룹에서 offcanvas 형태로 전환
========================================================= */

.sidebar {
            width: var(--sidebar-width);
            height: calc(100dvh - var(--header-height));
            position: sticky;
            top: var(--header-height);
            z-index: 1030;
            color: var(--nav-text);
            background:
                linear-gradient(145deg, rgba(17, 24, 39, .98), rgba(31, 41, 55, .96)),
                url("data:image/svg+xml,%3Csvg width='140' height='140' viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05'%3E%3Cpath d='M0 0h140v140H0z'/%3E%3Cpath d='M0 70h140M70 0v140'/%3E%3Ccircle cx='70' cy='70' r='40'/%3E%3C/g%3E%3C/svg%3E");
            box-shadow: 20px 0 50px rgba(15, 23, 42, .14);
            transition: width .32s ease, transform .32s ease, box-shadow .32s ease;
            overflow: hidden;
        }

        .sidebar-inner {
            height: 100%;
            display: flex;
            flex-direction: column;
            padding: 22px 16px;
        }

        .sidebar-mini-head {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 58px;
            padding: 8px 10px 18px;
            border-bottom: 1px solid rgba(255, 255, 255, .08);
            margin-bottom: 18px;
        }

        .sidebar-mini-logo {
            width: 44px;
            height: 44px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 16px;
            background: linear-gradient(135deg, var(--nav-point), var(--nav-point-2));
            box-shadow: 0 10px 30px rgba(91, 140, 255, .35);
        }

        .sidebar-mini-title {
            overflow: hidden;
            white-space: nowrap;
            transition: opacity .2s ease, transform .2s ease;
        }

        .sidebar-mini-title strong {
            display: block;
            font-size: 1.08rem;
            letter-spacing: -.03em;
        }

        .sidebar-mini-title span {
            display: block;
            font-size: .78rem;
            color: var(--nav-muted);
            margin-top: 2px;
        }

        .nav-section-title {
            padding: 12px 14px 8px;
            font-size: .72rem;
            font-weight: 900;
            color: #7dd3fc;
            letter-spacing: .12em;
            text-transform: uppercase;
            opacity: .85;
            white-space: nowrap;
            transition: opacity .2s ease;
        }

        .side-nav {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 4px;
        }

        .side-nav::-webkit-scrollbar { width: 5px; }
        .side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 999px; }

        .nav-item-wrap {
            margin-bottom: 7px;
        }

        .side-link,
        .side-toggle {
            width: 100%;
            min-height: 48px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 13px;
            border: 0;
            border-radius: 17px;
            color: var(--nav-text);
            background: transparent;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            transition: transform .18s ease, background .22s ease, color .22s ease;
        }

        .side-toggle {
            font: inherit;
            text-align: left;
        }

        .side-link::after {
            content: "";
            width: 16px;
            height: 16px;
            flex: 0 0 16px;
            position: relative;
            z-index: 1;
        }

        .side-link .nav-label,
        .side-toggle .nav-label {
            display: flex;
            align-items: center;
            min-height: 26px;
            line-height: 1.15;
        }

        .nav-icon,
        .nav-arrow {
            display: grid;
            place-items: center;
            line-height: 1;
        }

        .side-link::before,
        .side-toggle::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, rgba(91, 140, 255, .22), rgba(124, 58, 237, .12));
            opacity: 0;
            transition: opacity .22s ease;
        }

        .side-link:hover,
        .side-toggle:hover {
            color: #ffffff;
            transform: translateX(5px);
        }

        .side-link:hover::before,
        .side-toggle:hover::before,
        .side-link.active::before,
        .side-toggle.active::before {
            opacity: 1;
        }

        .side-link.active,
        .side-toggle.active {
            color: #ffffff;
            background: rgba(255, 255, 255, .07);
        }

        .nav-icon {
            width: 26px;
            height: 26px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            position: relative;
            z-index: 1;
            font-size: 1.13rem;
        }

        .nav-label {
            flex: 1;
            position: relative;
            z-index: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 700;
            letter-spacing: -.02em;
            transition: opacity .2s ease, transform .2s ease;
        }

        .nav-badge {
            position: relative;
            z-index: 1;
            font-size: .68rem;
            font-weight: 900;
            border-radius: 999px;
            padding: 4px 7px;
            background: rgba(34, 197, 94, .18);
            color: #86efac;
            white-space: nowrap;
            transition: opacity .2s ease;
        }

        .nav-arrow {
            position: relative;
            z-index: 1;
            transition: transform .22s ease, opacity .2s ease;
        }

        .side-toggle[aria-expanded="true"] .nav-arrow { transform: rotate(180deg); }

        .submenu {
            padding: 6px 0 6px 42px;
        }

        .submenu a {
            display: flex;
            align-items: center;
            min-height: 36px;
            padding: 7px 13px;
            margin-bottom: 4px;
            color: #cbd5e1;
            font-size: .91rem;
            text-decoration: none;
            border-radius: 13px;
            transition: background .18s ease, color .18s ease, transform .18s ease;
        }

        .submenu a:hover,
        .submenu a.active {
            color: #ffffff;
            background: rgba(255, 255, 255, .08);
            transform: translateX(4px);
        }

        .sidebar-footer {
            padding-top: 14px;
            border-top: 1px solid rgba(255, 255, 255, .08);
        }

        .user-mini {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 18px;
            background: rgba(255, 255, 255, .06);
            transition: background .2s ease;
        }

        .user-mini {
            color: #ffffff;
        }

        .user-mini:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(91, 140, 255, .28);
        }

        .user-arrow {
            position: relative;
            z-index: 1;
            transition: transform .2s ease;
        }

        .dropdown.show .user-arrow {
            transform: rotate(180deg);
        }

        .user-dropdown {
            margin-bottom: 10px !important;
            border: 1px solid rgba(255, 255, 255, .12);
            border-radius: 16px;
            padding: 8px;
            background: #111827;
            box-shadow: 0 18px 40px rgba(0, 0, 0, .32);
        }

        .user-dropdown .dropdown-item {
            border-radius: 11px;
            font-weight: 700;
            font-size: .9rem;
            padding: 9px 11px;
        }

        .user-mini:hover { background: rgba(255, 255, 255, .1); }

        .user-avatar {
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 50%;
            background: rgba(255, 255, 255, .12);
            color: #ffffff;
            font-weight: 900;
        }

        .user-text {
            overflow: hidden;
            white-space: nowrap;
            transition: opacity .2s ease;
        }

        .user-text strong { display: block; font-size: .9rem; }
        .user-text span { display: block; color: var(--nav-muted); font-size: .75rem; }

        .main-area {
            flex: 1;
            min-width: 0;
            transition: margin-left .32s ease;
        }

        /* =========================================================
    05. TOPBAR / PAGE TITLE
    사용대상:
    - 본문 상단 페이지 제목 영역
    - 모바일 메뉴 버튼 / 알림 버튼
========================================================= */

.topbar {
            position: sticky;
            top: var(--header-height);
            z-index: 1000;
            height: 72px;
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 0 28px;
            backdrop-filter: blur(14px);
            background: rgba(244, 247, 251, .78);
            border-bottom: 1px solid rgba(148, 163, 184, .22);
        }

        .sidebar-toggle-btn {
            width: 44px;
            height: 44px;
            display: grid;
            place-items: center;
            border: 0;
            border-radius: 15px;
            color: #111827;
            background: #ffffff;
            box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
            transition: transform .18s ease, box-shadow .18s ease;
        }

        .sidebar-toggle-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 32px rgba(15, 23, 42, .13);
        }

        .page-title {
            min-width: 0;
            flex: 1;
        }

        .page-title h1 {
            margin: 0;
            font-size: 1.25rem;
            font-weight: 900;
            letter-spacing: -.04em;
        }

        .page-title p {
            margin: 3px 0 0;
            color: #64748b;
            font-size: .88rem;
        }

        .content-wrap {
            padding: 0px;
        }

        /* =========================================================
    06. LEGACY HERO / STAT / QUICK CHIP
    사용대상:
    - 기존 대시보드 카드형 UI
    - hero-card, stat-card, quick-chip
    정보:
    - 새 페이지 공통 히어로는 sg_page_common.css 기준
========================================================= */

.hero-card {
            position: relative;
            overflow: hidden;
            border: 0;
            border-radius: var(--card-radius);
            background: linear-gradient(135deg, #ffffff, rgba(255,255,255,.78));
            box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
        }

        .hero-card::after {
            content: "";
            position: absolute;
            width: 280px;
            height: 280px;
            right: -90px;
            top: -110px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(91, 140, 255, .22), transparent 68%);
        }

        .stat-card {
            border: 0;
            border-radius: 20px;
            box-shadow: 0 16px 36px rgba(15, 23, 42, .07);
            transition: transform .2s ease, box-shadow .2s ease;
        }

        .stat-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 24px 50px rgba(15, 23, 42, .12);
        }

        .quick-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 8px 12px;
            border-radius: 999px;
            background: #eef2ff;
            color: #4338ca;
            font-size: .86rem;
            font-weight: 800;
        }


        /* =========================
            Header Actions
        ========================= */
        /* =========================================================
    07. MOBILE HEADER ACTIONS / BACKDROP
    사용대상:
    - 모바일 상단 알림 버튼
    - 모바일 사이드바 열림 시 backdrop
========================================================= */

.mobile-head-actions {
            display: none;
            position: relative;
            z-index: 1;
        }

        .mobile-alert-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            padding: 0;
            border: 1px solid rgba(255, 255, 255, .18);
            border-radius: 14px;
            color: #ffffff;
            background: rgba(255, 255, 255, .12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 24px rgba(0, 0, 0, .1);
            backdrop-filter: blur(10px);
            line-height: 1;
            transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
        }

        .mobile-alert-btn:hover {
            background: rgba(255, 255, 255, .18);
            transform: translateY(-1px);
        }

        .mobile-alert-btn:active {
            transform: scale(.96);
        }

        .mobile-alert-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: #ef4444;
            box-shadow: 0 0 0 2px rgba(36, 56, 73, 1);
        }


        .mobile-backdrop {
            position: fixed;
            inset: 0;
            z-index: 1025;
            background: rgba(15, 23, 42, .46);
            backdrop-filter: blur(4px);
            opacity: 0;
            pointer-events: none;
            transition: opacity .25s ease;
        }

        body.mobile-nav-open .mobile-backdrop {
            opacity: 1;
            pointer-events: auto;
        }







/* =========================================================
   ANDROID APP WEBVIEW STATUS/NAV BAR FIX
   - Android WebView 전용 상단 상태바 검은 영역
   - div 추가 없이 body::before 로 강제 생성
   - 일반 모바일 브라우저는 영향 없음
========================================================= */

/* =========================================================
    08. WEBVIEW STATUS / NAV BAR BASE
    사용대상:
    - Android / iOS WebView 환경
    정보:
    - 상태바와 하단 네비게이션 영역 보정
    - @media 내부 WebView 세부 보정은 하단 RESPONSIVE 그룹에 배치
========================================================= */

body.is-webview {
    --webview-statusbar-h: 30px;
    --webview-navbar-h: 42px;
    padding-top: var(--webview-statusbar-h);
}

/* 상단 시간/배터리 영역 검은 배경 */
body.is-webview::before {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    height: var(--webview-statusbar-h);
    background: #000;
    z-index: 99999;
    pointer-events: none;
}

/* 회사 상단 헤더는 검은 상태바 아래에서 sticky */
body.is-webview .company-head {
    top: var(--webview-statusbar-h);
}

/* PC/태블릿형 WebView에서 사이드바 기준 보정 */


/* topbar도 상태바 + 회사헤더 아래에 고정 */
body.is-webview .topbar {
    top: calc(var(--header-height) + var(--webview-statusbar-h));
}

/* 본문 하단 Android 네비게이션 버튼 영역 확보 */
body.is-webview .content-wrap {
    padding-bottom: calc(28px + var(--webview-navbar-h));
}

/* 모바일 WebView */


/* 작은 Android WebView */


/* ==========================================
    Custom Popup / Alert / Confirm
    - customAlert(), customConfirm() 공통 필수 스타일
    - 제거 금지
========================================== */

/* 배경 오버레이 */
/* =========================================================
    09. CUSTOM POPUP / ALERT / CONFIRM
    사용대상:
    - customAlert(), customConfirm()
    정보:
    - 제거 금지 공통 팝업 스타일
========================================================= */

.popup-overlay{
    position:fixed;
    inset:0;
    z-index:9998;
    display:none;
    background:rgba(15,23,42,.55);
    backdrop-filter:blur(4px);
}

/* 팝업 박스 */
.custom-popup{
    position:fixed;
    left:50%;
    top:50%;
    z-index:9999;
    display:none;
    width:min(92vw,420px);
    transform:translate(-50%,-50%);
    padding:28px 26px 24px;
    border-radius:22px;
    background:#fff;
    border:1px solid rgba(226,232,240,.9);
    box-shadow:0 24px 80px rgba(15,23,42,.28);
    text-align:center;
}

/* 팝업 표시 상태 */
.popup-overlay.show,
.custom-popup.show{
    display:block;
}

/* 제목 */
.custom-popup-title{
    margin-bottom:12px;
    font-size:1.35rem;
    font-weight:800;
    color:#111827;
    line-height:1.35;
}

/* 메시지 */
.custom-popup-message{
    margin-bottom:24px;
    font-size:.98rem;
    font-weight:500;
    color:#475569;
    line-height:1.65;
    word-break:keep-all;
}

/* 버튼 영역 */
.custom-popup-buttons{
    display:flex;
    gap:10px;
    justify-content:center;
}

/* 팝업 버튼 공통 */
.custom-popup-buttons button{
    min-width:104px;
    height:44px;
    padding:0 18px;
    border-radius:14px;
    border:0;
    font-size:.95rem;
    font-weight:700;
    cursor:pointer;
    transition:all .18s ease;
}

/* 확인 버튼 */
.custom-popup-buttons .popup-ok,
.custom-popup-buttons .popup-confirm{
    background:#2563eb;
    color:#fff;
    box-shadow:0 10px 22px rgba(37,99,235,.22);
}

.custom-popup-buttons .popup-ok:hover,
.custom-popup-buttons .popup-confirm:hover{
    background:#1d4ed8;
    transform:translateY(-1px);
}

/* 취소 버튼 */
.custom-popup-buttons .popup-cancel{
    background:#f1f5f9;
    color:#334155;
    border:1px solid #e2e8f0;
}

.custom-popup-buttons .popup-cancel:hover{
    background:#e2e8f0;
}

/* =========================
    Layout Mode Toggle Switch
    - 모바일/PC 공통 다크·화이트 토글
========================= */

/* =========================================================
    10. LAYOUT MODE TOGGLE
    사용대상:
    - 모바일/PC 공통 다크·화이트 모드 토글
    - topbar-mode-toggle, layout-mode-toggle
========================================================= */

.sg-layout-mode-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
}

/* 모바일 헤더 아이콘 영역 */
.layout-mode-toggle {
    width: 54px;
    height: 36px;
}

/* PC / topbar 텍스트 포함 토글 */
.topbar-mode-toggle {
    min-height: 42px;
    padding: 5px 13px 5px 6px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, .85);
    background: rgba(255, 255, 255, .88);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
    color: #111827;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.topbar-mode-toggle:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, .13),
        inset 0 1px 0 rgba(255, 255, 255, .72);
}

/* 토글 바 */
.sg-mode-switch {
    position: relative;
    width: 54px;
    height: 32px;
    padding: 3px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background:
        linear-gradient(135deg, #0f172a 0%, #334155 100%);
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, .28),
        0 8px 18px rgba(15, 23, 42, .18);
    transition: background .22s ease, box-shadow .22s ease;
}

/* 토글 동그라미 */
.sg-mode-switch-thumb {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0f172a;
    box-shadow:
        0 5px 12px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .85);
    transform: translateX(0);
    transition: transform .22s ease, color .22s ease, background .22s ease;
}

.sg-mode-switch-thumb i {
    font-size: 14px;
    line-height: 1;
}

/* 텍스트 */
.sg-mode-label {
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    letter-spacing: -.02em;
}

/* 화이트 모드 상태 */
.sg-layout-mode-toggle.is-light .sg-mode-switch {
    background:
        linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
    box-shadow:
        inset 0 2px 6px rgba(255, 255, 255, .28),
        0 8px 18px rgba(37, 99, 235, .20);
}

.sg-layout-mode-toggle.is-light .sg-mode-switch-thumb {
    transform: translateX(22px);
    color: #f59e0b;
    background: #ffffff;
}

/* 모바일 보정 */

/* =========================================================
    RESPONSIVE / MEDIA QUERY GROUP
    사용대상:
    - 모바일 / 태블릿 / PC 분기 처리
    - WebView 환경의 화면 높이, status bar, navigation bar 보정
    정보:
    - 기존 파일 안에 흩어져 있던 @media 규칙을 이 하단 그룹으로 통합
    - 선언 순서는 원본 출현 순서를 유지
========================================================= */

@media (max-width: 991.98px) {
            :root {
                --header-height: 82px;
            }

            .company-head {
                position: sticky;
                top: 0;
                z-index: 1040;
            }

            .brand-head {
                height: var(--header-height);
                min-height: var(--header-height);
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                padding: 12px 16px;
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
            }

            .company-logo-wrap {
                display: inline-flex;
                align-items: center;
                justify-content: flex-start;
                gap: 8px;
                width: auto;
                min-width: 0;
                flex: 1 1 auto;
            }

            .company-logo-card {
                min-width: 0;
                flex: 0 1 auto;
            }

            .company-logo-img {
                max-width: 180px;
                max-height: 52px;
                height: auto;
                object-fit: contain;
            }


            .mobile-head-actions {
                display: inline-flex;
                align-items: center;
                justify-content: flex-end;
                flex: 0 0 auto;
            }

            .head-info {
                display: none !important;
            }

            .brand-head::after {
                width: 220px;
                height: 220px;
                right: -80px;
                top: -130px;
                opacity: .28;
            }

            .app-shell {
                display: block;
                min-height: auto;
            }

            .sidebar {
                width: var(--sidebar-width);
                height: 100dvh;
                min-height: 100dvh;
                position: fixed;
                left: 0;
                top: 0;
                bottom: 0;
                z-index: 1050;
                transform: translateX(-105%);
            }

            .sidebar-inner {
                height: 100dvh;
            }

            body.mobile-nav-open .sidebar {
                transform: translateX(0);
            }

            .topbar {
                top: var(--header-height);
                height: 60px;
                padding: 0 16px;
            }

            .topbar .sidebar-toggle-btn {
                width: 40px;
                height: 40px;
                flex: 0 0 auto;
                border-radius: 14px;
            }

            .page-title p {
                display: none;
            }

            .content-wrap {
                padding: 0px;
            }
        }

@media (max-width: 420px) {
            .brand-head {
                gap: 10px;
                padding: 10px 12px;
            }

            .company-logo-wrap {
                gap: 6px;
            }

            .company-logo-img {
                max-width: 145px;
                max-height: 46px;
            }

            .mobile-alert-btn,
            .topbar .sidebar-toggle-btn {
                width: 36px;
                height: 36px;
                border-radius: 12px;
            }
        }

@media (min-width: 992px) {
            .mobile-head-actions {
                display: none !important;
            }
        }

@media (min-width: 992px) {
    body.is-webview .sidebar {
        top: calc(var(--header-height) + var(--webview-statusbar-h));
        height: calc(100dvh - var(--header-height) - var(--webview-statusbar-h));
    }
}

@media (max-width: 991.98px) {
    body.is-webview {
        --webview-statusbar-h: 30px;
        --webview-navbar-h: 48px;
    }

    body.is-webview .topbar {
        top: calc(var(--header-height) + var(--webview-statusbar-h));
    }

    body.is-webview .content-wrap {
        padding-bottom: calc(36px + var(--webview-navbar-h));
    }

    /* 모바일 사이드바는 전체화면으로 열리므로 내부 여백만 보정 */
    body.is-webview .sidebar {
        top: 0;
        height: 100dvh;
        min-height: 100dvh;
    }

    body.is-webview .sidebar-inner {
        padding-top: calc(22px + var(--webview-statusbar-h));
        padding-bottom: calc(22px + var(--webview-navbar-h));
    }
}

@media (max-width: 420px) {
    body.is-webview {
        --webview-statusbar-h: 32px;
        --webview-navbar-h: 54px;
    }

    body.is-webview .content-wrap {
        padding-bottom: calc(44px + var(--webview-navbar-h));
    }
}

@media (max-width: 768px) {
    .topbar-mode-toggle {
        min-height: 38px;
        padding: 4px 10px 4px 5px;
        gap: 8px;
        flex-shrink: 0;
    }

    .topbar-mode-toggle .sg-mode-switch {
        width: 48px;
        height: 29px;
    }

    .topbar-mode-toggle .sg-mode-switch-thumb {
        width: 23px;
        height: 23px;
    }

    .topbar-mode-toggle.is-light .sg-mode-switch-thumb {
        transform: translateX(19px);
    }

    .sg-mode-label {
        font-size: 12px;
    }
}
