/* ========================================
   Upload Page — Premium Redesign
   ======================================== */

/* --- Page base --- */
body.upload-page {
    overflow-y: auto;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/* --- Animated background orbs --- */
.bg-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: orbit 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.5), transparent 70%);
    top: -120px;
    right: -100px;
    animation-duration: 22s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(191, 90, 242, 0.35), transparent 70%);
    bottom: -80px;
    left: -100px;
    animation-duration: 26s;
    animation-delay: -8s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(48, 209, 88, 0.3), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-delay: -14s;
}

@keyframes orbit {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 40px) scale(0.95);
    }

    75% {
        transform: translate(-40px, -20px) scale(1.02);
    }
}

[data-theme="light"] .orb {
    opacity: 0.12;
}

/* --- Shell layout --- */
.upload-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 32px 24px;
    gap: 0;
}

/* --- Navigation bar --- */
.upload-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.brand-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: scale(1.08);
}

.brand-back-btn:active {
    transform: scale(0.95);
}

.brand-back-btn svg {
    width: 18px;
    height: 18px;
}

[data-theme="light"] .brand-back-btn {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .brand-back-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-gradient);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.nav-actions {
    display: flex;
    gap: 8px;
}

/* --- Nav Action Link (Text + Icon) --- */
.nav-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-action-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: scale(1.03);
}

.nav-action-link:active {
    transform: scale(0.97);
}

.nav-action-link svg {
    width: 16px;
    height: 16px;
}

[data-theme="light"] .nav-action-link {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-action-link:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* --- GitHub link button --- */
.github-link-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.github-link-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: scale(1.08);
}

.github-link-btn:active {
    transform: scale(0.95);
}

.github-link-btn svg {
    width: 18px;
    height: 18px;
}

[data-theme="light"] .github-link-btn {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .github-link-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* --- Step Indicators --- */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    transition: opacity var(--transition-normal);
    opacity: 0.4;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 0.7;
}

.step-dot {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.step-item.active .step-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}

.step-item.completed .step-dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step-label {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.step-line {
    flex: 0 0 40px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    border-radius: 999px;
    transition: background var(--transition-normal);
}

.step-line.active {
    background: var(--accent-primary);
}

/* --- Glass card mixin --- */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--border-hover);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-md);
}

/* --- Step panels --- */
.step-panel {
    display: none;
    animation: fadeSlideIn 0.4s ease forwards;
}

.step-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* --- Step 1: Panel grid --- */
.panel-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* --- Upload cards --- */
.upload-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 22px;
    height: 22px;
}

.homework-icon {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-primary);
}

.report-icon {
    background: rgba(191, 90, 242, 0.12);
    color: var(--system-purple);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-group h3 {
    font-size: 1rem;
    font-weight: 700;
}

.card-badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-badge.required {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-primary);
}

.card-badge.optional {
    background: rgba(142, 142, 147, 0.12);
    color: var(--text-tertiary);
}

/* --- Drop zone --- */
.drop-zone {
    position: relative;
}

.drop-zone-label {
    display: block;
    cursor: pointer;
    padding: 28px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    transition: all var(--transition-normal);
    text-align: center;
}

.drop-zone-label:hover {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.04);
}

.drop-zone.dragover .drop-zone-label {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: scale(1.01);
}

.drop-zone.uploaded .drop-zone-label {
    border-color: var(--success);
    border-style: solid;
    background: rgba(48, 209, 88, 0.06);
}

.drop-zone-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.drop-icon-ring {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.1);
    transition: all var(--transition-normal);
}

.drop-zone-label:hover .drop-icon-ring {
    background: rgba(var(--accent-rgb), 0.18);
    transform: translateY(-2px);
}

.drop-zone.uploaded .drop-icon-ring {
    background: rgba(48, 209, 88, 0.15);
}

.drop-icon-ring svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.drop-zone.uploaded .drop-icon-ring svg {
    color: var(--success);
}

