/* =============================================
   관리자 대시보드 스타일 (모던 디자인)
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   로그인 페이지
   ============================================= */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.4s ease-out;
}

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

.login-box h1 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-color);
}

/* 로그인 페이지 전용 input 스타일 */
#login-form .form-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: #ffffff;
    color: var(--text-color);
    font-weight: 400;
    line-height: 1.5;
}

#login-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #ffffff;
    transform: translateY(-1px);
}

#login-form .form-input:hover:not(:focus) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

#login-form .form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 0.8;
}

#login-form .form-input:focus::placeholder {
    color: #cbd5e1;
    opacity: 0.6;
}

/* 로그인 input 에러 상태 */
#login-form .form-input.error {
    border-color: var(--error-color);
    background: #fef2f2;
}

#login-form .form-input.error:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

/* 로그인 input 성공 상태 */
#login-form .form-input.success {
    border-color: var(--success-color);
}

#login-form .form-input.success:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* 일반 form input 스타일 */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-color);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--border-hover);
}

.form-textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    resize: vertical;
    line-height: 1.5;
}

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

/* =============================================
   버튼 스타일
   ============================================= */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.error-message {
    color: var(--error-color);
    margin-top: 12px;
    font-size: 13px;
    display: none;
    padding: 12px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
}

.error-message.show {
    display: block;
}

/* =============================================
   관리자 페이지 레이아웃
   ============================================= */

.admin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background: var(--bg-secondary);
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.admin-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* =============================================
   사이드바
   ============================================= */

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 12px;
}

/* 메뉴 그룹 */
.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-header {
    padding: 8px 12px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.nav-group-header:hover {
    background: var(--bg-color);
}

.nav-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.nav-group-toggle {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 16px;
    text-align: center;
}

.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: 1000px;
    opacity: 1;
}

.nav-group.collapsed .nav-group-items {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    margin-left: 4px;
}

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

.nav-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
    margin-left: 0;
    border-left: 3px solid var(--primary-hover);
}

.nav-item.active:hover {
    background: var(--primary-hover);
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* =============================================
   메인 컨텐츠
   ============================================= */

.admin-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-color);
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.page-content h2 {
    margin-bottom: 24px;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
}

/* =============================================
   통계 카드
   ============================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.stat-icon {
    font-size: 48px;
    line-height: 1;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* =============================================
   차트
   ============================================= */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.chart-card .chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-card .chart-container canvas {
    max-height: 100%;
}

.avg-time-info {
    padding: 24px;
    font-size: 16px;
    line-height: 1.8;
}

.avg-time-info div {
    margin-bottom: 8px;
}

.avg-time-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* =============================================
   테이블
   ============================================= */

.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-color);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

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

/* 테이블 셀 텍스트 오버플로우 처리 */
.data-table td[title] {
    cursor: help;
    position: relative;
}

/* Tooltip 스타일 */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    margin-bottom: 5px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
    box-shadow: var(--shadow-md);
}

[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
    margin-bottom: -5px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.cancelled {
    background: #f3f4f6;
    color: #374151;
}

/* =============================================
   페이지네이션
   ============================================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-color);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-color);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
}

.pagination .page-info {
    margin: 0 16px;
    font-weight: 500;
    color: var(--text-color);
}

/* =============================================
   탭
   ============================================= */

.page-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    bottom: -2px;
}

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

.tab-btn.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* 서브 탭 스타일 */
.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* =============================================
   필터 및 액션
   ============================================= */

.page-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.page-actions {
    margin-bottom: 24px;
}

/* =============================================
   워커 모니터링
   ============================================= */

.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.worker-section {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.worker-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.workers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.worker-card {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-color);
    transition: var(--transition);
}

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

