/* ============================================
   SCAN PAGE
   ============================================ */

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

.scan-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.scan-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scan-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.scan-form-card {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.features-info {
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.features-info h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--gray-800);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.feature-item i {
    color: var(--success);
    font-size: 1rem;
}

/* ============================================
   PROGRESS MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.progress-modal {
    padding: var(--spacing-2xl);
}

.progress-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.progress-header h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.progress-header p {
    color: var(--gray-600);
    margin: 0;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    padding: var(--spacing);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    transition: var(--transition);
}

.progress-step.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid var(--primary);
}

.progress-step.completed {
    background: #d1fae5;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    transition: var(--transition);
}

.progress-step.active .step-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    animation: pulse 2s infinite;
}

.progress-step.completed .step-icon {
    background: var(--success);
}

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

.step-label {
    flex: 1;
    font-weight: 600;
    color: var(--gray-700);
}

.step-status {
    font-size: 1.25rem;
}

.step-status i.fa-spinner {
    color: var(--primary);
}

.step-status i.fa-check {
    color: var(--success);
}

.step-status i.fa-clock {
    color: var(--gray-400);
}

.progress-bar-container {
    margin-bottom: var(--spacing-xl);
}

.progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-percentage {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-tips {
    text-align: center;
    padding: var(--spacing);
    background: var(--gray-50);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ============================================
   REPORT PAGE
   ============================================ */

.report-container {
    max-width: 1400px;
    margin: 0 auto;
}

.report-header {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-2xl);
}

.report-header-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-2xl);
}

.report-info h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    word-break: break-all;
}

.report-meta {
    display: flex;
    gap: var(--spacing-lg);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.report-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.report-actions {
    display: flex;
    gap: var(--spacing);
}

.report-score-banner {
    display: flex;
    gap: var(--spacing-2xl);
    align-items: center;
}

.score-card-large {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-xl);
}

.score-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.score-value.grade-a,
.score-value.grade-a\+ {
    color: var(--success);
}

.score-value.grade-b,
.score-value.grade-b\+ {
    color: var(--info);
}

.score-value.grade-c,
.score-value.grade-c\+ {
    color: var(--warning);
}

.score-value.grade-d,
.score-value.grade-f {
    color: var(--danger);
}

.score-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-grade {
    margin-top: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
}

.score-breakdown {
    flex: 1;
    display: flex;
    gap: var(--spacing-xl);
}

.score-item {
    text-align: center;
}

.score-circle {
    position: relative;
    width: 100px;
    height: 100px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 3;
}

.circle-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.score-text {
    font-size: 12px;
    font-weight: 700;
    fill: var(--primary);
    transform: rotate(90deg);
    transform-origin: center;
}

.score-item-label {
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ============================================
   REPORT TABS
   ============================================ */

.report-tabs {
    display: flex;
    gap: var(--spacing-sm);
    background: var(--white);
    padding: var(--spacing);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-2xl);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: var(--spacing) var(--spacing-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--gray-600);
}

.tab-btn:hover {
    background: var(--gray-50);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ============================================
   SECTION CARDS
   ============================================ */

.section-card {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-2xl);
}

.section-card h2 {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing);
    border-bottom: 2px solid var(--gray-100);
}

.section-card h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing);
    color: var(--gray-700);
}

.section-description {
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.info-item {
    padding: var(--spacing);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.info-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xs);
}

