/* ========================================
   Design System - CSS Variables
   ======================================== */
:root {
    /* Colors - Clean Light Theme */
    --color-primary: hsl(250, 90%, 60%);
    --color-primary-light: hsl(250, 90%, 75%);
    --color-primary-dark: hsl(250, 90%, 50%);

    --color-success: hsl(142, 70%, 45%);
    --color-warning: hsl(45, 90%, 45%);
    --color-danger: hsl(4, 85%, 55%);
    --color-info: hsl(199, 85%, 50%);

    --color-bg: hsl(0, 0%, 100%);
    --color-bg-secondary: hsl(220, 20%, 98%);
    --color-bg-tertiary: hsl(220, 20%, 96%);
    --color-surface: hsl(0, 0%, 100%);
    --color-surface-hover: hsl(220, 20%, 94%);

    --color-text: hsl(220, 25%, 12%);
    --color-text-secondary: hsl(220, 15%, 35%);
    --color-text-tertiary: hsl(220, 10%, 55%);

    --color-border: hsl(220, 20%, 88%);
    --color-border-light: hsl(220, 20%, 94%);

    /* Shadows - Softer for light theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-props: border-color 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s, transform 0.2s;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Global Styles
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg-secondary);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* ========================================
   Header
   ======================================== */
.header {
    background: white;
    /* border-bottom: 1px solid #e5e7eb; */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    width: 100%;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px var(--color-primary));
}

.header-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    transition: var(--transition-props);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    border-color: var(--color-success);
}

.stat-card.clickable:hover::before {
    background: var(--color-success);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.5rem;
    /* 글씨 키움 */
    font-weight: 800;
    /* 더 굵게 */
    color: var(--color-primary);
    margin-top: var(--spacing-xs);
    line-height: 1.2;
}

.stat-success {
    color: var(--color-success);
    background: linear-gradient(135deg, var(--color-success) 0%, hsl(142, 70%, 35%) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-primary {
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========================================
   Controls
   ======================================== */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.controls-left,
.controls-right {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-props);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-sans);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.btn-success {
    background: linear-gradient(135deg, hsl(142, 76%, 46%) 0%, hsl(142, 76%, 56%) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, hsl(142, 76%, 56%) 0%, hsl(142, 76%, 66%) 100%);
}

.btn-danger {
    background: linear-gradient(135deg, hsl(4, 90%, 48%) 0%, hsl(4, 90%, 58%) 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, hsl(4, 90%, 58%) 0%, hsl(4, 90%, 68%) 100%);
}

.btn-warning {
    background: linear-gradient(135deg, hsl(35, 90%, 50%) 0%, hsl(35, 90%, 60%) 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, hsl(45, 90%, 55%) 0%, hsl(45, 90%, 65%) 100%);
}

#clearFiltersBtn {
    padding: 0.5rem 1rem;
    /* Matched to Survey Admin exactly */
    background: #f9fafb;
    /* Light Gray-Blue from Survey Admin */
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    /* Refined roundness */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    /* Matched to Survey Admin exactly */
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: 100%;
}

#clearFiltersBtn:hover {
    background: #f3f4f6;
    /* Darker hover background */
    border-color: #9ca3af;
    color: #111827;
    /* Darker hover text */
}

.btn-small {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 1.125rem;
}

/* ========================================
   Filters
   ======================================== */
.filters {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Removed animation to prevent flickering/jumping during refresh */
}

/* Removed slideDown animation to prevent layout jumping on load */

.filter-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item-compact {
    display: flex;
    flex-direction: column;
}

.filter-item-compact:nth-child(1),
/* 채널 */
.filter-item-compact:nth-child(2),
/* 상태 */
.filter-item-compact:nth-child(3)

/* 광고여부 */
    {
    width: 90px;
}

.filter-item-compact:nth-child(4)

/* 진료과목 */
    {
    width: 140px;
}

.filter-item-compact:nth-child(5),
/* 광역시/도 */
.filter-item-compact:nth-child(6)

/* 시/군/구 */
    {
    width: 110px;
}

.filter-item-compact label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.filter-item-compact select,
.filter-item-compact button {
    width: 100%;
}

.filter-item-date {
    display: flex;
    flex-direction: column;
    width: 280px;
    /* Firm width to prevent overlap */
    flex-shrink: 0;
}

.filter-item-date label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.date-range {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.date-range input[type="date"] {
    width: 130px;
    /* Specific width for date inputs */
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    transition: var(--transition-props);
}

.date-range input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 90%, 65%, 0.1);
}