.worker-card.active {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.worker-card.idle {
    border-color: var(--warning-color);
    background: #fffbeb;
}

.worker-card.offline {
    border-color: var(--error-color);
    background: #fef2f2;
}

.worker-card div {
    margin-bottom: 8px;
    font-size: 14px;
}

.worker-card div:last-child {
    margin-bottom: 0;
}

.worker-card strong {
    color: var(--text-color);
    font-weight: 600;
}

/* =============================================
   API 테스트
   ============================================= */

.api-test-container {
    display: flex;
    gap: 24px;
}

.api-test-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 88px;
}

.api-test-sidebar h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.api-test-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.api-test-form {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.api-test-response {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.api-test-response h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.api-test-response pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* API 응답 컨테이너 */
.api-response-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 응답 섹션 공통 스타일 */
.response-header-section,
.response-body-section,
.response-result-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}

.response-header-section h4,
.response-body-section h4,
.response-result-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

/* 응답 헤더 섹션 */
.response-header-info {
    margin-bottom: 16px;
}

.response-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.status-code {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.status-code.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-code.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-code.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-error,
.response-warning {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 13px;
}

.auth-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.response-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

.response-headers {
    margin-top: 12px;
}

.response-headers strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-color);
}

.header-pre {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    overflow-x: auto;
    color: var(--text-color);
    margin: 0;
}

/* 응답 본문 섹션 */
.body-pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin: 0;
}

/* 응답 결과 섹션 */
.result-metadata,
.result-place-data,
.result-json-data {
    margin-bottom: 20px;
}

.result-metadata:last-child,
.result-place-data:last-child,
.result-json-data:last-child {
    margin-bottom: 0;
}

.result-metadata h5,
.result-place-data h5,
.result-json-data h5 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

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

.result-table tr:last-child {
    border-bottom: none;
}

.result-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.result-key {
    font-weight: 600;
    color: var(--text-color);
    width: 30%;
    background: #f8fafc;
}

.result-value {
    color: var(--text-secondary);
    word-break: break-word;
}

/* JSON 결과 항목 */
.json-result-item {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.json-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.json-result-header:hover {
    background: #f1f5f9;
}

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

.json-result-toggle {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.json-result-content {
    padding: 12px;
    background: var(--bg-secondary);
}

.json-result-pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin: 0;
}

/* 에러 표시 */
.error-text {
    color: var(--error-color);
    font-weight: 600;
    padding: 12px;
    background: #fee2e2;
    border-radius: var(--radius-sm);
}

.error-pre {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin: 0;
    border: 1px solid #fca5a5;
}

/* 결과 조회 버튼 영역 */
.api-result-actions {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 12px;
}

.api-result-actions strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-color);
}

.api-result-actions .btn {
    min-width: 150px;
}

.api-result-actions #api-result-info {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

.endpoint-item {
    padding: 12px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 13px;
}

.endpoint-item:hover {
    background: var(--bg-color);
}

.endpoint-item div:first-child {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.endpoint-item div:last-child {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =============================================
   모달
   ============================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

/* PlaceCrawl 모달 전용 스타일 (넓게) */
#modal-placecrawl-job-log-detail .modal-content {
    max-width: 1200px;
    width: 95%;
}

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

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* 모달 상세 정보 스타일 */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    width: 150px;
}

.detail-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    word-break: break-word;
}

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

/* PlaceCrawl 모달 전용 - 넓은 화면에 맞게 Grid 레이아웃 */
#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    border: none;
}

#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table tbody {
    display: contents;
}

#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table tr {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table th {
    padding: 0;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    width: auto;
    min-width: 120px;
    font-size: 13px;
    flex-shrink: 0;
}

#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table th::after {
    content: ':';
    margin-left: 2px;
}

#modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table td {
    padding: 0;
    border: none;
    color: var(--text-color);
    word-break: break-word;
    background: transparent;
    font-size: 14px;
    flex: 1;
}

/* 3열 레이아웃 (넓은 화면) */
@media (min-width: 1000px) {
    #modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 반응형: 작은 화면에서는 1열로 */
@media (max-width: 768px) {
    #modal-placecrawl-job-log-detail .detail-section:first-of-type .detail-table {
        grid-template-columns: 1fr;
    }
}

