/* Enhanced Dashboard Styles */

/* Main Dashboard Page */
#client-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

#client-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Dashboard Welcome Screen */
.dashboard-welcome {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: all 0.8s ease-out;
}

.dashboard-welcome.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.welcome-animation-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: welcomeSlideIn 1s ease-out;
    max-width: 500px;
    width: 90%;
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.welcome-badge {
    margin-bottom: 2rem;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

.welcome-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
}

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

.preview-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: previewFloat 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.preview-card:nth-child(1) { animation-delay: 0.3s; }
.preview-card:nth-child(2) { animation-delay: 0.5s; }
.preview-card:nth-child(3) { animation-delay: 0.7s; }

@keyframes previewFloat {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.preview-card p {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.enter-dashboard-btn {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    margin-top: 1rem;
}

.enter-dashboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.5);
}

/* Main Dashboard Content */
.main-dashboard {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    padding: 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 50;
}

.main-dashboard.active {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.client-details h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.client-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* Preparation Section Styling */
.dashboard-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.dashboard-section.active {
    opacity: 1;
    transform: translateY(0);
}

.preparation-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.preparation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.prep-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preparation-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.preparation-content p {
    color: #5a6c7d;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.prep-checklist {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.prep-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.prep-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.prep-check {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    font-weight: bold;
}

.prep-item span:last-child {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.preparation-timeline {
    text-align: center;
    background: rgba(52, 152, 219, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.preparation-timeline p {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.refresh-suggestion {
    margin-top: 1rem;
}

.refresh-btn {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

/* Loading Animation for Dashboard */
.loading-animation {
    margin: 2rem 0;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3498db;
    animation: loadingDots 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDots {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* Mobile Responsive Dashboard */
@media (max-width: 768px) {
    .main-dashboard {
        padding: 1rem;
    }

    .welcome-animation-container {
        padding: 2rem 1rem;
        max-width: 90%;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .dashboard-preview {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .preparation-card {
        padding: 1.5rem;
    }

    .preparation-header h3 {
        font-size: 1.3rem;
    }

    .prep-item {
        padding: 0.8rem;
    }

    .dashboard-header {
        padding: 1rem;
    }

    .agent-photo {
        width: 50px;
        height: 50px;
    }

    .client-details h2 {
        font-size: 1.2rem;
    }
}

/* Compilation Animation Enhancements */
.compilation-container {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin: 2rem 0;
}

.compilation-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.choices-animation-container {
    display: grid;
    gap: 1rem;
    margin: 3rem 0;
    perspective: 1000px;
}

.animated-choice {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: scale(1.2) rotateY(15deg);
    animation: choiceCollect 0.8s ease-out forwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.animated-choice:nth-child(1) { animation-delay: 0.2s; }
.animated-choice:nth-child(2) { animation-delay: 0.4s; }
.animated-choice:nth-child(3) { animation-delay: 0.6s; }
.animated-choice:nth-child(4) { animation-delay: 0.8s; }

@keyframes choiceCollect {
    0% {
        opacity: 0;
        transform: scale(1.2) rotateY(15deg) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotateY(5deg) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateY(0px);
    }
}

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

.choice-text {
    flex: 1;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.compilation-progress {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

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

.progress-ring__circle {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: progressFill 3s ease-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    stroke: white;
}

@keyframes progressFill {
    to {
        stroke-dashoffset: 0;
    }
}

.progress-circle .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.compilation-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Password Requirements Styling */
.password-requirements {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 0.8rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.password-requirements p {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.3rem 0;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.3s ease;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.password-requirements li.valid {
    color: #27ae60;
    font-weight: 600;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #27ae60;
    transform: scale(1.2);
}

/* Almost There Screen Styling */
.almost-there-icon {
    animation: pulse 2s ease-in-out infinite;
}

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

.almost-there-content {
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-highlights {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInLeft 0.6s ease-out forwards;
    opacity: 0;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.feature-item p {
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Custom Neighborhood Input */
.custom-neighborhood {
    position: relative;
    transition: all 0.3s ease;
}

.custom-neighborhood.selected {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border-color: #2980b9;
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.3);
}

.custom-neighborhood-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    background: white;
    color: #2c3e50;
    outline: none;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.custom-neighborhood-input:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

/* Enhanced Navigation Container */
.navigation-container {
    background: rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

/* Enhanced Transitions */
.questionnaire-page {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.questionnaire-page.transitioning {
    filter: blur(2px);
    transform: scale(0.98);
}

/* Success States and Micro-interactions */
.feature-item,
.prep-item,
.animated-choice {
    position: relative;
    overflow: hidden;
}

.feature-item::after,
.prep-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-item:hover::after,
.prep-item:hover::after {
    left: 100%;
}

/* Accessibility Enhancements */
.enter-dashboard-btn:focus,
.refresh-btn:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

/* Loading States */
.loading-state {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Shadows and Depth */
.preparation-card,
.welcome-animation-container {
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Smooth Page Transitions */
.page {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.page:not(.active) {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.page.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}
