/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ente-font-family);
    line-height: 1.6;
    color: var(--ente-text-base);
    background: var(--ente-background-default);
    font-weight: var(--ente-font-weight-regular);
    letter-spacing: -0.011em;
}

/* App container */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ente-background-default);
}

/* Header */
.header {
    background: var(--ente-color-accent-photos);
    color: white;
    padding: var(--ente-spacing-lg);
    box-shadow: var(--ente-shadow-paper);
    border-bottom: 1px solid var(--ente-stroke-fainter);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-size: 24px;
    font-weight: var(--ente-font-weight-medium);
    line-height: 29px;
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
}

.header-actions {
    display: flex;
    gap: var(--ente-spacing-sm);
    align-items: center;
}

/* Material-UI Enhanced Components */
.header .mui-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: var(--ente-spacing-md);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border: 1px solid transparent;
}

.header .mui-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mui-icon-btn {
    background: var(--ente-fill-faint);
    border: none;
    padding: var(--ente-spacing-md);
    border-radius: 50%;
    color: var(--ente-text-base);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border: 1px solid transparent;
}

.mui-icon-btn:hover {
    background: var(--ente-fill-faint-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mui-icon-btn:active {
    transform: translateY(0);
}

.mui-icon-btn .material-icons {
    font-size: 24px;
}

.filter-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--ente-danger);
    color: white;
    font-size: 11px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--ente-font-weight-medium);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.mui-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--ente-background-paper);
    border-radius: var(--ente-border-radius);
    box-shadow: var(--ente-shadow-menu);
    min-width: 200px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--ente-stroke-faint);
}

.dropdown.active .mui-menu {
    display: block;
    animation: slideInDown 0.2s ease-out;
}

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

.mui-menu-item {
    width: 100%;
    padding: var(--ente-spacing-md) var(--ente-spacing-lg);
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--ente-text-base);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-md);
    font-size: 14px;
    font-weight: var(--ente-font-weight-regular);
}

.mui-menu-item:hover {
    background: var(--ente-fill-faint-hover);
}

.mui-menu-item.danger {
    color: var(--ente-danger);
}

.mui-menu-item .material-icons {
    font-size: 20px;
    opacity: 0.8;
}

/* Upload Section */
.upload-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ente-spacing-xl);
    background: var(--ente-background-default);
}

.upload-area {
    border: 2px dashed var(--ente-stroke-faint);
    border-radius: var(--ente-border-radius);
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--ente-background-paper);
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--ente-color-accent-photos) 0%, var(--ente-color-accent-auth) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.upload-area.drag-over {
    border-color: var(--ente-color-accent-photos);
    background: var(--ente-background-paper2);
    transform: scale(1.02);
    box-shadow: var(--ente-shadow-paper);
}

.upload-area.drag-over::before {
    opacity: 0.05;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: var(--ente-spacing-lg);
    opacity: 0.8;
}

.upload-content h2 {
    margin-bottom: var(--ente-spacing-sm);
    color: var(--ente-text-base);
    font-size: 20px;
    font-weight: var(--ente-font-weight-medium);
}

.upload-content p {
    color: var(--ente-text-muted);
    margin-bottom: var(--ente-spacing-xl);
    font-size: 14px;
}

/* Buttons */
.primary-btn {
    background: var(--ente-color-accent-photos);
    color: white;
    border: none;
    padding: var(--ente-spacing-md) var(--ente-spacing-xl);
    border-radius: var(--ente-border-radius-small);
    cursor: pointer;
    font-weight: var(--ente-font-weight-medium);
    font-size: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    background: var(--ente-color-accent-photos);
    transform: translateY(-1px);
    box-shadow: var(--ente-shadow-button);
    filter: brightness(1.1);
}

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

.mui-button {
    background: var(--ente-color-accent-photos);
    color: white;
    border: none;
    padding: var(--ente-spacing-sm) var(--ente-spacing-lg);
    border-radius: var(--ente-border-radius-small);
    cursor: pointer;
    font-weight: var(--ente-font-weight-medium);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
    text-transform: none;
    font-size: 14px;
    min-height: 40px;
}

