.source-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.source-toggle input {
    width: 16px;
    height: 16px;
}

.source-note,
.record-source-note {
    margin: 8px 0 0;
    color: #5f6b7a;
    font-size: 13px;
}

.upload-state-banner,
.upload-state-note,
.form-block-title {
    margin: 12px 0;
}

.upload-state-banner,
.upload-state-note {
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
}

.form-block-title {
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.04em;
}

.upload-progress {
    margin-top: 12px;
}

.upload-progress-bar {
    height: 12px;
    border: 1px solid #94a3b8;
    background: #e2e8f0;
    overflow: hidden;
}

.upload-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #f59e0b);
    transition: width 0.2s ease;
}

.upload-progress-text {
    margin: 8px 0 0;
    color: #334155;
    font-size: 13px;
}

.download-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.download-link-list a {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #94a3b8;
    background: #f8fafc;
    color: #1d4ed8;
    text-decoration: none;
}

.download-link-list.compact {
    margin: 0 0 10px;
}

.extra-downloads {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #cbd5e1;
}

.download-link-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-link-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-link-row {
    display: grid;
    grid-template-columns: 180px 1fr 92px;
    gap: 10px;
}

.download-link-row input {
    width: 100%;
    box-sizing: border-box;
}

.download-link-remove {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
}

.download-links-advanced {
    margin-top: 12px;
}

.download-links-advanced label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #475569;
}

.download-links-advanced textarea {
    min-height: 88px;
    font-family: Menlo, Consolas, monospace;
}

.upload-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.46);
}

.upload-modal-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.upload-modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.upload-modal-text {
    padding: 16px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
}

.upload-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 16px;
}

@media (max-width: 768px) {
    .download-link-list {
        flex-direction: column;
    }

    .download-link-list a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .download-link-row {
        grid-template-columns: 1fr;
    }

    .download-link-remove {
        min-height: 40px;
    }

    .upload-modal-backdrop {
        padding: 12px;
    }
}
