/* ==========================================================================
   Log Viewer Styles
   ========================================================================== */

.log-view-box {
    background: var(--container-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--container-bg);
    padding: 20px 20px 5px 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group select, 
.filter-group input {
    width: auto;
    min-width: 150px;
}

.log-table-container {
    background: transparent;
    overflow: hidden;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

.log-table th {
    background: var(--table-header-bg);
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--text-primary);
}

.log-table td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
}

.col-source { width: 220px; }
.col-source .ts { display: block; font-size: 0.8em; color: var(--text-secondary); opacity: 0.7; margin-bottom: 2px; }
.col-source .server { display: block; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.col-source .log { display: block; font-size: 0.85em; color: var(--text-secondary); line-height: 1.2; margin-top: 2px; }
.col-level { width: 100px; }
.col-msg { word-break: break-all; }

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-error { background: rgba(239, 68, 68, 0.2); color: #fb7185; }
.badge-warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-debug { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

.log-level-error { background-color: rgba(239, 68, 68, 0.08); }
.log-level-warn { background-color: rgba(245, 158, 11, 0.08); }

:root:not(.dark-mode) .badge-error { background: #fee2e2; color: #991b1b; }
:root:not(.dark-mode) .badge-warn { background: #fef3c7; color: #92400e; }
:root:not(.dark-mode) .badge-info { background: #e0f2fe; color: #075985; }
:root:not(.dark-mode) .badge-debug { background: #f3f4f6; color: #374151; }

:root:not(.dark-mode) .log-level-error { background-color: rgba(239, 68, 68, 0.05); }
:root:not(.dark-mode) .log-level-warn { background-color: rgba(245, 158, 11, 0.05); }

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    color: #10b981;
    font-weight: 600;
}

.live-indicator .dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

.load-more-container {
    padding: 20px;
    text-align: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary { 
    background: #003a5c; 
    color: #fff; 
}

.btn-primary:hover { 
    background: #002337; 
}
