/* CSS Variables for Theming */
:root {
    /* Light theme - Modern gradient colors */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --accent-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --accent-warning: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    --accent-info: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] {
    /* Dark theme - Modern dark gradients */
    --bg-primary: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --accent-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --accent-warning: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    --accent-info: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    --glass-bg: rgba(30, 41, 59, 0.25);
    --glass-border: rgba(71, 85, 105, 0.18);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.5rem;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.025em;
}

.upload-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.upload-section.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(33, 150, 243, 0.1);
}

.upload-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upload-section.drag-over::after {
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--accent-success);
    color: white;
    border: 1px solid transparent;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-info {
    background: var(--accent-info);
    color: white;
    border: 1px solid transparent;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: var(--accent-warning);
    color: white;
    border: 1px solid transparent;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
    border: 1px solid transparent;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: #64748b;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #1e293b;
}

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

/* Main Content */
.main-content {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* File Info Panel */
.file-info {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: none;
    gap: 2rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-info.show {
    display: flex;
}

.file-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 20px 20px 0 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item span:last-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

/* Old Filters Panel - kept for backward compatibility */
.filters-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

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

/* Global Search Section */
.global-search-section {
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.global-search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 16px 16px 0 0;
}

.global-search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-input i {
    position: absolute;
    left: 1rem;
    color: #64748b;
    z-index: 1;
}

.global-search-input input {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.global-search-input input:focus {
    border-color: transparent;
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.global-search-input .btn-icon {
    position: absolute;
    right: 0.5rem;
    z-index: 1;
    padding: 0.25rem;
    color: #64748b;
}

/* Filters Main Modal */
.filters-main-modal {
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
}

.active-filters-section {
    margin-bottom: 2rem;
}

.active-filters-section h4,
.add-filter-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-actions-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    align-items: flex-start;
    align-content: flex-start;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3b82f6;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-tag .remove-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.filter-tag .remove-filter:hover {
    opacity: 0.7;
}

.no-filters-message {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.no-filters-message i {
    opacity: 0.6;
    font-size: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.filter-modal.show {
    display: flex !important;
}

.filter-modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.4s ease;
    position: relative;
    z-index: 2001;
}

.filter-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 20px 20px 0 0;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.filter-modal-header h3,
.filter-modal-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-modal-body {
    padding: 2rem;
    max-height: 65vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.filter-type-selection {
    margin-bottom: 1.5rem;
}

.filter-type-selection label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-options {
    display: none;
}

.filter-options.active {
    display: block;
}

.filter-option-group {
    margin-bottom: 1rem;
}

.filter-option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.subid-inputs {
    display: flex;
    gap: 0.5rem;
}

.subid-inputs select {
    flex: 1;
}

.subid-inputs input {
    flex: 2;
}

.date-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.date-inputs span {
    color: #64748b;
    font-weight: 500;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.filter-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: transparent;
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.date-range span {
    font-size: 0.875rem;
    color: #64748b;
    white-space: nowrap;
}

.date-filter .date-range input {
    flex: 1;
    min-width: 150px;
}

/* SubID Filter */
.subid-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.subid-type {
    flex: 1;
    min-width: 120px;
}

.subid-value {
    flex: 1.5;
    min-width: 150px;
}

/* Results Section */
.results-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    position: relative;
}

.results-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-info);
    border-radius: 20px 20px 0 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-actions select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
}

/* Table */
.table-container {
    overflow-x: auto;
}

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

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.results-table th {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
}

.results-table th:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.results-table th i {
    margin-left: 0.5rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.results-table tbody tr {
    transition: all 0.3s ease;
}

.results-table tbody tr:hover {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.results-table td {
    font-size: 0.875rem;
}

.no-data {
    height: 200px;
}

.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    height: 100%;
    padding: 3rem;
    text-align: center;
}

.no-data-message i {
    font-size: 4rem;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
    animation: pulse 3s infinite;
}

.no-data-message p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-bot {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-human {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-mobile {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-desktop {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#pageInfo {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.4s ease;
}

.loading-spinner i {
    font-size: 3rem;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.4s ease;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 20px 20px 0 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-body {
    padding: 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* Modal sections */
.modal-search, .keitaro-format, .original-details, .click-uniqueness {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Click Uniqueness Section */
.click-uniqueness {
    background: #fefcbf;
    border-left: 4px solid #f59e0b;
}

.uniqueness-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.uniqueness-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
}

.uniqueness-header i {
    color: #f59e0b;
}

.uniqueness-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.uniqueness-item {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #fbbf24;
}

.uniqueness-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #92400e;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.uniqueness-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.uniqueness-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.status-duplicate {
    background: #fee2e2;
    color: #991b1b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-duplicate:hover {
    background: #fecaca;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.uniqueness-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.uniqueness-item.clickable:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.duplicates-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.duplicates-modal.show {
    display: flex !important;
}

.duplicates-modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.4s ease;
    position: relative;
}

.duplicates-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-danger);
    border-radius: 20px 20px 0 0;
}

.duplicates-modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-danger);
    color: white;
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.duplicates-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.duplicates-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.duplicates-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.duplicates-modal-body {
    padding: 2rem;
    background: var(--bg-secondary);
}

.duplicates-info {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ef4444;
}

.duplicates-info h4 {
    margin: 0 0 0.5rem 0;
    color: #ef4444;
    font-size: 1.1rem;
}

.duplicates-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.duplicates-list {
    display: grid;
    gap: 1rem;
}

.duplicate-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.duplicate-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.duplicate-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.duplicate-item-time {
    font-weight: 600;
    color: #374151;
}

.duplicate-item-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.duplicate-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

.duplicate-item-detail {
    display: flex;
    justify-content: space-between;
}

.duplicate-item-label {
    font-weight: 500;
    color: #374151;
}

.duplicate-item-value {
    text-align: right;
    font-family: 'Monaco', monospace;
}

/* Bulk Upload Progress Styles */
.bulk-upload-info {
    margin-bottom: 1.5rem;
}

.progress-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.progress-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.overall-progress {
    margin-bottom: 1rem;
}

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

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.files-progress {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.file-progress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.file-progress-item:last-child {
    border-bottom: none;
}

.file-progress-item.processing {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.file-progress-item.success {
    background: #d1edff;
    border-left: 4px solid var(--accent-secondary);
}

.file-progress-item.error {
    background: #f8d7da;
    border-left: 4px solid var(--accent-danger);
}

[data-theme="dark"] .file-progress-item.processing {
    background: rgba(255, 193, 7, 0.1);
}

[data-theme="dark"] .file-progress-item.success {
    background: rgba(52, 211, 153, 0.1);
}

[data-theme="dark"] .file-progress-item.error {
    background: rgba(239, 68, 68, 0.1);
}

.file-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-size {
    font-weight: 500;
    color: var(--primary-color);
}

.file-status {
    flex: 1;
}

.file-progress-icon {
    margin-left: 1rem;
    font-size: 1.25rem;
}

.file-progress-icon.processing {
    color: #ffc107;
    animation: spin 1s linear infinite;
}

.file-progress-icon.success {
    color: var(--accent-secondary);
}

.file-progress-icon.error {
    color: var(--accent-danger);
}

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

.bulk-upload-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-search {
    background: #f8fafc;
}

.search-header, .format-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-header h4, .format-header h4, .original-details h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.search-controls-modal {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-controls-modal input {
    flex: 1;
}

.search-results {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-highlight {
    background: #fef3c7;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

/* Keitaro format */
.format-header {
    justify-content: space-between;
}

.keitaro-log-content {
    background: #1e293b;
    color: #f1f5f9;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 1rem;
    border-radius: 6px;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.keitaro-timestamp {
    color: #60a5fa;
    font-weight: 600;
}

.keitaro-section {
    color: #34d399;
    font-weight: 600;
}

.keitaro-url {
    color: #fbbf24;
}

.keitaro-value {
    color: #f472b6;
}

/* Click Flow Path */
.click-flow {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.flow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.click-flow-content {
    position: relative;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
}

.flow-step:last-child {
    margin-bottom: 0;
}

.flow-step::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -25px;
    width: 2px;
    background: #cbd5e1;
    z-index: 1;
}

.flow-step:last-child::before {
    display: none;
}

.flow-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    margin-right: 1rem;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.flow-icon.start {
    background: #3b82f6;
    color: white;
}

.flow-icon.campaign {
    background: #8b5cf6;
    color: white;
}

.flow-icon.flow-check {
    background: #f59e0b;
    color: white;
}

.flow-icon.passed {
    background: #10b981;
    color: white;
}

.flow-icon.blocked {
    background: #ef4444;
    color: white;
}

.flow-icon.stream {
    background: #06b6d4;
    color: white;
}

.flow-icon.landing {
    background: #84cc16;
    color: white;
}

.flow-icon.offer {
    background: #f97316;
    color: white;
}

.flow-icon.action {
    background: #6366f1;
    color: white;
}

.flow-content {
    flex: 1;
    padding-top: 0.5rem;
}

.flow-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.flow-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.4;
}

.flow-details {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.flow-value {
    font-weight: 600;
    color: #1e293b;
}

.flow-url {
    word-break: break-all;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.flow-checks {
    margin-top: 0.5rem;
}

.flow-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.8rem;
}

.flow-check-status {
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

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

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

.flow-summary {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.flow-summary h5 {
    margin: 0 0 0.5rem 0;
    color: #0c4a6e;
    font-size: 0.9rem;
    font-weight: 600;
}

.flow-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.flow-summary-item {
    text-align: center;
}

.flow-summary-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
}

.flow-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0c4a6e;
}

/* Flow Expand Section */
.flow-expand-section {
    margin-top: 0.75rem;
}

.flow-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.flow-expand-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #334155;
}

.flow-expand-btn:active {
    transform: translateY(1px);
}

.flow-expand-btn i {
    transition: transform 0.2s ease;
}

.flow-expand-btn.expanded i {
    transform: rotate(180deg);
}

.flow-hidden-content {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    animation: fadeInDown 0.3s ease;
}

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

#logDetails {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Action buttons in table */
.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #3b82f6;
    color: white;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background: #2563eb;
}

/* SubID preview in table */
.subid-preview {
    font-size: 0.75rem;
    line-height: 1.3;
    max-width: 200px;
}

.subid-item {
    display: block;
    margin-bottom: 0.25rem;
}

.subid-item strong {
    color: #374151;
    font-weight: 600;
}

.no-subids {
    color: #9ca3af;
    font-style: italic;
}

.more-subids {
    color: #6b7280;
    font-size: 0.7rem;
    font-style: italic;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-filter {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-filter:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.quick-filter.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Analytics Panel */
.analytics-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-top: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-secondary);
    border-radius: 20px 20px 0 0;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.analytics-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.analytics-content {
    display: none;
}

.analytics-content.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

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

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 16px 16px 0 0;
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.chart-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.chart-container h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-align: center;
}

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

/* Advanced Search */
.search-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.search-controls input[type="text"] {
    flex: 1;
}

.search-options {
    display: flex;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.search-presets {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.preset-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Months Selection Styles */
.months-selection-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    padding: 1rem;
}

.selection-controls {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.months-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
}

.month-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    cursor: pointer;

}

.month-checkbox-item:last-child {
    border-bottom: none;
}

.month-checkbox-item:hover {
    background: var(--bg-tertiary);
}

.month-checkbox-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--accent-primary);
}

.month-checkbox-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.month-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 0.5rem;
    accent-color: var(--accent-primary);
}

.month-name {
    font-weight: 500;
    color: var(--text-primary);
}

.month-files-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.selection-summary {
    transition: all 0.3s ease;
}

.selection-summary.has-selection {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: var(--accent-primary) !important;
}

.summary-info {
    font-weight: 500;
    color: var(--text-primary);
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
}

.btn-info {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary);
}

.btn-info:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Dark theme adjustments */
[data-theme="dark"] .month-checkbox-item.selected {
    background: rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .selection-summary.has-selection {
    background: rgba(96, 165, 250, 0.15) !important;
}

/* Dark theme specific improvements */
[data-theme="dark"] .logo h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .logo i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .stat-value {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .no-data-message i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .loading-spinner i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .results-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

[data-theme="dark"] .status-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-control {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .form-control:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Dark theme modal improvements */
[data-theme="dark"] .filter-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .filter-modal-header {
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .filter-modal-body {
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .filter-modal-footer {
    background: rgba(30, 41, 59, 0.8);
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .duplicates-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .duplicates-modal-body {
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .duplicates-info {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .duplicates-info h4 {
    color: #f87171;
}

[data-theme="dark"] .duplicates-info p {
    color: var(--text-secondary);
}

[data-theme="dark"] .duplicate-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .duplicate-item:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
}

[data-theme="dark"] .duplicate-item-time {
    color: var(--text-primary);
}

[data-theme="dark"] .duplicate-item-detail {
    color: var(--text-secondary);
}

[data-theme="dark"] .duplicate-item-label {
    color: var(--text-primary);
}

[data-theme="dark"] .duplicate-item-value {
    color: var(--text-secondary);
}

/* Dark theme active filters */
[data-theme="dark"] .active-filters {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .filter-tag {
    background: var(--accent-primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .filter-tag .remove-filter {
    color: white;
}

[data-theme="dark"] .filter-tag .remove-filter:hover {
    opacity: 0.8;
}

/* Dark theme labels and text */
[data-theme="dark"] .filter-type-selection label,
[data-theme="dark"] .filter-group label {
    color: var(--text-primary);
}

[data-theme="dark"] .active-filters-section h4,
[data-theme="dark"] .add-filter-section h4 {
    color: var(--text-primary);
}

/* Dark theme select elements */
[data-theme="dark"] select.form-control {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] select.form-control:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Dark theme checkbox and radio */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
    accent-color: var(--accent-primary);
}

/* Dark theme date inputs */
[data-theme="dark"] input[type="date"] {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] input[type="date"]:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Dark theme button improvements */
[data-theme="dark"] .btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] .btn-icon {
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-icon:hover {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
}

/* Dark theme close buttons */
[data-theme="dark"] .duplicates-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .duplicates-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dark theme no filters message */
[data-theme="dark"] .no-filters-message {
    background: rgba(30, 41, 59, 0.8);
    border: 2px dashed rgba(71, 85, 105, 0.5);
    color: var(--text-secondary);
}

/* Radio button styles for single month selection */
.month-radio-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.month-radio-item:last-child {
    border-bottom: none;
}

.month-radio-item:hover {
    background: var(--bg-tertiary);
}

.month-radio-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--accent-primary);
}

.month-radio-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.month-radio {
    margin: 0;
    cursor: pointer;
}

[data-theme="dark"] .month-radio-item.selected {
    background: rgba(96, 165, 250, 0.2);
}

/* New folder selection styles */
.folder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.folder-item:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.folder-item.selected {
    background-color: #e8f5e8;
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.folder-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f8f8;
}

.folder-checkbox {
    margin: 0;
    transform: scale(1.2);
}

.folder-info {
    flex: 1;
}

.folder-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.folder-details {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 1rem;
}

.folder-size {
    color: #2196F3;
    font-weight: 500;
}

/* Size progress bar styles */
.size-progress-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.size-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.size-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.size-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 50%, #cddc39 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 0%;
}

.size-progress-fill.warning {
    background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
}

.size-progress-fill.danger {
    background: linear-gradient(90deg, #f44336 0%, #d32f2f 100%);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.size-warning {
    color: #d32f2f;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
    background: #ffebee;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
}

/* Date filter styles */
.date-filter-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff3e0;
    border-radius: 8px;
    border: 1px solid #ffcc02;
}

.date-filter-container h4 {
    margin: 0 0 0.75rem 0;
    color: #ef6c00;
}

.date-filter-inputs {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.date-filter-inputs label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.date-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Progress Modal Styles */
.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

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

.progress-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.4s ease;
}

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

.progress-modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.progress-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.progress-modal-body {
    padding: 2rem;
}

.progress-info {
    text-align: center;
}

.progress-status {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.progress-status span {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
}

.progress-stats {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.progress-main {
    margin-bottom: 2rem;
}

.progress-bar-container {
    margin-bottom: 1rem;
}

.progress-bar-track {
    flex: 1;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-weight: bold;
    color: #495057;
    font-size: 1.2rem;
    text-align: center;
    margin-top: 0.5rem;
}

.progress-details {
    margin-bottom: 2rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.detail-item i {
    color: #007bff;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.detail-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-right: auto;
}

.detail-value {
    font-weight: bold;
    color: #495057;
    font-size: 0.9rem;
}

.progress-actions {
    text-align: center;
}

/* Progress states */
.progress-bar-fill.processing {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.progress-bar-fill.completed {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-bar-fill.error {
    background: linear-gradient(90deg, #dc3545 0%, #fd1d53 100%);
}

/* Responsive adjustments for progress modal */
@media (max-width: 768px) {
    .progress-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .progress-modal-header {
        padding: 1rem;
    }
    
    .progress-modal-title {
        font-size: 1.1rem;
    }
    
    .progress-modal-body {
        padding: 1.5rem;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .detail-item {
        padding: 0.5rem;
    }
    
    .progress-bar-track {
        height: 20px;
    }
}

/* Archives List Styles */
.archives-list-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.archive-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.archive-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.archive-header h5 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-word;
}

.archive-info {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.archive-info p {
    margin: 0.25rem 0;
}

.archive-actions {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

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

.onedrive-status {
    padding: 1rem;
}

.onedrive-section {
    margin-bottom: 1.5rem;
}

.onedrive-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.onedrive-files-list {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.onedrive-files-container {
    margin-top: 1rem;
}

.onedrive-archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.onedrive-file-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.onedrive-file-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.onedrive-file-header {
    margin-bottom: 0.75rem;
}

.onedrive-file-header h5 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-word;
}

.onedrive-file-info {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.onedrive-file-info p {
    margin: 0.25rem 0;
}

.onedrive-file-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.onedrive-folder-selector {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.onedrive-folders-list {
    max-height: 400px;
    overflow-y: auto;
}

.onedrive-folder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.onedrive-folder-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.onedrive-folder-item i {
    color: #fbbf24;
    font-size: 1.2rem;
}

.onedrive-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .file-info {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        margin-bottom: 1rem;
        border-radius: 0 0 15px 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .upload-section {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .results-actions {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .file-info {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .analytics-panel {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .date-range span {
        text-align: center;
        padding: 0.25rem 0;
    }
    
    .subid-filter {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .global-search-section {
        padding: 1rem;
    }
    
    .global-search-input input {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Mobile dark theme adjustments */
    [data-theme="dark"] .filter-modal-content {
        width: 95%;
        margin: 1rem;
        border-radius: 15px;
    }
    
    [data-theme="dark"] .duplicates-modal-content {
        width: 95%;
        margin: 1rem;
        border-radius: 15px;
    }
} 

/* Маскировка элементов интерфейса */
.hidden-element {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Ensure modals are hidden by default */
.filter-modal:not(.show),
.modal:not(.show),
.duplicates-modal:not(.show) {
    display: none !important;
}

.duplicates-modal.show {
    display: flex !important;
    z-index: 2000 !important;
}

/* Debug: Simple modal visibility fix */
.filter-modal.show {
    display: flex !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Fix dark theme for log details modal */
.modal.show {
    display: flex !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

.modal.show .modal-content {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
}

.modal.show .modal-header {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
}

.modal.show .modal-body {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .original-details {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .original-details h4 {
    color: var(--text-primary, black) !important;
}

.modal.show #logDetails {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
}

.modal.show .keitaro-format {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .keitaro-format h4 {
    color: var(--text-primary, black) !important;
}

.modal.show #keitaroLog {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
}

.modal.show .click-flow {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .click-flow h4 {
    color: var(--text-primary, black) !important;
}

.modal.show #clickFlowContent {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
}

.modal.show .click-uniqueness {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .click-uniqueness h4 {
    color: var(--text-primary, black) !important;
}

.modal.show #uniquenessInfo {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* Uniqueness status styles */
.uniqueness-status.status-first {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.uniqueness-status.status-duplicate {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.uniqueness-status.status-unique {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Duplicate row styling */
.duplicate-row {
    background: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid #ffc107 !important;
}

.duplicate-row:hover {
    background: rgba(255, 193, 7, 0.2) !important;
}

/* First click row styling */
.first-click-row {
    background: rgba(251, 191, 36, 0.1) !important;
    border-left: 4px solid #fbbf24 !important;
}

.first-click-row:hover {
    background: rgba(251, 191, 36, 0.2) !important;
}

/* Fix click flow in dark theme - general rules */
.click-flow {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.click-flow h4 {
    color: var(--text-primary, black) !important;
}

#clickFlowContent {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
}

/* Fix all click flow elements in dark theme - AGGRESSIVE RULES */
.click-flow .flow-step,
.click-flow .flow-content,
.click-flow .flow-title,
.click-flow .flow-description,
.click-flow .flow-details,
.click-flow .flow-value,
.click-flow .flow-checks,
.click-flow .flow-check-item,
.click-flow .flow-check-status,
.click-flow .flow-expand-btn,
.click-flow .flow-hidden-content {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.click-flow .flow-step {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.click-flow .flow-content {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.click-flow .flow-title {
    color: var(--text-primary, black) !important;
}

.click-flow .flow-description {
    color: var(--text-secondary, #666) !important;
}

.click-flow .flow-details {
    color: var(--text-primary, black) !important;
}

.click-flow .flow-value {
    color: var(--accent-primary, #007bff) !important;
}

.click-flow .flow-checks {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
}

.click-flow .flow-check-item {
    color: var(--text-primary, black) !important;
}

.click-flow .flow-check-status {
    color: var(--text-primary, black) !important;
}

.click-flow .flow-expand-btn {
    background: var(--accent-primary, #007bff) !important;
    color: white !important;
}

.click-flow .flow-hidden-content {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
}

/* Force all text in click flow to be black */
.click-flow * {
    color: var(--text-primary, black) !important;
}

.click-flow .flow-description {
    color: var(--text-secondary, #666) !important;
}

.click-flow .flow-value {
    color: var(--accent-primary, #007bff) !important;
}

.modal.show .click-flow {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
}

.modal.show .click-flow h4 {
    color: var(--text-primary, black) !important;
}

.modal.show #clickFlowContent {
    background: var(--bg-secondary, #f8f9fa) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, #e9ecef) !important;
}

/* Fix dark theme for file info panel */
.file-info {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
}

.file-info.show {
    background: var(--bg-card, white) !important;
    color: var(--text-primary, black) !important;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1)) !important;
}

.file-info .info-item {
    color: var(--text-primary, black) !important;
}

.file-info.show .info-item {
    color: var(--text-primary, black) !important;
}

.file-info .label {
    color: var(--text-secondary, #666) !important;
}

.file-info.show .label {
    color: var(--text-secondary, #666) !important;
}

.file-info #fileName,
.file-info #fileSize,
.file-info #totalRecords,
.file-info #filteredRecords {
    color: var(--text-primary, black) !important;
}

.file-info.show #fileName,
.file-info.show #fileSize,
.file-info.show #totalRecords,
.file-info.show #filteredRecords {
    color: var(--text-primary, black) !important;
}

.filter-modal.show .filter-modal-content {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    width: 80% !important;
    max-width: 600px !important;
    margin: auto !important;
    padding: 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.filter-modal.show .filter-modal-body {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10000 !important;
}

.filter-modal.show .filter-modal-header {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    position: relative !important;
    z-index: 10001 !important;
}

.filter-modal.show .filter-modal-footer {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    position: relative !important;
    z-index: 10001 !important;
}

.filter-modal.show .active-filters {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10002 !important;
}

.filter-modal.show .no-filters-message {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10003 !important;
}

.filter-modal.show .add-filter-section {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10004 !important;
}

.filter-modal.show .filter-type-selection {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10005 !important;
}

.filter-modal.show .active-filters-section {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10006 !important;
}

.filter-modal.show .filter-actions-section {
    background: white !important;
    color: black !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 10007 !important;
}

/* Force all text to be visible */
.filter-modal.show * {
    color: black !important;
    background: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}