/* JSON 표시 스타일 */
.json-display {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-display.json-formatted {
    background: #1e293b;
    color: #e2e8f0;
}

.json-display:not(.json-formatted) {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* JSON 데이터 섹션 스타일 */
.json-data-section {
    margin-top: 24px;
}

.json-data-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.json-data-section h4:hover {
    color: var(--primary-color);
}

.json-data-content {
    margin-top: 12px;
}

.json-key-value-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.json-key-value-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    width: 200px;
    font-size: 13px;
}

.json-key-value-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    word-break: break-word;
    font-size: 13px;
}

.json-key-value-table tr:last-child td {
    border-bottom: none;
}

.json-nested {
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    margin-left: 10px;
}

.json-toggle {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 5px;
}

/* =============================================
   스크롤바 스타일
   ============================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* =============================================
   반응형 디자인
   ============================================= */

/* =============================================
   모달 스타일
   ============================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in-out;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .workers-grid {
        grid-template-columns: 1fr;
    }
    
    .api-test-container {
        flex-direction: column;
    }
    
    .api-test-sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .admin-content {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 16px;
        gap: 8px;
    }
    
    .nav-group {
        display: flex;
        flex-direction: column;
        min-width: 200px;
        gap: 4px;
    }
    
    .nav-group-header {
        padding: 8px 12px 4px;
    }
    
    .nav-group-items {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .nav-item {
        white-space: nowrap;
        margin-left: 0;
    }
    
    .nav-item.active {
        margin-left: 0;
        border-left: none;
        border-top: 3px solid var(--primary-hover);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 16px;
    }
    
    .page-content h2 {
        font-size: 20px;
    }
    
    .login-box {
        padding: 32px 24px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 0 16px;
    }
    
    .admin-header h1 {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .page-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-filters .form-input,
    .page-filters .form-select {
        width: 100%;
    }
}

/* =============================================
   STT 테스트 스타일
   ============================================= */

.stt-test-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.stt-test-upload {
    margin-bottom: 24px;
}

.stt-test-upload h3 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 18px;
}

.file-info {
    background: var(--bg-color);
    padding: 12px;
    border-radius: var(--radius);
    margin: 12px 0;
    border: 1px solid var(--border-color);
}

.file-info div {
    margin: 4px 0;
    font-size: 14px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.stt-test-status {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.stt-test-status h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 16px;
}

.status-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.status-info div {
    font-size: 14px;
}

.status-info strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-bar div {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.stt-test-result {
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.stt-test-result h3 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.info-grid div {
    font-size: 14px;
}

.info-grid strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

/* 실패한 작업 관리 페이지 스타일 */
.filter-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-row label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
    white-space: nowrap;
}

.filter-row select,
.filter-row input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-color);
    min-width: 150px;
}

.filter-row select:focus,
.filter-row input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.status-badge.status-warning {
    background: var(--warning-color);
    color: white;
}

.status-badge.status-info {
    background: var(--info-color);
    color: white;
}

.status-badge.status-success {
    background: var(--success-color);
    color: white;
}

.status-badge.status-danger {
    background: var(--error-color);
    color: white;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}

.pagination-info {
    text-align: center;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-cancelled {
    background: #f3f4f6;
    color: #374151;
}

.tab-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.tab-menu .tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    bottom: -2px;
}

.tab-menu .tab-btn:hover {
    color: var(--text-color);
    background: var(--bg-color);
}

.tab-menu .tab-btn.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* =============================================
   작업 상세 모달 스타일
   ============================================= */

.job-detail-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.job-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.job-detail-section h4 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.detail-grid div {
    font-size: 14px;
    line-height: 1.6;
}

.detail-grid strong {
    color: var(--text-secondary);
    margin-right: 8px;
    display: inline-block;
    min-width: 100px;
}

