/* Lean Analytics - Modern Dashboard Styles */
/* Inherits color variables from switchboard-admin.css */

.lean-analytics-wrap {
    /* Map to Switchboard color system - defined here so theme class overrides work */
    --lean-primary: var(--primary-500);
    --lean-primary-dark: var(--primary-600);
    --lean-primary-light: var(--primary-100);
    --lean-primary-50: var(--primary-50);
    --lean-success: #10b981;
    --lean-danger: #ef4444;
    --lean-text: var(--gray-800);
    --lean-text-light: var(--gray-500);
    --lean-text-lighter: var(--gray-400);
    --lean-border: var(--gray-200);
    --lean-bg: #ffffff;
    --lean-bg-subtle: var(--gray-50);
    --lean-bg-hover: var(--gray-100);
    --lean-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --lean-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --lean-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --lean-radius: 8px;

    margin: 20px auto 40px auto;
    max-width: 1400px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.lean-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 0;
}

.lean-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lean-header-left h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--lean-text);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.switchboard-badge {
    font-size: 11px;
    padding: 4px 10px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.lean-privacy-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--lean-primary-50);
    color: var(--lean-primary-dark);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: help;
}

.lean-privacy-badge svg {
    flex-shrink: 0;
}

.lean-privacy-badge:hover .lean-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lean-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 12px 16px;
    background: var(--lean-text);
    color: white;
    border-radius: var(--lean-radius);
    box-shadow: var(--lean-shadow-lg);
    font-size: 13px;
    line-height: 1.6;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s;
    z-index: 1000;
}

.lean-tooltip strong {
    display: block;
    margin-bottom: 4px;
}

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

#lean-range-select {
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    background: white;
    color: var(--lean-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

#lean-range-select:hover,
#lean-range-select:focus {
    border-color: var(--lean-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lean-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    background: white;
    color: var(--lean-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.lean-icon-btn:hover {
    background: var(--lean-bg-hover);
    color: var(--lean-text);
    border-color: var(--lean-text-lighter);
}

.lean-icon-btn:active {
    transform: scale(0.95);
}

/* Settings Panel - Destructive Action UI */
.lean-settings-panel {
    margin-bottom: 24px;
    animation: slideDown 0.3s ease;
}

.lean-settings-panel-inner {
    padding: 20px 24px;
    background: var(--lean-bg);
    border: 1px solid var(--red-200, #fecaca);
    border-radius: var(--lean-radius);
    box-shadow: var(--lean-shadow);
}

.lean-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.lean-settings-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lean-settings-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lean-settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--red-50, #fef2f2);
    border-radius: 10px;
    color: var(--red-500, #ef4444);
    flex-shrink: 0;
}

.lean-settings-title h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--lean-text);
}

.lean-settings-title .lean-muted {
    margin: 0;
}

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

.lean-muted {
    margin: 0 0 16px 0;
    color: var(--lean-text-light);
    font-size: 14px;
}

.lean-cleanup-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lean-cleanup-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--lean-text-light);
    white-space: nowrap;
}

.lean-cleanup-field input[type="date"] {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--lean-bg);
    color: var(--lean-text);
    min-width: 160px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.lean-cleanup-field input[type="date"]:hover {
    border-color: var(--lean-text-lighter);
}

.lean-cleanup-field input[type="date"]:focus {
    outline: none;
    border-color: var(--lean-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lean-cleanup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lean-btn-secondary,
.lean-btn-danger {
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.lean-btn-secondary:hover {
    background: var(--lean-bg-hover);
    border-color: var(--lean-text-lighter);
}

.lean-btn-danger {
    background: var(--red-500, #ef4444);
    color: white;
    border-color: var(--red-500, #ef4444);
}

.lean-btn-danger:hover {
    background: var(--red-600, #dc2626);
    border-color: var(--red-600, #dc2626);
}

#lean-cleanup-result {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--amber-50, #fffbeb);
    border: 1px solid var(--amber-200, #fde68a);
    border-radius: var(--lean-radius);
    font-size: 14px;
    color: var(--amber-700, #b45309);
}

#lean-cleanup-result:empty {
    display: none;
}

/* Tabs */
.lean-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    border-radius: var(--lean-radius);
}

.lean-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--lean-text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.lean-tab svg {
    flex-shrink: 0;
}

.lean-tab:hover {
    color: var(--lean-text);
    background: rgba(255, 255, 255, 0.5);
}

.lean-tab.active {
    background: white;
    color: var(--lean-text);
    box-shadow: var(--lean-shadow);
}

/* Main Content */
.lean-main-content {
    min-height: 400px;
}

/* Loading State */
.lean-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--lean-text-light);
}

.lean-spinner {
    color: var(--lean-primary);
    margin-bottom: 16px;
}

.lean-loading p {
    margin: 0;
    font-size: 14px;
}

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

.lean-stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.lean-stat-card {
    padding: 20px;
    background: white;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    transition: all 0.2s;
}

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

.lean-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lean-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lean-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--lean-text);
    line-height: 1;
    margin-bottom: 8px;
}

.lean-stat-change {
    font-size: 13px;
    font-weight: 500;
}

.lean-stat-change.positive {
    color: var(--lean-success);
}

.lean-stat-change.negative {
    color: var(--lean-danger);
}

.lean-stat-change.neutral {
    color: var(--lean-text-light);
}

/* Realtime Stat Card */
.lean-stat-card-realtime {
    border-color: var(--lean-primary);
    border-width: 2px;
}

.lean-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--lean-primary);
    border-radius: 50%;
    margin-left: 6px;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Chart Container */
.lean-chart-container {
    margin-bottom: 24px;
    padding: 24px;
    background: white;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
}

.lean-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.lean-chart-legend {
    display: flex;
    gap: 20px;
    align-items: center;
}

.lean-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lean-text-light);
}