.mui-button:hover {
    background: var(--ente-color-accent-photos);
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.mui-button.secondary {
    background: var(--ente-secondary-main);
    color: var(--ente-text-base);
    border: 1px solid var(--ente-stroke-faint);
}

.mui-button.secondary:hover {
    background: var(--ente-secondary-hover);
    filter: none;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: var(--ente-spacing-xl) var(--ente-spacing-lg);
    background: var(--ente-background-default);
}

/* Search Section */
.search-section {
    margin-bottom: var(--ente-spacing-lg);
}

.mui-search-container {
    position: relative;
}

.mui-textfield {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.mui-input {
    flex: 1;
    padding: var(--ente-spacing-lg) var(--ente-spacing-lg);
    padding-left: 56px;
    padding-right: 56px;
    border: 2px solid var(--ente-stroke-faint);
    border-radius: var(--ente-border-radius);
    font-size: 16px;
    font-family: var(--ente-font-family);
    font-weight: var(--ente-font-weight-regular);
    background: var(--ente-background-search);
    color: var(--ente-text-base);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.mui-input:focus {
    border-color: var(--ente-color-accent-photos);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
    background: var(--ente-background-paper);
}

.mui-input::placeholder {
    color: var(--ente-text-faint);
}

.mui-search-icon {
    position: absolute;
    left: var(--ente-spacing-lg);
    color: var(--ente-text-muted);
    pointer-events: none;
    z-index: 2;
    font-size: 24px;
}

.mui-clear-btn {
    position: absolute;
    right: var(--ente-spacing-sm);
    background: none;
    border: none;
    color: var(--ente-text-muted);
    cursor: pointer;
    padding: var(--ente-spacing-sm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.mui-clear-btn:hover {
    background: var(--ente-action-hover);
    color: var(--ente-text-base);
}

/* Timeline Section */
.timeline-section {
    background: var(--ente-background-paper);
    border-radius: var(--ente-border-radius);
    margin-bottom: var(--ente-spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--ente-stroke-fainter);
    overflow: hidden;
}

.timeline-header {
    display: flex;
    align-items: center;
    padding: var(--ente-spacing-lg);
    gap: var(--ente-spacing-md);
    cursor: pointer;
    transition: background-color 0.2s;
    background: var(--ente-background-paper);
}

.timeline-header:hover {
    background: var(--ente-background-paper2);
}

.timeline-header .material-icons {
    color: var(--ente-color-accent-photos);
    font-size: 24px;
}

.timeline-header span:not(.material-icons) {
    font-size: 16px;
    font-weight: var(--ente-font-weight-medium);
    color: var(--ente-text-base);
}

.timeline-btn {
    margin-left: auto;
}

.timeline-controls {
    padding: var(--ente-spacing-lg);
    border-top: 1px solid var(--ente-stroke-fainter);
    background: var(--ente-background-paper2);
}

.timeline-range {
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-lg);
    flex-wrap: wrap;
}

.timeline-range .mui-textfield {
    min-width: 200px;
    flex: 1;
}

.timeline-range .mui-input {
    padding: var(--ente-spacing-md);
    font-size: 14px;
    background: var(--ente-background-paper);
}

.range-separator {
    color: var(--ente-text-muted);
    font-weight: var(--ente-font-weight-medium);
    font-size: 14px;
}

/* Active Filters */
.active-filters {
    margin-bottom: var(--ente-spacing-lg);
}

.filter-chips {
    display: flex;
    gap: var(--ente-spacing-sm);
    flex-wrap: wrap;
}

.filter-chip {
    background: var(--ente-background-paper);
    color: var(--ente-text-base);
    padding: var(--ente-spacing-sm) var(--ente-spacing-md);
    border-radius: 20px;
    font-size: 13px;
    font-weight: var(--ente-font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
    border: 1px solid var(--ente-stroke-faint);
    transition: all 0.2s;
    animation: slideInUp 0.3s ease-out;
}

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

.filter-chip.level-WARNING {
    background: rgba(255, 193, 7, 0.1);
    color: var(--ente-warning);
    border-color: rgba(255, 193, 7, 0.3);
}

.filter-chip.level-SEVERE {
    background: rgba(234, 63, 63, 0.1);
    color: var(--ente-danger);
    border-color: rgba(234, 63, 63, 0.3);
}

.filter-chip.level-SHOUT {
    background: rgba(150, 16, 214, 0.1);
    color: var(--ente-color-accent-auth);
    border-color: rgba(150, 16, 214, 0.3);
}

.filter-chip.level-INFO {
    background: rgba(29, 185, 84, 0.1);
    color: var(--ente-color-accent-photos);
    border-color: rgba(29, 185, 84, 0.3);
}

.filter-chip .remove {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.filter-chip .remove:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Log Stats */
.log-stats {
    background: var(--ente-background-paper);
    padding: var(--ente-spacing-lg);
    border-radius: var(--ente-border-radius);
    margin-bottom: var(--ente-spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--ente-text-muted);
    border: 1px solid var(--ente-stroke-fainter);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#log-count {
    font-weight: var(--ente-font-weight-medium);
    color: var(--ente-text-base);
}

/* Log List */
.log-list-container {
    background: var(--ente-background-paper);
    border-radius: var(--ente-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--ente-stroke-fainter);
}

.log-list {
    max-height: 70vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.log-entry {
    padding: var(--ente-spacing-lg);
    border-bottom: 1px solid var(--ente-stroke-fainter);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: var(--ente-spacing-md);
    position: relative;
    animation: fadeInEntry 0.3s ease-out;
}

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

.log-entry:hover {
    background: var(--ente-background-paper2);
    transform: translateX(4px);
}

.log-entry.severe:hover {
    background: var(--ente-background-paper2);
    transform: translateX(4px);
}

.log-entry.warning:hover {
    background: var(--ente-background-paper2);
    transform: translateX(4px);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.severe {
    border-left: 4px solid var(--ente-danger);
}

.log-entry.warning {
    border-left: 4px solid var(--ente-warning);
}

/* Context mode highlighting */
.log-entry.highlighted {
    background: var(--ente-background-secondary);
    border: 2px solid var(--ente-color-accent-photos);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(0px);
    position: relative;
    animation: pulseHighlight 2s ease-in-out;
}

.log-entry.highlighted:hover {
    background: var(--ente-background-secondary);
    transform: translateX(0px);
}

.highlight-icon {
    color: var(--ente-color-accent-photos);
    font-size: 18px;
    margin-left: auto;
}

/* Context header styles */
.context-header {
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
    font-size: 20px;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--ente-color-accent-photos-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--ente-color-accent-photos-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--ente-color-accent-photos-rgb), 0);
    }
}

.log-level {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--ente-background-paper);
}

.log-level.INFO { background: var(--ente-color-accent-photos); }
.log-level.WARNING { background: var(--ente-warning); }
.log-level.SEVERE { background: var(--ente-danger); }
.log-level.SHOUT { background: var(--ente-color-accent-auth); }
.log-level.FINE { background: var(--ente-text-faint); }
.log-level.FINER { background: var(--ente-text-faint); }
.log-level.FINEST { background: var(--ente-text-faint); }
.log-level.CONFIG { background: var(--ente-success); }

.log-content {
    flex: 1;
}

.log-header {
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-md);
    margin-bottom: var(--ente-spacing-sm);
    font-size: 13px;
    flex-wrap: wrap;
}

.log-time {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: var(--ente-font-weight-medium);
    color: var(--ente-text-muted);
    background: var(--ente-background-paper2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.log-logger {
    background: var(--ente-background-paper2);
    color: var(--ente-text-base);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: var(--ente-font-weight-medium);
    border: 1px solid var(--ente-stroke-fainter);
}

.log-process {
    background: var(--ente-color-accent-photos);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: var(--ente-font-weight-medium);
    opacity: 0.9;
}

.log-message {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ente-text-base);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
    font-family: var(--ente-font-family);
}

.log-message.expanded {
    max-height: none;
}

.log-message::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(transparent, var(--ente-background-paper2));
    pointer-events: none;
}

.log-message.expanded::after {
    display: none;
}

.log-error {
    color: var(--ente-danger);
    font-weight: var(--ente-font-weight-medium);
    margin-top: var(--ente-spacing-sm);
    font-size: 14px;
    padding: var(--ente-spacing-sm);
    background: rgba(234, 63, 63, 0.05);
    border-radius: var(--ente-border-radius-small);
    border-left: 3px solid var(--ente-danger);
}

/* Loading and Load More */
.loading {
    text-align: center;
    padding: var(--ente-spacing-xl);
    color: var(--ente-text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ente-spacing-md);
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--ente-stroke-fainter);
    border-top: 2px solid var(--ente-color-accent-photos);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Dialog */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--ente-spacing-lg);
    animation: fadeIn 0.2s ease-out;
}

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

.dialog {
    background: var(--ente-background-paper);
    border-radius: var(--ente-border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ente-shadow-paper);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--ente-stroke-fainter);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dialog.large {
    max-width: 900px;
}

.dialog-header {
    padding: var(--ente-spacing-xl) var(--ente-spacing-xl) var(--ente-spacing-lg);
    border-bottom: 1px solid var(--ente-stroke-fainter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ente-background-paper);
}

.dialog-header h2 {
    font-size: 20px;
    font-weight: var(--ente-font-weight-medium);
    color: var(--ente-text-base);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: var(--ente-spacing-sm);
    color: var(--ente-text-muted);
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--ente-action-hover);
    color: var(--ente-text-base);
}

