@charset "UTF-8";

/* ---------- CSS Variables & Theme (TOSS UI Style Enhanced) ---------- */
:root {
    /* Color Palette */
    --bg-main: #f2f4f6;
    --surface-default: #ffffff;
    --surface-hover: #f9fafb;
    --surface-glass: rgba(255, 255, 255, 0.75);
    
    --primary-blue: #3182f6;
    --primary-blue-hover: #1b64da;
    --primary-blue-light: #e8f3ff;
    
    --text-primary: #333d4b;
    --text-secondary: #8b95a1;
    --text-tertiary: #b0b8c1;
    --text-inverse: #ffffff;
    
    --border-color: #e5e8eb;
    
    /* Semantic Colors */
    --color-success: #00c853;
    --color-success-bg: #e5f9eb;
    --color-warning: #ff9800;
    --color-warning-bg: #fff4e5;
    --color-danger: #f44336;
    --color-danger-bg: #ffebee;
    
    /* Log Terminal Theme */
    --log-bg: #1c2128;
    --log-text: #adbac7;
    --log-system: #539bf5;
    --log-error: #f47067;
    --log-success: #57ab5a;
    --log-border: #444c56;

    /* Metrics & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows - Toss Style Soft Drop Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-blue: 0 10px 25px rgba(49, 130, 246, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Dark Theme ---------- */
body.theme-dark {
    --bg-main: #121212;
    --surface-default: #1e1e1e;
    --surface-hover: #2c2c2c;
    --surface-glass: rgba(30, 30, 30, 0.85);
    
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --text-tertiary: #666666;
    --text-inverse: #121212;
    
    --border-color: #333333;
    
    --primary-blue: #3b82f6;
    --primary-blue-hover: #60a5fa;
    --primary-blue-light: rgba(59, 130, 246, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---------- Light Gold Theme ---------- */
body.theme-light-gold {
    --bg-main: #faf8f5;
    --surface-default: #ffffff;
    --surface-hover: #f5f1e8;
    --surface-glass: rgba(255, 255, 255, 0.85);
    
    --text-primary: #4a4036;
    --text-secondary: #8c7e6b;
    --text-tertiary: #c4baac;
    --text-inverse: #ffffff;
    
    --border-color: #e8dfd5;
    
    --primary-blue: #d4af37;
    --primary-blue-hover: #c59b27;
    --primary-blue-light: #fbf5e6;
    
    --shadow-sm: 0 2px 8px rgba(212, 175, 55, 0.05);
    --shadow-md: 0 8px 24px rgba(212, 175, 55, 0.08), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 12px 32px rgba(212, 175, 55, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-blue: 0 10px 25px rgba(212, 175, 55, 0.3);
}

/* ---------- Global Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.015em;
    overflow: hidden; 
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cdd3d9;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ---------- Login View ---------- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    z-index: 1000;
    position: absolute;
    top: 0; left: 0;
}
.login-card {
    background: var(--surface-default);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(229, 232, 235, 0.3);
}
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}
.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

/* ---------- Layout Structure ---------- */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh; /* Fallback for older browsers */
    height: 100dvh; /* 최신 모바일 브라우저 동적 툴바 대응 */
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 260px;
    background-color: var(--surface-default);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-normal);
    box-shadow: 2px 0 12px rgba(0,0,0,0.02);
}

.logo-area {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary-blue);
    background: var(--primary-blue-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.nav-menu {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: transform var(--transition-fast);
}

.nav-item:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 700;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-default);
}

.ai-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-success);
    background-color: var(--color-success-bg);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px rgba(0,200,83,0.1);
}

.ai-status i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 8px rgba(0,200,83,0.4); }
    100% { transform: scale(1); opacity: 0.8; }
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ---------- Topbar (Glassmorphism) ---------- */
.topbar {
    height: 72px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(229, 232, 235, 0.5);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    background: transparent;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 24px;
    background: transparent;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.user-profile:hover {
    background-color: var(--surface-hover);
    border-color: var(--border-color);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--surface-default);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 8px;
    min-width: 140px;
    z-index: 100;
}
.profile-dropdown button {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-dropdown button:hover {
    background: var(--surface-hover);
    color: var(--color-danger);
}

/* ---------- Dashboard Content Area ---------- */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.4s ease-out;
}

/* 내부 카드들이 높이 압축에 의해 찌그러지거나 잘리는 현상 방지 */
.dashboard-content > * {
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stats Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Action Header */
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.header-text {
    max-width: 65%;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-inverse);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-blue);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(49, 130, 246, 0.3);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(49, 130, 246, 0.2);
}

