.cr-container { background: #f8fafc; padding: 20px; border-radius: 12px; }
.cr-input-card { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; display: flex; align-items: flex-end; gap: 15px; flex-wrap: wrap; }
.cr-input-group { flex: 1; min-width: 200px; }
.cr-label { font-weight: 600; color: #475569; margin-bottom: 5px; display: block; font-size: 0.9rem; }
.cr-input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; }
    .d-md-block {
        display: block !important;
        margin-bottom: 15px;
    }
.cr-btn { background: #10b981; color: #fff; border: none; padding: 10px 24px; margin-bottom: 20px; border-radius: 8px; font-weight: 600; cursor: pointer; height: 42px; }
.cr-btn:hover { opacity: 0.9; }
.cr-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* Saved Section */
.cr-saved-toggle { text-align: right; margin-bottom: 15px; }
.cr-saved-btn { background: white; border: 1px solid #e2e8f0; color: #64748b; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.cr-saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; margin-bottom: 20px; }
.cr-saved-item { background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; cursor: pointer; transition: all 0.2s; position: relative; }
.cr-saved-item:hover { border-color: #10b981; background: #ecfdf5; }
.cr-saved-title { font-weight: bold; color: #1e293b; font-size: 0.95rem; }
.cr-saved-date { font-size: 0.8rem; color: #94a3b8; margin-top: 4px; }
.cr-saved-delete { position: absolute; top: 10px; right: 10px; color: #ef4444; background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.cr-saved-item:hover .cr-saved-delete { opacity: 1; }

/* Timeline */
.cr-timeline { position: relative; padding-left: 30px; margin-top: 30px; }
.cr-timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #e2e8f0; border-radius: 2px; }
.cr-step { position: relative; margin-bottom: 40px; }
.cr-step-marker { position: absolute; left: -43px; top: 0; width: 30px; height: 30px; background: #10b981; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; border: 4px solid #f0fdf4; }
.cr-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.cr-step-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.cr-step-title { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.cr-duration { background: #ecfdf5; color: #047857; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.cr-desc { color: #64748b; line-height: 1.6; margin-bottom: 15px; font-size: 0.95rem; }

/* Skills */
.cr-skills-section { margin-bottom: 15px; }
.cr-skill-category { display: flex; gap: 10px; margin-bottom: 8px; align-items: baseline; }
.cr-skill-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; width: 90px; flex-shrink: 0; }
.cr-skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-badge { padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.cr-must { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.cr-pref { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cr-comp { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.cr-resources { background: #f8fafc; padding: 12px; border-radius: 8px; font-size: 0.9rem; color: #475569; }
.cr-res-tag { display: inline-block; background: #e2e8f0; padding: 2px 8px; border-radius: 4px; margin-right: 5px; font-size: 0.8rem; }

/* Save Action */
.cr-save-actions { text-align: right; margin-top: 20px; }
.cr-btn-save { background: #1e293b; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.cr-btn-save:hover { background: #334155; }

/* Rate Limit Modal */
.ai-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 9999; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.ai-modal-card {
    background: #fff; width: 90%; max-width: 450px; border-radius: 16px;
    padding: 30px; text-align: center; position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.ai-modal-icon {
    width: 60px; height: 60px; background: #fee2e2; color: #ef4444;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 20px;
}
.ai-modal-title { font-size: 1.25rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.ai-modal-body { color: #64748b; font-size: 0.95rem; line-height: 1.5; margin-bottom: 25px; }

.btn-modal-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white !important; width: 100%; padding: 12px; border-radius: 8px;
    font-weight: 700; display: block; text-decoration: none;
}
.btn-modal-primary:hover { opacity: 0.9; color: #fafafa!important; }

.ai-modal-close {
    position: absolute; top: 15px; right: 15px; background: transparent;
    border: none; color: #94a3b8; font-size: 20px; cursor: pointer;
}
.ai-modal-close:hover { color: #ef4444; }

/* --- COPIED & ADAPTED FROM JOBSCANNER FOR PRELOADER & USP --- */

/* USP / Empty State */
.ai-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-in;
    margin-top: 20px;
}

.ai-usp-header { text-align: center; margin-bottom: 30px; }
.ai-usp-header h4 { font-size: 1.5rem; color: #1e293b; line-height: 1.4; margin-bottom: 10px; }
.ai-usp-header p { font-size: 0.95rem; color: #64748b; }

.ai-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; width: 100%; max-width: 600px; }
.ai-stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; text-align: center; transition: transform 0.2s; }
.ai-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.ai-stat-card i { font-size: 2rem; margin-bottom: 10px; display: block; }

.ai-benefits-list { background: #fff; border-radius: 12px; padding: 25px; border: 1px solid #e2e8f0; width: 100%; max-width: 600px; }
.ai-benefit-item { display: flex; align-items: flex-start; margin-bottom: 12px; font-size: 0.9rem; color: #475569; }
.ai-benefit-item:last-child { margin-bottom: 0; }
.ai-benefit-item i { margin-top: 3px; flex-shrink: 0; }

/* Multi-Step Loader */
.ai-loader {
    display: none;
    padding: 40px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    margin-top: 20px;
}

.ai-loader-content { max-width: 500px; margin: 0 auto; }

.ai-progress-wrapper { position: relative; height: 8px; background: #e2e8f0; border-radius: 4px; margin-bottom: 30px; }
.ai-progress-bar { width: 100%; height: 100%; border-radius: 4px; overflow: hidden; }
.ai-progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); transition: width 0.3s ease; }
.ai-progress-percent { position: absolute; right: 0; top: -25px; font-size: 0.85rem; font-weight: 700; color: #10b981; }

.ai-stage-indicators { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; padding: 0 10px; }
.ai-stage-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; position: relative; z-index: 2; transition: all 0.3s; }
.ai-stage-dot.active { background: #10b981; transform: scale(1.3); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }

.ai-stage-message { min-height: 100px; animation: fadeIn 0.5s; }
.ai-stage-icon { font-size: 2.5rem; color: #10b981; margin-bottom: 15px; animation: pulse 1.5s infinite; }
.ai-counter-wrapper { margin-top: 15px; animation: slideUp 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ai-counter-value { font-size: 3rem; font-weight: 800; color: #1e293b; line-height: 1; margin-bottom: 5px; background: -webkit-linear-gradient(45deg, #10b981, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.ai-counter-label { font-size: 0.9rem; color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }

@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* Fade-in Animation (Matching JobScanner) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-stats-grid { grid-template-columns: 1fr; }
    .ai-stat-card { padding: 15px; }
}