/**
 * ActProof.ai - Enterprise CSS
 * Modern, professional styling for enterprise dashboard
 */

/* ============================================
   ENTERPRISE NAVBAR
   ============================================ */

.badge-pro {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    margin-left: 0.75rem;
}

.user-menu {
    margin-left: auto;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-user:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ============================================
   RESULTS SECTION - REDESIGNED
   ============================================ */

.results-section {
    position: relative;
    margin-top: 3rem;
    animation: slideUp 0.4s ease-out;
}

.btn-close-results {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.btn-close-results:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

/* ============================================
   EXECUTIVE SUMMARY
   ============================================ */

.executive-summary {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.summary-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.summary-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.meta-item svg {
    color: var(--gray-400);
}

.summary-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* ============================================
   SCORE CARD HERO
   ============================================ */

.score-card-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

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

.score-ring-progress {
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s;
}

.score-value-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

[data-theme="dark"] .score-value {
    filter: brightness(1.2);
}

.score-max {
    font-size: 1.25rem;
    color: var(--gray-400);
    font-weight: 600;
}

.score-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.status-compliant {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.status-non-compliant {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.status-partial {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.risk-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.risk-low {
    background: #d1fae5;
    color: #065f46;
}

.risk-minimal {
    background: #e0e7ff;
    color: #3730a3;
}

.risk-limited {
    background: #fef3c7;
    color: #92400e;
}

.risk-medium {
    background: #fed7aa;
    color: #9a3412;
}

.risk-high {
    background: #fecaca;
    color: #991b1b;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */

.quick-actions h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 1rem 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.action-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn svg {
    flex-shrink: 0;
}

/* Unlock All Features button - special styling */
.action-btn-unlock {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-color: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.action-btn-unlock:hover {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(99, 102, 241, 0.4);
}

.action-btn-unlock svg {
    animation: lock-bounce 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    }
}

@keyframes lock-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* ============================================
   CRITICAL ALERTS
   ============================================ */

.critical-alerts {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.alerts-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0;
}

.alerts-header svg {
    color: #ef4444;
}

.alerts-count {
    background: var(--gray-200);
    color: var(--error);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid var(--gray-400);
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    background: var(--bg-primary);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    display: flex;
    align-items: start;
    gap: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.alert-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15);
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 0.25rem;
}

.alert-description {
    color: #7f1d1d;
    font-size: 0.875rem;
    margin: 0;
}

.alert-priority {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: #fecaca;
    color: #991b1b;
    align-self: start;
}

/* ============================================
   VISUAL DASHBOARD
   ============================================ */

.visual-dashboard {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

.visual-dashboard h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* KPI Cards */
.kpi-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.kpi-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.kpi-icon {
    font-size: 2rem;
}

.kpi-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Chart Cards */
.chart-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.chart-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.chart-card-wide {
    grid-column: span 2;
}

.chart-card canvas {
    max-height: 250px;
}

/* ============================================
   ACTIONABLE INSIGHTS
   ============================================ */

.actionable-insights {
    background: var(--gray-100);
    border: 2px solid var(--gray-400);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.actionable-insights h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1.5rem 0;
}

.actionable-insights h3 svg {
    color: var(--primary);
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.insight-item {
    background: var(--gray-200);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--gray-400);
    display: flex;
    align-items: start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.insight-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-left-width: 6px;
    background: var(--gray-300);
}

.insight-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 0.125rem;
    background: var(--gray-100);
}

.insight-content {
    flex: 1;
}

.insight-text {
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.insight-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-700);
}

.insight-priority {
    font-weight: 700;
}

.insights-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   DETAILED ANALYSIS
   ============================================ */

.detailed-analysis {
    background: var(--gray-100);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-400);
    transition: background-color 0.3s ease;
}

.detailed-analysis > h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

/* ============================================
   SIGN-UP MESSAGE
   ============================================ */

.sign-up-message {
    margin: 2rem 0;
    animation: fadeIn 0.5s ease-in;
}

.sign-up-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .sign-up-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(99, 102, 241, 0.2);
}

.sign-up-icon {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sign-up-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.sign-up-card > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
    display: inline-block;
}

.feature-list li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.sign-up-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.sign-up-actions .btn {
    min-width: 200px;
}

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

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

@media (max-width: 1024px) {
    .summary-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .chart-card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .score-card-hero {
        flex-direction: column;
        text-align: center;
    }

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

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

    .summary-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .insights-actions {
        flex-direction: column;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   TRENDS PLACEHOLDER
   ============================================ */

.trends-placeholder {
    text-align: center;
    padding: 3rem 2rem;
}

.trends-placeholder .placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.trends-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.trends-placeholder p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

#trendsChart {
    max-height: 300px;
    margin-top: 2rem;
}
