.cf-file-input-native,
.cf-file-input-native input[type="file"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cf-upload-field {
    display: grid;
    gap: 0.55rem;
    width: 100%;
}

.cf-upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 110px;
    padding: 0.75rem 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #fafcff;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    user-select: none;
}

.cf-upload-dropzone:hover,
.cf-upload-dropzone:focus-visible,
.cf-upload-field.is-active .cf-upload-dropzone {
    border-color: #3b82f6;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: 0;
}

.cf-upload-dropzone.dz-dragover {
    border-color: #2563eb;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cf-upload-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    flex: 0 0 40px;
}

.cf-upload-icon svg {
    width: 20px;
    height: 20px;
}

.cf-upload-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
}

.cf-upload-hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 280px;
}

.cf-upload-preview {
    display: none;
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cf-upload-preview.is-visible {
    display: flex;
}

.cf-upload-preview-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cf-upload-thumb,
.cf-upload-filemark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-upload-filemark {
    color: #64748b;
}

.cf-upload-filemark svg {
    width: 22px;
    height: 22px;
}

.cf-upload-meta {
    min-width: 0;
    flex: 1;
}

.cf-upload-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cf-upload-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
    margin-top: 1px;
}

.cf-upload-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.cf-upload-action {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    padding: 0;
    line-height: 1;
}

.cf-upload-action:hover,
.cf-upload-action:focus-visible {
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
    outline: 0;
}

.cf-upload-action.is-danger:hover,
.cf-upload-action.is-danger:focus-visible {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.cf-upload-action svg {
    width: 16px;
    height: 16px;
}

.cf-upload-field.is-empty .cf-upload-preview {
    display: none;
}

.cf-upload-field.is-empty .cf-upload-dropzone {
    display: flex;
}

.cf-upload-field:not(.is-empty) .cf-upload-dropzone {
    display: none;
}

.cf-upload-hidden-preview {
    display: none !important;
}

@media (max-width: 575.98px) {
    .cf-upload-dropzone {
        min-height: 90px;
        padding: 0.6rem 0.75rem;
    }

    .cf-upload-icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .cf-upload-icon svg {
        width: 17px;
        height: 17px;
    }

    .cf-upload-title {
        font-size: 0.82rem;
    }

    .cf-upload-hint {
        font-size: 0.7rem;
    }

    .cf-upload-preview {
        flex-wrap: wrap;
        padding: 0.55rem 0.65rem;
    }

    .cf-upload-thumb,
    .cf-upload-filemark {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .cf-upload-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
