/* Research Details Page Styles - Extracted from templates/pages/details.html */

    .ldr-metrics-section {
        margin-top: 2rem;
    }

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

    .ldr-metric-card {
        padding: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        text-align: center;
    }

    .ldr-metric-value {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--primary-color);
        margin: 0.5rem 0;
    }

    .ldr-metric-label {
        color: var(--text-secondary);
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        opacity: 1 !important;
    }

    .ldr-chart-container {
        position: relative;
        height: 300px;
        margin-top: 1rem;
    }

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

    .ldr-phase-stat-item {
        padding: 0.75rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        text-align: center;
    }

    .ldr-phase-name {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }

    .ldr-phase-tokens {
        color: var(--primary-color);
        font-weight: 500;
    }

    .ldr-phase-calls {
        color: var(--text-secondary);
        font-size: 0.875rem;
    }

    .ldr-search-engine-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        transition: background-color 0.2s;
    }

    .ldr-search-engine-item:hover {
        background-color: var(--border-color);
    }

    .ldr-search-engine-info {
        display: flex;
        flex-direction: column;
    }

    .ldr-search-engine-name {
        font-weight: 600;
        color: var(--text-primary);
    }

    .ldr-search-engine-stats {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-top: 0.25rem;
    }

    .ldr-search-timeline-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        border-left: 3px solid var(--primary-color);
    }

    .ldr-search-timeline-query {
        font-weight: 500;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }

    .ldr-search-timeline-meta {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }

    .ldr-search-timeline-results {
        text-align: right;
        font-size: 0.875rem;
    }

    .ldr-search-status-success {
        color: var(--success-color);
    }

    .ldr-search-status-error {
        color: var(--error-color);
    }

    .ldr-loading-spinner {
        text-align: center;
        padding: 3rem;
    }

    .ldr-error-message {
        text-align: center;
        padding: 2rem;
        color: var(--error-color);
    }

    .ldr-charts-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    @media (max-width: 768px) {
        .ldr-charts-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }

    /* Data table styling for better readability */
    .ldr-data-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        font-size: 0.9rem;
        background: var(--card-bg);
        border-radius: 0.5rem;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .ldr-data-table thead {
        background: var(--bg-secondary);
    }

    .ldr-data-table th {
        padding: 1rem 0.75rem;
        text-align: left;
        font-weight: 600;
        color: var(--text-primary);
        border-bottom: 2px solid var(--border-color);
        white-space: nowrap;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.05em;
    }

    .ldr-data-table td {
        padding: 0.875rem 0.75rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-secondary);
        vertical-align: middle;
    }

    .ldr-data-table tbody tr {
        transition: background-color 0.2s;
    }

    .ldr-data-table tbody tr:hover {
        background-color: var(--bg-secondary);
    }

    .ldr-data-table tbody tr:last-child td {
        border-bottom: none;
    }

    /* Specific column styling */
    .ldr-data-table td:first-child,
    .ldr-data-table th:first-child {
        padding-left: 1rem;
    }

    .ldr-data-table td:last-child,
    .ldr-data-table th:last-child {
        padding-right: 1rem;
    }

    /* Numeric columns alignment */
    .ldr-data-table td[style*="text-align: right"] {
        font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
        font-size: 0.85rem;
    }

    /* Status badges in tables */
    .ldr-data-table .badge {
        display: inline-block;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .ldr-data-table .badge-success {
        background-color: rgba(var(--success-color-rgb), 0.2);
        color: var(--success-color);
    }

    .ldr-data-table .badge-danger {
        background-color: rgba(var(--error-color-rgb), 0.2);
        color: var(--error-color);
    }
