/* ========================================= */
/* 1. CSS 변수 */
/* ========================================= */
/* 루트 변수 - 미니멀 & 클린 테마 */
:root {
    --background-gradiant: radial-gradient(ellipse at 30% 0%, #2a2a2a 0%, transparent 50%), radial-gradient(ellipse at 80% 100%, #1a1a1a 0%, transparent 50%), #dcdbdb;
    --primary-color: #000000;
    --primary-rgb: 0, 0, 0;
    --primary-light: #333333;
    --background-color: #ffffff;
    --surface-color: #f9fafb;
    --text-color: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --text-pale: #e5e5e5;

    --header-height: 90px;
    --border-radius: 8px;
    --transition: all 0.2s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    /* 상태별 색상 */
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffaa00;
    --danger-color: #dc3545;

    /* 모드별 색상 */
    --color-mentor: #1565c0;
    --color-mentor-bg: #e3f2fd;
    --color-doctor: #2e7d32;
    --color-doctor-bg: #e8f5e9;
    --color-audio: #7b1fa2;
    --color-audio-bg: #f3e5f5;
    --color-eval: #e65100;
    --color-eval-bg: #feeed5;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-break: keep-all;
}


/* ========================================= */
/* 2. 리셋 & 기본 스타일 */
/* ========================================= */
/* 기본 스타일 */
body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    letter-spacing: -0.01em;
}

