/* Reports Page Styles */

/* Header */
.reports-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    color: white;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Report Builder Layout */
.report-builder {
    padding: 60px 0;
    background: #f9fafb;
    min-height: calc(100vh - 300px);
}

.builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Panels */
.builder-panel,
.preview-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.builder-panel {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.preview-panel {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.panel-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Form Sections */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

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

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-add {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.action-buttons {
    padding: 30px;
    display: flex;
    gap: 15px;
}

.action-buttons .btn {
    flex: 1;
}

/* Test Cases */
.test-cases-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-case-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}

.test-case-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.test-case-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.test-case-name {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.test-case-status {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.test-case-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-case-description {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

.test-case-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.test-duration,
.test-priority {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Report Preview */
.report-preview {
    padding: 40px;
    background: white;
    min-height: 500px;
}

.report-document {
    background: white;
    padding: 60px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.report-title-page {
    text-align: center;
    padding: 60px 0;
    border-bottom: 3px solid #667eea;
    margin-bottom: 40px;
}

.report-title-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 20px;
}

.report-title-page .report-meta {
    font-size: 1.125rem;
    color: #6b7280;
}

.report-section {
    margin-bottom: 40px;
}

.report-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.report-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.report-info-item {
    background: #f9fafb;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.report-info-item .label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 5px;
}

.report-info-item .value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card.passed {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.stat-card.failed {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.stat-card.skipped {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-card.total {
    border-color: #667eea;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Progress Bar */
.progress-bar {
    background: #e5e7eb;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    transition: width 0.3s ease;
}

/* Test Cases Table */
.test-cases-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.test-cases-table th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.test-cases-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #1f2937;
}

.test-cases-table tr:hover {
    background: #f9fafb;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.passed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.skipped {
    background: #fef3c7;
    color: #92400e;
}

/* Responsive */
@media (max-width: 1024px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }

    .builder-panel,
    .preview-panel {
        position: relative;
        top: 0;
        max-height: none;
    }

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

    .report-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .report-document {
        padding: 30px 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .preview-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-icon {
        width: 100%;
    }
}

/* Active nav link */
.nav-links a.active {
    color: #667eea;
    font-weight: 700;
}