.date-separator {
    color: var(--color-text-secondary);
    font-weight: 600;
}

.filter-item-search {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.filter-item-search label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.filter-item-search input[type="text"] {
    width: 100%;
}

.filter-item-compact select,
.filter-item-search input[type="text"] {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    transition: var(--transition-props);
}

.filter-item-compact select:focus,
.filter-item-search input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 90%, 65%, 0.1);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    width: 95px;
    /* Reduced by 5% from 100px base to expand search bar */
    flex-shrink: 0;
}

.filter-actions label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: transparent;
    margin-bottom: var(--spacing-xs);
}

/* Department Multi-select Dropdown */
.custom-multiselect {
    position: relative;
    width: 100%;
    font-family: var(--font-sans);
}

.multiselect-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-props);
    min-height: 48px;
    /* form-group select와 동일한 최소 높이 */
    box-sizing: border-box;
    width: 100%;
}

.multiselect-trigger:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
}

.multiselect-trigger.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 90%, 65%, 0.1);
}

#deptSelectedText {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.multiselect-trigger.has-value #deptSelectedText {
    color: var(--color-text);
    font-weight: 500;
}

/* 화살표: 네이티브 select의 화살표와 동일한 스타일 */
.multiselect-trigger .arrow {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 4px;
    /* 네이티브 select 화살표와 유사하게 */
    opacity: 0.7;
}

.multiselect-trigger.active .arrow {
    transform: rotate(180deg);
}

.multiselect-content {
    display: none;
    position: absolute;
    top: calc(100% + var(--spacing-xs));
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    animation: fadeIn var(--transition-fast);
}

.multiselect-content.visible {
    display: block;
}

.department-checkboxes {
    display: grid;
    grid-template-columns: 1fr;
    /* 드롭다운 내부에선 1열로 표시 */
    gap: 0;
    padding: var(--spacing-sm) 0;
    max-height: 250px;
    overflow-y: auto;
}

.dept-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.9375rem;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--spacing-md) var(--spacing-lg);
    transition: var(--transition-props);
}

.dept-checkbox:hover {
    background: var(--color-surface);
}

.dept-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.dept-checkbox.custom-dept {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border-light);
    margin-top: var(--spacing-sm);
}

.dept-checkbox.custom-dept>div {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.dept-checkbox.custom-dept input[type="text"] {
    width: 100%;
    margin-top: var(--spacing-xs);
    background: var(--color-bg);
}

/* ========================================
   커스텀 Single-Select (채널, 지역, 응답상태, 광고진행)
   진료과목 multiselect와 동일한 디자인
   ======================================== */
.custom-select-wrap {
    position: relative;
    width: 100%;
    font-family: var(--font-sans);
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-props);
    min-height: 48px;
    box-sizing: border-box;
    width: 100%;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
}

.custom-select-trigger.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 90%, 65%, 0.1);
}

.custom-select-trigger .custom-select-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    flex: 1;
}

.custom-select-trigger.has-value .custom-select-text {
    color: var(--color-text);
    font-weight: 500;
}

.custom-select-trigger .arrow {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 4px;
    opacity: 0.7;
}

.custom-select-trigger.active .arrow {
    transform: rotate(180deg);
}

/* 드롭다운 목록 - 진료과목 multiselect-content와 동일 */
.custom-select-content {
    display: none;
    position: fixed;
    /* fixed로 모달 위에 표시 */
    max-height: 260px;
    overflow-y: auto;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    animation: fadeIn var(--transition-fast);
}

.custom-select-content.visible {
    display: block;
}

/* 각 선택 항목 - 진료과목 dept-checkbox와 동일한 느낌 */
.custom-select-item {
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--spacing-md) var(--spacing-lg);
    transition: var(--transition-props);
}

.custom-select-item:hover {
    background: var(--color-surface);
}

.custom-select-item.selected {
    background: hsla(250, 90%, 65%, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.custom-select-item.selected::before {
    content: '✓';
    margin-right: 8px;
    font-size: 0.8rem;
    color: var(--color-primary);
}

/* ========================================
   Table
   ======================================== */
.table-container {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: none;
}

.no-data {
    padding: 1rem !important;
    color: #9ca3af !important;
    font-size: 0.875rem !important;
    text-align: left !important;
    border-bottom: none !important;
    background: white;
}

/* Bulk Actions Bar Styles */
.selected-actions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    /* Removed animation to prevent sudden jump when appearing */
}

.selected-actions.hidden {
    display: none;
}

.selected-count {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.selected-action-btns {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    margin-left: 0.5rem;
}

.bulk-select {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: none;
    background: white;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-props);
    min-width: 160px;
}

.bulk-select:hover {
    background: #f9fafb;
}

.btn-bulk-delete {
    padding: 0.625rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-props);
    backdrop-filter: blur(4px);
    margin-left: auto;
}