.dialog-content {
    padding: var(--ente-spacing-xl) var(--ente-spacing-xl) var(--ente-spacing-lg);
    overflow-y: auto;
    flex: 1;
    background: var(--ente-background-paper);
}

.dialog-actions {
    padding: var(--ente-spacing-lg) var(--ente-spacing-xl);
    border-top: 1px solid var(--ente-stroke-fainter);
    display: flex;
    justify-content: flex-end;
    gap: var(--ente-spacing-md);
    background: var(--ente-background-paper2);
}

/* Filter Dialog Enhancements */
.filter-section {
    margin-bottom: var(--ente-spacing-xl);
}

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

.filter-section h3 {
    margin-bottom: var(--ente-spacing-lg);
    font-size: 16px;
    font-weight: var(--ente-font-weight-medium);
    color: var(--ente-text-base);
    display: flex;
    align-items: center;
    gap: var(--ente-spacing-sm);
}

.level-chips {
    display: flex;
    gap: var(--ente-spacing-md);
    flex-wrap: wrap;
}

.level-chip {
    padding: var(--ente-spacing-md) var(--ente-spacing-lg);
    border: 2px solid var(--ente-stroke-faint);
    border-radius: 20px;
    background: var(--ente-background-paper);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: var(--ente-font-weight-medium);
    min-width: 80px;
    text-align: center;
    position: relative;
}

