
:root {
    --navbar-content-height: 64px; /* Base content height without safe area */
    --fab-spacing: 16px; /* Spacing between navbar and FAB */
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
        
        body { 
            margin: 0; padding: 0; 
            background-color: #d1d5db;
            font-family: 'Inter', sans-serif; 
            -webkit-tap-highlight-color: transparent; 
        }
        
        /* 모바일 앱 뼈대 (480px 고정) */
        .app-container {
            width: 100%; 
            max-width: 480px; 
            margin: 0 auto; 
            background-color: #ffffff; 
            height: 100dvh;
            display: flex; flex-direction: column; position: relative; 
            box-shadow: 0 0 40px rgba(0,0,0,0.15); overflow: hidden;
        }
        
        main { 
            flex: 1; overflow-y: auto; overflow-x: hidden; 
            position: relative; scroll-behavior: smooth; background-color: #f9fafb; 
        }
        
        .hide-scrollbar::-webkit-scrollbar { display: none; }
        .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
        
        .view-transition { transition: opacity 0.3s ease, transform 0.3s ease; }
        .view-hidden { 
            display: none !important; 
            opacity: 0 !important; 
            pointer-events: none !important; 
            position: absolute !important; 
            z-index: -1 !important; 
            transform: scale(0.98); 
        }
        .view-active { 
            opacity: 1 !important; 
            pointer-events: auto !important; 
            position: relative !important; 
            z-index: 1 !important; 
            transform: scale(1); 
            height: 100% !important; 
            width: 100% !important; 
            display: flex !important; 
            flex-direction: column; 
            flex: 1 1 auto; 
        }

        /* 모달 및 팝업 트랜지션 */
        .modal-overlay {
            opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
            position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 60;
            display: flex; justify-content: center; align-items: flex-end; overflow: hidden;
        }
        .modal-overlay.active { opacity: 1; pointer-events: auto; }
        
        .modal-content {
            transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            width: 100%; max-height: 92%; background: white;
            border-radius: 28px 28px 0 0; display: flex; flex-direction: column;
        }
        .modal-overlay.active .modal-content { transform: translateY(0); }
        
        .modal-header { padding: 24px 24px 16px; border-bottom: 1px solid #f3f4f6; flex-shrink: 0; }
        .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 24px; }
        .modal-footer { 
            padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 16px)); 
            border-top: 1px solid #f3f4f6; background: white; flex-shrink: 0; 
        }
        
        /* 풀 페이지 오버레이 */
        .full-page-overlay {
            position: absolute; inset: 0; background-color: #f9fafb; z-index: 50;
            transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex; flex-direction: column; overflow: hidden;
        }
        .full-page-overlay.active { transform: translateX(0); }
        .full-page-content { flex: 1; overflow-y: auto; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }

        .alert-modal-content {
            transform: scale(0.95); opacity: 0; transition: all 0.2s ease;
            width: 90%; max-width: 340px; background: white; border-radius: 24px; padding: 28px 24px;
            text-align: center; margin: auto; align-self: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        .modal-overlay.active .alert-modal-content { transform: scale(1); opacity: 1; }
        
        .toast {
            position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
            background-color: #0f172a; color: white; padding: 12px 24px; border-radius: 9999px;
            font-size: 13px; font-weight: 700; z-index: 1000; transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); width: max-content; max-width: 90%; text-align: center;
            border: 1px solid rgba(255,255,255,0.15); pointer-events: none; backdrop-filter: blur(8px);
        }
        .toast.show { bottom: max(32px, env(safe-area-inset-bottom, 32px)); }

        .pb-safe { padding-bottom: calc(24px + env(safe-area-inset-bottom, 16px)); }
        .pt-safe { padding-top: max(12px, env(safe-area-inset-top, 12px)); }

        .custom-radio:checked + div { border-color: #2563eb; background-color: #eff6ff; }
        .custom-radio:checked + div .check-icon { color: #2563eb; opacity: 1; }

        @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
        .animate-shake { animation: shake 0.3s ease-in-out; }
        
        /* 코치마크 애니메이션 */
        @keyframes float-up-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
        .animate-float { animation: float-up-down 2s ease-in-out infinite; }

/* Layout Components */
.bottom-nav-bar {
    height: calc(var(--navbar-content-height) + calc(24px + env(safe-area-inset-bottom, 16px)));
}

.fab-wrapper {
    bottom: calc(var(--navbar-content-height) + calc(24px + env(safe-area-inset-bottom, 16px)) + var(--fab-spacing));
}

/* Walkthrough Spotlight Cutout */
.wt-spotlight {
    position: absolute;
    border-radius: 16px;
    border: 2.5px solid #3b82f6;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), 0 0 25px rgba(59, 130, 246, 0.7);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.wt-step-3-pos {
    bottom: calc(var(--navbar-content-height) + calc(24px + env(safe-area-inset-bottom, 16px)) + 12px);
}

.wt-step-2-pos {
    bottom: calc(var(--navbar-content-height) + calc(24px + env(safe-area-inset-bottom, 16px)) + var(--fab-spacing) + 72px);
}

/* ==========================================================
   데스크톱 PC 전용 무마찰 반응형 레이아웃 (Zero-Friction Desktop Layout)
   ========================================================== */
.desktop-only { display: none !important; }

/* 기본 (모바일 환경) 회사 소개 랜딩 및 데스크톱 로그인 모달 숨김 */
#desktopLandingView {
    display: none !important;
}
#desktopLoginModal {
    display: none !important;
}