.btn-bulk-delete:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.btn-view {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-props);
}

.btn-view:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    transition: var(--transition-props);
    background: rgba(255, 255, 255, 0.1);
}

.data-table th:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sort-icon {
    opacity: 0.5;
    margin-left: 5px;
    transition: opacity var(--transition-fast);
    color: rgba(255, 255, 255, 0.7);
}

.data-table th:hover .sort-icon {
    opacity: 1;
    color: white;
}

.data-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
    transform: none;
    box-shadow: none;
}

.data-table td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #374151;
    vertical-align: middle;
}

/* Key information in dark gray as requested */
.data-table td:nth-child(2),
/* 발송일 */
.data-table td:nth-child(3),
/* 채널 */
.data-table td:nth-child(4),
/* 지역 */
.data-table td:nth-child(5),
/* 진료과목 */
.data-table td:nth-child(7),
/* 원장명 */
.data-table td:nth-child(8)

/* 광고여부 */
    {
    color: #404040;
    font-weight: inherit;
}

/* Hospital Name in specific dark black */
.data-table td:nth-child(6) {
    color: #0D0D0D !important;
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    table-layout: fixed;
    width: 100%;
    min-width: 900px; /* 이 이하로 좁아지면 x스크롤 발동 */
}

/* 각 컬럼 너비 (합계 100%) */
.data-table th:nth-child(1)  { width: 3%; }   /* 체크박스 */
.data-table th:nth-child(2)  { width: 8%; }   /* 발송일 */
.data-table th:nth-child(3)  { width: 7%; }   /* 채널 */
.data-table th:nth-child(4)  { width: 9%; }   /* 지역 */
.data-table th:nth-child(5)  { width: 9%; }   /* 진료과목 */
.data-table th:nth-child(6)  { width: 12%; }  /* 병원명 */
.data-table th:nth-child(7)  { width: 7%; }   /* 원장명 */
.data-table th:nth-child(8)  { width: 7%; }   /* 광고여부 */
.data-table th:nth-child(9)  { width: 8%; }   /* 상태 */
.data-table th:nth-child(10) { width: 18%; }  /* 비고 */
.data-table th:nth-child(11) { width: 12%; }  /* 수정/삭제 */