.level-chip:hover {
    background: var(--ente-background-paper2);
    transform: translateY(-1px);
}

.level-chip.active {
    border-color: currentColor;
    background: currentColor;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.level-chip.active {
    color: white;
}

.level-chip.active::after {
    content: attr(data-level);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: var(--ente-font-weight-medium);
    font-size: 14px;
}

/* Specific text color overrides for light-colored level chips when active */
.level-chip.active.WARNING,
.level-chip.active.WARNING::after {
    color: #000;
}

/* Simple styling for level chips in dialog - no shadows or complex effects */
.log-detail-table .level-chip {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: var(--ente-font-weight-medium);
    display: inline-block;
    position: static;
}

.log-detail-table .level-chip.active::after {
    content: none;
}

.log-detail-table .level-chip.SEVERE {
    background: var(--ente-danger);
    color: white;
}

.log-detail-table .level-chip.WARNING {
    background: var(--ente-warning);
    color: #000;
}

.log-detail-table .level-chip.INFO {
    background: var(--ente-color-accent-photos);
    color: white;
}

.log-detail-table .level-chip.SHOUT {
    background: var(--ente-color-accent-auth);
    color: white;
}

/* Level colors */
.level-chip.FINEST, .level-chip.FINER, .level-chip.FINE {
    color: var(--ente-text-faint);
}
.level-chip.CONFIG { color: var(--ente-success); }
.level-chip.INFO { color: var(--ente-color-accent-photos); }
.level-chip.WARNING { color: var(--ente-warning); }
.level-chip.SEVERE { color: var(--ente-danger); }
.level-chip.SHOUT { color: var(--ente-color-accent-auth); }

.process-list, .logger-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--ente-stroke-faint);
    border-radius: var(--ente-border-radius);
    padding: var(--ente-spacing-md);
    background: var(--ente-background-paper2);
    gap: var(--ente-spacing-xs);
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: var(--ente-spacing-md) var(--ente-spacing-sm);
    cursor: pointer;
    border-radius: var(--ente-border-radius-small);
    transition: background-color 0.2s;
    font-size: 14px;
    margin-bottom: var(--ente-spacing-xs);
}

.checkbox-item:hover {
    background: var(--ente-action-hover);
}

.checkbox-item input {
    margin-right: var(--ente-spacing-md);
    accent-color: var(--ente-color-accent-photos);
}

.checkbox-item label {
    cursor: pointer;
    color: var(--ente-text-base);
    font-weight: var(--ente-font-weight-regular);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ente-text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--ente-spacing-lg);
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: var(--ente-spacing-sm);
    color: var(--ente-text-base);
    font-size: 18px;
    font-weight: var(--ente-font-weight-medium);
}

.empty-state p {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: var(--ente-spacing-lg) var(--ente-spacing-md);
    }
    
    .timeline-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dialog {
        max-width: none;
        margin: var(--ente-spacing-lg);
        max-height: calc(100vh - 2rem);
    }
    
    .log-entry {
        padding: var(--ente-spacing-md);
        flex-direction: column;
        gap: var(--ente-spacing-sm);
    }
    
    .log-header {
        flex-wrap: wrap;
    }
    
    .mui-icon-btn {
        min-width: 44px;
        height: 44px;
    }
}

/* Scrollbar styling */
.log-list::-webkit-scrollbar,
.process-list::-webkit-scrollbar,
.logger-list::-webkit-scrollbar {
    width: 6px;
}

