/* ===== Reports Tab ===== */

/* Type Picker */
.reports-type-picker {
    padding: 0 4px;
}

.reports-type-picker-header {
    margin-bottom: 24px;
}

.reports-type-picker-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}

.reports-type-picker-header p {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.reports-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.report-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-type-card i {
    font-size: 22px;
    color: #f97316;
}

.report-type-card span {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.report-type-card:hover {
    border-color: #f97316;
    background: #fffbf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

/* Table View Header */
.reports-table-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.reports-table-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    white-space: nowrap;
}

.reports-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.reports-back-btn:hover {
    background: #e5e7eb;
    color: #f97316;
}

.reports-date-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
}

.reports-date-controls .date-input {
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    outline: none;
    background: #fff;
}

.reports-date-controls .date-input:focus {
    border-color: #f97316;
}

.reports-date-controls .date-separator {
    font-size: 11px;
    color: #9ca3af;
}

.reports-date-controls .quick-date-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.reports-date-controls .quick-date-btn:hover {
    background: #e5e7eb;
    color: #f97316;
}

.reports-date-controls .filter-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.reports-date-controls .filter-button:hover {
    background: #ea580c;
}

.reports-date-controls .clear-date-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.15s;
}

.reports-date-controls .clear-date-btn:hover {
    color: #ef4444;
}

@media (max-width: 768px) {
    .reports-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .reports-date-controls {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .reports-type-grid {
        grid-template-columns: 1fr;
    }
}

/* Legacy — keep for compatibility */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.reports-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.reports-header h2 i {
    color: #f97316;
}

/* Table */
.reports-table-container {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 20px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th {
    background: #fafafa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.03em;
    color: #6b7280;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.reports-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    color: #374151;
    vertical-align: middle;
}

.reports-table tr:last-child td {
    border-bottom: none;
}

.reports-table tr:hover {
    background: #fffbf5;
}

/* Cell types */
.date-cell {
    min-width: 140px;
    white-space: nowrap;
}

.site-cell {
    min-width: 130px;
    font-weight: 500;
}

/* Report badges */
.report-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-badge i {
    font-size: 10px;
}

.badge-speed {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.badge-seo {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-ai {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.badge-full {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-basic {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-broken {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-pdf {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

/* Actions */
th.actions-cell,
td.actions-cell {
    min-width: 140px;
}

td.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.action-btn i {
    font-size: 12px;
    color: inherit;
}

.action-btn:hover {
    border-color: #f97316;
    color: #f97316;
}

.screenshot-btn { border-color: #e5e7eb; }
.view-btn { border-color: #e5e7eb; }
.download-btn { border-color: #e5e7eb; }

/* Empty state */
.empty-reports {
    padding: 32px 16px;
    text-align: center;
    color: #9ca3af;
}

.empty-reports i {
    font-size: 32px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.empty-reports p {
    font-size: 14px;
    margin: 0;
}

/* Tooltip */
.action-tooltip {
    position: relative;
}

.action-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 6px;
    z-index: 10;
}

.reports-table tbody tr.clickable-row:hover {
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .reports-table th,
    .reports-table td {
        padding: 10px 12px;
    }

    .reports-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}
