/* ============================================
   DIAGNÓSTICO FINANCEIRO - PRIORIZZI
   Design System Moderno Fintech
   ============================================ */

/* CSS Variables */
:root {
    --primary: 174 62% 47%;
    --primary-dark: 174 62% 40%;
    --primary-light: 174 62% 92%;
    --secondary: 174 45% 25%;
    --accent: 45 93% 47%;
    --background: 174 30% 96%;
    --foreground: 174 45% 15%;
    --muted: 174 20% 60%;
    --card: 0 0% 100%;
    --card-foreground: 174 45% 15%;
    --success: 142 76% 36%;
    --warning: 38 92% 50%;
    --error: 0 84% 60%;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(174, 30%, 96%) 0%, hsl(174, 40%, 90%) 50%, hsl(174, 45%, 85%) 100%);
    --gradient-primary: linear-gradient(135deg, hsl(174, 62%, 47%) 0%, hsl(174, 62%, 40%) 100%);
    --gradient-card: linear-gradient(180deg, hsl(0, 0%, 100%) 0%, hsl(174, 20%, 98%) 100%);
    --gradient-glow: linear-gradient(135deg, hsl(174, 62%, 47%, 0.2) 0%, hsl(45, 93%, 47%, 0.1) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px hsl(174, 45%, 25%, 0.06);
    --shadow-md: 0 4px 20px hsl(174, 45%, 25%, 0.08);
    --shadow-lg: 0 8px 40px hsl(174, 45%, 25%, 0.12);
    --shadow-glow: 0 0 40px hsl(174, 62%, 47%, 0.15);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-hero);
    color: hsl(var(--foreground));
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: -2;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, hsl(174, 62%, 47%, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, hsl(45, 93%, 47%, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, hsl(174, 62%, 47%, 0.03) 0%, transparent 70%);
    z-index: -1;
    animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

/* Header Glass */
.header-glass {
    background: hsla(0, 0%, 100%, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(174, 45%, 25%, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsla(174, 62%, 47%, 0.2);
}

.logo-icon i {
    color: hsl(var(--primary));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.text-secondary {
    color: hsl(var(--secondary));
}

.text-muted {
    color: hsl(var(--muted));
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Diagnostic Card */
.diagnostic-card {
    background: hsl(var(--card));
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid hsla(174, 45%, 25%, 0.08);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-icon {
    width: 44px;
    height: 44px;
    background: hsla(255, 255%, 255%, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.step-indicator {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-weight: 600;
}

.step-current {
    font-size: 2rem;
    line-height: 1;
}

.step-separator {
    opacity: 0.6;
}

.step-total {
    opacity: 0.8;
}

/* Progress Section */
.progress-section {
    padding: 1.5rem 2rem;
    background: linear-gradient(180deg, hsl(174, 30%, 97%) 0%, hsl(var(--card)) 100%);
    border-bottom: 1px solid hsla(174, 45%, 25%, 0.06);
}

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

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted));
}

.progress-percentage {
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.progress-bar-container {
    height: 10px;
    background: hsl(var(--primary-light));
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 10px;
}

.progress-glow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: hsl(var(--primary));
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateY(-50%) scale(1.2); }
}

.progress-instruction {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: hsl(var(--muted));
    display: flex;
    align-items: center;
}

.progress-instruction i {
    color: hsl(var(--primary));
}

/* Question Section */
.question-section {
    padding: 2rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--primary-light));
    color: hsl(var(--primary-dark));
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.category-badge i {
    color: hsl(var(--primary));
}

.question-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.question-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.5;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: hsl(var(--card));
    border: 2px solid hsla(174, 45%, 25%, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card:hover {
    border-color: hsl(var(--primary));
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

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

.option-card.selected {
    border-color: hsl(var(--primary));
    background: linear-gradient(135deg, hsl(var(--primary-light)) 0%, hsl(var(--card)) 100%);
    box-shadow: var(--shadow-md), 0 0 0 4px hsla(174, 62%, 47%, 0.1);
}

.option-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid hsla(174, 45%, 25%, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.option-card.selected .option-indicator {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary));
}

.option-check {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    color: white;
}

.option-card.selected .option-check {
    opacity: 1;
    transform: scale(1);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.option-letter {
    width: 28px;
    height: 28px;
    background: hsla(174, 45%, 25%, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--muted));
    transition: all 0.3s ease;
}

.option-card.selected .option-letter {
    background: hsl(var(--primary));
    color: white;
}

.option-text {
    font-size: 1rem;
    color: hsl(var(--foreground));
    font-weight: 500;
}

.option-score {
    color: hsl(var(--accent));
    animation: sparkle 1s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

/* Card Footer */
.card-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(174, 30%, 97%) 100%);
    border-top: 1px solid hsla(174, 45%, 25%, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px hsla(174, 62%, 47%, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px hsla(174, 62%, 47%, 0.4);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: transparent;
    color: hsl(var(--muted));
    border: 2px solid hsla(174, 45%, 25%, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
    background: hsla(174, 62%, 47%, 0.05);
}

.completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, hsl(142, 76%, 36%, 0.1) 0%, hsl(142, 76%, 36%, 0.05) 100%);
    color: hsl(var(--success));
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid hsla(142, 76%, 36%, 0.2);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: hsla(0, 0%, 100%, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid hsla(174, 45%, 25%, 0.08);
    transition: all 0.3s ease;
}

.tip-card:hover {
    background: hsla(0, 0%, 100%, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tip-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-icon i {
    color: hsl(var(--primary));
}

.tip-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.tip-content p {
    font-size: 0.8125rem;
    color: hsl(var(--muted));
    line-height: 1.5;
}

/* Footer */
.footer-minimal {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--muted));
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .card-header {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .progress-section,
    .question-section,
    .card-footer {
        padding: 1.25rem 1.5rem;
    }
    
    .question-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .question-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .question-text {
        font-size: 1.125rem;
    }
    
    .option-card {
        padding: 0.875rem 1rem;
    }
    
    .card-footer {
        flex-direction: column;
    }
    
    .card-footer button {
        width: 100%;
        justify-content: center;
    }
    
    .completed-badge {
        order: -1;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-container {
        flex-direction: column;
        text-align: center;
    }
    
    .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .option-letter {
        display: none;
    }
}