.drop-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drop-primary {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drop-secondary {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.drop-zone.uploaded .drop-primary {
    color: var(--success);
}

/* --- File list --- */
.file-list-container {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.file-list-container.visible {
    display: flex;
    animation: fadeSlideIn 0.3s ease;
}

.file-list-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-list-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-list-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.icon-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn svg {
    width: 14px;
    height: 14px;
}

.add-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.1);
}

.clear-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(255, 69, 58, 0.1);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    animation: fadeSlideIn 0.25s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
}

[data-theme="light"] .file-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .file-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}

.file-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.file-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.file-item:hover .file-remove {
    opacity: 1;
}

.file-remove:hover {
    background: rgba(255, 69, 58, 0.12);
    color: var(--error);
}

.file-remove svg {
    width: 14px;
    height: 14px;
}

/* --- Progress --- */
.progress-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
}

[data-theme="light"] .progress-track {
    background: rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-align: right;
}

/* --- Step 2: Config grid --- */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.config-grid> :first-child {
    grid-column: 1 / -1;
}

.config-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.config-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-card-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.config-card-icon svg {
    width: 18px;
    height: 18px;
}

.config-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.config-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Source toggle (pill buttons) --- */
.source-toggle-group {
    display: flex;
    gap: 8px;
}

.source-chip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.source-chip:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.08);
}

.source-chip.active {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.source-chip svg {
    width: 16px;
    height: 16px;
}

[data-theme="light"] .source-chip {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .source-chip.active {
    background: rgba(var(--accent-rgb), 0.08);
}

/* --- Info callout --- */
.info-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-callout svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* --- Comment fields --- */
.comment-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    resize: vertical;
    transition: all var(--transition-fast);
}

.modern-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.06);
}

.modern-input::placeholder {
    color: var(--text-placeholder);
}

[data-theme="light"] .modern-input {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .modern-input:focus {
    background: rgba(0, 0, 0, 0.02);
}

.number-input {
    max-width: 100px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Option cards (radio replacements) --- */
.option-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.option-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.option-card.selected {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.06);
}

.option-card input[type="radio"] {
    display: none;
}

.option-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.option-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.option-card.selected .option-icon {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-primary);
}

.option-icon svg {
    width: 18px;
    height: 18px;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.option-check {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: all var(--transition-fast);
    color: transparent;
}

.option-card.selected .option-check {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.option-check svg {
    width: 12px;
    height: 12px;
}

[data-theme="light"] .option-card {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .option-card.selected {
    background: rgba(var(--accent-rgb), 0.05);
}

/* --- Toggle rows (switch) --- */
.toggle-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.toggle-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .toggle-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-desc {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* --- Modern switch --- */
.modern-switch {
    position: relative;
    flex-shrink: 0;
}

.modern-switch input {
    display: none;
}

.switch-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg-quaternary);
    position: relative;
    cursor: pointer;
    transition: background var(--transition-normal);
}

.switch-track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-normal);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.modern-switch input:checked+.switch-track {
    background: var(--success);
}

.modern-switch input:checked+.switch-track::after {
    transform: translateX(20px);
}

/* --- Step navigation --- */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: -0.01em;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

.nav-btn.primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35);
}

.nav-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.45);
}

.nav-btn.primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.nav-btn.primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.nav-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

[data-theme="light"] .nav-btn.secondary {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* --- Footer --- */
.upload-footer {
    text-align: center;
    padding-top: 16px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.upload-footer kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0 2px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .upload-footer kbd {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* --- Modal styling --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    width: 420px;
    max-width: 90vw;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    text-align: center;
}

.modal-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-primary);
}

.modal-icon svg {
    width: 26px;
    height: 26px;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.confirm-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confirm-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.confirm-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-source-text {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .upload-shell {
        padding: 20px 16px 16px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-grid> :first-child {
        grid-column: auto;
    }

    .step-label {
        display: none;
    }

    .step-line {
        flex: 0 0 20px;
    }

    .nav-brand .brand-text h1 {
        font-size: 1rem;
    }

    .brand-badge {
        display: none;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .upload-shell {
        padding: 14px 12px 12px;
    }

    .upload-card {
        padding: 18px;
        border-radius: 16px;
    }

    .config-card {
        padding: 18px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.82rem;
    }

    .source-toggle-group {
        flex-direction: column;
    }
}