.log-list::-webkit-scrollbar-track,
.process-list::-webkit-scrollbar-track,
.logger-list::-webkit-scrollbar-track {
    background: var(--ente-background-paper2);
}

.log-list::-webkit-scrollbar-thumb,
.process-list::-webkit-scrollbar-thumb,
.logger-list::-webkit-scrollbar-thumb {
    background: var(--ente-stroke-faint);
    border-radius: 3px;
}

.log-list::-webkit-scrollbar-thumb:hover,
.process-list::-webkit-scrollbar-thumb:hover,
.logger-list::-webkit-scrollbar-thumb:hover {
    background: var(--ente-stroke-muted);
}

/* Focus styles for accessibility */
.mui-icon-btn:focus,
.mui-button:focus,
.primary-btn:focus {
    outline: 2px solid var(--ente-color-accent-photos);
    outline-offset: 2px;
}

.mui-input:focus {
    border-color: var(--ente-color-accent-photos);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .log-entry {
        border-bottom: 2px solid var(--ente-stroke-muted);
    }
    
    .filter-chip,
    .log-logger,
    .log-time {
        border: 1px solid var(--ente-stroke-muted);
    }
}

/* Dark Reader extension support */
[data-darkreader-scheme="dark"] .header {
    background: var(--ente-color-accent-photos) !important;
    color: white !important;
}

[data-darkreader-scheme="dark"] .header .mui-icon-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

[data-darkreader-scheme="dark"] .filter-count {
    background: var(--ente-danger) !important;
    color: white !important;
}

[data-darkreader-scheme="dark"] .log-process {
    background: var(--ente-color-accent-photos) !important;
    color: white !important;
}

/* Dark Reader overrides for error/warning styling */
[data-darkreader-scheme="dark"] .log-entry.severe {
    border-left-color: var(--ente-danger) !important;
}

[data-darkreader-scheme="dark"] .log-entry.warning {
    border-left-color: var(--ente-warning) !important;
}

/* Log Detail Dialog Styles */
.log-detail-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

.log-detail-table th {
    text-align: left;
    padding: 0.5rem;
    background: var(--ente-background-paper2);
    color: var(--ente-text-base);
    font-weight: var(--ente-font-weight-medium);
    border-bottom: 1px solid var(--ente-stroke-fainter);
}

.log-detail-table td {
    padding: 0.5rem;
    color: var(--ente-text-base);
    border-bottom: 1px solid var(--ente-stroke-fainter);
}

.log-detail-message {
    background: var(--ente-background-paper2);
    color: var(--ente-text-base);
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    border: 1px solid var(--ente-stroke-fainter);
}

.log-detail-error-heading {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--ente-danger);
    font-weight: var(--ente-font-weight-medium);
}

.log-detail-error {
    background: rgba(244, 67, 54, 0.05);
    color: var(--ente-danger);
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 4px solid var(--ente-danger);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.log-detail-stack-trace {
    background: rgba(244, 67, 54, 0.05);
    color: var(--ente-danger);
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 4px solid var(--ente-danger);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.log-detail h3 {
    color: var(--ente-text-base);
    margin-bottom: 1rem;
}

.log-detail h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--ente-text-base);
    font-weight: var(--ente-font-weight-medium);
}

/* Analytics Dialog Styles */
.analytics-chart {
    margin-bottom: 2rem;
}

.analytics-chart h3 {
    color: var(--ente-text-base);
    margin-bottom: 1rem;
    font-weight: var(--ente-font-weight-medium);
    font-size: 18px;
}

.chart-item {
    display: flex;
    align-items: center;
    padding: var(--ente-spacing-sm);
    margin-bottom: var(--ente-spacing-xs);
    border-radius: var(--ente-border-radius-small);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    background: var(--ente-background-paper2);
    border: 1px solid var(--ente-stroke-fainter);
}

.chart-item:hover {
    background: var(--ente-fill-faint-hover);
}

.chart-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--ente-color-accent-photos);
    opacity: 0.2;
    transition: all 0.2s;
    border-radius: var(--ente-border-radius-small);
}

.chart-item:hover .chart-bar {
    opacity: 0.3;
}

.chart-label {
    flex: 1;
    color: var(--ente-text-base);
    font-weight: var(--ente-font-weight-medium);
    position: relative;
    z-index: 1;
}

.chart-count {
    color: var(--ente-text-muted);
    margin-right: var(--ente-spacing-md);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.chart-percentage {
    color: var(--ente-text-base);
    font-weight: var(--ente-font-weight-medium);
    font-size: 14px;
    min-width: 50px;
    text-align: right;
    position: relative;
    z-index: 1;
}