* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: #1a1f2e;
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --accent-primary: #10b981;
    --accent-primary-glow: rgba(16, 185, 129, 0.2);
    --accent-secondary: #3b82f6;
    --accent-tertiary: #8b5cf6;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --border-color: #374151;
    --border-subtle: #1f2937;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
                     radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Tech grid pattern */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
    opacity: 0;
    box-shadow: 0 0 10px var(--accent-primary), 0 0 5px var(--accent-primary);
    pointer-events: none;
    will-change: width, opacity;
    transform: translateZ(0); /* Force GPU acceleration */
}

.progress-bar.loading {
    opacity: 1;
}

/* Header */
.header {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem 2rem;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.3;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.brand-logo::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: 10px;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

.brand-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary-glow);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.offline {
    background: var(--text-muted);
    box-shadow: none;
    animation: none;
}

.refresh-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.refresh-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;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.refresh-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Main Layout */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-primary-glow);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title::before {
    content: attr(data-icon);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--accent-primary-glow));
}

/* Filters Panel */
.filters {
    position: sticky;
    top: 100px;
    align-self: start;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.radio-option label {
    cursor: pointer;
    font-size: 0.875rem;
}

input[type="datetime-local"],
input[type="text"] {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    transition: all 0.2s;
}

input[type="datetime-local"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.apply-btn {
    width: 100%;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
}

.apply-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;
}

.apply-btn:hover::before {
    left: 100%;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.apply-btn:active {
    transform: translateY(0);
}

.apply-btn:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Date Presets */
.date-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.preset-btn:active, .preset-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(0.98);
}

/* Date Swap Button */
.date-swap-container {
    display: flex;
    justify-content: center;
    margin: 0.25rem 0;
}

.swap-dates-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--accent-primary);
}

.swap-dates-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.swap-dates-btn:active {
    transform: scale(0.95);
}

.swap-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Filter Help Text */
.filter-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.filter-actions .apply-btn {
    flex: 1;
    margin-top: 0;
}

.clear-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.clear-btn:active {
    transform: scale(0.98);
}

/* Filter Summary */
.filter-summary {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-summary-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-summary-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.filter-tag-label {
    color: var(--text-muted);
}

.filter-tag-value {
    color: var(--accent-primary);
    font-weight: 600;
}

.filter-tag-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.filter-tag-remove:hover {
    color: var(--accent-danger);
}

.filter-summary-clear {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-summary-clear:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.summary-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-primary-glow);
}

.summary-card:hover::after {
    opacity: 1;
}

.summary-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.summary-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.summary-card-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
}

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid transparent;
}

tbody tr:nth-child(even) {
    background: rgba(31, 41, 55, 0.3);
}

tbody tr:hover {
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-left-color: var(--accent-primary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Sparkline */
.sparkline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 28px;
    min-width: 120px;
}

.sparkline-bar {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px var(--accent-primary-glow);
    position: relative;
    overflow: hidden;
}

.sparkline-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Coverage Grid */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.coverage-tile {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.coverage-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.coverage-tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-primary-glow);
    border-color: var(--accent-primary);
}

.coverage-tile:hover::before {
    opacity: 1;
}

.coverage-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.geohash-code {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    letter-spacing: 0.05em;
}

.quality-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
}

.quality-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}

.quality-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.quality-high::before {
    background: var(--accent-primary);
}

.quality-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.quality-medium::before {
    background: var(--accent-warning);
}

.quality-low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.quality-low::before {
    background: var(--accent-danger);
}

.coverage-tile-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.coverage-tile-stats div {
    margin-bottom: 0.25rem;
}