.lean-chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.lean-chart-legend-color.pageviews {
    background: var(--lean-primary);
}

.lean-chart-legend-color.visits {
    background: var(--lean-success);
}

/* Bar Chart */
.lean-chart {
    position: relative;
    height: 280px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 20px 0 20px 50px;
}

.lean-chart-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 40px;
    width: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
}

.lean-chart-y-label {
    font-size: 11px;
    color: var(--lean-text-lighter);
    text-align: right;
    padding-right: 8px;
}

.lean-chart-grid {
    position: absolute;
    left: 50px;
    right: 0;
    top: 0;
    bottom: 40px;
    padding: 20px 0;
    pointer-events: none;
}

.lean-chart-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--lean-border);
    opacity: 0.5;
}

.lean-chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    min-width: 0;
}

.lean-chart-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: 260px;
    justify-content: flex-end;
    position: relative;
}

.lean-chart-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    min-height: 1px;
}

.lean-chart-bar.pageviews {
    background: var(--lean-primary);
    opacity: 0.9;
}

.lean-chart-bar.visits {
    background: var(--lean-success);
    opacity: 0.8;
}

.lean-chart-bar-group:hover .lean-chart-bar {
    opacity: 1;
    transform: scaleY(1.02);
}

.lean-chart-label {
    font-size: 11px;
    color: var(--lean-text-lighter);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.lean-chart-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--lean-text);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
    pointer-events: none;
}

.lean-chart-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--lean-text);
}

.lean-chart-bar-group:hover .lean-chart-tooltip {
    opacity: 1;
    visibility: visible;
}

.lean-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: var(--lean-text-lighter);
    font-size: 14px;
}

/* Data Grid (flexible columns) */
.lean-data-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

/* 1 Column Grid (single card) */
.lean-data-grid-1col {
    grid-template-columns: 1fr;
}

/* 2 Column Grid */
.lean-data-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 Column Grid */
.lean-data-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

.lean-data-card {
    background: white;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    overflow: hidden;
}

.lean-data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lean-border);
    background: var(--lean-bg-subtle);
}

