/* Dashboard specific styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.profile-id-display {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    font-size: 0.9rem;
    word-break: break-all;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.card-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.property-item,
.session-item,
.event-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    cursor: pointer;
}

.item-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.item-details {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    display: none;
}

.item-details.expanded {
    display: block;
}

.expand-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.expand-btn:hover {
    background: #e3f2fd;
}

.expand-btn.expanded {
    background: #007bff;
    color: white;
}

.property-item:last-child,
.session-item:last-child,
.event-item:last-child {
    border-bottom: none;
}

.property-key,
.session-key,
.event-type {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    flex-shrink: 0;
}

.property-value,
.session-value,
.event-details {
    color: #6c757d;
    word-break: break-word;
    flex: 1;
    margin-left: 1rem;
}

.property-value code,
.session-value code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.refresh-btn:hover {
    background: #0056b3;
}

.refresh-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.event-timestamp {
    font-size: 0.8rem;
    color: #adb5bd;
    margin-top: 0.25rem;
}

.event-scope {
    font-size: 0.8rem;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-top: 0.25rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .item-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-value,
    .event-details {
        margin-top: 0.5rem;
    }

    .expand-btn {
        margin-top: 0.5rem;
        align-self: flex-start;
    }
}

/* JSON Viewer styles */
.json-viewer {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.json-viewer pre {
    margin: 0;
    white-space: pre-wrap;
}