/* Modern User Dashboard & PDF Processing Design */

/* Import Modern Variables from Admin CSS */
@import url('modern-admin.css');

/* User Dashboard Specific Styles */
.user-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Modern Profile Card */
.profile-card-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.profile-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    position: relative;
    z-index: 1;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-xl);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-display);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.profile-email {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.profile-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Subscription Card Modern */
.subscription-card-modern {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.subscription-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.subscription-card-modern::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.subscription-content {
    position: relative;
    z-index: 1;
}

.subscription-plan-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.subscription-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.subscription-usage {
    margin-top: var(--spacing-lg);
}

.usage-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
    font-weight: 600;
}

.usage-progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.usage-progress-bar {
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* PDF Processing Section */
.pdf-process-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.process-step {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.process-step.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.process-step.completed {
    border-color: var(--success-color);
}

.process-step-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.process-step.completed .process-step-number {
    background: var(--success-gradient);
}

.process-step-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.process-step-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Upload Area Modern */
.upload-area-modern {
    background: var(--bg-secondary);
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area-modern:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-2px);
}

.upload-area-modern.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: var(--shadow-xl);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    border-radius: var(--radius-xl);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.upload-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.upload-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.upload-button-modern {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.upload-button-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* File List Modern */
.file-list-modern {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.file-item-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.file-item-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.file-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(239, 83, 80, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-color);
    font-size: 20px;
}

.file-info-modern {
    flex: 1;
}

.file-name-modern {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.file-size-modern {
    font-size: 13px;
    color: var(--text-secondary);
}

.file-progress-modern {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 8px;
}

.file-progress-bar-modern {
    height: 100%;
    background: var(--success-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.file-actions-modern {
    display: flex;
    gap: var(--spacing-sm);
}

.file-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.file-action-btn.delete:hover {
    background: var(--danger-color);
}

/* Template Selector Modern */
.template-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.template-card-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card-modern:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.template-card-modern.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.template-icon-modern {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: var(--spacing-md);
}

.template-name-modern {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.template-description-modern {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

.template-fields-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Results Display Modern */
.results-container-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    margin-top: var(--spacing-xl);
}

.results-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.results-title-modern {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.results-actions-modern {
    display: flex;
    gap: var(--spacing-sm);
}

.result-field-modern {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--primary-color);
}

.result-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.result-field-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Loading States */
.loading-spinner-modern {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-text-modern {
    margin-top: var(--spacing-lg);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .user-dashboard-container,
    .pdf-process-container {
        padding: 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar-large {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .template-grid-modern {
        grid-template-columns: 1fr;
    }
}