.lean-data-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--lean-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lean-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--lean-border);
    border-radius: 6px;
    background: white;
    color: var(--lean-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.lean-expand-btn:hover {
    background: var(--lean-primary);
    color: white;
    border-color: var(--lean-primary);
    transform: translateX(2px);
}

.lean-expand-btn svg {
    transition: transform 0.2s;
}

.lean-expand-btn:hover svg {
    transform: translateX(1px);
}

.lean-data-card-body {
    padding: 0;
}

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

.lean-mini-table thead {
    background: var(--lean-bg-subtle);
}

.lean-mini-table th {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--lean-text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.lean-mini-table th.lean-mini-number {
    text-align: right;
    width: 70px;
}

.lean-mini-table tbody tr {
    border-bottom: 1px solid var(--lean-border);
    transition: background 0.15s;
}

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

.lean-mini-table tbody tr:hover {
    background: var(--lean-bg-subtle);
}

.lean-mini-table td {
    padding: 12px 20px;
    font-size: 13px;
}

.lean-mini-table .lean-label {
    color: var(--lean-text);
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lean-mini-table .lean-mini-number {
    text-align: right;
    color: var(--lean-text-light);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.lean-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    color: var(--lean-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--lean-border);
    transition: all 0.2s;
}

.lean-view-all:hover {
    background: var(--lean-bg-subtle);
}

/* Full Table (for dedicated tabs) */
.lean-full-table-container {
    background: white;
    border: 1px solid var(--lean-border);
    border-radius: var(--lean-radius);
    overflow: hidden;
}

.lean-full-table-container h2 {
    margin: 0;
    padding: 24px 24px 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--lean-text);
    border-bottom: 1px solid var(--lean-border);
}

.lean-table,
.lean-full-table {
    width: 100%;
    border-collapse: collapse;
}

.lean-table thead,
.lean-full-table thead {
    background: var(--lean-bg-subtle);
    border-bottom: 1px solid var(--lean-border);
}

.lean-table th,
.lean-full-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 12px;
    color: var(--lean-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lean-table td,
.lean-full-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--lean-border);
    font-size: 14px;
    color: var(--lean-text);
}

.lean-table tbody tr:last-child td,
.lean-full-table tbody tr:last-child td {
    border-bottom: none;
}

.lean-table tbody tr:hover,
.lean-full-table tbody tr:hover {
    background: var(--lean-bg-subtle);
}

.lean-table .lean-path,
.lean-full-table .lean-path {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    color: var(--lean-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.lean-table .lean-path:hover,
.lean-full-table .lean-path:hover {
    color: var(--lean-primary-dark);
    text-decoration: underline;
}

.lean-post-link,
.lean-table-link {
    color: var(--lean-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.lean-post-link:hover,
.lean-table-link:hover {
    color: var(--lean-primary-dark);
    text-decoration: underline;
}

.lean-table .lean-number,
.lean-full-table .lean-number {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Device Grid */
.lean-device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.lean-device-card {
    padding: 20px;
    background: var(--lean-bg-subtle);
    border-radius: var(--lean-radius);
    text-align: center;
}

.lean-device-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--lean-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.lean-device-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--lean-text);
}

/* Empty State */
.lean-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--lean-text-light);
}

.lean-empty-state-icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .lean-stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lean-data-grid-3col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .lean-stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lean-data-grid-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .lean-analytics-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .lean-header-right {
        width: 100%;
    }
    
    #lean-range-select {
        flex: 1;
    }
    
    .lean-stats-grid,
    .lean-stats-grid-5 {
        grid-template-columns: 1fr;
    }
    
    .lean-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .lean-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .lean-settings-right {
        flex-direction: column;
        align-items: stretch;
    }

    .lean-cleanup-field {
        width: 100%;
    }

    .lean-cleanup-field input[type="date"] {
        width: 100%;
        min-width: auto;
    }

    .lean-cleanup-actions {
        width: 100%;
    }

    .lean-cleanup-actions button {
        flex: 1;
    }

    .lean-stats-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Real-Time Styles */
.lean-stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.lean-list-item-main {
    flex: 1;
    min-width: 0;
}

.lean-list-item-label {
    font-weight: 500;
    font-size: 13px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lean-list-item-sublabel {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

.lean-empty-state-small {
    text-align: center;
    padding: 20px;
    color: var(--gray-400);
    font-size: 13px;
}

.lean-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--lean-primary);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.lean-realtime-container {
    max-width: 1200px;
    margin: 0 auto;
}

.lean-realtime-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.lean-realtime-count {
    color: white;
}

.lean-realtime-number {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lean-realtime-label {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.95;
}

.lean-realtime-subtext {
    font-size: 14px;
    opacity: 0.8;
}

.lean-realtime-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lean-realtime-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.lean-realtime-pages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lean-realtime-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s;
}

.lean-realtime-page-item:hover {
    background: var(--gray-100);
    border-color: #d1d5db;
}

.lean-realtime-page-info {
    flex: 1;
    min-width: 0;
}

.lean-realtime-page-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lean-realtime-page-path {
    font-size: 12px;
    color: var(--gray-500);
    font-family: 'Monaco', 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lean-realtime-page-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.lean-realtime-visitors-badge {
    background: var(--lean-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.lean-realtime-time {
    font-size: 12px;
    color: var(--gray-400);
    white-space: nowrap;
}

/* Pulse animation for live indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.lean-pulse-dot {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile responsiveness for real-time */
@media (max-width: 768px) {
    .lean-realtime-number {
        font-size: 48px;
    }

    .lean-realtime-label {
        font-size: 16px;
    }

    .lean-realtime-page-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .lean-realtime-page-stats {
        width: 100%;
        justify-content: space-between;
    }

    .lean-realtime-hero {
        padding: 24px;
    }
}