@charset "UTF-8";

/* =========================================
   FPA AI 플랫폼 - 화사하고 투명한 클린 테크 테마 CSS (v6)
   ========================================= */

:root {
    --bg-main: #F8FAFC;           /* 밝은 슬레이트 톤의 화사한 메인 배경 */
    --bg-card: #FFFFFF;           /* 순백색 카드 배경 */
    --text-primary: #1E293B;      /* 선명한 짙은 슬레이트 텍스트 */
    --text-muted: #64748B;        /* 부드러운 회색 설명 텍스트 */
    --border-color: #E2E8F0;      /* 연하고 깔끔한 구분선 */
    --accent: #2563EB;            /* 신뢰감을 주는 모던 블루 포인트 */
    --accent-glow: rgba(37, 99, 235, 0.12); /* 부드러운 블루 글로우 */
}

/* 기존 라이트 테마 변수 매핑 오버라이드 (기본값을 화사하게 고정) */
body.light-theme {
    --bg-main: #FFFFFF;
    --bg-card: #F8FAFC;
    --border-color: #E2E8F0;
}

body .custom-bg { background-color: var(--bg-main) !important; color: var(--text-primary); }
body .card, body .bg-white { 
    background-color: var(--bg-card) !important; 
    border-color: var(--border-color) !important;
}

/* 화사한 스크롤바 커스텀 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* 탭 전환 로직 (부드러운 블러 페이드인 애니메이션) */
.tab-content { display: none; animation: smoothFadeIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.tab-content.active { display: block; }
@keyframes smoothFadeIn { 
    from { opacity: 0; transform: translateY(12px); filter: blur(3px); } 
    to { opacity: 1; transform: translateY(0); filter: blur(0); } 
}

/* LNB 메뉴 활성화 상태 (소프트한 포인트 컬러 매핑) */
.nav-links li { border-left: 4px solid transparent; transition: all 0.2s ease; margin-bottom: 4px; }
.nav-links li:hover { background-color: #F1F5F9; color: #2563EB; transform: translateX(2px); }
.nav-links li.active {
    background-color: #EFF6FF;
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 800;
}

/* 모달(팝업) 강제 컨트롤 (애플 스타일 블러 오버레이) */
.modal-overlay {
    display: none !important;
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.4); /* 연한 블랙 반투명 */
    z-index: 99999;
    justify-content: center; align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem;
}
.modal-overlay.active { display: flex !important; animation: smoothFadeIn 0.25s ease; }

/* 챗봇 말풍선 (모던 메신저 스타일) */
.msg { padding: 13px 18px; border-radius: 18px; max-width: 82%; margin-bottom: 12px; word-break: break-word; font-weight: 500; line-height: 1.5; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.user-msg { 
    background: linear-gradient(135deg, #2563EB, #4F46E5); /* 블루 to 인디고 */
    color: white; 
    align-self: flex-end; 
    border-bottom-right-radius: 4px; 
    margin-left: auto; 
}
.ai-msg { 
    background: #FFFFFF; 
    border: 1px solid var(--border-color); 
    color: var(--text-primary); 
    align-self: flex-start; 
    border-bottom-left-radius: 4px; 
    margin-right: auto; 
}

/* 해시태그 크롬 (화사한 파스텔 톤) */
.hashtag {
    background: #EFF6FF; color: #2563EB;
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer;
    border: 1px solid #BFDBFE; transition: all 0.2s ease;
}
.hashtag:hover { background: #DBEAFE; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(37,99,235,0.1); }

/* 카드 그리드 매트릭스 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* 동적 생성되는 Grid Card (지식, 서류, 작가 리스트) */
.k-card {
    background: var(--bg-card); padding: 1.5rem; border-radius: 1.25rem;
    border: 1px solid var(--border-color); box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex; flex-direction: column; height: 100%;
}
.k-card:hover { transform: translateY(-5px); border-color: #93C5FD; box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1); }

.k-badge { 
    display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 20px; 
    background: #F1F5F9; color: #475569; font-size: 11px; font-weight: 800; margin-bottom: 0.75rem; border: 1px solid #E2E8F0;
}
.k-title { font-weight: 800; font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--text-primary); letter-spacing: -0.02em; }
.k-content { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; font-weight: 400; }

/* 상세보기 버튼을 항상 카드 맨 밑에 고정 */
.detail-btn { 
    margin-top: auto; width: 100%; padding: 10px; 
    background: #F8FAFC; border: 1px solid var(--border-color); border-radius: 10px; 
    color: #3B82F6; font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.2s; 
}
.detail-btn:hover { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }

/* FAQ 아이템 리스트 래퍼 */
.faq-item {
    background: #F8FAFC; padding: 14px 18px; border-radius: 12px;
    border: 1px solid #E2E8F0; cursor: pointer; transition: all 0.2s;
}
.faq-item:hover { background: #FFFFFF; border-color: #93C5FD; box-shadow: 0 4px 10px rgba(37,99,235,0.05); }
.faq-question { font-weight: 700; color: #1E293B; margin-bottom: 4px; }
.faq-reason { font-size: 12px; color: #64748B; font-weight: 500; }