/* 진료과목, 병원명만 적용 */
.data-table td:nth-child(5),
.data-table td:nth-child(6) {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/*
.data-table td:nth-child(6) .cell-inner {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
*/
/*
.data-table .cell-inner {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: var(--spacing-md);
}
*/

/* Status Badges from Survey Admin */
.status-select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background-color: white;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-미응답 {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.status-응답 {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

.status-거절 {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.status-badge.status-거절 {
    background-color: #fef2f2;
    color: #ef4444;
}

.status-badge.status-계약완료 {
    background-color: #f0fdf4;
    color: #16a34a;
}

.status-상담대기 {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.status-상담완료 {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

.status-계약완료 {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

.note-email {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.8125rem;
    /* Increased by 1pt */
    margin-bottom: 2px;
    word-break: break-all;
    text-decoration: none;
}

.note-link {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.6875rem;
    /* Kept at 0.6875rem */
    margin-bottom: 2px;
    word-break: break-all;
    text-decoration: none;
}

.note-email:hover,
.note-link:hover {
    text-decoration: underline;
}

.note-email.clickable-email {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.note-email.clickable-email:hover {
    text-decoration: underline;
    color: var(--color-primary-dark);
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 24px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Edit Modal Link Button - Matched to Survey Admin .btn-link-visit */
.btn-link-open {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-props);
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    box-shadow: none;
    /* Remove shadow from previous attempt */
}

.btn-link-open:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* Remove SVG styles as we are switching back to emoji or if SVG is kept it needs to be sized */
.btn-link-open svg {
    display: none;
    /* Hide SVG if we switch back to emoji */
}

/* Notes Styling */
/* Modal Scroll Fix */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Notes Styling */
#notes {
    min-height: 80px;
    /* Reduced to default size */
    /* Remove max-height to allow infinite expansion */
    overflow-y: hidden;
    /* Hide internal scrollbar */
    resize: none;
    /* Remove resize handle (folded corner) */
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    /* Round box */
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

#notes:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.note-memo-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px;
    align-items: center;
    /* Center vertically for single line */
    justify-content: flex-start !important;
    text-align: left !important;
    max-width: 100%;
}

.note-link {
    font-weight: 700;
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
    font-size: 0.875rem;
    margin-bottom: 2px;
    display: block;
    cursor: pointer;
    text-align: left;
}

.note-link:hover {
    color: #1d4ed8;
}

.note-memo {
    font-size: 0.875rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    flex: 0 1 auto;
    /* Allow shrinking but don't force grow to fill space */
    min-width: 0;
    /* Crucial for flex truncation */
    text-align: left;
}

/* When expanded, allow wrapping */
.note-memo.expanded {
    white-space: pre-wrap;
    word-break: break-all;
}

/* If expanded, align button to top */
.note-memo.expanded~.note-more-btn,
.note-memo-container:has(.expanded) {
    align-items: flex-start;
}

.note-more-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #4b5563;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 6px;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 4px;
    /* Space on left now */
    margin-right: 0;
}

.note-more-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Force specific column to be left aligned */
.data-table td:nth-child(10) {
    max-width: 300px;
    overflow: hidden;
    text-align: left !important;
    /* Force left align */
    vertical-align: middle;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Output Admin Status Colors - Bordered Design */
.status-미응답 {
    background-color: #f9fafb !important;
    color: #4b5563 !important;
    border: 1px solid #d1d5db !important;
}

.status-응답 {
    background-color: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1px solid #86efac !important;
}

.status-관심 {
    background-color: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #7dd3fc !important;
}

.status-거절 {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
}

.status-계약완료 {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #93c5fd !important;
}

/* Dropdown specific styling */
.status-select {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-props);
    outline: none;
    text-align: center;
}

/* Action buttons in table */
.action-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-props);
    font-size: 1.125rem;
}

.action-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

.action-btn.delete:hover {
    color: var(--color-danger);
}

/* Empty state */
.empty-state {
    display: none;
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    color: var(--color-text-tertiary);
}

.empty-state.visible {
    display: block;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal.visible {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-slow);

    /* Scroll fix: Flex container with hidden overflow */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    /* Removing padding from wrapper */
}

/* Scrollbar styles moved to .modal-form */

.modal-large {
    max-width: 1000px;
}

.modal-small {
    max-width: 450px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--transition-props);
}

.modal-close:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-form {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;

    /* Custom Scrollbar for Form */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.modal-form::-webkit-scrollbar {
    width: 6px;
}

.modal-form::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 5px;
    margin-bottom: 5px;
}

.modal-form::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 10px;
}

.modal-form::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.required {
    color: var(--color-danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    transition: var(--transition-props);
}

/* 모달 폼의 select: 진료과목 드롭다운과 동일한 커스텀 디자인 */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpolygon points='0,0 10,0 5,7' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 34px;
    cursor: pointer;
    min-height: 48px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(250, 90%, 65%, 0.1);
}

.form-group-full {
    grid-column: 1 / -1;
}

/* 비고란 더보기 관련 스타일 */
.note-memo-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.note-memo {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Added standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-props);
}

.note-memo.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    /* Added standard property */
    display: block;
}

.note-more-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    /* 회색으로 변경 */
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: fit-content;
    text-decoration: underline;
    transition: var(--transition-props);
}

.note-more-btn:hover {
    color: var(--color-text);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label span {
    font-size: 0.9375rem;
    color: var(--color-text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

#submitBtn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-props);
    font-size: 1rem;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

#submitBtn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 8px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* ========================================
   Stats Modal
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.stats-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.stats-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text);
}

.stats-numbers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
}

.period-selector {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.period-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-props);
}

.period-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.period-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.period-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

.stats-summary-container {
    grid-column: span 2;
}

.stats-card.unified-stats {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 0;
    /* 그리드 갭이 있으므로 하단 마진 제거 */
}

.stats-numbers-unified {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    align-items: center;
}

.stat-item-main {
    display: flex;
    flex-direction: row;
    /* 가로 배열로 변경하여 숫자와 단위가 자연스럽게 이어지도록 함 */
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: var(--spacing-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-props);
    flex-wrap: wrap;
    /* 좁아지면 줄바꿈 허용 */
}