/* 상태 변경 컨트롤 스타일 */
.status-change-controls {
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.status-change-controls .current-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.status-change-controls .current-status strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 90px;
}

.status-change-controls .status-change-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-change-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    white-space: nowrap;
    min-width: 110px;
}

.status-change-select {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-color);
    transition: var(--transition);
}

.status-change-select:hover {
    border-color: var(--border-hover);
}

.status-change-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.status-change-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 120px;
}

.job-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.result-text textarea {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-numbers input {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.result-content {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow: auto;
}

.result-json {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-color);
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid #fecaca;
    font-size: 14px;
    line-height: 1.6;
}

/* =============================================
   워커 모니터링 페이지 개선 스타일
   ============================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    margin: 0;
}

.build-time-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.build-time-label {
    font-weight: 500;
}

.build-time-value {
    color: var(--primary-color);
    font-weight: 600;
}

.workers-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

/* 워커 타입별 탭 */
.worker-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.worker-type-tab-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.worker-type-tab-btn:hover {
    background: var(--bg-color);
    border-color: var(--border-hover);
}

.worker-type-tab-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.worker-type-tab-btn.active:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* 워커 정렬 컨트롤 */
.workers-sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.workers-sort-controls label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
}

.workers-sort-controls .form-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.workers-sort-controls .form-select:hover {
    border-color: var(--border-hover);
}

.workers-sort-controls .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.worker-type-section {
    margin-bottom: 32px;
}

.worker-type-section:last-child {
    margin-bottom: 0;
}

.worker-type-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.worker-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.worker-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.worker-card.online {
    border-left: 4px solid var(--success-color);
}

.worker-card.offline {
    border-left: 4px solid var(--text-secondary);
    opacity: 0.7;
}

.worker-card.updating {
    border-left: 4px solid var(--warning-color);
}

.worker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.worker-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.worker-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.worker-status-badge.online {
    background: #d1fae5;
    color: #065f46;
}

.worker-status-badge.offline {
    background: #f3f4f6;
    color: #374151;
}

.worker-status-badge.updating {
    background: #fef3c7;
    color: #92400e;
}

.worker-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.worker-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.worker-info-row .info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
}

.worker-info-row .info-value {
    color: var(--text-color);
    flex: 1;
}

.worker-info-row .info-ago {
    color: var(--text-secondary);
    font-size: 11px;
    font-style: italic;
}

/* 토글 스위치 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.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: #ccc;
    transition: var(--transition);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 워커 업데이트 섹션 */
.worker-updates-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-top: 24px;
}

.worker-updates-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-color);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.update-upload-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.update-upload-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.update-upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.update-upload-form .form-group {
    margin-bottom: 0;
}

.update-upload-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-color);
}

.update-upload-form input[type="text"],
.update-upload-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-color);
}

.update-upload-form input[type="text"]:focus,
.update-upload-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.update-upload-form input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.update-upload-form button[type="submit"] {
    padding: 10px 24px;
    height: fit-content;
}

#update-upload-message {
    margin-top: 16px;
}

.update-list-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.update-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.update-filter label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-color);
}

.update-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.updates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.update-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.update-card.status-pending {
    border-left: 4px solid var(--warning-color);
}

.update-card.status-ready {
    border-left: 4px solid var(--info-color);
}

.update-card.status-applying {
    border-left: 4px solid var(--warning-color);
}

.update-card.status-completed {
    border-left: 4px solid var(--success-color);
}

.update-card.status-failed {
    border-left: 4px solid var(--error-color);
}

.update-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.update-card-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.update-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.update-status-badge.status-ready {
    background: #dbeafe;
    color: #1e40af;
}

.update-status-badge.status-applying {
    background: #fef3c7;
    color: #92400e;
}

.update-status-badge.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.update-status-badge.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.update-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

.update-info-row .info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
}

.update-info-row .info-value {
    color: var(--text-color);
    flex: 1;
    word-break: break-word;
}