.btn-primary:disabled {
    background-color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Cards */
.card {
    background: var(--surface-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(229, 232, 235, 0.3);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* ---------- Table Styling ---------- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

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

.client-table th {
    background-color: var(--surface-default);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.client-table th::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 1px;
    background-color: var(--border-color);
}

.client-table tbody tr {
    transition: all var(--transition-fast);
    background-color: var(--surface-default);
    cursor: pointer;
}

.client-table tbody tr:hover {
    background-color: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 1;
    position: relative;
}

.client-table tbody tr:last-child td {
    border-bottom: none;
}

.client-table td {
    color: var(--text-secondary);
    font-size: 15px;
    vertical-align: middle;
}

.client-table td strong {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
}

/* View Toggle Styles */
.view-toggle-group .icon-btn.active {
    background: var(--surface-default);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* Global List View (Force single line) */
.global-view-list .client-table {
    min-width: max-content;
}
.global-view-list .client-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}
.global-view-list .client-table td:first-child,
.global-view-list .client-table td:last-child {
    overflow: visible;
    max-width: none;
}

/* Global Card View (Apply mobile layout to desktop) */
.global-view-card .client-table thead { display: none; }
.global-view-card .client-table, 
.global-view-card .client-table tbody, 
.global-view-card .client-table tr, 
.global-view-card .client-table td { display: block; width: 100%; }

.global-view-card .client-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    background: var(--surface-default);
    padding: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: auto;
}
.global-view-card .client-table tr:last-child { margin-bottom: 0; }

.global-view-card .client-table td {
    padding: 12px 16px;
    border-bottom: 1px dashed var(--border-color);
    text-align: left;
    word-break: break-all;
    white-space: normal;
    max-width: none;
    overflow: visible;
}
.global-view-card .client-table td:last-child { border-bottom: none; }

.global-view-card .client-table td:first-child {
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

/* Badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--text-primary), #1a1f26);
    color: var(--text-inverse);
    font-weight: 800;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.status-pending {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.status-generated {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    border: 1px solid rgba(49, 130, 246, 0.2);
}

.status-sent {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(0, 200, 83, 0.2);
}

/* System Settings & Tabs */
.settings-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
}
.settings-tabs::-webkit-scrollbar {
    height: 4px;
}
.tab-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}
.tab-content.active {
    display: block;
}
.menu-setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--surface-hover);
}
.menu-setting-item input[type="text"] {
    flex: 1;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--text-tertiary);
    transition: .4s;
    border-radius: 22px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--primary-blue); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* System Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.setting-card {
    background: var(--surface-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    border: 1px solid var(--border-color);
}
.setting-card h3 {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--text-primary);
}
.setting-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.setting-tag {
    background: var(--surface-hover);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
}
.setting-tag i {
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}
.setting-tag i:hover {
    color: var(--color-danger);
}
.add-tag-group {
    display: flex;
    gap: 8px;
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

/* ---------- Log Terminal Card ---------- */
.log-status-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--log-border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--surface-default);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    color: var(--text-primary);
    font-size: 18px;
    background: var(--surface-hover);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    background: var(--surface-hover);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.status-dot[style*="background-color: rgb(0, 200, 83)"],
.status-dot[style*="background-color: #00c853"] {
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.6);
}

.log-terminal {
    background-color: var(--log-bg);
    padding: 24px;
    height: 280px;
    overflow-y: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.7;
}

.log-terminal::-webkit-scrollbar {
    width: 8px;
}
.log-terminal::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.log-terminal::-webkit-scrollbar-thumb {
    background: #444c56;
    border-radius: 4px;
}
.log-terminal::-webkit-scrollbar-thumb:hover {
    background: #768390;
}