.info-value {
    font-weight: 600;
    color: var(--gray-800);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

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

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

/* ============================================
   ISSUES
   ============================================ */

.issues-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.issue-summary-card {
    text-align: center;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid;
}

.issue-summary-card.critical {
    background: #fee2e2;
    border-color: #dc2626;
}

.issue-summary-card.high {
    background: #fef3c7;
    border-color: #f59e0b;
}

.issue-summary-card.medium {
    background: #dbeafe;
    border-color: #3b82f6;
}

.issue-summary-card.low {
    background: #d1fae5;
    border-color: #10b981;
}

.issue-count {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.issue-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.issue-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    background: var(--gray-50);
}

.issue-card.priority-critical {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.issue-card.priority-high {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.issue-card.priority-medium {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.issue-card.priority-low {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.issue-header {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.priority-badge.critical {
    background: #dc2626;
    color: var(--white);
}

.priority-badge.high {
    background: #f59e0b;
    color: var(--white);
}

.priority-badge.medium {
    background: #3b82f6;
    color: var(--white);
}

.priority-badge.low {
    background: #10b981;
    color: var(--white);
}

.issue-title {
    flex: 1;
    font-weight: 600;
    color: var(--gray-800);
}

.issue-solution {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: var(--spacing);
}

/* ============================================
   METRICS
   ============================================ */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.metric-card {
    padding: var(--spacing-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-align: center;
}

.metric-card.warning {
    background: #fef3c7;
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing);
    color: var(--primary);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.metric-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.technical-checks {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.check-item {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    padding: var(--spacing);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.check-item.success {
    background: #d1fae5;
    color: #065f46;
}

.check-item.warning {
    background: #fef3c7;
    color: #92400e;
}

.check-item.danger {
    background: #fee2e2;
    color: #991b1b;
}

.check-item i {
    font-size: 1.25rem;
}

.check-item span:first-of-type {
    flex: 1;
    font-weight: 600;
}

.check-value {
    font-weight: 600;
}

/* ============================================
   LLM VISIBILITY
   ============================================ */

.llm-platforms {
    display: grid;
    gap: var(--spacing-lg);
}

.llm-platform-card {
    padding: var(--spacing-xl);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.llm-platform-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.platform-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.platform-info {
    flex: 1;
}

.platform-info h3 {
    margin-bottom: var(--spacing-xs);
}

.platform-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.platform-status.status-excellent {
    background: #d1fae5;
    color: #065f46;
}

.platform-status.status-good {
    background: #dbeafe;
    color: #1e40af;
}

.platform-status.status-moderate {
    background: #fef3c7;
    color: #92400e;
}

.platform-status.status-low,
.platform-status.status-very-low {
    background: #fee2e2;
    color: #991b1b;
}

.platform-score {
    display: flex;
    align-items: center;
}

.score-circle-small {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.platform-metrics {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.platform-metric {
    display: grid;
    grid-template-columns: 150px 1fr 80px;
    gap: var(--spacing);
    align-items: center;
}

.metric-name {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.progress-bar-small {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.metric-value {
    text-align: right;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* ============================================
   PERFORMANCE
   ============================================ */

.performance-devices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.device-performance h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    margin-bottom: var(--spacing-lg);
}

.performance-scores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.perf-score {
    text-align: center;
}

.gauge {
    position: relative;
    width: 100px;
    height: 50px;
    margin: 0 auto var(--spacing);
}

.gauge svg {
    overflow: visible;
}

.gauge-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.gauge-value {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.gauge-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.core-metrics h4 {
    margin-bottom: var(--spacing);
    color: var(--gray-700);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing);
    border-bottom: 1px solid var(--gray-200);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-name {
    font-weight: 600;
    color: var(--gray-700);
}

.metric-score {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
}

.metric-score.score-good {
    background: #d1fae5;
    color: #065f46;
}

.metric-score.score-medium {
    background: #fef3c7;
    color: #92400e;
}

.metric-score.score-poor {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   KEYWORDS
   ============================================ */

.keyword-section {
    margin-bottom: var(--spacing-2xl);
}

.keywords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing);
}

.keyword-card {
    padding: var(--spacing);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
}

.keyword-card:hover {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow);
}

.keyword-text {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.keyword-meta {
    display: flex;
    gap: var(--spacing-sm);
}

.keyword-badge {
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    background: var(--primary);
    color: var(--white);
}

.keywords-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.keyword-list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    padding: var(--spacing);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.keyword-list-item i {
    color: var(--primary);
}

/* ============================================
   CONTENT / FAQ
   ============================================ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.faq-item {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-question {
    padding: var(--spacing-lg);
    background: var(--gray-50);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--gray-100);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.schema-section {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: var(--gray-900);
    border-radius: var(--radius-lg);
}

.schema-section h4 {
    color: var(--white);
    margin-bottom: var(--spacing);
}

.schema-section pre {
    background: var(--gray-800);
    padding: var(--spacing);
    border-radius: var(--radius);
    overflow-x: auto;
}

.schema-section code {
    color: #a5d6ff;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.blog-ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.blog-idea-card {
    padding: var(--spacing-xl);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.blog-idea-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.blog-idea-card h3 {
    margin-bottom: var(--spacing);
}

.blog-idea-card p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
}

.blog-meta {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ============================================
   ROADMAP
   ============================================ */

.roadmap-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
}

.roadmap-phase {
    padding: var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.phase-header h3 {
    margin: 0;
}

.phase-gain {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
}

.phase-tasks {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.roadmap-task {
    display: flex;
    align-items: start;
    gap: var(--spacing);
    padding: var(--spacing);
    background: var(--white);
    border-radius: var(--radius);
}

.task-checkbox {
    margin-top: 0.25rem;
}

.task-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.task-solution {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ============================================
   AI ASSISTANT
   ============================================ */

.ai-assistant {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.ai-assistant-toggle {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.ai-assistant-toggle:hover {
    transform: scale(1.1);
}

.ai-assistant-panel {
    display: none;
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 400px;
    max-height: 600px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    flex-direction: column;
}

.ai-assistant-panel.active {
    display: flex;
}

.ai-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.ai-assistant-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
}

.ai-assistant-chat {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.ai-message,
.user-message {
    display: flex;
    gap: var(--spacing);
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-avatar,
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.user-avatar {
    background: var(--gray-300);
    color: var(--gray-700);
}

.ai-text,
.user-text {
    padding: var(--spacing);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

.ai-text {
    background: var(--gray-100);
    color: var(--gray-800);
}

.user-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.ai-assistant-input {
    display: flex;
    gap: var(--spacing);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.ai-assistant-input input {
    flex: 1;
    padding: var(--spacing);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

.ai-assistant-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.ai-assistant-input button {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.ai-assistant-input button:hover {
    transform: scale(1.05);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .performance-devices {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid,
    .issues-summary,
    .performance-scores {
        grid-template-columns: 1fr;
    }
    
    .score-breakdown {
        flex-direction: column;
    }
    
    .report-tabs {
        flex-wrap: wrap;
    }
    
    .ai-assistant-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
    }
}
/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .sidebar {
    background: #1e293b;
    border-right-color: #334155;
}

body.dark-mode .nav-item {
    color: #cbd5e1;
}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
    background: #334155;
    color: #f1f5f9;
}

body.dark-mode .nav-section {
    color: #64748b;
}

body.dark-mode .main-content {
    background: #0f172a;
}

body.dark-mode .top-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .page-title {
    color: #f1f5f9;
}

body.dark-mode .credits-badge {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .notification-btn {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .stat-card,
body.dark-mode .action-card,
body.dark-mode .chart-card,
body.dark-mode .section-card,
body.dark-mode .report-card,
body.dark-mode .report-form-card,
body.dark-mode .scan-form-card {
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .stat-value {
    color: #f1f5f9;
}

body.dark-mode .stat-label,
body.dark-mode .section-description {
    color: #94a3b8;
}

body.dark-mode .form-control,
body.dark-mode input[type="text"],
body.dark-mode input[type="url"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode select,
body.dark-mode textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .form-control:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

body.dark-mode table th {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode table tr {
    border-color: #334155;
}

body.dark-mode table tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.5);
}

body.dark-mode .alert-success {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #10b981;
}

body.dark-mode .alert-error {
    background: #7f1d1d;
    color: #fca5a5;
    border-color: #ef4444;
}

body.dark-mode .report-header,
body.dark-mode .scan-header {
    background: #1e293b;
}

body.dark-mode .llm-platform-card,
body.dark-mode .issue-box,
body.dark-mode .recommendation-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .user-profile {
    border-top-color: #334155;
}

body.dark-mode .user-name,
body.dark-mode .user-email {
    color: #cbd5e1;
}

body.dark-mode a {
    color: #818cf8;
}

body.dark-mode .ai-assistant-panel {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .ai-message .ai-text {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .ai-message.user-message .ai-text {
    background: #667eea;
    color: white;
}

body.dark-mode .ai-assistant-input input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

/* Score circles in dark mode */
body.dark-mode .score-circle,
body.dark-mode .score-circle-small {
    background: #334155;
}

/* Glassmorphism accent for premium feel */
body.dark-mode .stat-card:hover,
body.dark-mode .action-card:hover {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* ============================================
   DARK MODE — Extended coverage (v4)
   Ensures every admin & dashboard surface
   actually changes color when dark mode is on.
   ============================================ */

/* Top header user dropdown */
body.dark-mode .user-dropdown {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important;
}
body.dark-mode .user-dropdown > div > div:first-child,
body.dark-mode .user-dropdown > div > div:nth-child(2) {
    color: #f1f5f9 !important;
}
body.dark-mode .user-dropdown a {
    color: #cbd5e1 !important;
}
body.dark-mode .user-dropdown a:hover {
    background: #334155 !important;
    color: #f1f5f9 !important;
}
body.dark-mode .header-user-btn span {
    color: #e2e8f0 !important;
}
body.dark-mode .header-user-btn i.fa-chevron-down {
    color: #94a3b8 !important;
}

/* Pro admin hero / cards */
body.dark-mode .pro-hero {
    box-shadow: 0 20px 40px rgba(102,126,234,0.35) !important;
}
body.dark-mode .pro-stat-card,
body.dark-mode .pro-card,
body.dark-mode .pro-table-card,
body.dark-mode .pro-list-card,
body.dark-mode .pro-panel,
body.dark-mode .pro-section-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}
body.dark-mode .pro-stat-card .psc-label {
    color: #94a3b8 !important;
}
body.dark-mode .pro-stat-card .psc-value {
    color: #f1f5f9 !important;
}
body.dark-mode .pro-stat-card .psc-delta {
    color: #34d399 !important;
}
body.dark-mode .pro-stat-card .psc-delta.down {
    color: #f87171 !important;
}
body.dark-mode .pro-card h3,
body.dark-mode .pro-table-card h3,
body.dark-mode .pro-list-card h3,
body.dark-mode .pro-panel h3,
body.dark-mode .pro-section-card h3 {
    color: #f1f5f9 !important;
}
body.dark-mode .pro-card p,
body.dark-mode .pro-table-card p,
body.dark-mode .pro-list-card p,
body.dark-mode .pro-panel p,
body.dark-mode .pro-section-card p {
    color: #cbd5e1 !important;
}

/* Pro admin tables */
body.dark-mode .pro-table,
body.dark-mode .pro-admin table {
    background: transparent !important;
    color: #e2e8f0 !important;
}
body.dark-mode .pro-table thead th,
body.dark-mode .pro-admin table thead th,
body.dark-mode .pro-admin table th {
    background: #0f172a !important;
    color: #cbd5e1 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .pro-table tbody td,
body.dark-mode .pro-admin table tbody td,
body.dark-mode .pro-admin table td {
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .pro-table tbody tr:hover,
body.dark-mode .pro-admin table tbody tr:hover {
    background: rgba(102,126,234,0.08) !important;
}

/* Pro admin badges / chips */
body.dark-mode .pro-badge,
body.dark-mode .pro-chip,
body.dark-mode .pro-tag {
    background: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
body.dark-mode .pro-badge.success,
body.dark-mode .pro-chip.success,
body.dark-mode .pro-tag.success {
    background: rgba(16,185,129,0.18) !important;
    color: #6ee7b7 !important;
}
body.dark-mode .pro-badge.warn,
body.dark-mode .pro-chip.warn,
body.dark-mode .pro-tag.warn {
    background: rgba(245,158,11,0.18) !important;
    color: #fcd34d !important;
}
body.dark-mode .pro-badge.danger,
body.dark-mode .pro-chip.danger,
body.dark-mode .pro-tag.danger {
    background: rgba(239,68,68,0.18) !important;
    color: #fca5a5 !important;
}

/* Empty states */
body.dark-mode .empty-state,
body.dark-mode .reports-history-container .empty-state {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
body.dark-mode .empty-state h3 {
    color: #f1f5f9 !important;
}
body.dark-mode .empty-state p {
    color: #94a3b8 !important;
}

/* Reports history cards */
body.dark-mode .reports-history-container .report-card {
    background: #1e293b !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
    border: 1px solid #334155;
}
body.dark-mode .reports-history-container .report-card-header {
    background: rgba(15, 23, 42, 0.4) !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .reports-history-container .report-url {
    color: #e2e8f0 !important;
}
body.dark-mode .reports-history-container .report-card-footer {
    background: rgba(15, 23, 42, 0.4) !important;
    border-top-color: #334155 !important;
}
body.dark-mode .reports-history-container .report-meta,
body.dark-mode .reports-history-container .report-grade {
    color: #cbd5e1 !important;
}

/* Forms in admin pages */
body.dark-mode .form-group label,
body.dark-mode .form-label {
    color: #e2e8f0 !important;
}
body.dark-mode .form-help,
body.dark-mode small.form-help {
    color: #94a3b8 !important;
}

/* Cards and surfaces used across dashboard / admin */
body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode .box,
body.dark-mode .widget,
body.dark-mode .settings-section,
body.dark-mode .api-key-card,
body.dark-mode .prompt-card,
body.dark-mode .log-entry,
body.dark-mode .user-row {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
body.dark-mode .card h3,
body.dark-mode .panel h3,
body.dark-mode .box h3,
body.dark-mode .widget h3,
body.dark-mode .settings-section h3 {
    color: #f1f5f9 !important;
}
body.dark-mode .card p,
body.dark-mode .panel p,
body.dark-mode .box p,
body.dark-mode .widget p,
body.dark-mode .settings-section p {
    color: #cbd5e1 !important;
}

/* Audit / scan / report surfaces */
body.dark-mode .report-container,
body.dark-mode .scan-form-card,
body.dark-mode .report-form-card {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
body.dark-mode .report-section,
body.dark-mode .report-block,
body.dark-mode .section-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .report-section h2,
body.dark-mode .report-section h3,
body.dark-mode .report-block h2,
body.dark-mode .report-block h3 {
    color: #f1f5f9 !important;
}
body.dark-mode .report-section p,
body.dark-mode .report-block p {
    color: #cbd5e1 !important;
}

/* Buttons secondary */
body.dark-mode .btn-secondary,
body.dark-mode .btn-default {
    background: #334155 !important;
    color: #e2e8f0 !important;
    border: 1px solid #475569 !important;
}
body.dark-mode .btn-secondary:hover,
body.dark-mode .btn-default:hover {
    background: #475569 !important;
}

/* Header user avatar kept bright in dark mode */
body.dark-mode .header-user-avatar {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

/* Footer */
body.dark-mode .footer,
body.dark-mode footer {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-top-color: #334155 !important;
}

/* Generic text colors */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #f1f5f9;
}
body.dark-mode p, body.dark-mode li, body.dark-mode span, body.dark-mode div {
    color: inherit;
}
body.dark-mode .text-muted, body.dark-mode .muted {
    color: #94a3b8 !important;
}
body.dark-mode .text-primary, body.dark-mode .text-brand {
    color: #818cf8 !important;
}

/* Borders */
body.dark-mode hr, body.dark-mode .divider {
    border-color: #334155 !important;
}

/* Code blocks */
body.dark-mode pre, body.dark-mode code {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* ============================================
   REPORT VIEW — Pro SaaS polish (v4)
   ============================================ */

/* Make the score circle fill colors actually render (the original CSS
   references url(#gradient) which is never defined; use solid colors). */
.score-circle .circle-fill {
    stroke: #667eea;
}
.score-circle[data-score="0"] .circle-fill,
.score-circle[data-score="0"] .circle-fill { stroke: #ef4444; }

/* Color the score circle fill by score value via attribute selectors.
   Numbers below 60 use red, 60-79 amber, 80+ green. */
.score-circle[data-score] .circle-fill {
    stroke: #667eea;
}
.score-item:hover .score-circle { transform: scale(1.04); transition: transform 0.25s; }

/* Bigger, more confident report header */
.report-header {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}
.report-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 6px; height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

/* Score card large — make it more striking */
.score-card-large {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    color: white;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}
.score-card-large::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(139,92,246,0.4) 0%, transparent 70%);
    border-radius: 50%;
}
.score-card-large .score-value { color: white !important; position: relative; z-index: 1; }
.score-card-large .score-label { color: rgba(255,255,255,0.7); position: relative; z-index: 1; }
.score-card-large .score-grade {
    color: #fbbf24;
    background: rgba(251,191,36,0.15);
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    display: inline-block;
    margin-top: 0.5rem;
    border: 1px solid rgba(251,191,36,0.3);
    position: relative;
    z-index: 1;
}

/* Section card header with gradient accent */
.section-card {
    border: 1px solid #e5e7eb;
    position: relative;
}
.section-card h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}
.section-card h2 i {
    -webkit-text-fill-color: #667eea;
    color: #667eea;
}

/* Tab buttons — more pro SaaS */
.report-tabs {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.6rem;
    gap: 0.4rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.tab-btn {
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
}
.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    border: none;
    font-size: 0.875rem;
    padding: 0.65rem 1.1rem;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
    color: white;
}
.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.btn-secondary:hover {
    background: #e5e7eb;
    color: #111827;
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-danger:hover {
    background: #fecaca;
    color: #991b1b;
}

/* Report actions row alignment */
.report-actions { gap: 0.5rem; flex-wrap: wrap; }

/* Score breakdown circles — better visual hierarchy */
.score-breakdown {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.score-circle { width: 80px; height: 80px; margin: 0 auto; }
.score-item-label { font-size: 0.75rem; color: #6b7280; font-weight: 600; margin-top: 0.4rem; }
.score-circle svg { width: 80px; height: 80px; }
.score-text { font-size: 14px; font-weight: 700; fill: #667eea; }

/* Make info-grid items more refined */
.info-item {
    background: linear-gradient(135deg, #fafbff 0%, #f5f7ff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    transition: all 0.2s;
}
.info-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.08);
}
.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}
.info-value {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Tables in report view */
.report-section table,
.section-card table {
    width: 100%;
    border-collapse: collapse;
}
.report-section th,
.section-card table th {
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.report-section td,
.section-card table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
}
.report-section tr:hover td,
.section-card table tr:hover td {
    background: #fafbff;
}