.update-info-row.error {
    color: var(--error-color);
}

.update-info-row.error .info-label,
.update-info-row.error .info-value {
    color: var(--error-color);
}

.no-workers,
.no-updates {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--error-color);
    font-size: 14px;
}

.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-top: 12px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =============================================
   텔레그램 알림 설정 페이지 스타일
   ============================================= */

.notification-info-section {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 16px;
}

.notification-info-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

.info-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 12px;
}

.info-item ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.info-item ul li {
    margin-bottom: 2px;
}

.info-note {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
}

.info-note strong {
    color: #78350f;
}

.telegram-config-section,
.notification-logs-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.telegram-config-section h3,
.notification-logs-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.telegram-config-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.telegram-config-form .form-group {
    margin-bottom: 0;
}

.telegram-config-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
}

.telegram-config-form .form-group input[type="text"],
.telegram-config-form .form-group input[type="time"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-family: inherit;
}

.telegram-config-form .form-group input[type="text"]:focus,
.telegram-config-form .form-group input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.telegram-config-form .form-group input[type="text"]:hover,
.telegram-config-form .form-group input[type="time"]:hover {
    border-color: var(--border-hover);
}

.telegram-config-form .form-group input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.telegram-config-form .form-group .form-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.telegram-config-form .form-group label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
    user-select: none;
}

.telegram-config-form .form-group label.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.form-actions .btn {
    flex: 0 0 auto;
}

/* 로그 필터 */
.logs-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.logs-filter label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.logs-filter input[type="text"],
.logs-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-color);
    transition: var(--transition);
    min-width: 150px;
}

.logs-filter input[type="text"]:focus,
.logs-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.logs-filter .btn {
    margin-left: auto;
}

/* 알림 로그 리스트 */
.notification-logs-list {
    min-height: 200px;
}

.notification-logs-list .loading,
.notification-logs-list .no-data,
.notification-logs-list .error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.notification-logs-list .error {
    color: var(--error-color);
}

/* 로그 테이블 */
.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
}

.logs-table thead {
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
}

.logs-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.logs-table tbody tr:hover {
    background: var(--bg-color);
}

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

.logs-table td {
    padding: 12px 16px;
    color: var(--text-color);
    vertical-align: middle;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination span {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .notification-info-section {
        padding: 16px;
    }

    .info-content {
        gap: 12px;
    }

    .info-item {
        padding: 12px;
    }

    .telegram-config-section,
    .notification-logs-section {
        padding: 16px;
    }

    .logs-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .logs-filter label {
        margin-bottom: 4px;
    }

    .logs-filter input[type="text"],
    .logs-filter select {
        width: 100%;
        min-width: auto;
    }

    .logs-filter .btn {
        margin-left: 0;
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .logs-table {
        font-size: 12px;
    }

    .logs-table th,
    .logs-table td {
        padding: 8px 12px;
    }
}

/* =============================================
   워커 통계 페이지 스타일
   ============================================= */

.statistics-filter-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.filter-group .form-control {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.filter-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.statistics-summary-section {
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    border: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.statistics-charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-container h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.chart-container canvas {
    max-height: 300px;
}

.statistics-table-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.statistics-table-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.table-container {
    overflow-x: auto;
}

#statistics-table {
    width: 100%;
    border-collapse: collapse;
}

#statistics-table th,
#statistics-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#statistics-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 에러 텍스트 스타일 */
.error-text {
    color: var(--error-color);
    font-weight: 500;
}

#statistics-table td {
    font-size: 14px;
    color: var(--text-color);
}

#statistics-table tbody tr:hover {
    background: var(--bg-color);
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
    }

    .summary-card {
        grid-template-columns: 1fr;
    }

    .statistics-charts-section {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: scroll;
    }
}

/* =============================================
   정렬 가능한 테이블 헤더 스타일
   ============================================= */

.sortable {
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.sort-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: bold;
}