.stat-item-main .stat-label-tiny {
    width: 100%;
    /* 라벨은 위쪽 전체 차지 */
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.stat-item-main.highlight-box {
    background: linear-gradient(135deg, hsla(250, 90%, 65%, 0.1) 0%, hsla(142, 70%, 45%, 0.1) 100%);
    border: 1px solid var(--color-primary-light);
    grid-column: span 1;
}

.stat-item-main:hover {
    background: var(--color-bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-num-large {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}

.stat-num-xl {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
}

.stat-unit {
    font-size: 1.125rem;
    /* 단위 크기 상향 */
    font-weight: 700;
    color: var(--color-text-secondary);
}

/* .stats-chart removal */

/* 채널별 응답률 (수평형 그래프 디자인 - v17) */
.stats-channels-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    grid-column: span 2;
}

.channel-stats-flex {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
    max-width: 900px;
    margin: 0 auto;
}

.channel-h-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    transition: var(--transition-props);
    box-shadow: var(--shadow-sm);
}

.channel-h-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.h-graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.h-channel-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text);
}

.h-rate-value {

    font-size: 1.125rem;
    font-weight: 800;
}

.h-graph-track {
    width: 100%;
    height: 14px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.h-graph-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.h-graph-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.h-divider {
    color: #cbd5e1;
    font-weight: 300;
}

.h-responded {
    color: var(--color-primary);
}

/* 채널별 고유 컬러 (가로형) */
.channel-sangdam .h-graph-fill {
    background: linear-gradient(90deg, #818cf8, #4f46e5);
}

.channel-sangdam .h-rate-value {
    color: #4f46e5;
}

.channel-sangdam .h-responded {
    color: #4f46e5;
}

.channel-email .h-graph-fill {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.channel-email .h-rate-value {
    color: #059669;
}

.channel-email .h-responded {
    color: #059669;
}

.channel-resume .h-graph-fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.channel-resume .h-rate-value {
    color: #d97706;
}

.channel-resume .h-responded {
    color: #d97706;
}

/* Fallback for default channel */
.channel-default .h-graph-fill {
    background: var(--color-primary);
}

.channel-default .h-rate-value {
    color: var(--color-primary);
}

.channel-default .h-responded {
    color: var(--color-primary);
}

.no-data-msg {
    padding: 2rem;
    color: var(--color-text-secondary);
    font-style: italic;
    width: 100%;
    text-align: center;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary-container {
        grid-column: span 1;
    }
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: var(--color-bg);
}

.stats-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.stats-table td {
    padding: var(--spacing-md);
    font-size: 0.9375rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border-light);
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-surface-hover);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .controls {
        flex-direction: column;
    }

    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: center;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: var(--spacing-md);
    }

    .stats-numbers {
        grid-template-columns: 1fr;
    }

    .period-selector {
        flex-wrap: wrap;
    }

    .chart-bars {
        height: 150px;
    }
}

/* ========================================
   Compact Stats Card (Header)
   ======================================== */
.stat-card-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 54px;
    min-width: 140px;
    flex-shrink: 0;
    transition: var(--transition-props);
    text-decoration: none;
    color: inherit;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-compact.clickable {
    cursor: pointer;
}

.stat-card-compact .stat-icon {
    font-size: 24px;
}

.stat-card-compact .stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.stat-card-compact .stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    line-height: 1.2;
}

.stat-card-compact .stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.stat-card-compact .stat-value.highlight {
    font-size: 22px;
    color: #ef4444;
}

.stat-card-compact .stat-value.highlight-blue {
    font-size: 22px;
    color: #2563eb;
}

/* ========================================
   Font Size Adjustments (User Request)
   ======================================== */
.filter-row label,
.filter-item label,
.filter-item-compact label,
.filter-item-search label,
.filter-item-date label,
.filter-actions label {
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: var(--color-text-secondary) !important;
}

.filter-item-compact select,
.filter-item-search input[type='text'],
.date-range input[type='date'] {
    font-size: 0.8125rem !important;
    height: 38px !important;
}

/* 필터 영역의 multiselect 트리거도 38px 높이로 */
.filter-item-compact .multiselect-trigger {
    font-size: 0.8125rem !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 var(--spacing-md) !important;
}

#clearFiltersBtn:hover {
    background-color: #ecf3fa !important;
    border-color: #c9d6e4 !important;
    color: #1e3a8a !important;
}