u {
    text-underline-offset: 2px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

:is(a, button):hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ========================================= */
/* 3. Material Symbols 아이콘 */
/* ========================================= */
/* Material Symbols 아이콘 */
.material-symbols-outlined {
    --fs: 24px;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: var(--fs);
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    /* 아이콘 중앙 정렬 */
    align-items: center;
    justify-content: center;
    width: var(--fs);
    height: var(--fs);
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
    /* 로딩 중 레이아웃 시프트 방지 및 텍스트 숨김 */
    overflow: hidden;
    color: inherit;
    flex-shrink: 0;
}


/* ========================================= */
/* 4. 유틸리티 클래스 */
/* ========================================= */
/* 유틸리티 클래스 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 유틸리티 및 전역 스타일 */
sup {
    vertical-align: text-bottom;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* 배경색 */
.bg-dark {
    background-color: #1a1a1a !important;
}

.bg-light {
    background-color: var(--surface-color);
}

.bg-white {
    background-color: #ffffff;
}

/* 텍스트 색상 */
.text-white {
    color: #ffffff;
}

.text-primary {
    color: var(--primary-color);
}

.text-primary-light {
    color: var(--primary-light);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-danger {
    color: var(--danger-color);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color) !important;
}

.text-light {
    color: var(--text-light);
}

.text-pale {
    color: var(--text-pale);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* 보더 */
.border-primary {
    border: 1px solid var(--primary-color);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

/* 너비 (Width) */
.w-100 {
    width: 100%;
}

.w-50 {
    width: 50%;
}

.w-25 {
    width: 25%;
}

/* 간격 (Margin) */
.m-0 {
    margin: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 2rem !important;
}

.mt-6 {
    margin-top: 2.5rem !important;
}

.mt-7 {
    margin-top: 3rem !important;
}

.mt-8 {
    margin-top: 4rem !important;
}

.mt-9 {
    margin-top: 5rem !important;
}

.mt-10 {
    margin-top: 6rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 2rem !important;
}

.mb-6 {
    margin-bottom: 2.5rem !important;
}

.mb-7 {
    margin-bottom: 3rem !important;
}

.mb-8 {
    margin-bottom: 4rem !important;
}

.mb-9 {
    margin-bottom: 5rem !important;
}

.mb-10 {
    margin-bottom: 6rem !important;
}

.mr-0 {
    margin-right: 0 !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.mr-4 {
    margin-right: 1.5rem !important;
}

.mr-5 {
    margin-right: 2rem !important;
}

.mr-6 {
    margin-right: 2.5rem !important;
}

.mr-7 {
    margin-right: 3rem !important;
}

.mr-8 {
    margin-right: 4rem !important;
}

.mr-9 {
    margin-right: 5rem !important;
}

.mr-10 {
    margin-right: 6rem !important;
}

.ml-0 {
    margin-left: 0 !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}

.ml-4 {
    margin-left: 1.5rem !important;
}

.ml-5 {
    margin-left: 2rem !important;
}

.ml-6 {
    margin-left: 2.5rem !important;
}

.ml-7 {
    margin-left: 3rem !important;
}

.ml-8 {
    margin-left: 4rem !important;
}

.ml-9 {
    margin-left: 5rem !important;
}

.ml-10 {
    margin-left: 6rem !important;
}

/* 간격 (Padding) */
.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.p-5 {
    padding: 2rem !important;
}

.pt-5 {
    padding-top: 2rem !important;
}

.pt-6 {
    padding-top: 2.5rem !important;
}

.pt-7 {
    padding-top: 3rem !important;
}

.pt-8 {
    padding-top: 4rem !important;
}

.pt-9 {
    padding-top: 5rem !important;
}

.pt-10 {
    padding-top: 6rem !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-1 {
    padding-bottom: 0.25rem !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.pb-3 {
    padding-bottom: 1rem !important;
}

.pb-4 {
    padding-bottom: 1.5rem !important;
}

.pb-5 {
    padding-bottom: 2rem !important;
}

.pb-6 {
    padding-bottom: 2.5rem !important;
}

.pb-7 {
    padding-bottom: 3rem !important;
}

.pb-8 {
    padding-bottom: 4rem !important;
}

.pb-9 {
    padding-bottom: 5rem !important;
}

.pb-10 {
    padding-bottom: 6rem !important;
}

.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.py-6 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

.py-7 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.py-8 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.py-9 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.py-10 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.px-1 {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.px-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.px-5 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.px-6 {
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
}

.px-7 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.px-8 {
    padding-left: 4rem !important;
    padding-right: 4rem !important;
}

.px-9 {
    padding-left: 5rem !important;
    padding-right: 5rem !important;
}

.px-10 {
    padding-left: 6rem !important;
    padding-right: 6rem !important;
}

.pl-0 {
    padding-left: 0 !important;
}

.pl-1 {
    padding-left: 0.25rem !important;
}

.pl-2 {
    padding-left: 0.5rem !important;
}

.pl-3 {
    padding-left: 1rem !important;
}

.pl-4 {
    padding-left: 1.5rem !important;
}

.pl-5 {
    padding-left: 2rem !important;
}

.pl-6 {
    padding-left: 2.5rem !important;
}

.pl-7 {
    padding-left: 3rem !important;
}

.pl-8 {
    padding-left: 4rem !important;
}

.pl-9 {
    padding-left: 5rem !important;
}

.pl-10 {
    padding-left: 6rem !important;
}

/* 정렬 및 간격 */
.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.gap-0 {
    gap: 0;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.gap-5 {
    gap: 2rem;
}

.gap-6 {
    gap: 2.5rem;
}

.gap-7 {
    gap: 3rem;
}

.gap-8 {
    gap: 4rem;
}

.gap-9 {
    gap: 5rem;
}

.gap-10 {
    gap: 6rem;
}

.gap-y-1 {
    row-gap: 0.25rem;
}

.gap-y-2 {
    row-gap: 0.5rem;
}

.gap-y-3 {
    row-gap: 1rem;
}

.gap-y-4 {
    row-gap: 1.5rem;
}

.gap-y-5 {
    row-gap: 2rem;
}

.gap-y-6 {
    row-gap: 2.5rem;
}

.gap-y-7 {
    row-gap: 3rem;
}

.gap-y-8 {
    row-gap: 4rem;
}

.gap-y-9 {
    row-gap: 5rem;
}

.gap-y-10 {
    row-gap: 6rem;
}

/* 아이콘 사이즈 */
.icon-sm {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.icon-md {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

.icon-lg {
    font-size: 2rem;
    width: 2rem;
    height: 2rem;
}

.icon-xl {
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
}

/* 타이틀 및 폰트 */
.h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.h5 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.font-sm {
    font-size: 0.875rem;
}

.font-xs {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.pt-1 {
    padding-top: 0.5rem;
}

.pt-2 {
    padding-top: 1rem;
}

.pt-3 {
    padding-top: 1.5rem;
}

.pt-4 {
    padding-top: 2rem;
}

.pt-0 {
    padding-top: 0;
}


.border-top {
    border-top: 1px solid var(--border-color);
}


.bg-surface {
    background-color: var(--surface-color);
}

.max-w-xs {
    max-width: 320px;
}

.max-w-sm {
    max-width: 420px;
}

.max-w-md {
    max-width: 500px;
}

.max-w-lg {
    max-width: 600px;
}

.max-w-xl {
    max-width: 800px;
}

.max-w-xxl {
    max-width: 1000px;
}

/* ========================================= */
/* 5. 레이아웃 (사이드바, 헤더, 콘텐츠) */
/* ========================================= */
/* ## 레이아웃 & 네비게이션 */
/* 페이지 레이아웃 */
.page-layout {
    display: flex;
    min-height: 100dvh;
}

/* 사이드바 */
.page-sidebar {
    width: 260px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    text-decoration: none;
    cursor: default;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand-icon img {
    width: 50px;
    height: 50px;
}

.sidebar-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu-link:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.sidebar-menu-link.active {
    background-color: var(--text-color);
    color: #fff;
}

.sidebar-menu-link.active .sidebar-menu-icon {
    color: #fff;
}

.sidebar-menu-icon {
    font-size: 1.25rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: none;
    /* 로그인 기능 미구현 - 숨김 처리 */
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sidebar-version {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* 페이지 메인 영역 */
.page-main {
    flex: 1;
    min-width: 0;
    /* Flexbox 내부 콘텐츠 확장 방지 */
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.page-main.roleplaying {
    height: 100dvh;
}

.page-header {
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    z-index: 100;
}

.page-header-title-group {
    flex: 1;
}

.page-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.page-header-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0;
    font-weight: 400;
    line-height: 1.2;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-content {
    flex: 1;
    min-height: 0;
    min-width: 0;
    /* Flexbox 내부 콘텐츠 확장 방지 (스크롤바 생성 원인 해결) */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-height) + 2rem);
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
}

/* 모바일 사이드바 오버레이 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* 브레드크럼(경로) */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: var(--text-light);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-item:last-child .breadcrumb-link {
    color: var(--text-color);
    pointer-events: none;
}


/* ========================================= */
/* 6. UI 컴포넌트 */
/* ========================================= */
/* UI 컴포넌트 */
/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #333333;
    color: white;
}

.btn-secondary {
    background-color: #d2d7e0;
    color: var(--text-color);
    border: 1px solid transparent;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #b8bec9;
}

.btn-info {
    background-color: #e9f3ff;
    color: var(--info-color);
    border: 1px solid transparent;
}

.btn-info:hover:not(:disabled) {
    background-color: #e0efff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: var(--border-color);
}

.btn-outline:active:not(:disabled) {
    box-shadow: none;
}

.btn-outline-info {
    background-color: transparent;
    color: var(--info-color);
    border: 1px solid var(--info-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-info:hover:not(:disabled) {
    background-color: #e9f3ff;
    color: var(--info-color);
    border-color: var(--info-color);
}

.btn-outline-info:active:not(:disabled) {
    box-shadow: none;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #bd2130;
}

.btn-white {
    background-color: white;
    color: var(--text-color);
}

.btn-white:hover:not(:disabled) {
    background-color: #f9fafb;
}

/* 아이콘 전용 버튼 */
.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    flex-shrink: 0;
    gap: 0;
    aspect-ratio: 1/1;
}

.btn-icon.btn-sm {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.btn-icon.btn-lg {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
}

.btn-icon .material-symbols-outlined {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.btn-icon.btn-sm .material-symbols-outlined {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

.btn-icon.btn-lg .material-symbols-outlined {
    font-size: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
}

.rounded-full {
    border-radius: 50%;
}

.btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.875rem;
}

.btn-sm .material-symbols-outlined {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

.btn-xs {
    width: auto;
    height: auto;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.btn-xs .material-symbols-outlined {
    font-size: 0.875rem;
    width: 0.875rem;
    height: 0.875rem;
}

.btn-lg {
    width: auto;
    height: auto;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

/* 알럿(알림) */
.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: none;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.alert-description {
    font-size: 0.875rem;
    line-height: 1.5;
}

ul.alert-description {
    padding-left: 1rem;
}

/* 알럿 변형 */
.alert-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #004085;
}

.alert-info .alert-icon {
    color: #007bff;
}

.alert-success {
    background: linear-gradient(135deg, #f6fff9 0%, #ecfdf3 100%);
    color: #155724;
}

.alert-success .alert-icon {
    color: #28a745;
}

.alert-warning {
    background: linear-gradient(135deg, #fffcf0 0%, #fff9e6 100%);
    color: #856404;
}

.alert-warning .alert-icon {
    color: #ffc107;
}

.alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebeb 100%);
    color: #721c24;
}

.alert-danger .alert-icon {
    color: #dc3545;
}

/* 뱃지(Badge) */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 4px;
    white-space: nowrap;
    vertical-align: baseline;
    gap: 0.25rem;
}

.badge .material-symbols-outlined {
    font-size: 0.9rem;
    width: 0.9rem;
    height: 0.9rem;
}

.badge-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0.125rem;
    margin-right: -0.25rem;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    opacity: 0.6;
}

.badge-close:hover {
    opacity: 1;
}

.badge-primary .badge-close:hover,
.badge-dark .badge-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.badge-close .material-symbols-outlined {
    font-size: 0.875rem;
    width: 0.875rem;
    height: 0.875rem;
}

/* 뱃지 테마 */
.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--border-color);
    color: var(--text-secondary);
}

.badge-success {
    background-color: #d9f3e4;
    color: var(--success-color);
}

.badge-info {
    background-color: #e9f3ff;
    color: var(--info-color);
}

.badge-warning {
    background-color: #fff3c5;
    color: #856404;
}

.badge-danger {
    background-color: #ffe5e5;
    color: var(--danger-color);
}

/* 데이터 업로드 상태 뱃지 */
.badge-processed {
    background-color: #d9f3e4;
    color: var(--success-color);
}

.badge-processing {
    background-color: #e9f3ff;
    color: var(--info-color);
}

.badge-error {
    background-color: #ffe5e5;
    color: var(--danger-color);
}

.badge-hint {
    background-color: #fff;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
    padding: 0.15rem 0.4rem;
    margin-bottom: -0.1rem;
    margin-right: 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    vertical-align: text-bottom;
}

/* Mentor, Doctor 모드에서는 힌트 배지 숨김 처리 */
.chat-mode-mentor .chat-mr .badge-hint,
.chat-mode-doctor .chat-mr .badge-hint,
.studio-chat-area:has(.chat-mode-mentor) .chat-mr .badge-hint,
.studio-chat-area:has(.chat-mode-doctor) .chat-mr .badge-hint {
    display: none !important;
}

.badge-light {
    background-color: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-dark {
    background-color: var(--text-color);
    color: white;
}

.badge-white {
    background-color: #ffffff;
    color: var(--text-color);
}

/* 뱃지 변형 */
.badge-pill {
    border-radius: 9999px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid currentColor;
}

.badge-outline.badge-primary {
    color: var(--primary-color);
}

/* FAQ 카테고리 뱃지 (통일 규격) */
.badge-category-1 {
    /* Opening */
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.badge-category-2 {
    /* Call-to-Action */
    color: var(--secondary-color, #e67e22);
    /* 컴포넌트 환경 대응 컬러 */
    border-color: var(--secondary-color, #e67e22);
    background-color: transparent;
}

.badge-category-3 {
    /* 질환 정보, 제품 정보, 안전성, 처방 가이드, 기타 */
    color: var(--info-color);
    border-color: var(--info-color);
    background-color: transparent;
}


/* 뱃지 사이즈 */
.badge-sm {
    font-size: 0.7rem;
}

.badge-sm .material-symbols-outlined {
    font-size: 0.8rem;
    width: 0.8rem;
    height: 0.8rem;
}

.badge-lg {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.badge-lg .material-symbols-outlined {
    font-size: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
}

.badge-sm .badge-close {
    margin-right: -0.15rem;
}

.badge-sm .badge-close .material-symbols-outlined {
    font-size: 0.7rem;
    width: 0.7rem;
    height: 0.7rem;
}

.badge-lg .badge-close {
    margin-right: -0.3rem;
    margin-left: 0.25rem;
}

.badge-lg .badge-close .material-symbols-outlined {
    font-size: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
}


/* 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-lg {
    max-width: 1000px;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70dvh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 0.6s linear infinite;
}

/* 폼(양식) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.form-label-required::after {
    content: '*';
    color: #ef4444;
    margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-textarea {
    resize: none;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem !important;
}

/* 에러 상태 */
.form-input.is-valid:focus,
.form-select.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

:is(.form-input, .form-select, .form-textarea):disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: var(--text-light);
    opacity: 1;
}

.form-select.is-valid {
    border-color: #10b981;
}

.form-select.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* 입력 보조/에러 텍스트 */
.form-helper {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.form-helper.text-danger {
    color: var(--danger-color);
}

/* 입력창 그룹 (아이콘 포함) */
.form-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-group .form-input,
.form-input-group .form-input-custom {
    padding-right: 3rem;
    /* 우측 아이콘 공간 확보 */
}

.form-input-group .password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.form-input-group .password-toggle:hover {
    color: var(--text-color);
}

.form-input-group .password-toggle .material-symbols-outlined {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}


.form-file {
    display: block;
    width: 100%;
}

.form-file-input {
    display: none;
}

.form-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--surface-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.form-file-label:hover,
.form-file-label.drag-over {
    border-color: var(--text-color);
    background-color: #f3f4f6;
}

.form-input.is-valid,
.form-textarea.is-valid {
    border-color: #10b981;
}

.form-input.is-invalid,
.form-textarea.is-invalid {
    border-color: #ef4444;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-error {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ef4444;
}


/* 커스텀 체크박스 & 라디오 */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
}

.form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--text-color);
    cursor: pointer;
}

/* 체크박스 디자인 */
.checkbox-custom {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-check:hover .checkbox-custom {
    border-color: var(--primary-color);
}

.form-check-input:checked~.checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input:checked~.checkbox-custom:after {
    display: block;
}

/* 라디오 디자인 */
.radio-custom {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.form-check:hover .radio-custom {
    border-color: var(--primary-color);
}

.form-check-input:checked~.radio-custom {
    border-color: var(--primary-color);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
}

.form-check-input:checked~.radio-custom:after {
    display: block;
}

/* 비활성 상태 */
.form-check-input:disabled~.checkbox-custom,
.form-check-input:disabled~.radio-custom {
    background-color: var(--border-color);
    border-color: var(--border-color);
    cursor: not-allowed;
}

.form-check-input:disabled~.form-check-label {
    color: var(--secondary-color);
    cursor: not-allowed;
}

.form-check-input:checked:disabled~.checkbox-custom:after {
    border-color: var(--text-light);
}

/* 날짜 */
.form-date-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 카드 */
.card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    flex-shrink: 0;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.card-elevated {
    border: none;
    box-shadow: var(--shadow-md);
}

.card-hoverable {
    cursor: pointer;
}

.card-hoverable:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* 번호 카드 */
.number-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
}

.number-card-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
    flex-shrink: 0;
}

.number-card-content {
    flex: 1;
}

.number-card-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.number-card-text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 워터마크 번호 카드 */
.watermark-card {
    position: relative;
    padding: 1.5rem;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.watermark-card-number {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-color);
    opacity: 0.1;
    pointer-events: none;
    user-select: none;
}

.watermark-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
}

.watermark-card-text {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
}

.icon-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
}

.icon-card-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
}

.icon-card-icon .material-symbols-outlined {
    --fs: 2rem;
}

.icon-card-content {
    flex: 1;
}

.icon-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.icon-card-text {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    vertical-align: top;
    border-collapse: collapse;
    border-bottom: 1px solid var(--border-color);
    --no: 70px;
    --id: 100px;
    --score: 80px;
    --checkbox: 50px;
    --delete: 80px;
}

.table th,
.table td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: var(--surface-color);
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
    border-bottom: 0;
}

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

.table-sm th,
.table-sm td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

/* 의미적 테이블 컬럼 클래스 */
.table-no {
    width: var(--no);
    text-align: center;
}

.table-checkbox {
    width: var(--checkbox);
    text-align: center;
}

.table-id {
    width: var(--id);
    text-align: center;
}

.table-score {
    width: var(--score);
    text-align: center;
}

.table-item {
    min-width: 120px;
}

.table-action {
    width: var(--delete);
}

.table-delete {
    width: var(--delete);
}

.table tfoot tr td {
    border-bottom: none;
    padding-top: 0;
}



/* 슬라이드 상세 패널 (Drawer) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer-container.active {
    transform: translateX(0);
}

.drawer-container.is-expanded {
    width: 900px;
}

.drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background-color: #fff;
}

/* 프로그레스 바 공통 */
.progress {
    display: flex;
    height: 8px;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--text-color);
    transition: width 0.6s ease;
    border-radius: 4px;
}

.progress-sm {
    height: 4px;
}

.ai-analysis-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border-left: 4px solid var(--text-color);
}

/* 탭 */
.tabs-container {
    border-bottom: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

/* 탭 래퍼 (닫기 버튼 포함) */
.tab-inner {
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-inner.active,
.tab.active {
    border-bottom: 2px solid var(--text-color);
}

.tab-inner.active .tab {
    color: var(--text-color);
    font-weight: 600;
}

/* 수정 인디케이터 */
.tab-inner.is-modified::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 36px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--danger-color);
}

/* 기본 탭 스타일 */
.tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab:hover {
    color: var(--text-color);
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 페이지네이션 */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 2rem 0;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination-limit {
    width: auto;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.875rem;
    height: 2.25rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: flex;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.page-link[aria-label="Previous"],
.page-link[aria-label="Next"] {
    aspect-ratio: 1;
}

.page-link:hover:not(.disabled):not(.active) {
    background-color: #f3f4f6;
    border-color: var(--text-color);
}

.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    pointer-events: none;
}

.page-link.disabled {
    color: var(--text-light);
    border-color: #f3f4f6;
    background-color: #f9fafb;
    cursor: not-allowed;
    pointer-events: none;
}

.page-link .material-symbols-outlined {
    font-size: 1.25rem;
}

/* 토스트 알럿 */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    position: relative;
    min-width: 300px;
    max-width: 450px;
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    pointer-events: auto;
    overflow: hidden;
    animation: toast-slide-in 0.3s ease-out forwards;
    cursor: pointer;
}

.toast.hiding {
    animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    margin-right: 1rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 0.9375rem;
    color: var(--text-color);
    line-height: 1.4;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.3s linear;
}

/* 토스트 타입별 스타일 */
.toast-success {
    background: linear-gradient(135deg, #f6fff9 0%, #ecfdf3 100%);
}

.toast-success .toast-message {
    color: #155724;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-success .toast-progress {
    background-color: #28a745;
    opacity: 0.6;
}

.toast-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
}

.toast-info .toast-message {
    color: #004085;
}

.toast-info .toast-icon {
    color: #007bff;
}

.toast-info .toast-progress {
    background-color: #007bff;
    opacity: 0.6;
}

.toast-warning {
    background: linear-gradient(135deg, #fffcf0 0%, #fff9e6 100%);
}

.toast-warning .toast-message {
    color: #856404;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-warning .toast-progress {
    background-color: #ffc107;
    opacity: 0.6;
}

.toast-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebeb 100%);
}

.toast-danger .toast-message {
    color: #721c24;
}

.toast-danger .toast-icon {
    color: #dc3545;
}

.toast-danger .toast-progress {
    background-color: #dc3545;
    opacity: 0.6;
}

/* 오디오 플레이어 */
.audio-player {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.audio-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 99px;
    background: #f1f3f5;
    background-image: linear-gradient(to right, #2d3436 0%, #2d3436 30%, #f1f3f5 30%, #f1f3f5 100%);
    outline: none;
    cursor: pointer;
    margin-bottom: 0.75rem;
    transition: background-image 0.1s ease;
}

.audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.audio-progress::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.audio-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.btn-audio-seek {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-audio-seek:hover {
    color: var(--primary-color);
}

.btn-audio-seek .material-symbols-outlined {
    font-size: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
}

.btn-audio-play {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-audio-play:hover {
    background-color: #333333;
    transform: scale(1.05);
}

.btn-audio-play .material-symbols-outlined {
    font-size: 2.5rem;
}

.playback-speed {
    min-width: 48px;
    height: 32px;
    padding: 0 0.75rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: transparent;
}

.playback-speed:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* 플로팅 '위로가기' 버튼 */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--primary-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.back-to-top .material-symbols-outlined {
    font-size: 1.5rem;
}


#productFilter {
    min-width: 150px;
}

#scoreFilter {
    min-width: 120px;
}

#sortBy {
    min-width: 130px;
}

/* ========================================= */
/* 7. 페이지별 스타일 */
/* ========================================= */

/* ## 롤플레잉 스튜디오 */
/* 모드 선택 그리드 */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, auto));
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.mode-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mode-card-inner {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.mode-card-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.mode-card-icon .material-symbols-outlined {
    --fs: 2.5rem;
}

.mode-card-content {
    flex: 1;
}

.mode-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.mode-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mode-card-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--surface-color);
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    margin: 0;
}

.mode-card-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.mode-card-btn {
    align-self: flex-start;
}

/* 모드별 배지 컬러 */
.mode-card-badge.color-mentor {
    background-color: var(--color-mentor-bg);
    color: var(--color-mentor);
}

.mode-card-badge.color-doctor {
    background-color: var(--color-doctor-bg);
    color: var(--color-doctor);
}

.mode-card-badge.color-audio {
    background-color: var(--color-audio-bg);
    color: var(--color-audio);
}

.mode-card-badge.color-eval {
    background-color: var(--color-eval-bg);
    color: var(--color-eval);
}

/* 스튜디오 뷰 전환 */
.studio-view {
    display: none;
}

.studio-view.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.studio-view-header {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.studio-back-btn {
    margin-bottom: 1rem;
}

.studio-view-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.studio-view-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.studio-view-header p {
    margin: 0;
    font-size: 0.9rem;
}

/* 빈 상태 표시 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-light);
}

.empty-state .material-symbols-outlined {
    --fs: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ## 채팅 말풍선 */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    max-width: 100%;
}

.modal-body .chat-container {
    padding: 0;
}

/* 메시지 줄 */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    max-width: 80%;
}

/* 사용자 메시지는 오른쪽 정렬 */
.chat-message.chat-user {
    align-self: flex-end;
    align-items: flex-end;
}

/* 아바타 */
.chat-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background-color: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.chat-avatar .material-symbols-outlined {
    --fs: 1.25rem;
}

/* 말풍선 공통 래퍼 */
.chat-bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

/* AI 말풍선 래퍼 (이름 + 내용) */
.chat-content-wrap {
    display: flex;
    flex-direction: column;
}

/* 말풍선 */
.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.6;
    position: relative;
    max-width: 100%;
}

/* 시간 표시 */
.chat-time {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* AI 말풍선 */
.chat-ai .chat-bubble {
    background-color: var(--surface-color);
    border-top-left-radius: 4px;
}

/* 모드별 AI 말풍선 색상 */
.chat-mode-mentor .chat-ai .chat-avatar {
    background-color: var(--color-mentor-bg);
    color: var(--color-mentor);
}

.chat-mode-mentor .chat-ai .chat-bubble {
    background-color: var(--color-mentor-bg);
}

.chat-mode-doctor .chat-ai .chat-avatar {
    background-color: var(--color-doctor-bg);
    color: var(--color-doctor);
}

.chat-mode-doctor .chat-ai .chat-bubble {
    background-color: var(--color-doctor-bg);
}

.chat-mode-audio .chat-ai .chat-avatar {
    background-color: var(--color-audio-bg);
    color: var(--color-audio);
}

.chat-mode-audio .chat-ai .chat-bubble {
    background-color: var(--color-audio-bg);
}

.chat-mode-eval .chat-ai .chat-avatar {
    background-color: var(--color-eval-bg);
    color: var(--color-eval);
}

.chat-mode-eval .chat-ai .chat-bubble {
    background-color: var(--color-eval-bg);
}

/* 사용자 말풍선 */
.chat-user .chat-bubble {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

.chat-user .chat-bubble .chat-sender {
    color: var(--text-light);
}

/* AI MR (FAQ 이어듣기용, 우측 정렬) */
.chat-mr {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-mr .chat-avatar {
    border: 1px solid var(--border-color);
}

.chat-mr .chat-bubble {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

.chat-mr .chat-bubble-row {
    flex-direction: row-reverse;
}

.chat-mr .chat-sender {
    flex-direction: row-reverse;
}

/* 발신자 이름 */
.chat-sender {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.chat-sender-code {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
}

/* 메시지 텍스트 */
.chat-text {
    font-size: 1rem;
}

/* 시간 */
.chat-time {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}


/* 시스템 메시지 */
.chat-system {
    text-align: center;
    align-self: center;
}

.chat-system p {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: var(--surface-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin: 0;
}

.chat-system p .material-symbols-outlined {
    --fs: 1rem;
}

/* 타임스탬프 */
.chat-system-time {
    font-weight: 600;
    color: var(--text-light);
    margin-right: 0.25rem;
}

/* info */
.chat-system-info p {
    background-color: #e8f4fd;
    color: #1976d2;
}

/* warning */
.chat-system-warning p {
    background-color: #fff8e1;
    color: #e65100;
}

/* success */
.chat-system-success p {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* error */
.chat-system-error p {
    background-color: #ffeef0;
    color: #d32f2f;
}

/* 타이핑 인디케이터 */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.875rem 1.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-light);
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 채팅 입력바 */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50px;
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
}

.chat-input-bar:has(.chat-input:disabled) {
    background-color: var(--surface-color);
    color: var(--text-light);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input::placeholder {
    color: var(--text-light);
}

.chat-send-btn,
.chat-mic-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn {
    background-color: var(--text-light);
    color: #fff;
}

.studio-chat-area:has(.chat-mode-doctor)~:is(.chat-input-row, .chat-input-mobile) .chat-send-btn {
    background-color: var(--color-doctor-bg);
    color: var(--text-color);
}

.studio-chat-area:has(.chat-mode-mentor)~:is(.chat-input-row, .chat-input-mobile) .chat-send-btn {
    background-color: var(--color-mentor-bg);
    color: var(--text-color);
}

.chat-send-btn:hover {
    opacity: 0.85;
}

.chat-mic-btn {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
}

.chat-mic-btn:hover {
    background-color: var(--primary-light);
}

.chat-mic-btn.recording {
    background-color: var(--danger-color);
    color: #fff;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
}

.chat-mic-btn.recording .material-symbols-outlined {
    animation: recordPulse 1.5s ease-in-out infinite;
}

.chat-mic-btn.converting {
    background-color: var(--text-light);
    color: #fff;
    cursor: wait;
}

.chat-send-btn .material-symbols-outlined {
    --fs: 1.25rem;
}

.chat-mic-btn .material-symbols-outlined {
    --fs: 1.5rem
}

/* 비활성 상태 */
.chat-input-bar.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 녹음 버튼 */
.record-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

/* 실력 평가 모드: 3개 버튼 가로 배치 */
.record-wrap:has(.record-btn-side) {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    align-items: center;
}

/* 사이드 버튼 (Opening, Call to Action) */
.record-btn-side {
    width: 80px;
    height: 80px;
}

.record-btn-side .material-symbols-outlined {
    --fs: 1.5rem;
}

.record-btn-side.active,
.record-btn.active {
    transform: scale(1.05);
}

.record-btn {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.record-btn:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.record-btn:disabled,
.record-btn-side:disabled {
    background-color: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.record-btn:disabled .record-btn-ring,
.record-btn-side:disabled .record-btn-ring {
    border-color: var(--border-color);
    opacity: 0.1;
}

.record-btn:disabled .record-btn-text,
.record-btn-side:disabled .record-btn-text {
    color: var(--text-light);
}

.record-btn .material-symbols-outlined {
    --fs: 2rem;
    position: relative;
    z-index: 1;
}

.record-btn-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    opacity: 0.05;
}

.record-btn-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.4;
    padding: 0 10px;
}

/* 녹음 중 상태 */
.record-btn.recording {
    background-color: var(--danger-color);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
}

.record-btn.recording .record-btn-ring {
    border-color: var(--danger-color);
    animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* 변환 중 상태 */
.record-btn.converting {
    background-color: var(--text-secondary);
    pointer-events: none;
}

.record-btn.converting .record-btn-ring {
    border-color: var(--text-secondary);
    opacity: 0.2;
    animation: recordPulse 1.5s ease-in-out infinite;
}

/* 도전 목표 설정 라디오 버튼 그룹 */
.goal-radio-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    margin: 1rem 0;
}

.goal-radio-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-color);
}

.goal-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--danger-color, #e74c3c);
    cursor: pointer;
}


/* AI Suggestion 힌트 */
.chat-suggestion {
    width: 100%;
}

.chat-suggestion-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    min-height: 50px;
    padding: 0.625rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.chat-suggestion-btn:hover {
    background-color: var(--border-color);
}

.chat-suggestion-btn .material-symbols-outlined {
    --fs: 1.25rem;
}

/* 로딩 상태 */
.chat-suggestion-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.suggestion-spin {
    animation: spin 1s linear infinite;
    --fs: 1.25rem;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* 힌트 결과 */
.chat-suggestion-result {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    overflow: hidden;
}

.chat-suggestion-guide {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.chat-suggestion-guide .material-symbols-outlined {
    --fs: 1.25rem;
    color: var(--warning-color);
}

.chat-suggestion-textarea {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    border-bottom: 1px solid var(--border-color);
}

/* 답변 근거 자료 */
.chat-suggestion-sources {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-suggestion-sources-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.chat-suggestion-sources-label .material-symbols-outlined {
    --fs: 1.25rem;
}

.chat-suggestion-sources-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-suggestion-sources-list li {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    background-color: var(--surface-color);
    border-radius: 6px;
}

/* 근거 자료 파일명 */
.source-filename {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.source-filename:hover {
    text-decoration: underline;
}

.source-filename .material-symbols-outlined {
    --fs: 1.125rem;
    color: var(--text-light);
}

/* 근거 텍스트 인용 */
.source-quote {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-color);
}

/* 파일명 + 버튼 한 줄 배치 */
.source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* 원문 문맥 확인 모달 */
.source-view-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.source-view-filename {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.source-view-filename .material-symbols-outlined {
    --fs: 1.125rem;
    color: var(--text-light);
}

/* 검색창 */
.source-view-search {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.source-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
}

.source-search-input-wrap .material-symbols-outlined {
    --fs: 1rem;
    color: var(--text-light);
}

.source-search-input {
    border: none;
    outline: none;
    font-size: 1rem;
    width: 120px;
    font-family: inherit;
    background: transparent;
}

.source-search-count {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

.source-search-nav {
    display: flex;
    gap: 0.125rem;
}

/* 모달 본문 */
.source-view-body {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow: hidden;
    padding: 0;
}

/* 근거 문구 섹션 */
.source-evidence-section {
    flex-shrink: 0;
    padding: 1rem 1.25rem 2rem;
}

/* 원문 맥락 섹션 */
.source-context-section {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.source-context-card {
    flex-grow: 1;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-y: auto;
    font-size: 0.9rem;
}

/* 커스텀 스크롤바 */
.source-context-card::-webkit-scrollbar {
    width: 6px;
}

.source-context-card::-webkit-scrollbar-track {
    background: transparent;
}

.source-context-card::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.source-context-card::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.section-label-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
}

.section-label .material-symbols-outlined {
    --fs: 1.125rem
}

.source-evidence-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 500;
}

.source-view-content {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* 검색어 하이라이트 */
.source-highlight {
    background-color: #fef08a;
    /* 조금 더 선명한 노란색 */
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
    box-shadow: 0 0 0 1px rgba(161, 98, 7, 0.2);
}

.source-highlight-active {
    background-color: #ffc107;
    outline: 2px solid #e6a800;
    border-radius: 2px;
}

/* 원문 내 근거 문구 하이라이트 */
.evidence-highlight {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 0;
    font-weight: 600;
}

/* 액션 버튼 */
.chat-suggestion-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

/* 레퍼런스(출처) 블록 */
.chat-reference {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.2;
}

.chat-reference-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.chat-reference-label .material-symbols-outlined {
    --fs: 0.875rem;
}

.chat-reference-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.chat-reference-list li a {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-reference-list li a:hover {
    text-decoration: underline;
}

/* 평가 피드백 말풍선 */
.chat-feedback .chat-text {
    font-size: 1rem;
}

.chat-score {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.chat-score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.chat-score-value small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
}

.chat-feedback-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.chat-feedback-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.chat-feedback-list li .material-symbols-outlined {
    --fs: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.feedback-good .material-symbols-outlined {
    color: var(--success-color);
}

.feedback-improve .material-symbols-outlined {
    color: var(--info-color);
}

/* ## 채팅 상태바 */
.chat-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.chat-status-bar .material-symbols-outlined {
    --fs: 0.875rem;
}

.chat-status-bar.status-recording {
    background-color: #fff5f5;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.chat-status-bar.status-converting {
    background-color: #fff8e1;
    border-color: var(--warning-color);
    color: #e65100;
}

.chat-status-bar.status-responding {
    background-color: var(--color-mentor-bg);
    border-color: var(--color-mentor);
    color: var(--color-mentor);
}

/* 뷰 바디 레이아웃 */
.studio-view-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

/* 채팅 영역 */
.studio-chat-area {
    flex: 1;
    min-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
}

/* 좌우 분할 입력 레이아웃 */
.chat-input-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 1.5rem;
}

.chat-input-row .record-wrap {
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
}

.chat-input-row .chat-input-bar {
    height: 120px;
    border-radius: var(--border-radius);
    align-items: flex-end;
}

.chat-input-row .chat-input {
    align-self: stretch;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.chat-input-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 오디오 컨트롤 영역 (FAQ 이어듣기) */
.audio-control-panel {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.audio-control-panel .btn {
    min-width: 140px;
}

/* 실력 평가 종료 버튼 래퍼 */
.chat-input-row:has(.eval-submit-wrap) {
    flex-direction: column;
    align-items: center;
}

.eval-submit-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.eval-submit-wrap .btn {
    min-width: 200px;
}

/* 모바일 실력 평가 녹음 버튼 그룹 */
.eval-mobile-record-group {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.eval-mobile-record-group .chat-mic-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 70px;
    height: 70px;
    padding: 0.5rem;
}

.chat-mic-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.2;
}

/* 모바일 전용 입력바 (데스크톱에서 숨김) */
.chat-input-mobile {
    display: none;
}

.chat-input-mobile .chat-input-bar {
    align-items: flex-end;
    border-radius: var(--border-radius);
}

.chat-input-mobile .chat-input {
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

#view-eval .chat-input-mobile {
    flex-direction: column;
}

/* 키보드 단축키 안내 */
.chat-shortcut-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.chat-shortcut-info kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: inherit;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--border-color);
}

/* ## 평가 시스템 안내 */
/* 요약 테이블 링크 */
.summary-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    padding: 0.5rem;
}

.summary-link:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* 요약 테이블 */
.summary-table {
    text-align: center;
}

.summary-table .table-item {
    width: 40%;
}

.summary-table .table-description {
    width: calc(100% - var(--score));
}

/* 상세 평가 테이블 */
.criteria-table {
    text-align: center;
}

.criteria-table .table-item {
    width: 30%;
}

.criteria-table .table-description {
    width: calc(100% - var(--score) - var(--no));
}


/* 피드백 셀 구조 */
.eval-feedback-cell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.eval-ai {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    margin: 0;
    line-height: 1.6;
}

.eval-ai .material-symbols-outlined {
    --fs: 1rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--warning-color)
}

.eval-feedback-section {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.eval-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.eval-label .material-symbols-outlined {
    --fs: 1rem;
}

.eval-feedback-section p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.eval-quote {
    padding-left: 0.75rem;
    border-left: 3px solid var(--border-color);
    color: var(--text-primary) !important;
    font-style: italic;
}

/* Q/A 인라인 대화 */
.eval-qa {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.eval-qa-item {
    display: flex;
    gap: 0.375rem;
}

.eval-qa-label {
    font-weight: 700;
    flex-shrink: 0;
    color: var(--text-primary);
}


.eval-feedback-cell .alert {
    margin-bottom: 0;
}

.eval-feedback-cell .alert .alert-icon {
    display: none;
}

.eval-feedback-cell .alert .alert-title {
    font-size: 0.9rem;
}

/* 내 평가 이력 고도화 스타일 */
/* 점수대별 색상 */
.score-low {
    background-color: #F5B1D3 !important;
    color: #000 !important;
}

.badge-evaluating {
    background-color: #eee !important;
    color: var(--secondary-color) !important;
}

.score-mid {
    background-color: #feedaa !important;
    color: #000 !important;
}

.score-high {
    background-color: #AAE1FF !important;
    color: #000 !important;
}

/* 검색 및 필터 바 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    align-items: flex-end;
    overflow: hidden;
}

.filter-bar-header {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
}

.filter-bar-title {
    font-weight: 600;
    flex: 1;
}

.filter-bar-header .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-bar.is-expanded .toggle-icon {
    transform: rotate(180deg);
}

.filter-bar-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: flex-end;
}

.filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    flex-shrink: 0;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.filter-group select {
    min-width: 120px;
}

#productFilter {
    min-width: 150px;
}

#scoreFilter {
    min-width: 120px;
}

#sortBy {
    min-width: 130px;
}

.search-group-toggle {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.search-group-toggle:hover {
    color: var(--primary-color);
}

.search-toggle-text {
    font-weight: 500;
}

.toggle-icon {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.search-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 필터 바 모바일 최적화 (아코디언) - 우선순위 확보를 위해 하단 배치 */
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.25rem;
}

.search-input-wrapper .form-input[type="text"] {
    padding-left: 2.5rem;
}

/* ========================================= */
/* 평가 결과 Drawer - 종합 카드 */
/* ========================================= */
.summary-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.summary-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.summary-user-info {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.summary-user-product {
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.summary-meta-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.summary-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-meta-item .material-symbols-outlined {
    --fs: 1rem;
}

.summary-card-top {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.summary-card-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex-shrink: 0;
}

.summary-card-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.summary-score-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.summary-score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.summary-score-total {
    font-size: 1.25rem;
    color: var(--text-light);
}

.summary-ai {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.5;
}

.summary-ai .material-symbols-outlined {
    --fs: 1.1rem;
    color: var(--warning-color);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.summary-area-list {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background-color: #f5f5f5;
    border-radius: 0.75rem;
}

.summary-area-item {
    padding-right: 1rem;
    font-size: 1rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.25rem;
    border-right: 1px solid var(--border-color);
}

.summary-area-item:last-child {
    border-right: none;
    padding-right: 0;
}

.summary-area-item b {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.summary-area-item small {
    font-weight: 400;
    color: var(--text-light);
}

/* ========================================= */
/* 평가 결과 Drawer - 카테고리 그룹 */
/* ========================================= */
.evaluation-group {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.evaluation-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.evaluation-category-title .material-symbols-outlined {
    --fs: 1.25rem;
}

.evaluation-group .table {
    margin-bottom: 0;
    border-bottom: none;
}

.evaluation-group .table th,
.evaluation-group .table td {
    border-bottom: 1px solid var(--border-color);
}

.evaluation-group .table tbody tr:last-child th,
.evaluation-group .table tbody tr:last-child td {
    border-bottom: none;
}

/* 데이터 테이블 고도화 */
.history-table th {
    white-space: nowrap;
    background-color: #f8f9fa;
}

.history-table td {
    vertical-align: middle;
}

.history-table tr.selected {
    background-color: #f0f7ff;
}

.history-table .ai-comment-cell {
    max-width: 300px;
    min-width: 200px;
    line-height: 1.5;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.history-table .table-checkbox {
    width: 40px;
}

.history-table .table-checkbox .form-check {
    justify-content: center;
    padding: 0;
}

/* 이력 조회 툴바 */
.history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.history-toolbar-left,
.history-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-toolbar-right .form-group {
    margin-bottom: 0;
}

/* 검색 입력 래퍼 */
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 0.75rem;
    background-color: var(--background-color);
}

.search-input-wrap .material-symbols-outlined {
    --fs: 1.25rem;
    color: var(--text-light);
}

.search-input-wrap .form-input {
    border: none;
    padding-left: 0;
    background: transparent;
    min-width: 200px;
}

.search-input-wrap .form-input:focus {
    box-shadow: none;
}


/* 상세 평가 결과 전용 스타일 */
.evaluation-item {
    margin-bottom: 1.25rem;
}

.evaluation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.evaluation-item-label {
    color: var(--text-color);
    font-weight: 500;
}

.evaluation-item-score {
    font-weight: 700;
}

.script-content {
    font-size: 1rem;
    color: var(--text-secondary);
}


/* 일괄 작업 바 */
.selection-toolbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background-color: #333;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 900;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.selection-toolbar.active {
    transform: translateX(-50%) translateY(0);
}

.selection-count {
    font-weight: 600;
}

/* 평가 기준 설정 */
.product-tabs-header {
    gap: 1rem;
}

.product-tabs-header .tabs {
    overflow-x: auto;
    border-bottom: none;
}

.categories-container {
    width: 100%;
}

.categories-container .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.categories-container .table {
    min-width: 768px;
}

.categories-container .categories-score-input {
    width: 100px;
}

/* 평가 기준 설정 페이지 */
.category-section {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: white;
}

.category-section:last-of-type {
    margin-bottom: 0;
}

.category-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background-color: white;
}

.category-header:hover {
    background-color: var(--surface-color);
}

.category-items {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.category-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.category-score-input {
    text-align: center;
    font-weight: 600;
}

.item-score-input {
    text-align: center;
}

.item-name-input {
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.item-name-input:hover,
.item-name-input:focus {
    border-color: var(--border-color);
}

.item-description-input {
    min-height: 60px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.item-description-input:hover,
.item-description-input:focus {
    border-color: var(--border-color);
}

.category-name-input {
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s ease;
    padding: 0.5rem;
}

.category-name-input:hover,
.category-name-input:focus {
    border-color: var(--border-color);
}

.category-description-input {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-height: 40px;
    transition: border-color 0.2s ease;
    padding: 0.5rem;
}

.category-description-input:hover,
.category-description-input:focus {
    border-color: var(--border-color);
}


/* ## demo */
.sample-files-grid {
    display: grid;
    /* 데스크탑에서 5열 유지 */
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* 대화 로그 분석 테이블 */
.speaker {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.speaker .material-symbols-outlined {
    --fs: 1.3rem;
    color: var(--text-secondary);
}


/* ===========================
   FAQ 카드 컴포넌트
   =========================== */

/* 카테고리 필터 래퍼 (Sticky 고정 및 하단 그라디언트 효과) */
.faq-filter-wrap {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    background-color: #fff;
    z-index: 10;
    padding: 0 0 1rem;
    margin-bottom: 1rem;
    min-width: 0;
    /* Flexbox 내부 가로 스크롤 이슈 방지 */
}

/* 하단 그라디언트 페이드 인아웃 */
.faq-filter-wrap::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: linear-gradient(to bottom, #ffffff, #ffffff00);
    pointer-events: none;
}

.faq-filter-wrap::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 0;
    width: 100%;
    height: 2rem;
    background: #ffffff;
    pointer-events: none;
}

/* 카테고리 필터 (좌우 스크롤) */
.faq-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    /* 스크롤바 숨기기 */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.faq-filter::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.faq-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.faq-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.faq-filter-count {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.7;
}

.faq-filter-btn.active .faq-filter-count {
    opacity: 1;
}

/* FAQ 카드 리스트 */
.faq-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* FAQ 카드 */
.faq-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 카드 헤더 */
.faq-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.faq-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-card-id {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.faq-card-actions {
    display: flex;
    gap: 0.25rem;
}

/* 카드 본문 */
.faq-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-card-question {
    display: flex;
    gap: 0.375rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.faq-card-answer {
    display: flex;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 카드 푸터 */
.faq-card-footer {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.625rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.faq-card-footer:hover {
    color: var(--primary-color);
}

.faq-card-footer .material-symbols-outlined {
    --fs: 1rem;
    color: var(--text-muted);
}


/* --- 데이터 업로드 현황 대시보드 --- */
.upload-status-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.upload-status-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.upload-status-card .status-header {
    display: flex;
    /* align-items: f; */
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.upload-status-card .status-icon {
    font-size: 1.25rem;
}

.upload-status-card .status-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-color);
}

/* 상태별 테마 색상 (선택적 사용) */
.upload-status-card.theme-total .status-icon {
    color: var(--primary-color);
}

.upload-status-card.theme-processed .status-icon {
    color: var(--success-color);
}

.upload-status-card.theme-processing .status-icon {
    color: var(--info-color);
}

.upload-status-card.theme-error .status-icon {
    color: var(--danger-color);
}


/* 파일 업로드 영역 스타일 */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2.5rem 1rem;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.file-upload-zone .upload-icon {
    --fs: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-upload-zone .upload-text {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.file-upload-zone .upload-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hidden-input {
    display: none;
}

/* 선택된 파일 목록 스타일 */
.selected-files-list {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--white);
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.selected-file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.file-info .file-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info .file-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ========================================= */
/* 8. 반응형 (미디어쿼리) */
/* ========================================= */
/* 태블릿/모바일 대응 */
@media (max-width: 1200px) {
    .sample-files-grid {
        /* 너비에 따라 자동으로 채우되 최소 180px 보장 */
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 960px and below */
@media (max-width: 960px) {
    .drawer-container.is-expanded {
        width: 100%;
    }
}

/* 1024px and below — 사이드바 숨김 (태블릿/좁은 데스크탑) */
@media (max-width: 1024px) {
    .page-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .page-sidebar.mobile-open {
        transform: translateX(0);
    }

    .page-main {
        margin-left: 0;
    }

    .mobile-sidebar-toggle {
        display: flex;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-color);
        cursor: pointer;
        padding: 0.5rem;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* 768px and below (Mobile Standard) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Layout & Sidebar */
    .page-header {
        padding: 1rem;
        justify-content: center;
        gap: 0.5rem;
    }

    .page-content {
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }

    /* Content & Components */
    header h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .dashboard-welcome h2 {
        font-size: 1.5rem;
    }

    .stats-card-value {
        font-size: 1.5rem;
    }

    /* Tables */
    .table th,
    .table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.85rem;
    }

    .table th {
        font-size: 0.8rem;
    }

    /* Filter Bar (Accordion) */
    .filter-bar {
        padding: 0;
    }

    .filter-bar-header {
        width: 100%;
        display: flex;
    }

    .filter-bar-content {
        display: none;
        padding: 0 1.25rem 1.25rem;
        flex-direction: column;
    }

    .filter-bar.is-expanded .filter-bar-content {
        display: flex;
    }

    .filter-bar.is-expanded .filter-bar-content .filter-groups {
        flex-direction: column;
        width: 100%;
    }

    .search-input-wrapper,
    .filter-group,
    .filter-group .form-select {
        width: 100%;
    }

    /* 평가 기준 설정 페이지 반응형 */
    .categories-container .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .categories-container .card-header h3 {
        width: 100%;
    }

    .categories-container .card-header .flex.items-center.gap-3 {
        width: 100%;
        justify-content: space-between;
        align-items: flex-end;
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
    }

    .categories-container .categories-score-input {
        width: 100%;
    }

    .hide-mobile {
        display: none !important;
    }

    .mode-card-inner {
        padding: 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end
    }

    .mode-card-icon {
        width: 40px;
    }

    .mode-card-content {
        flex: auto;
        width: calc(100% - 40px - 1rem);
    }

    .mode-card-title-row {
        margin-bottom: 0;
    }

    /* 지식백과 모드 반응형 */
    .chat-input-row {
        display: none;
    }

    .chat-input-mobile {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .chat-input-mobile .chat-input-bar {
        flex: 1;
    }

    /* FAQ 페이지 모바일 반응형 */
    .faq-filter-wrap {
        padding: 0;
        margin-bottom: 0.5rem;
    }

    .faq-list-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .faq-list-title {
        flex-wrap: wrap;
    }

    .faq-list-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .faq-update-text {
        font-size: 0.75rem;
    }

    .search-group-container {
        display: block;
    }

    .search-group-toggle {
        display: flex !important;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .card:has(.search-group) {
        display: none;
    }

    .card:has(.search-group.open) {
        display: block;
    }

    .search-group.open+.search-group-toggle {
        margin-top: 1rem;
    }

    .search-group {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .search-group.open {
        display: flex;
    }

    .upload-status-dashboard {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .upload-status-card {
        padding: 1rem 0.5rem;
        align-items: flex-start;
    }

    .upload-status-card .status-header {
        gap: 0.25rem;
        font-size: 0.7rem;
        text-align: left;
    }

    .upload-status-card .status-icon {
        font-size: 1.1rem;
    }

    .upload-status-card .status-value {
        font-size: 1.25rem;
        text-align: left;
    }

    .summary-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* 600px and below */
@media (max-width: 600px) {
    .drawer-container {
        width: 100%;
        transform: translateX(100%);
    }
}

/* 500px and below */
@media (max-width: 500px) {

    .page-header-title {
        font-size: 1.25rem;
    }

    .tab {
        padding: 0.5rem;
    }

    .audio-controls {
        gap: 1rem;
    }

    .btn-audio-play {
        --w: 3rem;
        width: var(--w);
        height: var(--w);
    }

    .chat-container {
        padding: 1rem;
    }

    .chat-message {
        max-width: 100%;
    }

    .chat-text {
        font-size: 0.9rem;
    }

    .upload-status-dashboard {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }

    .upload-status-card {
        padding: 0.5rem 0.75rem;
        align-items: center;
        gap: 0;

    }

    .upload-status-card .status-header {
        font-size: 0.65rem;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .upload-status-card .status-icon {
        --fs: 1rem
    }

    .upload-status-card .status-value {
        font-size: 1.1rem;
        text-align: left;
    }
}