/* 기본 (모바일 뷰) 로그인 폼 요소 */
.login-desktop-hero {
    display: none;
}
.login-desktop-form-pane {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}
.login-desktop-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
}

@media (min-width: 1024px) {
    body {
        background-color: #020617;
        overflow-x: hidden;
    }

    /* PC 데스크톱 접속 시 회사 소개 랜딩 페이지 표시 */
    #desktopLandingView {
        display: block !important;
        width: 100vw;
        min-height: 100vh;
        background-color: #020617;
        color: #f8fafc;
        overflow-x: hidden;
        overflow-y: auto;
        position: relative;
        z-index: 50;
    }
    #desktopLandingView.hidden {
        display: none !important;
    }

    /* 데스크톱 랜딩 활성 시 앱 컨테이너 숨김 */
    #desktopLandingView:not(.hidden) ~ .app-container {
        display: none !important;
    }

    /* 데스크톱 로그인 모달 */
    #desktopLoginModal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 75;
        background-color: rgba(2, 6, 23, 0.85);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        align-items: center;
        justify-content: center;
        padding: 24px;
        overflow-y: auto;
    }
    #desktopLoginModal.active,
    #desktopLoginModal.flex {
        display: flex !important;
    }

    .app-container {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        padding-top: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        background-color: #020617 !important;
    }

    /* 데스크톱 스마트 상단 배너 */
    #desktopSmartBanner {
        z-index: 65 !important;
    }

    /* 데스크톱 전용 로그인 뷰 (완전한 100% 뷰포트 장악 및 스플릿 레이아웃) */
    #loginView {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
        background-color: #020617 !important;
    }
    #loginView.view-hidden {
        display: none !important;
    }

    .login-desktop-hero {
        display: flex !important;
        width: 58% !important;
        height: 100% !important;
        flex-shrink: 0 !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-right: 1px solid rgba(51, 65, 85, 0.8) !important;
        background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%) !important;
    }

    .login-desktop-form-pane {
        display: flex !important;
        width: 42% !important;
        height: 100% !important;
        flex-shrink: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        overflow-y: auto !important;
        background-color: #0b1120 !important;
        padding: 32px !important;
    }

    .login-desktop-card {
        width: 100% !important;
        max-width: 420px !important;
        background-color: #ffffff !important;
        border-radius: 24px !important;
        padding: 36px 32px !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
        border: 1px solid rgba(51, 65, 85, 0.3) !important;
    }

    #signupView {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100% !important;
        z-index: 60 !important;
        background-color: rgba(15, 23, 42, 0.75) !important;
        backdrop-filter: blur(10px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 24px !important;
        overflow-y: auto !important;
    }
    #signupView.view-hidden {
        display: none !important;
    }

    #signupView > .signup-modal-card {
        width: 100% !important;
        max-width: 620px !important;
        max-height: 90vh !important;
        background: #ffffff !important;
        border-radius: 28px !important;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45) !important;
        border: 1px solid rgba(226, 232, 240, 0.9) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        margin: auto !important;
    }

    /* 데스크톱 전용 메인 앱 뷰 */
    #mainAppView {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
        background-color: #f8fafc !important;
    }
    #mainAppView.view-hidden {
        display: none !important;
    }

    /* 데스크톱 LNB 사이드바 */
    .desktop-sidebar {
        display: flex !important;
        width: 250px;
        background-color: #0f172a;
        color: #94a3b8;
        flex-direction: column;
        flex-shrink: 0;
        height: 100vh;
        border-right: 1px solid #1e293b;
        z-index: 40;
    }

    /* 데스크톱 메인 워크스페이스 */
    .desktop-workspace {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    /* 하단 모바일 바텀 네비게이션 바 숨김 */
    .bottom-nav-bar {
        display: none !important;
    }

    /* 모바일 FAB 위치 조정 */
    .fab-wrapper {
        bottom: 28px !important;
        right: 36px !important;
    }

    /* 메인 스크롤 영역 와이드 확장 */
    main {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* 탭 컨텐츠 와이드 확장 */
    .tab-pane {
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
        padding: 24px 32px !important;
    }

    /* 데스크톱 모달: 바텀시트 대신 고급 중앙 팝업 */
    .modal-overlay {
        align-items: center !important;
        justify-content: center !important;
        background: rgba(15, 23, 42, 0.65) !important;
        backdrop-filter: blur(4px);
    }

    .modal-content {
        transform: scale(0.95) !important;
        border-radius: 24px !important;
        max-width: 580px !important;
        max-height: 85vh !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
        opacity: 0;
    }

    .modal-overlay.active .modal-content {
        transform: scale(1) !important;
        opacity: 1 !important;
    }

    .desktop-nav-btn.active {
        background-color: #1e293b !important;
        color: #38bdf8 !important;
        border-left: 3px solid #38bdf8 !important;
    }

    /* 데스크톱 요금제 & 멤버십 결제 센터 최적화 */
    #page-subscription.active {
        left: 250px !important;
        width: calc(100vw - 250px) !important;
        background-color: #f8fafc !important;
    }
    #page-subscription header {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
    #page-subscription .full-page-content {
        max-width: 1080px !important;
        margin: 0 auto !important;
        width: 100% !important;
        padding-top: 24px !important;
    }
    #subscriptionBottomPayBar {
        max-width: 1080px !important;
        margin: 0 auto !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
    }

    /* ==========================================================
       데스크톱 전용 물류 ERP 마스터-디테일 2-Pane & 고밀도 테이블
       ========================================================== */
    .feed-split-layout {
        display: flex !important;
        gap: 20px;
        align-items: flex-start;
        width: 100%;
    }

    .feed-main-pane {
        flex: 1 1 0% !important;
        min-width: 0 !important;
    }

    .feed-inspector-pane {
        display: block !important;
        width: 420px !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 16px !important;
        max-height: calc(100vh - 180px) !important;
        overflow-y: auto !important;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
        z-index: 15;
    }

    /* 반응형 2열 카드 그리드 */
    .feed-grid-layout {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
        gap: 16px !important;
    }

    /* 고밀도 스프레드시트 테이블 */
    .erp-table-container {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .erp-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
        text-align: left;
    }

    .erp-table thead th {
        background-color: #f8fafc;
        padding: 12px 14px;
        font-weight: 800;
        color: #475569;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
        font-size: 12px;
    }

    .erp-table tbody tr {
        border-bottom: 1px solid #f1f5f9;
        transition: background-color 0.15s ease;
        cursor: pointer;
    }

    .erp-table tbody tr:hover {
        background-color: #f8fafc;
    }

    .erp-table tbody tr.active-job-row {
        background-color: #eff6ff !important;
        border-left: 3px solid #2563eb;
    }

    .erp-table td {
        padding: 12px 14px;
        vertical-align: middle;
    }

    .desktop-only { display: flex !important; }
    .mobile-only { display: none !important; }
}

/* 모바일에서는 인스펙터 패널 숨김 */
.feed-inspector-pane {
    display: none;
}


