/* ============================================= */
/* PDF Import Modal                               */
/* ============================================= */

.pdf-import-modal {
    max-width: 600px;
    width: 95%;
}

/* --- Upload Step --- */

.pdf-upload-step {
    padding: 32px 28px;
}

.pdf-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-main);
}

.pdf-drop-zone:hover,
.pdf-drop-zone.pdf-drop-hover {
    border-color: var(--primary-color);
    background: #f0f6ff;
}

.pdf-drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.pdf-drop-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.pdf-drop-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.pdf-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.pdf-lock-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.pdf-privacy-note strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.pdf-privacy-note p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Onboarding footer */
.pdf-onboarding-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pdf-skip-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.pdf-skip-btn:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.pdf-settings-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 12px 0 0 0;
}

/* --- Processing Step --- */

.pdf-processing-step {
    padding: 60px 28px;
    text-align: center;
}

.pdf-processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.pdf-processing-step h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.pdf-progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--progress-track-bg);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 12px;
}

.pdf-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 50px;
    transition: width 0.3s ease;
}

.pdf-processing-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Preview Step --- */

.pdf-preview-step {
    padding: 24px;
}

.pdf-preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pdf-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.pdf-stat.catalog {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.pdf-stat.custom {
    background: #fff8e1;
    border-color: #fcd34d;
}

.pdf-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.pdf-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 2px;
}

/* Semester sections */
.pdf-preview-semesters {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.pdf-preview-semester {
    border-bottom: 1px solid var(--border-color);
}

.pdf-preview-semester:last-child {
    border-bottom: none;
}

.pdf-preview-sem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--header-bg);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.pdf-preview-sem-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.pdf-preview-courses {
    padding: 8px 0;
}

.pdf-preview-course {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
}

.pdf-preview-course:hover {
    background: #fafbfc;
}

.pdf-preview-icon {
    flex-shrink: 0;
    font-size: 14px;
}

.pdf-preview-id {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    direction: ltr;
    min-width: 75px;
}

.pdf-preview-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

.pdf-preview-grade {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
}

.pdf-badge-custom {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: #fff8e1;
    color: #f59e0b;
    border: 1px solid #fcd34d;
}

/* Warning */
.pdf-import-warning {
    padding: 12px 16px;
    background: #fff8e1;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 16px;
}

/* Actions */
.pdf-preview-actions {
    display: flex;
    gap: 12px;
}

.pdf-confirm-btn {
    flex: 1;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.pdf-confirm-btn:hover {
    background: #0b5ed7;
}

.pdf-cancel-btn {
    padding: 14px 24px;
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-cancel-btn:hover {
    background: #e9ecef;
}

/* --- Error Step --- */

.pdf-error-step {
    padding: 60px 28px;
    text-align: center;
}

.pdf-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.pdf-error-step h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.pdf-error-step p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.pdf-retry-btn {
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.pdf-retry-btn:hover {
    background: #0b5ed7;
}

/* --- Mobile --- */

@media (max-width: 768px) {
    .pdf-import-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .pdf-upload-step {
        padding: 24px 20px;
    }

    .pdf-drop-zone {
        padding: 36px 20px;
    }

    .pdf-preview-step {
        padding: 20px 16px;
    }

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

    .pdf-preview-semesters {
        max-height: 300px;
    }

    .pdf-preview-actions {
        flex-direction: column;
    }

    .pdf-preview-course {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pdf-preview-name {
        flex-basis: 100%;
        order: 5;
    }
}
/* Onboarding description */
.pdf-onboarding-desc {
    margin-top: 20px;
    padding: 16px;
    background: #f0f6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
}

.pdf-onboarding-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    text-align: center;
}