.coverage-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pagination button {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pagination button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.pagination button span {
    position: relative;
    z-index: 1;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.pagination button:hover:not(:disabled)::before {
    opacity: 0.1;
}

.pagination button:active:not(:disabled) {
    transform: translateY(0);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-subtle);
}

/* Loading & Empty States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        rgba(16, 185, 129, 0.1) 20%,
        rgba(59, 130, 246, 0.1) 40%,
        var(--bg-tertiary) 60%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(16, 185, 129, 0.15) 50%,
        transparent 100%
    );
    animation: shimmerSlide 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes shimmerSlide {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
}

.skeleton-row {
    height: 48px;
    margin-bottom: 0.5rem;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for live data */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Fade in animation - opacity only to prevent layout shifts */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.data-updated {
    animation: pulse 0.6s cubic-bezier(0.4, 0, 0.6, 1);
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
    will-change: opacity;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.3) 0%, rgba(26, 31, 46, 0.3) 100%);
    border-radius: 0.75rem;
    border: 1px dashed var(--border-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    filter: drop-shadow(0 0 12px var(--accent-primary-glow));
}

.empty-state-text {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.empty-state-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.error-state {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    border-radius: 0.5rem;
    color: var(--accent-danger);
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.error-message {
    margin-bottom: 1rem;
}

.retry-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.retry-btn:active {
    transform: translateY(0);
}

/* Sections */
.section {
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease-out backwards;
    will-change: opacity;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.section-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin: 0;
}

.record-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
}

.icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.icon-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.icon-btn:active {
    transform: translateY(0);
}

.collapse-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
}

.collapse-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.collapse-btn .collapse-icon {
    transition: transform 0.3s ease;
}

.collapse-btn.collapsed .collapse-icon {
    transform: none;
}

.table-search {
    width: 200px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.table-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.table-search::placeholder {
    color: var(--text-muted);
}

/* Sortable Table Headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

th.sortable:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
}

th.sortable::after {
    content: '\21F3';
    position: absolute;
    right: 0.5rem;
    opacity: 0.3;
    font-size: 0.75rem;
}

th.sortable.asc::after {
    content: '\2191';
    opacity: 1;
    color: var(--accent-primary);
}

th.sortable.desc::after {
    content: '\2193';
    opacity: 1;
    color: var(--accent-primary);
}

/* Copy-to-clipboard */
.copyable {
    cursor: pointer;
    transition: all 0.2s;
}

.copyable:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.tooltip-icon {
    width: 16px;
    height: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-left: 0.375rem;
    transition: all 0.2s;
}

.tooltip:hover .tooltip-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-secondary);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.footer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 20px var(--accent-primary-glow);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    pointer-events: none;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .brand {
        flex-direction: row;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .brand-info h1 {
        font-size: 1.25rem;
    }

    .brand-tagline {
        font-size: 0.625rem;
    }

    .status-indicator {
        justify-content: center;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .coverage-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
    }

    .table-container {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem;
    }

    /* Better mobile section controls */
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .table-search {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .icon-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }

    /* Better filter layout on mobile */
    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .apply-btn,
    .filter-actions .clear-btn {
        width: 100%;
    }

    .date-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Larger touch targets */
    .preset-btn,
    .swap-dates-btn,
    button {
        min-height: 44px;
    }

    /* Better card spacing on mobile */
    .card {
        margin-bottom: 1rem;
    }

    .section {
        margin-bottom: 1.5rem;
    }

    /* Hide complex sparklines on mobile */
    .sparkline-label {
        font-size: 0.625rem;
    }

    /* Better pagination on mobile */
    .pagination {
        gap: 0.5rem;
    }

    .pagination button {
        flex: 1;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .card {
        padding: 1rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Utility */
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* Performance Optimizations */
.geohash-mini {
    font-size: 0.75rem;
}

.sparkline-label {
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.empty-cell {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.error-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* CSS Containment for better performance */
.card {
    contain: layout style;
}

.coverage-tile {
    contain: layout style paint;
}

.summary-card {
    contain: layout style paint;
}

/* Will-change for animations */
.refresh-btn,
.apply-btn,
.pagination button {
    will-change: transform;
}

.coverage-tile {
    will-change: transform, box-shadow;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 5rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.success::before {
    background: var(--accent-primary);
}

.toast.error::before {
    background: var(--accent-danger);
}

.toast.info::before {
    background: var(--accent-secondary);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .toast-container {
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}