.log-entry {
    margin-bottom: 8px;
    word-break: break-all;
    color: var(--log-text);
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-entry .time {
    color: #768390;
    margin-right: 12px;
    user-select: none;
}

.log-entry.system { color: var(--log-system); }
.log-entry.error { color: var(--log-error); }
.log-entry.success { color: var(--log-success); }

/* ---------- Modals & Forms ---------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 400px;
    background: var(--surface-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 210;
    display: none;
    opacity: 0;
    flex-direction: column;
    transition: all var(--transition-fast);
}

.modal.active, .modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { font-size: 20px; color: var(--text-tertiary); }
.modal-close:hover { color: var(--text-primary); }

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Help Content Area Styling ---------- */
#help-content-area h4 { color: var(--primary-blue); margin-bottom: 12px; margin-top: 20px; font-size: 15px; }
#help-content-area h4:first-child { margin-top: 0; }
#help-content-area ul { padding-left: 20px; margin-bottom: 16px; }
#help-content-area li { margin-bottom: 8px; color: var(--text-secondary); }
#help-content-area li strong { color: var(--text-primary); font-weight: 700; background: var(--surface-hover); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border-color); font-size: 13px; }

/* ---------- News Mix Content Styling ---------- */
#news-mix-content-area h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}
#news-mix-content-area h3 {
    font-size: 17px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--primary-blue);
}
#news-mix-content-area h4 {
    font-size: 15px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
#news-mix-content-area p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}
#news-mix-content-area ul {
    margin-bottom: 16px;
    padding-left: 20px;
    color: var(--text-secondary);
}
#news-mix-content-area li {
    margin-bottom: 6px;
}
#news-mix-content-area hr {
    border: 0;
    border-top: 1px dashed var(--border-color);
    margin: 24px 0;
}
#news-mix-content-area a {
    color: var(--primary-blue);
    text-decoration: underline;
    word-break: break-all;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-control {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition-fast);
}
.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--surface-hover);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.btn-secondary {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-default);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--surface-hover); }

/* Date Filter Buttons */
.btn-date-filter {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    background: var(--surface-default);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-date-filter:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn-date-filter.active {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

/* Pagination Styling */
.pagination-container { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-top: 1px solid var(--border-color); background: var(--surface-default); }
.page-size-selector { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.page-size-selector select { padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); outline: none; font-size: 13px; cursor: pointer; }
.pagination-controls { display: flex; gap: 4px; }
.page-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--surface-default); color: var(--text-secondary); font-size: 13px; transition: all var(--transition-fast); }
.page-btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--text-primary); }
.page-btn.active { background: var(--primary-blue); color: var(--text-inverse); border-color: var(--primary-blue); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 1200px) {
    .dashboard-content { padding: 32px; }
}

@media (max-width: 1024px) {
    .sidebar { 
        width: 88px; 
        align-items: center;
    }
    .logo-area {
        padding: 0;
        justify-content: center;
    }
    .logo-text { display: none; }
    
    .nav-menu { padding: 24px 12px; }
    .nav-item { 
        justify-content: center; 
        padding: 16px; 
        border-radius: 16px;
    }
    .nav-item span { display: none; }
    .nav-item i { font-size: 22px; width: auto; }
    
    .sidebar-footer { padding: 20px 12px; }
    .ai-status span { display: none; }
    .ai-status { padding: 12px; border-radius: 50%; }
}

@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        height: 70px;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        z-index: 100;
    }
    
    .logo-area { width: 70px; height: 100%; }
    
    .nav-menu {
        flex-direction: row;
        padding: 0 16px;
        align-items: center;
        justify-content: space-around;
        gap: 0;
        overflow-y: visible;
        overflow-x: auto;
    }
    
    .sidebar-footer { display: none; }
    
    .topbar { padding: 0 20px; height: 60px; }
    .page-title h1 { font-size: 18px; }
    .user-name { display: none; }
    
    .dashboard-content { padding: 20px; padding-bottom: 80px; gap: 24px; } /* 모바일 하단 툴바 가림 방지 여백 추가 */
    
    .action-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 16px; 
    }
    .header-text { max-width: 100%; }
    
    .settings-grid, .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-primary { 
        width: 100%; 
        justify-content: center; 
        padding: 16px;
    }
    
    .card { border-radius: 16px; }
    
    /* 모바일 리스트 뷰 환경 최적화 (카드 뷰는 상단의 global-view-card 클래스가 일괄 제어) */
    .global-view-list .client-table th,
    .global-view-list .client-table td {
        padding: 12px 10px; /* 모바일 리스트형에서 여백을 줄여 한눈에 더 많은 데이터가 보이게 조정 */
        font-size: 14px;
    }

    .card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .status-indicator { width: 100%; justify-content: center; }
    
    /* 모달 & 페이지네이션 모바일 최적화 */
    .modal { width: 90% !important; max-width: 400px; }
    .modal-body { display: flex !important; flex-direction: column !important; }
    #modal-news-mix { width: 95% !important; max-width: none !important; }
    #news-mix-content-area { padding: 16px !important; font-size: 14px; }
    
    .pagination-container {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
}
```